efficient-shell 9.14.0 → 10.0.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 (128) hide show
  1. package/README.md +15 -19
  2. package/dist/{Browser-42NYVAPR.js → Browser-RFLTFP7Y.js} +13 -13
  3. package/dist/Calculator-DV2R65OS.js +29 -0
  4. package/dist/{CurrencyConverter-OIXAMDP7.js → CurrencyConverter-ELSCNMUT.js} +6 -6
  5. package/dist/{Documents-V2OKP6JZ.js → Documents-HKTTXLSR.js} +3 -3
  6. package/dist/{Files-OAMTKHYK.js → Files-ZSYGKZOV.js} +88 -88
  7. package/dist/{Notepad-3LG227K2.js → Notepad-63Q3JSCV.js} +9 -9
  8. package/dist/{PomodoroTimer-AYGPGA6Q.js → PomodoroTimer-XHNZGBDR.js} +2 -2
  9. package/dist/{Preview-BBQWQ4DG.js → Preview-PLCASIZA.js} +41 -41
  10. package/dist/Sidebar-QFT5WPK4.js +44 -0
  11. package/dist/{Spreadsheet-MS5FU7ET.js → Spreadsheet-Y7TJIBI5.js} +14 -14
  12. package/dist/{Stock-GSQNTV7E.js → Stock-KLYWTMMD.js} +2 -2
  13. package/dist/{Weather-5XLO2GLO.js → Weather-CT2IZHEW.js} +14 -14
  14. package/dist/{WorldClock-CG3NF4GA.js → WorldClock-EJCUVIUW.js} +4 -4
  15. package/dist/ai/index.js +35 -35
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/chunk-2NMW66P5.js +1 -0
  21. package/dist/{chunk-EXJZUNNW.js → chunk-5CH2RGL6.js} +21 -21
  22. package/dist/{chunk-UX5L3MOB.js → chunk-6I6VSUKY.js} +4 -4
  23. package/dist/chunk-7YU27U3Y.js +19 -0
  24. package/dist/{chunk-MRUJRFIX.js → chunk-AJ3R5QPD.js} +5 -5
  25. package/dist/{chunk-KTKMM2XW.js → chunk-B7KD3DGY.js} +1 -1
  26. package/dist/{chunk-GXGBBMGV.js → chunk-BFVL2VTS.js} +1 -1
  27. package/dist/{chunk-QO35WRYA.js → chunk-BXEKX4TB.js} +17 -17
  28. package/dist/{chunk-VXP5L6DI.js → chunk-D2WGDTWN.js} +1 -1
  29. package/dist/{chunk-B4DR72FR.js → chunk-DVOQCAC2.js} +1 -1
  30. package/dist/{chunk-M33225G6.js → chunk-ED3QFXBC.js} +1 -1
  31. package/dist/{chunk-O25B75XX.js → chunk-EGAV5LSX.js} +1 -1
  32. package/dist/{chunk-HAFB45DT.js → chunk-FPGRKHUW.js} +7 -7
  33. package/dist/{chunk-A4HA7EXR.js → chunk-FRINAJU7.js} +1 -1
  34. package/dist/chunk-GBLMVFDW.js +5 -0
  35. package/dist/{chunk-VVVWVOG7.js → chunk-GQMS5657.js} +1 -1
  36. package/dist/chunk-GY67Y5SN.js +10 -0
  37. package/dist/{chunk-PKHZTFBK.js → chunk-HKAQXFUR.js} +1 -1
  38. package/dist/chunk-IEAFSVXC.js +1 -0
  39. package/dist/{chunk-NU2YQSOP.js → chunk-IQWIYZB5.js} +2 -2
  40. package/dist/{chunk-2TQ6BLSN.js → chunk-IU5KBQEQ.js} +6 -6
  41. package/dist/{chunk-PF5CKD4C.js → chunk-JHZV4TN6.js} +2 -2
  42. package/dist/chunk-LR77AS3N.js +15 -0
  43. package/dist/{chunk-BWIX3YIH.js → chunk-M3R4C3A6.js} +2 -2
  44. package/dist/chunk-MKEYXKZA.js +4 -0
  45. package/dist/{chunk-SVQJZF66.js → chunk-O33CUGOI.js} +5 -5
  46. package/dist/chunk-PA37I5ZX.js +3 -0
  47. package/dist/chunk-POCQ7ZL4.js +3 -0
  48. package/dist/chunk-PVR4KU7H.js +7 -0
  49. package/dist/{chunk-IKQVK3I3.js → chunk-QTQQKQGQ.js} +3 -3
  50. package/dist/{chunk-TIUFFVP5.js → chunk-RBXSU25O.js} +3 -3
  51. package/dist/{chunk-76IDLFXI.js → chunk-SGTZJMZ6.js} +1 -1
  52. package/dist/{chunk-D46AP6U5.js → chunk-T5V2GJ4D.js} +4 -4
  53. package/dist/{chunk-M5YG57UP.js → chunk-UFXE363L.js} +1 -1
  54. package/dist/chunk-UTQG344L.js +15 -0
  55. package/dist/{chunk-C45OKLRM.js → chunk-UZ43AT4O.js} +4 -4
  56. package/dist/{chunk-JWX7QRGE.js → chunk-XS4HFUTW.js} +1 -1
  57. package/dist/{chunk-M7H3OCIL.js → chunk-ZBTDMQUI.js} +11 -11
  58. package/dist/data/ListLoadError.js +1 -1
  59. package/dist/format/index.js +1 -1
  60. package/dist/forms/BorderInput.js +1 -1
  61. package/dist/forms/BrandAssetEditor.js +1 -1
  62. package/dist/forms/ColorPicker.js +1 -1
  63. package/dist/forms/ComposerAttachments.js +1 -1
  64. package/dist/forms/CornersInput.js +1 -1
  65. package/dist/forms/DisplayChips.js +1 -1
  66. package/dist/forms/IconPicker.js +1 -1
  67. package/dist/forms/InputNumber.js +1 -1
  68. package/dist/forms/LinkPicker.js +1 -1
  69. package/dist/forms/MediaLibrary.js +1 -1
  70. package/dist/forms/MediaUploadField.js +1 -1
  71. package/dist/forms/MediaUsedInList.js +1 -1
  72. package/dist/forms/PositionInput.js +1 -1
  73. package/dist/forms/Select.d.ts +0 -6
  74. package/dist/forms/Select.js +1 -1
  75. package/dist/forms/SidesInput.js +1 -1
  76. package/dist/forms/Slider.js +1 -1
  77. package/dist/forms/Snippet.js +1 -1
  78. package/dist/forms/SplitButton.js +1 -1
  79. package/dist/forms/Switch.js +1 -1
  80. package/dist/forms/TextToolbar.js +1 -1
  81. package/dist/forms/WidthsBar.js +1 -1
  82. package/dist/forms/settingRowContext.d.ts +1 -3
  83. package/dist/forms/settingRowContext.js +1 -1
  84. package/dist/icons/index.js +1 -1
  85. package/dist/index.d.ts +1 -1
  86. package/dist/index.js +136 -136
  87. package/dist/map/index.js +1 -1
  88. package/dist/page-tabs/index.js +5 -5
  89. package/dist/shell/Accordion.d.ts +22 -12
  90. package/dist/shell/Accordion.js +1 -1
  91. package/dist/shell/AppUpdateBanner.js +1 -1
  92. package/dist/shell/ContextMenu.js +1 -1
  93. package/dist/shell/DropdownMenu.js +1 -1
  94. package/dist/shell/HelpCenter.js +1 -1
  95. package/dist/shell/ImageLightbox.js +1 -1
  96. package/dist/shell/LanguageSelect.js +1 -1
  97. package/dist/shell/Markdown.js +1 -1
  98. package/dist/shell/PopupMenu.js +1 -1
  99. package/dist/shell/SearchableSelect.js +1 -1
  100. package/dist/shell/SettingReset.d.ts +23 -5
  101. package/dist/shell/SettingReset.js +1 -1
  102. package/dist/shell/SettingRow.d.ts +9 -14
  103. package/dist/shell/SettingRow.js +1 -1
  104. package/dist/shell/TopNav.js +1 -1
  105. package/dist/telemetry/index.js +1 -1
  106. package/dist/templates/ChatTemplate.js +1 -1
  107. package/dist/templates/CheckoutTemplate.js +1 -1
  108. package/dist/templates/DataTablePage.js +1 -1
  109. package/dist/templates/EmailTemplate.js +1 -1
  110. package/dist/templates/FormLayoutPage.js +1 -1
  111. package/dist/ui/index.d.ts +1 -1
  112. package/dist/ui/index.js +1 -1
  113. package/dist/ui.css +247 -32
  114. package/dist/version.js +1 -1
  115. package/package.json +1 -1
  116. package/dist/Calculator-PCTFUS5O.js +0 -29
  117. package/dist/Sidebar-RHGWTAPS.js +0 -44
  118. package/dist/chunk-6TCJOVFX.js +0 -3
  119. package/dist/chunk-A7CCSRPB.js +0 -12
  120. package/dist/chunk-AVAYZK3Z.js +0 -3
  121. package/dist/chunk-BGNJQMAZ.js +0 -1
  122. package/dist/chunk-KJXF5WAJ.js +0 -5
  123. package/dist/chunk-L65BESIE.js +0 -1
  124. package/dist/chunk-ME4VRJMK.js +0 -16
  125. package/dist/chunk-MNIULUQY.js +0 -14
  126. package/dist/chunk-NFJDLIRM.js +0 -5
  127. package/dist/chunk-UXPZQID4.js +0 -20
  128. package/dist/chunk-VVZE27M4.js +0 -7
@@ -0,0 +1,15 @@
1
+ import{Popover as e}from"./chunk-7JGR7WPD.js";import{InputNumber_default as r}from"./chunk-PA37I5ZX.js";import{parseHexColor as a,hexToHsv as n,hsvToHex as o,hexReadout as t,HUE_GRADIENT as l,HEX_MAX_LENGTH as i,svFromPoint as s,hueFromPoint as c}from"./chunk-S6OB6HJB.js";import{inputClasses as u}from"./chunk-AYZY3YNC.js";import{Tooltip as d}from"./chunk-BCDG4N6L.js";import{useShellStrings as h}from"./chunk-X2PZMXDP.js";import{forwardRef as g,useState as p,useRef as b,useEffect as m,useId as f}from"react";import{jsx as v,jsxs as w}from"react/jsx-runtime";var x={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},y={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function k(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function C(e,r){if(!e)return y;const a=k(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`}}function N({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",x[e],a].filter(Boolean).join(" ")}var $=g(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
2
+ return v("button",{ref:l,type:o,"aria-pressed":a,className:N({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),D=e=>"string"==typeof e?{value:e}:e;function P(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function A(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var I={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function M(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,100);case"ArrowRight":case"ArrowUp":return z(e+n,0,100);case"PageDown":return z(e-10,0,100);case"PageUp":return z(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function j({value:e,onChange:r,label:i,presets:u,clearable:g=!1,fallback:f,dragWrites:x="live",disabled:N=!1,opacity:z,onOpacityChange:j,onClose:S,id:B,className:K=""}){const L=h().color,O=k(z),U=e=>{const r=k(e);N||r===O||j?.(r)},X=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:O},E=a(f??""),[H,W]=p(()=>n(e||E||"")),Y=b(e);m(()=>{e!==Y.current&&(Y.current=e,e?W(n(e)):E&&W(n(E)))},[e]);const q=a=>{N||a===e||(Y.current=a,r(a))},Z=e=>{const r=a(e);r&&(W(n(r)),q(r))},G=e=>{W(e),q(o(e))},[J,F]=p(!1),V=b(H);V.current=H;const Q=e=>({onPointerDown:r=>{if(N||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,V.current);"end"===x?(F(!0),W(a)):G(a)},onPointerMove:r=>{if(N||!(1&r.buttons))return;const a=e(r,V.current);"end"===x?W(a):G(a)},onPointerUp:r=>{"end"===x&&J&&(F(!1),G(e(r,V.current)))}}),_=Q((e,r)=>({...r,...s(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),ee=Q((e,r)=>({...r,h:c(e.clientX,e.currentTarget.getBoundingClientRect())})),re=J?o(H):e,ae=e=>`${Math.round(100*e)}%`,ne=(u??[]).map(D),oe=a(e),te=re||E||"";/* @__PURE__ */
3
+ return w("div",{id:B,className:`flex w-56 flex-col gap-3 ${N?"opacity-60":""} ${K}`.trim(),onKeyDown:e=>{"Escape"===e.key&&S&&(e.preventDefault(),e.stopPropagation(),S())},children:[(ne.length>0||g)&&/* @__PURE__ */w("div",{role:"group","aria-label":L.presets,className:"flex flex-wrap gap-2",children:[g&&/* @__PURE__ */v(d,{content:L.clear,children:/* @__PURE__ */v($,{color:"",size:"sm","aria-label":L.clear,selected:""===e,disabled:N,onClick:()=>{N||""===e||(Y.current="",r(""))}})}),ne.map(e=>{const r=a(e.value),n=e.label?`${e.label} · ${t(r??e.value)}`:t(r??e.value);/* @__PURE__ */
4
+ return v(d,{content:n,children:/* @__PURE__ */v($,{color:r??e.value,size:"sm","aria-label":n,selected:null!==r&&r===oe,disabled:N,onClick:()=>Z(e.value)})},`${e.label??""}:${e.value}`)})]}),
5
+ /* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":L.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*H.v),"aria-valuetext":L.squareValue(Math.round(100*H.s),Math.round(100*H.v)),"aria-disabled":N||void 0,"data-color-square":"",onKeyDown:e=>{if(N)return;const r=P(H,e.key,e.shiftKey);r&&(e.preventDefault(),G(r))},..._,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:o({h:H.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ae(H.s),top:ae(1-H.v),...I}})}),
6
+ /* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":L.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(H.h),"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-hue":"",onKeyDown:e=>{if(N)return;const r=A(H.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),G({...H,h:r}))},...ee,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:l},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:H.h/360*100+"%",background:o({h:H.h,s:1,v:1}),...I}})}),j&&/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":L.opacity(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":O,"aria-valuetext":`${O}%`,"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-opacity":"",onKeyDown:e=>{if(N)return;const r=M(O,e.key,e.shiftKey);null!==r&&(e.preventDefault(),U(r))},onPointerDown:e=>{N||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),U(X(e)))},onPointerMove:e=>{!N&&1&e.buttons&&U(X(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${te||"black"}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${O}%`,...C(te||"black",O),...I}})}),
7
+ /* @__PURE__ */w("div",{className:"flex items-center gap-2",children:[
8
+ /* @__PURE__ */v("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:C(te,j?O:null)}),
9
+ /* @__PURE__ */v(T,{value:re,placeholder:!e&&E?t(E):void 0,onChange:Z,label:L.hex(i),disabled:N}),j&&/* @__PURE__ */v(R,{value:O,onChange:U,label:L.opacity(i),disabled:N})]})]})}var S={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},B={sm:"h-6",md:"h-8",lg:"h-10"},K=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-ink-strong placeholder:text-[color:var(--ink-placeholder)] hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function T({value:e,onChange:r,label:n,placeholder:o,disabled:l,id:s,size:c="md",look:d="box",className:h=""}){const[g,b]=p(null),m="text"===d?`${K} ${B[c]} ${h}`.trim():u({size:c,className:`${S[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
10
+ return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function R({value:e,onChange:a,label:n,disabled:o,size:t="md"}){/* @__PURE__ */
11
+ return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function L({value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,id:d,showHexInput:g=!1,opacity:p,onOpacityChange:b,size:m="md",align:x="start",open:y,onOpenChange:$,className:z=""}){const D=h().color,P=k(p),A=f(),I=a(s??""),M=r||I||"",S=r?t(r):I?t(I):D.none;
12
+ /* @__PURE__ */
13
+ return w("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":g?"gap-1":"gap-2"} ${z}`.trim(),children:[
14
+ /* @__PURE__ */v(e,{id:d,trigger:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(M,b?P:null)}),triggerLabel:D.swatch(o,S),triggerClassName:N({size:m}),"aria-label":D.panel(o),align:x,open:y,onOpenChange:$,disabled:u,children:/* @__PURE__ */v(j,{id:A,value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),g&&
15
+ /* @__PURE__ */v(T,{value:r,placeholder:!r&&I?t(I):void 0,onChange:e=>{u||e===r||n(e)},label:D.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */v(R,{value:P,onChange:e=>{u||e===P||b(e)},label:D.opacity(o),disabled:u,size:m})]})}export{L as ColorPicker,j as ColorPickerPanel,$ as ColorSwatch,T as HexInput,y as NO_COLOR_FILL,k as clampOpacity,C as colorFill,N as colorSwatchClasses,A as stepHue,M as stepOpacity,P as stepSquare};
@@ -1,11 +1,11 @@
1
- import{SearchableSelect as e}from"./chunk-RYS3URDC.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-UXPZQID4.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{Input_default as n}from"./chunk-MAMWQCJ6.js";import{INPUT_SIZES as r}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-X2PZMXDP.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:r,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:j=""}=t,O=void 0!==t.onApply,P=u().link,$=y.isSafe??k,D=d(),M=c(null),U=c(null),[z,A]=p({url:r}),X=O?z.url:r,[E,Y]=p(!1),[Q,R]=p(null),[S,W]=p(null),H=c(()=>{});H.current=O?t.onCancel:()=>{},m(()=>{if(O)return s(e=>{const a=M.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(H.current(),!0)},()=>M.current)},[O]),m(()=>{if(!O)return;const e=U.current;e?(e.focus(),e.select()):M.current?.querySelector("button, input")?.focus()},[]);const K=o??[{value:b,label:P.address,target:{type:"text"}}],T=Q&&Q.against===X?Q.kind:y.kindOf(X),Z=K.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===T),I=Z.find(e=>"text"===e.target.type),J=Z.find(e=>e.value===T)??I??Z[0];if(!J)return null;const L="text"!==J.target.type,V=L?y.targetOf(X):X,q=h(J.target),B=q.find(e=>e.value===V),G=e=>({value:e,label:P.unavailable(e)}),_="select"===J.target.type&&V&&w?w(V):null,ee=_?y.readFilter(X):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=S&&S.against===X?S.text:X,te=!L&&""!==le.trim()&&!$(le),ne=te&&(!O||E),re=(e,a)=>{O?A({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},ie=(e,a)=>{R(a=>a?{...a,against:e}:a),re(e,a)},oe=e=>{if(!e)return ie("");const a=q.find(a=>a.value===e);ie(e,a?.label)},se=L?X:le.trim(),ue=()=>{if(!O||!se)return;if(!L&&te)return void Y(!0);const e=L&&z.url===se?z.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[G(a),...e]:[...e],ce=(a,t,n,r,i)=>{const o=[];for(const e of n){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=n.some(e=>""===e.value);/* @__PURE__ */
1
+ import{SearchableSelect as e}from"./chunk-RYS3URDC.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-7YU27U3Y.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{Input_default as n}from"./chunk-MAMWQCJ6.js";import{INPUT_SIZES as r}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-X2PZMXDP.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:r,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:j=""}=t,O=void 0!==t.onApply,P=u().link,U=y.isSafe??k,$=d(),M=c(null),Y=c(null),[z,A]=p({url:r}),D=O?z.url:r,[E,X]=p(!1),[R,S]=p(null),[W,H]=p(null),K=c(()=>{});K.current=O?t.onCancel:()=>{},m(()=>{if(O)return s(e=>{const a=M.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(K.current(),!0)},()=>M.current)},[O]),m(()=>{if(!O)return;const e=Y.current;e?(e.focus(),e.select()):M.current?.querySelector("button, input")?.focus()},[]);const Q=o??[{value:b,label:P.address,target:{type:"text"}}],T=R&&R.against===D?R.kind:y.kindOf(D),J=Q.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===T),L=J.find(e=>"text"===e.target.type),V=J.find(e=>e.value===T)??L??J[0];if(!V)return null;const Z="text"!==V.target.type,q=Z?y.targetOf(D):D,I=h(V.target),B=I.find(e=>e.value===q),G=e=>({value:e,label:P.unavailable(e)}),_="select"===V.target.type&&q&&w?w(q):null,ee=_?y.readFilter(D):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=W&&W.against===D?W.text:D,te=!Z&&""!==le.trim()&&!U(le),ne=te&&(!O||E),re=(e,a)=>{O?A({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},ie=(e,a)=>{S(a=>a?{...a,against:e}:a),re(e,a)},oe=e=>{if(!e)return ie("");const a=I.find(a=>a.value===e);ie(e,a?.label)},se=Z?D:le.trim(),ue=()=>{if(!O||!se)return;if(!Z&&te)return void X(!0);const e=Z&&z.url===se?z.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[G(a),...e]:[...e],ce=(a,t,n,r,i)=>{const o=[];for(const e of n){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=n.some(e=>""===e.value);/* @__PURE__ */
2
2
  return f(e,{"aria-label":a,value:t,options:o,disabled:C,clearable:l,placeholder:n.find(e=>""===e.value)?.label,onChange:r})}/* @__PURE__ */
3
- return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:r})};let pe;if("text"===J.target.type)pe=/* @__PURE__ */f(n,{ref:U,id:`${D}-address`,size:"sm",type:"text",invalid:ne,"aria-label":P.address,"aria-describedby":ne?`${D}-why`:void 0,placeholder:F??P.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{Y(!1);const a=e.trim();a?$(e)?(W({text:e,against:a}),ie(a)):W({text:e,against:X}):(W({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===J.target.type?J.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):J.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:J.target.placeholder},...de(e,V)];pe=ce(J.label,V,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce(P.linkType,J.value,Z.map(e=>({value:e.value,label:e.label})),e=>{W(null),Y(!1);const a=Z.find(a=>a.value===e);if(!a||"text"===a.target.type)return void R({kind:e,against:X});const l=h(a.target)[0];R({kind:e,against:l?l.value:""}),l?re(l.value,l.label):re("")},!1),pe,_&&ce(P.filter,ee?.param??"",[{value:"",label:P.noFilter},...ee&&!ae?[G(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(V,B?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(y.withFilter(V,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce(P.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(y.withFilter(V,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),ne&&/* @__PURE__ */f("p",{id:`${D}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:P.unsafe}),J.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:J.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:P.filterHint})]});if(!O)/* @__PURE__ */
3
+ return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:r})};let pe;if("text"===V.target.type)pe=/* @__PURE__ */f(n,{ref:Y,id:`${$}-address`,size:"sm",type:"text",invalid:ne,"aria-label":P.address,"aria-describedby":ne?`${$}-why`:void 0,placeholder:F??P.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{X(!1);const a=e.trim();a?U(e)?(H({text:e,against:a}),ie(a)):H({text:e,against:D}):(H({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===V.target.type?V.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):V.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:V.target.placeholder},...de(e,q)];pe=ce(V.label,q,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce(P.linkType,V.value,J.map(e=>({value:e.value,label:e.label})),e=>{H(null),X(!1);const a=J.find(a=>a.value===e);if(!a||"text"===a.target.type)return void S({kind:e,against:D});const l=h(a.target)[0];S({kind:e,against:l?l.value:""}),l?re(l.value,l.label):re("")},!1),pe,_&&ce(P.filter,ee?.param??"",[{value:"",label:P.noFilter},...ee&&!ae?[G(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(q,B?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(y.withFilter(q,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce(P.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(y.withFilter(q,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),ne&&/* @__PURE__ */f("p",{id:`${$}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:P.unsafe}),V.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:V.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:P.filterHint})]});if(!O)/* @__PURE__ */
4
4
  return f("div",{ref:M,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:N?"group":void 0,"aria-label":N,children:me});const fe=t.onRemove;/* @__PURE__ */
5
- return v("div",{ref:M,role:"dialog","aria-label":N??P.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(),ue())},children:[L?/* @__PURE__ */f("span",{className:a({inline:!0}),children:P.title}):/* @__PURE__ */f("label",{htmlFor:`${D}-address`,className:a({inline:!0}),children:P.title}),me,
5
+ return v("div",{ref:M,role:"dialog","aria-label":N??P.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(),ue())},children:[Z?/* @__PURE__ */f("span",{className:a({inline:!0}),children:P.title}):/* @__PURE__ */f("label",{htmlFor:`${$}-address`,className:a({inline:!0}),children:P.title}),me,
6
6
  /* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:P.remove}):null,
7
7
  /* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
8
- /* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>H.current(),children:P.cancel}),
8
+ /* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>K.current(),children:P.cancel}),
9
9
  /* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:P.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),F=d(),j=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
10
10
  return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
11
11
  /* @__PURE__ */f(n,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
@@ -1,4 +1,4 @@
1
- import{PopupMenuDivider as e,PopupMenuLabel as l,menuTextRowStyle as t,PopupSubmenu as i,itemLook as a,MenuCheckMark as r}from"./chunk-HAFB45DT.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var d=e=>!!e&&"label"!==e.type&&"status"!==e.type&&"divider"!==e.type&&!e.disabled,c=(e,l)=>`${e}-status-${l}`;function o(e,l){return e.flatMap((e,t)=>"status"===e.type?[c(l,t)]:[]).join(" ")||void 0}function u(d,o){const{menuId:y,choose:b,toggle:h,followLink:p,rowProps:m=()=>({}),linkAs:k}=o,f=k??"a",v=(d,k)=>{if("divider"===d.type)/* @__PURE__ */
1
+ import{PopupMenuDivider as e,PopupMenuLabel as l,menuTextRowStyle as t,PopupSubmenu as i,itemLook as a,MenuCheckMark as r}from"./chunk-FPGRKHUW.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var d=e=>!!e&&"label"!==e.type&&"status"!==e.type&&"divider"!==e.type&&!e.disabled,c=(e,l)=>`${e}-status-${l}`;function o(e,l){return e.flatMap((e,t)=>"status"===e.type?[c(l,t)]:[]).join(" ")||void 0}function u(d,o){const{menuId:y,choose:b,toggle:h,followLink:p,rowProps:m=()=>({}),linkAs:k}=o,f=k??"a",v=(d,k)=>{if("divider"===d.type)/* @__PURE__ */
2
2
  return n("div",{role:"separator",children:/* @__PURE__ */n(e,{})},d.key);if("label"===d.type)/* @__PURE__ */
3
3
  return n("div",{id:`${y}-label-${k}`,children:/* @__PURE__ */n(l,{children:d.label})},d.key);if("status"===d.type)/* @__PURE__ */
4
4
  return n("div",{id:c(y,k),className:"text-xs",style:t(),children:d.label},d.key);if("submenu"===d.type)/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{computeMaximizedBox as e,isSidebarStripReserved as t,boxFillsWorkArea as n,readAlwaysMaximizedFlag as r,WORK_AREA_CHANGED_EVENT as o,useShellAuth as i,scrollerIsFluid as a,growBoxToWidth as s,widthToFit as l,navIcons as c}from"./chunk-CY5N5OA3.js";import{ROW_HEIGHTS as u}from"./chunk-AW7TOB6N.js";import{reportBoundaryError as d}from"./chunk-KNUR2UEG.js";import{isStaleChunkError as h}from"./chunk-JDCM2VHG.js";import{Result as m}from"./chunk-EGEWU776.js";import{CMD_Z as p,CMD_SHIFT_Z as f}from"./chunk-ZDMZM7HD.js";import{CopyButton as w}from"./chunk-NDEIZUMG.js";import{confirm as y}from"./chunk-4E4GWE4L.js";import{ItemCount as g}from"./chunk-GMRZX2ET.js";import{dialogA11y as v}from"./chunk-VWGWZY7A.js";import{ColoredBadge as b}from"./chunk-DXHLUB36.js";import{useIsMobile as x,useIsPhone as k}from"./chunk-UGTRSRIW.js";import{focusableIn as E}from"./chunk-CDAJKLGL.js";import{useShellPrefs as M}from"./chunk-KC3EX26K.js";import{PopupMenu as C,PopupMenuItem as N,PopupMenuDivider as S,PopupMenuLabel as L}from"./chunk-HAFB45DT.js";import{StatusBadge as T}from"./chunk-LNARMEEZ.js";import{Button_default as z}from"./chunk-NHH2MXFU.js";import{Icon as A}from"./chunk-FSPFV4MI.js";import{LoadingSpinner as D}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as P}from"./chunk-62LW225J.js";import{runEscapeInterceptors as I}from"./chunk-TWVUQUUD.js";import{useShellStrings as W}from"./chunk-X2PZMXDP.js";import{createContext as R,useContext as K,Component as $,useLayoutEffect as O,useRef as F,useEffect as j,useState as q,useSyncExternalStore as H,useCallback as B,isValidElement as U,Fragment as X,Children as Y,cloneElement as V,useMemo as G,useId as _,useReducer as J,Suspense as Z}from"react";import{jsxs as Q,jsx as ee,Fragment as te}from"react/jsx-runtime";import{createPortal as ne}from"react-dom";import{useLocation as re}from"react-router-dom";import{useQueryClient as oe,useQuery as ie}from"@tanstack/react-query";function ae(e){return"component"in e}function se(e){return"endpoint"in e}var le={};function ce(e){le=e}var ue=new Proxy({},{get:(e,t)=>le[t],has:(e,t)=>t in le,ownKeys:()=>Object.keys(le),getOwnPropertyDescriptor(e,t){if(t in le)return{configurable:!0,enumerable:!0,value:le[t]}}}),de=null;function he(e){de=e}function me(){return null!==de}var pe=/* @__PURE__ */new Set(["get","post","put","patch","delete","head","options","request"]),fe=new Proxy({},{get:(e,t)=>de?de[t]:"string"==typeof t&&pe.has(t)?()=>Promise.resolve({data:null,status:0,statusText:"",headers:{},config:{}}):void 0}),we=R(null);function ye(){return K(we)?.pageSearch??""}var ge=null,ve=/* @__PURE__ */new Set;function be(e){ge!==e&&(ge=e,ve.forEach(e=>e()))}function xe(){return ge}function ke(e){return ve.add(e),()=>{ve.delete(e)}}var Ee=null;function Me(e){Ee=e}function Ce({error:e,onReload:t}){const n=h(e);/* @__PURE__ */
1
+ import{computeMaximizedBox as e,isSidebarStripReserved as t,boxFillsWorkArea as n,readAlwaysMaximizedFlag as r,WORK_AREA_CHANGED_EVENT as o,useShellAuth as i,scrollerIsFluid as a,growBoxToWidth as s,widthToFit as l,navIcons as c}from"./chunk-CY5N5OA3.js";import{ROW_HEIGHTS as u}from"./chunk-AW7TOB6N.js";import{reportBoundaryError as d}from"./chunk-KNUR2UEG.js";import{isStaleChunkError as h}from"./chunk-JDCM2VHG.js";import{Result as m}from"./chunk-EGEWU776.js";import{CMD_Z as p,CMD_SHIFT_Z as f}from"./chunk-ZDMZM7HD.js";import{CopyButton as w}from"./chunk-NDEIZUMG.js";import{confirm as y}from"./chunk-4E4GWE4L.js";import{useShellPrefs as g}from"./chunk-KC3EX26K.js";import{ItemCount as v}from"./chunk-GMRZX2ET.js";import{dialogA11y as b}from"./chunk-VWGWZY7A.js";import{useIsMobile as x,useIsPhone as k}from"./chunk-UGTRSRIW.js";import{ColoredBadge as E}from"./chunk-DXHLUB36.js";import{focusableIn as M}from"./chunk-CDAJKLGL.js";import{PopupMenu as C,PopupMenuItem as N,PopupMenuDivider as S,PopupMenuLabel as L}from"./chunk-FPGRKHUW.js";import{StatusBadge as T}from"./chunk-LNARMEEZ.js";import{Button_default as z}from"./chunk-NHH2MXFU.js";import{Icon as A}from"./chunk-FSPFV4MI.js";import{LoadingSpinner as D}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as P}from"./chunk-62LW225J.js";import{runEscapeInterceptors as I}from"./chunk-TWVUQUUD.js";import{useShellStrings as W}from"./chunk-X2PZMXDP.js";import{createContext as R,useContext as K,Component as $,useLayoutEffect as O,useRef as F,useEffect as j,useState as q,useSyncExternalStore as H,useCallback as B,isValidElement as U,Fragment as X,Children as Y,cloneElement as V,useMemo as G,useId as _,useReducer as J,Suspense as Z}from"react";import{jsxs as Q,jsx as ee,Fragment as te}from"react/jsx-runtime";import{createPortal as ne}from"react-dom";import{useLocation as re}from"react-router-dom";import{useQueryClient as oe,useQuery as ie}from"@tanstack/react-query";function ae(e){return"component"in e}function se(e){return"endpoint"in e}var le={};function ce(e){le=e}var ue=new Proxy({},{get:(e,t)=>le[t],has:(e,t)=>t in le,ownKeys:()=>Object.keys(le),getOwnPropertyDescriptor(e,t){if(t in le)return{configurable:!0,enumerable:!0,value:le[t]}}}),de=null;function he(e){de=e}function me(){return null!==de}var pe=/* @__PURE__ */new Set(["get","post","put","patch","delete","head","options","request"]),fe=new Proxy({},{get:(e,t)=>de?de[t]:"string"==typeof t&&pe.has(t)?()=>Promise.resolve({data:null,status:0,statusText:"",headers:{},config:{}}):void 0}),we=R(null);function ye(){return K(we)?.pageSearch??""}var ge=null,ve=/* @__PURE__ */new Set;function be(e){ge!==e&&(ge=e,ve.forEach(e=>e()))}function xe(){return ge}function ke(e){return ve.add(e),()=>{ve.delete(e)}}var Ee=null;function Me(e){Ee=e}function Ce({error:e,onReload:t}){const n=h(e);/* @__PURE__ */
2
2
  return Q("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 py-12 text-center",children:[
3
3
  /* @__PURE__ */ee(A,{name:"warning",className:"h-8 w-8 text-amber-500",strokeWidth:1.5}),
4
4
  /* @__PURE__ */Q("div",{className:"min-w-0",children:[
@@ -23,30 +23,30 @@ return ee("button",{onClick:()=>{const r=s?a.filter(n=>!(n.entityType===e&&n.ent
23
23
  /* @__PURE__ */ee("div",{ref:l,"data-taskbar-preview":"",style:{position:"fixed",left:c.left,top:c.top,zIndex:ht,maxWidth:"calc(100vw - 16px)",opacity:c.ready?1:0},className:s?"flex gap-2 flex-wrap":"",onMouseEnter:o,onMouseLeave:()=>{pt(),i()},children:e.map(e=>{const t=rt(e.id)??ct(e.label),o=t?function(e){if(ur(e))return null;const t=e.getBoundingClientRect(),n=or(),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__ */
24
24
  return Q("div",{className:"group flex flex-col items-center",onMouseEnter:()=>mt(t),children:[!m&&/* @__PURE__ */ee("span",{className:p,children:e.label}),
25
25
  /* @__PURE__ */ee(ft,{id:e.id,label:e.label,maxW:240,maxH:160,titleAbove:!0,onClick:()=>n(e.id),onClose:()=>r(e.id)}),m&&/* @__PURE__ */ee("span",{className:p,children:e.label}),null!==o&&/* @__PURE__ */Q("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:[
26
- /* @__PURE__ */ee(A,{name:"arrow-right",className:"h-3 w-3",style:{transform:`rotate(${o}deg)`},strokeWidth:3}),"Off screen"]})]},e.id)})}),document.body)}function yt(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 gt({openWindows:e,onRemove:t,onSplitView:n,onActivate:r,onActivateById:o}){const i=W(),[a,s]=q(null);j(()=>{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 l=H(Cr,Mr),[,u]=q(0);j(()=>{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]=q(0);j(()=>{const e=()=>d(e=>e+1);return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[]);const h=e=>{const t=ct(e),n=t?.querySelector("[data-window-title]");return n?.textContent?.trim()||e},[m,p]=q(null),[f,w]=q(null),[y,v]=q(null),b=F(null),x=()=>{b.current&&(clearTimeout(b.current),b.current=null),b.current=setTimeout(()=>{p(null),w(null)},150)},k=e.filter(e=>!e.route||!ue[e.route]?.utility);if(!a||!a.isConnected||0===k.length)return null;const E=[],M=/* @__PURE__ */new Map;for(const e of k){const t=e.route?ue[e.route]:void 0,n=t?.taskbarGroup,r=n?.key??e.route??`entity:${e.id}`,o=M.get(r);if(void 0!==o)E[o].items.push(e);else{M.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 ne(
26
+ /* @__PURE__ */ee(A,{name:"arrow-right",className:"h-3 w-3",style:{transform:`rotate(${o}deg)`},strokeWidth:3}),"Off screen"]})]},e.id)})}),document.body)}function yt(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 gt({openWindows:e,onRemove:t,onSplitView:n,onActivate:r,onActivateById:o}){const i=W(),[a,s]=q(null);j(()=>{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 l=H(Cr,Mr),[,u]=q(0);j(()=>{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]=q(0);j(()=>{const e=()=>d(e=>e+1);return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[]);const h=e=>{const t=ct(e),n=t?.querySelector("[data-window-title]");return n?.textContent?.trim()||e},[m,p]=q(null),[f,w]=q(null),[y,g]=q(null),b=F(null),x=()=>{b.current&&(clearTimeout(b.current),b.current=null),b.current=setTimeout(()=>{p(null),w(null)},150)},k=e.filter(e=>!e.route||!ue[e.route]?.utility);if(!a||!a.isConnected||0===k.length)return null;const E=[],M=/* @__PURE__ */new Map;for(const e of k){const t=e.route?ue[e.route]:void 0,n=t?.taskbarGroup,r=n?.key??e.route??`entity:${e.id}`,o=M.get(r);if(void 0!==o)E[o].items.push(e);else{M.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 ne(
27
27
  /* @__PURE__ */Q(te,{children:[E.map(e=>{const n=e.route?c[e.route]:null,r=e.items[e.items.length-1];let a=!1;if(l){const t=document.querySelector(`[data-modal-id="${l}"]`);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=rt(e.id)??ct(e.label);return!!t&&!ur(t)});/* @__PURE__ */
28
- return Q("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&&U(n)?V(n,{className:"h-3.5 w-3.5 shrink-0"}):/* @__PURE__ */ee(A,{name:"expand",className:"h-3.5 w-3.5 shrink-0",strokeWidth:2}),
29
- /* @__PURE__ */ee("span",{className:"truncate flex-1",children:s?e.label:h(r.label)}),u&&/* @__PURE__ */ee("span",{title:i.taskbar.offscreenDot,className:"shrink-0 h-1.5 w-1.5 rounded-full bg-amber-500"}),s&&/* @__PURE__ */ee(g,{count:e.items.length,label:i.count.windows(e.items.length)}),!s&&/* @__PURE__ */ee("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__ */ee(A,{name:"close",className:"h-3 w-3",strokeWidth:2})})]},e.key)}),
28
+ return Q("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?g({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&&U(n)?V(n,{className:"h-3.5 w-3.5 shrink-0"}):/* @__PURE__ */ee(A,{name:"expand",className:"h-3.5 w-3.5 shrink-0",strokeWidth:2}),
29
+ /* @__PURE__ */ee("span",{className:"truncate flex-1",children:s?e.label:h(r.label)}),u&&/* @__PURE__ */ee("span",{title:i.taskbar.offscreenDot,className:"shrink-0 h-1.5 w-1.5 rounded-full bg-amber-500"}),s&&/* @__PURE__ */ee(v,{count:e.items.length,label:i.count.windows(e.items.length)}),!s&&/* @__PURE__ */ee("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__ */ee(A,{name:"close",className:"h-3 w-3",strokeWidth:2})})]},e.key)}),
30
30
  /* @__PURE__ */ee("div",{className:"flex-1"}),k.length>=2&&/* @__PURE__ */Q("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:[
31
- /* @__PURE__ */ee(A,{name:"grid",className:"h-3 w-3",strokeWidth:2}),"Exposé"]}),y&&/* @__PURE__ */Q(C,{portal:!0,minWidth:200,style:yt(y.x,y.y),onClose:()=>v(null),children:[
31
+ /* @__PURE__ */ee(A,{name:"grid",className:"h-3 w-3",strokeWidth:2}),"Exposé"]}),y&&/* @__PURE__ */Q(C,{portal:!0,minWidth:200,style:yt(y.x,y.y),onClose:()=>g(null),children:[
32
32
  /* @__PURE__ */ee(L,{children:y.label}),
33
- /* @__PURE__ */Q(N,{onClick:()=>{v(null),y.items.forEach(e=>function(e){const t=Kn.get(e);t&&er(t)}(e.id))},children:[
33
+ /* @__PURE__ */Q(N,{onClick:()=>{g(null),y.items.forEach(e=>function(e){const t=Kn.get(e);t&&er(t)}(e.id))},children:[
34
34
  /* @__PURE__ */ee(A,{name:"remove",className:"h-4 w-4",strokeWidth:1.5}),i.taskbar.minimizeAllWindows]}),
35
- /* @__PURE__ */Q(N,{onClick:()=>{v(null),y.items.forEach(e=>o(e.id))},children:[
35
+ /* @__PURE__ */Q(N,{onClick:()=>{g(null),y.items.forEach(e=>o(e.id))},children:[
36
36
  /* @__PURE__ */ee("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */ee("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75h6.5v6.5h-6.5zM13.75 8.75h6.5v6.5h-6.5z"})}),i.taskbar.restoreAllWindows]}),
37
37
  /* @__PURE__ */ee(S,{}),
38
- /* @__PURE__ */Q(N,{danger:!0,onClick:()=>{v(null),y.items.forEach(e=>t(e.id))},children:[
38
+ /* @__PURE__ */Q(N,{danger:!0,onClick:()=>{g(null),y.items.forEach(e=>t(e.id))},children:[
39
39
  /* @__PURE__ */ee(A,{name:"close",className:"h-4 w-4",strokeWidth:2}),`${i.taskbar.closeAllWindows} (${y.items.length})`]})]}),m&&f&&/* @__PURE__ */ee(wt,{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 vt=["/login","/forgot-password","/reset-password","/force-change-password"];function bt({children:e,windowAccentForRoute:t}){const n=re(),r=vt.some(e=>n.pathname.startsWith(e)),[o,i]=q([]),a=F(o);O(()=>{a.current=o},[o]);const s=H(ke,xe,xe),l=F(/* @__PURE__ */new Map),c=e=>{const t=Ie(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};j(()=>{st.clear();for(const e of o)e.route&&st.set(e.id,e.route)},[o]);const u=B(e=>{i(t=>t.filter(t=>t.id!==e))},[]),d=B(e=>{var t;rt(e)||ot(e)?(t=e,window.dispatchEvent(new CustomEvent(Nr,{detail:{windowKey:t}}))):u(e)},[u]),h=(e,t=!1)=>{const n=Dn;t&&et.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,(Pn.get(i)??-1)>a)||Qn(o),t&&et.delete(e)},50)},m=(e,t,n)=>{const r=Ee;if(n||!r)return[...e,t];const o=function(e,t,n){if(!Ie(t))return e.length;if(t.shellOwned&&Re(t,n.home))return 0;const r=Re(t,n.home)?void 0:We(t)?.key;if(r){let t=-1;if(e.forEach((e,o)=>{Ie(e)&&!Re(e,n.home)&&We(e)?.key===r&&(t=o)}),t>=0)return t+1}if("page"===t.type&&t.route&&!Re(t,n.home)&&n.favorites.includes(t.route))return e.length>0&&Re(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=>Ie(e[t])&&!Re(e[t],n.home)?We(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:xe(),favorites:r.favorites});return[...e.slice(0,o),t,...e.slice(o)]},p=B(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=B((e,t,n,r,o,a={})=>{if(!ue[e]||!se(ue[e]))return;const s=`${e}:${t}`,l=at();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:Fe(n),openedFrom:l},!!a.append))})},[]),w=B((e,t={})=>{if(!ue[e]||!ae(ue[e]))return;const n=ue[e],{reuse:r=!1,background:o=!1,shellOwned:s,search:l,append:c=!1}=t,u=e=>{var t;o?(t=e,qn.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=at();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=B(()=>{},[]),g=B(()=>{},[]),v=d,b=d;/* @__PURE__ */
40
40
  return Q(Xe.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,
41
41
  /* @__PURE__ */ee(gt,{openWindows:o,onRemove:d,onSplitView:Xr,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&&Qn(e)}})},onActivateById:it}),
42
42
  /* @__PURE__ */ee(Yr,{}),!r&&o.map(e=>{const n=e.route?t?.(e.route):void 0;
43
43
  /* @__PURE__ */
44
- return ee(we.Provider,{value:c(e),children:/* @__PURE__ */ee(Ne,{fallback:(t,n)=>/* @__PURE__ */ee(Vr,{open:!0,onClose:()=>u(e.id),title:e.label,size:"md",autoHeight:!0,windowKey:e.id,children:/* @__PURE__ */ee(Ce,{error:t,onReload:n})}),children:/* @__PURE__ */ee(_t,{spec:Je(e),children:/* @__PURE__ */ee(to,{windowId:e.id,children:"page"===e.type?/* @__PURE__ */ee(Ze,{item:e,onClose:()=>u(e.id),accentRgb:n}):/* @__PURE__ */ee(nt,{item:e,onClose:()=>u(e.id),onMinimize:()=>{},accentRgb:n})})})})},e.id)})]})}var xt=400;function kt({panelRef:e,bodyRef:t,open:n,widget:r,active:o,minimized:i}){const a=F(null),s=F(!1);n&&!s.current&&(a.current="undefined"==typeof document?null:document.activeElement),s.current=n;const l=F(!1),c=F(void 0),u=F(i),d=u.current&&!i;u.current=i;const h=()=>{l.current=!0,clearTimeout(c.current),c.current=setTimeout(()=>{l.current=!1},xt)};j(()=>{n&&!r&&h()},[n,r]),j(()=>{d&&n&&!r&&h()},[d]),j(()=>()=>clearTimeout(c.current),[]),j(()=>{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?E(t.current)[0]:void 0;s?s.focus():(a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.focus())},[n,r,o,i,e,t]),O(()=>{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 Et=null,Mt=/* @__PURE__ */new Set;function Ct(){return Et}function Nt(e){if(Et!==e){Et=e;for(const e of Mt)e()}}function St(e){return Mt.add(e),()=>{Mt.delete(e)}}var Lt=!1,Tt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},zt=()=>{};function At(e){Lt=e,Tt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0}}function Dt(e,t){Lt&&("submenu"===e?Tt.submenus++:Tt.menus++,Tt.menuKey=t)}function Pt(e){if(!Lt)return zt;const t=performance.now();let n=!1;return()=>{if(n)return;if(n=!0,!Lt)return;const r=performance.now()-t;"move"===e?Tt.moveMs+=r:Tt.resizeMs+=r}}function It(){const e=Tt;return Tt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},e}var Wt=/* @__PURE__ */new Set([T,b]),Rt=e=>Wt.has(e)||"function"==typeof e&&"badge"===e.titleRole,Kt=/* @__PURE__ */new Set(["button","a","input","select","textarea","kbd"]),$t=/* @__PURE__ */new Set(["svg"]);function Ot(e){const t=[],n={text:"",accessories:[],badges:[],actions:[]};return Ft(e,n,t),n.text=t.join("").replace(/\s+/g," ").trim(),n}function Ft(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=>Ft(e,t,n));if(!U(e))return;const r=e;if(r.type===w)return void(void 0===t.copy&&"string"==typeof r.props.text&&r.props.text&&(t.copy=r.props.text));if(r.type===X)return void Y.toArray(r.props.children).forEach(e=>Ft(e,t,n));if("string"==typeof r.type){if($t.has(r.type))return;if(!Kt.has(r.type))return n.push(" "),Y.toArray(r.props.children).forEach(e=>Ft(e,t,n)),void n.push(" ")}const o=V(r,{key:`title-part-${t.accessories.length}`});t.accessories.push(o),(Rt(r.type)?t.badges:t.actions).push(o)}var jt=/* @__PURE__ */new Map,qt=/* @__PURE__ */new Set,Ht=0;function Bt(){Ht++,qt.forEach(e=>e())}function Ut(e){return jt.get(e)}function Xt(e){return qt.add(e),()=>{qt.delete(e)}}function Yt(){return Ht}var Vt=R(""),Gt=R(null);function _t({spec:e,children:t}){/* @__PURE__ */
44
+ return ee(we.Provider,{value:c(e),children:/* @__PURE__ */ee(Ne,{fallback:(t,n)=>/* @__PURE__ */ee(Vr,{open:!0,onClose:()=>u(e.id),title:e.label,size:"md",autoHeight:!0,windowKey:e.id,children:/* @__PURE__ */ee(Ce,{error:t,onReload:n})}),children:/* @__PURE__ */ee(_t,{spec:Je(e),children:/* @__PURE__ */ee(to,{windowId:e.id,children:"page"===e.type?/* @__PURE__ */ee(Ze,{item:e,onClose:()=>u(e.id),accentRgb:n}):/* @__PURE__ */ee(nt,{item:e,onClose:()=>u(e.id),onMinimize:()=>{},accentRgb:n})})})})},e.id)})]})}var xt=400;function kt({panelRef:e,bodyRef:t,open:n,widget:r,active:o,minimized:i}){const a=F(null),s=F(!1);n&&!s.current&&(a.current="undefined"==typeof document?null:document.activeElement),s.current=n;const l=F(!1),c=F(void 0),u=F(i),d=u.current&&!i;u.current=i;const h=()=>{l.current=!0,clearTimeout(c.current),c.current=setTimeout(()=>{l.current=!1},xt)};j(()=>{n&&!r&&h()},[n,r]),j(()=>{d&&n&&!r&&h()},[d]),j(()=>()=>clearTimeout(c.current),[]),j(()=>{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?M(t.current)[0]:void 0;s?s.focus():(a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.focus())},[n,r,o,i,e,t]),O(()=>{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 Et=null,Mt=/* @__PURE__ */new Set;function Ct(){return Et}function Nt(e){if(Et!==e){Et=e;for(const e of Mt)e()}}function St(e){return Mt.add(e),()=>{Mt.delete(e)}}var Lt=!1,Tt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},zt=()=>{};function At(e){Lt=e,Tt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0}}function Dt(e,t){Lt&&("submenu"===e?Tt.submenus++:Tt.menus++,Tt.menuKey=t)}function Pt(e){if(!Lt)return zt;const t=performance.now();let n=!1;return()=>{if(n)return;if(n=!0,!Lt)return;const r=performance.now()-t;"move"===e?Tt.moveMs+=r:Tt.resizeMs+=r}}function It(){const e=Tt;return Tt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},e}var Wt=/* @__PURE__ */new Set([T,E]),Rt=e=>Wt.has(e)||"function"==typeof e&&"badge"===e.titleRole,Kt=/* @__PURE__ */new Set(["button","a","input","select","textarea","kbd"]),$t=/* @__PURE__ */new Set(["svg"]);function Ot(e){const t=[],n={text:"",accessories:[],badges:[],actions:[]};return Ft(e,n,t),n.text=t.join("").replace(/\s+/g," ").trim(),n}function Ft(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=>Ft(e,t,n));if(!U(e))return;const r=e;if(r.type===w)return void(void 0===t.copy&&"string"==typeof r.props.text&&r.props.text&&(t.copy=r.props.text));if(r.type===X)return void Y.toArray(r.props.children).forEach(e=>Ft(e,t,n));if("string"==typeof r.type){if($t.has(r.type))return;if(!Kt.has(r.type))return n.push(" "),Y.toArray(r.props.children).forEach(e=>Ft(e,t,n)),void n.push(" ")}const o=V(r,{key:`title-part-${t.accessories.length}`});t.accessories.push(o),(Rt(r.type)?t.badges:t.actions).push(o)}var jt=/* @__PURE__ */new Map,qt=/* @__PURE__ */new Set,Ht=0;function Bt(){Ht++,qt.forEach(e=>e())}function Ut(e){return jt.get(e)}function Xt(e){return qt.add(e),()=>{qt.delete(e)}}function Yt(){return Ht}var Vt=R(""),Gt=R(null);function _t({spec:e,children:t}){/* @__PURE__ */
45
45
  return ee(Gt.Provider,{value:e,children:t})}var Jt=/* @__PURE__ */new Set(["button","input","textarea","select","kbd","svg"]),Zt='button[type="submit"], button[data-submit], button.btn-submit, button.bg-green-600, button.bg-blue-600',Qt='button, a[href], summary, [role="button"], [role="link"], [role="menuitem"], select';function en(e){return tn(e).replace(/\s+/g," ").trim()}function tn(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(tn).join("");if(U(e)){const t=e,n="string"==typeof t.type?t.type:"";return Jt.has(n)?"":` ${tn(t.props?.children)} `}return""}function nn(e){const t=K(Vt);j(()=>{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 rn={};function on(e,t,n){const r=K(Vt);j(()=>{if(!r)return;rn[r]||(rn[r]=[]);const o={label:e,icon:n,onClick:t};return rn[r].push(o),()=>{rn[r]=(rn[r]||[]).filter(e=>e!==o)}},[r,e,t,n])}function an({title:e}){const t=F(null);return j(()=>{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__ */ee("span",{ref:t,style:{display:"none"},"aria-hidden":"true"})}function sn(e){}var ln=R(null);function cn(){return K(Vt)}function un(){const e=H(Cr,Mr),t=K(ln);return t?.active??(Tn.length<=1||null!=e)}function dn({children:e,position:t="right",quiet:n=!1}){const r=K(ln),[o,i]=q(null);return j(()=>{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?ne(e,o):null}function hn({onClick:e,children:t,className:n}){const r=K(ln);/* @__PURE__ */
46
46
  return ee("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 mn="erp_window_positions",pn={};try{const e=localStorage.getItem(mn);e&&(pn=JSON.parse(e))}catch{}var fn=null;function wn(){fn&&clearTimeout(fn),fn=setTimeout(()=>{try{localStorage.setItem(mn,JSON.stringify(pn))}catch{}},500)}var yn="erp_activation_order",gn=[];try{const e=localStorage.getItem(yn),t=e?JSON.parse(e):null;Array.isArray(t)&&t.every(e=>"string"==typeof e)&&(gn=t)}catch{}var vn=null;function bn(){vn&&clearTimeout(vn),vn=setTimeout(()=>{try{localStorage.setItem(yn,JSON.stringify(gn))}catch{}},500)}function xn(e,t){pn[e]||(pn[e]=t,wn())}function kn(e){return pn[e]?{...pn[e]}:null}function En(e,t){pn[e]=t,wn()}function Mn(){const r=e(),o=t();let i=!1;for(const e of Object.keys(pn))n(pn[e],r,o)&&(delete pn[e],i=!0);i&&wn()}var Cn={sm:384,md:512,lg:672,xl:896,"2xl":1152,"3xl":1408},Nn=4e3,Sn=()=>{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"},Ln={small:.8,medium:1,large:1.25,maximized:1.25},Tn=[],zn=/* @__PURE__ */new Set,An=/* @__PURE__ */new Set,Dn=0,Pn=/* @__PURE__ */new Map;var In=0;function Wn(){return In}function Rn(){In++,zn.forEach(e=>e())}var Kn=/* @__PURE__ */new Map,$n=/* @__PURE__ */new Map,On=/* @__PURE__ */new Map;function Fn(){for(let e=Tn.length-1;e>=0;e--){const t=On.get(Tn[e]);if(t?.tab)return t.owner}return null}function jn(){return H(Cr,Fn,()=>null)}var qn=/* @__PURE__ */new Set;var Hn=null;function Bn(e){Hn=null,Qn(e)}function Un(e){Hn=e;const t=Kn.get(e);t&&Bn(t)}var Xn=/* @__PURE__ */new Map;function Yn(e){return Xn.get(e)?.holdsChanges()??!1}function Vn(e){const t=Xn.get(e);return t?t.ask():Promise.resolve(!0)}function Gn(e){Hn===e&&(Hn=null)}function _n(e,t,n){if(n&&On.set(e,n),t)if(Kn.set(t,e),$n.set(e,t),qn.delete(t)){Tn.unshift(e);const n=gn.indexOf(t);-1!==n&&gn.splice(n,1),gn.unshift(t),bn()}else!function(e,t){const n=gn.indexOf(t);if(-1===n)return void Tn.push(e);let r=Tn.length;for(let e=0;e<Tn.length;e++){const t=$n.get(Tn[e]);if(t&&gn.indexOf(t)>n){r=e;break}}Tn.splice(r,0,e)}(e,t),-1===gn.indexOf(t)&&(gn.push(t),bn());else Tn.push(e);Rn(),window.dispatchEvent(new CustomEvent("modal-reorder")),t&&Hn===t&&Bn(e)}function Jn(e){return e?On.get(e)?.owner??$n.get(e)??null:null}var Zn=/* @__PURE__ */new Set;function Qn(e){const t=Jn(Mr()),n=Tn.indexOf(e);-1!==n&&Tn.splice(n,1),Tn.push(e);const o=On.get(e);if(o?.root&&o.tab&&r()){const e=Tn.filter(e=>{const t=On.get(e);return!!t&&!t.root&&t.owner===o.owner});for(const t of e)Tn.splice(Tn.indexOf(t),1),Tn.push(t)}An.delete(e);const i=$n.get(e);if(i){const e=gn.indexOf(i);-1!==e&&gn.splice(e,1),gn.push(i),bn(),Hn&&Hn!==i&&(Hn=null)}Rn(),window.dispatchEvent(new CustomEvent("modal-reorder"));const a=Jn(Mr());a&&a!==t&&Zn.forEach(e=>e(a))}function er(e){const t=Tn.indexOf(e);-1!==t&&Tn.splice(t,1),An.add(e),Pn.set(e,++Dn);const n=$n.get(e);if(n){const e=gn.indexOf(n);-1!==e&&(gn.splice(e,1),bn())}Rn(),window.dispatchEvent(new CustomEvent("modal-reorder"))}var tr=/* @__PURE__ */new Set;var nr=8,rr=32;function or(){return e()}var ir=u.windowBar,ar=80,sr=384,lr=400;function cr(e,t=or()){const n=Math.min(Math.max(e.x,t.x+ar-e.w),t.x+t.w-ar),r=Math.min(Math.max(e.y,t.y),t.y+t.h-ir);return n===e.x&&r===e.y?e:{...e,x:n,y:r}}function ur(e){const t=e.getBoundingClientRect();if(0===t.width||0===t.height)return!0;const n=or();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 dr(e){const t=or(),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 hr=null;function mr(e){const t=(hr||((hr=document.createElement("div")).style.cssText=["position: fixed","pointer-events: none",`z-index: ${P.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(hr)),hr);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 pr(){hr&&(hr.style.opacity="0",hr.style.display="none")}var fr=[{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"}],wr=350,yr=200;function gr({maximized:e,onToggleMax:t,onSnap:n,buttonClassName:r,strings:o}){const[i,a]=q(!1),s=F(void 0),l=F(void 0);j(()=>()=>{clearTimeout(s.current),clearTimeout(l.current)},[]);const c=()=>{clearTimeout(l.current),s.current=setTimeout(()=>a(!0),wr)},u=()=>{clearTimeout(s.current),l.current=setTimeout(()=>a(!1),yr)};/* @__PURE__ */
47
47
  return Q("span",{className:"relative inline-flex",onMouseEnter:c,onMouseLeave:u,children:[
48
48
  /* @__PURE__ */ee("button",{onClick:t,onFocus:c,onBlur:u,title:e?o.windowed:o.maximize,className:r,children:e?"❐":"⤢"}),i&&/* @__PURE__ */ee("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:fr.map(({zone:e,labelKey:t,region:r})=>/* @__PURE__ */ee("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__ */ee("span",{"aria-hidden":"true",className:`absolute rounded-sm bg-blue-500/70 ${r}`,style:{margin:2}})},e))})]})}var vr="rosh-gesture-style";var br={se:"nwse-resize",nw:"nwse-resize",sw:"nesw-resize",ne:"nesw-resize",n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize"},xr=4;function kr(e,t,n,r){!function(){if("undefined"==typeof document||document.getElementById(vr))return;const e=document.createElement("style");e.id=vr,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=Pt(r);let a=!1;return()=>{if(!a){a=!0,i();try{e.releasePointerCapture(t)}catch{}o.remove(),document.body.classList.remove("rosh-gesturing")}}}function Er(e){const t=Tn.indexOf(e);if(-1===t)return-1;const n=P.window+t*P.windowStep,o=On.get(e);if(!o||o.root||!o.tab||!r())return n;let i=-1;for(const[e,t]of On){if(!t.root||t.owner!==o.owner)continue;const n=Tn.indexOf(e);-1!==n&&(i=Math.max(i,P.window+n*P.windowStep))}return i>=n?i+2+Math.min(t,7):n}function Mr(){return Tn[Tn.length-1]||null}function Cr(e){return zn.add(e),()=>{zn.delete(e)}}"undefined"!=typeof window&&window.addEventListener("deactivate-all-modals",function(){for(let e=Tn.length-1;e>=0;e--)tr.has(Tn[e])||Tn.splice(e,1);gn=gn.filter(e=>{const t=Kn.get(e);return null!=t&&tr.has(t)}),bn(),Rn(),window.dispatchEvent(new CustomEvent("modal-reorder"))});var Nr="modal-close-request";function Sr(e){H(Cr,Wn);const t=K(ln);if(Tn.length<=1)return!0;if(e){const t=Kn.get(e);if(null!=t)return Mr()===t}return t?.active??null!=Mr()}var Lr=!1,Tr=/* @__PURE__ */new Set;function zr(e){return Tr.add(e),()=>Tr.delete(e)}function Ar(){return Lr}function Dr(e){Lr!==e&&(Lr=e,Tr.forEach(e=>e()))}function Pr(){Dr(!Lr)}function Ir(){Dr(!1)}var Wr=null,Rr=/* @__PURE__ */new Set;function Kr(e){return Rr.add(e),()=>Rr.delete(e)}function $r(){return Wr}function Or(e){Wr!==e&&(Wr=e,Rr.forEach(e=>e()))}var Fr=null,jr=/* @__PURE__ */new Set;function qr(e){return jr.add(e),()=>jr.delete(e)}function Hr(){return Fr}function Br(e){Fr!==e&&(Fr=e,jr.forEach(e=>e()))}function Ur(){if(!Fr)return void Dr(!1);Or(Fr),Br(null),Dr(!1)}function Xr(){Dr(!Lr),window.dispatchEvent(new CustomEvent("modal-split-view"))}function Yr(){const e=H(zr,Ar),[t,n]=q(e),[r,o]=q(e);return j(()=>{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?ne(
49
- /* @__PURE__ */ee("div",{onMouseDown:e=>{e.stopPropagation(),Dr(!1)},style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",zIndex:P.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 Vr({open:t,onClose:i,title:c,icon:u,copyText:d,size:h="lg",dirty:m=!1,onNext:p,onPrev:f,footer:w,bodyScroll:g,onMinimize:b,initialBox:E,actions:L,actionsLeft:T,editing:D=!1,edit:R,allowPinOnTop:$,initialPosition:X,widget:Y,compact:J,appStyle:Z,flushBody:re,autoHeight:oe,autoMinHeight:ie,autoWidth:ae,widgetMenu:se,dimensions:le,windowKey:ce,openedFromKey:ue,accentRgb:de,children:he}){const[me,pe]=q(()=>r()),fe=x()&&!me,ye=k()&&!!Y,[ge,ve]=q(0),[be,xe]=q(!1),ke=F(null),Ee=F(0);j(()=>{Ee.current=ge},[ge]);const Me=B(e=>{fe&&(ke.current={startX:e.clientX,startY:e.clientY,pointerId:e.pointerId},xe(!0),Nt(ue??null))},[fe,ue]),Ce=H(St,Ct);j(()=>{if(!be)return;const e=e=>{if(!ke.current)return;const t=e.clientX-ke.current.startX;if(Math.abs(e.clientY-ke.current.startY)>Math.abs(t)+12)return ke.current=null,xe(!1),ve(0),void Nt(null);ve(Math.max(0,t))},t=()=>{if(!ke.current)return;const e=.3*window.innerWidth,t=Ee.current>e;ke.current=null,xe(!1),t?(ve(window.innerWidth),setTimeout(()=>{i(),ve(0),Nt(null)},180)):(ve(0),Nt(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)}},[be]);const[Le,ze]=q(c),Ae=W(),De=Ae.window;j(()=>{ze(c)},[c]);const Pe=G(()=>en(Le).trim()||void 0,[Le]),Ie=_(),[We,Re]=q(!1),Ke=F(!1),[$e,Oe]=q(!1),[Fe,je]=q(null),qe=K(Gt),He=K(we),{prefs:Be,save:Ue}=M(),Xe=!!Be.window_accent_stripe,Ye=Be.favorite_documents||[],Ge=!!qe&&Ye.some(e=>e.entityType===qe.entityType&&e.entityId===qe.entityId),Je=B(()=>{if(!qe)return;const e=Ge?Ye.filter(e=>!(e.entityType===qe.entityType&&e.entityId===qe.entityId)):[...Ye,{entityType:qe.entityType,entityId:qe.entityId,label:qe.label}];Ue({favorite_documents:e})},[qe,Ge,Ye,Ue]),[Ze,Qe]=q(null),[et,tt]=q("top-right"===X?"right":"left"),nt=F(!1),rt=F(null);O(()=>{const e=rt.current;e&&(de?e.style.setProperty("--window-accent-rgb",de):e.style.removeProperty("--window-accent-rgb"))},[de]);const ot=F(!1),it=F(null),at=F(null),st=F(null),[lt,ct]=q(!1),ut=F(null),dt=F(null),ht=F(null),[mt,pt]=q(!1);O(()=>{const e=dt.current,t=ht.current;if(!e||!t)return;const n=()=>pt(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!=w&&!1!==w]);const ft=!!R&&!Y&&!J&&!Z&&(R.editing||"hidden"!==R.state),wt=!!(w||L||T)||lt||ft,yt=K(Se),gt=""!==K(Vt),vt=F(null);vt.current=He?{owner:He.key,tab:He.tab,root:!gt}:null;const bt=ce||(He&&!gt?He.key:null),xt=!!yt&&!gt&&yt.enabled&&yt.hasState&&(D||yt.declaredEditable)&&!yt.handMounted&&wt&&!Y&&!J&&!Z&&!fe,Et=/* @__PURE__ */ee(A,{name:"window",className:"h-4 w-4",strokeWidth:1.5}),Mt=u&&U(u)?V(u,{className:`h-4 w-4 ${u.props?.className??""}`.trim()}):u??Et,Lt=()=>/* @__PURE__ */ee("button",{onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation();const t=e.currentTarget.getBoundingClientRect();je(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:Mt}),Tt=40,{minimize:zt,items:At,restoreIfMinimized:Dt,openWindows:Pt}=_e(),It=F(`modal-${Math.random().toString(36).slice(2,8)}`).current;j(()=>{if(Y)return tr.add(It),()=>{tr.delete(It)}},[Y,It]),j(()=>{const e=e=>{const t=e.detail;t?.id===It&&ze(t.title)};return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[It]);const[Wt,Rt]=q(P.window),Kt=function(e){const t=H(Cr,Mr);return Tn.length<=1||t===e}(It),$t=F(R);$t.current=R;const Ft=!!R&&!R.editing&&"enabled"===R.state;j(()=>{if(!t||!Kt||!Ft)return;const e=e=>{("KeyE"===e.code||"E"===e.key||"e"===e.key)&&e.altKey&&e.shiftKey&&!e.metaKey&&!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),$t.current?.onEdit())};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,Kt,Ft]);const qt=function(e){return H(Cr,()=>An.has(e))}(It);kt({panelRef:rt,bodyRef:it,open:t,widget:!!Y,active:Kt,minimized:qt});const Ht=H(zr,Ar),Ut=H(Kr,$r),Xt=H(qr,Hr),Yt=!$&&!Y,_t=Ht&&Yt,[Jt,tn]=q(!1),nn=_t&&Xt===It,[on,an]=q(!1),sn=on&&Yt&&Ut===It?"picked":null,cn=F(_t);j(()=>{if(cn.current&&!_t){an(!0);const e=setTimeout(()=>{an(!1),Wr===It&&Or(null)},700);return cn.current=_t,()=>clearTimeout(e)}cn.current=_t},[_t,It]),j(()=>{_t||tn(!1)},[_t]),j(()=>{const e=at.current,t=st.current;if(!e&&!t)return;const n=e=>e?Array.from(e.children).filter(e=>"shell"!==e.dataset.undoControls).length:0,r=()=>ct(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]),j(()=>{const e=e=>{if(e.target.closest('button[type="submit"]')&&rt.current){const t=rt.current.querySelector("form");t&&(e.preventDefault(),t.requestSubmit())}},t=at.current,n=st.current;return t&&t.addEventListener("click",e),n&&n.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e),n&&n.removeEventListener("click",e)}},[t]);const un=F(!1),dn=B(e,[]),hn=B(()=>{const t=e(),n=le?le[0]:Cn[h]||672,o=t.w-80,i=t.h-80,a=Math.min(n,o),s=Ln[Sn()],l=le?Math.min(le[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*(Tn.length-1),u=Math.max(Tt,(i-l)/2),d=(o-a)/2,m=t.h-Tt-l-u;return"top-right"===X?{x:t.x+t.w-a-Tt,y:t.y+Tt,w:a,h:l}:"top-left"===X?{x:t.x+Tt,y:t.y+Tt,w:a,h:l}:{x:t.x+Math.max(Tt,(o-a)/2+Tt)+Math.min(c,Math.max(0,d)),y:t.y+u+Math.min(c,Math.max(0,m)),w:a,h:l}},[h]),mn=F(!1);t||(mn.current=!1);const fn=ce||d||null;j(()=>{if(!t)return;_n(It,fn,vt.current??void 0),ce||Qn(It),un.current=!1,Rt(Er(It));const e=()=>{Rt(Er(It))},n=()=>{},r=e=>{if(!e)return!1;if(e.windowKey)return e.windowKey===ce;if(!e.label)return!1;const t=rt.current?.querySelector("[data-window-title]");return!!t?.textContent?.includes(e.label)},o=e=>{if(!r(e.detail))return;if(Qn(It),Dn.current)return;const t=or(),n=Math.min(Bn.current.w,t.w-40),o=Math.min(Bn.current.h,t.h-40),i=t.x+(t.w-n)/2,a=t.y+(t.h-o)/2;vn({x:i,y:a,w:n,h:o}),Hn(!1)},i=e=>{const t=e.detail;r(t)&&(Qn(It),je({x:t.x,y:t.y}))},a=e=>{if(e.detail?.windowKey!==ce)return;Qn(It);const t=Bn.current,n=function(e,t=or()){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=rt.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)}vn(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=Tn.indexOf(e);-1!==t&&(Tn.splice(t,1),Rn()),An.delete(e),Pn.delete(e),On.delete(e);const n=$n.get(e);n&&($n.delete(e),Kn.delete(n))}(It),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,It,fn,dn]);const yn=!Y&&"maximized"===Sn(),[gn,vn]=q(()=>{if(fn&&pn[fn]){const e={...pn[fn]};return le&&(e.w=le[0],oe||(e.h=le[1])),cr(e)}return E?{x:E.x,y:E.y,w:E.w,h:E.h}:yn?dn():hn()}),[bn,xn]=q(()=>!oe),kn=F(me),En=F(null);j(()=>{const e=()=>{const e=r();e!==kn.current&&En.current?.(e),kn.current=e,pe(e),Rt(Er(It))};return window.addEventListener("react-os-shell:layout-mode-changed",e),()=>window.removeEventListener("react-os-shell:layout-mode-changed",e)},[It]);const Mn=me&&!!He?.tab&&!gt&&!Y&&!fe,zn=Mn,Dn=F(zn);Dn.current=zn;const In=jn(),Wn=me&&!!He?.tab&&!Y&&!fe&&!Ht&&In!==He.key,Fn=!!Y&&me&&!Ht&&null!==In,[qn,Hn]=q(()=>fn&&pn[fn]||E?zn:zn||yn),Bn=F(gn);Bn.current=gn;const Un=F(qn);O(()=>{Un.current=qn},[qn]),O(()=>{if(bn||Mn)return;const e=rt.current,t=it.current;if(!e||!t)return;const n=ie??(Y?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,Bn.current.y)-24),g=w?Math.min(Bn.current.h,y):Math.min(Math.max(n,u+p),y),v=Math.abs(g-o)>1;v&&(o=g,vn(e=>Math.abs(e.h-g)>1?{...e,h:g}:e)),Y||(g<=n?i&&(clearTimeout(i),i=null):(v||null===i)&&(i&&clearTimeout(i),i=setTimeout(()=>{const e=o;s(),o===e&&xn(!0)},160)))},l=new ResizeObserver(s);s(),ut.current&&l.observe(ut.current);const c=new MutationObserver(s);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{l.disconnect(),c.disconnect(),i&&clearTimeout(i)}},[bn,Y,ie,wt,Mn]),O(()=>{if(!oe||!bn||Y||!t)return;const e=ut.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||qn)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,Bn.current.y)-24);vn(e=>({...e,h:Math.min(Math.max(i,e.h+r),s)}))});return r.observe(e),()=>r.disconnect()},[oe,bn,Y,t,qn,ie]);const Yn=!1!==ae&&!Y&&!Z&&!fe,[Vn,Gn]=q(()=>!Yn);O(()=>{if(Vn||!t)return;if(!Yn||qn)return void Gn(!0);const n=rt.current,r=it.current;if(!n||!r)return;const o=/* @__PURE__ */new WeakSet;let i=Bn.current.w,c=0;const u=()=>Gn(!0),d=()=>{c=0;const t=Bn.current;if(Math.abs(t.w-i)>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)=>{a(e,w)||o.add(m[t])});const v=s(t,l(t.w,w,g),d,Tt);v!==t&&(i=v.w,vn(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,Nn);return()=>{h.disconnect(),c&&cancelAnimationFrame(c),clearTimeout(m)}},[Vn,t,Yn,qn]);const Jn=F(null),Zn=!(!He?.tab||gt||Y||fe);En.current=t=>{if(!Zn)return;if(t)return Jn.current||(Jn.current={box:{...Bn.current},maximized:Un.current}),void(Un.current=!0);const r=Jn.current;Jn.current=null;const o=e();if(r?.maximized)return Un.current=!0,Hn(!0),void vn(o);const i=r?.box??(fn?pn[fn]:void 0);if(Un.current=!1,Hn(!1),i&&!n(i,o,!1)){const e={...i};le&&(e.w=le[0],oe||(e.h=le[1])),vn(cr(e))}else vn(hn())},j(()=>{zn&&(Un.current=!0,Hn(!0),vn(dn()))},[zn,dn]),j(()=>{if(Y)return;const e=()=>{const e=fn?pn[fn]:void 0;if(Un.current=!1,Hn(!1),e){const t={...e};le&&(t.w=le[0],oe||(t.h=le[1])),vn(cr(t))}else vn(hn())};return window.addEventListener("react-os-shell:restore-windowed",e),()=>window.removeEventListener("react-os-shell:restore-windowed",e)},[Y,hn,fn]),j(()=>{t&&fn&&!Mn&&(pn[fn]=gn,wn()),t&&window.dispatchEvent(new CustomEvent("modal-geometry"))},[gn,t,fn,Mn]),j(()=>{if(!t)return;const e=()=>{Un.current?vn(dn()):document.body.classList.contains("rosh-gesturing")||vn(cr)};window.addEventListener("resize",e),window.addEventListener(o,e);let n=null;return qn&&(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,qn,dn]),j(()=>{if(t&&(Re(!1),Ke.current=!1,nt.current=!1,Gn(!Yn),!Dn.current)){if(fn&&pn[fn]){const e=pn[fn];return void vn(t=>cr({...e,...oe?{h:t.h}:{},...Yn?{x:t.x,w:t.w}:{}}))}E&&(vn({x:E.x,y:E.y,w:E.w,h:E.h}),Hn(E.maximized))}},[t]),j(()=>{if(!t||"auto"!==m)return;let e;const n=t=>{rt.current?.contains(t.target)&&!Ke.current&&(Ke.current=!0,e=setTimeout(()=>Re(!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 ir="auto"===m?We:!0===m,ar=He&&!gt?He.key:null,ur=G(()=>Ot(Le),[Le]),hr=F({shortcutSpec:qe,isOnDesktop:Ge,toggleDesktopShortcut:Je,taskbarStrings:Ae.taskbar});O(()=>{hr.current={shortcutSpec:qe,isOnDesktop:Ge,toggleDesktopShortcut:Je,taskbarStrings:Ae.taskbar}});const fr=F(null);fr.current||(fr.current={open:(e,t)=>je({x:e,y:t}),items:()=>{const e=hr.current,t=[];e.shortcutSpec&&t.push({label:e.isOnDesktop?e.taskbarStrings.removeFromDesktop:e.taskbarStrings.addToDesktop,onSelect:e.toggleDesktopShortcut});for(const e of rn[It]||[])t.push({label:e.label,icon:e.icon,onSelect:e.onClick});return t}}),j(()=>{if(t&&ar)return()=>{return e=ar,void(jt.delete(e)&&Bt());var e}},[t,ar]),Ve(!(ce||!t)&&ir);const wr=B(()=>ir||"auto"===m&&Ke.current,[ir,m]),yr=B(async e=>{if(nt.current)return!1;if(!wr())return!0;nt.current=!0;const t=Pe,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 y({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 nt.current=!1,r},[wr,Pe]),vr=B(()=>nt.current?Promise.resolve():wr()?yr("close").then(e=>{e&&i()}):(i(),Promise.resolve()),[wr,yr,i]),Sr=B(async()=>{await yr("discard")&&(Ke.current=!1,Re(!1),$t.current?.onDiscard())},[yr]),Lr=B(async()=>{const e=await yr("switch");return e&&(Ke.current=!1,Re(!1)),e},[yr]),Tr=F(()=>!1);O(()=>{Tr.current=wr}),O(()=>{if(!t||!ce)return;const e={holdsChanges:()=>Tr.current(),ask:Lr};return Xn.set(ce,e),()=>{Xn.get(ce)===e&&Xn.delete(ce)}},[t,ce,Lr]),O(()=>{if(!t||!bt)return;const e=e=>{e.detail?.windowKey===bt&&vr()};return window.addEventListener(Nr,e),()=>window.removeEventListener(Nr,e)},[t,bt,vr]);const Pr=F(null),Ir=B(e=>{if(0!==e.button)return;if(e.target.closest("button, input, a, kbd, select, textarea"))return;if(je(null),Qn(It),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=rt.current,s=a?.getBoundingClientRect();let l,c,u,d;if(Pr.current){const t=Pr.current;Pr.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:Bn.current.x,c=s?s.top:Bn.current.y,u=s?s.height:Bn.current.h,d=s?s.width:Bn.current.w;Hn(!1),vn(e=>({...e,x:l,y:c,w:d,h:u}));let h=null;const m=e=>{if(!r){if(Math.abs(e.clientX-o)<xr&&Math.abs(e.clientY-i)<xr)return;r=kr(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)`),Bn.current={...Bn.current,x:s,y:u},!Y){const t=function(e,t){const n=or(),r=e<=n.x+nr,o=e>=n.x+n.w-nr,i=t<=n.y+nr,a=t>=n.y+n.h-nr,s=e<=n.x+rr,l=e>=n.x+n.w-rr,c=t<=n.y+rr,u=t>=n.y+n.h-rr;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?mr(dr(t)):pr())}},p=()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",p),r?.(),pr();const e=cr({...Bn.current});if(Bn.current=e,!Y&&h){Pr.current={x:l,y:c,w:d,h:u};const e=dr(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 vn(e)}if(Y){const t=e.x+e.w/2,n=window.innerWidth/2;tt(t>n?"right":"left")}a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.transform="",a.style.transition=""),vn(e)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",p)},[]),Rr=B((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=rt.current,l=s?.getBoundingClientRect(),c=l?l.left:Bn.current.x,u=l?l.top:Bn.current.y,d=l?l.width:Bn.current.w,h=l?l.height:Bn.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;Hn(!1),vn({x:c,y:u,w:d,h:h}),Bn.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,Bn.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)<xr&&Math.abs(e.clientY-a)<xr)return;o=kr(n,r,br[t],"resize")}g=((e,t)=>{let n=c,r=u,o=d,i=h;if(f&&(o=Math.max(sr,d+e)),w&&(i=Math.max(lr,h+t)),m){const t=Math.max(sr,d-e);n=c+d-t,o=t}if(p){const e=Math.max(lr,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?.(),vn({...Bn.current})};window.addEventListener("pointermove",b),window.addEventListener("pointerup",x)},[]),Fr=B(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(),Qn(It),"Enter"===e.key)return void(qn?(Hn(!1),vn(hn())):(Hn(!0),vn(dn())));const[n,r]=t;if(e.ctrlKey||e.metaKey){const e=()=>{Pr.current||(Pr.current={...Bn.current})};if(r<0)return e(),Hn(!0),void vn(dn());if(r>0){if(qn)return Hn(!1),void vn(hn());if(Pr.current){const e=cr(Pr.current);return Pr.current=null,Bn.current=e,void vn(e)}return void er(It)}e(),Hn(!1);const t=dr(n<0?"left":"right");return Bn.current=t,void vn(t)}if(qn)return;const o=Bn.current,i=e.shiftKey?{...o,w:Math.max(sr,o.w+24*n),h:Math.max(lr,o.h+24*r)}:cr({...o,x:o.x+24*n,y:Math.max(0,o.y+24*r)});Bn.current=i,vn(i)},[It,qn,hn,dn]),jr=B(e=>{Pr.current||(Pr.current={...Bn.current}),Hn(!1);const t=dr(e);Bn.current=t,vn(t),Qn(It)},[It]),Br=zn||_t?{}:{tabIndex:0,role:"group","aria-label":Pe?`${Pe} — ${De.windowSuffix}`:De.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:Fr},Ur=()=>{Hn(!0),vn(dn())},Xr=B(()=>{const e=rt.current;if(!e)return;const t=e.querySelector("form");if(t)t.requestSubmit();else{const t=e.querySelector(Zt);t&&!t.disabled&&t.click()}},[]);j(()=>{if(!t)return;if(Y)return;const e=e=>{if(Tn[Tn.length-1]===It&&"Enter"===e.key){const t=e.target;if("TEXTAREA"===t.tagName||t.isContentEditable)return;if(e.metaKey||e.ctrlKey)e.preventDefault(),Xr();else{if("INPUT"===t.tagName&&t.closest("form"))return;if(!(t instanceof Element&&rt.current?.contains(t)))return;if(t.closest(Qt))return;e.preventDefault()}}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,Xr,It,Y]),j(()=>{if(!t)return;const e=e=>{Tn[Tn.length-1]===It&&((e.metaKey||e.ctrlKey)&&"s"===e.key?(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-save",{detail:{modalId:It}})),Ke.current=!1,Re(!1)):e.altKey&&e.shiftKey&&("KeyD"===e.code||"D"===e.key||"d"===e.key)&&(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-duplicate",{detail:{modalId:It}}))))};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t]),j(()=>{if(!t)return;if(Y)return;const e=e=>{if("Escape"===e.key&&Tn[Tn.length-1]===It){if(I(e))return e.preventDefault(),void e.stopPropagation();if(Mn&&!D)return;e.preventDefault(),e.stopPropagation(),vr()}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,vr,It,Y,Mn,D]);const Yr=t&&(void 0!==p||void 0!==f),[Vr]=q(()=>{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}),Gr=Mn&&!He?.home&&ur.actions.length>0;j(()=>{t&&ar&&function(e,t){const n=jt.get(e);n&&n.title===t.title&&n.dirty===t.dirty&&n.copy===t.copy&&n.actions===t.actions&&n.menu===t.menu||(jt.set(e,t),Bt())}(ar,{title:ur.text||Pe,dirty:ir,copy:ur.copy,actions:Gr&&Vr?Vr:void 0,menu:fr.current??void 0})},[t,ar,Pe,ir,ur.text,ur.copy,Gr,Vr]);const _r=B(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(j(()=>{if(!t)return;const e=e=>{if(Tn[Tn.length-1]!==It)return;const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.target.isContentEditable||("j"===e.key&&Yr&&(e.preventDefault(),p?p():_r("bottom")),"k"===e.key&&Yr&&(e.preventDefault(),f?f():_r("top"))))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,p,f,Yr,_r,It]),!t||mn.current)return null;const Jr=_t?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=or(),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}}(It):null,Zr=_t&&Jr?Math.min(Jr.w/gn.w,Jr.h/gn.h):1,Qr=(()=>{if(_t&&Jr){const e=Zr,t=gn.w*e,n=gn.h*e,r=Jr.x+(Jr.w-t)/2-gn.x,o=Jr.y+(Jr.h-n)/2-gn.y,i=Jt||nn;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:P.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(on&&Yt){const e="picked"===sn;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:P.expose+30}:{}}}return null})(),eo=v({modal:!1,titleId:!Y&&(Mn?!He?.home:!fe)?Ie:void 0,label:ur.text||Pe}),to=/* @__PURE__ */Q("div",{children:[
49
+ /* @__PURE__ */ee("div",{onMouseDown:e=>{e.stopPropagation(),Dr(!1)},style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",zIndex:P.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 Vr({open:t,onClose:i,title:c,icon:u,copyText:d,size:h="lg",dirty:m=!1,onNext:p,onPrev:f,footer:w,bodyScroll:v,onMinimize:E,initialBox:M,actions:L,actionsLeft:T,editing:D=!1,edit:R,allowPinOnTop:$,initialPosition:X,widget:Y,compact:J,appStyle:Z,flushBody:re,autoHeight:oe,autoMinHeight:ie,autoWidth:ae,widgetMenu:se,dimensions:le,windowKey:ce,openedFromKey:ue,accentRgb:de,children:he}){const[me,pe]=q(()=>r()),fe=x()&&!me,ye=k()&&!!Y,[ge,ve]=q(0),[be,xe]=q(!1),ke=F(null),Ee=F(0);j(()=>{Ee.current=ge},[ge]);const Me=B(e=>{fe&&(ke.current={startX:e.clientX,startY:e.clientY,pointerId:e.pointerId},xe(!0),Nt(ue??null))},[fe,ue]),Ce=H(St,Ct);j(()=>{if(!be)return;const e=e=>{if(!ke.current)return;const t=e.clientX-ke.current.startX;if(Math.abs(e.clientY-ke.current.startY)>Math.abs(t)+12)return ke.current=null,xe(!1),ve(0),void Nt(null);ve(Math.max(0,t))},t=()=>{if(!ke.current)return;const e=.3*window.innerWidth,t=Ee.current>e;ke.current=null,xe(!1),t?(ve(window.innerWidth),setTimeout(()=>{i(),ve(0),Nt(null)},180)):(ve(0),Nt(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)}},[be]);const[Le,ze]=q(c),Ae=W(),De=Ae.window;j(()=>{ze(c)},[c]);const Pe=G(()=>en(Le).trim()||void 0,[Le]),Ie=_(),[We,Re]=q(!1),Ke=F(!1),[$e,Oe]=q(!1),[Fe,je]=q(null),qe=K(Gt),He=K(we),{prefs:Be,save:Ue}=g(),Xe=!!Be.window_accent_stripe,Ye=Be.favorite_documents||[],Ge=!!qe&&Ye.some(e=>e.entityType===qe.entityType&&e.entityId===qe.entityId),Je=B(()=>{if(!qe)return;const e=Ge?Ye.filter(e=>!(e.entityType===qe.entityType&&e.entityId===qe.entityId)):[...Ye,{entityType:qe.entityType,entityId:qe.entityId,label:qe.label}];Ue({favorite_documents:e})},[qe,Ge,Ye,Ue]),[Ze,Qe]=q(null),[et,tt]=q("top-right"===X?"right":"left"),nt=F(!1),rt=F(null);O(()=>{const e=rt.current;e&&(de?e.style.setProperty("--window-accent-rgb",de):e.style.removeProperty("--window-accent-rgb"))},[de]);const ot=F(!1),it=F(null),at=F(null),st=F(null),[lt,ct]=q(!1),ut=F(null),dt=F(null),ht=F(null),[mt,pt]=q(!1);O(()=>{const e=dt.current,t=ht.current;if(!e||!t)return;const n=()=>pt(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!=w&&!1!==w]);const ft=!!R&&!Y&&!J&&!Z&&(R.editing||"hidden"!==R.state),wt=!!(w||L||T)||lt||ft,yt=K(Se),gt=""!==K(Vt),vt=F(null);vt.current=He?{owner:He.key,tab:He.tab,root:!gt}:null;const bt=ce||(He&&!gt?He.key:null),xt=!!yt&&!gt&&yt.enabled&&yt.hasState&&(D||yt.declaredEditable)&&!yt.handMounted&&wt&&!Y&&!J&&!Z&&!fe,Et=/* @__PURE__ */ee(A,{name:"window",className:"h-4 w-4",strokeWidth:1.5}),Mt=u&&U(u)?V(u,{className:`h-4 w-4 ${u.props?.className??""}`.trim()}):u??Et,Lt=()=>/* @__PURE__ */ee("button",{onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation();const t=e.currentTarget.getBoundingClientRect();je(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:Mt}),Tt=40,{minimize:zt,items:At,restoreIfMinimized:Dt,openWindows:Pt}=_e(),It=F(`modal-${Math.random().toString(36).slice(2,8)}`).current;j(()=>{if(Y)return tr.add(It),()=>{tr.delete(It)}},[Y,It]),j(()=>{const e=e=>{const t=e.detail;t?.id===It&&ze(t.title)};return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[It]);const[Wt,Rt]=q(P.window),Kt=function(e){const t=H(Cr,Mr);return Tn.length<=1||t===e}(It),$t=F(R);$t.current=R;const Ft=!!R&&!R.editing&&"enabled"===R.state;j(()=>{if(!t||!Kt||!Ft)return;const e=e=>{("KeyE"===e.code||"E"===e.key||"e"===e.key)&&e.altKey&&e.shiftKey&&!e.metaKey&&!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),$t.current?.onEdit())};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,Kt,Ft]);const qt=function(e){return H(Cr,()=>An.has(e))}(It);kt({panelRef:rt,bodyRef:it,open:t,widget:!!Y,active:Kt,minimized:qt});const Ht=H(zr,Ar),Ut=H(Kr,$r),Xt=H(qr,Hr),Yt=!$&&!Y,_t=Ht&&Yt,[Jt,tn]=q(!1),nn=_t&&Xt===It,[on,an]=q(!1),sn=on&&Yt&&Ut===It?"picked":null,cn=F(_t);j(()=>{if(cn.current&&!_t){an(!0);const e=setTimeout(()=>{an(!1),Wr===It&&Or(null)},700);return cn.current=_t,()=>clearTimeout(e)}cn.current=_t},[_t,It]),j(()=>{_t||tn(!1)},[_t]),j(()=>{const e=at.current,t=st.current;if(!e&&!t)return;const n=e=>e?Array.from(e.children).filter(e=>"shell"!==e.dataset.undoControls).length:0,r=()=>ct(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]),j(()=>{const e=e=>{if(e.target.closest('button[type="submit"]')&&rt.current){const t=rt.current.querySelector("form");t&&(e.preventDefault(),t.requestSubmit())}},t=at.current,n=st.current;return t&&t.addEventListener("click",e),n&&n.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e),n&&n.removeEventListener("click",e)}},[t]);const un=F(!1),dn=B(e,[]),hn=B(()=>{const t=e(),n=le?le[0]:Cn[h]||672,o=t.w-80,i=t.h-80,a=Math.min(n,o),s=Ln[Sn()],l=le?Math.min(le[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*(Tn.length-1),u=Math.max(Tt,(i-l)/2),d=(o-a)/2,m=t.h-Tt-l-u;return"top-right"===X?{x:t.x+t.w-a-Tt,y:t.y+Tt,w:a,h:l}:"top-left"===X?{x:t.x+Tt,y:t.y+Tt,w:a,h:l}:{x:t.x+Math.max(Tt,(o-a)/2+Tt)+Math.min(c,Math.max(0,d)),y:t.y+u+Math.min(c,Math.max(0,m)),w:a,h:l}},[h]),mn=F(!1);t||(mn.current=!1);const fn=ce||d||null;j(()=>{if(!t)return;_n(It,fn,vt.current??void 0),ce||Qn(It),un.current=!1,Rt(Er(It));const e=()=>{Rt(Er(It))},n=()=>{},r=e=>{if(!e)return!1;if(e.windowKey)return e.windowKey===ce;if(!e.label)return!1;const t=rt.current?.querySelector("[data-window-title]");return!!t?.textContent?.includes(e.label)},o=e=>{if(!r(e.detail))return;if(Qn(It),Dn.current)return;const t=or(),n=Math.min(Bn.current.w,t.w-40),o=Math.min(Bn.current.h,t.h-40),i=t.x+(t.w-n)/2,a=t.y+(t.h-o)/2;vn({x:i,y:a,w:n,h:o}),Hn(!1)},i=e=>{const t=e.detail;r(t)&&(Qn(It),je({x:t.x,y:t.y}))},a=e=>{if(e.detail?.windowKey!==ce)return;Qn(It);const t=Bn.current,n=function(e,t=or()){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=rt.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)}vn(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=Tn.indexOf(e);-1!==t&&(Tn.splice(t,1),Rn()),An.delete(e),Pn.delete(e),On.delete(e);const n=$n.get(e);n&&($n.delete(e),Kn.delete(n))}(It),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,It,fn,dn]);const yn=!Y&&"maximized"===Sn(),[gn,vn]=q(()=>{if(fn&&pn[fn]){const e={...pn[fn]};return le&&(e.w=le[0],oe||(e.h=le[1])),cr(e)}return M?{x:M.x,y:M.y,w:M.w,h:M.h}:yn?dn():hn()}),[bn,xn]=q(()=>!oe),kn=F(me),En=F(null);j(()=>{const e=()=>{const e=r();e!==kn.current&&En.current?.(e),kn.current=e,pe(e),Rt(Er(It))};return window.addEventListener("react-os-shell:layout-mode-changed",e),()=>window.removeEventListener("react-os-shell:layout-mode-changed",e)},[It]);const Mn=me&&!!He?.tab&&!gt&&!Y&&!fe,zn=Mn,Dn=F(zn);Dn.current=zn;const In=jn(),Wn=me&&!!He?.tab&&!Y&&!fe&&!Ht&&In!==He.key,Fn=!!Y&&me&&!Ht&&null!==In,[qn,Hn]=q(()=>fn&&pn[fn]||M?zn:zn||yn),Bn=F(gn);Bn.current=gn;const Un=F(qn);O(()=>{Un.current=qn},[qn]),O(()=>{if(bn||Mn)return;const e=rt.current,t=it.current;if(!e||!t)return;const n=ie??(Y?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,Bn.current.y)-24),g=w?Math.min(Bn.current.h,y):Math.min(Math.max(n,u+p),y),v=Math.abs(g-o)>1;v&&(o=g,vn(e=>Math.abs(e.h-g)>1?{...e,h:g}:e)),Y||(g<=n?i&&(clearTimeout(i),i=null):(v||null===i)&&(i&&clearTimeout(i),i=setTimeout(()=>{const e=o;s(),o===e&&xn(!0)},160)))},l=new ResizeObserver(s);s(),ut.current&&l.observe(ut.current);const c=new MutationObserver(s);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{l.disconnect(),c.disconnect(),i&&clearTimeout(i)}},[bn,Y,ie,wt,Mn]),O(()=>{if(!oe||!bn||Y||!t)return;const e=ut.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||qn)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,Bn.current.y)-24);vn(e=>({...e,h:Math.min(Math.max(i,e.h+r),s)}))});return r.observe(e),()=>r.disconnect()},[oe,bn,Y,t,qn,ie]);const Yn=!1!==ae&&!Y&&!Z&&!fe,[Vn,Gn]=q(()=>!Yn);O(()=>{if(Vn||!t)return;if(!Yn||qn)return void Gn(!0);const n=rt.current,r=it.current;if(!n||!r)return;const o=/* @__PURE__ */new WeakSet;let i=Bn.current.w,c=0;const u=()=>Gn(!0),d=()=>{c=0;const t=Bn.current;if(Math.abs(t.w-i)>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)=>{a(e,w)||o.add(m[t])});const v=s(t,l(t.w,w,g),d,Tt);v!==t&&(i=v.w,vn(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,Nn);return()=>{h.disconnect(),c&&cancelAnimationFrame(c),clearTimeout(m)}},[Vn,t,Yn,qn]);const Jn=F(null),Zn=!(!He?.tab||gt||Y||fe);En.current=t=>{if(!Zn)return;if(t)return Jn.current||(Jn.current={box:{...Bn.current},maximized:Un.current}),void(Un.current=!0);const r=Jn.current;Jn.current=null;const o=e();if(r?.maximized)return Un.current=!0,Hn(!0),void vn(o);const i=r?.box??(fn?pn[fn]:void 0);if(Un.current=!1,Hn(!1),i&&!n(i,o,!1)){const e={...i};le&&(e.w=le[0],oe||(e.h=le[1])),vn(cr(e))}else vn(hn())},j(()=>{zn&&(Un.current=!0,Hn(!0),vn(dn()))},[zn,dn]),j(()=>{if(Y)return;const e=()=>{const e=fn?pn[fn]:void 0;if(Un.current=!1,Hn(!1),e){const t={...e};le&&(t.w=le[0],oe||(t.h=le[1])),vn(cr(t))}else vn(hn())};return window.addEventListener("react-os-shell:restore-windowed",e),()=>window.removeEventListener("react-os-shell:restore-windowed",e)},[Y,hn,fn]),j(()=>{t&&fn&&!Mn&&(pn[fn]=gn,wn()),t&&window.dispatchEvent(new CustomEvent("modal-geometry"))},[gn,t,fn,Mn]),j(()=>{if(!t)return;const e=()=>{Un.current?vn(dn()):document.body.classList.contains("rosh-gesturing")||vn(cr)};window.addEventListener("resize",e),window.addEventListener(o,e);let n=null;return qn&&(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,qn,dn]),j(()=>{if(t&&(Re(!1),Ke.current=!1,nt.current=!1,Gn(!Yn),!Dn.current)){if(fn&&pn[fn]){const e=pn[fn];return void vn(t=>cr({...e,...oe?{h:t.h}:{},...Yn?{x:t.x,w:t.w}:{}}))}M&&(vn({x:M.x,y:M.y,w:M.w,h:M.h}),Hn(M.maximized))}},[t]),j(()=>{if(!t||"auto"!==m)return;let e;const n=t=>{rt.current?.contains(t.target)&&!Ke.current&&(Ke.current=!0,e=setTimeout(()=>Re(!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 ir="auto"===m?We:!0===m,ar=He&&!gt?He.key:null,ur=G(()=>Ot(Le),[Le]),hr=F({shortcutSpec:qe,isOnDesktop:Ge,toggleDesktopShortcut:Je,taskbarStrings:Ae.taskbar});O(()=>{hr.current={shortcutSpec:qe,isOnDesktop:Ge,toggleDesktopShortcut:Je,taskbarStrings:Ae.taskbar}});const fr=F(null);fr.current||(fr.current={open:(e,t)=>je({x:e,y:t}),items:()=>{const e=hr.current,t=[];e.shortcutSpec&&t.push({label:e.isOnDesktop?e.taskbarStrings.removeFromDesktop:e.taskbarStrings.addToDesktop,onSelect:e.toggleDesktopShortcut});for(const e of rn[It]||[])t.push({label:e.label,icon:e.icon,onSelect:e.onClick});return t}}),j(()=>{if(t&&ar)return()=>{return e=ar,void(jt.delete(e)&&Bt());var e}},[t,ar]),Ve(!(ce||!t)&&ir);const wr=B(()=>ir||"auto"===m&&Ke.current,[ir,m]),yr=B(async e=>{if(nt.current)return!1;if(!wr())return!0;nt.current=!0;const t=Pe,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 y({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 nt.current=!1,r},[wr,Pe]),vr=B(()=>nt.current?Promise.resolve():wr()?yr("close").then(e=>{e&&i()}):(i(),Promise.resolve()),[wr,yr,i]),Sr=B(async()=>{await yr("discard")&&(Ke.current=!1,Re(!1),$t.current?.onDiscard())},[yr]),Lr=B(async()=>{const e=await yr("switch");return e&&(Ke.current=!1,Re(!1)),e},[yr]),Tr=F(()=>!1);O(()=>{Tr.current=wr}),O(()=>{if(!t||!ce)return;const e={holdsChanges:()=>Tr.current(),ask:Lr};return Xn.set(ce,e),()=>{Xn.get(ce)===e&&Xn.delete(ce)}},[t,ce,Lr]),O(()=>{if(!t||!bt)return;const e=e=>{e.detail?.windowKey===bt&&vr()};return window.addEventListener(Nr,e),()=>window.removeEventListener(Nr,e)},[t,bt,vr]);const Pr=F(null),Ir=B(e=>{if(0!==e.button)return;if(e.target.closest("button, input, a, kbd, select, textarea"))return;if(je(null),Qn(It),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=rt.current,s=a?.getBoundingClientRect();let l,c,u,d;if(Pr.current){const t=Pr.current;Pr.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:Bn.current.x,c=s?s.top:Bn.current.y,u=s?s.height:Bn.current.h,d=s?s.width:Bn.current.w;Hn(!1),vn(e=>({...e,x:l,y:c,w:d,h:u}));let h=null;const m=e=>{if(!r){if(Math.abs(e.clientX-o)<xr&&Math.abs(e.clientY-i)<xr)return;r=kr(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)`),Bn.current={...Bn.current,x:s,y:u},!Y){const t=function(e,t){const n=or(),r=e<=n.x+nr,o=e>=n.x+n.w-nr,i=t<=n.y+nr,a=t>=n.y+n.h-nr,s=e<=n.x+rr,l=e>=n.x+n.w-rr,c=t<=n.y+rr,u=t>=n.y+n.h-rr;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?mr(dr(t)):pr())}},p=()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",p),r?.(),pr();const e=cr({...Bn.current});if(Bn.current=e,!Y&&h){Pr.current={x:l,y:c,w:d,h:u};const e=dr(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 vn(e)}if(Y){const t=e.x+e.w/2,n=window.innerWidth/2;tt(t>n?"right":"left")}a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.transform="",a.style.transition=""),vn(e)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",p)},[]),Rr=B((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=rt.current,l=s?.getBoundingClientRect(),c=l?l.left:Bn.current.x,u=l?l.top:Bn.current.y,d=l?l.width:Bn.current.w,h=l?l.height:Bn.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;Hn(!1),vn({x:c,y:u,w:d,h:h}),Bn.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,Bn.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)<xr&&Math.abs(e.clientY-a)<xr)return;o=kr(n,r,br[t],"resize")}g=((e,t)=>{let n=c,r=u,o=d,i=h;if(f&&(o=Math.max(sr,d+e)),w&&(i=Math.max(lr,h+t)),m){const t=Math.max(sr,d-e);n=c+d-t,o=t}if(p){const e=Math.max(lr,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?.(),vn({...Bn.current})};window.addEventListener("pointermove",b),window.addEventListener("pointerup",x)},[]),Fr=B(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(),Qn(It),"Enter"===e.key)return void(qn?(Hn(!1),vn(hn())):(Hn(!0),vn(dn())));const[n,r]=t;if(e.ctrlKey||e.metaKey){const e=()=>{Pr.current||(Pr.current={...Bn.current})};if(r<0)return e(),Hn(!0),void vn(dn());if(r>0){if(qn)return Hn(!1),void vn(hn());if(Pr.current){const e=cr(Pr.current);return Pr.current=null,Bn.current=e,void vn(e)}return void er(It)}e(),Hn(!1);const t=dr(n<0?"left":"right");return Bn.current=t,void vn(t)}if(qn)return;const o=Bn.current,i=e.shiftKey?{...o,w:Math.max(sr,o.w+24*n),h:Math.max(lr,o.h+24*r)}:cr({...o,x:o.x+24*n,y:Math.max(0,o.y+24*r)});Bn.current=i,vn(i)},[It,qn,hn,dn]),jr=B(e=>{Pr.current||(Pr.current={...Bn.current}),Hn(!1);const t=dr(e);Bn.current=t,vn(t),Qn(It)},[It]),Br=zn||_t?{}:{tabIndex:0,role:"group","aria-label":Pe?`${Pe} — ${De.windowSuffix}`:De.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:Fr},Ur=()=>{Hn(!0),vn(dn())},Xr=B(()=>{const e=rt.current;if(!e)return;const t=e.querySelector("form");if(t)t.requestSubmit();else{const t=e.querySelector(Zt);t&&!t.disabled&&t.click()}},[]);j(()=>{if(!t)return;if(Y)return;const e=e=>{if(Tn[Tn.length-1]===It&&"Enter"===e.key){const t=e.target;if("TEXTAREA"===t.tagName||t.isContentEditable)return;if(e.metaKey||e.ctrlKey)e.preventDefault(),Xr();else{if("INPUT"===t.tagName&&t.closest("form"))return;if(!(t instanceof Element&&rt.current?.contains(t)))return;if(t.closest(Qt))return;e.preventDefault()}}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,Xr,It,Y]),j(()=>{if(!t)return;const e=e=>{Tn[Tn.length-1]===It&&((e.metaKey||e.ctrlKey)&&"s"===e.key?(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-save",{detail:{modalId:It}})),Ke.current=!1,Re(!1)):e.altKey&&e.shiftKey&&("KeyD"===e.code||"D"===e.key||"d"===e.key)&&(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-duplicate",{detail:{modalId:It}}))))};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t]),j(()=>{if(!t)return;if(Y)return;const e=e=>{if("Escape"===e.key&&Tn[Tn.length-1]===It){if(I(e))return e.preventDefault(),void e.stopPropagation();if(Mn&&!D)return;e.preventDefault(),e.stopPropagation(),vr()}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,vr,It,Y,Mn,D]);const Yr=t&&(void 0!==p||void 0!==f),[Vr]=q(()=>{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}),Gr=Mn&&!He?.home&&ur.actions.length>0;j(()=>{t&&ar&&function(e,t){const n=jt.get(e);n&&n.title===t.title&&n.dirty===t.dirty&&n.copy===t.copy&&n.actions===t.actions&&n.menu===t.menu||(jt.set(e,t),Bt())}(ar,{title:ur.text||Pe,dirty:ir,copy:ur.copy,actions:Gr&&Vr?Vr:void 0,menu:fr.current??void 0})},[t,ar,Pe,ir,ur.text,ur.copy,Gr,Vr]);const _r=B(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(j(()=>{if(!t)return;const e=e=>{if(Tn[Tn.length-1]!==It)return;const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.target.isContentEditable||("j"===e.key&&Yr&&(e.preventDefault(),p?p():_r("bottom")),"k"===e.key&&Yr&&(e.preventDefault(),f?f():_r("top"))))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,p,f,Yr,_r,It]),!t||mn.current)return null;const Jr=_t?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=or(),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}}(It):null,Zr=_t&&Jr?Math.min(Jr.w/gn.w,Jr.h/gn.h):1,Qr=(()=>{if(_t&&Jr){const e=Zr,t=gn.w*e,n=gn.h*e,r=Jr.x+(Jr.w-t)/2-gn.x,o=Jr.y+(Jr.h-n)/2-gn.y,i=Jt||nn;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:P.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(on&&Yt){const e="picked"===sn;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:P.expose+30}:{}}}return null})(),eo=b({modal:!1,titleId:!Y&&(Mn?!He?.home:!fe)?Ie:void 0,label:ur.text||Pe}),to=/* @__PURE__ */Q("div",{children:[
50
50
  /* @__PURE__ */Q("div",{ref:rt,"data-modal-panel":!0,"data-modal-id":It,"data-window-key":ce||void 0,...$?{"data-utility":""}:{},...$e?{"data-pinned-top":""}:{},...Y?{"data-widget":""}:{},...He?{"data-window-owner":He.key}:{},...He&&!gt?{"data-window-root":""}:{},...Mn?{"data-window-tab":""}:{},...eo,className:Mn?"fixed flex flex-col overflow-hidden":"fixed rounded-(--radius-window) flex flex-col overflow-hidden "+(Y?Kt?"shadow-xl":"shadow-lg":"border "+(Kt?"shadow-xl border-line":"shadow-lg border-line-strong")),onMouseDownCapture:e=>{if(ot.current=!1,_t){if(e.target.closest("[data-expose-close]"))return;return e.preventDefault(),e.stopPropagation(),Or(It),Dr(!1),void Qn(It)}if(!Kt&&!Y&&!$e&&0===e.button){const t=e.target;t.closest("[data-modal-panel]")===rt.current&&t.closest("button, input, a, select, textarea")&&!t.closest("[data-window-chrome]")&&(e.preventDefault(),e.stopPropagation(),ot.current=!0,je(null),Qn(It),window.addEventListener("mouseup",()=>{setTimeout(()=>{ot.current=!1},0)},{once:!0}))}},onClickCapture:e=>{ot.current&&(ot.current=!1,e.preventDefault(),e.stopPropagation())},onMouseDown:e=>{if(_t)return;je(null);e.target.closest("[data-modal-panel]")===rt.current&&(e.target.closest("button, input, a, select, textarea")||Qn(It))},style:fe?{zIndex:Wt+1,top:0,left:0,right:0,bottom:"var(--mobile-bottom-nav, 56px)",width:"auto",height:"auto",transform:`translateX(${ge}px)`,transition:be?"none":"transform 180ms ease-out",...Y?{display:"none"}:{},...Wt<0?{display:"none"}:{},...Kt||$e||Ce&&ce===Ce?{}:{display:"none"}}:{zIndex:$e?P.pinnedWindow:Wt+1,width:gn.w,height:gn.h,top:gn.y,...Y&&"right"===et?{right:window.innerWidth-gn.x-gn.w}:{left:gn.x},...Wt<0&&!$e?{display:"none"}:{},...ye?{display:"none"}:{},...Wn||Fn?{visibility:"hidden",pointerEvents:"none"}:{},...Qr??{}},children:[fe&&!Y&&/* @__PURE__ */ee("div",{onPointerDown:Me,className:"absolute top-0 bottom-0 left-0 w-[22px] z-[5]",style:{touchAction:"pan-y"},"aria-hidden":"true"}),Y?null:Mn?He?.home?null:/* @__PURE__ */Q(te,{children:[
51
51
  /* @__PURE__ */ee("h2",{id:Ie,"data-window-title":!0,className:"sr-only",children:ur.text||Pe}),Gr&&Vr&&ne(
52
52
  /* @__PURE__ */ee(te,{children:ur.actions}),Vr),ur.badges.length>0&&/* @__PURE__ */ee("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:ur.badges})]}):fe?null:
@@ -62,7 +62,7 @@ return Q("span",{className:"relative inline-flex",onMouseEnter:c,onMouseLeave:u,
62
62
  /* @__PURE__ */ee("span",{id:Ie,className:"truncate",children:_t?en(Le):Le})]}),!_t&&/* @__PURE__ */Q("div",{className:"flex items-center gap-3 shrink-0 ml-4",children:[$&&/* @__PURE__ */ee("button",{onClick:()=>Oe(e=>!e),title:$e?De.unpin:De.pinOnTop,className:"text-xs px-2 py-1 rounded hover:bg-gray-200 "+($e?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */ee(A,{name:"bookmark-square",className:"h-3.5 w-3.5",fill:$e?"currentColor":"none",strokeWidth:1.5})}),
63
63
  /* @__PURE__ */ee("button",{onClick:()=>er(It),title:De.minimize,className:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",children:"─"}),!zn&&/* @__PURE__ */ee(gr,{maximized:qn,onToggleMax:()=>{qn?(Hn(!1),vn(hn())):Ur()},onSnap:jr,buttonClassName:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",strings:De}),
64
64
  /* @__PURE__ */ee("button",{type:"button",onClick:vr,"aria-label":De.close,className:"rounded-(--radius-control) text-ink-faintest hover:text-gray-600",children:/* @__PURE__ */ee(A,{name:"close",className:"h-5 w-5"})})]})]}),de&&Xe&&!Y&&!fe&&/* @__PURE__ */ee("div",{"aria-hidden":"true",className:"h-[3px] shrink-0 pointer-events-none",style:{backgroundColor:`rgb(var(--window-accent-rgb) / ${Kt?.9:.55})`}}),
65
- /* @__PURE__ */ee(Vt.Provider,{value:It,children:/* @__PURE__ */ee(ln.Provider,{value:{rightRef:at,leftRef:st,notify:()=>ct(!0),active:Kt,isDirty:ir,footerOpen:wt&&!Y&&!J&&!Z&&!fe},children:/* @__PURE__ */ee("div",{ref:it,...Y?{onPointerDown:Ir,onContextMenu:e=>{e.preventDefault(),Qe({x:e.clientX,y:e.clientY})}}:{},className:`flex-1 min-h-0 flex flex-col ${Y?"p-0 cursor-move":Z||re?"p-0":J?"p-2":"p-4"} ${Y||Mn?"":"backdrop-blur-sm"} ${!1===g||Z||re?"overflow-hidden":"overflow-y-auto overscroll-contain"} ${Y?"rounded-2xl select-none":""}`,style:{...Y?{touchAction:"none"}:{},backgroundColor:Y?"transparent":Mn?"rgb(var(--window-content-rgb))":Kt?"rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))":"rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))"},children:/* @__PURE__ */ee(Ne,{children:he})})})}),Y&&Ze&&/* @__PURE__ */Q(C,{minWidth:160,style:{left:Ze.x,top:Ze.y},onClose:()=>Qe(null),children:[
65
+ /* @__PURE__ */ee(Vt.Provider,{value:It,children:/* @__PURE__ */ee(ln.Provider,{value:{rightRef:at,leftRef:st,notify:()=>ct(!0),active:Kt,isDirty:ir,footerOpen:wt&&!Y&&!J&&!Z&&!fe},children:/* @__PURE__ */ee("div",{ref:it,...Y?{onPointerDown:Ir,onContextMenu:e=>{e.preventDefault(),Qe({x:e.clientX,y:e.clientY})}}:{},className:`flex-1 min-h-0 flex flex-col ${Y?"p-0 cursor-move":Z||re?"p-0":J?"p-2":"p-4"} ${Y||Mn?"":"backdrop-blur-sm"} ${!1===v||Z||re?"overflow-hidden":"overflow-y-auto overscroll-contain"} ${Y?"rounded-2xl select-none":""}`,style:{...Y?{touchAction:"none"}:{},backgroundColor:Y?"transparent":Mn?"rgb(var(--window-content-rgb))":Kt?"rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))":"rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))"},children:/* @__PURE__ */ee(Ne,{children:he})})})}),Y&&Ze&&/* @__PURE__ */Q(C,{minWidth:160,style:{left:Ze.x,top:Ze.y},onClose:()=>Qe(null),children:[
66
66
  /* @__PURE__ */ee(N,{onClick:()=>{Qe(null),window.dispatchEvent(new CustomEvent("widget-open-settings",{detail:It}))},children:"Settings"}),
67
67
  /* @__PURE__ */ee(S,{}),se&&/* @__PURE__ */Q(te,{children:[se,
68
68
  /* @__PURE__ */ee(S,{})]}),
@@ -1 +1 @@
1
- export{ListLoadError as default}from"../chunk-PUCPFBYO.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
1
+ export{ListLoadError as default}from"../chunk-PUCPFBYO.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1 +1 @@
1
- export{slugify}from"../chunk-24AL3CDS.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{contrastRatio,hexToRgb,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";
1
+ export{slugify}from"../chunk-24AL3CDS.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{contrastRatio,hexToRgb,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{BORDER_LINE_STYLES,borderSides,borderStartEach,BorderInput as default}from"../chunk-IKQVK3I3.js";import"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";import"../chunk-ME4VRJMK.js";import"../chunk-7JGR7WPD.js";import"../chunk-6TCJOVFX.js";import"../chunk-L65BESIE.js";import"../chunk-S6OB6HJB.js";import"../chunk-AYZY3YNC.js";import"../chunk-RUTUVS4H.js";import"../chunk-CDAJKLGL.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{BORDER_LINE_STYLES,borderSides,borderStartEach,BorderInput as default}from"../chunk-QTQQKQGQ.js";import"../chunk-UTQG344L.js";import"../chunk-7JGR7WPD.js";import"../chunk-PA37I5ZX.js";import"../chunk-2NMW66P5.js";import"../chunk-S6OB6HJB.js";import"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";import"../chunk-RUTUVS4H.js";import"../chunk-AYZY3YNC.js";import"../chunk-CDAJKLGL.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{BrandAssetEditor as default}from"../chunk-2TQ6BLSN.js";import"../chunk-TIUFFVP5.js";import"../chunk-QSW3YHPK.js";import"../chunk-6KBDNYRW.js";import"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-7BDZZANS.js";import"../chunk-EQN65XOO.js";import"../chunk-P6LB3I3D.js";import"../chunk-LNARMEEZ.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{BrandAssetEditor as default}from"../chunk-IU5KBQEQ.js";import"../chunk-RBXSU25O.js";import"../chunk-6KBDNYRW.js";import"../chunk-QSW3YHPK.js";import"../chunk-25RR3GQW.js";import"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";import"../chunk-MI67DI3H.js";import"../chunk-7BDZZANS.js";import"../chunk-EQN65XOO.js";import"../chunk-P6LB3I3D.js";import"../chunk-LNARMEEZ.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{ColorPickerPanel,ColorSwatch,HexInput,NO_COLOR_FILL,clampOpacity,colorFill,colorSwatchClasses,ColorPicker as default,stepHue,stepOpacity,stepSquare}from"../chunk-ME4VRJMK.js";import"../chunk-7JGR7WPD.js";import"../chunk-6TCJOVFX.js";import"../chunk-L65BESIE.js";import"../chunk-S6OB6HJB.js";import"../chunk-AYZY3YNC.js";import"../chunk-RUTUVS4H.js";import"../chunk-CDAJKLGL.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{ColorPickerPanel,ColorSwatch,HexInput,NO_COLOR_FILL,clampOpacity,colorFill,colorSwatchClasses,ColorPicker as default,stepHue,stepOpacity,stepSquare}from"../chunk-UTQG344L.js";import"../chunk-7JGR7WPD.js";import"../chunk-PA37I5ZX.js";import"../chunk-2NMW66P5.js";import"../chunk-S6OB6HJB.js";import"../chunk-RUTUVS4H.js";import"../chunk-AYZY3YNC.js";import"../chunk-CDAJKLGL.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{AttachButton,AttachmentDropZone,AttachmentList,PaperclipGlyph,ComposerAttachments as default}from"../chunk-MRUJRFIX.js";import"../chunk-7BDZZANS.js";import"../chunk-EQN65XOO.js";import"../chunk-RUTUVS4H.js";import"../chunk-P6LB3I3D.js";import"../chunk-LNARMEEZ.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{AttachButton,AttachmentDropZone,AttachmentList,PaperclipGlyph,ComposerAttachments as default}from"../chunk-AJ3R5QPD.js";import"../chunk-RUTUVS4H.js";import"../chunk-7BDZZANS.js";import"../chunk-EQN65XOO.js";import"../chunk-P6LB3I3D.js";import"../chunk-LNARMEEZ.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{CornersInput as default}from"../chunk-UX5L3MOB.js";import"../chunk-6TCJOVFX.js";import"../chunk-L65BESIE.js";import"../chunk-AYZY3YNC.js";import"../chunk-RUTUVS4H.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{CornersInput as default}from"../chunk-6I6VSUKY.js";import"../chunk-PA37I5ZX.js";import"../chunk-2NMW66P5.js";import"../chunk-RUTUVS4H.js";import"../chunk-AYZY3YNC.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{DisplayChips as default}from"../chunk-D46AP6U5.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{DisplayChips as default}from"../chunk-T5V2GJ4D.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{IconPicker as default}from"../chunk-XILZGSMX.js";import"../chunk-7JGR7WPD.js";import"../chunk-RUTUVS4H.js";import"../chunk-CDAJKLGL.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{IconPicker as default}from"../chunk-XILZGSMX.js";import"../chunk-7JGR7WPD.js";import"../chunk-RUTUVS4H.js";import"../chunk-CDAJKLGL.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{InputNumber_default as default}from"../chunk-6TCJOVFX.js";import"../chunk-L65BESIE.js";import"../chunk-AYZY3YNC.js";import"../chunk-RUTUVS4H.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{InputNumber_default as default}from"../chunk-PA37I5ZX.js";import"../chunk-2NMW66P5.js";import"../chunk-RUTUVS4H.js";import"../chunk-AYZY3YNC.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{TextLinkField,LinkPicker as default}from"../chunk-C45OKLRM.js";import"../chunk-RYS3URDC.js";import"../chunk-EQKUFYX6.js";import"../chunk-UXPZQID4.js";import"../chunk-EO5RLFRX.js";import"../chunk-5F7HMNCX.js";import"../chunk-L65BESIE.js";import"../chunk-UJUTS6LJ.js";import"../chunk-PJPK2ADX.js";import"../chunk-MAMWQCJ6.js";import"../chunk-AYZY3YNC.js";import"../chunk-UGTRSRIW.js";import"../chunk-URHGHXDN.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{TextLinkField,LinkPicker as default}from"../chunk-UZ43AT4O.js";import"../chunk-RYS3URDC.js";import"../chunk-EQKUFYX6.js";import"../chunk-7YU27U3Y.js";import"../chunk-EO5RLFRX.js";import"../chunk-5F7HMNCX.js";import"../chunk-2NMW66P5.js";import"../chunk-UJUTS6LJ.js";import"../chunk-PJPK2ADX.js";import"../chunk-MAMWQCJ6.js";import"../chunk-AYZY3YNC.js";import"../chunk-UGTRSRIW.js";import"../chunk-URHGHXDN.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -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-EXJZUNNW.js";import"../chunk-ZMVCN4OA.js";import"../chunk-YJSX6JAC.js";import"../chunk-IC72MGON.js";import"../chunk-FTWWJHFX.js";import"../chunk-XSJJPACH.js";import"../chunk-CGUMJZUB.js";import"../chunk-SACUSHVN.js";import"../chunk-VG5NGCMQ.js";import"../chunk-GKZUAT3K.js";import"../chunk-YFUMK2E7.js";import"../chunk-B7AHMB3U.js";import"../chunk-VC42SDAC.js";import"../chunk-VVZE27M4.js";import"../chunk-C6MV6IAX.js";import"../chunk-TXMAWCR7.js";import"../chunk-UXPZQID4.js";import"../chunk-EO5RLFRX.js";import"../chunk-5F7HMNCX.js";import"../chunk-6KBDNYRW.js";import"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";import"../chunk-L65BESIE.js";import"../chunk-VLKDWKVR.js";import"../chunk-OLFYNMTD.js";import"../chunk-LACL4MAR.js";import"../chunk-CGZBDI6C.js";import"../chunk-NU2YQSOP.js";import"../chunk-66JYKX4T.js";import"../chunk-JWX7QRGE.js";import"../chunk-MAMWQCJ6.js";import"../chunk-AYZY3YNC.js";import"../chunk-7BDZZANS.js";import"../chunk-EQN65XOO.js";import"../chunk-RUTUVS4H.js";import"../chunk-P6LB3I3D.js";import"../chunk-GMRZX2ET.js";import"../chunk-4AJRHTTB.js";import"../chunk-VWGWZY7A.js";import"../chunk-PKXQDCNR.js";import"../chunk-OQW42DOR.js";import"../chunk-DXHLUB36.js";import"../chunk-UGTRSRIW.js";import"../chunk-CDAJKLGL.js";import"../chunk-HAFB45DT.js";import"../chunk-5QFPTDQF.js";import"../chunk-URHGHXDN.js";import"../chunk-LNARMEEZ.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.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-5CH2RGL6.js";import"../chunk-ZMVCN4OA.js";import"../chunk-YJSX6JAC.js";import"../chunk-IC72MGON.js";import"../chunk-FTWWJHFX.js";import"../chunk-XSJJPACH.js";import"../chunk-CGUMJZUB.js";import"../chunk-SACUSHVN.js";import"../chunk-VG5NGCMQ.js";import"../chunk-GKZUAT3K.js";import"../chunk-VLKDWKVR.js";import"../chunk-OLFYNMTD.js";import"../chunk-LACL4MAR.js";import"../chunk-YFUMK2E7.js";import"../chunk-B7AHMB3U.js";import"../chunk-VC42SDAC.js";import"../chunk-PVR4KU7H.js";import"../chunk-7YU27U3Y.js";import"../chunk-EO5RLFRX.js";import"../chunk-5F7HMNCX.js";import"../chunk-C6MV6IAX.js";import"../chunk-TXMAWCR7.js";import"../chunk-2NMW66P5.js";import"../chunk-6KBDNYRW.js";import"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";import"../chunk-CGZBDI6C.js";import"../chunk-IQWIYZB5.js";import"../chunk-66JYKX4T.js";import"../chunk-XS4HFUTW.js";import"../chunk-MAMWQCJ6.js";import"../chunk-RUTUVS4H.js";import"../chunk-AYZY3YNC.js";import"../chunk-7BDZZANS.js";import"../chunk-EQN65XOO.js";import"../chunk-P6LB3I3D.js";import"../chunk-GMRZX2ET.js";import"../chunk-4AJRHTTB.js";import"../chunk-VWGWZY7A.js";import"../chunk-PKXQDCNR.js";import"../chunk-OQW42DOR.js";import"../chunk-UGTRSRIW.js";import"../chunk-DXHLUB36.js";import"../chunk-CDAJKLGL.js";import"../chunk-FPGRKHUW.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-LNARMEEZ.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{MediaUploadField as default}from"../chunk-TIUFFVP5.js";import"../chunk-QSW3YHPK.js";import"../chunk-6KBDNYRW.js";import"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";import"../chunk-25RR3GQW.js";export{mediaFileName}from"../chunk-7BDZZANS.js";import"../chunk-EQN65XOO.js";import"../chunk-P6LB3I3D.js";import"../chunk-LNARMEEZ.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{MediaUploadField as default}from"../chunk-RBXSU25O.js";import"../chunk-6KBDNYRW.js";import"../chunk-QSW3YHPK.js";import"../chunk-25RR3GQW.js";import"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";export{mediaFileName}from"../chunk-7BDZZANS.js";import"../chunk-EQN65XOO.js";import"../chunk-P6LB3I3D.js";import"../chunk-LNARMEEZ.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{MediaUsedInList as default}from"../chunk-TXMAWCR7.js";import"../chunk-DXHLUB36.js";import"../chunk-LNARMEEZ.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{MediaUsedInList as default}from"../chunk-TXMAWCR7.js";import"../chunk-DXHLUB36.js";import"../chunk-LNARMEEZ.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{PositionInput as default}from"../chunk-GXGBBMGV.js";import"../chunk-6TCJOVFX.js";import"../chunk-L65BESIE.js";import"../chunk-AYZY3YNC.js";import"../chunk-RUTUVS4H.js";import"../chunk-UQYNPYF4.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{PositionInput as default}from"../chunk-BFVL2VTS.js";import"../chunk-PA37I5ZX.js";import"../chunk-2NMW66P5.js";import"../chunk-RUTUVS4H.js";import"../chunk-AYZY3YNC.js";import"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -119,12 +119,6 @@ interface SelectBaseProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>,
119
119
  *
120
120
  * Only `Select` reads it. `NativeSelect` and `ListboxSelect` accept it and
121
121
  * ignore it, so it never reaches the DOM as an unknown attribute.
122
- *
123
- * In a compact `SettingRow` (an editor panel) the default is the row's own
124
- * rung — `size`, else `md` — not `touch`: the row is one line of controls,
125
- * and its number boxes are 32px on every pointer. A 56px select there stood
126
- * taller than its row and dropped under its name in a 320px panel (the
127
- * three-views mockup, 2026-10-23). A `touchSize` passed here still wins.
128
122
  */
129
123
  touchSize?: InputSize;
130
124
  /** Options, and groups of options under a heading (`SelectOptionGroup`). */
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{NativeSelect,Select_default as default}from"../chunk-UXPZQID4.js";import"../chunk-EO5RLFRX.js";import"../chunk-5F7HMNCX.js";import"../chunk-L65BESIE.js";import"../chunk-AYZY3YNC.js";import"../chunk-UGTRSRIW.js";import"../chunk-URHGHXDN.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{NativeSelect,Select_default as default}from"../chunk-7YU27U3Y.js";import"../chunk-EO5RLFRX.js";import"../chunk-5F7HMNCX.js";import"../chunk-2NMW66P5.js";import"../chunk-AYZY3YNC.js";import"../chunk-UGTRSRIW.js";import"../chunk-URHGHXDN.js";import"../chunk-FSPFV4MI.js";import"../chunk-J75ZT2JQ.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";