@sheetxl/react 0.7.23-beta.1 → 0.7.23-beta.2

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.
@@ -23,7 +23,7 @@ The formatting is not applied.`,groupLabels:{pasteOptions:`Values`},icon:`PasteV
23
23
 
24
24
  The content is not applied.`,groupLabels:{pasteOptions:`Formatting`},icon:`PasteFormats`},pasteFormulas:{label:`Paste Formulas`,description:`Paste only the formulas of the selected cells. The values and formatting is not applied.`,groupLabels:{pasteOptions:`Formulas`},icon:`PasteFormulas`},pasteTranspose:{label:`Paste Transpose`,description:`Paste with the rows and columns flipped.`,groupLabels:{pasteOptions:`Transpose`},icon:`PasteTranspose`},pasteLinks:{label:`Paste Links`,description:`Paste as formula references to the original cells.`,groupLabels:{pasteOptions:`Links`},icon:`PasteLinks`},undo:{label:`Undo`,icon:`Undo`,shortcut:`ctrl+z`,borrow:[`workbook`],description:`{hasAction, select, true{Undo {action}} other{Undo the last action.}}`,params:{hasAction:!1,action:``}},redo:{label:`Redo`,icon:`Redo`,shortcut:[`ctrl+y`,`F4`,`alt+Enter`],borrow:[`workbook`],description:`{hasAction, select, true{Redo {action}} other{Repeat the last action or undo the redo.}}`,params:{hasAction:!1,action:``}}}}},{sourceId:`table`,catalog:{scope:`table`,label:`Table`,tag:`en`,version:1,commands:{tableStyleOptions:{label:`Table Style Options`,description:`Toggle which structural elements (header, total, banded rows/columns, filter) the table shows.`},tableTotalRowToggle:{label:`Toggle Table Total Row`,description:`Toggle Total Row on/off.`,groupLabels:{tableStyleOptions:`Total Row`},shortcut:`ctrl+alt+T`},tableHeaderRowToggle:{label:`Toggle Table Header Row`,description:`Toggle Header Row on/off.`,groupLabels:{tableStyleOptions:`Header Row`}},tableBandedRowsToggle:{label:`Toggle Table Banded Rows`,description:`Toggle Banded Rows on/off.`,groupLabels:{tableStyleOptions:`Banded Rows`}},tableFirstColumnToggle:{label:`Toggle Table First Column`,description:`Toggle First Column on/off.`,groupLabels:{tableStyleOptions:`First Column`}},tableLastColumnToggle:{label:`Toggle Table Last Column`,description:`Toggle Last Column on/off.`,groupLabels:{tableStyleOptions:`Last Column`}},tableBandedColumnsToggle:{label:`Toggle Table Banded Columns`,description:`Toggle Banded Columns on/off.`,groupLabels:{tableStyleOptions:`Banded Columns`}},tableFilterRefresh:{label:`Reapply Sort & Filter`,description:`Reapply the sort and filter with the latest changes.`,groupLabels:{filterOptions:`Reapply`,sortFilterOptions:`Reapply`},icon:`FilterReapply`,shortcut:`ctrl+alt+L`},tableFilterClear:{label:`Clear Sort & Filter`,description:`Clear the sort and filters criteria from the current area..`,groupLabels:{filterOptions:`Clear`,sortFilterOptions:`Clear`},icon:`FilterClear`},formatTableStyleClearTableStyle:{label:`Clear Table Style`,description:`Remove all the styling that is specific for the table.`,groupLabels:{tableStyleOptions:`Clear Style`},icon:`ClearFormats`}}}},{sourceId:`workbook`,catalog:{scope:`workbook`,label:`Workbook`,tag:`en`,version:1,commands:{addSheet:{label:`Insert Sheet`,description:`Insert sheet before the current sheet.`,groupLabels:{sheet:`Insert`},shortcut:[`shift+F11`,`shift+alt+F1`]},deleteSheet:{label:`Delete Sheet`,description:`Delete the sheet and all the data.`,groupLabels:{sheet:`Delete`}},duplicateSheet:{label:`Duplicate Sheet`,description:`Duplicate the current sheet.`,groupLabels:{sheet:`Duplicate`}},hideSheet:{label:`Hide Sheet`,description:`Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs.`,groupLabels:{sheet:`Hide`},icon:`VisibilityOff`},nextSheet:{label:`Next Sheet`,description:`Activate the next sheet.`,groupLabels:{sheet:`Next`},shortcut:`ctrl+PageDown`},previousSheet:{label:`Previous Sheet`,description:`Activate the previous sheet.`,groupLabels:{sheet:`Previous`},shortcut:`ctrl+PageUp`},selectNextSheet:{label:`Select Next Sheet`,description:`Select the next sheet.`,groupLabels:{sheet:`Select Next`},shortcut:`ctrl+shift+PageDown`},selectPreviousSheet:{label:`Select Previous Sheet`,description:`Select the previous sheet.`,groupLabels:{sheet:`Select Previous`},shortcut:`ctrl+shift+PageUp`},workbookViewToggleShowFormulaBar:{label:`View Formula bar`,description:`Show or hide the formula bar.`,groupLabels:{view:`Formula Bar`}},workbookViewToggleShowTabs:{label:`View Sheet Tabs`,description:`Show or hide the sheet tabs.`,groupLabels:{view:`Sheet Tabs`}},workbookViewToggleShowStatusBar:{label:`View Status Bar`,description:`Show or hide the status bar.`,groupLabels:{view:`Status Bar`}},workbookViewToggleShowHorizontalScrollBar:{label:`View Horizontal Scrollbar`,description:`Show or hide the horizontal scrollbar.`,groupLabels:{view:`Horizontal Scrollbar`}},workbookViewToggleShowVerticalScrollBar:{label:`View Vertical Scrollbar`,description:`Show or hide the vertical scrollbar.`,groupLabels:{view:`Vertical Scrollbar`}},workbookViewToggleExpandFormulaBar:{label:`Toggle Expand Formula bar`,description:`Expand or collapse the formula bar.`,shortcut:`ctrl+shift+U`},locale:{label:`Regional Format`,description:`The regional format used for numbers and dates. This is saved with the workbook.`,icon:`Locale`},newCellStyle:{label:`New Cell Style…`,description:`Create a new named style can can be quickly used later.`,groupLabels:{cellStyle:`New Cell Style`},icon:`NewPresetStyles`},deleteCellStyle:{label:`Delete Cell Style`,description:`Remove a named style that is no longer needed.`,groupLabels:{cellStyle:`Delete`}},modifyCellStyle:{label:`Modify Cell Style`,description:`Update a style with the currently style.`,groupLabels:{cellStyle:`Modify`}},find:{label:`Find`,description:`Open the Find window.`,icon:`Find`,shortcut:[`ctrl+F`,`shift+F5`]},findReplace:{label:`Find & Replace`,description:`Open the Find & Replace window.`,icon:`FindReplace`,shortcut:[`ctrl+H`,`ctrl+alt+H`]},findNext:{label:`Find Next`,description:`Find the next match of the last search, without opening the Find window.`,icon:`Find`,shortcut:`shift+F4`},findPrevious:{label:`Find Previous`,description:`Find the previous match of the last search, without opening the Find window.`,icon:`Find`,shortcut:`ctrl+shift+F4`},goto:{label:`Go To`,description:`Open the 'Go To' window.`,icon:`GoTo`,shortcut:`ctrl+G`},selectNamed:{label:`Select Named`,description:`Select the named item.`},addNamedReference:{label:`Define Named Reference`,description:`Add a new named reference. Names can be used as a substitute for cell references.`,groupLabels:{namedItem:`Define Name…`},icon:`InsertNamedRange`},editNamedReference:{label:`Edit Named Reference…`,description:`Add a new named reference. Names can be used as a substitute for cell references.`,groupLabels:{namedItem:`Edit…`},icon:`NamedRangeEdit`},deleteNamedReference:{label:`Delete Named Reference`,description:`Remove the named reference.`,groupLabels:{namedItem:`Delete`},icon:`DeleteNamedRange`},insertFunction:{label:`Insert Function`,description:`Insert a function into the current cell.`,icon:`FunctionThin`},selectTheme:{label:`Theme`,description:`Select a theme that coveys a style suitable for your data.`},calculateAll:{label:`Calculate Now`,description:`Recalculate the formulas whose values are out of date, on every sheet.`,icon:`Calculate`,shortcut:`F9`},calculateFull:{label:`Calculate Full`,description:`Recalculate every formula in the workbook, including those already up to date. Use this to replace the values a file was opened with.`,icon:`Calculate`,shortcut:`ctrl+alt+F9`},selectDirectPrecedents:{label:`Select Direct Precedents`,description:`Select the cells directly referenced by the formulas in the selection.`,shortcut:`ctrl+[`},selectPrecedents:{label:`Select All Precedents`,description:`Select all cells that contribute to the formulas in the selection, following the entire calculation chain.`,shortcut:`ctrl+shift+{`},selectDirectDependents:{label:`Select Direct Dependents`,description:`Select the cells with formulas that directly reference the selection.`,shortcut:`ctrl+]`},selectDependents:{label:`Select All Dependents`,description:`Select all cells that are eventually affected by the selection, following the entire calculation chain.`,shortcut:`ctrl+shift+}`},maximumWorkbookToggle:{label:`Maximize`,description:`Toggle showing the workbook maximized.`,shortcut:`ctrl+F10`},activeNameBox:{label:`Activate Name Box`,description:`Move the focus to the name box.`,shortcut:`alt+F3`},activeNameManager:{label:`Name Manager`,description:`Create, edit, delete, and find all the names used in the workbook.
25
25
 
26
- Names can be used as a substitute for cell references.`,shortcut:`ctrl+F3`,icon:`NamedManager`},createNamedReferenceFromSelection:{label:`Create from Selection`,description:`Automatically generate names from the selected cells.`,shortcut:`ctrl+shift+F3`},spellCheck:{label:`Spell Check`,description:`Check the workbook for spelling mistakes.`,shortcut:`F7`},workbookStatistics:{label:`Workbook Statistics`,description:`Show the workbook statistics.`,shortcut:`ctrl+shift+G`},showFormat:{label:`Show Format`,description:`Open the format pane.`,shortcut:`ctrl+shift+F`}}}}],{DefaultCommandCatalogService:Rr}=s.Command,zr=!1;function Br(){zr||(zr=!0,Rr.registerFromManifest(`@sheetxl/react`,{}.url,{messages:Ir,catalogs:Lr}))}Br();var{CommandScope:Vr,DefaultCommandRegistry:Hr,FocusActivation:Ur,CommandRegistryContext:Wr,CommandScopeContext:Gr,CommandAnchorProvider:Kr,CommandFallbackProvider:qr,useCommandScope:Jr}=s.Command,Yr=({initialAnchor:e,children:t})=>Jr()?(0,i.jsx)(i.Fragment,{children:t}):(0,i.jsx)(Xr,{initialAnchor:e,children:t});Yr.displayName=`CommandRootProvider`;var Xr=({initialAnchor:e,children:t})=>{let n=(0,r.useRef)(e),{root:a,registry:o,studioTracker:s}=(0,r.useMemo)(()=>{let e=Hr,t=new Vr(`app`,null,{registry:e});return{root:t,registry:e,studioTracker:new Ur(t,n.current)}},[]);return(0,r.useEffect)(()=>(a.connect(),()=>a.dispose()),[a]),(0,i.jsx)(Wr.Provider,{value:o,children:(0,i.jsx)(kr.Provider,{value:s,children:(0,i.jsx)(Gr.Provider,{value:a,children:(0,i.jsxs)(Kr,{tracker:s,keyBindings:`synthetic`,debounce:100,children:[(0,i.jsx)(Or,{}),(0,i.jsx)(qr,{children:t})]})})})})};Xr.displayName=`CommandRootProviderOwn`;var Zr=`workbookToolbars`,Qr={key:`tableStyleOptions`,showLabel:!0,members:[`tableHeaderRowToggle`,`tableTotalRowToggle`,`tableBandedRowsToggle`,`tableFirstColumnToggle`,`tableLastColumnToggle`,`tableBandedColumnsToggle`,`tableFilterToggle`]},$r={key:`tableToolbar`,contributions:{[Zr]:{order:1}},members:[`editTable`,`-`,`tableStyleOptions`,`-`,`sortOptions`,`filterOptions`,`-`,`dataRemoveDuplicates`,{key:`convertTableToRange`,showLabel:!0},`-`,`formatTableStyle`]},ei=0,ti=()=>{ei>0&&--ei===0&&(s.Command.DefaultCommandButtonRegistry.get(`tableToolbar`)&&s.Command.DefaultCommandButtonRegistry.unregister(`tableToolbar`),s.Command.DefaultCommandButtonRegistry.get(`tableStyleOptions`)&&s.Command.DefaultCommandButtonRegistry.unregister(`tableStyleOptions`))},ni=(e,t)=>e?[t]:[];function ri(e,n){let r=n.sheet;if(!r)return()=>{};let i=n.notifier,o=()=>{let e=r.getSelectedRanges();if(e.getCount()!==1)return null;let t=e.at(0).getCoords();for(let e of r.getTables().getItems()){let n=e.getRange().getCoords();if(t.rowStart>=n.rowStart&&t.rowEnd<=n.rowEnd&&t.colStart>=n.colStart&&t.colEnd<=n.colEnd)return e}return null},c=e=>{let t=e.getDataRange().getCoords(),n=r.getSelectedRange().getCoords(),i=Math.min(Math.max(n.rowStart,t.rowStart),t.rowEnd),a=Math.min(Math.max(n.rowEnd,t.rowStart),t.rowEnd);return{index:i-t.rowStart,count:a-i+1,valid:n.rowStart>=t.rowStart&&n.rowEnd<=t.rowEnd}},l=e=>{let t=e.getRange().getCoords(),n=r.getSelectedRange().getCoords(),i=Math.min(Math.max(n.colStart,t.colStart),t.colEnd),a=Math.min(Math.max(n.colEnd,t.colStart),t.colEnd);return{index:i-t.colStart,count:a-i+1}},u=e=>()=>{let t=o(),n=t?c(t):null;return(0,a.t)(e,{count:n?.valid?n.count:1})},d=e=>()=>{let t=o();return(0,a.t)(e,{count:t?l(t).count:1})},f=()=>{let e=o();e&&c(e).valid&&r.getSelectedRange().insert({axis:t.IRange.Axis.Row,span:!0})},p=()=>{let e=o();e&&c(e).valid&&r.getSelectedRange().delete({axis:t.IRange.Axis.Row,span:!0})},m=()=>{o()&&r.getSelectedRange().insert({axis:t.IRange.Axis.Column,span:!0})},h=()=>{o()&&r.getSelectedRange().delete({axis:t.IRange.Axis.Column,span:!0})},g=()=>r.getSelectedRanges().getDefaultShiftAxis()===t.IRange.Axis.Column,_=()=>{let t=o();e.updateCommand(`tableTotalRowToggle`,{state:t?.isShowTotals()??!1}),e.updateCommand(`tableHeaderRowToggle`,{state:t?.isShowHeaders()??!1}),e.updateCommand(`tableBandedRowsToggle`,{state:t?.isShowBandedRows()??!1}),e.updateCommand(`tableFirstColumnToggle`,{state:t?.isShowHighlightFirstColumn()??!1}),e.updateCommand(`tableLastColumnToggle`,{state:t?.isShowHighlightLastColumn()??!1}),e.updateCommand(`tableBandedColumnsToggle`,{state:t?.isShowBandedColumns()??!1});let n=ni(!r.getProtection().isFormatCellsAllowed(),(0,a.messageKey)(`reason.sheetProtected`));if(e.updateCommand(`formatTableStyleClearTableStyle`,{disabledReasons:[...n,...ni(!t||t.getStyleOptions().name===null,(0,a.messageKey)(`reason.noTableStyle`))]}),t){let n=ni(!c(t).valid,(0,a.messageKey)(`reason.tableBodyRows`));e.updateCommand(`insertCellsShiftDown`,{disabledReasons:n}),e.updateCommand(`deleteCellsShiftUp`,{disabledReasons:n});let r=g()?[]:n;e.updateCommand(`insertCells`,{disabledReasons:r}),e.updateCommand(`deleteCells`,{disabledReasons:r})}},v=null,y=null,b=e=>{e!==v&&(y?.(),y=null,v=e,e&&(y=e.addListeners({onAnyChange:()=>{x!==null&&_()}},{transactional:!1})))},x=null,S=()=>{let t=o();b(t);let c=t?`table`:r.getAutoTable()?`auto`:null;c!==x&&(x!==null&&e.remove(),c===null?ti():(x===null&&ei++===0&&(s.Command.DefaultCommandButtonRegistry.register(Qr,!0),s.Command.DefaultCommandButtonRegistry.register($r,!0)),e.use(vr({transaction:r,notifier:i,manager:n.manager})),e.updateCommand(`tableTotalRowToggle`,{callback:()=>{let e=o();e&&e.setShowTotals(!e.isShowTotals())}}),e.updateCommand(`tableHeaderRowToggle`,{callback:()=>{let e=o();e&&e.setShowHeaders(!e.isShowHeaders())}}),e.updateCommand(`tableBandedRowsToggle`,{callback:()=>{let e=o();e&&e.setShowBandedRows(!e.isShowBandedRows())}}),e.updateCommand(`tableFirstColumnToggle`,{callback:()=>{let e=o();e&&e.setShowHighlightFirstColumn(!e.isShowHighlightFirstColumn())}}),e.updateCommand(`tableLastColumnToggle`,{callback:()=>{let e=o();e&&e.setShowHighlightLastColumn(!e.isShowHighlightLastColumn())}}),e.updateCommand(`tableBandedColumnsToggle`,{callback:()=>{let e=o();e&&e.setShowBandedColumns(!e.isShowBandedColumns())}}),e.updateCommand(`tableFilterRefresh`,{callback:()=>{(o()??r.getAutoTable())?.applySortsAndFilters()}}),e.updateCommand(`tableFilterClear`,{callback:e=>{if(e)return e.getFilter()?.delete(),void e.getSort()?.delete();(o()??r.getAutoTable())?.deleteSortsAndFilters()}}),e.updateCommand(`formatTableStyleClearTableStyle`,{tags:[`noTransaction`],callback:()=>{o()?.updateStyleOptions({name:null})},context:()=>({styles:()=>r.getStyles(),table:()=>o(),getNames:()=>r.getNames(),resolveRanges:e=>(r.getWorkbook()??r).getRanges(e).getFixed(!0)})}),c===`table`&&(e.updateCommand(`insertCellsShiftDown`,{label:u((0,a.messageKey)(`table.insertRows`)),groupLabels:{insertCellsOptions:u((0,a.messageKey)(`table.rows.compact`))},description:()=>(0,a.t)(`table.insertRows.description`),icon:`InsertRow`,callback:f}),e.updateCommand(`deleteCellsShiftUp`,{label:u((0,a.messageKey)(`table.deleteRows`)),groupLabels:{deleteCellsOptions:u((0,a.messageKey)(`table.rows.compact`))},description:()=>(0,a.t)(`table.deleteRows.description`),icon:`DeleteRows`,callback:p}),e.updateCommand(`insertCellsShiftRight`,{label:d((0,a.messageKey)(`table.insertColumns`)),groupLabels:{insertCellsOptions:d((0,a.messageKey)(`table.columns.compact`))},description:()=>(0,a.t)(`table.insertColumns.description`),icon:`InsertColumn2`,callback:m}),e.updateCommand(`deleteCellsShiftLeft`,{label:d((0,a.messageKey)(`table.deleteColumns`)),groupLabels:{deleteCellsOptions:d((0,a.messageKey)(`table.columns.compact`))},description:()=>(0,a.t)(`table.deleteColumns.description`),icon:`DeleteColumns`,callback:h}),e.updateCommand(`insertCells`,{label:()=>(g()?d((0,a.messageKey)(`table.insertColumns`)):u((0,a.messageKey)(`table.insertRows`)))(),groupLabels:{insertCellsOptions:()=>(g()?d((0,a.messageKey)(`table.columns.compact`)):u((0,a.messageKey)(`table.rows.compact`)))()},description:()=>g()?(0,a.t)(`table.insertColumns.description`):(0,a.t)(`table.insertRows.description`),callback:()=>{g()?m():f()}}),e.updateCommand(`deleteCells`,{label:()=>(g()?d((0,a.messageKey)(`table.deleteColumns`)):u((0,a.messageKey)(`table.deleteRows`)))(),groupLabels:{deleteCellsOptions:()=>(g()?d((0,a.messageKey)(`table.columns.compact`)):u((0,a.messageKey)(`table.rows.compact`)))()},description:()=>g()?(0,a.t)(`table.deleteColumns.description`):(0,a.t)(`table.deleteRows.description`),callback:()=>{g()?h():p()}}))),x=c),c!==null&&_()};S();let C=r.getSelection().addListeners({onChange:S}),w=r.addListeners({onTablesChange:S,onAutoTableChange:S,onProtectionChange:S});return()=>{C(),w(),b(null),x!==null&&(ti(),x=null)}}var{CommandScopeProvider:ii}=s.Command,ai=(0,r.memo)(e=>{let{sheet:t}=e,n=(0,s.useNotifier)(),a=gr(),c=(0,r.useMemo)(()=>({sheet:t,notifier:n,manager:a??void 0}),[t,n,a]);return(0,i.jsx)(ii,{spec:{scopeName:{key:`layer:table`,name:`table`},contributor:{dynamic:ri},data:c},order:(0,o.useLayer)().zIndex})});ai.displayName=`SheetTableCommandLayer`;var oi=(0,r.memo)((0,r.forwardRef)((e,n)=>{let{sheet:c,animationTime:u=60,className:d,style:f,...p}=e,m=(0,o.useGridPane)(),[h,g]=(0,r.useState)(null),[_,v]=(0,r.useState)(null),y=(0,r.useRef)(null),b=(0,s.useCallbackRef)(()=>{let e=c.getSelectedCell().getSpill()?.getCoords()??null;a.CoordUtils.isEqualRanges(e,h)||(v(e?{transition:h?`move`:`in`,coords:e}:{transition:`out`,coords:h}),g(e))},[c,m,h]);(0,r.useEffect)(()=>(y.current&&=(clearTimeout(y.current),null),_&&(y.current=setTimeout(()=>{v(null),y.current=null},u)),()=>{y.current&&=(clearTimeout(y.current),null)}),[_,u]);let x=(0,r.useMemo)(()=>a.TimerUtils.debounce(a.TimerUtils.throttle(b,80),80),[]);if(l(c?.getSelection(),{onChange(e){x()}}),l(c,{onSpillsChange(e){b()},onInvalidated(e){b()}}),!m)return null;let S=h??_?.coords;if(!S)return null;let C=!!h&&c.getRange(h).getValue()instanceof t.FormulaError.Spill;return(0,i.jsx)(o.Layer,{className:P(d,`spill-outline`),children:(0,r.createElement)(o.RangeRect,{...p,key:`spill-outline`,range:S,alignWidth:1,stroke:`color-mix(in srgb, var(--sxl-color-primary) 70%, black)`,clipInsets:-10,style:{...f,opacity:_?.transition===`out`?0:1},propsStrokePath:{strokeDasharray:C?`6 3`:void 0,style:{filter:`drop-shadow(0px 0px 2px color-mix(in srgb, color-mix(in srgb, var(--sxl-color-primary) 80%, white) 80%, transparent))`}}})})})),si=`var(--sxl-cf-icon-bad)`,ci=`var(--sxl-cf-icon-light-bad)`,li=`var(--sxl-cf-icon-neutral)`,ui=`var(--sxl-cf-icon-light-good)`,di=`var(--sxl-cf-icon-good)`,fi=`var(--sxl-cf-icon-pink)`,pi=`var(--sxl-cf-icon-gold)`,mi=`var(--sxl-cf-icon-gray)`,hi=`var(--sxl-cf-icon-black)`,gi=(e,t)=>({iconKey:`cf:${e}`,color:t}),_i=[`arrowDown`,`arrowRight`,`arrowUp`],vi=[`arrowDown`,`arrowDownRight`,`arrowUpRight`,`arrowUp`],yi=[`arrowDown`,`arrowDownRight`,`arrowRight`,`arrowUpRight`,`arrowUp`],bi=[si,li,di],xi=[si,ci,ui,di],Si=[si,ci,li,ui,di],Ci=(e,t)=>e.map((e,n)=>gi(e,t[n])),wi=(e,t)=>e.map(e=>gi(e,t)),Ti=(e,t)=>t.map(t=>gi(e,t)),Ei=[`rating0`,`rating1`,`rating2`,`rating3`,`rating4`],Di={[t.IStyle.IconSet.Arrows3]:Ci(_i,bi),[t.IStyle.IconSet.ArrowsGray3]:wi(_i,mi),[t.IStyle.IconSet.Flags3]:Ti(`flag`,bi),[t.IStyle.IconSet.Signs3]:Ci([`diamond`,`triangleUp`,`circle`],bi),[t.IStyle.IconSet.Symbols3]:Ci([`circleCross`,`circleExclamation`,`circleCheck`],bi),[t.IStyle.IconSet.Symbols3_2]:Ci([`cross`,`exclamation`,`check`],bi),[t.IStyle.IconSet.TrafficLights3]:Ti(`circle`,bi),[t.IStyle.IconSet.TrafficLights3_2]:Ti(`circleRimmed`,bi),[t.IStyle.IconSet.Triangles3]:Ci([`triangleDownSharp`,`dash`,`triangleUpSharp`],bi),[t.IStyle.IconSet.Stars3]:wi([`star0`,`star1`,`star2`],pi),[t.IStyle.IconSet.Arrows4]:Ci(vi,xi),[t.IStyle.IconSet.ArrowsGray4]:wi(vi,mi),[t.IStyle.IconSet.Rating4]:wi(Ei.slice(1),mi),[t.IStyle.IconSet.RedToBlack4]:Ti(`circle`,[si,fi,mi,hi]),[t.IStyle.IconSet.TrafficLights4]:Ti(`circleRimmed`,[hi,si,li,di]),[t.IStyle.IconSet.Arrows5]:Ci(yi,Si),[t.IStyle.IconSet.ArrowsGray5]:wi(yi,mi),[t.IStyle.IconSet.Quarters5]:wi([`quarters0`,`quarters1`,`quarters2`,`quarters3`,`quarters4`],hi),[t.IStyle.IconSet.Rating5]:wi(Ei,mi),[t.IStyle.IconSet.Boxes5]:wi([`boxes0`,`boxes1`,`boxes2`,`boxes3`,`boxes4`],hi)},Oi=(e,t)=>Di[e]?.[t]??null,ki=Object.freeze([]),Ai=`_track_1426b_17`,ji=`_bar_1426b_22`,Mi=`_axis_1426b_30`,Ni=(0,r.memo)(e=>{let{sheet:t,margin:n=1,className:r,style:c,...l}=e,u=(0,o.useGridPane)(),{getVisibleDecorations:d}=$t(t,`dataBar`),f=d(u);if(f.length===0)return null;let p=Math.max(1,Math.round(n*(u.getZoom()||1))),m=1/s.ReactUtils.getDevicePixelRatio(),h={top:p+m,left:p+m,right:p,bottom:p},g=[];for(let e=0;e<f.length;e++){let{cell:t,range:n,decorations:r}=f[e],s=r.dataBar;s&&g.push((0,i.jsx)(o.VirtualDiv,{range:n??a.CoordUtils.cellToRange(t),clipInsets:-10,style:{pointerEvents:`none`},children:(0,i.jsx)(Pi,{bar:s,inset:h})},`bar-${t.rowIndex}-${t.colIndex}`))}return g.length===0?null:(0,i.jsx)(o.Layer,{...l,className:P(r,`conditional-bars`),children:(0,i.jsx)(o.VirtualDiv,{fill:!0,style:{pointerEvents:`none`,overflow:`visible`,...c},children:g})})});Ni.displayName=`ConditionalBarLayer`;var Pi=({bar:e,inset:t})=>{let{value:n,axis:r,gradient:a,direction:o}=e,s=n<r,c=100*Math.min(n,r),l=100*Math.abs(n-r),u=(s?e.negativeColor:void 0)??e.color,d=(s?e.negativeBorderColor:void 0)??e.borderColor,f=o===`rightToLeft`,p=a?`linear-gradient(to ${s===f?`right`:`left`}, ${u}, color-mix(in srgb, ${u} var(--sxl-cf-bar-fade), transparent))`:u,m=f?{right:`${c}%`}:{left:`${c}%`};return(0,i.jsxs)(`div`,{className:P(Ai,`conditional-bar-track`),style:t,children:[l>0?(0,i.jsx)(`div`,{className:P(ji,`conditional-bar`),style:{...m,width:`${l}%`,background:p,border:d?`1px solid ${d}`:void 0}}):null,e.axisColor&&r>0&&r<1?(0,i.jsx)(`div`,{className:P(Mi,`conditional-bar-axis`),style:{...f?{right:100*r+`%`}:{left:100*r+`%`},background:e.axisColor}}):null]})},Fi=`_clip_x7ihh_36`,Ii=`_box_x7ihh_40`,Li=`_glyph_x7ihh_79`,Ri=(0,r.memo)(e=>{let{sheet:t,className:n,style:r,...c}=e,l=(0,o.useGridPane)(),{getVisibleDecorations:u}=$t(t,`iconSet`),d=u(l);if(d.length===0)return null;let f=l.getZoom()||1,p=[];for(let e=0;e<d.length;e++){let{cell:t,range:n,value:r,decorations:c}=d[e],l=c.iconSet;if(!l)continue;let u=Oi(l.set,l.index);if(!u)continue;let m=r.getStyle(),h=m.getInsets(),g=m.measureText(``).lineHeight*f,_=m.getAlignment().getVertical(),v=zi[_]??`flex-end`,y=Bi[_]??`center bottom`;p.push((0,i.jsx)(o.VirtualDiv,{range:n??a.CoordUtils.cellToRange(t),clipInsets:-10,className:Fi,style:{pointerEvents:`none`},children:(0,i.jsx)(`div`,{className:Ii,style:{left:h.left*f,top:h.top*f,bottom:h.bottom*f,width:g,alignItems:v},children:(0,i.jsx)(s.DynamicIcon,{className:Li,iconKey:u.iconKey,size:g,style:{color:u.color,transformOrigin:y}})})},`icon-${t.rowIndex}-${t.colIndex}`))}return p.length===0?null:(0,i.jsx)(o.Layer,{...c,className:P(n,`conditional-icons`),children:(0,i.jsx)(o.VirtualDiv,{fill:!0,style:{pointerEvents:`none`,overflow:`visible`,...r},children:p})})});Ri.displayName=`ConditionalIconsLayer`;var zi={[t.ITextFrame.VerticalAlignment.Top]:`flex-start`,[t.ITextFrame.VerticalAlignment.Center]:`center`,[t.ITextFrame.VerticalAlignment.Bottom]:`flex-end`,[t.ITextFrame.VerticalAlignment.Justify]:`center`,[t.ITextFrame.VerticalAlignment.Distributed]:`center`},Bi={[t.ITextFrame.VerticalAlignment.Top]:`center top`,[t.ITextFrame.VerticalAlignment.Center]:`center`,[t.ITextFrame.VerticalAlignment.Bottom]:`center bottom`,[t.ITextFrame.VerticalAlignment.Justify]:`center`,[t.ITextFrame.VerticalAlignment.Distributed]:`center`},Vi=`_dropdown_2r2ao_8`,Hi={ignoreHidden:!0,includeMergeOverflow:!0,reuseContext:!0},Ui=(0,r.memo)(e=>{let{sheet:t,markSize:n=7,dropdownWidth:r=17,onOpenDropdown:c,className:l,style:d,...f}=e,p=(0,o.useGridPane)(),m=Gi(t);u(t,[`onSelectionChange`]);let h=p.getZoom()||1,g=[],_=m(p);for(let e=0;e<_.length;e++){let t=_[e],r=p.getBoundsFromRange(p.getRangeFromCell(t));r&&g.push((0,i.jsx)(o.VirtualDiv,{range:a.CoordUtils.cellToRange(t),clipInsets:-10,style:{pointerEvents:`none`},children:(0,i.jsx)(b,{anchorLocation:a.AnchorLocation.TopRight,size:n*h,cellWidth:r.width,cellHeight:r.height,fill:`light-dark(red, rgb(0, 255, 255))`})},`invalid-${t.rowIndex}-${t.colIndex}`))}let v=Wi(t);if(v){let{coords:e,dataValidation:t}=v;g.push((0,i.jsx)(o.VirtualDiv,{range:a.CoordUtils.cellToRange(e),clipInsets:-10,style:{pointerEvents:`none`},children:(0,i.jsx)(`div`,{className:Vi,style:{right:0,width:r*h},role:`button`,"aria-haspopup":`listbox`,onMouseDown:n=>{n.button===0&&(n.stopPropagation(),n.preventDefault(),c?.(e,t))},children:(0,i.jsx)(s.DynamicIcon,{iconKey:`ExpandMore`,size:r*h*.75})})},`dropdown-${e.rowIndex}-${e.colIndex}`))}return g.length===0?null:(0,i.jsx)(o.Layer,{...f,className:P(l,`validation-indicators`),children:(0,i.jsx)(o.VirtualDiv,{fill:!0,style:{pointerEvents:`none`,overflow:`visible`,...d},children:g})})});Ui.displayName=`ValidationIndicatorLayer`;var Wi=e=>{let t=e.getSelectedCell(),n=t.getDataValidation();if(!n||n.isHideDropdown()||!n.getRenderHints().includes(`list`))return null;let r=t.getCoords();return r?{coords:r,dataValidation:n}:null},Gi=e=>{let t=(0,o.useGridPane)(),[,n]=(0,r.useReducer)(e=>e+1,0),i=(0,r.useRef)(new Map),a=(0,s.useCallbackRef)(()=>{i.current.clear(),n()},[]);l(e,{onDataValidationsChange:a},{ignoreModelChange:!0});let c=t.getVisibleRange();return f(e,(0,r.useMemo)(()=>c?{rowStart:c.rowStart,colStart:c.colStart,rowEnd:c.rowEnd,colEnd:c.colEnd}:null,[c?.rowStart,c?.colStart,c?.rowEnd,c?.colEnd]),e=>{e.isDataChange&&a()},qi),(0,s.useCallbackRef)((t,n)=>{let r=i.current,a=n??t.getVisibleRange();if(!a)return Ki;let o=`${a.rowStart}:${a.colStart}:${a.rowEnd}:${a.colEnd}`,s=r.get(o);if(s)return s;let c=e.getRange(a),l=Ki;if(c.getDataValidations().length>0){let e=[];c.forEach((t,n)=>{let r=n.getCell().getDataValidation();if(!r)return;let i=n.getCoords();r.getAlertAt(i.rowIndex,i.colIndex)&&e.push(i)},Hi),e.length>0&&(l=e)}return r.set(o,l),r.size>12&&r.delete(r.keys().next().value),l},[e])},Ki=[],qi={fireOnAddressChange:!1,transactional:!1},Ji=(0,r.memo)((0,r.forwardRef)((e,n)=>{let{selection:a,adapter:c,axis:l,entireCoords:u,edgeSize:d=1,edgeColor:f=`var(--sxl-color-base-300)`,scrollIntoView:p,renderBorders:m=!0,preserveFocus:h=!1,replaceActive:g=!1,allowMulti:_=!0,onPointerDownInterceptor:v,onSelectionStart:y,onSelectionEnd:b,zIndex:x,className:S,style:C,...w}=e,T=(0,o.useGridPane)(),E=l===t.IRange.Axis.Column?T.getPaneBounds().height:T.getPaneBounds().width,D=(0,r.useMemo)(()=>c??new Mt(a),[c,a]);(0,s.useOptionalBoundSyncExternalStore)(D,e=>e.getSelection());let O=(0,o.useHeaderSelectionPointer)(D,{axis:l,entireRange:u,scrollIntoView:p,replaceActive:g,allowMulti:_,preserveFocus:h,onPointerDownInterceptor:v,onDragStart:(0,s.useCallbackRef)(()=>{y?.(),a.setAdjusting(a.getCoords())},[a,y]),onDragEnd:(0,s.useCallbackRef)(()=>{a.setAdjusting(null),b?.()},[a,b]),onPointerUp:(0,s.useCallbackRef)(()=>{h||T.focus()},[T,h])}),k=m?a.getSelectedRuns(l):null,A=T.getAnchor(),j=[];if(m){j.push(Yi(`edge:${A}`,l,E,d,f));for(let e=0;k&&e<k.length;e++){let t=k[e],n=Zi(t.min,t.max,l,T);n&&j.push(Xi(`selection:${A}:${e}`,n,l,E))}}return(0,i.jsx)(o.Layer,{...w,onPointerDown:O.onPointerDown,onPointerMove:O.onPointerMove,onPointerUp:O.onPointerUp,children:(0,i.jsx)(o.VirtualDiv,{fill:!0,className:P(S,`header-selection`),style:{pointerEvents:`none`,...C},ref:n,children:j})})})),Yi=(e,n,r,a,o)=>{let c=s.ReactUtils.getDevicePixelRatio(),l=a/c,u=s.ReactUtils.snapDeviceEdge(r-l,c);return(0,i.jsx)(`div`,{className:`header-selection-edge`,style:n===t.IRange.Axis.Column?{position:`absolute`,background:o,pointerEvents:`none`,left:0,width:`100%`,top:`${u}px`,height:`${l}px`}:{position:`absolute`,background:o,pointerEvents:`none`,top:0,height:`100%`,left:`${u}px`,width:`${l}px`}},e)},Xi=(e,n,r,a)=>{if(!n)return;let o=`var(--sxl-color-primary)`,c=s.ReactUtils.getDevicePixelRatio(),l=2/c,u=s.ReactUtils.edgeCenter(a,`leading`,2,c),d;if(r===t.IRange.Axis.Column){let e=s.ReactUtils.edgeCenter(n.x,`leading`,2,c);d={position:`absolute`,background:o,pointerEvents:`none`,top:u-l/2+`px`,height:`${l}px`,left:e-l/2+`px`,width:`${s.ReactUtils.edgeCenter(n.x+n.width,`trailing`,2,c)-e+l}px`}}else{let e=s.ReactUtils.edgeCenter(n.y,`leading`,2,c);d={position:`absolute`,background:o,pointerEvents:`none`,left:u-l/2+`px`,width:`${l}px`,top:e-l/2+`px`,height:`${s.ReactUtils.edgeCenter(n.y+n.height,`trailing`,2,c)-e+l}px`}}return(0,i.jsx)(`div`,{className:`header-selection-border`,style:d},e)},Zi=(e,n,r,i)=>{let a={x:0,y:0,width:0,height:0};if(r===t.IRange.Axis.Column){let t=i.toClipBounds(i.getBoundsFromRange({colStart:e,rowStart:0,colEnd:n,rowEnd:0}),o.SELECTION_CLIP_INSETS);if(!t)return null;a.x=t.x,a.width=t.width}else{let t=i.toClipBounds(i.getBoundsFromRange({colStart:0,rowStart:e,colEnd:0,rowEnd:n}),o.SELECTION_CLIP_INSETS);if(!t)return null;a.y=t.y,a.height=t.height}return{x:a.x,y:a.y,width:a.width,height:a.height}},Qi=e=>`resize-indicator:`+(e===t.IRange.Axis.Column?`col`:`row`),$i=(0,r.memo)((0,r.forwardRef)((e,n)=>{let{sheetHeader:c,isColumn:u,oppositeSize:d=30,onResizeHeadersStart:f,onResizeHeaders:p,onResizeHeadersEnd:m,onResizeHeadersDown:h,onResizeHeadersUp:g}=e,_=(0,o.useGridPane)(),[v,y]=(0,r.useState)(c.getSelectedRuns()),[b,x]=(0,r.useReducer)(e=>e+1,0),S=(0,s.useTranslator)(),C=(0,r.useCallback)(a.TimerUtils.debounce(()=>{x()},10),[]);l(c?.getSheet(),{onSelectionChange(e){let t=c.getSelectedRuns();y(t),C()},onProtectionChange(){x()},onViewChange(){C()}});let[w,T]=(0,r.useState)(c?.getSheet().getView().getZoomScale()/100),E=u?t.IRange.Axis.Column:t.IRange.Axis.Row,[,D]=(0,o.useSurfaceState)(Qi(E),null),O=(0,r.useRef)(null),k=(0,r.useRef)(null),A=(0,r.useCallback)(()=>{k.current&&=(clearTimeout(k.current),null)},[]);(0,r.useEffect)(()=>A,[A]),l(c,{onSizesChange:e=>{T(c?.getSheet().getView().getZoomScale()/100)}});let j=(0,r.useCallback)(e=>c.at(e)?.isHidden()||c.at(e)?.getSize()===0,[c]),M=(0,r.useCallback)((e,t)=>c.hiddenHeadersAt(e,t),[j]),N=(0,r.useCallback)(()=>c.getMinSize(),[c]),P=(0,r.useCallback)(()=>c.getMaxSize(),[c]),F=(0,s.useCallbackRef)((e,n,r)=>{n/=w;let i={size:n=Math.max(N(),Math.min(a.CommonUtils.roundAccurately(n,N())??n,P())),hidden:!1},o=[];n<=0&&(i.hidden=!0,i.size=r),o.push({address:{min:e,max:e},update:i});let s=_.getMetrics();if(n<0){let r=E===t.IRange.Axis.Column,i=r?s.getColOffset:s.getRowOffset,a=r?s.getColIndex:s.getRowIndex,c=i(e),l=a(c+n),u=i(l);u===c+n?l--:o.push({address:{min:l,max:l},update:{size:c-u+n}}),e-l>1&&o.push({address:{min:l+1,max:e-1},update:{hidden:!0}})}c.updateHeaderPairs(o),D({index:e,sizePX:n}),p?.(e,n,r)},[b,_,c,w,p]),I=(0,s.useCallbackRef)((e,n,r)=>{let i=E===t.IRange.Axis.Column,o=null,s={min:e,max:e};if(c.isSelectedAll(e)){let t=c.getSelectedRuns();t.length>1?o=i?(0,a.messageKey)(`op.resizeColumns`):(0,a.messageKey)(`op.resizeRows`):s=t[0];let l={hidden:n<=0,size:(n<=0?r:n)/w};c.updateHeaderPairs(ea(t,l,e))}if(s){let e=s.max-s.min+1,t;t=e===1?c.getRange(s).at(0).getText():c.getRange(s).toString(),o=S(i?`op.resizeColumnsNamed`:`op.resizeRowsNamed`,{count:e,name:t})}O.current?.commit({description:o??void 0}),O.current=null,D(null),m?.(e,n,o)},[b,S,c,m]),L=(0,s.useCallbackRef)((e,n)=>{let r=E===t.IRange.Axis.Column?(0,a.messageKey)(`op.resizeColumns`):(0,a.messageKey)(`op.resizeRows`);O.current=c.getSheet().beginCommit(r),A(),D({index:e,sizePX:n}),f?.(e,n,r)},[E,c]),R=(0,s.useCallbackRef)((e,t)=>{A(),k.current=setTimeout(()=>{k.current=null,D({index:e,sizePX:t})},360),h?.(e,t)},[h]),z=(0,s.useCallbackRef)(e=>{A(),D(null),g?.(e)},[g]),B=(0,s.useCallbackRef)(e=>{let n=!1,r=E===t.IRange.Axis.Column,i=c.getSheet().getEntireRange().getCoords(),o=[],s=c.getSelectedRuns(),l=e=>{let t;t=r?{colStart:e.min,rowStart:i.rowStart,colEnd:e.max,rowEnd:i.rowEnd}:{colStart:i.colStart,rowStart:e.min,colEnd:i.colEnd,rowEnd:e.max},o.push(t)},u=s.length;for(let t=0;t<u;t++){let r=s[t];r.value&&(r.min<=e&&r.max>=e&&(n=!0),l(r))}n||l({min:e,max:e}),c.getSheet().getRanges(o).autoFit({axes:r?t.IRange.AxisSelection.Column:t.IRange.AxisSelection.Row}),A(),D(null),m?.(e,null,(0,a.messageKey)(`op.resizeColumns`))},[b,c,m,j]),V=c.isProtected()?void 0:F,H=null,U=(u?_.getVisibleColumns():_.getVisibleRows()).map(e=>e.index),W=u?_.getPaneRange().colStart:_.getPaneRange().rowStart;U.length>0&&U[0]>W&&(U=[U[0]-1,...U]);let G=[],K=[],q=U.length;for(let e=0;e<q;e++){let t=U[e],n=e<q-1?U[e+1]:t+M(t+1,!1)+1,r=t+1!==n;(!H||H.max<t)&&(H=v.length>0&&v[v.length-1].max>=t?v[a.CommonUtils.findEqualOrGreater(v,t,e=>e.max)]:null);let i=!1,o=!1;if(H&&(H.min<=t||H.min<=n&&!r)&&(i=!0,o=H.value??!1),t===W){let e=!1,n=!1;H&&H.min<=t&&(e=!0,n=H.value??!1),t>0&&K.push({index:t-1,isNextHidden:r,isSelected:e,isSelectedAll:n,disabledResize:!0})}if(o&&G.push(K.length),K.push({index:t,isHidden:e===0&&M(t,!1)>0,isNextHidden:r,isSelected:i,isSelectedAll:o,onDividerMouseDown:R,onDividerResizeStart:L,onDividerResize:V,onDividerMouseUp:z,onDividerResizeEnd:I,onDividerAutoFit:B}),r){let e=!1,r=!1;H&&H.min>=t&&H.max<=n-1&&H.value&&G.push(K.length),H&&H.max>=n||(H=v.length>0&&v[v.length-1].max>=n?v[a.CommonUtils.findEqualOrGreater(v,n,e=>e.max)]:null),H&&H.min<=n&&(e=!0,r=H.value??!1),n>0&&K.push({index:n-1,isHidden:!0,isSelected:e,isSelectedAll:r,onDividerMouseDown:R,onDividerResizeStart:L,onDividerResize:V,onDividerMouseUp:z,onDividerResizeEnd:I,onDividerAutoFit:B})}}if(G.length>0){let e=G.length-1;if(G.length>0){let t=K[G[e]].index,n=null;u?(n=_.getBoundsFromRange({rowStart:0,rowEnd:0,colStart:t,colEnd:t}),n.x+n.width>_.getPaneBounds().width&&(--e,e===0&&(e=-1))):(n=_.getBoundsFromRange({rowStart:t,rowEnd:t,colStart:0,colEnd:0}),n.y+n.height>_.getPaneBounds().height&&(--e,e===0&&(e=-1)))}let t=v?.[v.length-1],n=_.getAnchor();if(n===`t`||n===`l`){let e=K[G[Math.max(0,G.length-1)]];e.showTouchDivider=!!t&&t.max<=e.index}else e>=0&&(K[G[e]].showTouchDivider=!0)}let ee=K.length,te=Array(ee);for(let e=0;e<ee;e++)te[e]=(0,i.jsx)(o.HeaderDividerAnchor,{...K[e],axis:E,disabled:c.isProtected()},`divider${e}`);return(0,i.jsx)(o.Layer,{children:te})})),ea=(e,t,n=null)=>{let r=[],i=e.length;for(let a=0;a<i;a++){let i=e[a];if(!i.value)continue;let o=i.min,s=i.max;o===s&&o===n||r.push({address:{min:o,max:s},update:t})}return r},ta=`var(--sxl-color-primary)`,na=`var(--sxl-color-base-100)`,ra={side:`b`,align:`center`},ia={side:`r`,align:`center`},aa=(0,r.memo)(e=>{let{sheet:n}=e,c=(0,o.useGridPane)(),l=(0,s.useTranslator)(),[u]=(0,o.useSurfaceState)(Qi(t.IRange.Axis.Column),null),[d]=(0,o.useSurfaceState)(Qi(t.IRange.Axis.Row),null),f=!!u,p=u??d;if(!p)return null;let{index:m,sizePX:h}=p,g=h===0,_=n.getEntireRange().getCoords(),v=f?{rowStart:0,rowEnd:_.rowEnd,colStart:m,colEnd:m}:{rowStart:m,rowEnd:m,colStart:0,colEnd:_.colEnd},y=null;if(c.toClipBounds(c.getBoundsFromRange(v))){let e=c.getMetrics(),t=c.getPaneBounds(),n=f?Math.max(0,e.getColOffset(m)):Math.max(0,e.getRowOffset(m)),a=f?Math.min(t.x+t.width,e.getColOffset(m+1)):Math.min(t.y+t.height,e.getRowOffset(m+1)),s,l,u,d;if(f){let e=t.height;s=[0,0,0,e],l=`-0.5px 0px 0px 0px ${na}`,u={x:n-1,y:0,width:1,height:e},d={x:a,y:0,width:1,height:e}}else{let e=t.width;s=[0,0,e,0],l=`0px -0.5px 0px 0px ${na}`,u={x:0,y:n-1,width:e,height:1},d={x:0,y:a,width:e,height:1}}let p={propsPath:{stroke:ta,strokeWidth:`2px`}},h={style:{boxShadow:l},propsPath:{stroke:ta,strokeWidth:`2px`,strokeDasharray:`0 0 8 4`}};y=(0,i.jsxs)(r.Fragment,{children:[g?void 0:(0,i.jsx)(o.LineSVG,{linePoints:s,bounds:u,...p}),(0,i.jsx)(o.LineSVG,{linePoints:s,bounds:d,...h})]},`resize-dividers`)}let b=null;if(h!==null){let e=Math.floor(10*a.DOMUtils.getDPI())/10,t=a.CommonUtils.roundAccurately(h*e,0)??0,r=f?n.getColumnHeaders():n.getRowHeaders(),s=(n.getView()?.getZoomScale()??100)/100,c=(a.CommonUtils.roundAccurately(t/s/(r?.getScaleFactor()*a.DOMUtils.getDPI()),2)??0).toFixed(2),u=l(f?`resizeIndicator.width`:`resizeIndicator.height`),d=g?l(`resizeIndicator.hiddenDisplay`,{label:u}):l(`resizeIndicator.sizeDisplay`,{label:u,unit:c,px:t});b=(0,i.jsx)(o.StickyFloat,{anchor:{range:f?{colStart:m,colEnd:m,rowStart:0,rowEnd:0}:{rowStart:m,rowEnd:m,colStart:0,colEnd:0}},placement:f?ra:ia,whenOff:`clamp`,style:oa,children:d})}return y||b?(0,i.jsxs)(i.Fragment,{children:[b,y]}):null});aa.displayName=`ResizeIndicator`;var oa={font:`11px/1.5 system-ui, sans-serif`,color:`var(--sxl-color-base-content, white)`,background:`var(--sxl-color-base-100, rgb(60,60,60))`,padding:`2px 6px`,borderRadius:3,border:`1px solid var(--sxl-color-base-300, rgba(0,0,0,0.2))`,boxShadow:`0 2px 8px rgba(0,0,0,0.35)`,whiteSpace:`nowrap`,pointerEvents:`none`},{CommandScopeProvider:sa}=s.Command,ca=(e,t)=>(e.updateCommand(`openContextMenu`,{callback:()=>{t.openAtSelectedCell()}}),()=>{}),la=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{sheet:n,onSheetContextMenu:a,className:s,...c}=e,l=(0,o.useGridPane)(),u=(0,r.useCallback)(e=>{let t=l.getCellFromPointer(e.clientX,e.clientY);t&&a&&(a({originalEvent:e,clientX:e.clientX,clientY:e.clientY,rowIndex:t.rowIndex,colIndex:t.colIndex}),e.stopPropagation(),e.preventDefault())},[l,a]),d=(0,r.useCallback)(()=>{if(!l||!a)return;let e=n.getSelection().getCoords().cell;l.scrollCellCoordsIntoView(e).then(t=>{requestAnimationFrame(()=>{let n=l.getMetrics().getColOffset(e.colIndex+1),r=l.getMetrics().getRowOffset(e.rowIndex+1),i=l.getPanePointFromPointer(0,0)||{x:0,y:0};a({clientX:n-i.x-(t.left??0)+6,clientY:r-i.y-(t.top??0)+6})})})},[l,n,a]),f=(0,r.useMemo)(()=>({openAtSelectedCell:d}),[d]);return(0,i.jsx)(sa,{spec:{scopeName:`layer:contextmenu`,contributor:{dynamic:ca},data:f},order:(0,o.useLayer)().zIndex,children:(0,i.jsx)(o.Layer,{onContextMenu:u,className:P(s,`contextMenu`),...c})})}));function ua(e){let{axis:t,entireCoords:n,scrollIntoView:a,className:o,...s}=e,c=te().getMode(),l=c?.selection??null,u=g()?.getName(),d=(0,r.useMemo)(()=>{if(!l)return null;let e=new Mt(l);return u?Ht(e,u):e},[l,u]);return c&&c.mode===`point`&&l?c.scope&&c.scope!==u?null:(0,i.jsx)(Ji,{className:P(o,`reference-header`),selection:l,adapter:d,axis:t,entireCoords:n,scrollIntoView:a,renderBorders:!1,preserveFocus:!0,replaceActive:!0,allowMulti:!1!==c.allowMulti,...s}):null}la.displayName=`ContextMenuLayer`,ua.displayName=`SheetReferenceHeaderLayer`;var da=e=>{let{style:t,...n}=e??{};return(0,i.jsxs)(`svg`,{style:{width:`135px`,height:`37px`,...t},viewBox:`0 0 135 37`,...n,children:[(0,i.jsx)(`path`,{d:`M 1.0984,0 C 0.4978,0 0.01,0.40548 0.01,0.90302 v 19.5766 H 0 v 15.61762 c 0,0.30574 0.185,0.57535 0.466,0.73886 v 0.1426 H 0.8565 C 0.9315,36.992 1.0086,37 1.0883,37 H 13.063 25.9706 v 0 h 8.7553 c 0.08,0 0.1563,-0.008 0.2308,-0.0213 h 0.054 v -0.0141 c 0.4621,-0.10457 0.8035,-0.45175 0.8035,-0.86739 v -15.312 c 0,-0.0328 0.01,-0.0658 0.01,-0.0995 V 0.90304 C 35.8242,0.4052 35.3363,6e-5 34.7358,6e-5 H 22.5969 V 1.7e-4 H 21.0014 V 6e-5 Z`,fill:`#547dbe`,fillRule:`evenodd`}),(0,i.jsx)(`path`,{d:`M 1.4849,2.09543 V 9.06408 H 8.1947 V 2.09543 Z m 8.6592,0 V 9.06408 H 16.854 V 2.09543 Z m 8.685,0 v 6.96865 h 6.7098 V 2.09543 Z m 8.7355,0 v 6.96865 h 6.7099 V 2.09543 Z M 1.4849,11.04391 v 6.81444 h 6.7098 v -6.81444 z m 8.6592,0 v 6.81444 h 6.7099 v -6.81444 z m 8.685,0 v 6.81444 h 6.7098 v -6.81444 z m 8.7355,0 v 6.81444 h 6.7099 V 11.04391 Z M 1.4849,19.83872 v 6.68584 h 6.7098 v -6.68584 z m 8.6592,0 v 6.68584 h 6.7351 v -6.68584 z m 8.685,0 v 6.68584 h 6.7098 v -6.68584 z m 8.7355,0 v 6.68584 h 6.7099 v -6.68584 z m -26.052,8.38811 v 6.68588 h 6.7098 v -6.68588 z m 8.6592,0 v 6.68588 h 6.7355 v -6.68588 z m 8.685,0 v 6.68588 h 6.7099 v -6.68588 z m 8.7356,0 v 6.68588 h 6.7098 v -6.68588 z`,fill:`#ffffff`,fillRule:`evenodd`}),(0,i.jsx)(`path`,{d:`m 1.4785,2.09737 v 6.96865 h 6.741 V 2.09737 Z m 0,8.94851 v 6.81449 h 6.741 v -6.81449 z m 0,8.79485 v 6.6858 h 6.741 v -6.6858 z m 0.028,8.388 v 6.68588 h 6.741 v -6.68588 z`,fill:`#547dbe`,fillRule:`evenodd`,strokeWidth:`0.4`}),(0,i.jsx)(`path`,{d:`M 120.9895,32.82218 V 10.13469 h 4.7986 v 18.71559 h 9.2153 v 3.9719 z m 0.4853,0 h -5.4976 l -5.275,-8.57923 -5.2751,8.57923 h -5.1481 l 7.5314,-11.69325 -7.0545,-10.99424 h 5.3067 l 4.8936,8.16618 4.7986,-8.16618 h 5.1796 l -7.118,11.24826 z M 95.9361,29.04099 c 0.5297,0 1.0381,-0.053 1.5254,-0.15888 0.4872,-0.10591 0.9745,-0.23299 1.4617,-0.3813 v 3.52703 c -0.5084,0.21183 -1.144,0.39189 -1.9066,0.54018 -0.7415,0.16946 -1.5571,0.2542 -2.4469,0.2542 -1.038,0 -1.9701,-0.16947 -2.7964,-0.5084 -0.805,-0.33894 -1.4511,-0.92148 -1.9384,-1.74763 -0.466,-0.84734 -0.6991,-2.01241 -0.6991,-3.49526 v -8.35686 h -2.2562 v -2.00181 l 2.6058,-1.58876 1.3664,-3.65411 h 3.0189 v 3.6859 h 4.8619 v 3.55878 h -4.8619 v 8.35686 c 0,0.65668 0.1906,1.15449 0.5719,1.49342 0.3814,0.31776 0.8792,0.47664 1.4935,0.47664 z M 79.1445,14.83743 c 2.3939,0 4.29,0.68847 5.6882,2.06535 1.3983,1.35581 2.0972,3.29411 2.0972,5.81491 v 2.28769 H 75.7444 c 0.042,1.33475 0.4342,2.38315 1.1758,3.14596 0.7626,0.76244 1.8113,1.14385 3.1459,1.14385 1.1227,0 2.1396,-0.10609 3.0506,-0.3179 0.9109,-0.23311 1.8536,-0.58257 2.8283,-1.0484 v 3.654 c -0.8476,0.42362 -1.7479,0.73087 -2.7012,0.92139 -0.9322,0.21181 -2.0655,0.3179 -3.4001,0.3179 -1.7373,0 -3.2731,-0.3179 -4.6078,-0.95333 -1.3346,-0.65673 -2.3833,-1.64162 -3.1459,-2.95507 -0.7627,-1.31344 -1.144,-2.96571 -1.144,-4.9568 0,-2.03367 0.3389,-3.71788 1.0169,-5.05235 0.6991,-1.35578 1.6629,-2.37258 2.8917,-3.0504 1.2286,-0.67783 2.6586,-1.0168 4.2899,-1.0168 z m 0.032,3.36815 c -0.911,0 -1.6736,0.29653 -2.2879,0.88967 -0.5933,0.59322 -0.9428,1.51461 -1.0487,2.76455 h 6.6415 c -0.021,-1.05904 -0.2967,-1.92796 -0.8262,-2.60567 -0.5297,-0.69905 -1.3559,-1.04855 -2.4787,-1.04855 z m -17.011,-3.36815 c 2.3939,0 4.29,0.68847 5.6882,2.06535 1.3982,1.35581 2.0973,3.29411 2.0973,5.81491 v 2.28769 H 58.7653 c 0.042,1.33475 0.4343,2.38315 1.1758,3.14596 0.7627,0.76244 1.8113,1.14385 3.1459,1.14385 1.1228,0 2.1397,-0.10609 3.0507,-0.3179 0.911,-0.23311 1.8536,-0.58257 2.8282,-1.0484 v 3.654 c -0.8475,0.42362 -1.7478,0.73087 -2.7011,0.92139 -0.9321,0.21181 -2.0655,0.3179 -3.4002,0.3179 -1.7372,0 -3.273,-0.3179 -4.6077,-0.95333 -1.3347,-0.65673 -2.3833,-1.64162 -3.1459,-2.95507 -0.7627,-1.31344 -1.144,-2.96571 -1.144,-4.9568 0,-2.03367 0.3389,-3.71788 1.0168,-5.05235 0.6991,-1.35578 1.6631,-2.37258 2.8918,-3.0504 1.2287,-0.67783 2.6587,-1.0168 4.2899,-1.0168 z m 0.032,3.36815 c -0.911,0 -1.6736,0.29653 -2.288,0.88967 -0.5931,0.59322 -0.9427,1.51461 -1.0486,2.76455 h 6.6414 c -0.021,-1.05904 -0.2965,-1.92796 -0.8262,-2.60567 -0.5297,-0.69905 -1.3558,-1.04855 -2.4786,-1.04855 z M 41.7033,13.59817 c 0,0.84739 -0.032,1.66288 -0.095,2.44668 -0.042,0.78385 -0.085,1.33456 -0.1271,1.65231 h 0.2542 c 0.5508,-0.88968 1.2605,-1.53575 2.1291,-1.93827 0.8686,-0.40251 1.8325,-0.60371 2.8917,-0.60371 1.8855,0 3.3896,0.50838 4.5124,1.52518 1.144,0.99558 1.716,2.60556 1.716,4.82998 V 32.82218 H 48.2498 V 22.68575 c 0,-2.49951 -0.9322,-3.74937 -2.7964,-3.74937 -1.4194,0 -2.4045,0.49788 -2.9553,1.49362 -0.5297,0.97424 -0.7945,2.38314 -0.7945,4.22592 v 8.16626 H 36.9688 V 8.67305 h 4.7348 z`,fill:`#eb594d`}),(0,i.jsx)(`path`,{d:`m 23.345,4.88926 c 1.4307,0 2.8282,0.229 4.1916,0.68692 1.3636,0.45803 2.6999,1.15712 4.0084,2.09748 l -1.8344,2.50966 C 28.6222,9.40175 27.5522,8.82162 26.5004,8.44306 25.4486,8.0645 24.3968,7.87524 23.345,7.87524 c -1.9935,0 -3.5435,0.40902 -4.6503,1.22728 -1.1068,0.81819 -1.6601,1.97842 -1.6601,3.48048 v 0.0183 c 0,1.05019 0.3179,1.8502 0.9538,2.39973 0.636,0.54952 1.4615,0.95869 2.4765,1.22731 1.015,0.26862 2.0975,0.51907 3.2468,0.75111 1.003,0.20755 1.9996,0.44872 2.9905,0.7235 0.9905,0.27478 1.8922,0.66562 2.7057,1.1724 0.813,0.50679 1.4615,1.1937 1.9444,2.06075 0.4832,0.86705 0.7247,1.99672 0.7247,3.38884 v 0.0367 c 0,2.45464 -0.8561,4.35355 -2.5682,5.69703 -1.7122,1.34311 -4.1216,2.01505 -7.2278,2.01505 -1.2963,0 -2.5162,-0.12207 -3.6598,-0.36658 -1.1434,-0.24413 -2.2134,-0.61071 -3.2102,-1.09898 -0.9968,-0.48864 -1.9292,-1.09897 -2.7975,-1.83175 l 1.9628,-2.47308 c 1.0763,0.92809 2.2534,1.62428 3.5314,2.08825 1.2779,0.46431 2.669,0.69627 4.1733,0.69627 2.1158,0 3.7513,-0.40613 4.9071,-1.21827 1.1558,-0.81214 1.7335,-1.95096 1.7335,-3.4164 v -0.0183 c 0,-1.06247 -0.2872,-1.87762 -0.8622,-2.44543 -0.5746,-0.56786 -1.3267,-0.99528 -2.2563,-1.28234 -0.9292,-0.28695 -1.9383,-0.52812 -3.0267,-0.72354 -1.0397,-0.18314 -2.0822,-0.39685 -3.1278,-0.64117 -1.0457,-0.24417 -2.0026,-0.60444 -2.8709,-1.08076 -0.8683,-0.47621 -1.5685,-1.15396 -2.1005,-2.0333 -0.532,-0.87933 -0.798,-2.05162 -0.798,-3.5171 v -0.0183 c 0,-2.4792 0.8255,-4.39955 2.4766,-5.7611 1.651,-1.36167 3.9807,-2.04258 6.9892,-2.04258 z`,stroke:`#eb594d`,strokeWidth:`2`,fill:`#f9cecb`})]})},fa=(0,r.memo)(e=>{let{colorLicensee:n=`blue`,colorError:a=`red`,colorCredits:o=`grey`,credits:s=`All rights reserved - Michael Ford`,feature:c,style:l,...u}=e??{},[d,f]=(0,r.useState)(null);(0,r.useEffect)(()=>{(async()=>{let e=await t.LicenseManager.getDetails();f(e)})()},[]);let[p,m]=(0,r.useState)(!1),h={opacity:.65},g=(0,r.useMemo)(()=>{let e=d?.getExceptions(),t=e?.length??0;if(t===0)return null;let n=[];for(let r=0;r<t;r++){let t=e[r];n.push((0,i.jsx)(`div`,{style:{opacity:.8,fontSize:`16px`,textAlign:`left`,color:a},children:t},r))}return n},[d,a]);if(d===null||d.isValidFor(c??``))return null;let _=d.getType(),v=!g&&_.endsWith(`ity`),y=d.getLicensee(),b=v?1.6:1,x=135/b,S=37/b,C=null;return!_&&(y?.length??0)>0&&(C=(0,i.jsx)(`div`,{style:{opacity:.7,fontWeight:`500`,fontSize:`16px`,textAlign:`left`,color:n},children:y})),(0,i.jsx)(`div`,{style:{pointerEvents:`none`,display:`flex`,flexDirection:`column`,overflow:`hidden`,...l},...u,children:(0,i.jsxs)(`div`,{style:{position:`relative`,display:`flex`,flexDirection:`column`},children:[p?(0,i.jsx)(da,{style:h}):(0,i.jsx)(`svg`,{width:x,height:S,style:h,children:(0,i.jsx)(`image`,{style:{width:x,height:S},href:`https://www.sheetxl.com/watermark.svg`,onError:()=>m(!0)})}),(0,i.jsxs)(`div`,{children:[C,g,(0,i.jsx)(`div`,{style:{height:`0px`,fontSize:`16px`,textAlign:`left`,width:`0px`,opacity:.8,color:o},children:s})]})]})})}),pa={key:`copy`,description:(0,a.messageKey)(`editMode.copy`)},ma={key:`cut`,description:(0,a.messageKey)(`editMode.cut`)},ha={type:t.ICell.Content.Values},ga={fitDestination:!0,type:t.ICell.Content.Formats},_a={fitDestination:!0,type:t.ICell.Content.Formulas},va={transpose:!0},ya={fitDestination:!0,adjustCells:(e,t,n)=>({value:`=${t.getAddress({$colIndex:!0,$rowIndex:!0})}`})};function ba(e,n){let r=n.sheet,i=n,{notifier:o,editModeHandler:s,globalClipboard:c,element:l}=n,u={element:l,doCopy:e=>new t.RangeClipboardItem(r.getSelectedRanges().getSnapshot(e))},d={element:l,importFromExternal:async(e,n)=>{let i=r.getSelectedRange().getTopLeft().getCoords(),a=new t.ExternalRangeClipboardItem(r.getRuntime(),e,{colIndex:i.colStart,rowIndex:i.rowStart},n,r.getStyles());return await a.parse()?a:null},doPaste:async(e,n)=>{if(e?.getItemType()!==`range`)return!1;n?.contentsOnly&&delete(n={...n,type:t.ICell.Content.Values}).contentsOnly;let i=e.getItem?.();if(!i)return!1;let o=i.getName?.(),s=r.getSelectedRange();if(o===`HTML`&&s.size>1){let e=i.getCoords?.();e&&a.CoordUtils.isSingleCell(e)&&(s=s.getResizeTo(1,1))}return await s.doBatch(async()=>{let e=await s.copyFrom(i,{...n});!e||e.isEntireRows()||e.isEntireColumns()||e.autoFit({axes:t.IRange.AxisSelection.Row,minContent:!0})},{description:o?(0,a.t)(`op.pasteNamed`,{name:o}):(0,a.messageKey)(`op.paste`),autoSelect:!0}),!0}},f=async e=>{if(u.element?.())try{await(async e=>{if(!u.element)return;let t=c.getClipboard(),n=u.doCopy?.(e);typeof n==`string`?await t.writeText(n):await t.writeReference(n)})(e??{})}catch(e){o?.showError(e)}},p=async(e,t,n)=>{try{if(!1===await e.doPaste?.(t,n))return;((e,t)=>{if(e?.getItemType()!==`range`)return;let n=s.getMode()?.key===`cut`||e.isCut?.();if(!n&&s.getMode()?.key===`copy`){let t=e.getItem?.()?.getCoords?.(),i=r.getSelectedRanges().getCoords(),o=!1;if(t&&i&&e.getItem?.()?.getSource?.()===r)for(let e=0;!o&&e<i.length;e++)o=a.CoordUtils.isRangesIntersect(t,i[e]);n=o}n&&s.setMode(null),l?.()?.focus(),i.onPaste?.(e,t)})(t,n)}catch(e){o?.showError(e)}},m=async(e,t,n)=>{let r=d.element?.();if(r&&await a.DOMUtils.whenFocus(r),!e&&!t)return;let i=await o?.showBusy?.((0,a.t)(`clipboard.pasting`));if(t)try{await p(d,t,n),i?.();return}catch(e){i?.(),o?.showError(e)}if(!e)return void i?.();let s=d.importFromExternal;s||=()=>({getItemType:()=>`text`,toText:()=>e?.text??``,isClipboardItem:!0});let c=null;try{c=await s(e,{isCut:!1})}catch(e){i?.(),o?.showError(e)}if(c)try{let e=await Promise.resolve(c);await p(d,e,n),i?.()}catch(e){i?.(),o?.showError(e)}else i?.()},h=async e=>{if(!d.element)return;let t=c.getClipboard();try{let n=await t.readReference();if(n)return void await m(null,n,e??{});let r=[];r[0]=await a.ClipboardUtils.readStringFromClipboard(t,a.MimeType.Plain),r[1]=await a.ClipboardUtils.readHTMLFromClipboard(t,a.MimeType.Html),r[2]=await a.ClipboardUtils.readBlobFromClipboard(t,a.MimeType.Png);let i={text:r[0]??null,html:r[1]??null,image:r[2]??null};await m(i,null,e??{})}catch(e){if(e?.message===`Document is not focused.`)return;o?.showError(e)}};e.updateCommand(`copy`,{callback:()=>f()}),e.updateCommand(`cut`,{callback:()=>f({isCut:!0})}),e.updateCommand(`paste`,{callback:()=>h()}),e.updateCommand(`pasteValues`,{callback:e=>h({...ha,...e})}),e.updateCommand(`pasteFormats`,{callback:(e,t)=>h({...ga,description:t?.getLabel(),...e})}),e.updateCommand(`pasteFormulas`,{callback:(e,t)=>h({..._a,description:t?.getLabel(),...e})}),e.updateCommand(`pasteTranspose`,{callback:(e,t)=>h({...va,description:t?.getLabel(),...e})}),e.updateCommand(`pasteLinks`,{callback:(e,t)=>h({...ya,description:t?.getLabel(),...e})}),e.updateCommand(`formatPainterToggle`,{state:s.getMode()?.key===`formatPainter`,callback:()=>{if(s.getMode()?.key!==`formatPainter`)return f({editMode:{key:`formatPainter`,description:(0,a.messageKey)(`editMode.formatPainter`),cursor:`url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='black' fill='white'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer`}});s.setMode(null)}});let g=[`cut`,`paste`,`pasteValues`,`pasteFormats`,`pasteFormulas`,`pasteTranspose`,`pasteLinks`,`formatPainterToggle`],_=()=>{let t=r.getProtection().isFormatCellsAllowed()?[]:[(0,a.messageKey)(`reason.sheetProtected`)];for(let n of g)e.updateCommand(n,{disabledReasons:t})};_();let v=c.getClipboard(),y=async()=>{s.getMode()?.key!==`edit`&&(e=>{let t=e?.getItemType()===`range`?e:null;if(t){let n=e.editMode?.(),r={...e?.isCut?.()?ma:pa,...n,args:{isClipboard:!0,reference:t,...n?.args},onModeChange:e=>{e?.args?.isClipboard||c.getClipboard().clear(!0),n?.onModeChange?.(e)}};s.setMode(r)}i.onClipboardUpdate?.(t)})(await v.readReference())},b={safari:(0,a.messageKey)(`error.clipboard.safari`),perms:(0,a.messageKey)(`error.clipboard.perms`)},x=e=>o?.showMessage?.((0,a.t)(b[e.code]),{onceKey:`clipboard.features`}),S=()=>x(a.InternalClipboard.ErrorMessages.PermsRead),C=()=>x(a.InternalClipboard.ErrorMessages.PermsWrite);v.addEventListener(`clipboardchange`,y),v.addEventListener(`clipboarderrorread`,S),v.addEventListener(`clipboarderrorwrite`,C);let w=r.addListeners({onProtectionChange:_,onInvalidated:_});return()=>{v.removeEventListener(`clipboardchange`,y),v.removeEventListener(`clipboarderrorread`,S),v.removeEventListener(`clipboarderrorwrite`,C),w()}}var{CommandScopeProvider:xa,useCommandExecute:Sa}=s.Command,Ca=({sheet:e,className:t,...n})=>{let a=(0,s.useNotifier)(),c=(0,s.useEditMode)(),l=(0,s.useGlobalClipboard)(),u=(0,o.useGridPane)(),d=Sa(),f=c.getMode(),p=(0,r.useMemo)(()=>({sheet:e,notifier:a,editModeHandler:c,globalClipboard:l,element:u.getElement}),[e,a,c,l,u]),m=f?.key,h=m===`copy`||m===`cut`||m===`formatPainter`,g=f?.args?.reference,_=g?.getItem?.(),v=_?.getSource()===e,y=_?.getCoords?.();return(0,i.jsx)(xa,{spec:{scopeName:`layer:clipboard`,contributor:{dynamic:ba},data:p},order:(0,o.useLayer)().zIndex,children:(0,i.jsx)(o.Layer,{onKeyDown:async e=>{let t=c.getMode()?.key,n=t===`copy`||t===`cut`;(n||t===`formatPainter`)&&(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),c.setMode(null)):n&&e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),await d(`paste`),c.setMode(null)))},...n,className:P(t,`clipboard`),children:h&&g&&v&&y&&(0,i.jsx)(o.RangeRect,{range:y,alignWidth:2,stroke:g.isCut?.()?`var(--sxl-color-warning)`:`var(--sxl-color-primary)`,animatedStroke:!0,clipInsets:o.SELECTION_CLIP_INSETS})})})};Ca.displayName=`SheetClipboardLayer`;var wa=(0,r.createContext)(null);wa.displayName=`DocThemesContext`;var Ta=()=>{let e=(0,r.useContext)(wa),[n]=(0,r.useState)(()=>new t.ThemeCollection);return(0,r.useMemo)(()=>e||n,[e])},Ea=e=>{let n=e?.prefix??t.SYSTEM_COLOR_CSS_PREFIX,r=new Map,i=null,a=(a,o=!1)=>{if(typeof document>`u`)return null;let s=e?.element?.()??document.body;if(!s)return null;let c=`${a}|${o?`d`:`l`}`;if(r.has(c))return r.get(c);let l=(e=>(i||(i=document.createElement(`span`),i.setAttribute(`aria-hidden`,`true`),i.style.cssText=`position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;`),i.parentElement!==e&&e.appendChild(i),i))(s);if(!l)return r.set(c,null),null;let u=n+a.toLowerCase();if(!getComputedStyle(l).getPropertyValue(u).trim())return r.set(c,null),null;l.style.color=o?`var(${u}-dark, var(${u}))`:`var(${u})`;let d=getComputedStyle(l).color;l.style.color=``;let f=(e=>{let n=e?e.match(/[\d.]+/g):null;if(!n||n.length<3)return null;let r=n.length>=4?`rgba(${n[0]},${n[1]},${n[2]},${n[3]})`:`rgb(${n[0]},${n[1]},${n[2]})`;try{return t.Color.parse(r)}catch{return null}})(d);return r.set(c,f),f};return a.invalidate=()=>{r.clear(),t.Color.invalidateSystemColors()},a},Da=`sxl-system-colors`,Oa=()=>{if(typeof document>`u`||document.getElementById(Da))return;let e=t.Color.getSystemColorDefaults(),n=Object.keys(e).map(n=>`${t.SYSTEM_COLOR_CSS_PREFIX}${n}:${e[n]};`).join(``),r=document.createElement(`style`);r.id=Da,r.textContent=`:root{${n}}`,document.head.appendChild(r)},ka=()=>{(0,r.useMemo)(()=>{Oa()},[])},Aa=null,ja=[[t.IColor.Named.Window,`var(--sxl-color-base-100)`],[t.IColor.Named.Menu,`var(--sxl-color-base-100)`],[t.IColor.Named.BtnFace,`var(--sxl-color-base-100)`],[t.IColor.Named.InfoBk,`var(--sxl-color-base-100)`],[t.IColor.Named.ScrollBar,`var(--sxl-color-base-100)`],[t.IColor.Named.AppWorkspace,`var(--sxl-color-base-100)`],[t.IColor.Named.Background,`var(--sxl-color-base-100)`],[t.IColor.Named.WindowText,`var(--sxl-color-base-content)`],[t.IColor.Named.MenuText,`var(--sxl-color-base-content)`],[t.IColor.Named.BtnText,`var(--sxl-color-base-content)`],[t.IColor.Named.InfoText,`var(--sxl-color-base-content)`],[t.IColor.Named.CaptionText,`var(--sxl-color-base-content)`],[t.IColor.Named.GrayText,`color-mix(in srgb, var(--sxl-color-base-content) 45%, transparent)`],[t.IColor.Named.InactiveCaptionText,`color-mix(in srgb, var(--sxl-color-base-content) 45%, transparent)`],[t.IColor.Named.Highlight,`var(--sxl-color-primary)`],[t.IColor.Named.ActiveCaption,`var(--sxl-color-primary)`],[t.IColor.Named.HotLight,`var(--sxl-color-primary)`],[t.IColor.Named.HighlightText,`var(--sxl-color-primary-content)`],[t.IColor.Named.BtnHighlight,`var(--sxl-color-base-200)`],[t.IColor.Named.Light3d,`var(--sxl-color-base-200)`],[t.IColor.Named.InactiveCaption,`var(--sxl-color-base-200)`],[t.IColor.Named.ActiveBorder,`var(--sxl-color-base-300)`],[t.IColor.Named.InactiveBorder,`var(--sxl-color-base-300)`],[t.IColor.Named.WindowFrame,`var(--sxl-color-base-300)`],[t.IColor.Named.BtnShadow,`var(--sxl-color-neutral)`],[t.IColor.Named.DkShadow3d,`var(--sxl-color-neutral)`]],Ma={};for(let[e,t]of ja)Ma[`sys-color-${e.toLowerCase()}`]=t;var Na={light:Ma,dark:Ma},Pa=(e=`sxl-defaults`,t)=>(0,s.buildThemeCSS)({app:Na,surfaces:{grid:Na,header:Na},layer:e,scope:t}),Fa=(e,t)=>{let n=``;if(e&&(n=e.includes(` `)?`"${e}"`:e),t)for(let e=0;e<t.length;e++)n.length>0&&(n+=`, `),n+=t[e];return n},Ia=(e,t)=>{let n=t??[];return e===`Aptos Narrow`?[`Calibri`,...n]:n},La=(e,t,n)=>{let r=e.getColorScheme(),i=e.getFontScheme();return{"doc-color-dk1":r.getDk1().toCSS(n),"doc-color-dk2":r.getDk2().toCSS(n),"doc-color-lt1":r.getLt1().toCSS(n),"doc-color-lt2":r.getLt2().toCSS(n),"doc-color-accent1":r.getAccent1().toCSS(n),"doc-color-accent2":r.getAccent2().toCSS(n),"doc-color-accent3":r.getAccent3().toCSS(n),"doc-color-accent4":r.getAccent4().toCSS(n),"doc-color-accent5":r.getAccent5().toCSS(n),"doc-color-accent6":r.getAccent6().toCSS(n),"doc-color-hlink":r.getHlink().toCSS(n),"doc-color-fol-hlink":r.getFolHlink().toCSS(n),"doc-font-major":Fa(i.getMajorFont(),Ia(i.getMajorFont(),i.getMajorFallbacks())),"doc-font-minor":Fa(i.getMinorFont(),Ia(i.getMinorFont(),i.getMinorFallbacks())),"doc-font-size":`${t}pt`}},Ra=(e,t=11,n=`sxl-defaults`,r)=>(0,s.buildThemeCSS)({app:{light:La(e,t,!1),dark:La(e,t,!0)},layer:n,scope:r}),za={Mode:`themeMode`,DarkGrid:`enableDarkGrid`,DarkImages:`enableDarkImages`},Ba=e=>{let[t]=(0,s.usePersistenceState)(za.Mode,null),[n]=(0,s.usePersistenceState)(za.DarkGrid,!1),{themeMode:r}=(0,s.useResolvedThemeMode)({mode:e??t??void 0});return e||(r===`dark`&&n?`dark`:`light`)},Va=()=>{let[e]=(0,s.usePersistenceState)(za.Mode,null),{themeMode:t}=(0,s.useResolvedThemeMode)({mode:e??void 0});return t},Ha=`_sheet-scrollbar_104cg_1`,Ua=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{style:n=s.ReactUtils.EmptyCssProperties,orientation:o,sheet:c,onShowTooltip:u,onCloseTooltip:d,onScrollOffset:f,showCustomScrollButtons:p,offset:m=0,totalSize:h=0,viewportSize:g=0,className:_,endGap:v,...y}=e;if(!c)throw Error(`SheetScrollbar needs an ISheet`);let b=(0,s.useCallbackRef)(u,[u]),x=(0,s.useCallbackRef)(d,[d]),S=(0,r.useRef)(null),C=cn([S,t]),w=o===s.ScrollbarOrientation.Vertical,T=(0,s.useTranslator)(),[E,D]=(0,r.useState)(()=>{let e=(c.getView().getZoomScale()??100)/100,t=c.getView().getTopLeft();return(w?t.top:t.left)*e}),O=()=>{let e=c.getView().getFreezePanes(),t=(c.getView().getZoomScale()??100)/100;if(w){let n=e.coords?.rowIndex??0;if(n===0)return{shift:0,scroll:0};let r=e.topLeft?.top??0;return{shift:(c.getRowHeaders().getOffset(n)-r)*t,scroll:r*t}}{let n=e.coords?.colIndex??0;if(n===0)return{shift:0,scroll:0};let r=e.topLeft?.left??0;return{shift:(c.getColumnHeaders().getOffset(n)-r)*t,scroll:r*t}}},[k,A]=(0,r.useState)(O),[j,M]=(0,r.useState)(null),[N,F]=(0,r.useState)(!1),I=o===s.ScrollbarOrientation.Vertical?c.getRowHeaders():c.getColumnHeaders(),L=()=>{let e=c.getUsedRange()?.getCoords()??a.CoordUtils.EmptyRange,t=c.getSelection().getCoords().cell;return{colIndex:Math.max(e.colEnd,t.colIndex),rowIndex:Math.max(e.rowEnd,t.rowIndex)}},[R,z]=(0,r.useState)(L),B=R?(w?R.rowIndex:R.colIndex)+1:0,V=()=>{let e=L();a.CoordUtils.isEqualCells(R,e)||z(e)};l(c.getView(),{onFreezePaneChange:()=>{A(O)}}),l(c.getSelection(),{onChange:V}),l(c,{onUsedRangeChange:V}),(0,r.useEffect)(()=>{z(L())},[c]);let H=m-k.scroll,U=g-k.shift,W=h-(k.shift+k.scroll),G=I.getOffset(B)*(c.getView().getZoomScale()/100)-(k.scroll+k.shift);(0,r.useEffect)(()=>{if(!j)return N&&x?.(),void F(!1);ee(w,E,U,v,j,c,I,k)},[w,m,E,U,v,k,o,j,I,N,c]);let K=(0,s.useCallbackRef)((e,t,n)=>{D(e);let r=e+k.scroll,i=t+k.shift,a=n+k.shift+k.scroll;f?.(r,i,a)},[f,k]),q=(0,r.useCallback)((e,t,n,r,i,a,c,l)=>{let u=c.getTextAt(c.getIndex(t/(a.getView().getZoomScale()/100)+l.scroll+l.shift)),d={...i,display:o===s.ScrollbarOrientation.Vertical?T(`scrollbar.row`,{title:u}):T(`scrollbar.column`,{title:u})},f=i.element??S.current?.querySelector(`[role="slider"]`);if(f){let t=f.getBoundingClientRect();d.anchor=e?{x:t.left,y:t.top+t.height/2}:{x:t.left+t.width/2,y:t.top}}d.anchor&&(F(!0),b?.(d))},[T]),ee=(0,s.useCallbackRef)(a.TimerUtils.debounce(q,0),[q]),te=(0,s.useCallbackRef)(e=>{M(e.dragging?{element:e.element}:null)},[]);return(0,r.useMemo)(()=>(0,i.jsx)(s.VirtualScrollbar,{ref:C,className:P(_,Ha),style:n,offset:H,viewportSize:U,totalSize:W,orientation:o,showCustomScrollButtons:p,onMouseDown:e=>{e.preventDefault()},onScrollOffset:K,minSize:G,onThumbDrag:te,...y}),[_,H,U,W,o,p,n,G,v])}));Ua.displayName=`SheetScrollbar`;var Wa=(0,r.memo)((0,r.forwardRef)((e,n)=>{let{sheetHeader:a,oppositeSize:c=30,edgeSize:u=1,edgeColor:d=`var(--sxl-color-base-300)`,headerText:f,freezeStart:p,colorScheme:m,verticalPadding:h,horizontalPadding:g,onSheetContextMenu:_,onResizeHeadersStart:v,onResizeHeaders:y,onResizeHeadersEnd:b,onResizeHeadersDown:x,onResizeHeadersUp:S,viewport:C,onSelectionStart:w,onSelectionEnd:T,propsCellRender:E,style:D,className:O,...k}=e,A=(0,r.useMemo)(()=>a.getAxis(),[a]),j=(0,s.useCallbackRef)(v,[v]),M=(0,s.useCallbackRef)(y,[y]),N=(0,s.useCallbackRef)(b,[b]),F=(0,s.useCallbackRef)(x,[x]),I=(0,s.useCallbackRef)(S,[S]),L=(0,r.useRef)(null),[R,z]=(0,r.useReducer)(e=>e+1,0),B=a?.getSheet(),V=(0,r.useRef)(!1);(0,r.useLayoutEffect)(()=>{V.current=!0},[a]);let[U,W]=(0,r.useState)(0),[G,K]=(0,r.useState)(B?.getView().getZoomScale()/100);l(a,{onSizesChange:e=>{K(B?.getView().getZoomScale()/100),ne(J()),W(a.getEntireRange().getCoords().max+1)}}),(0,r.useLayoutEffect)(()=>{K(a?.getSheet().getView().getZoomScale()/100),ne(J())},[a,c]);let q=(0,r.useCallback)((e,t)=>a.hiddenHeadersAt(e,t),[(0,r.useCallback)(e=>a.at(e)?.isHidden()||a.at(e)?.getSize()===0,[a])]),ee=(0,s.useCallbackRef)(e=>a.isSelected(e),[a]),te=(0,s.useCallbackRef)(e=>a.isSelectedAll(e),[a]),J=()=>{let e=A===t.IRange.Axis.Column;return{getColOffset:t=>e?a.getOffset(t):t===0?0:c/G,getColIndex:t=>e?a.getIndex(t):0,getRowOffset:t=>e?t===0?0:c/G:a.getOffset(t),getRowIndex:t=>e?0:a.getIndex(t)}},[Y,ne]=(0,r.useState)(()=>J()),X=(0,r.useMemo)(()=>(0,i.jsx)($i,{sheetHeader:a,isColumn:A===t.IRange.Axis.Column,oppositeSize:c,onResizeHeadersStart:j,onResizeHeaders:M,onResizeHeadersEnd:N,onResizeHeadersDown:F,onResizeHeadersUp:I},`header-resizer-layer-${A}-[${a.getSheet().getId()}]`),[a,c,A,R]),re=(0,s.useCallbackRef)(e=>{let n=A===t.IRange.Axis.Column;_?.({...e,rowIndex:n?-1:e.rowIndex,colIndex:n?e.colIndex:-1})},[A,_]),Z=(0,s.useCallbackRef)(e=>{B?.scrollTo({colStart:e.colIndex,colEnd:e.colIndex,rowStart:e.rowIndex,rowEnd:e.rowIndex},{})},[B]),ie=(0,r.useMemo)(()=>(0,i.jsx)(Ji,{selection:a.getSheet().getSelection(),axis:A,entireCoords:a.getSheet().getEntireRange().getCoords(),edgeSize:u,edgeColor:d,scrollIntoView:Z,onPointerDownInterceptor:(e,n)=>!(e.button===2&&a.isSelectedAll(A===t.IRange.Axis.Column?n.colIndex:n.rowIndex)),onSelectionStart:w,onSelectionEnd:T},`header-selection-layer-${A}-[${a.getSheet().getId()}]`),[a,U,p,u,d,Z]),ae=(0,r.useMemo)(()=>(0,i.jsx)(ua,{axis:A,entireCoords:a.getSheet().getEntireRange().getCoords(),scrollIntoView:Z},`header-reference-layer-${A}-[${a.getSheet().getId()}]`),[a,U,p,A,Z]),oe=(0,r.useMemo)(()=>_?(0,i.jsx)(la,{sheet:a.getSheet(),onSheetContextMenu:re},`context-menu-layer-${A}-[${a.getSheet().getId()}]`):null,[a,_,R]),se=(0,s.useCallbackRef)(e=>f?f(e):a.getTextAt(e),[f,a]),ce=(0,s.useCallbackRef)(e=>{let{range:n,key:r,...o}=e,s=A===t.IRange.Axis.Column?n?.colStart??e.cell.colIndex:n?.rowStart??e.cell.rowIndex,c=a.at(s);return(0,i.jsx)(H,{axis:A,index:s,isSelected:ee,isSelectedAll:te,zoomScale:100*G,headerText:se,verticalPadding:h,horizontalPadding:g,onColumnButtonMouseDown:E?.onColumnButtonMouseDown,propsColumnButton:E?.propsColumnButton,renderColumnButton:E?.renderColumnButton,...o,value:c},`${r}-${A}-[${a.getSheet().getId()}]`)},[R,E,U,G,a]),le=(0,s.useEditMode)(),ue=(0,s.useImperativeElement)(n,()=>({scrollTo:e=>{L.current?.scrollTo(e)},forceRender:()=>{z()},getGridSurface:()=>L.current}),[]),Q=(0,r.useMemo)(()=>{if(C)return A===t.IRange.Axis.Column?new s.AxisViewport(C,new s.Viewport,!0,!1,C):new s.AxisViewport(new s.Viewport,C,!1,!0,C)},[C,A]),de=m===`dark`?`dark`:`light`,$=(0,r.useMemo)(()=>{let e={overflow:`visible`,...(B?.getStyles().getNormal().getFont()).toCSS(`adaptive`,1),...D},n=`white`,r=`black`;if(s.ReactUtils.detectIt().primaryInput!==`touch`){let i=A===t.IRange.Axis.Column?`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 8,14.5 2.3125,8.8125 h 3.25 V 1.5 h 4.875 v 7.3125 h 3.25 z' stroke='${r}' fill='${n}'/%3E%3C/g%3E%3C/svg%3E%0A") 8 15, pointer`:`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${r}' fill='${n}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`;le.getMode()?.key===`formatPainter`&&(i=`url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='${r}' fill='${n}'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer`),e.cursor=i}e.backgroundColor=`var(--sxl-color-base-100)`;let i=A===t.IRange.Axis.Column;return e.boxSizing=`border-box`,e.width=i?`100%`:c,e.height=i?c:`100%`,e.contain=`size layout style`,e.clipPath=i?`inset(-9999px 0px -9999px 0px)`:`inset(0px -9999px 0px -9999px)`,e},[A,le,m,D,c,R]),fe=(0,r.useMemo)(()=>[(0,i.jsx)(Ln,{header:a,renderCell:ce},`header-cells-${A}-[${a.getSheet().getId()}]`),ie,ae,X,oe],[X,ie,ae,oe,a,ce,A]),pe=(0,r.useMemo)(()=>{let e=A===t.IRange.Axis.Column;return(0,i.jsx)(o.GridSurface,{ref:cn([ue,L]),className:P(O,`sheet-header`),style:$,...(0,s.themeSurfaceProps)(`header`,de),viewport:Q,columnCount:e?U:1,rowCount:e?1:U,freezeLeft:e?p:void 0,freezeTop:e?void 0:p,hiddenColumnsAt:e?q:void 0,hiddenRowsAt:e?void 0:q,metrics:Y,...k,children:fe})},[U,fe,Y,Q,$,O,de,k]);return(0,r.useEffect)(()=>{V.current=!1,L.current?.invalidate()},[a]),pe})),Ga=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{sheet:n,colorScheme:a,className:o,style:c,width:u,height:d,onMouseDown:f,...p}=e,[m,h]=(0,r.useState)(n.getSelection().isEntire()),[g,_]=(0,r.useState)(!1),[v]=(0,s.useCommands)(`selectAll`);l(n?.getSelection(),{onChange:()=>{h(n.getSelection().isEntire()),_(n.getSelection().hasTopOrLeft())}});let y=a===`dark`?`dark`:`light`,b=m?`var(--sxl-color-primary)`:`var(--sxl-color-base-100)`,x=m?`color-mix(in srgb, var(--sxl-color-primary) 20%, transparent)`:`var(--sxl-color-base-hover)`,S=`var(--sxl-color-base-300)`,C=s.ReactUtils.getDevicePixelRatio(),w=e=>e/C+`px`;return(0,i.jsxs)(`div`,{tabIndex:-1,className:P(o,`top-left-corner`),...(0,s.themeSurfaceProps)(`header`,y),...p,onMouseDown:e=>{v?.execute(e.ctrlKey||e.button!==0),f?.(e)},style:{gridColumn:`1 / 2`,gridRow:`1 / 2`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxSizing:`border-box`,position:`relative`,cursor:`cell`,zIndex:100,borderRight:`solid ${w(1)} ${S}`,borderBottom:`solid ${w(1)} ${S}`,...c},ref:t,children:[(0,i.jsx)(`div`,{style:{height:d-5+`px`,width:d-5+`px`,clipPath:`path('M${d-5} 0 L0 ${d-5} L${d-5} ${d-5} L${d-5} 0 Z')`,borderRight:`${w(2)} solid ${b}`,borderBottom:`${w(2)} solid ${b}`,background:`${x}`,boxSizing:`border-box`,position:`absolute`,right:w(2),bottom:w(2)}}),(0,i.jsx)(`div`,{style:{position:`absolute`,right:w(-2),bottom:w(-2),width:w(g?2:1),height:w(g?2:1),background:g?`var(--sxl-color-primary)`:`var(--sxl-color-base-300)`}})]})}));Ga.displayName=`TopLeftCorner`;var Ka=Object.freeze([{key:`lightRedFillDarkRedText`,style:{font:{color:`#9C0006`},fill:{type:`solid`,color:`#FFC7CE`}}},{key:`yellowFillDarkYellowText`,style:{font:{color:`#9C6500`},fill:{type:`solid`,color:`#FFEB9C`}}},{key:`greenFillDarkGreenText`,style:{font:{color:`#006100`},fill:{type:`solid`,color:`#C6EFCE`}}},{key:`lightRedFill`,style:{fill:{type:`solid`,color:`#FFC7CE`}}},{key:`redText`,style:{font:{color:`#9C0006`}}},{key:`redBorder`,style:{border:{[t.IBorder.Edge.Left]:{style:t.IBorder.StrokeStyle.Thin,color:`#9C0006`},[t.IBorder.Edge.Top]:{style:t.IBorder.StrokeStyle.Thin,color:`#9C0006`},[t.IBorder.Edge.Right]:{style:t.IBorder.StrokeStyle.Thin,color:`#9C0006`},[t.IBorder.Edge.Bottom]:{style:t.IBorder.StrokeStyle.Thin,color:`#9C0006`}}}}]),qa=`#F8696B`,Ja=`#FFEB84`,Ya=`#63BE7B`,Xa=`#FCFCFF`,Za=`#5A8AC6`,Qa=`#FFEF9C`,$a=e=>{let n=e.map((n,r)=>r===0?{type:t.IConditionalFormat.ColorStopType.Min,color:n}:r===e.length-1?{type:t.IConditionalFormat.ColorStopType.Max,color:n}:{type:t.IConditionalFormat.ColorStopType.Percentile,value:50,color:n});return{type:t.IConditionalFormat.ScaleType.ColorScale,stops:n}},eo=Object.freeze([$a([Ya,Ja,qa]),$a([qa,Ja,Ya]),$a([Ya,Xa,qa]),$a([qa,Xa,Ya]),$a([Za,Xa,qa]),$a([qa,Xa,Za]),$a([Xa,qa]),$a([qa,Xa]),$a([Ya,Xa]),$a([Xa,Ya]),$a([Ya,Qa]),$a([Qa,Ya])]),to=Object.freeze([`#638EC6`,`#63C384`,`#FF555A`,`#FFB628`,`#008AEF`,`#D6007B`]),no=(e,n)=>({type:t.IConditionalFormat.ScaleType.DataBar,stops:[{type:t.IConditionalFormat.ColorStopType.AutoMin},{type:t.IConditionalFormat.ColorStopType.AutoMax}],color:e,...n?{gradient:!0,borderColor:e}:null}),ro=Object.freeze([...to.map(e=>no(e,!0)),...to.map(e=>no(e,!1))]),io=()=>structuredClone(eo[1]),ao=()=>structuredClone(ro[0]),oo=e=>{let n=[];for(let r=0;r<e;r++)n.push({type:t.IConditionalFormat.ColorStopType.Percent,value:Math.round(100*r/e)});return n},so=()=>({type:t.IConditionalFormat.ScaleType.IconSet,iconSet:t.IStyle.IconSet.TrafficLights3,stops:oo(3)}),co=Object.freeze([{key:`directional`,sets:[t.IStyle.IconSet.Arrows3,t.IStyle.IconSet.ArrowsGray3,t.IStyle.IconSet.Triangles3,t.IStyle.IconSet.Arrows4,t.IStyle.IconSet.ArrowsGray4,t.IStyle.IconSet.Arrows5,t.IStyle.IconSet.ArrowsGray5]},{key:`shapes`,sets:[t.IStyle.IconSet.TrafficLights3,t.IStyle.IconSet.TrafficLights3_2,t.IStyle.IconSet.TrafficLights4,t.IStyle.IconSet.Signs3,t.IStyle.IconSet.RedToBlack4]},{key:`indicators`,sets:[t.IStyle.IconSet.Symbols3,t.IStyle.IconSet.Symbols3_2,t.IStyle.IconSet.Flags3]},{key:`ratings`,sets:[t.IStyle.IconSet.Stars3,t.IStyle.IconSet.Rating4,t.IStyle.IconSet.Rating5,t.IStyle.IconSet.Quarters5,t.IStyle.IconSet.Boxes5]}]),lo=(e,t)=>e?[t]:[],uo=new Set([`formatTextRotate0`,`formatTextRotate45`,`formatTextRotate90`,`formatTextRotate270`,`formatTextRotate315`,`formatTextRotateCustom`,`formatTextRotateVertical`]),fo=new Set([`dataTextToColumns`,`sortAscending`,`sortDescending`]);function po(e,n){let r=()=>n.getView();e.updateCommand(`gridlinesToggle`,{callback:()=>{let e=r().isShowColumnGridlines()&&r().isShowRowGridlines();r().update({showColumnGridlines:!e,showRowGridlines:!e})}}),e.updateCommand(`sheetViewToggleGridlinesRows`,{callback:()=>{r().setShowRowGridlines(!r().isShowRowGridlines())}}),e.updateCommand(`sheetViewToggleGridlinesColumns`,{callback:()=>{r().setShowColumnGridlines(!r().isShowColumnGridlines())}}),e.updateCommand(`sheetViewFormatGridlinesColor`,{callback:e=>{r().setGridLineColor(e)},context:()=>({...ho(n),autoColor:null,onColorSelect:()=>{}})}),e.updateCommand(`sheetViewToggleShowHeadings`,{callback:()=>{let e=r().isShowColumnHeaders()&&r().isShowRowHeaders();r().update({showColumnHeaders:!e,showRowHeaders:!e})}}),e.updateCommand(`sheetViewToggleShowHeadingColumns`,{callback:()=>{r().setShowColumnHeaders(!r().isShowColumnHeaders())}}),e.updateCommand(`sheetViewToggleShowHeadingRows`,{callback:()=>{r().setShowRowHeaders(!r().isShowRowHeaders())}}),e.updateCommand(`sheetViewToggleShowHeadingsNumeric`,{callback:()=>{let e=r(),n=e.getColumnHeaderStyle()===t.ISheetView.HeaderTextStyle.Zero&&e.getRowHeaderStyle()===t.ISheetView.HeaderTextStyle.Zero;e.update({columnHeaderStyle:n?t.ISheetView.HeaderTextStyle.A1:t.ISheetView.HeaderTextStyle.Zero,rowHeaderStyle:n?t.ISheetView.HeaderTextStyle.One:t.ISheetView.HeaderTextStyle.Zero})}}),e.updateCommand(`sheetViewToggleFormulaView`,{callback:()=>{r().setShowFormulas(!r().isShowFormulas())}}),e.updateCommand(`sheetViewToggleShowZeros`,{callback:()=>{r().setShowZeros(!r().isShowZeros())}}),e.updateCommand(`calculate`,{callback:()=>{n.calculate()}}),e.updateCommand(`sheetZoomOut`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().zoomOut()}}),e.updateCommand(`sheetZoomIn`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().zoomIn()}}),e.updateCommand(`sheetZoom100`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setZoomScale(100)}}),e.updateCommand(`sheetZoom200`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setZoomScale(200)}}),e.updateCommand(`sheetZoom75`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setZoomScale(75)}}),e.updateCommand(`sheetZoom50`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setZoomScale(50)}}),e.updateCommand(`sheetZoom25`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setZoomScale(25)}}),e.updateCommand(`sheetZoomCustom`,{tags:[`noTransaction`,`noRepeat`],callback:e=>{r().setZoomScale(e??100)}});let i=()=>(r().getFreezePanes().coords?.rowIndex??0)!==0,o=()=>(r().getFreezePanes().coords?.colIndex??0)!==0;e.updateCommand(`freezeToggle`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{let e=n.getSelectedCell().getCoords();i()||o()?r().setFreezePanes(null):r().setFreezePanes({coords:e})}}),e.updateCommand(`freezeToggleHorizontal`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{let e=n.getSelectedCell().getCoords();r().setFreezePanes({coords:{rowIndex:i()?0:e.rowIndex}})}}),e.updateCommand(`freezeToggleVertical`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{let e=n.getSelectedCell().getCoords();r().setFreezePanes({coords:{colIndex:o()?0:e.colIndex}})}}),e.updateCommand(`unfreeze`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setFreezePanes(null)}});let s=()=>{let s=r(),c=s.getColumnHeaderStyle()===t.ISheetView.HeaderTextStyle.Zero&&s.getRowHeaderStyle()===t.ISheetView.HeaderTextStyle.Zero;e.updateCommand(`gridlinesToggle`,{state:s.isShowColumnGridlines()||s.isShowRowGridlines()}),e.updateCommand(`sheetViewToggleGridlinesColumns`,{state:s.isShowColumnGridlines()}),e.updateCommand(`sheetViewToggleGridlinesRows`,{state:s.isShowRowGridlines()}),e.updateCommand(`sheetViewToggleShowHeadings`,{state:s.isShowColumnHeaders()||s.isShowRowHeaders()}),e.updateCommand(`sheetViewToggleShowHeadingColumns`,{state:s.isShowColumnHeaders()}),e.updateCommand(`sheetViewToggleShowHeadingRows`,{state:s.isShowRowHeaders()}),e.updateCommand(`sheetViewToggleShowHeadingsNumeric`,{state:c}),e.updateCommand(`sheetViewToggleFormulaView`,{state:s.isShowFormulas()}),e.updateCommand(`sheetViewToggleShowZeros`,{state:s.isShowZeros()}),e.updateCommand(`sheetViewFormatGridlinesColor`,{state:s.getGridLineColor()});let l=s.getZoomScale();e.updateCommand(`sheetZoom200`,{state:l===200}),e.updateCommand(`sheetZoom100`,{state:l===100}),e.updateCommand(`sheetZoom75`,{state:l===75}),e.updateCommand(`sheetZoom50`,{state:l===50}),e.updateCommand(`sheetZoom25`,{state:l===25}),e.updateCommand(`sheetZoomCustom`,{state:l});let u=n.getSelectedCell().getCoords();if(!u)return;let d=i(),f=o(),p=d||f;e.updateCommand(`freezeToggle`,{state:p,disabledReasons:p||u.rowIndex!==0||u.colIndex!==0?[]:[(0,a.messageKey)(`reason.freezeOrigin`)]}),e.updateCommand(`freezeToggleHorizontal`,{state:d,disabledReasons:d||u.rowIndex!==0?[]:[(0,a.messageKey)(`reason.freezeOrigin`)]}),e.updateCommand(`freezeToggleVertical`,{state:f,disabledReasons:f||u.colIndex!==0?[]:[(0,a.messageKey)(`reason.freezeOrigin`)]}),e.updateCommand(`unfreeze`,{disabledReasons:p?[]:[(0,a.messageKey)(`reason.noFreeze`)]})};s();let c=n.addListeners({onViewChange:s}),l=n.getSelection().addListeners({onChange:s});return()=>{c(),l()}}var mo=new t.Color(`transparent`);function ho(e){let t=e.getStyles();return{schemeLookup:t.schemeLookup(),recentColors:()=>t.recentColors(),addRecentColor:e=>t.addRecentColor(e),clearRecentColors:()=>t.clearRecentColors()}}function go(e,n,r){e.updateCommand(`dataRemoveDuplicates`,{callback:async e=>{let t=n.getSelectedRanges();t.getCount()>1?r?.showError(new a.ExpectedError((0,a.t)(`error.removeDuplicates.multipleRanges`))):t.at(0).removeDuplicates({autoSelect:!0,...e})}}),e.updateCommand(`dataTextToColumns`,{callback:async e=>{let t=n.getSelectedRanges();if(t.getCount()>1)return void r?.showError(new a.ExpectedError((0,a.t)(`error.textToColumns.multipleRanges`)));let i=typeof e==`string`?{delimiter:e}:e;t.at(0).textToColumns({autoSelect:!0,...i})}});let i=async(e,i,o,s)=>{let c=i,l=n.getSelectedRange(),u=n.getSelectedCell(),d=u.getCoords();if(!c){let e=n.getTables().getItems({address:n.getSelectedCell().getCoords()})[0]??n.getAutoTable();if(e){let t=e.getRange();t.getIntersect(d)&&(c=e.getSortAt(d.colIndex-t.getCoords().colStart))}}let f;if(c){let e=c;f=t=>{let n={...t};delete n.sorts,e.setCriteria(n)},l=e.getRange(),u=l.getCell()}else{let r=n.getSelectedRanges();if(r.getCount()>1)throw new a.ExpectedError((0,a.t)(`error.sort.multipleRanges`));let i=r.at(0);i.size===1&&(i=i.getSurrounding()),l=i,f=n=>{i.doBatch(()=>{let r={...n,...e};i.sort(r),i.autoFit({axes:r?.axis===t.IRange.Axis.Column?t.IRange.AxisSelection.Column:t.IRange.AxisSelection.Row,skipCustomSize:!0,minContent:!0})},s)}}let p=async e=>{if(!e)return;let t=await Promise.resolve(r?.showBusy?.((0,a.t)(s))??null);try{f(e)}catch(e){t?.(),r?.showError?.(e);return}t?.()},m=l.getDefaultSortCriteria(t.IRange.Axis.Row,u);if(!m){if(o)throw new a.ExpectedError((0,a.t)(`error.sort.invalidSelection`));return}if(!o)return void await p({...m.options,...e});let h=l,g=m.options;g.hasHeader&&(h=l.getIntersect(m.sortCoords)),h.select();let _={range:l,cell:u},v={initialValue:g,context:()=>_,onInput:e=>{e&&p(e)}};r?.showWindow?.(`sort`,v)};return e.updateCommand(`sortAscending`,{tags:[`noTransaction`],callback:e=>i({reverse:!1},e,!1,(0,a.messageKey)(`op.sortAscending`))}),e.updateCommand(`sortDescending`,{tags:[`noTransaction`],callback:e=>i({reverse:!0},e,!1,(0,a.messageKey)(`op.sortDescending`))}),e.updateCommand(`sortCustom`,{tags:[`noTransaction`],callback:e=>i({},e,!0,(0,a.messageKey)(`op.sortCustom`))}),()=>{}}function _o(e,t,n,r,i){let o=()=>t.getTables().getItems({address:t.getSelectedCell().getCoords()})[0]??null,s=(e,r=!1)=>{let i=o();if(i)return void i.updateStyleOptions(e);let s=t.getSelectedRanges().getFixed(!0),c=t.getSelectedRange().getDefaultSortCriteria(),l={getNames:()=>t.getNames(),resolveRanges:e=>(t.getWorkbook()??t).getRanges(e).getFixed(!0),table:()=>null,styles:()=>null},u={initialValue:{ranges:s,hasHeader:c?.options?.hasHeader??!1},context:()=>l,onInput:n=>{var i;(i=n??null)&&t.doBatch(async()=>{let n=i.ranges.at(0);r&&n.getStyle().clear(),await t.getTables().add(n,{hasHeader:i.hasHeader,properties:{style:e?.name}}).getRange().select()},{description:(0,a.messageKey)(`op.insertTable`)})}};n?.showWindow?.(`tableNew`,u)};e.updateCommand(`insertTable`,{tags:[`noTransaction`],callback:()=>s()});let c=()=>({styles:()=>t.getStyles(),table:()=>o(),getNames:()=>t.getNames(),resolveRanges:e=>(t.getWorkbook()??t).getRanges(e).getFixed(!0)});e.updateCommand(`formatTableStyle`,{tags:[`noTransaction`],callback:e=>s(e),context:c}),e.updateCommand(`formatTableStyleClearCellStyles`,{tags:[`noTransaction`],callback:e=>s(e,!0),context:c}),e.updateCommand(`editTable`,{tags:[`noTransaction`,`noRepeat`],callback:async n=>{let i=null,a=!1;if(n?.isITable?i=n:n?.getValue?.()&&(i=n.getValue(),a=!0),!i){let e=t.getSelectedRange();e.size===1&&(e=e.getSurrounding()),i=o(),await e.select()}if(!i)return;let s=i;if(a)try{await s.select()}catch{}let c={styles:()=>t.getStyles(),table:()=>s,getNames:()=>t.getNames(),resolveRanges:e=>(t.getWorkbook()??t).getRanges(e).getFixed(!0)};e.updateCommand(`editTable`,{context:()=>c}),r?.(`tableDetails`)}});let l=async(e,r)=>{let i=(e=>e?e.isITable?e:e.getValue?.()??null:o())(e);if(i){if(!r){let e=i.getRange().getCoords(),t=(e.colEnd-e.colStart+1)*(e.rowEnd-e.rowStart+1);if(t>1e4&&n?.showOptions&&await n.showOptions({title:(0,a.t)(`dialog.confirm.title`),description:(0,a.t)(`table.convertToRangeWarning`,{count:t}),options:[{id:`Convert`,label:()=>(0,a.t)(`table.convert`)},`Cancel`],defaultOption:`Convert`})!==`Convert`)return}await t.doBatch(()=>{r?i.delete():i.convertToRange()},{description:r?(0,a.messageKey)(`op.deleteTable`):(0,a.messageKey)(`op.convertTableToRange`)})}};e.updateCommand(`deleteTable`,{tags:[`noTransaction`,`noRepeat`],callback:e=>l(e,!0)}),e.updateCommand(`convertTableToRange`,{tags:[`noTransaction`,`noRepeat`],callback:e=>l(e,!1)}),e.updateCommand(`setDefaultTableStyle`,{tags:[`noTransaction`,`noRepeat`],callback:e=>{t.getStyles().setDefaultTableStyle(e)}}),e.updateCommand(`deleteTableStyle`,{tags:[`noTransaction`,`noRepeat`],callback:e=>{t.getStyles().getTableStyle(e)?.delete()}});let u=()=>{let n=o(),r=t.getTables().getItems({address:t.getSelectedRange()}),i=[...lo(!t.getProtection().isFormatCellsAllowed(),(0,a.messageKey)(`reason.sheetProtected`)),...lo(r.length>0&&!n,(0,a.messageKey)(`reason.tableAmbiguous`))];e.updateCommand(`formatTableStyle`,{params:{hasTable:!!n},disabledReasons:i}),e.updateCommand(`formatTableStyleClearCellStyles`,{disabledReasons:i}),e.updateCommand(`insertTable`,{disabledReasons:[...i,...lo(r.length>0,(0,a.messageKey)(`reason.alreadyTable`))]})};u();let d=()=>{e.updateCommand(`editTable`,{state:i?.getActive()===`tableDetails`})};d();let f=i?.addListener({onChange:d}),p=t.getSelection().addListeners({onChange:u}),m=t.addListeners({onTablesChange:u,onProtectionChange:u});return()=>{p(),m(),f?.()}}function vo(e,n){let r=n.sheet;if(!r)return()=>{};let i=n,o=i?.notifier;e.use(vr({transaction:r,notifier:o,manager:i?.manager})),e.updateCommand(`protectionSheetToggle`,{tags:[`noTransaction`,`noRepeat`],callback:async(e,t)=>{let n=r.getProtection(),i=null;try{if(n.isLocked()){let e=null;if(n.hasPassword()){let t=await o?.showInput({title:(0,a.t)(`dialog.password.title`),description:(0,a.t)(`dialog.password.description`),options:[{id:`Unprotect`,label:()=>(0,a.t)(`dialog.unprotect`)},`Cancel`],defaultOption:`Unprotect`,inputType:`password`});if(t?.option!==`Unprotect`)return;e=t.input}i=await Promise.resolve(o?.showBusy(t?.getLabel?.())??null),await n.unlock(e??void 0)}else i=await Promise.resolve(o?.showBusy(t?.getLabel?.())??null),await n.lock();i?.()}catch(e){i?.(),o?.showError(e)}}}),e.updateCommand(`manageDataValidation`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{i?.activateTaskPane?.(`dataValidationDetails`)}}),e.updateCommand(`manageConditionalFormat`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{i?.activateTaskPane?.(`conditionalFormatDetails`)}}),e.updateCommand(`conditionalFormatNewRule`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{i?.activateTaskPane?.(`conditionalFormatDetails`,{args:{insert:!0}})}});let c=e=>{r.getConditionalFormats().add(r.getSelectedRanges(),e)},l=e=>({tags:[`noTransaction`,`noRepeat`],callback:()=>{i?.activateTaskPane?.(`conditionalFormatDetails`,{args:{draft:{condition:e,style:structuredClone(Ka[0].style)}}})}}),u=t.ICondition.BuiltInOperatorNames,d=t.ICondition.BuiltInSelectorNames;e.updateCommand(`conditionalFormatGreaterThan`,l({selector:d.Number,operator:u.GreaterThan,param:10})),e.updateCommand(`conditionalFormatLessThan`,l({selector:d.Number,operator:u.LessThan,param:10})),e.updateCommand(`conditionalFormatBetween`,l({selector:d.Number,operator:u.Between,param:{from:10,to:20}})),e.updateCommand(`conditionalFormatEqualTo`,l({selector:d.Number,operator:u.EqualTo,param:10})),e.updateCommand(`conditionalFormatTextContains`,l({selector:d.Text,operator:u.TextContains,param:``})),e.updateCommand(`conditionalFormatDateOccurring`,l({operator:u.TimePeriod,param:{type:t.ICondition.TimePeriodType.Today}})),e.updateCommand(`conditionalFormatDuplicateValues`,l({operator:u.Not,param:{operator:u.Unique}})),e.updateCommand(`conditionalFormatTopItems`,l({operator:u.TopN,param:{top:!0,limit:10,percent:!1}})),e.updateCommand(`conditionalFormatTopPercent`,l({operator:u.TopN,param:{top:!0,limit:10,percent:!0}})),e.updateCommand(`conditionalFormatBottomItems`,l({operator:u.TopN,param:{top:!1,limit:10,percent:!1}})),e.updateCommand(`conditionalFormatBottomPercent`,l({operator:u.TopN,param:{top:!1,limit:10,percent:!0}})),e.updateCommand(`conditionalFormatAboveAverage`,l({operator:u.Average,param:{type:t.ICondition.AverageType.Above}})),e.updateCommand(`conditionalFormatBelowAverage`,l({operator:u.Average,param:{type:t.ICondition.AverageType.Below}})),e.updateCommand(`conditionalFormatDataBar`,{callback:e=>{c({scale:e?structuredClone(e):ao()})}}),e.updateCommand(`conditionalFormatColorScale`,{callback:e=>{c({scale:e?structuredClone(e):io()})}}),e.updateCommand(`conditionalFormatIconSet`,{callback:()=>{c({scale:so()})}}),e.updateCommand(`conditionalFormatClearSelection`,{callback:()=>{let e=r.getConditionalFormats(),t=new Set;for(let n of r.getSelectedRanges().getCoords())for(let r of e.getItems({address:n}))t.add(r);for(let e of t)e.delete()}}),e.updateCommand(`conditionalFormatClearSheet`,{callback:()=>{for(let e of r.getConditionalFormats().getItems())e.delete()}}),e.updateCommand(`manageProtectedRange`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{i?.activateTaskPane?.(`protectedRangeDetails`)}});let f=async e=>{let n=n=>{r.doBatch(()=>{let i=r.getSelectedRanges();i.merge({axes:e,discardMultipleValues:n}),e===t.IRange.AxisSelection.Both&&i.getStyle().update({alignment:{horizontal:t.ITextFrame.HorizontalAlignment.Center}})},{description:(0,a.messageKey)(`op.mergeCells`)})};try{n(!1)}catch(e){if(e?.type===`discardMultipleValues`&&o?.showOptions){if(await o.showOptions({title:(0,a.t)(`dialog.confirm.title`),description:(0,a.t)(`sheet.mergeCellsWarning`),options:[{id:`Merge`,label:()=>(0,a.t)(`sheet.merge`)},`Cancel`],defaultOption:`Merge`})!==`Merge`)return;try{n(!0)}catch(e){o?.showError?.(e)}}else o?.showError?.(e)}},p=()=>{r.doBatch(()=>{let e=r.getSelectedRanges();e.unmerge(),e.getStyle().update({alignment:{horizontal:null}})},{description:(0,a.messageKey)(`op.unmergeCells`)})};e.updateCommand(`mergeToggle`,{tags:[`noTransaction`],callback:()=>{a.CoordUtils.isSingleCell(r.getSelectedRange().getCoords())||(r.getSelectedRanges().getMerges().length===0?f(t.IRange.AxisSelection.Both):p())}}),e.updateCommand(`mergeHorizontal`,{tags:[`noTransaction`],callback:()=>{f(t.IRange.AxisSelection.Column)}}),e.updateCommand(`mergeVertical`,{tags:[`noTransaction`],callback:()=>{f(t.IRange.AxisSelection.Row)}}),e.updateCommand(`unmerge`,{tags:[`noTransaction`],callback:()=>p()});let m=e.getKeysByTag(`mutator`),h=()=>{let n=r.getProtection(),o=n.isLocked(),s=!n.isFormatCellsAllowed(),c=lo(s,(0,a.messageKey)(`reason.sheetProtected`));e.updateCommand(`protectionSheetToggle`,{state:o,params:{locked:o}});let l=r.getSelectedRanges(),u=r.getSelectedRange(),d=l.getCoords(),f=l.getMerges().length>0,p=l.isOverlapping(),h=!0;for(let e=0;h&&e<d.length;e++)h=a.CoordUtils.isSingleCell(d[e]);let g=d.length===1&&d[0].colStart===d[0].colEnd,_=!(r.getTables().getItems({address:u}).length>0)&&!p&&(f||!h),v=!1,y=!1,b=!1,x=!1;s||(v=l.isEntireColumnsAny(),y=v&&!l.isEntireColumns(),b=l.isEntireRowsAny(),x=b&&!l.isEntireRows());for(let t of m)uo.has(t)||fo.has(t)||e.updateCommand(t,{disabledReasons:c});let S=r.getSelectedCell().getStyle().getAlignment().getHorizontal(),C=S===t.ITextFrame.HorizontalAlignment.CenterContinuous||S===t.ITextFrame.HorizontalAlignment.Fill;for(let t of uo)e.updateCommand(t,{disabledReasons:[...c,...lo(C,(0,a.messageKey)(`reason.continuousSpan`))]});e.updateCommand(`dataTextToColumns`,{disabledReasons:[...c,...lo(!g,(0,a.messageKey)(`reason.singleColumn`)),...lo(o,(0,a.messageKey)(`reason.sheetLocked`))]});let w=[...c,...lo(l.getCount()!==1,(0,a.messageKey)(`reason.sortRange`))];e.updateCommand(`sortAscending`,{disabledReasons:w}),e.updateCommand(`sortDescending`,{disabledReasons:w});let T=lo(!_,(0,a.messageKey)(`reason.mergeUnavailable`));e.updateCommand(`mergeToggle`,{state:f,disabledReasons:[...c,...T]}),e.updateCommand(`mergeHorizontal`,{disabledReasons:[...c,...T]}),e.updateCommand(`mergeVertical`,{disabledReasons:[...c,...T]}),e.updateCommand(`unmerge`,{disabledReasons:[...c,...lo(!f,(0,a.messageKey)(`reason.noMerge`)),...T]});let E=lo(p,(0,a.messageKey)(`reason.overlap`)),D=[...c,...lo(b,(0,a.messageKey)(`reason.entireColumn`)),...E,...lo(y,(0,a.messageKey)(`reason.mixedSelection`))],O=[...c,...lo(v,(0,a.messageKey)(`reason.entireRow`)),...E,...lo(x,(0,a.messageKey)(`reason.mixedSelection`))];e.updateCommand(`insertCellsShiftDown`,{disabledReasons:D}),e.updateCommand(`deleteCellsShiftUp`,{disabledReasons:D}),e.updateCommand(`insertCellsShiftRight`,{disabledReasons:O}),e.updateCommand(`deleteCellsShiftLeft`,{disabledReasons:O});let k=[...c,...lo(b,(0,a.messageKey)(`reason.entireRow`)),...E,...lo(y,(0,a.messageKey)(`reason.mixedSelection`))],A=[...c,...lo(v,(0,a.messageKey)(`reason.entireColumn`)),...E,...lo(x,(0,a.messageKey)(`reason.mixedSelection`))];for(let t of[`insertRows`,`insertRowsAfter`,`deleteRows`])e.updateCommand(t,{disabledReasons:k});for(let t of[`insertColumns`,`insertColumnsAfter`,`deleteColumns`])e.updateCommand(t,{disabledReasons:A});let j=i?.editModeHandler?.getMode()?.key,M=j===`copy`?`copy`:j===`cut`?`cut`:`none`,N=p?1:l.getRowCount(),P=p?1:l.getColumnCount(),F=l.getDefaultShiftAxis()===t.IRange.Axis.Column,I=v&&!y,L=b&&!x,R=I?`rows`:L?`columns`:`none`,z=L?P:N;e.updateCommand(`insertCells`,{params:{mode:M,shift:F?`right`:`down`,span:R,count:z}}),e.updateCommand(`deleteCells`,{params:{shift:F?`left`:`up`,span:R,count:z}}),e.updateCommand(`insertCellsShiftDown`,{params:{mode:M,span:I?`rows`:`none`,count:N}}),e.updateCommand(`deleteCellsShiftUp`,{params:{span:I?`rows`:`none`,count:N}}),e.updateCommand(`insertCellsShiftRight`,{params:{mode:M,span:L?`columns`:`none`,count:P}}),e.updateCommand(`deleteCellsShiftLeft`,{params:{span:L?`columns`:`none`,count:P}});for(let t of[`insertRows`,`insertRowsAfter`])e.updateCommand(t,{params:{mode:M,count:N}});for(let t of[`insertColumns`,`insertColumnsAfter`])e.updateCommand(t,{params:{mode:M,count:P}});e.updateCommand(`deleteRows`,{params:{count:N}}),e.updateCommand(`deleteColumns`,{params:{count:P}}),e.updateCommand(`hideRows`,{params:{count:l.getRowCount()}}),e.updateCommand(`hideColumns`,{params:{count:l.getColumnCount()}})};h();let g=r.addListeners({onProtectionChange:h,onStyleChange:h,onInvalidated:h,onClose:()=>e.remove()}),_=r.getSelection().addListeners({onChange:h}),v=po(e,r),y=function(e,n,r,i){let o=(e,t=!1,r)=>{let i=r??{autoSelect:!0,autoFit:!0},a=n.getSelectedRanges();t&&a.getStyle().update(null,i),a.getStyle().update(e,i)},s=()=>n.getSelectedCell().getStyle().getFont(),c=()=>n.getSelectedCell().getStyle().getAlignment(),l=()=>{let e=s().getWeight();return!isNaN(e)&&e>500};e.updateCommand(`formatBoldToggle`,{callback:()=>{o({font:{weight:l()?400:700}})}}),e.updateCommand(`formatItalicToggle`,{callback:()=>{o({font:{style:s().getStyle()===t.IFont.Style.Italic?t.IFont.Style.Normal:t.IFont.Style.Italic}})}}),e.updateCommand(`formatStrikeThroughToggle`,{callback:()=>{o({font:{strike:!s().getStrike()}})}});let u=(n,r)=>{e.updateCommand(n,{callback:()=>{o({font:{underline:s().getUnderline()===r?t.IFont.UnderlineStyle.None:r}})}})};u(`formatUnderlinedToggle`,t.IFont.UnderlineStyle.Single),u(`formatUnderlinedDoubleToggle`,t.IFont.UnderlineStyle.Double),u(`formatUnderlinedAccountingToggle`,t.IFont.UnderlineStyle.SingleAccounting),u(`formatUnderlinedAccountingDoubleToggle`,t.IFont.UnderlineStyle.DoubleAccounting);let d=(n,r)=>{e.updateCommand(n,{callback:()=>{o({font:{verticalAlign:s().getVerticalAlignment()===r?t.IFont.VerticalAlignment.Baseline:r}})}})};d(`formatSuperscriptToggle`,t.IFont.VerticalAlignment.Super),d(`formatSubscriptToggle`,t.IFont.VerticalAlignment.Sub);let f=(n,r)=>{e.updateCommand(n,{callback:()=>{o({alignment:{overflow:c().getOverflow()===r?t.ITextFrame.Overflow.Visible:r}})}})};f(`formatTextOverflowVisibleToggle`,t.ITextFrame.Overflow.Visible),f(`formatTextOverflowWrapToggle`,t.ITextFrame.Overflow.Wrap),f(`formatTextOverflowClipToggle`,t.ITextFrame.Overflow.Clip),f(`formatTextOverflowShrinkToggle`,t.ITextFrame.Overflow.Shrink),e.updateCommand(`formatTextOverflowEllipsisToggle`,{callback:()=>{o({alignment:{overflow:c().getOverflow()===t.ITextFrame.Overflow.Ellipsis?t.ITextFrame.Overflow.Visible:t.ITextFrame.Overflow.Ellipsis}})},disabledReasons:[(0,a.messageKey)(`reason.notImplemented`)]});let p=(n,r)=>{e.updateCommand(n,{callback:()=>{o({alignment:{vertical:c().getVertical()===r?t.ITextFrame.VerticalAlignment.Bottom:r}})}})};p(`formatAlignTopToggle`,t.ITextFrame.VerticalAlignment.Top),p(`formatAlignMiddleToggle`,t.ITextFrame.VerticalAlignment.Center),p(`formatAlignBottomToggle`,t.ITextFrame.VerticalAlignment.Bottom),p(`formatAlignJustifyVerticalToggle`,t.ITextFrame.VerticalAlignment.Justify),p(`formatAlignDistributedVerticalToggle`,t.ITextFrame.VerticalAlignment.Distributed);let m=(n,r,i=!1)=>{e.updateCommand(n,{callback:()=>{let e=c().getHorizontal()===r?t.ITextFrame.HorizontalAlignment.General:r;o({alignment:i?{horizontal:e,rotation:null}:{horizontal:e}})}})};m(`formatAlignLeftToggle`,t.ITextFrame.HorizontalAlignment.Left),m(`formatAlignCenterToggle`,t.ITextFrame.HorizontalAlignment.Center),m(`formatAlignCenterContinuousToggle`,t.ITextFrame.HorizontalAlignment.CenterContinuous,!0),m(`formatAlignFillToggle`,t.ITextFrame.HorizontalAlignment.Fill,!0),m(`formatAlignDistributedHorizontalToggle`,t.ITextFrame.HorizontalAlignment.Distributed),m(`formatAlignRightToggle`,t.ITextFrame.HorizontalAlignment.Right),m(`formatAlignJustifyToggle`,t.ITextFrame.HorizontalAlignment.Justify),e.updateCommand(`formatBorder`,{callback:e=>{o({border:e})}}),e.updateCommand(`formatFillColor`,{callback:e=>{o({fill:e})}}),e.updateCommand(`formatFontColor`,{callback:e=>{o({font:{color:e}})}}),e.updateCommand(`formatFillColor`,{context:()=>({...ho(n),autoColor:mo,quickColor:i?.getLastFillColor?.()??void 0,onColorSelect:e=>i?.setLastFillColor?.(e??mo)})}),e.updateCommand(`formatFontColor`,{context:()=>({...ho(n),autoColor:n.getStyles().getNormal().getFont().getColor(),quickColor:i?.getLastFontColor?.()??void 0,onColorSelect:e=>i?.setLastFontColor?.(e)})}),e.updateCommand(`formatBorder`,{context:()=>{let e=n.getStyles();return{autoColor:e.getNormal().getFont().getColor(),autoStyle:t.IBorder.StrokeStyle.Thin,schemeLookup:e.schemeLookup(),quickBorder:i?.getLastBorder?.()??void 0,createBorder:t=>e.getNormal().createStyle({border:t}).getBorder(),onBorderSelect:e=>i?.setLastBorder?.(e)}}}),e.updateCommand(`formatFontFamily`,{callback:e=>{o({font:{family:e}})}}),e.updateCommand(`formatFontSize`,{callback:e=>{o({font:{size:e}})}}),e.updateCommand(`formatFontSizeIncrease`,{callback:()=>{o(e=>({font:{size:t.FontUtils.findNextFontSize(e.getFont().getSize(),!0)}}))}}),e.updateCommand(`formatFontSizeDecrease`,{callback:()=>{o(e=>({font:{size:t.FontUtils.findNextFontSize(e.getFont().getSize(),!1)}}))}}),e.updateCommand(`formatNumberFormat`,{callback:e=>{o({numberFormat:e})}}),e.updateCommand(`formatNumberFormatGeneralStyle`,{callback:()=>{o({numberFormat:t.NumberFormat.Type.General})}}),e.updateCommand(`formatNumberFormatNumberStyle`,{callback:()=>{o({numberFormat:`#,##0.00`})}}),e.updateCommand(`formatNumberFormatTimeStyle`,{callback:()=>{o({numberFormat:`h:mm AM/PM`})}}),e.updateCommand(`formatNumberFormatDateStyle`,{callback:()=>{o({numberFormat:`d-mmm-yy`})}}),e.updateCommand(`formatNumberFormatAccountingStyle`,{callback:e=>{o(e?{numberFormat:e}:{named:t.IStyle.BuiltInName.Currency})}}),e.updateCommand(`formatNumberFormatPercentStyle`,{callback:()=>{o({named:t.IStyle.BuiltInName.Percent})}}),e.updateCommand(`formatNumberFormatScientificStyle`,{callback:()=>{o({numberFormat:`0.00E+00`})}}),e.updateCommand(`formatNumberFormatCommaStyle`,{callback:()=>{o({named:t.IStyle.BuiltInName.Comma})}}),e.updateCommand(`formatNumberFormatIncreaseDecimal`,{callback:()=>{o(e=>({numberFormat:t.NumberFormat.Parser.adjustDecimalPlaces(e.getNumberFormat(),1)}))}}),e.updateCommand(`formatNumberFormatDecreaseDecimal`,{callback:()=>{o(e=>({numberFormat:t.NumberFormat.Parser.adjustDecimalPlaces(e.getNumberFormat(),-1)}))}});let h={style:t.IBorder.StrokeStyle.Thin,color:null};e.updateCommand(`formatBorderAddOutline`,{callback:()=>{o({border:{left:h,top:h,right:h,bottom:h}})}}),e.updateCommand(`formatBorderClearOutline`,{callback:()=>{o({border:null})}}),e.updateCommand(`formatIndentDecrease`,{callback:()=>{o(e=>{let t=e.getAlignment().getIndent()-1;return{alignment:{indent:t>0?t:0}}})}}),e.updateCommand(`formatIndentIncrease`,{callback:()=>{o(e=>{let n={alignment:{indent:e.getAlignment().getIndent()+1}};return e.getAlignment().getHorizontal()===t.ITextFrame.HorizontalAlignment.General&&(n.alignment.horizontal=t.ITextFrame.HorizontalAlignment.Left),n})}}),e.updateCommand(`formatCellStyle`,{callback:e=>{n.getSelectedRanges().getStyle().setNamed(e,{autoSelect:!0,autoFit:!0})},context:()=>({styles:()=>n.getStyles(),named:()=>n.getSelectedCell().getStyle().getNamed(),createCell:e=>n.createCell(e)})});let g=e=>{o({alignment:{rotation:e}})};e.updateCommand(`formatTextRotate0`,{callback:()=>g(0)}),e.updateCommand(`formatTextRotate45`,{callback:()=>g(45)}),e.updateCommand(`formatTextRotate90`,{callback:()=>g(90)}),e.updateCommand(`formatTextRotate270`,{callback:()=>g(270)}),e.updateCommand(`formatTextRotate315`,{callback:()=>g(315)}),e.updateCommand(`formatTextRotateCustom`,{callback:e=>g(e??0)}),e.updateCommand(`formatNumberDialog`,{tags:[`noTransaction`],callback:()=>{let e={initialValue:n.getSelectedCell().getStyle().getNumberFormat(),context:()=>n.getSelectedCell(),onInput:e=>{n.doBatch(()=>{n.getSelectedRanges().getStyle().update({numberFormat:e},{autoSelect:!0,autoFit:!0})},{description:(0,a.messageKey)(`op.numberFormat`)})}};r?.showWindow?.(`numberFormat`,e)}}),e.updateCommand(`formatSheetTabColor`,{callback:e=>{n.setTabColor(e)},state:n.getTabColor()??mo,context:()=>({...ho(n),autoColor:mo,onColorSelect:()=>{}})});let _=()=>{let r=s(),i=r.getUnderline(),a=r.getVerticalAlignment();e.updateCommand(`formatBoldToggle`,{state:l()}),e.updateCommand(`formatItalicToggle`,{state:r.getStyle()===t.IFont.Style.Italic}),e.updateCommand(`formatStrikeThroughToggle`,{state:r.getStrike()}),e.updateCommand(`formatUnderlinedToggle`,{state:i===t.IFont.UnderlineStyle.Single}),e.updateCommand(`formatUnderlinedDoubleToggle`,{state:i===t.IFont.UnderlineStyle.Double}),e.updateCommand(`formatUnderlinedAccountingToggle`,{state:i===t.IFont.UnderlineStyle.SingleAccounting}),e.updateCommand(`formatUnderlinedAccountingDoubleToggle`,{state:i===t.IFont.UnderlineStyle.DoubleAccounting}),e.updateCommand(`formatSuperscriptToggle`,{state:a===t.IFont.VerticalAlignment.Super}),e.updateCommand(`formatSubscriptToggle`,{state:a===t.IFont.VerticalAlignment.Sub}),e.updateCommand(`formatFontFamily`,{state:r.getFamily()}),e.updateCommand(`formatFontSize`,{state:r.getSize()});let o=n.getSelectedCell().getStyle().getNumberFormat();e.updateCommand(`formatNumberFormat`,{state:o,context:()=>n.getSelectedCell()}),e.updateCommand(`formatNumberDialog`,{state:o,context:()=>n.getSelectedCell()});let u=n.getSelectedCell().getStyle().getFill(),d=null;u?.getType()===t.IFill.Type.Solid?d=u.getColor():u?.getType()===t.IFill.Type.Gradient?d=u.getStops()?.[0]?.getColor()??null:u?.getType()===t.IFill.Type.Pattern&&(d=u.getBackground()),e.updateCommand(`formatFillColor`,{state:d}),e.updateCommand(`formatFontColor`,{state:r.toJSON()?.color?r.getColor():null});let f=c(),p=f.getOverflow();e.updateCommand(`formatTextOverflowVisibleToggle`,{state:p===t.ITextFrame.Overflow.Visible}),e.updateCommand(`formatTextOverflowWrapToggle`,{state:p===t.ITextFrame.Overflow.Wrap}),e.updateCommand(`formatTextOverflowClipToggle`,{state:p===t.ITextFrame.Overflow.Clip}),e.updateCommand(`formatTextOverflowShrinkToggle`,{state:p===t.ITextFrame.Overflow.Shrink}),e.updateCommand(`formatTextOverflowEllipsisToggle`,{state:p===t.ITextFrame.Overflow.Ellipsis});let m=f.getVertical();e.updateCommand(`formatAlignTopToggle`,{state:m===t.ITextFrame.VerticalAlignment.Top}),e.updateCommand(`formatAlignMiddleToggle`,{state:m===t.ITextFrame.VerticalAlignment.Center}),e.updateCommand(`formatAlignBottomToggle`,{state:m===t.ITextFrame.VerticalAlignment.Bottom}),e.updateCommand(`formatAlignJustifyVerticalToggle`,{state:m===t.ITextFrame.VerticalAlignment.Justify}),e.updateCommand(`formatAlignDistributedVerticalToggle`,{state:m===t.ITextFrame.VerticalAlignment.Distributed});let h=f.getHorizontal();e.updateCommand(`formatAlignLeftToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Left}),e.updateCommand(`formatAlignCenterToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Center}),e.updateCommand(`formatAlignCenterContinuousToggle`,{state:h===t.ITextFrame.HorizontalAlignment.CenterContinuous}),e.updateCommand(`formatAlignFillToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Fill}),e.updateCommand(`formatAlignDistributedHorizontalToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Distributed}),e.updateCommand(`formatAlignRightToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Right}),e.updateCommand(`formatAlignJustifyToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Justify});let g=f.getRotation();e.updateCommand(`formatTextRotate0`,{state:g===0}),e.updateCommand(`formatTextRotate45`,{state:g===45}),e.updateCommand(`formatTextRotate90`,{state:g===90}),e.updateCommand(`formatTextRotate270`,{state:g===270}),e.updateCommand(`formatTextRotate315`,{state:g===315}),e.updateCommand(`formatTextRotateCustom`,{state:g??0})};_();let v=n.addListeners({onStyleChange:_}),y=n.getSelection().addListeners({onChange:_});return()=>{v(),y()}}(e,r,o,i?.pickerMemory),b=function(e,n){let r=e=>{n.getSelectedRanges().clear(e)};return e.updateCommand(`clearContents`,{callback:()=>{r(t.ICell.Content.Values)}}),e.updateCommand(`clearFormats`,{callback:()=>{r(t.ICell.Content.Formats)}}),e.updateCommand(`clearHyperlinks`,{callback:()=>{r(t.ICell.Content.Hyperlinks)}}),e.updateCommand(`clearComments`,{callback:()=>{r(t.ICell.Content.Comments)}}),e.updateCommand(`clearAll`,{callback:()=>{r()}}),e.updateCommand(`deleteHyperlink`,{callback:()=>{n.getSelectedRange().setHyperlink(null)}}),e.updateCommand(`deleteComments`,{callback:()=>{n.getSelectedRange().setComments(null)}}),()=>{}}(e,r),x=function(e,t){let n=(e,n)=>{t.getSelection().selectRegion({contentOnly:e,entireRegion:n})};return e.updateCommand(`selectAll`,{tags:[`noTransaction`,`noRepeat`],callback:e=>{n(!1,e??!1)}}),e.updateCommand(`selectRegion`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{n(!0,!1)}}),e.updateCommand(`selectComments`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:[(0,a.messageKey)(`reason.notImplemented`)],callback:()=>{}}),e.updateCommand(`clearHiddenSelection`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{t.getSelection().clearHidden()}}),()=>{}}(e,r),S=function(e,t){let n=()=>t.getTables().getItems({address:t.getSelectedCell().getCoords()})[0]??null;e.updateCommand(`tableFilterToggle`,{callback:()=>{let e=n();if(e)return void e.setHiddenButtons(!e.isHiddenButtons());let r=t.getAutoTable();r?r.delete():t.addAutoTable()}});let r=()=>{let r=n()??t.getAutoTable(),i=t.getProtection(),o=!i.isAutoTableAllowed()||!i.isSortAllowed();e.updateCommand(`tableFilterToggle`,{state:!!r&&!r.isHiddenButtons(),disabledReasons:lo(o,(0,a.messageKey)(`reason.sheetProtected`))})};r();let i=t.getSelection().addListeners({onChange:r}),o=t.addListeners({onTablesChange:r,onProtectionChange:r});return()=>{i(),o()}}(e,r),C=function(e,n,r){let i=()=>n.getSelectedRanges();e.updateCommand(`hideRows`,{callback:()=>{i().getRowHeaders().setHidden(!0)}}),e.updateCommand(`hideColumns`,{callback:()=>{i().getColumnHeaders().setHidden(!0)}}),e.updateCommand(`unhideRows`,{callback:()=>{i().getRowHeaders().setHidden(!1)}}),e.updateCommand(`unhideColumns`,{callback:()=>{i().getColumnHeaders().setHidden(!1)}}),e.updateCommand(`autoFitRows`,{callback:()=>{i().autoFit({axes:t.IRange.AxisSelection.Row})}}),e.updateCommand(`autoFitColumns`,{callback:()=>{i().autoFit({axes:t.IRange.AxisSelection.Column})}});let o=(e,o)=>{let s=e===t.IRange.Axis.Row,c=s?(0,a.messageKey)(`op.resizeRows`):(0,a.messageKey)(`op.resizeColumns`),l={initialValue:{size:o,unit:`Px`},context:()=>({getAxis:()=>e,getUnitText:()=>`Pt`}),onInput:(e,r)=>{if(r===`Autofit`)return void n.doBatch(()=>i().autoFit({axes:s?t.IRange.AxisSelection.Row:t.IRange.AxisSelection.Column}),{description:(0,a.messageKey)(`op.autofit`),autoSelect:!0});if(!e)return;let o=s?i().getRowHeaders():i().getColumnHeaders();n.doBatch(()=>o.setSize(e.size+e.unit),{description:c,autoSelect:!0})}};r?.showWindow(`resizeHeader`,l)};return e.updateCommand(`resizeRows`,{tags:[`noTransaction`,`noRepeat`],callback:()=>o(t.IRange.Axis.Row,20)}),e.updateCommand(`resizeColumns`,{tags:[`noTransaction`,`noRepeat`],callback:()=>o(t.IRange.Axis.Column,100)}),()=>{}}(e,r,o),w=function(e,n){let r=(e,r)=>{let i=n.getSelectedRanges();i.doBatch(()=>{let r=e===t.IRange.Direction.Up||e===t.IRange.Direction.Down,o=i.getCoords().slice().sort(a.CoordUtils.createRangeComparator(r?t.IRange.Axis.Row:t.IRange.Axis.Column));for(let r of o){let i=r,a=n.getRange(i).getMerges(),o=0,s=0;a.length>0&&(o=a[0].rowEnd-a[0].rowStart,s=a[0].colEnd-a[0].colStart),e===t.IRange.Direction.Left?i={...r,colStart:r.colEnd+s}:e===t.IRange.Direction.Right?i={...r,colEnd:r.colStart+s}:e===t.IRange.Direction.Up?i={...r,rowStart:r.rowEnd+o}:e===t.IRange.Direction.Down&&(i={...r,rowEnd:r.rowStart+o}),n.getRange(i).autoFill(r,{filler:t.AutoFill.Types.Copy}),n.getRange(r).autoFit({axes:t.IRange.AxisSelection.Row,skipCustomSize:!0,minContent:!0})}},{autoSelect:!0,description:r})};return e.updateCommand(`fillDown`,{callback:()=>r(t.IRange.Direction.Down,`Fill Down`)}),e.updateCommand(`fillRight`,{callback:()=>r(t.IRange.Direction.Right,`Fill Right`)}),e.updateCommand(`fillUp`,{callback:()=>r(t.IRange.Direction.Up,`Fill Up`)}),e.updateCommand(`fillLeft`,{callback:()=>r(t.IRange.Direction.Left,`Fill Left`)}),()=>{}}(e,r),T=function(e,n,r,i){let a=async(e,a=!1,o=!1)=>{let s=n.getSelectedRanges();a&&(e===t.IRange.Axis.Row?s=s.getEntireRows(o):e===t.IRange.Axis.Column&&(s=s.getEntireColumns(o)));let c=null,l=r?.getMode()?.key;if((l===`copy`||l===`cut`)&&i){let e=await i.getClipboard().readReference();e&&e.getItemType()===`range`&&(c=e.getItem?.()??null,c?.getCoords?.()||(c=null))}if(c){let n=await s.insertFrom(c,{...c.getMarkOptions(),axis:e,autoSelect:!0});!n||n.isEntireRows()||n.isEntireColumns()||n.autoFit({axes:t.IRange.AxisSelection.Row,minContent:!0}),r?.setMode(null)}else s.insert({axis:e,autoSelect:!0})},o=(e,r=!1)=>{let i=n.getSelectedRanges();r&&(e===t.IRange.Axis.Row?i=i.getEntireRows():e===t.IRange.Axis.Column&&(i=i.getEntireColumns())),i.delete(e)};return e.updateCommand(`insertCells`,{callback:()=>a()}),e.updateCommand(`insertCellsShiftRight`,{callback:()=>a(t.IRange.Axis.Column)}),e.updateCommand(`insertCellsShiftDown`,{callback:()=>a(t.IRange.Axis.Row)}),e.updateCommand(`insertRows`,{callback:()=>a(t.IRange.Axis.Row,!0)}),e.updateCommand(`insertColumns`,{callback:()=>a(t.IRange.Axis.Column,!0)}),e.updateCommand(`insertRowsAfter`,{callback:()=>a(t.IRange.Axis.Row,!0,!0)}),e.updateCommand(`insertColumnsAfter`,{callback:()=>a(t.IRange.Axis.Column,!0,!0)}),e.updateCommand(`deleteCells`,{callback:()=>o()}),e.updateCommand(`deleteCellsShiftUp`,{callback:()=>o(t.IRange.Axis.Row)}),e.updateCommand(`deleteCellsShiftLeft`,{callback:()=>o(t.IRange.Axis.Column)}),e.updateCommand(`deleteRows`,{callback:()=>o(t.IRange.Axis.Row,!0)}),e.updateCommand(`deleteColumns`,{callback:()=>o(t.IRange.Axis.Column,!0)}),()=>{}}(e,r,i?.editModeHandler,i?.globalClipboard),E=go(e,r,o),D=function(e,t,n){return e.updateCommand(`updateHyperlink`,{tags:[`noTransaction`],callback:()=>{n?.showWindow?.(`hyperlink`,{context:()=>t.getSelectedCell(),onInput:e=>{t.doBatch(()=>{t.getSelectedRange().setHyperlink(e)},{description:(0,a.messageKey)(`op.updateHyperlink`)})}})}}),e.updateCommand(`openHyperlink`,{tags:[`noTransaction`,`noRepeat`],callback:async()=>{let e=t.getSelectedCell().getHyperlink();if(e)try{await e.open()}catch(e){n?.showError?.(e)}}}),e.updateCommand(`updateComments`,{tags:[`noTransaction`],callback:()=>{n?.showWindow?.(`comments`,{context:()=>t.getSelectedCell(),onInput:e=>{t.doBatch(()=>{t.getSelectedRange().setComments(e)},{description:(0,a.messageKey)(`op.updateComment`)})}})}}),()=>{}}(e,r,o),O=function(e,t,n,r){let i=async(e,i,o=(0,a.messageKey)(`op.insertImage`))=>{let c=await Promise.resolve(n?.showBusy?.(o)??null);try{await t.getMovables().addPicture(e,{autoSelect:!0,...i}),c?.(),r?.setMode(null)}catch(e){c?.();let t=e;typeof t!=`string`&&(console.warn(e),t=(0,a.t)(`error.insertImage.unresolved`)),n?.showMessage?.(t,{type:s.NotifierType.Error})}};return e.updateCommand(`insertImageFromFile`,{tags:[`noTransaction`,`noRepeat`],callback:async e=>{let t=null,n=null;if(typeof e==`string`?n=e:t=e?.file?e.file:e??null,!t&&(t=await a.DOMUtils.openFileDialog(n??`image/*`),!t))return;let r=await Promise.resolve(t);await i({source:{file:r}},e?.options)}}),e.updateCommand(`insertImageFromURL`,{tags:[`noTransaction`,`noRepeat`],callback:async e=>{if(!e){let t=await n?.showInput?.({title:(0,a.t)(`dialog.insertImage.title`),description:(0,a.t)(`dialog.insertImage.description`),inputLabel:(0,a.t)(`dialog.insertImage.inputLabel`),initialValue:`https://picsum.photos/360`,propsInput:{style:{minWidth:`440px`}},options:[{id:`Insert`,label:()=>(0,a.t)(`dialog.insert`)}]});if(!t||t.option!==`Insert`)return;e=t.input}e&&await i({source:{fetch:e}})}}),()=>{}}(e,r,o,i?.editModeHandler),k=_o(e,r,o,i?.activateTaskPane,i?.taskPaneArea);return()=>{g(),_(),v(),y(),b(),x(),S(),C(),w(),T(),E(),D(),O(),k()}}var{CommandScopeProvider:yo}=s.Command;Br();var bo={dynamic:(e,t)=>{let n=vo(e,t),r=t.editable&&t.sheet?Tt(e,{editable:t.editable,sheet:t.sheet,flavor:`startEdit`}):void 0;return()=>{n(),r?.()}}},xo=({sheet:e,editable:t,scopeRef:n,elementRef:r,children:a})=>s.Command.useCommandScope()?(0,i.jsx)(So,{sheet:e,editable:t,scopeRef:n,elementRef:r,children:a}):(0,i.jsx)(i.Fragment,{children:a}),So=({sheet:e,editable:n,scopeRef:a,elementRef:o,children:c})=>{let l=(0,s.useNotifier)(),u=Qn(),d=(0,s.useEditMode)(),f=(0,s.useGlobalClipboard)(),p=gr(),m=(0,r.useMemo)(()=>({serializer:{parse:t=>t?e?.getStyles().parseColor(t)??null:null,stringify:e=>e?e.toString():``}}),[e]),[h,g]=(0,s.usePersistenceState)(`sheet.lastFillColor`,e?.getStyles().parseColor(t.IColor.Scheme.Bg2),m),[_,v]=(0,s.usePersistenceState)(`sheet.lastFontColor`,e?.getStyles().parseColor(e?.getStyles().getNormal().getFont().getColor()),m),[y,b]=(0,s.usePersistenceState)(`sheet.lastBorder`,null),x=(0,r.useRef)(h);x.current=h;let S=(0,r.useRef)(_);S.current=_;let C=(0,r.useRef)(y);C.current=y;let w=(0,r.useMemo)(()=>({getLastFillColor:()=>x.current,setLastFillColor:g,getLastFontColor:()=>S.current,setLastFontColor:v,getLastBorder:()=>C.current,setLastBorder:b}),[g,v,b]),T=(0,r.useMemo)(()=>({scopeName:`sheet`,contributor:bo,data:{sheet:e,editable:n,notifier:l,manager:p??void 0,activateTaskPane:(e,t)=>u.activate(e,t),taskPaneArea:u,editModeHandler:d,globalClipboard:f,pickerMemory:w}}),[e,n,l,p,u,d,f,w]);return(0,i.jsx)(yo,{spec:T,scopeRef:a,elementRef:o,children:c})};So.displayName=`SheetCommandProviderInner`;var Co=`_sheetxl-sheet_3nny_5`,wo=`_viewport-overlay_3nny_6`,To=(0,r.memo)((0,r.forwardRef)((e,n)=>{let{sheet:c,className:u,style:d=s.ReactUtils.EmptyCssProperties,ref:f,colorScheme:p,gridColorScheme:m,onSheetContextMenu:g,showColumnHeaders:_,propsColumnHeader:v,showRowHeaders:y,propsRowHeader:b,showScrollbars:x=!0,showCellErrors:S=!0,propsScrollPane:C,viewport:w,onViewportChange:T,layers:E,renderMovable:D,viewportComponent:O,onFirstRender:k,editable:A,onFocus:j,onBlur:M,onShowTooltip:N,onCloseTooltip:F,propsGrid:I,propsCellRender:L,...R}=e;if((0,r.useEffect)(()=>{t.LicenseManager._validate(!0)},[]),!c)throw Error(`ISheet must be provided.`);let[z,B]=(0,r.useReducer)(e=>e+1,0),[,V]=(0,r.useReducer)(e=>e+1,0),H=(0,r.useRef)(null),U=(0,s.useCallbackRef)(N,[N]),W=(0,s.useCallbackRef)(F,[F]),G=(0,r.useRef)(null),K=(0,r.useRef)(null);(0,r.useMemo)(()=>{K.current!==c&&(G.current=c?c.getId():null),K.current=c},[c]);let q=Ba(m)===`dark`,te=Va();ka();let J=(0,r.useId)(),Y=(0,r.useMemo)(()=>(0,s.createThemeScopeClass)(`sheet`,J),[J]),ne=(0,r.useMemo)(()=>(0,o.buildGridThemeCSS)({scope:`.${Y}`}),[Y]),X=(0,r.useMemo)(()=>Pa(`sxl-defaults`,`.${Y}`),[Y]),Z=c.getStyles(),ie=Z.getTheme(),ae=Z.getDefaultFontSize(),oe=(0,r.useMemo)(()=>Ra(ie,ae,`sxl-defaults`,`.${Y}`),[ie,ae,Y]),se=(0,s.useEditMode)(),ce=(0,r.useCallback)(e=>{},[]),[le,ue]=(0,r.useState)(null),Q=(0,r.useRef)(null),de=(0,r.useCallback)(e=>{e&&(ue(e),Q.current=e)},[]),[$,fe]=(0,r.useState)(()=>c?.getView()),pe=($?.getZoomScale()??100)/100,me=_??$?.isShowColumnHeaders(),he=y??$?.isShowRowHeaders(),[ge,_e]=(0,r.useState)({width:0,height:0}),ve=ge.width,ye=ge.height,be=(0,r.useMemo)(()=>{let e=jo,n=Ao,r=c?.getStyles().getNormal().getFont();if(ge.width>0&&ge.height>0){let i=r?.toCSS()?.fontFamily??`Calibri`,a=r?.getSize()??8.25,o=t.IFont.getSharedMeasurer()(``+ge.height,Math.ceil(a*t.IFont.getDeviceScale()),i);e=o.width??e,n=o.lineHeight}return{width:Math.round(e+5),height:Math.round(n+3)}},[ve,ye,c]),xe=he?pe*be.width:1,Se=me?pe*be.height:1,Ce=(c?.getColumnHeaders().getDefaultSize()??be.width)+xe+1,we=(c?.getRowHeaders().getDefaultSize()??be.height)+Se+1,Te=(0,r.useRef)(new Map),Ee=(0,r.useRef)(null),De=(0,r.useMemo)(()=>({getColOffset:e=>c.getColumnHeaders().getOffset(e),getColIndex:e=>c.getColumnHeaders().getIndex(e),getRowOffset:e=>c.getRowHeaders().getOffset(e),getRowIndex:e=>c.getRowHeaders().getIndex(e)}),[c]),[Oe,ke]=(0,r.useState)(!1),Ae=ee(),je=(0,r.useMemo)(()=>re(c,{referenceMode:Ae}),[c.getWorkbook()??c,Ae]),Me=A??je;(0,r.useEffect)(()=>{if(!Me)return;let e=Me.getSession();return Me.subscribe(()=>{let t=e;if(e=Me.getSession(),!t||e||!t.getActiveEditorId()?.startsWith(`inline:`))return;let n=Q.current;n?.contains(document.activeElement)&&n.focus()})},[Me]);let Ne=(0,s.useOptionalBoundSyncExternalStore)(Me,e=>e.getSession())?.getCoords()??null,[Pe,Fe]=(0,r.useState)(),Ie=(0,r.useRef)(null),Le=(0,s.useCallbackRef)(()=>{if(Ie.current?.(),Ie.current=null,!Pe||!c)return;let e=G.current;if(e&&e===c.getId()||c.isDeleted())return;let t=c.getRangeAtBounds({x:Pe.left,y:Pe.top,width:Pe.width,height:Pe.height});Ie.current=t.addListener(()=>{lt.current.clear()})},[c,Pe]),Re=(0,s.useCallbackRef)(e=>{if(Fe(e),Le(),!c||G.current)return;let t=(c.getView().getZoomScale()??100)/100;c.getView().setTopLeft(e?{left:e.left/t,top:e.top/t}:null),T?.(e)},[c,T]),[ze,Be]=(0,r.useState)(()=>c?.getView().getTopLeft()),Ve=(0,r.useMemo)(()=>{let e=c?.getView().getTopLeft();return new s.Viewport({topLeft:{left:(e?.left??0)*pe,top:(e?.top??0)*pe},zoom:pe})},[]),He=w??Ve;(0,r.useEffect)(()=>He.subscribe(()=>{He.isReady()&&He.isSettled()&&Re(He.getMetrics())}),[He]),(0,r.useLayoutEffect)(()=>{He.setZoom(pe)},[He,pe]),(0,r.useLayoutEffect)(()=>{ze?.left!=null&&He.setTarget(ze.left*pe,He.getTarget().top)},[He,ze?.left,pe]),(0,r.useLayoutEffect)(()=>{ze?.top!=null&&He.setTarget(He.getTarget().left,ze.top*pe)},[He,ze?.top,pe]);let Ue=(0,r.useRef)(c?.getId()??null);(0,r.useLayoutEffect)(()=>{let e=c?.getId();if(Ue.current===e)return;Ue.current=e;let t=c?.getView().getTopLeft(),n=(c?.getView().getZoomScale()??100)/100;He.setTarget((t?.left??0)*n,(t?.top??0)*n)},[He,c]);let We=(0,s.useCallbackRef)(e=>{let t=a.CoordUtils.cellToRange(e);if(G.current||c.isDeleted())return t;let n=c.getRange(t,{ignoreHidden:!0}).getMerges();return n.length===0?t:n[0]},[c]),Ge=e=>{let t=e?.coords?.colIndex??0,n=e?.coords?.rowIndex??0;if(!e||t===0&&n===0)return null;let r={};return t>0&&(r[a.AnchorLocation.Left]={index:t,offset:e.topLeft?.left??0}),n>0&&(r[a.AnchorLocation.Top]={index:n,offset:e.topLeft?.top??0}),r},[Ke,qe]=(0,r.useState)(()=>Ge(c.getView().getFreezePanes())),Je=Ot(c),Ye=(0,s.useCallbackRef)(e=>{let t=e?.cell??Me.getAnchor().getCoords();t&&(Me.startEdit(t,{mode:e?.editMode?`edit`:`enter`,dirty:e?.text??void 0,initialSelection:e?.initialSelection??null,autoFocus:!1!==e?.autoFocus})||Je())},[Me]),Xe=(0,s.useCallbackRef)(()=>Pe,[Pe]),[Ze,Qe]=(0,r.useState)($?.getMovableSelection().length>0),$e=Ne!==null||Ze,et=(0,r.useMemo)(()=>{let e=se.getMode();return e?.cursor?e.cursor:null},[null,se]);l(c?.getView(),{onFreezePaneChange:()=>{qe(Ge(c.getView().getFreezePanes()))},onTopLeftChange:()=>{Be(c.getView().getTopLeft())},onZoomScaleChange:()=>{V()},onMovableSelectionChange:()=>{Qe(c.getView().getMovableSelection().length>0)}}),l(c,{onViewChange(){fe(c.getView())},onLayoutChange:()=>{let e=c.getEntireRange();_e({height:e.getRowCount(),width:e.getColumnCount()}),nt()},onStyleChange:()=>{nt()},onMovablesChange:()=>{},onTablesChange:()=>{nt()},onInvalidated:()=>{nt()}}),l(c,{onRequestScrollIntoView:async(e,t)=>{if(!t)return!1;let n={colIndex:t?.coords?.colStart,rowIndex:t?.coords?.rowStart};return await Q.current?.scrollCellCoordsIntoView(n,t?.scroll),!0},onRequestFocus:()=>a.DOMUtils.whenFocus(tt.current),onRequestViewport:async()=>{let e=Xe();return e?{x:e.left,y:e.top,width:e.width,height:e.height}:null}},Oo);let tt=(0,s.useImperativeElement)(n,()=>{let e=e=>{c?.getView()&&c.getView().selectMovables([]),Ee.current=null,Q.current?.focus(e)},t=async(e=null)=>{if(e||=c?.getView().getMovableSelection()[0],!e)return!1;let t=e.getRange().getCoords();if(!t)return!1;let n=Q.current?.getPaneFromCell({colIndex:t.colStart,rowIndex:t.rowStart});if(!n)return!1;let r=n.getAnchor();c?.getView().getMovableSelection().indexOf(e)===-1&&c?.getView().selectMovables([e]);let i=Te.current?.get(r);return i?.current?(await i.current.focusMovable(e),!0):(Ee.current={movable:e,anchor:r},!0)};return{getGridSurface:()=>Q.current,getRowHeaderElement:()=>ft.current,getColumnHeaderElement:()=>mt.current,rowHeaderHeight:()=>Se,colHeaderWidth:()=>xe,startEdit:Ye,submitEdit:()=>{Me.commit()},cancelEdit:()=>{Me.cancel()},isEditing:Ne!==null,focus:n=>{let r=Me.getSession(),i=r?.getCoords().scope;(!r||i&&i!==c.getName())&&(c?.getView().getMovableSelection().length>0?t():e(n))},focusSheet:e,focusMovable:t,contains:e=>Q.current?.contains?.(e)??!1,invalidate:nt,isSheetElement:()=>!0,getSheet:()=>c,onWheelScroll:ot}},[c,Me,Ne]),nt=(0,r.useCallback)(()=>{G.current||(lt.current.clear(),Q.current?.invalidate(),B?.())},[]),rt=(0,r.useMemo)(()=>O?(0,i.jsx)(`div`,{className:P(`viewport-overlay`,wo),style:{width:`100%`,height:`100%`,boxSizing:`border-box`,position:`absolute`},children:O}):(0,i.jsx)(i.Fragment,{}),[O]),it=null;me&&he&&(it=(0,i.jsx)(Ga,{width:xe,height:Se,sheet:c,colorScheme:p,onMouseDown:e=>{e.nativeEvent.which===s.MouseButtonCodes.Right?g?.({originalEvent:e,clientX:e.clientX,clientY:e.clientY,rowIndex:-1,colIndex:-1}):Q.current?.focus()}}));let at=(0,r.useRef)(null),ot=(0,s.useCallbackRef)(e=>{if(e.shiftKey||!e.ctrlKey&&!e.metaKey)return;let{deltaY:t}=e,n=t>0?`sheetZoomOut`:t<0?`sheetZoomIn`:null;if(n){let e=at.current;e?.resolve(n,e)?.execute()}return t===0},[]);(0,r.useEffect)(()=>{fe(c.getView()),qe(Ge(c.getView().getFreezePanes())),lt.current.clear(),B()},[le,c?.getView()]);let st=(0,r.useCallback)((e,t)=>c.getRowHeaders().hiddenHeadersAt(e,t),[c]),ct=(0,r.useCallback)((e,t)=>c.getColumnHeaders().hiddenHeadersAt(e,t),[c]),lt=(0,r.useRef)(new Map),ut=(0,s.useCallbackRef)((e,n)=>{if(G.current)return[];let r=lt.current,i=n??e.getVisibleRange();if(!i)return[];let a=`${i.rowStart}:${i.colStart}:${i.rowEnd}:${i.colEnd}`,o=r.get(a);if(o)return o;let s=[];if(c.getRange(i).forEach((e,n)=>{let r=n.getCoords(),i=n.getCell();if(!(e=>{if(e.isEmpty())return!1;let n=e.getSpans();if(n.width>1||n.height>1||e.getStyle().hasVisibleStyling()||$.isShowFormulas()&&e.getFormula()!==null)return!0;let r=e.getValue();return r!==null&&!(!$.isShowZeros()&&r===0&&e.getType()===t.ScalarType.Number)})(i))return;let a;$.isShowFormulas()||(a=i.getExtrusions()??void 0),s.push({cell:r,value:i,range:a})},ko),r.set(a,s),r.size>12){let e=r.keys().next().value;e!==void 0&&r.delete(e)}return s},[c,$.isShowZeros(),$.isShowFormulas()]),dt=(0,r.useMemo)(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px var(--sxl-color-base-100)`},propsPath:{stroke:`var(--sxl-color-base-content)`}}),[]),ft=(0,r.useRef)(null),pt=(0,r.useMemo)(()=>(0,i.jsx)(Wa,{ref:ft,tabIndex:-1,freezeStart:Ke?.[a.AnchorLocation.Top],oppositeSize:xe,sheetHeader:c.getRowHeaders(),colorScheme:p,propsCellRender:L,verticalPadding:Math.max(0,Math.floor(c.getStyles().getNormal().getFont().getSize()/10)),viewport:He,onSheetContextMenu:g,onFocus:()=>{Q.current?.focus()},style:{position:`relative`,flex:`0`,gridColumn:`1 / 2`,gridRow:`2 / 3`,zIndex:1}}),[xe,Se,c,L,He,Ke?.[a.AnchorLocation.Top],g,b,le]),mt=(0,r.useRef)(null),ht=(0,r.useMemo)(()=>(0,i.jsx)(Wa,{ref:mt,tabIndex:-1,freezeStart:Ke?.[a.AnchorLocation.Left],oppositeSize:Se,sheetHeader:c.getColumnHeaders(),colorScheme:p,propsCellRender:L,viewport:He,onSheetContextMenu:g,onFocus:()=>{Q.current?.focus()},style:{position:`relative`,display:`flex`,gridColumn:`2 / 3`,gridRow:`1 / 2`,zIndex:1}}),[Se,c,L,He,Ke?.[a.AnchorLocation.Left],g,v,le]),gt=(0,r.useMemo)(()=>{let e=c.getId();return[(0,i.jsx)(la,{sheet:c,onSheetContextMenu:g},`context-menu-[${e}]`),(0,i.jsx)(Fn,{sheet:c},`background-[${e}]`),(0,i.jsx)(Mn,{sheet:c,sheetView:$},`gridlines-[${e}]`),(0,i.jsx)(nn,{getVisibleCells:ut,sheet:c},`fills-[${e}]`),(0,i.jsx)(Ni,{sheet:c},`conditional-bars-[${e}]`),(0,i.jsx)(kn,{sheet:c,sheetView:$,propsCellRender:L,editable:Me},`cells-[${e}]`),(0,i.jsx)(On,{getVisibleCells:ut,sheet:c},`cell-borders-[${e}]`),(0,i.jsx)(o.Layer,{className:`grid-border`,children:(0,i.jsx)(o.VirtualDiv,{fill:!0,className:`grid-border`,...(0,s.themeSurfaceProps)(`app`,te),style:No})},`grid-border-[${e}]`),(0,i.jsx)(Ri,{sheet:c},`conditional-icons-[${e}]`),(0,i.jsx)(oi,{sheet:c},`spill-[${e}]`),(0,i.jsx)(Pt,{sheet:c,onShowTooltip:U,onCloseTooltip:W},`selection-[${e}]`),(0,i.jsx)(pr,{sheet:c},`table-[${e}]`),(0,i.jsx)(ai,{sheet:c},`table-commands-[${e}]`),(0,i.jsx)(Ut,{sheet:c,sheetView:$,className:`references`},`ref-picker-[${e}]`),(0,i.jsx)(Ca,{sheet:c},`clipboard-[${e}]`),(0,i.jsx)(An,{sheet:c,onColumnButtonMouseDown:L?.onColumnButtonMouseDown,propsColumnButton:L?.propsColumnButton,renderColumnButton:L?.renderColumnButton},`column-buttons-[${e}]`),(0,i.jsx)(Ui,{sheet:c},`validation-[${e}]`),(0,i.jsx)(Jn,{sheet:c,renderMovable:D},`movable-[${e}]`),(0,i.jsx)(jt,{sheet:c,editable:Me,darkMode:q,onEditRejected:Je},`editor-[${e}]`),S?(0,i.jsx)(an,{className:`errors`,sheet:c},`cell-errors-[${e}]`):null,(0,i.jsx)(aa,{sheet:c},`resize-indicator-[${e}]`),E]},[c,Z,D,g,E,Me,S,$,q,te,ut,L,Je]),_t=(0,r.useCallback)((e,t)=>(0,i.jsx)(Fr,{pane:e,children:t}),[]),[vt,yt]=(0,r.useState)(!1),bt=(0,r.useMemo)(()=>{let e=c.getStyles().getNormal(),t=e.getFont(),n=e.getFill();return(0,i.jsx)(o.GridSurface,{className:`sheetxl-sheet-primary`,wrapPane:_t,style:{...Do,cursor:et??null??`cell`,...n.toCSS(`adaptive`),...t.toCSS(`adaptive`,pe),minWidth:Ce,minHeight:we},ref:de,...I,onFirstRender:e=>{yt(!0),I?.onFirstRender?.(e)},freezeLeft:Ke?.[a.AnchorLocation.Left],propsFreezeLeft:dt,freezeTop:Ke?.[a.AnchorLocation.Top],propsFreezeTop:dt,columnCount:ge.width,rowCount:ge.height,metrics:De,getRangeFromCell:We,hiddenRowsAt:st,hiddenColumnsAt:ct,viewport:He,children:gt},`grid-main`)},[ve,ye,et,null,Ce,we,z,gt]);(0,r.useEffect)(()=>{G.current||(lt.current.clear(),B())},[Ke,pe,ze?.left,ze?.top,I,Ce,we,et,gt,null]);let xt=Eo;x||(xt={...xt,...d});let St=q?`dark`:`light`,Ct=(0,s.useCallbackRef)(e=>{let{style:t,...n}=e;return(0,i.jsx)(Ua,{...n,style:{...t,paddingLeft:`4px`,paddingRight:`4px`},sheet:c})},[c]),wt=(0,i.jsxs)(`div`,{...(0,s.themeSurfaceProps)(`grid`,St),style:{gridColumn:`2 / 3`,gridRow:`2 / 3`,overflow:`hidden`,position:`relative`},ref:H,children:[bt,rt,(0,i.jsx)(fa,{style:{position:`absolute`,right:24,bottom:4},colorLicensee:`var(--sxl-color-primary)`,colorCredits:`var(--sxl-color-base-content)`})]}),Tt=(0,i.jsxs)(`div`,{className:Y,style:xt,onTouchStart:()=>{kt()},onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||(ke(!0),j?.(e))},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(ke(!1),M?.(e))},ref:cn([tt,ce]),...R,children:[(0,i.jsx)(`style`,{children:ne}),(0,i.jsx)(`style`,{children:X}),(0,i.jsx)(`style`,{children:oe}),(0,i.jsx)(`div`,{className:P(u,`sheetxl-sheet`,Co),ref:f,...(0,s.themeSurfaceProps)(`grid`,St),style:{position:`absolute`,width:`100%`,height:`100%`,display:`grid`,gridTemplateColumns:`auto 1fr`,gridTemplateRows:`auto 1fr`,flex:`1 1 100%`},children:(0,i.jsxs)(o.SurfaceStateProvider,{children:[it,ht,pt,wt]})})]});x&&(Tt=(0,i.jsx)(s.ScrollPane,{style:{flex:`1 1 100%`,width:`100%`,height:`100%`,overflow:`hidden`,background:`var(--sxl-color-base-100)`,minHeight:2*be.height,minWidth:2*be.width,...d},viewport:He,disableTouch:$e,onWheelScroll:ot,renderScrollbarHorizontal:Ct,renderScrollbarVertical:Ct,...C,children:Tt})),(0,r.useEffect)(()=>{G.current=null,lt.current.clear(),Le(),B?.(),Oe&&tt.current?.focus()},[c]);let[Et,Dt]=(0,r.useState)(!1),kt=(0,s.useCallbackRef)(()=>{Et||Dt(!0)},[Et]);return(0,r.useEffect)(()=>{if(vt)return typeof k==`function`&&k(),s.ReactUtils.detectIt().primaryInput===`touch`&&kt(),()=>{}},[k,vt,Et]),(0,i.jsx)(xo,{sheet:c,editable:A,scopeRef:at,elementRef:tt,children:(0,i.jsx)(s.FloatProvider,{themeScopeClass:Y,themeSurface:`app`,themeMode:p,children:(0,i.jsx)(h,{sheet:c,children:Tt})})})}));To.displayName=`SheetElement`;var Eo=Object.freeze({flex:`1 1 100%`,width:`100%`,height:`100%`,minWidth:0,minHeight:0,display:`flex`,alignContent:`stretch`,position:`relative`}),Do={position:`absolute`,top:0,left:0,bottom:0,right:0},Oo={ignoreModelChange:!0},ko={ignoreHidden:!0,includeMergeOverflow:!0,reuseContext:!0},Ao=20,jo=40,Mo=`solid var(--sxl-color-base-border, light-dark(rgba(0, 0, 0, 0.26), rgba(255, 255, 255, 0.3))) 1px`,No={pointerEvents:`none`,borderTop:Mo,borderLeft:Mo,borderRight:Mo,borderBottom:`none`},Po=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{children:n,disabled:a,style:c,shape:l,isDragging:u,onHide:d,onShow:f,...p}=e,m=(0,r.useMemo)(()=>l?.toJSON()??null,[l]),h=m?.type===`grpSp`,g=h||m?.type===`cxnSp`?void 0:l.getName(),_=(0,o.useGridPane)(),v=(0,s.useImperativeElement)(t,()=>({isShapeEditor:()=>!0}),[]),[y,{height:b,width:x}]=vn();if(!l.isDeleted()&&!h)return(0,i.jsx)(`div`,{className:`shape-editor`,...p,ref:cn([v,y]),style:{width:`100%`,height:`100%`,border:`var(--sxl-color-neutral, grey) solid 1px`,backgroundColor:`var(--sxl-color-base-100, white)`,backgroundImage:`var(--sxl-image-background)`,alignItems:`center`,justifyContent:`center`,zoom:_.getZoom(),display:`flex`,position:`relative`,filter:a?`blur(1px)`:void 0,boxShadow:u?`1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))`:void 0,overflow:`hidden`,wordBreak:`break-word`,...c},children:g})}));Po.displayName=`ShapeEditor`;var Fo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 619 1941 h -299 v -1322 h 299 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1429 1941 h -298 v -1066 h 298 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z`})]}),Io=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 832 1387 h -469 v -640 h 469 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1600 1131 h -469 v -811 h 469 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z`})]}),Lo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 832 1515 h -469 v -1195 h 469 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1600 875 h -469 v -555 h 469 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z`})]}),Ro=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z`})]}),zo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z`})]}),Bo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1877 299 h -1770 v -43 h 1770 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z`})]}),Vo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z`})]}),Ho=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z`})]}),Uo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z`})]}),Wo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z`})]}),Go=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z`})]}),Ko=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1813 277 v 299 h -1706 v -299 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 917 1088 v 299 h -810 v -299 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 896 1109 h -795 v -42 h 838 v 322 h -43 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z`})]}),qo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 704 832 v -469 h 640 v 469 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 917 1600 v -469 h 811 v 469 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z`})]}),Jo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 533 832 v -469 h 1195 v 469 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1173 1600 v -469 h 555 v 469 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z`})]}),Yo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z`})]}),Xo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z`})]}),Zo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1941 1941 h -1834 v -1834 h 1834 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z`})]}),Qo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z`})]}),$o=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z`})]}),es=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z`})]}),ts=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z`})]}),ns=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z`})]}),rs=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 619 1941 h -299 v -1322 h 299 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1429 1941 h -298 v -1066 h 298 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z`})]}),is=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 619 1941 h -299 v -1322 h 299 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1429 1941 h -298 v -1066 h 298 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z`})]}),as={themed:`_themed_f2asj_9`,small:`_small_f2asj_36`,medium:`_medium_f2asj_37`,large:`_large_f2asj_38`},os=(0,r.memo)(e=>{let{size:t=`medium`,className:n,children:r,...a}=e;return(0,i.jsx)(`span`,{className:P(`icon`,as.themed,as[t],n),...a,children:r})});os.displayName=`ThemedChartIcon`;var ss={types:{0:{type:`column`}}},cs={types:{0:{type:`column`,grouping:`stacked`}}},ls={types:{0:{type:`column`,grouping:`percentStacked`}}},us={types:{0:{type:`line`}}},ds={types:{0:{type:`line`,grouping:`stacked`}}},fs={types:{0:{type:`line`,grouping:`percentStacked`}}},ps={types:{0:{type:`line`,scatterStyle:`lineMarker`}}},ms={types:{0:{type:`line`,scatterStyle:`lineMarker`,grouping:`stacked`}}},hs={types:{0:{type:`line`,scatterStyle:`lineMarker`,grouping:`percentStacked`}}},gs={types:{0:{type:`pie`}}},_s={types:{0:{type:`pie`,holeSize:50}}},vs={types:{0:{type:`bar`}}},ys={types:{0:{type:`bar`,grouping:`stacked`}}},bs={types:{0:{type:`bar`,grouping:`percentStacked`}}},xs={types:{0:{type:`area`}}},Ss={types:{0:{type:`area`,grouping:`stacked`}}},Cs={types:{0:{type:`area`,grouping:`percentStacked`}}},ws={types:{0:{type:`scatter`,scatterStyle:`marker`}}},Ts={types:{0:{type:`scatter`,scatterStyle:`smoothMarker`}}},Es={types:{0:{type:`scatter`,scatterStyle:`smooth`}}},Ds={types:{0:{type:`scatter`,scatterStyle:`lineMarker`}}},Os={types:{0:{type:`scatter`,scatterStyle:`line`}}},ks={Column:`column`,ColumnStacked:`columnStacked`,ColumnStackedPercent:`columnStackedPercent`,Line:`line`,LineStacked:`lineStacked`,LineStackedPercent:`lineStackedPercent`,LineMarkers:`lineMarkers`,LineStackedMarkers:`lineStackedMarkers`,LineStackedPercentMarkers:`lineStackedPercentMarkers`,Pie:`pie`,PieDoughnut:`pieDoughnut`,Bar:`bar`,BarStacked:`barStacked`,BarStackedPercent:`barStackedPercent`,Area:`area`,AreaStacked:`areaStacked`,AreaStackedPercent:`areaStackedPercent`,ScatterMarkers:`scatterMarkers`,ScatterLinesMarkersSmooth:`scatterLinesMarkersSmooth`,ScatterLinesMarkers:`scatterLinesMarkers`,ScatterLinesSmooth:`scatterLinesSmooth`,ScatterLines:`scatterLines`,Bubble:`bubble`,Bubble3D:`bubble3D`},As=new Map;As.set(ks.Column,{Icon:Fo,description:(0,a.messageKey)(`chart.type.column`),template:ss}),As.set(ks.ColumnStacked,{Icon:Io,description:(0,a.messageKey)(`chart.type.columnStacked`),template:cs}),As.set(ks.ColumnStackedPercent,{Icon:Lo,description:(0,a.messageKey)(`chart.type.columnStackedPercent`),template:ls}),As.set(ks.Line,{Icon:Ro,description:(0,a.messageKey)(`chart.type.line`),template:us}),As.set(ks.LineStacked,{Icon:zo,description:(0,a.messageKey)(`chart.type.lineStacked`),template:ds}),As.set(ks.LineStackedPercent,{Icon:Bo,description:(0,a.messageKey)(`chart.type.lineStackedPercent`),template:fs}),As.set(ks.LineMarkers,{Icon:Vo,description:(0,a.messageKey)(`chart.type.lineMarkers`),template:ps}),As.set(ks.LineStackedMarkers,{Icon:Ho,description:(0,a.messageKey)(`chart.type.lineStackedMarkers`),template:ms}),As.set(ks.LineStackedPercentMarkers,{Icon:Uo,description:(0,a.messageKey)(`chart.type.lineStackedPercentMarkers`),template:hs}),As.set(ks.Pie,{Icon:Wo,description:(0,a.messageKey)(`chart.type.pie`),template:gs}),As.set(ks.PieDoughnut,{Icon:Go,description:(0,a.messageKey)(`chart.type.pieDoughnut`),template:_s}),As.set(ks.Bar,{Icon:Ko,description:(0,a.messageKey)(`chart.type.bar`),template:vs}),As.set(ks.BarStacked,{Icon:qo,description:(0,a.messageKey)(`chart.type.barStacked`),template:ys}),As.set(ks.BarStackedPercent,{Icon:Jo,description:(0,a.messageKey)(`chart.type.barStackedPercent`),template:bs}),As.set(ks.Area,{Icon:Yo,description:(0,a.messageKey)(`chart.type.area`),template:xs}),As.set(ks.AreaStacked,{Icon:Xo,description:(0,a.messageKey)(`chart.type.areaStacked`),template:Ss}),As.set(ks.AreaStackedPercent,{Icon:Zo,description:(0,a.messageKey)(`chart.type.areaStackedPercent`),template:Cs}),As.set(ks.ScatterMarkers,{Icon:Qo,description:(0,a.messageKey)(`chart.type.scatterMarkers`),template:ws}),As.set(ks.ScatterLinesMarkersSmooth,{Icon:$o,description:(0,a.messageKey)(`chart.type.scatterLinesMarkersSmooth`),template:Ts}),As.set(ks.ScatterLinesMarkers,{Icon:ts,description:(0,a.messageKey)(`chart.type.scatterLinesMarkers`),template:Ds}),As.set(ks.ScatterLinesSmooth,{Icon:es,description:(0,a.messageKey)(`chart.type.scatterLinesSmooth`),template:Es}),As.set(ks.ScatterLines,{Icon:ns,description:(0,a.messageKey)(`chart.type.scatterLines`),template:Os}),As.set(ks.Bubble,{Icon:rs,description:(0,a.messageKey)(`chart.type.bubble`),template:null}),As.set(ks.Bubble3D,{Icon:is,description:(0,a.messageKey)(`chart.type.bubble3D`),template:null});var js=e=>As.get(e),Ms=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{children:n,disabled:c,chart:l,isDragging:u,onHide:d,onShow:f,...p}=e;(0,r.useEffect)(()=>{},[l]);let m=(0,o.useGridPane)(),h=(0,s.useImperativeElement)(t,()=>({isChartEditor:()=>!0}),[]),[g,{height:_,width:v}]=vn();if(l.isDeleted())return;let y=js(l.getChartType());y||=js(ks.Column);let b=y.Icon;return(0,i.jsx)(`div`,{...p,ref:cn([h,g]),children:(0,i.jsxs)(`div`,{className:`chart-editor`,style:{width:`100%`,height:`100%`,paddingTop:`20px`,paddingBottom:`20px`,backgroundColor:`var(--sxl-color-base-100, white)`,backgroundImage:`var(--sxl-image-background)`,alignItems:`center`,justifyContent:`center`,zoom:m.getZoom(),display:`flex`,flexDirection:`column`,rowGap:`8px`,position:`relative`,border:`var(--sxl-color-neutral, grey) solid 1px`,filter:c?`blur(1px)`:void 0,boxShadow:u?`1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))`:void 0},children:[l.getChartTitle(),(0,i.jsx)(b,{style:{maxWidth:`260px`,fill:`grey`,opacity:.4}}),(0,i.jsx)(`div`,{style:{textAlign:`center`},children:a.CommonUtils.camelToPrettyCase(l.getChartType())})]})})}));Ms.displayName=`ChartEditor`;var Ns=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{children:n,disabled:a,slicer:c,isDragging:l,onHide:u,onShow:d,...f}=e;(0,r.useEffect)(()=>{},[c]);let p=(0,o.useGridPane)(),m=(0,s.useImperativeElement)(t,()=>({isSlicerEditor:()=>!0}),[]),[h,{height:g,width:_}]=vn();if(!c.isDeleted())return(0,i.jsx)(`div`,{...f,ref:cn([m,h]),children:(0,i.jsx)(`div`,{className:`slicer-editor`,style:{width:`100%`,height:`100%`,backgroundColor:`var(--sxl-color-base-100, white)`,backgroundImage:`var(--sxl-image-background)`,alignItems:`center`,justifyContent:`center`,zoom:p.getZoom(),display:`flex`,position:`relative`,border:`var(--sxl-color-neutral, grey) solid 1px`,filter:a?`blur(1px)`:void 0,boxShadow:l?`1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))`:void 0},children:(0,i.jsx)(`div`,{style:{textAlign:`center`},children:c.getDescription()})})})}));Ns.displayName=`SlicerEditor`;var Ps={placement:`bottom-start`,followAnchor:!0},Fs={x:0,y:0,top:0,left:0,bottom:0,right:0,width:0,height:0,toJSON:()=>({})},Is=e=>{let{api:n,grammar:a,disabled:l}=e,u=a===`formula`,d=y(),f=e.workbook===void 0?d:e.workbook,p=te().getMode(),m=!!p?.activeInput&&!n.engaged,[h,g]=(0,r.useState)(-1),[_,v]=(0,r.useState)(null),[b,x]=(0,r.useState)(null),S=(0,r.useMemo)(()=>ft(u?n.tokens:null),[u,n.tokens]),[C,T]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=n.tokens,t=u&&n.engaged&&e&&h>=0?pt(e,S.matchOf,h,n.tokenBase):null;T(e=>mt(e,t)?e:t)},[u,n.engaged,n.tokens,n.tokenBase,h,S]);let E=(0,r.useMemo)(()=>ht(u?_:null,C,S),[u,_,C,S]),O=h>=0?Math.min(h,n.text.length):n.text.length,k=u&&n.engaged&&n.text.length>0&&w(n.text,O),A=k&&O>=n.text.length,j=k&&!A?O:-1,M=(0,r.useMemo)(()=>{if(u){let e=n.tokens;if(!e)return null;let t=n.tokenBase,r=e.map(e=>{let n=t;return t+=(e.text??``).length,n}),a=e.map((e,t)=>{let n=S.unmatched.has(t),a=E.has(t),o=S.depthOf.get(t),s=n||o===void 0||e.isReference?void 0:st(o),c=n?ut:s??D(e),l;(c||a||n)&&(l={},c&&(l.color=c),n&&(l.fontWeight=`bold`),a&&(l.color=`transparent`));let u=e.text??``,d=j>=r[t]&&j<r[t]+u.length;return(0,i.jsxs)(`span`,{"data-si":t,style:l,children:[a&&(0,i.jsx)(`span`,{"aria-hidden":!0,style:ct,children:(0,i.jsx)(`span`,{style:lt(c??`inherit`),children:e.text})}),d?(0,i.jsxs)(i.Fragment,{children:[u.slice(0,j-r[t]),(0,i.jsx)(et,{}),u.slice(j-r[t])]}):u]},`t-${t}`)}),o=n.tokenBase>0?(0,i.jsx)(`span`,{children:n.text.slice(0,n.tokenBase)},`eq`):null,s=A?(0,i.jsx)(et,{},`expected`):null;if(!_)return[o,...a,s].filter(Boolean);let{lo:c,hi:l,outline:u}=_,d=u?it:rt;return[o,...a.slice(0,c),(0,i.jsx)(`span`,{className:`formula-eval-run`,style:d,children:a.slice(c,l+1)},`eval-run`),...a.slice(l+1),s].filter(Boolean)}if(n.segments.length===0)return null;let e=[];return n.segments.forEach((t,n)=>{n>0&&e.push((0,i.jsx)(`span`,{children:`,`},`sep-${n}`));let r=_&&_.lo===n;e.push((0,i.jsx)(`span`,{"data-si":n,style:{...t.valid?{color:o.PICKER_COLORS[n%o.PICKER_COLORS.length]}:null,...r?_.outline?it:rt:null},children:t.text},`seg-${n}`))}),e},[u,n.tokens,n.tokenBase,n.text,n.segments,S,E,_,A,j]),N=!l&&!m&&!!M,P=(0,r.useRef)(null),F=(0,r.useRef)(null),I=(0,r.useRef)(null),[L,R]=(0,r.useState)(null);(0,r.useLayoutEffect)(()=>{if(!N)return void R(null);let e=F.current,t=P.current;if(!e||!t)return;let n=()=>{let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.getComputedStyle(e);R({position:`absolute`,left:n.left-r.left,top:n.top-r.top,width:n.width,height:n.height,boxSizing:`border-box`,paddingLeft:i.paddingLeft,paddingRight:i.paddingRight,paddingTop:i.paddingTop,paddingBottom:i.paddingBottom,font:i.font,letterSpacing:i.letterSpacing,display:`flex`,alignItems:`center`,whiteSpace:`pre`,overflow:`hidden`,pointerEvents:`none`,textAlign:`left`});let a=I.current;a&&(a.scrollLeft=e.scrollLeft)};if(n(),typeof ResizeObserver>`u`)return;let r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[N,n.text]);let z=Ze({text:n.text,getTokens:()=>u?n.tokens:null,active:u&&n.engaged,getCaret:()=>F.current?.selectionStart??n.text.length,getCalculation:()=>{try{return f?.getSelectedSheet().getCalculation()??null}catch{return null}},getNames:()=>{try{return f?.getSelectedSheet().getNames()??null}catch{return null}},getLocale:()=>f?.getLocale()??null,applyText:(e,t)=>{n.replaceText(e,t)},hoveredTokenIndex:b});(0,r.useEffect)(()=>{z.update()},[z.update,n.text,h,n.engaged]);let B=(0,s.useFloatStack)({label:`formula-field-hint`,anchor:(0,r.useMemo)(()=>({getBoundingClientRect:()=>F.current?.getBoundingClientRect()??Fs}),[]),autoFocus:!1,disableClickAway:r.default.useCallback(e=>!!P.current?.contains(e),[]),propsPopper:Ps,createPopupPanel:z.renderPanel}),V=z.active&&!p?.dragging,H=B.reference;(0,r.useEffect)(()=>{V?H.open(0):H.close(0)},[V,H]);let[U,W]=(0,r.useState)(null),G=(0,r.useRef)(null),K=(0,r.useRef)(!1),q=()=>{G.current=null,K.current=!1,W(null),v(null),x(null)},ee=()=>{K.current||q()},J=ie(()=>q(),()=>ne()),Y=t=>{if(!f)return!1;try{return f.getSelectedSheet().getCalculation().createFormula(`=`+t,e.home).isValid()}catch{return!1}},ne=()=>{let t=F.current,r=I.current,i=()=>{K.current&&q()};if(!t||!r||!N)return void i();if(J.isDragging())return;let a=t.selectionStart??0,o=t.selectionEnd??0;if(a===o)return void i();let s=null;if(u){let t=f?se(n.tokens,n.tokenBase,n.text,a,o,Y):null;t&&(s={lo:t.lo,hi:t.hi,key:`sel:f:${t.lo}:${t.hi}:${t.fragment??t.evalIndex}`,evaluate:async()=>{let r=f.getSelectedSheet().getCalculation();return fe(t.fragment===null?await r.createFormula(n.text,e.home).evaluate({evalIndex:t.evalIndex}):await r.createFormula(`=`+t.fragment,e.home).evaluate())}})}else{let e=0,t=-1;for(let r=0;r<n.segments.length;r++){r>0&&(e+=1);let i=e;if(e+=n.segments[r].text.length,i<o&&e>a){if(t>=0){t=-1;break}t=r}}if(t>=0&&n.segments[t].valid){let e=t;s={lo:e,hi:e,key:`sel:s:${e}:${n.segments[e].text}`,evaluate:()=>n.evaluateSegment(e)}}}if(!s)return void i();if(s.key===G.current)return;G.current=s.key,K.current=!0,W(null),x(null),v({lo:s.lo,hi:s.hi,outline:!0});let c=r.querySelector(`[data-si="${s.lo}"]`)?.getBoundingClientRect(),l=r.querySelector(`[data-si="${s.hi}"]`)?.getBoundingClientRect();if(!c)return void q();let d=l&&Math.abs(l.top-c.top)<1?{left:(c.left+l.right)/2,top:c.top-6}:{left:(c.left+c.right)/2,top:c.top-6},p=s.key;s.evaluate().then(e=>{G.current===p&&e!=null&&W({...d,text:e})}).catch(()=>{})};(0,r.useEffect)(()=>{n.engaged||q()},[n.engaged]);let X=r=>{if(r.which!==s.KeyCodes.F9||r.shiftKey||r.ctrlKey||r.altKey||r.metaKey)return!1;let i=F.current;if(!u||!i||!f||l||!n.tokens?.length)return!1;let a=i.selectionStart??0,o=i.selectionEnd??0,c;if(a!==o)c=se(n.tokens,n.tokenBase,n.text,a,o,Y);else{let e=ce(n.tokens);c=e?{...e,...le(n.tokens,n.tokenBase,e.lo,e.hi),fragment:null}:null}if(!c)return!1;r.preventDefault(),r.stopPropagation();let d=n.text,p=f.getSelectedSheet().getCalculation(),m=ue((0,t.getLocaleProfile)(f.getLocale()??`en`).decimal),h=(0,t.getLanguagePack)(),g={t:h?.booleans?.true??`TRUE`,f:h?.booleans?.false??`FALSE`};return(async()=>{let t=null,n=``;try{if(t=de(c.fragment===null?await p.createFormula(d,e.home).evaluate({evalIndex:c.evalIndex}):await p.createFormula(`=`+c.fragment,e.home).evaluate(),m,g),t===null||(n=d.slice(0,c.start)+t+d.slice(c.end),!p.createFormula(n,e.home).isValid()))return}catch{return}let r=F.current;if(!r||r.value!==d)return;s.ReactUtils.replaceRangeText(r,c.start,c.end,t);let i=c.start,a=c.start+t.length;requestAnimationFrame(()=>{F.current?.value===n&&F.current.setSelectionRange(i,a)})})(),!0};return(0,r.useEffect)(()=>{q()},[n.text]),{containerRef:P,inputElRef:F,overlayActive:N,inputHandlers:{onScroll:e=>{let t=I.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft),q(),ne()},onMouseMove:t=>{let r=I.current;if(!r)return;if(J.blocksHover(t)||ae(F.current))return void ee();let i=t.clientX,a=t.clientY,o=r.querySelectorAll(`[data-si]`),s=-1,c=null;for(let e=0;e<o.length;e++){let t=o[e].getBoundingClientRect();if(i>=t.left&&i<=t.right&&a>=t.top&&a<=t.bottom){s=Number(o[e].getAttribute(`data-si`)),c=t;break}}if(s<0||!c)return void q();if(u){let t=n.tokens;if(!t||!f)return void q();let i=oe(t,s);if(!i)return void q();let a=`f:${i.evalIndex}:${i.lo}:${i.hi}`;if(a===G.current)return;G.current=a,W(null),v({lo:i.lo,hi:i.hi}),x(s);let o=r.querySelector(`[data-si="${i.lo}"]`)?.getBoundingClientRect(),l=r.querySelector(`[data-si="${i.hi}"]`)?.getBoundingClientRect(),u=o&&l&&Math.abs(l.top-o.top)<1?{left:(o.left+l.right)/2,top:o.top-6}:{left:(c.left+c.right)/2,top:c.top-6};try{let t=f.getSelectedSheet().getCalculation().createFormula(n.text,e.home);Promise.resolve(t.evaluate({evalIndex:i.evalIndex})).then(e=>{if(G.current!==a)return;let t=fe(e);t!=null&&W({...u,text:t})}).catch(()=>{})}catch{}return}if(!n.segments[s]?.valid)return void q();let l=`s:${s}:${n.segments[s].text}`;if(l===G.current)return;G.current=l,W(null),v({lo:s,hi:s});let d={left:(c.left+c.right)/2,top:c.top-6};n.evaluateSegment(s).then(e=>{G.current===l&&e!=null&&W({...d,text:e})})},onMouseLeave:ee,onSelect:e=>{g(F.current?.selectionStart??-1),ne()},onPointerDown:e=>{J.begin(e),V&&!B.isOpen&&H.open(0)}},inputExpected:k,handleKeyDown:e=>!!z.handleKeyDown(e)||(e.which===s.KeyCodes.Escape&&B.isOpen?(e.preventDefault(),e.stopPropagation(),H.close(0),!0):!!X(e)),overlayElement:N&&L?(0,i.jsx)(`div`,{ref:I,"aria-hidden":!0,style:L,children:(0,i.jsx)(`span`,{style:{whiteSpace:`pre`},children:M})}):null,tipElement:U?(0,c.createPortal)((0,i.jsx)(`div`,{className:`sxl-formula-eval-tip`,style:{...Z,left:U.left,top:U.top},children:U.text}),document.body):null,hintElement:B.component}},Ls=e=>{e.button===0&&e.preventDefault()},Rs=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{grammar:n=`formula`,value:a,onChangeInput:o,onChangeText:c,onDone:l,changeOn:u,workbook:d,apiRef:f,hideAdornment:p,hideError:m,home:h,equals:g,pickAs:_,allowMulti:v,allowCrossSheet:y,disabled:b,className:x,style:S,onKeyDown:C,onFocus:w,onBlur:T,placeholder:E,...D}=e,O=(0,s.useTranslator)(),k=we({value:a,onChange:o,onChangeText:c,onDone:l,changeOn:u,workbook:d,home:h,equals:g,pickAs:_,allowMulti:v,allowCrossSheet:y,disabled:b},n);(0,r.useImperativeHandle)(f,()=>k,[k]);let A=Is({api:k,grammar:n,disabled:b,workbook:d,home:h}),j=!!k.error&&!A.inputExpected,M=!!l,N={display:`inline-flex`,alignItems:`center`,justifyContent:`center`,border:`none`,background:`none`,padding:`0 2px`,margin:0,cursor:`pointer`,color:`inherit`,opacity:.8},F=p?null:(0,i.jsx)(`span`,{className:`sxl-input-adornment`,onMouseDown:Ls,style:{display:`inline-flex`,alignItems:`center`,flex:`0 0 auto`},children:k.engaged&&M?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{type:`button`,"aria-label":`commit-reference`,title:O(`referenceInput.commit`),style:N,disabled:!!k.error,tabIndex:-1,onMouseDown:Ls,onClick:()=>{k.commit()},children:(0,i.jsx)(s.DynamicIcon,{iconKey:`CheckSuccess`})}),(0,i.jsx)(`button`,{type:`button`,"aria-label":`cancel-reference`,title:O(`referenceInput.cancel`),style:N,tabIndex:-1,onMouseDown:Ls,onClick:()=>{k.cancel()},children:(0,i.jsx)(s.DynamicIcon,{iconKey:`CloseError`})})]}):(0,i.jsx)(`button`,{type:`button`,"aria-label":`select-current-range`,title:O(`referenceInput.selectCurrent`),style:b||!k.canSelectCurrent?{...N,opacity:.3,cursor:`default`}:N,disabled:b||!k.canSelectCurrent,tabIndex:-1,onMouseDown:Ls,onClick:()=>{k.engaged||k.togglePoint(),k.selectCurrent()},children:(0,i.jsx)(s.DynamicIcon,{iconKey:`SelectRangeMode`})})});return(0,i.jsxs)(`div`,{ref:e=>{A.containerRef.current=e,typeof t==`function`?t(e):t&&(t.current=e)},className:P(`sxl-formula-input`,x),"data-grammar":n,"data-error":j?``:void 0,"data-engaged":k.engaged?``:void 0,style:{position:`relative`,display:`inline-flex`,flexDirection:`column`,minWidth:0,fontFamily:`var(--sxl-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif)`,...S},children:[(0,i.jsxs)(`span`,{style:{display:`inline-flex`,flexDirection:`row`,alignItems:`center`,border:`1px solid `+(j?`var(--sxl-color-error, #d93025)`:`var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2)))`),borderRadius:`var(--sxl-input-radius, 4px)`,background:`var(--sxl-input-bg, transparent)`},children:[(0,i.jsx)(`input`,{...D,type:`text`,spellCheck:!1,autoComplete:`off`,placeholder:E,disabled:b,readOnly:b||k.inputProps.readOnly,"aria-invalid":!!j||void 0,value:k.inputProps.value,ref:e=>{A.inputElRef.current=e,k.inputProps.ref(e)},onChange:k.inputProps.onChange,onKeyDown:e=>{A.handleKeyDown(e)||(k.inputProps.onKeyDown(e),e.defaultPrevented||C?.(e))},onPointerDown:A.inputHandlers.onPointerDown,onMouseDown:k.inputProps.onMouseDown,onSelect:e=>{k.inputProps.onSelect(e),A.inputHandlers.onSelect(e)},onFocus:e=>{k.inputProps.onFocus(e),w?.(e)},onBlur:e=>{k.inputProps.onBlur(e),T?.(e)},onScroll:A.inputHandlers.onScroll,onMouseMove:A.inputHandlers.onMouseMove,onMouseLeave:A.inputHandlers.onMouseLeave,onContextMenu:e=>{e.stopPropagation()},style:{flex:`1 1 auto`,minWidth:0,font:`inherit`,color:`inherit`,background:`none`,border:`none`,outline:`none`,padding:`var(--sxl-input-padding, 4px 6px)`,...A.overlayActive?{color:`transparent`,caretColor:`var(--sxl-color-text, light-dark(#000, #fff))`}:null}}),F]}),!m&&(0,i.jsx)(`span`,{className:`sxl-formula-input-error`,style:{display:`block`,visibility:j?`visible`:`hidden`,color:`var(--sxl-color-error, #d93025)`,fontSize:`0.75em`,paddingTop:`2px`},children:j?O(k.error):`\xA0`}),A.overlayElement,A.tipElement,A.hintElement]})}));Rs.displayName=`FormulaInput`;var zs=`_editable-input_1u3oj_6`,Bs=e=>(0,i.jsx)(`input`,{...e}),Vs=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{style:n={},className:a,value:o=``,onSubmit:c,onChange:l,onCancel:u,renderInput:d=Bs,styleHover:f={},dragging:p,maxLength:m,disabled:h=!1,readOnly:g=!1,..._}=e,[v,y]=(0,r.useState)(!1),[b,x]=(0,r.useState)(!1),[S,C]=(0,r.useState)(o);(0,r.useEffect)(()=>{C(o)},[o]);let w=(0,r.useRef)(null),[T,E]=(0,r.useState)(null),D=(0,s.useNotifier)(),O=(0,r.useCallback)(function(e){let t=e.message;T!==t&&(D?.showMessage?.(t,{type:s.NotifierType.Error}),E(t))},[D,T]),k=(0,r.useCallback)(e=>{let t=!1;try{t=c?.(e)??!0}catch(e){O(e)}return t?(w.current=null,x(!1),C(e),t):(setTimeout(()=>{w.current?.focus()},0),t)},[c]),A=(0,s.useCallbackRef)(()=>{C(o),w.current=null,x(!1),u?.()},[u,o]),j=(0,r.useMemo)(()=>{if(!b)return null;let e={className:P(zs),autoFocus:!0,spellCheck:!1,name:`editable-label`,autoComplete:`off`,maxLength:m,type:`text`,value:S,onFocus:e=>{w.current||(w.current=e.target,setTimeout(()=>{e.target?.select()},0))},onBlur:e=>{w.current&&k(S)},onChange:e=>{b&&C(e.target.value)},onMouseDown:e=>e.stopPropagation(),onKeyDown:e=>e.code===`Escape`?(e.preventDefault(),void A()):e.code===`Enter`?(e.preventDefault(),void k(e.target.value)):void(e.code===`Tab`?k(e.target.value):e.stopPropagation())};return(0,i.jsx)(i.Fragment,{children:d(e)})},[b,S,k,A,d,h]),[M,N]=(0,r.useState)();(0,r.useLayoutEffect)(()=>{let e=Object.assign({},n);(p||v)&&(e=Object.assign(e,f)),N(e)},[p,v,f,n]),(0,r.useEffect)(()=>{j&&l?.(S)},[j,l,S]);let F=(0,s.useImperativeElement)(t,()=>({startEdit(){h||g||x(!0)},cancel(){A()}}),[]);return(0,i.jsxs)(`div`,{..._,ref:F,style:{flexDirection:`column`,display:`flex`,...M},className:P(a),children:[(0,i.jsxs)(`div`,{style:{position:`relative`,boxSizing:`content-box`,whiteSpace:`pre`,userSelect:`none`,display:`flex`,justifyContent:`center`},onDoubleClick:()=>{h||g||x(!0)},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[(0,i.jsx)(`div`,{className:`editable-label-container`,style:{textAlign:`center`,display:`flex`,minHeight:`1em`,opacity:+!b},children:S}),j]}),(0,i.jsx)(`div`,{style:{whiteSpace:`pre`,position:`relative`,maxHeight:`0px`,height:`0px`,visibility:`hidden`,marginLeft:`1px`,marginRight:`1px`,overflow:`hidden`,...f},children:S})]})})),Hs=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Us(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Ws(e){return`nodeType`in e}function Gs(e){var t;return e?Us(e)?e:Ws(e)&&(t=e.ownerDocument?.defaultView)!=null?t:window:window}function Ks(e){let{Document:t}=Gs(e);return e instanceof t}function qs(e){return!Us(e)&&e instanceof Gs(e).HTMLElement}function Js(e){return e instanceof Gs(e).SVGElement}function Ys(e){return e?Us(e)?e.document:Ws(e)?Ks(e)?e:qs(e)||Js(e)?e.ownerDocument:document:document:document}var Xs=Hs?n.useLayoutEffect:n.useEffect;function Zs(e){let t=(0,n.useRef)(e);return Xs(()=>{t.current=e}),(0,n.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}function Qs(e,t){t===void 0&&(t=[e]);let r=(0,n.useRef)(e);return Xs(()=>{r.current!==e&&(r.current=e)},t),r}function $s(e,t){let r=(0,n.useRef)();return(0,n.useMemo)(()=>{let t=e(r.current);return r.current=t,t},[...t])}function ec(e){let t=Zs(e),r=(0,n.useRef)(null);return[r,(0,n.useCallback)(e=>{e!==r.current&&t?.(e,r.current),r.current=e},[])]}function tc(e){let t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e},[e]),t.current}var nc={};function rc(e,t){return(0,n.useMemo)(()=>{if(t)return t;let n=nc[e]==null?0:nc[e]+1;return nc[e]=n,e+`-`+n},[e,t])}function ic(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var ac=ic(1),oc=ic(-1);function sc(e){if(!e)return!1;let{KeyboardEvent:t}=Gs(e.target);return t&&e instanceof t}function cc(e){if(function(e){if(!e)return!1;let{TouchEvent:t}=Gs(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return`clientX`in e&&`clientY`in e}(e)?{x:e.clientX,y:e.clientY}:null}var lc=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[lc.Translate.toString(e),lc.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),uc=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function dc(e){return e.matches(uc)?e:e.querySelector(uc)}var fc={display:`none`};function pc(e){let{id:t,value:r}=e;return n.default.createElement(`div`,{id:t,style:fc},r)}function mc(e){let{id:t,announcement:r,ariaLiveType:i=`assertive`}=e;return n.default.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":i,"aria-atomic":!0},r)}var hc=(0,n.createContext)(null),gc,_c={draggable:`
26
+ Names can be used as a substitute for cell references.`,shortcut:`ctrl+F3`,icon:`NamedManager`},createNamedReferenceFromSelection:{label:`Create from Selection`,description:`Automatically generate names from the selected cells.`,shortcut:`ctrl+shift+F3`},spellCheck:{label:`Spell Check`,description:`Check the workbook for spelling mistakes.`,shortcut:`F7`},workbookStatistics:{label:`Workbook Statistics`,description:`Show the workbook statistics.`,shortcut:`ctrl+shift+G`},showFormat:{label:`Show Format`,description:`Open the format pane.`,shortcut:`ctrl+shift+F`}}}}],{DefaultCommandCatalogService:Rr}=s.Command,zr=!1;function Br(){zr||(zr=!0,Rr.registerFromManifest(`@sheetxl/react`,{}.url,{messages:Ir,catalogs:Lr}))}Br();var{CommandScope:Vr,DefaultCommandRegistry:Hr,FocusActivation:Ur,CommandRegistryContext:Wr,CommandScopeContext:Gr,CommandAnchorProvider:Kr,CommandFallbackProvider:qr,useCommandScope:Jr}=s.Command,Yr=({initialAnchor:e,children:t})=>Jr()?(0,i.jsx)(i.Fragment,{children:t}):(0,i.jsx)(Xr,{initialAnchor:e,children:t});Yr.displayName=`CommandRootProvider`;var Xr=({initialAnchor:e,children:t})=>{let n=(0,r.useRef)(e),{root:a,registry:o,studioTracker:s}=(0,r.useMemo)(()=>{let e=Hr,t=new Vr(`app`,null,{registry:e});return{root:t,registry:e,studioTracker:new Ur(t,n.current)}},[]);return(0,r.useEffect)(()=>(a.connect(),()=>a.dispose()),[a]),(0,i.jsx)(Wr.Provider,{value:o,children:(0,i.jsx)(kr.Provider,{value:s,children:(0,i.jsx)(Gr.Provider,{value:a,children:(0,i.jsxs)(Kr,{tracker:s,keyBindings:`synthetic`,debounce:100,children:[(0,i.jsx)(Or,{}),(0,i.jsx)(qr,{children:t})]})})})})};Xr.displayName=`CommandRootProviderOwn`;var Zr=`workbookToolbars`,Qr={key:`tableStyleOptions`,showLabel:!0,members:[`tableHeaderRowToggle`,`tableTotalRowToggle`,`tableBandedRowsToggle`,`tableFirstColumnToggle`,`tableLastColumnToggle`,`tableBandedColumnsToggle`,`tableFilterToggle`]},$r={key:`tableToolbar`,contributions:{[Zr]:{order:1}},members:[`editTable`,`-`,`tableStyleOptions`,`-`,`sortOptions`,`filterOptions`,`-`,`dataRemoveDuplicates`,{key:`convertTableToRange`,showLabel:!0},`-`,`formatTableStyle`]},ei=0,ti=()=>{ei>0&&--ei===0&&(s.Command.DefaultCommandButtonRegistry.get(`tableToolbar`)&&s.Command.DefaultCommandButtonRegistry.unregister(`tableToolbar`),s.Command.DefaultCommandButtonRegistry.get(`tableStyleOptions`)&&s.Command.DefaultCommandButtonRegistry.unregister(`tableStyleOptions`))},ni=(e,t)=>e?[t]:[];function ri(e,n){let r=n.sheet;if(!r)return()=>{};let i=n.notifier,o=()=>{let e=r.getSelectedRanges();if(e.getCount()!==1)return null;let t=e.at(0).getCoords();for(let e of r.getTables().getItems()){let n=e.getRange().getCoords();if(t.rowStart>=n.rowStart&&t.rowEnd<=n.rowEnd&&t.colStart>=n.colStart&&t.colEnd<=n.colEnd)return e}return null},c=e=>{let t=e.getDataRange().getCoords(),n=r.getSelectedRange().getCoords(),i=Math.min(Math.max(n.rowStart,t.rowStart),t.rowEnd),a=Math.min(Math.max(n.rowEnd,t.rowStart),t.rowEnd);return{index:i-t.rowStart,count:a-i+1,valid:n.rowStart>=t.rowStart&&n.rowEnd<=t.rowEnd}},l=e=>{let t=e.getRange().getCoords(),n=r.getSelectedRange().getCoords(),i=Math.min(Math.max(n.colStart,t.colStart),t.colEnd),a=Math.min(Math.max(n.colEnd,t.colStart),t.colEnd);return{index:i-t.colStart,count:a-i+1}},u=e=>()=>{let t=o(),n=t?c(t):null;return(0,a.t)(e,{count:n?.valid?n.count:1})},d=e=>()=>{let t=o();return(0,a.t)(e,{count:t?l(t).count:1})},f=()=>{let e=o();e&&c(e).valid&&r.getSelectedRange().insert({axis:t.IRange.Axis.Row,span:!0})},p=()=>{let e=o();e&&c(e).valid&&r.getSelectedRange().delete({axis:t.IRange.Axis.Row,span:!0})},m=()=>{o()&&r.getSelectedRange().insert({axis:t.IRange.Axis.Column,span:!0})},h=()=>{o()&&r.getSelectedRange().delete({axis:t.IRange.Axis.Column,span:!0})},g=()=>r.getSelectedRanges().getDefaultShiftAxis()===t.IRange.Axis.Column,_=()=>{let t=o();e.updateCommand(`tableTotalRowToggle`,{state:t?.isShowTotals()??!1}),e.updateCommand(`tableHeaderRowToggle`,{state:t?.isShowHeaders()??!1}),e.updateCommand(`tableBandedRowsToggle`,{state:t?.isShowBandedRows()??!1}),e.updateCommand(`tableFirstColumnToggle`,{state:t?.isShowHighlightFirstColumn()??!1}),e.updateCommand(`tableLastColumnToggle`,{state:t?.isShowHighlightLastColumn()??!1}),e.updateCommand(`tableBandedColumnsToggle`,{state:t?.isShowBandedColumns()??!1});let n=ni(!r.getProtection().isFormatCellsAllowed(),(0,a.messageKey)(`reason.sheetProtected`));if(e.updateCommand(`formatTableStyleClearTableStyle`,{disabledReasons:[...n,...ni(!t||t.getStyleOptions().name===null,(0,a.messageKey)(`reason.noTableStyle`))]}),t){let n=ni(!c(t).valid,(0,a.messageKey)(`reason.tableBodyRows`));e.updateCommand(`insertCellsShiftDown`,{disabledReasons:n}),e.updateCommand(`deleteCellsShiftUp`,{disabledReasons:n});let r=g()?[]:n;e.updateCommand(`insertCells`,{disabledReasons:r}),e.updateCommand(`deleteCells`,{disabledReasons:r})}},v=null,y=null,b=e=>{e!==v&&(y?.(),y=null,v=e,e&&(y=e.addListeners({onAnyChange:()=>{x!==null&&_()}},{transactional:!1})))},x=null,S=()=>{let t=o();b(t);let c=t?`table`:r.getAutoTable()?`auto`:null;c!==x&&(x!==null&&e.remove(),c===null?ti():(x===null&&ei++===0&&(s.Command.DefaultCommandButtonRegistry.register(Qr,!0),s.Command.DefaultCommandButtonRegistry.register($r,!0)),e.use(vr({transaction:r,notifier:i,manager:n.manager})),e.updateCommand(`tableTotalRowToggle`,{callback:()=>{let e=o();e&&e.setShowTotals(!e.isShowTotals())}}),e.updateCommand(`tableHeaderRowToggle`,{callback:()=>{let e=o();e&&e.setShowHeaders(!e.isShowHeaders())}}),e.updateCommand(`tableBandedRowsToggle`,{callback:()=>{let e=o();e&&e.setShowBandedRows(!e.isShowBandedRows())}}),e.updateCommand(`tableFirstColumnToggle`,{callback:()=>{let e=o();e&&e.setShowHighlightFirstColumn(!e.isShowHighlightFirstColumn())}}),e.updateCommand(`tableLastColumnToggle`,{callback:()=>{let e=o();e&&e.setShowHighlightLastColumn(!e.isShowHighlightLastColumn())}}),e.updateCommand(`tableBandedColumnsToggle`,{callback:()=>{let e=o();e&&e.setShowBandedColumns(!e.isShowBandedColumns())}}),e.updateCommand(`tableFilterRefresh`,{callback:()=>{(o()??r.getAutoTable())?.applySortsAndFilters()}}),e.updateCommand(`tableFilterClear`,{callback:e=>{if(e)return e.getFilter()?.delete(),void e.getSort()?.delete();(o()??r.getAutoTable())?.deleteSortsAndFilters()}}),e.updateCommand(`formatTableStyleClearTableStyle`,{tags:[`noTransaction`],callback:()=>{o()?.updateStyleOptions({name:null})},context:()=>({styles:()=>r.getStyles(),table:()=>o(),getNames:()=>r.getNames(),resolveRanges:e=>(r.getWorkbook()??r).getRanges(e).getFixed(!0)})}),c===`table`&&(e.updateCommand(`insertCellsShiftDown`,{label:u((0,a.messageKey)(`table.insertRows`)),groupLabels:{insertCellsOptions:u((0,a.messageKey)(`table.rows.compact`))},description:()=>(0,a.t)(`table.insertRows.description`),icon:`InsertRow`,callback:f}),e.updateCommand(`deleteCellsShiftUp`,{label:u((0,a.messageKey)(`table.deleteRows`)),groupLabels:{deleteCellsOptions:u((0,a.messageKey)(`table.rows.compact`))},description:()=>(0,a.t)(`table.deleteRows.description`),icon:`DeleteRows`,callback:p}),e.updateCommand(`insertCellsShiftRight`,{label:d((0,a.messageKey)(`table.insertColumns`)),groupLabels:{insertCellsOptions:d((0,a.messageKey)(`table.columns.compact`))},description:()=>(0,a.t)(`table.insertColumns.description`),icon:`InsertColumn2`,callback:m}),e.updateCommand(`deleteCellsShiftLeft`,{label:d((0,a.messageKey)(`table.deleteColumns`)),groupLabels:{deleteCellsOptions:d((0,a.messageKey)(`table.columns.compact`))},description:()=>(0,a.t)(`table.deleteColumns.description`),icon:`DeleteColumns`,callback:h}),e.updateCommand(`insertCells`,{label:()=>(g()?d((0,a.messageKey)(`table.insertColumns`)):u((0,a.messageKey)(`table.insertRows`)))(),groupLabels:{insertCellsOptions:()=>(g()?d((0,a.messageKey)(`table.columns.compact`)):u((0,a.messageKey)(`table.rows.compact`)))()},description:()=>g()?(0,a.t)(`table.insertColumns.description`):(0,a.t)(`table.insertRows.description`),callback:()=>{g()?m():f()}}),e.updateCommand(`deleteCells`,{label:()=>(g()?d((0,a.messageKey)(`table.deleteColumns`)):u((0,a.messageKey)(`table.deleteRows`)))(),groupLabels:{deleteCellsOptions:()=>(g()?d((0,a.messageKey)(`table.columns.compact`)):u((0,a.messageKey)(`table.rows.compact`)))()},description:()=>g()?(0,a.t)(`table.deleteColumns.description`):(0,a.t)(`table.deleteRows.description`),callback:()=>{g()?h():p()}}))),x=c),c!==null&&_()};S();let C=r.getSelection().addListeners({onChange:S}),w=r.addListeners({onTablesChange:S,onAutoTableChange:S,onProtectionChange:S});return()=>{C(),w(),b(null),x!==null&&(ti(),x=null)}}var{CommandScopeProvider:ii}=s.Command,ai=(0,r.memo)(e=>{let{sheet:t}=e,n=(0,s.useNotifier)(),a=gr(),c=(0,r.useMemo)(()=>({sheet:t,notifier:n,manager:a??void 0}),[t,n,a]);return(0,i.jsx)(ii,{spec:{scopeName:{key:`layer:table`,name:`table`},contributor:{dynamic:ri},data:c},order:(0,o.useLayer)().zIndex})});ai.displayName=`SheetTableCommandLayer`;var oi=(0,r.memo)((0,r.forwardRef)((e,n)=>{let{sheet:c,animationTime:u=60,className:d,style:f,...p}=e,m=(0,o.useGridPane)(),[h,g]=(0,r.useState)(null),[_,v]=(0,r.useState)(null),y=(0,r.useRef)(null),b=(0,s.useCallbackRef)(()=>{let e=c.getSelectedCell().getSpill()?.getCoords()??null;a.CoordUtils.isEqualRanges(e,h)||(v(e?{transition:h?`move`:`in`,coords:e}:{transition:`out`,coords:h}),g(e))},[c,m,h]);(0,r.useEffect)(()=>(y.current&&=(clearTimeout(y.current),null),_&&(y.current=setTimeout(()=>{v(null),y.current=null},u)),()=>{y.current&&=(clearTimeout(y.current),null)}),[_,u]);let x=(0,r.useMemo)(()=>a.TimerUtils.debounce(a.TimerUtils.throttle(b,80),80),[]);if(l(c?.getSelection(),{onChange(e){x()}}),l(c,{onSpillsChange(e){b()},onInvalidated(e){b()}}),!m)return null;let S=h??_?.coords;if(!S)return null;let C=!!h&&c.getRange(h).getValue()instanceof t.FormulaError.Spill;return(0,i.jsx)(o.Layer,{className:P(d,`spill-outline`),children:(0,r.createElement)(o.RangeRect,{...p,key:`spill-outline`,range:S,alignWidth:1,stroke:`color-mix(in srgb, var(--sxl-color-primary) 70%, black)`,clipInsets:-10,style:{...f,opacity:_?.transition===`out`?0:1},propsStrokePath:{strokeDasharray:C?`6 3`:void 0,style:{filter:`drop-shadow(0px 0px 2px color-mix(in srgb, color-mix(in srgb, var(--sxl-color-primary) 80%, white) 80%, transparent))`}}})})})),si=`var(--sxl-cf-icon-bad)`,ci=`var(--sxl-cf-icon-light-bad)`,li=`var(--sxl-cf-icon-neutral)`,ui=`var(--sxl-cf-icon-light-good)`,di=`var(--sxl-cf-icon-good)`,fi=`var(--sxl-cf-icon-pink)`,pi=`var(--sxl-cf-icon-gold)`,mi=`var(--sxl-cf-icon-gray)`,hi=`var(--sxl-cf-icon-black)`,gi=(e,t)=>({iconKey:`cf:${e}`,color:t}),_i=[`arrowDown`,`arrowRight`,`arrowUp`],vi=[`arrowDown`,`arrowDownRight`,`arrowUpRight`,`arrowUp`],yi=[`arrowDown`,`arrowDownRight`,`arrowRight`,`arrowUpRight`,`arrowUp`],bi=[si,li,di],xi=[si,ci,ui,di],Si=[si,ci,li,ui,di],Ci=(e,t)=>e.map((e,n)=>gi(e,t[n])),wi=(e,t)=>e.map(e=>gi(e,t)),Ti=(e,t)=>t.map(t=>gi(e,t)),Ei=[`rating0`,`rating1`,`rating2`,`rating3`,`rating4`],Di={[t.IStyle.IconSet.Arrows3]:Ci(_i,bi),[t.IStyle.IconSet.ArrowsGray3]:wi(_i,mi),[t.IStyle.IconSet.Flags3]:Ti(`flag`,bi),[t.IStyle.IconSet.Signs3]:Ci([`diamond`,`triangleUp`,`circle`],bi),[t.IStyle.IconSet.Symbols3]:Ci([`circleCross`,`circleExclamation`,`circleCheck`],bi),[t.IStyle.IconSet.Symbols3_2]:Ci([`cross`,`exclamation`,`check`],bi),[t.IStyle.IconSet.TrafficLights3]:Ti(`circle`,bi),[t.IStyle.IconSet.TrafficLights3_2]:Ti(`circleRimmed`,bi),[t.IStyle.IconSet.Triangles3]:Ci([`triangleDownSharp`,`dash`,`triangleUpSharp`],bi),[t.IStyle.IconSet.Stars3]:wi([`star0`,`star1`,`star2`],pi),[t.IStyle.IconSet.Arrows4]:Ci(vi,xi),[t.IStyle.IconSet.ArrowsGray4]:wi(vi,mi),[t.IStyle.IconSet.Rating4]:wi(Ei.slice(1),mi),[t.IStyle.IconSet.RedToBlack4]:Ti(`circle`,[si,fi,mi,hi]),[t.IStyle.IconSet.TrafficLights4]:Ti(`circleRimmed`,[hi,si,li,di]),[t.IStyle.IconSet.Arrows5]:Ci(yi,Si),[t.IStyle.IconSet.ArrowsGray5]:wi(yi,mi),[t.IStyle.IconSet.Quarters5]:wi([`quarters0`,`quarters1`,`quarters2`,`quarters3`,`quarters4`],hi),[t.IStyle.IconSet.Rating5]:wi(Ei,mi),[t.IStyle.IconSet.Boxes5]:wi([`boxes0`,`boxes1`,`boxes2`,`boxes3`,`boxes4`],hi)},Oi=(e,t)=>Di[e]?.[t]??null,ki=Object.freeze([]),Ai=`_track_1426b_17`,ji=`_bar_1426b_22`,Mi=`_axis_1426b_30`,Ni=(0,r.memo)(e=>{let{sheet:t,margin:n=1,className:r,style:c,...l}=e,u=(0,o.useGridPane)(),{getVisibleDecorations:d}=$t(t,`dataBar`),f=d(u);if(f.length===0)return null;let p=Math.max(1,Math.round(n*(u.getZoom()||1))),m=1/s.ReactUtils.getDevicePixelRatio(),h={top:p+m,left:p+m,right:p,bottom:p},g=[];for(let e=0;e<f.length;e++){let{cell:t,range:n,decorations:r}=f[e],s=r.dataBar;s&&g.push((0,i.jsx)(o.VirtualDiv,{range:n??a.CoordUtils.cellToRange(t),clipInsets:-10,style:{pointerEvents:`none`},children:(0,i.jsx)(Pi,{bar:s,inset:h})},`bar-${t.rowIndex}-${t.colIndex}`))}return g.length===0?null:(0,i.jsx)(o.Layer,{...l,className:P(r,`conditional-bars`),children:(0,i.jsx)(o.VirtualDiv,{fill:!0,style:{pointerEvents:`none`,overflow:`visible`,...c},children:g})})});Ni.displayName=`ConditionalBarLayer`;var Pi=({bar:e,inset:t})=>{let{value:n,axis:r,gradient:a,direction:o}=e,s=n<r,c=100*Math.min(n,r),l=100*Math.abs(n-r),u=(s?e.negativeColor:void 0)??e.color,d=(s?e.negativeBorderColor:void 0)??e.borderColor,f=o===`rightToLeft`,p=a?`linear-gradient(to ${s===f?`right`:`left`}, ${u}, color-mix(in srgb, ${u} var(--sxl-cf-bar-fade), transparent))`:u,m=f?{right:`${c}%`}:{left:`${c}%`};return(0,i.jsxs)(`div`,{className:P(Ai,`conditional-bar-track`),style:t,children:[l>0?(0,i.jsx)(`div`,{className:P(ji,`conditional-bar`),style:{...m,width:`${l}%`,background:p,border:d?`1px solid ${d}`:void 0}}):null,e.axisColor&&r>0&&r<1?(0,i.jsx)(`div`,{className:P(Mi,`conditional-bar-axis`),style:{...f?{right:100*r+`%`}:{left:100*r+`%`},background:e.axisColor}}):null]})},Fi=`_clip_x7ihh_36`,Ii=`_box_x7ihh_40`,Li=`_glyph_x7ihh_79`,Ri=(0,r.memo)(e=>{let{sheet:t,className:n,style:r,...c}=e,l=(0,o.useGridPane)(),{getVisibleDecorations:u}=$t(t,`iconSet`),d=u(l);if(d.length===0)return null;let f=l.getZoom()||1,p=[];for(let e=0;e<d.length;e++){let{cell:t,range:n,value:r,decorations:c}=d[e],l=c.iconSet;if(!l)continue;let u=Oi(l.set,l.index);if(!u)continue;let m=r.getStyle(),h=m.getInsets(),g=m.measureText(``).lineHeight*f,_=m.getAlignment().getVertical(),v=zi[_]??`flex-end`,y=Bi[_]??`center bottom`;p.push((0,i.jsx)(o.VirtualDiv,{range:n??a.CoordUtils.cellToRange(t),clipInsets:-10,className:Fi,style:{pointerEvents:`none`},children:(0,i.jsx)(`div`,{className:Ii,style:{left:h.left*f,top:h.top*f,bottom:h.bottom*f,width:g,alignItems:v},children:(0,i.jsx)(s.DynamicIcon,{className:Li,iconKey:u.iconKey,size:g,style:{color:u.color,transformOrigin:y}})})},`icon-${t.rowIndex}-${t.colIndex}`))}return p.length===0?null:(0,i.jsx)(o.Layer,{...c,className:P(n,`conditional-icons`),children:(0,i.jsx)(o.VirtualDiv,{fill:!0,style:{pointerEvents:`none`,overflow:`visible`,...r},children:p})})});Ri.displayName=`ConditionalIconsLayer`;var zi={[t.ITextFrame.VerticalAlignment.Top]:`flex-start`,[t.ITextFrame.VerticalAlignment.Center]:`center`,[t.ITextFrame.VerticalAlignment.Bottom]:`flex-end`,[t.ITextFrame.VerticalAlignment.Justify]:`center`,[t.ITextFrame.VerticalAlignment.Distributed]:`center`},Bi={[t.ITextFrame.VerticalAlignment.Top]:`center top`,[t.ITextFrame.VerticalAlignment.Center]:`center`,[t.ITextFrame.VerticalAlignment.Bottom]:`center bottom`,[t.ITextFrame.VerticalAlignment.Justify]:`center`,[t.ITextFrame.VerticalAlignment.Distributed]:`center`},Vi=`_dropdown_2r2ao_8`,Hi={ignoreHidden:!0,includeMergeOverflow:!0,reuseContext:!0},Ui=(0,r.memo)(e=>{let{sheet:t,markSize:n=7,dropdownWidth:r=17,onOpenDropdown:c,className:l,style:d,...f}=e,p=(0,o.useGridPane)(),m=Gi(t);u(t,[`onSelectionChange`]);let h=p.getZoom()||1,g=[],_=m(p);for(let e=0;e<_.length;e++){let t=_[e],r=p.getBoundsFromRange(p.getRangeFromCell(t));r&&g.push((0,i.jsx)(o.VirtualDiv,{range:a.CoordUtils.cellToRange(t),clipInsets:-10,style:{pointerEvents:`none`},children:(0,i.jsx)(b,{anchorLocation:a.AnchorLocation.TopRight,size:n*h,cellWidth:r.width,cellHeight:r.height,fill:`light-dark(red, rgb(0, 255, 255))`})},`invalid-${t.rowIndex}-${t.colIndex}`))}let v=Wi(t);if(v){let{coords:e,dataValidation:t}=v;g.push((0,i.jsx)(o.VirtualDiv,{range:a.CoordUtils.cellToRange(e),clipInsets:-10,style:{pointerEvents:`none`},children:(0,i.jsx)(`div`,{className:Vi,style:{right:0,width:r*h},role:`button`,"aria-haspopup":`listbox`,onMouseDown:n=>{n.button===0&&(n.stopPropagation(),n.preventDefault(),c?.(e,t))},children:(0,i.jsx)(s.DynamicIcon,{iconKey:`ExpandMore`,size:r*h*.75})})},`dropdown-${e.rowIndex}-${e.colIndex}`))}return g.length===0?null:(0,i.jsx)(o.Layer,{...f,className:P(l,`validation-indicators`),children:(0,i.jsx)(o.VirtualDiv,{fill:!0,style:{pointerEvents:`none`,overflow:`visible`,...d},children:g})})});Ui.displayName=`ValidationIndicatorLayer`;var Wi=e=>{let t=e.getSelectedCell(),n=t.getDataValidation();if(!n||n.isHideDropdown()||!n.getRenderHints().includes(`list`))return null;let r=t.getCoords();return r?{coords:r,dataValidation:n}:null},Gi=e=>{let t=(0,o.useGridPane)(),[,n]=(0,r.useReducer)(e=>e+1,0),i=(0,r.useRef)(new Map),a=(0,s.useCallbackRef)(()=>{i.current.clear(),n()},[]);l(e,{onDataValidationsChange:a},{ignoreModelChange:!0});let c=t.getVisibleRange();return f(e,(0,r.useMemo)(()=>c?{rowStart:c.rowStart,colStart:c.colStart,rowEnd:c.rowEnd,colEnd:c.colEnd}:null,[c?.rowStart,c?.colStart,c?.rowEnd,c?.colEnd]),e=>{e.isDataChange&&a()},qi),(0,s.useCallbackRef)((t,n)=>{let r=i.current,a=n??t.getVisibleRange();if(!a)return Ki;let o=`${a.rowStart}:${a.colStart}:${a.rowEnd}:${a.colEnd}`,s=r.get(o);if(s)return s;let c=e.getRange(a),l=Ki;if(c.getDataValidations().length>0){let e=[];c.forEach((t,n)=>{let r=n.getCell().getDataValidation();if(!r)return;let i=n.getCoords();r.getAlertAt(i.rowIndex,i.colIndex)&&e.push(i)},Hi),e.length>0&&(l=e)}return r.set(o,l),r.size>12&&r.delete(r.keys().next().value),l},[e])},Ki=[],qi={fireOnAddressChange:!1,transactional:!1},Ji=(0,r.memo)((0,r.forwardRef)((e,n)=>{let{selection:a,adapter:c,axis:l,entireCoords:u,edgeSize:d=1,edgeColor:f=`var(--sxl-color-base-300)`,scrollIntoView:p,renderBorders:m=!0,preserveFocus:h=!1,replaceActive:g=!1,allowMulti:_=!0,onPointerDownInterceptor:v,onSelectionStart:y,onSelectionEnd:b,zIndex:x,className:S,style:C,...w}=e,T=(0,o.useGridPane)(),E=l===t.IRange.Axis.Column?T.getPaneBounds().height:T.getPaneBounds().width,D=(0,r.useMemo)(()=>c??new Mt(a),[c,a]);(0,s.useOptionalBoundSyncExternalStore)(D,e=>e.getSelection());let O=(0,o.useHeaderSelectionPointer)(D,{axis:l,entireRange:u,scrollIntoView:p,replaceActive:g,allowMulti:_,preserveFocus:h,onPointerDownInterceptor:v,onDragStart:(0,s.useCallbackRef)(()=>{y?.(),a.setAdjusting(a.getCoords())},[a,y]),onDragEnd:(0,s.useCallbackRef)(()=>{a.setAdjusting(null),b?.()},[a,b]),onPointerUp:(0,s.useCallbackRef)(()=>{h||T.focus()},[T,h])}),k=m?a.getSelectedRuns(l):null,A=T.getAnchor(),j=[];if(m){j.push(Yi(`edge:${A}`,l,E,d,f));for(let e=0;k&&e<k.length;e++){let t=k[e],n=Zi(t.min,t.max,l,T);n&&j.push(Xi(`selection:${A}:${e}`,n,l,E))}}return(0,i.jsx)(o.Layer,{...w,onPointerDown:O.onPointerDown,onPointerMove:O.onPointerMove,onPointerUp:O.onPointerUp,children:(0,i.jsx)(o.VirtualDiv,{fill:!0,className:P(S,`header-selection`),style:{pointerEvents:`none`,...C},ref:n,children:j})})})),Yi=(e,n,r,a,o)=>{let c=s.ReactUtils.getDevicePixelRatio(),l=a/c,u=s.ReactUtils.snapDeviceEdge(r-l,c);return(0,i.jsx)(`div`,{className:`header-selection-edge`,style:n===t.IRange.Axis.Column?{position:`absolute`,background:o,pointerEvents:`none`,left:0,width:`100%`,top:`${u}px`,height:`${l}px`}:{position:`absolute`,background:o,pointerEvents:`none`,top:0,height:`100%`,left:`${u}px`,width:`${l}px`}},e)},Xi=(e,n,r,a)=>{if(!n)return;let o=`var(--sxl-color-primary)`,c=s.ReactUtils.getDevicePixelRatio(),l=2/c,u=s.ReactUtils.edgeCenter(a,`leading`,2,c),d;if(r===t.IRange.Axis.Column){let e=s.ReactUtils.edgeCenter(n.x,`leading`,2,c);d={position:`absolute`,background:o,pointerEvents:`none`,top:u-l/2+`px`,height:`${l}px`,left:e-l/2+`px`,width:`${s.ReactUtils.edgeCenter(n.x+n.width,`trailing`,2,c)-e+l}px`}}else{let e=s.ReactUtils.edgeCenter(n.y,`leading`,2,c);d={position:`absolute`,background:o,pointerEvents:`none`,left:u-l/2+`px`,width:`${l}px`,top:e-l/2+`px`,height:`${s.ReactUtils.edgeCenter(n.y+n.height,`trailing`,2,c)-e+l}px`}}return(0,i.jsx)(`div`,{className:`header-selection-border`,style:d},e)},Zi=(e,n,r,i)=>{let a={x:0,y:0,width:0,height:0};if(r===t.IRange.Axis.Column){let t=i.toClipBounds(i.getBoundsFromRange({colStart:e,rowStart:0,colEnd:n,rowEnd:0}),o.SELECTION_CLIP_INSETS);if(!t)return null;a.x=t.x,a.width=t.width}else{let t=i.toClipBounds(i.getBoundsFromRange({colStart:0,rowStart:e,colEnd:0,rowEnd:n}),o.SELECTION_CLIP_INSETS);if(!t)return null;a.y=t.y,a.height=t.height}return{x:a.x,y:a.y,width:a.width,height:a.height}},Qi=e=>`resize-indicator:`+(e===t.IRange.Axis.Column?`col`:`row`),$i=(0,r.memo)((0,r.forwardRef)((e,n)=>{let{sheetHeader:c,isColumn:u,oppositeSize:d=30,onResizeHeadersStart:f,onResizeHeaders:p,onResizeHeadersEnd:m,onResizeHeadersDown:h,onResizeHeadersUp:g}=e,_=(0,o.useGridPane)(),[v,y]=(0,r.useState)(c.getSelectedRuns()),[b,x]=(0,r.useReducer)(e=>e+1,0),S=(0,s.useTranslator)(),C=(0,r.useCallback)(a.TimerUtils.debounce(()=>{x()},10),[]);l(c?.getSheet(),{onSelectionChange(e){let t=c.getSelectedRuns();y(t),C()},onProtectionChange(){x()},onViewChange(){C()}});let[w,T]=(0,r.useState)(c?.getSheet().getView().getZoomScale()/100),E=u?t.IRange.Axis.Column:t.IRange.Axis.Row,[,D]=(0,o.useSurfaceState)(Qi(E),null),O=(0,r.useRef)(null),k=(0,r.useRef)(null),A=(0,r.useCallback)(()=>{k.current&&=(clearTimeout(k.current),null)},[]);(0,r.useEffect)(()=>A,[A]),l(c,{onSizesChange:e=>{T(c?.getSheet().getView().getZoomScale()/100)}});let j=(0,r.useCallback)(e=>c.at(e)?.isHidden()||c.at(e)?.getSize()===0,[c]),M=(0,r.useCallback)((e,t)=>c.hiddenHeadersAt(e,t),[j]),N=(0,r.useCallback)(()=>c.getMinSize(),[c]),P=(0,r.useCallback)(()=>c.getMaxSize(),[c]),F=(0,s.useCallbackRef)((e,n,r)=>{n/=w;let i={size:n=Math.max(N(),Math.min(a.CommonUtils.roundAccurately(n,N())??n,P())),hidden:!1},o=[];n<=0&&(i.hidden=!0,i.size=r),o.push({address:{min:e,max:e},update:i});let s=_.getMetrics();if(n<0){let r=E===t.IRange.Axis.Column,i=r?s.getColOffset:s.getRowOffset,a=r?s.getColIndex:s.getRowIndex,c=i(e),l=a(c+n),u=i(l);u===c+n?l--:o.push({address:{min:l,max:l},update:{size:c-u+n}}),e-l>1&&o.push({address:{min:l+1,max:e-1},update:{hidden:!0}})}c.updateHeaderPairs(o),D({index:e,sizePX:n}),p?.(e,n,r)},[b,_,c,w,p]),I=(0,s.useCallbackRef)((e,n,r)=>{let i=E===t.IRange.Axis.Column,o=null,s={min:e,max:e};if(c.isSelectedAll(e)){let t=c.getSelectedRuns();t.length>1?o=i?(0,a.messageKey)(`op.resizeColumns`):(0,a.messageKey)(`op.resizeRows`):s=t[0];let l={hidden:n<=0,size:(n<=0?r:n)/w};c.updateHeaderPairs(ea(t,l,e))}if(s){let e=s.max-s.min+1,t;t=e===1?c.getRange(s).at(0).getText():c.getRange(s).toString(),o=S(i?`op.resizeColumnsNamed`:`op.resizeRowsNamed`,{count:e,name:t})}O.current?.commit({description:o??void 0}),O.current=null,D(null),m?.(e,n,o)},[b,S,c,m]),L=(0,s.useCallbackRef)((e,n)=>{let r=E===t.IRange.Axis.Column?(0,a.messageKey)(`op.resizeColumns`):(0,a.messageKey)(`op.resizeRows`);O.current=c.getSheet().beginCommit(r),A(),D({index:e,sizePX:n}),f?.(e,n,r)},[E,c]),R=(0,s.useCallbackRef)((e,t)=>{A(),k.current=setTimeout(()=>{k.current=null,D({index:e,sizePX:t})},360),h?.(e,t)},[h]),z=(0,s.useCallbackRef)(e=>{A(),D(null),g?.(e)},[g]),B=(0,s.useCallbackRef)(e=>{let n=!1,r=E===t.IRange.Axis.Column,i=c.getSheet().getEntireRange().getCoords(),o=[],s=c.getSelectedRuns(),l=e=>{let t;t=r?{colStart:e.min,rowStart:i.rowStart,colEnd:e.max,rowEnd:i.rowEnd}:{colStart:i.colStart,rowStart:e.min,colEnd:i.colEnd,rowEnd:e.max},o.push(t)},u=s.length;for(let t=0;t<u;t++){let r=s[t];r.value&&(r.min<=e&&r.max>=e&&(n=!0),l(r))}n||l({min:e,max:e}),c.getSheet().getRanges(o).autoFit({axes:r?t.IRange.AxisSelection.Column:t.IRange.AxisSelection.Row}),A(),D(null),m?.(e,null,(0,a.messageKey)(`op.resizeColumns`))},[b,c,m,j]),V=c.isProtected()?void 0:F,H=null,U=(u?_.getVisibleColumns():_.getVisibleRows()).map(e=>e.index),W=u?_.getPaneRange().colStart:_.getPaneRange().rowStart;U.length>0&&U[0]>W&&(U=[U[0]-1,...U]);let G=[],K=[],q=U.length;for(let e=0;e<q;e++){let t=U[e],n=e<q-1?U[e+1]:t+M(t+1,!1)+1,r=t+1!==n;(!H||H.max<t)&&(H=v.length>0&&v[v.length-1].max>=t?v[a.CommonUtils.findEqualOrGreater(v,t,e=>e.max)]:null);let i=!1,o=!1;if(H&&(H.min<=t||H.min<=n&&!r)&&(i=!0,o=H.value??!1),t===W){let e=!1,n=!1;H&&H.min<=t&&(e=!0,n=H.value??!1),t>0&&K.push({index:t-1,isNextHidden:r,isSelected:e,isSelectedAll:n,disabledResize:!0})}if(o&&G.push(K.length),K.push({index:t,isHidden:e===0&&M(t,!1)>0,isNextHidden:r,isSelected:i,isSelectedAll:o,onDividerMouseDown:R,onDividerResizeStart:L,onDividerResize:V,onDividerMouseUp:z,onDividerResizeEnd:I,onDividerAutoFit:B}),r){let e=!1,r=!1;H&&H.min>=t&&H.max<=n-1&&H.value&&G.push(K.length),H&&H.max>=n||(H=v.length>0&&v[v.length-1].max>=n?v[a.CommonUtils.findEqualOrGreater(v,n,e=>e.max)]:null),H&&H.min<=n&&(e=!0,r=H.value??!1),n>0&&K.push({index:n-1,isHidden:!0,isSelected:e,isSelectedAll:r,onDividerMouseDown:R,onDividerResizeStart:L,onDividerResize:V,onDividerMouseUp:z,onDividerResizeEnd:I,onDividerAutoFit:B})}}if(G.length>0){let e=G.length-1;if(G.length>0){let t=K[G[e]].index,n=null;u?(n=_.getBoundsFromRange({rowStart:0,rowEnd:0,colStart:t,colEnd:t}),n.x+n.width>_.getPaneBounds().width&&(--e,e===0&&(e=-1))):(n=_.getBoundsFromRange({rowStart:t,rowEnd:t,colStart:0,colEnd:0}),n.y+n.height>_.getPaneBounds().height&&(--e,e===0&&(e=-1)))}let t=v?.[v.length-1],n=_.getAnchor();if(n===`t`||n===`l`){let e=K[G[Math.max(0,G.length-1)]];e.showTouchDivider=!!t&&t.max<=e.index}else e>=0&&(K[G[e]].showTouchDivider=!0)}let ee=K.length,te=Array(ee);for(let e=0;e<ee;e++)te[e]=(0,i.jsx)(o.HeaderDividerAnchor,{...K[e],axis:E,disabled:c.isProtected()},`divider${e}`);return(0,i.jsx)(o.Layer,{children:te})})),ea=(e,t,n=null)=>{let r=[],i=e.length;for(let a=0;a<i;a++){let i=e[a];if(!i.value)continue;let o=i.min,s=i.max;o===s&&o===n||r.push({address:{min:o,max:s},update:t})}return r},ta=`var(--sxl-color-primary)`,na=`var(--sxl-color-base-100)`,ra={side:`b`,align:`center`},ia={side:`r`,align:`center`},aa=(0,r.memo)(e=>{let{sheet:n}=e,c=(0,o.useGridPane)(),l=(0,s.useTranslator)(),[u]=(0,o.useSurfaceState)(Qi(t.IRange.Axis.Column),null),[d]=(0,o.useSurfaceState)(Qi(t.IRange.Axis.Row),null),f=!!u,p=u??d;if(!p)return null;let{index:m,sizePX:h}=p,g=h===0,_=n.getEntireRange().getCoords(),v=f?{rowStart:0,rowEnd:_.rowEnd,colStart:m,colEnd:m}:{rowStart:m,rowEnd:m,colStart:0,colEnd:_.colEnd},y=null;if(c.toClipBounds(c.getBoundsFromRange(v))){let e=c.getMetrics(),t=c.getPaneBounds(),n=f?Math.max(0,e.getColOffset(m)):Math.max(0,e.getRowOffset(m)),a=f?Math.min(t.x+t.width,e.getColOffset(m+1)):Math.min(t.y+t.height,e.getRowOffset(m+1)),s,l,u,d;if(f){let e=t.height;s=[0,0,0,e],l=`-0.5px 0px 0px 0px ${na}`,u={x:n-1,y:0,width:1,height:e},d={x:a,y:0,width:1,height:e}}else{let e=t.width;s=[0,0,e,0],l=`0px -0.5px 0px 0px ${na}`,u={x:0,y:n-1,width:e,height:1},d={x:0,y:a,width:e,height:1}}let p={propsPath:{stroke:ta,strokeWidth:`2px`}},h={style:{boxShadow:l},propsPath:{stroke:ta,strokeWidth:`2px`,strokeDasharray:`0 0 8 4`}};y=(0,i.jsxs)(r.Fragment,{children:[g?void 0:(0,i.jsx)(o.LineSVG,{linePoints:s,bounds:u,...p}),(0,i.jsx)(o.LineSVG,{linePoints:s,bounds:d,...h})]},`resize-dividers`)}let b=null;if(h!==null){let e=Math.floor(10*a.DOMUtils.getDPI())/10,t=a.CommonUtils.roundAccurately(h*e,0)??0,r=f?n.getColumnHeaders():n.getRowHeaders(),s=(n.getView()?.getZoomScale()??100)/100,c=(a.CommonUtils.roundAccurately(t/s/(r?.getScaleFactor()*a.DOMUtils.getDPI()),2)??0).toFixed(2),u=l(f?`resizeIndicator.width`:`resizeIndicator.height`),d=g?l(`resizeIndicator.hiddenDisplay`,{label:u}):l(`resizeIndicator.sizeDisplay`,{label:u,unit:c,px:t});b=(0,i.jsx)(o.StickyFloat,{anchor:{range:f?{colStart:m,colEnd:m,rowStart:0,rowEnd:0}:{rowStart:m,rowEnd:m,colStart:0,colEnd:0}},placement:f?ra:ia,whenOff:`clamp`,style:oa,children:d})}return y||b?(0,i.jsxs)(i.Fragment,{children:[b,y]}):null});aa.displayName=`ResizeIndicator`;var oa={font:`11px/1.5 system-ui, sans-serif`,color:`var(--sxl-color-base-content, white)`,background:`var(--sxl-color-base-100, rgb(60,60,60))`,padding:`2px 6px`,borderRadius:3,border:`1px solid var(--sxl-color-base-300, rgba(0,0,0,0.2))`,boxShadow:`0 2px 8px rgba(0,0,0,0.35)`,whiteSpace:`nowrap`,pointerEvents:`none`},{CommandScopeProvider:sa}=s.Command,ca=(e,t)=>(e.updateCommand(`openContextMenu`,{callback:()=>{t.openAtSelectedCell()}}),()=>{}),la=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{sheet:n,onSheetContextMenu:a,className:s,...c}=e,l=(0,o.useGridPane)(),u=(0,r.useCallback)(e=>{let t=l.getCellFromPointer(e.clientX,e.clientY);t&&a&&(a({originalEvent:e,clientX:e.clientX,clientY:e.clientY,rowIndex:t.rowIndex,colIndex:t.colIndex}),e.stopPropagation(),e.preventDefault())},[l,a]),d=(0,r.useCallback)(()=>{if(!l||!a)return;let e=n.getSelection().getCoords().cell;l.scrollCellCoordsIntoView(e).then(t=>{requestAnimationFrame(()=>{let n=l.getMetrics().getColOffset(e.colIndex+1),r=l.getMetrics().getRowOffset(e.rowIndex+1),i=l.getPanePointFromPointer(0,0)||{x:0,y:0};a({clientX:n-i.x-(t.left??0)+6,clientY:r-i.y-(t.top??0)+6})})})},[l,n,a]),f=(0,r.useMemo)(()=>({openAtSelectedCell:d}),[d]);return(0,i.jsx)(sa,{spec:{scopeName:`layer:contextmenu`,contributor:{dynamic:ca},data:f},order:(0,o.useLayer)().zIndex,children:(0,i.jsx)(o.Layer,{onContextMenu:u,className:P(s,`contextMenu`),...c})})}));function ua(e){let{axis:t,entireCoords:n,scrollIntoView:a,className:o,...s}=e,c=te().getMode(),l=c?.selection??null,u=g()?.getName(),d=(0,r.useMemo)(()=>{if(!l)return null;let e=new Mt(l);return u?Ht(e,u):e},[l,u]);return c&&c.mode===`point`&&l?c.scope&&c.scope!==u?null:(0,i.jsx)(Ji,{className:P(o,`reference-header`),selection:l,adapter:d,axis:t,entireCoords:n,scrollIntoView:a,renderBorders:!1,preserveFocus:!0,replaceActive:!0,allowMulti:!1!==c.allowMulti,...s}):null}la.displayName=`ContextMenuLayer`,ua.displayName=`SheetReferenceHeaderLayer`;var da=e=>{let{style:t,...n}=e??{};return(0,i.jsxs)(`svg`,{style:{width:`135px`,height:`37px`,...t},viewBox:`0 0 135 37`,...n,children:[(0,i.jsx)(`path`,{d:`M 1.0984,0 C 0.4978,0 0.01,0.40548 0.01,0.90302 v 19.5766 H 0 v 15.61762 c 0,0.30574 0.185,0.57535 0.466,0.73886 v 0.1426 H 0.8565 C 0.9315,36.992 1.0086,37 1.0883,37 H 13.063 25.9706 v 0 h 8.7553 c 0.08,0 0.1563,-0.008 0.2308,-0.0213 h 0.054 v -0.0141 c 0.4621,-0.10457 0.8035,-0.45175 0.8035,-0.86739 v -15.312 c 0,-0.0328 0.01,-0.0658 0.01,-0.0995 V 0.90304 C 35.8242,0.4052 35.3363,6e-5 34.7358,6e-5 H 22.5969 V 1.7e-4 H 21.0014 V 6e-5 Z`,fill:`#547dbe`,fillRule:`evenodd`}),(0,i.jsx)(`path`,{d:`M 1.4849,2.09543 V 9.06408 H 8.1947 V 2.09543 Z m 8.6592,0 V 9.06408 H 16.854 V 2.09543 Z m 8.685,0 v 6.96865 h 6.7098 V 2.09543 Z m 8.7355,0 v 6.96865 h 6.7099 V 2.09543 Z M 1.4849,11.04391 v 6.81444 h 6.7098 v -6.81444 z m 8.6592,0 v 6.81444 h 6.7099 v -6.81444 z m 8.685,0 v 6.81444 h 6.7098 v -6.81444 z m 8.7355,0 v 6.81444 h 6.7099 V 11.04391 Z M 1.4849,19.83872 v 6.68584 h 6.7098 v -6.68584 z m 8.6592,0 v 6.68584 h 6.7351 v -6.68584 z m 8.685,0 v 6.68584 h 6.7098 v -6.68584 z m 8.7355,0 v 6.68584 h 6.7099 v -6.68584 z m -26.052,8.38811 v 6.68588 h 6.7098 v -6.68588 z m 8.6592,0 v 6.68588 h 6.7355 v -6.68588 z m 8.685,0 v 6.68588 h 6.7099 v -6.68588 z m 8.7356,0 v 6.68588 h 6.7098 v -6.68588 z`,fill:`#ffffff`,fillRule:`evenodd`}),(0,i.jsx)(`path`,{d:`m 1.4785,2.09737 v 6.96865 h 6.741 V 2.09737 Z m 0,8.94851 v 6.81449 h 6.741 v -6.81449 z m 0,8.79485 v 6.6858 h 6.741 v -6.6858 z m 0.028,8.388 v 6.68588 h 6.741 v -6.68588 z`,fill:`#547dbe`,fillRule:`evenodd`,strokeWidth:`0.4`}),(0,i.jsx)(`path`,{d:`M 120.9895,32.82218 V 10.13469 h 4.7986 v 18.71559 h 9.2153 v 3.9719 z m 0.4853,0 h -5.4976 l -5.275,-8.57923 -5.2751,8.57923 h -5.1481 l 7.5314,-11.69325 -7.0545,-10.99424 h 5.3067 l 4.8936,8.16618 4.7986,-8.16618 h 5.1796 l -7.118,11.24826 z M 95.9361,29.04099 c 0.5297,0 1.0381,-0.053 1.5254,-0.15888 0.4872,-0.10591 0.9745,-0.23299 1.4617,-0.3813 v 3.52703 c -0.5084,0.21183 -1.144,0.39189 -1.9066,0.54018 -0.7415,0.16946 -1.5571,0.2542 -2.4469,0.2542 -1.038,0 -1.9701,-0.16947 -2.7964,-0.5084 -0.805,-0.33894 -1.4511,-0.92148 -1.9384,-1.74763 -0.466,-0.84734 -0.6991,-2.01241 -0.6991,-3.49526 v -8.35686 h -2.2562 v -2.00181 l 2.6058,-1.58876 1.3664,-3.65411 h 3.0189 v 3.6859 h 4.8619 v 3.55878 h -4.8619 v 8.35686 c 0,0.65668 0.1906,1.15449 0.5719,1.49342 0.3814,0.31776 0.8792,0.47664 1.4935,0.47664 z M 79.1445,14.83743 c 2.3939,0 4.29,0.68847 5.6882,2.06535 1.3983,1.35581 2.0972,3.29411 2.0972,5.81491 v 2.28769 H 75.7444 c 0.042,1.33475 0.4342,2.38315 1.1758,3.14596 0.7626,0.76244 1.8113,1.14385 3.1459,1.14385 1.1227,0 2.1396,-0.10609 3.0506,-0.3179 0.9109,-0.23311 1.8536,-0.58257 2.8283,-1.0484 v 3.654 c -0.8476,0.42362 -1.7479,0.73087 -2.7012,0.92139 -0.9322,0.21181 -2.0655,0.3179 -3.4001,0.3179 -1.7373,0 -3.2731,-0.3179 -4.6078,-0.95333 -1.3346,-0.65673 -2.3833,-1.64162 -3.1459,-2.95507 -0.7627,-1.31344 -1.144,-2.96571 -1.144,-4.9568 0,-2.03367 0.3389,-3.71788 1.0169,-5.05235 0.6991,-1.35578 1.6629,-2.37258 2.8917,-3.0504 1.2286,-0.67783 2.6586,-1.0168 4.2899,-1.0168 z m 0.032,3.36815 c -0.911,0 -1.6736,0.29653 -2.2879,0.88967 -0.5933,0.59322 -0.9428,1.51461 -1.0487,2.76455 h 6.6415 c -0.021,-1.05904 -0.2967,-1.92796 -0.8262,-2.60567 -0.5297,-0.69905 -1.3559,-1.04855 -2.4787,-1.04855 z m -17.011,-3.36815 c 2.3939,0 4.29,0.68847 5.6882,2.06535 1.3982,1.35581 2.0973,3.29411 2.0973,5.81491 v 2.28769 H 58.7653 c 0.042,1.33475 0.4343,2.38315 1.1758,3.14596 0.7627,0.76244 1.8113,1.14385 3.1459,1.14385 1.1228,0 2.1397,-0.10609 3.0507,-0.3179 0.911,-0.23311 1.8536,-0.58257 2.8282,-1.0484 v 3.654 c -0.8475,0.42362 -1.7478,0.73087 -2.7011,0.92139 -0.9321,0.21181 -2.0655,0.3179 -3.4002,0.3179 -1.7372,0 -3.273,-0.3179 -4.6077,-0.95333 -1.3347,-0.65673 -2.3833,-1.64162 -3.1459,-2.95507 -0.7627,-1.31344 -1.144,-2.96571 -1.144,-4.9568 0,-2.03367 0.3389,-3.71788 1.0168,-5.05235 0.6991,-1.35578 1.6631,-2.37258 2.8918,-3.0504 1.2287,-0.67783 2.6587,-1.0168 4.2899,-1.0168 z m 0.032,3.36815 c -0.911,0 -1.6736,0.29653 -2.288,0.88967 -0.5931,0.59322 -0.9427,1.51461 -1.0486,2.76455 h 6.6414 c -0.021,-1.05904 -0.2965,-1.92796 -0.8262,-2.60567 -0.5297,-0.69905 -1.3558,-1.04855 -2.4786,-1.04855 z M 41.7033,13.59817 c 0,0.84739 -0.032,1.66288 -0.095,2.44668 -0.042,0.78385 -0.085,1.33456 -0.1271,1.65231 h 0.2542 c 0.5508,-0.88968 1.2605,-1.53575 2.1291,-1.93827 0.8686,-0.40251 1.8325,-0.60371 2.8917,-0.60371 1.8855,0 3.3896,0.50838 4.5124,1.52518 1.144,0.99558 1.716,2.60556 1.716,4.82998 V 32.82218 H 48.2498 V 22.68575 c 0,-2.49951 -0.9322,-3.74937 -2.7964,-3.74937 -1.4194,0 -2.4045,0.49788 -2.9553,1.49362 -0.5297,0.97424 -0.7945,2.38314 -0.7945,4.22592 v 8.16626 H 36.9688 V 8.67305 h 4.7348 z`,fill:`#eb594d`}),(0,i.jsx)(`path`,{d:`m 23.345,4.88926 c 1.4307,0 2.8282,0.229 4.1916,0.68692 1.3636,0.45803 2.6999,1.15712 4.0084,2.09748 l -1.8344,2.50966 C 28.6222,9.40175 27.5522,8.82162 26.5004,8.44306 25.4486,8.0645 24.3968,7.87524 23.345,7.87524 c -1.9935,0 -3.5435,0.40902 -4.6503,1.22728 -1.1068,0.81819 -1.6601,1.97842 -1.6601,3.48048 v 0.0183 c 0,1.05019 0.3179,1.8502 0.9538,2.39973 0.636,0.54952 1.4615,0.95869 2.4765,1.22731 1.015,0.26862 2.0975,0.51907 3.2468,0.75111 1.003,0.20755 1.9996,0.44872 2.9905,0.7235 0.9905,0.27478 1.8922,0.66562 2.7057,1.1724 0.813,0.50679 1.4615,1.1937 1.9444,2.06075 0.4832,0.86705 0.7247,1.99672 0.7247,3.38884 v 0.0367 c 0,2.45464 -0.8561,4.35355 -2.5682,5.69703 -1.7122,1.34311 -4.1216,2.01505 -7.2278,2.01505 -1.2963,0 -2.5162,-0.12207 -3.6598,-0.36658 -1.1434,-0.24413 -2.2134,-0.61071 -3.2102,-1.09898 -0.9968,-0.48864 -1.9292,-1.09897 -2.7975,-1.83175 l 1.9628,-2.47308 c 1.0763,0.92809 2.2534,1.62428 3.5314,2.08825 1.2779,0.46431 2.669,0.69627 4.1733,0.69627 2.1158,0 3.7513,-0.40613 4.9071,-1.21827 1.1558,-0.81214 1.7335,-1.95096 1.7335,-3.4164 v -0.0183 c 0,-1.06247 -0.2872,-1.87762 -0.8622,-2.44543 -0.5746,-0.56786 -1.3267,-0.99528 -2.2563,-1.28234 -0.9292,-0.28695 -1.9383,-0.52812 -3.0267,-0.72354 -1.0397,-0.18314 -2.0822,-0.39685 -3.1278,-0.64117 -1.0457,-0.24417 -2.0026,-0.60444 -2.8709,-1.08076 -0.8683,-0.47621 -1.5685,-1.15396 -2.1005,-2.0333 -0.532,-0.87933 -0.798,-2.05162 -0.798,-3.5171 v -0.0183 c 0,-2.4792 0.8255,-4.39955 2.4766,-5.7611 1.651,-1.36167 3.9807,-2.04258 6.9892,-2.04258 z`,stroke:`#eb594d`,strokeWidth:`2`,fill:`#f9cecb`})]})},fa=(0,r.memo)(e=>{let{colorLicensee:n=`blue`,colorError:a=`red`,colorCredits:o=`grey`,credits:s=`All rights reserved - Michael Ford`,feature:c,style:l,...u}=e??{},[d,f]=(0,r.useState)(null);(0,r.useEffect)(()=>{(async()=>{let e=await t.LicenseManager.getDetails();f(e)})()},[]);let[p,m]=(0,r.useState)(!1),h={opacity:.65},g=(0,r.useMemo)(()=>{let e=d?.getExceptions(),t=e?.length??0;if(t===0)return null;let n=[];for(let r=0;r<t;r++){let t=e[r];n.push((0,i.jsx)(`div`,{style:{opacity:.8,fontSize:`16px`,textAlign:`left`,color:a},children:t},r))}return n},[d,a]);if(d===null||d.isValidFor(c??``))return null;let _=d.getType(),v=!g&&_.endsWith(`ity`),y=d.getLicensee(),b=v?1.6:1,x=135/b,S=37/b,C=null;return!_&&(y?.length??0)>0&&(C=(0,i.jsx)(`div`,{style:{opacity:.7,fontWeight:`500`,fontSize:`16px`,textAlign:`left`,color:n},children:y})),(0,i.jsx)(`div`,{style:{pointerEvents:`none`,display:`flex`,flexDirection:`column`,overflow:`hidden`,...l},...u,children:(0,i.jsxs)(`div`,{style:{position:`relative`,display:`flex`,flexDirection:`column`},children:[p?(0,i.jsx)(da,{style:h}):(0,i.jsx)(`svg`,{width:x,height:S,style:h,children:(0,i.jsx)(`image`,{style:{width:x,height:S},href:`https://www.sheetxl.com/watermark.svg`,onError:()=>m(!0)})}),(0,i.jsxs)(`div`,{children:[C,g,(0,i.jsx)(`div`,{style:{height:`0px`,fontSize:`16px`,textAlign:`left`,width:`0px`,opacity:.8,color:o},children:s})]})]})})}),pa={key:`copy`,description:(0,a.messageKey)(`editMode.copy`)},ma={key:`cut`,description:(0,a.messageKey)(`editMode.cut`)},ha={type:t.ICell.Content.Values},ga={fitDestination:!0,type:t.ICell.Content.Formats},_a={fitDestination:!0,type:t.ICell.Content.Formulas},va={transpose:!0},ya={fitDestination:!0,adjustCells:(e,t,n)=>({value:`=${t.getAddress({$colIndex:!0,$rowIndex:!0})}`})};function ba(e,n){let r=n.sheet,i=n,{notifier:o,editModeHandler:s,globalClipboard:c,element:l}=n,u={element:l,doCopy:e=>new t.RangeClipboardItem(r.getSelectedRanges().getSnapshot(e))},d={element:l,importFromExternal:async(e,n)=>{let i=r.getSelectedRange().getTopLeft().getCoords(),a=new t.ExternalRangeClipboardItem(r.getRuntime(),e,{colIndex:i.colStart,rowIndex:i.rowStart},n,r.getStyles());return await a.parse()?a:null},doPaste:async(e,n)=>{if(e?.getItemType()!==`range`)return!1;n?.contentsOnly&&delete(n={...n,type:t.ICell.Content.Values}).contentsOnly;let i=e.getItem?.();if(!i)return!1;let o=i.getName?.(),s=r.getSelectedRange();if(o===`HTML`&&s.size>1){let e=i.getCoords?.();e&&a.CoordUtils.isSingleCell(e)&&(s=s.getResizeTo(1,1))}return await s.doBatch(async()=>{let e=await s.copyFrom(i,{...n});!e||e.isEntireRows()||e.isEntireColumns()||e.autoFit({axes:t.IRange.AxisSelection.Row,minContent:!0})},{description:o?(0,a.t)(`op.pasteNamed`,{name:o}):(0,a.messageKey)(`op.paste`),autoSelect:!0}),!0}},f=async e=>{if(u.element?.())try{await(async e=>{if(!u.element)return;let t=c.getClipboard(),n=u.doCopy?.(e);typeof n==`string`?await t.writeText(n):await t.writeReference(n)})(e??{})}catch(e){o?.showError(e)}},p=async(e,t,n)=>{try{if(!1===await e.doPaste?.(t,n))return;((e,t)=>{if(e?.getItemType()!==`range`)return;let n=s.getMode()?.key===`cut`||e.isCut?.();if(!n&&s.getMode()?.key===`copy`){let t=e.getItem?.()?.getCoords?.(),i=r.getSelectedRanges().getCoords(),o=!1;if(t&&i&&e.getItem?.()?.getSource?.()===r)for(let e=0;!o&&e<i.length;e++)o=a.CoordUtils.isRangesIntersect(t,i[e]);n=o}n&&s.setMode(null),l?.()?.focus(),i.onPaste?.(e,t)})(t,n)}catch(e){o?.showError(e)}},m=async(e,t,n)=>{let r=d.element?.();if(r&&await a.DOMUtils.whenFocus(r),!e&&!t)return;let i=await o?.showBusy?.((0,a.t)(`clipboard.pasting`));if(t)try{await p(d,t,n),i?.();return}catch(e){i?.(),o?.showError(e)}if(!e)return void i?.();let s=d.importFromExternal;s||=()=>({getItemType:()=>`text`,toText:()=>e?.text??``,isClipboardItem:!0});let c=null;try{c=await s(e,{isCut:!1})}catch(e){i?.(),o?.showError(e)}if(c)try{let e=await Promise.resolve(c);await p(d,e,n),i?.()}catch(e){i?.(),o?.showError(e)}else i?.()},h=async e=>{if(!d.element)return;let t=c.getClipboard();try{let n=await t.readReference();if(n)return void await m(null,n,e??{});let r=[];r[0]=await a.ClipboardUtils.readStringFromClipboard(t,a.MimeType.Plain),r[1]=await a.ClipboardUtils.readHTMLFromClipboard(t,a.MimeType.Html),r[2]=await a.ClipboardUtils.readBlobFromClipboard(t,a.MimeType.Png);let i={text:r[0]??null,html:r[1]??null,image:r[2]??null};await m(i,null,e??{})}catch(e){if(e?.message===`Document is not focused.`)return;o?.showError(e)}};e.updateCommand(`copy`,{callback:()=>f()}),e.updateCommand(`cut`,{callback:()=>f({isCut:!0})}),e.updateCommand(`paste`,{callback:()=>h()}),e.updateCommand(`pasteValues`,{callback:e=>h({...ha,...e})}),e.updateCommand(`pasteFormats`,{callback:(e,t)=>h({...ga,description:t?.getLabel(),...e})}),e.updateCommand(`pasteFormulas`,{callback:(e,t)=>h({..._a,description:t?.getLabel(),...e})}),e.updateCommand(`pasteTranspose`,{callback:(e,t)=>h({...va,description:t?.getLabel(),...e})}),e.updateCommand(`pasteLinks`,{callback:(e,t)=>h({...ya,description:t?.getLabel(),...e})}),e.updateCommand(`formatPainterToggle`,{state:s.getMode()?.key===`formatPainter`,callback:()=>{if(s.getMode()?.key!==`formatPainter`)return f({editMode:{key:`formatPainter`,description:(0,a.messageKey)(`editMode.formatPainter`),cursor:`url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='black' fill='white'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer`}});s.setMode(null)}});let g=[`cut`,`paste`,`pasteValues`,`pasteFormats`,`pasteFormulas`,`pasteTranspose`,`pasteLinks`,`formatPainterToggle`],_=()=>{let t=r.getProtection().isFormatCellsAllowed()?[]:[(0,a.messageKey)(`reason.sheetProtected`)];for(let n of g)e.updateCommand(n,{disabledReasons:t})};_();let v=c.getClipboard(),y=async()=>{s.getMode()?.key!==`edit`&&(e=>{let t=e?.getItemType()===`range`?e:null;if(t){let n=e.editMode?.(),r={...e?.isCut?.()?ma:pa,...n,args:{isClipboard:!0,reference:t,...n?.args},onModeChange:e=>{e?.args?.isClipboard||c.getClipboard().clear(!0),n?.onModeChange?.(e)}};s.setMode(r)}i.onClipboardUpdate?.(t)})(await v.readReference())},b={safari:(0,a.messageKey)(`error.clipboard.safari`),perms:(0,a.messageKey)(`error.clipboard.perms`)},x=e=>o?.showMessage?.((0,a.t)(b[e.code]),{onceKey:`clipboard.features`}),S=()=>x(a.InternalClipboard.ErrorMessages.PermsRead),C=()=>x(a.InternalClipboard.ErrorMessages.PermsWrite);v.addEventListener(`clipboardchange`,y),v.addEventListener(`clipboarderrorread`,S),v.addEventListener(`clipboarderrorwrite`,C);let w=r.addListeners({onProtectionChange:_,onInvalidated:_});return()=>{v.removeEventListener(`clipboardchange`,y),v.removeEventListener(`clipboarderrorread`,S),v.removeEventListener(`clipboarderrorwrite`,C),w()}}var{CommandScopeProvider:xa,useCommandExecute:Sa}=s.Command,Ca=({sheet:e,className:t,...n})=>{let a=(0,s.useNotifier)(),c=(0,s.useEditMode)(),l=(0,s.useGlobalClipboard)(),u=(0,o.useGridPane)(),d=Sa(),f=c.getMode(),p=(0,r.useMemo)(()=>({sheet:e,notifier:a,editModeHandler:c,globalClipboard:l,element:u.getElement}),[e,a,c,l,u]),m=f?.key,h=m===`copy`||m===`cut`||m===`formatPainter`,g=f?.args?.reference,_=g?.getItem?.(),v=_?.getSource()===e,y=_?.getCoords?.();return(0,i.jsx)(xa,{spec:{scopeName:`layer:clipboard`,contributor:{dynamic:ba},data:p},order:(0,o.useLayer)().zIndex,children:(0,i.jsx)(o.Layer,{onKeyDown:async e=>{let t=c.getMode()?.key,n=t===`copy`||t===`cut`;(n||t===`formatPainter`)&&(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),c.setMode(null)):n&&e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),await d(`paste`),c.setMode(null)))},...n,className:P(t,`clipboard`),children:h&&g&&v&&y&&(0,i.jsx)(o.RangeRect,{range:y,alignWidth:2,stroke:g.isCut?.()?`var(--sxl-color-warning)`:`var(--sxl-color-primary)`,animatedStroke:!0,clipInsets:o.SELECTION_CLIP_INSETS})})})};Ca.displayName=`SheetClipboardLayer`;var wa=(0,r.createContext)(null);wa.displayName=`DocThemesContext`;var Ta=()=>{let e=(0,r.useContext)(wa),[n]=(0,r.useState)(()=>new t.ThemeCollection);return(0,r.useMemo)(()=>e||n,[e])},Ea=e=>{let n=e?.prefix??t.SYSTEM_COLOR_CSS_PREFIX,r=new Map,i=null,a=(a,o=!1)=>{if(typeof document>`u`)return null;let s=e?.element?.()??document.body;if(!s)return null;let c=`${a}|${o?`d`:`l`}`;if(r.has(c))return r.get(c);let l=(e=>(i||(i=document.createElement(`span`),i.setAttribute(`aria-hidden`,`true`),i.style.cssText=`position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;`),i.parentElement!==e&&e.appendChild(i),i))(s);if(!l)return r.set(c,null),null;let u=n+a.toLowerCase();if(!getComputedStyle(l).getPropertyValue(u).trim())return r.set(c,null),null;l.style.color=o?`var(${u}-dark, var(${u}))`:`var(${u})`;let d=getComputedStyle(l).color;l.style.color=``;let f=(e=>{let n=e?e.match(/[\d.]+/g):null;if(!n||n.length<3)return null;let r=n.length>=4?`rgba(${n[0]},${n[1]},${n[2]},${n[3]})`:`rgb(${n[0]},${n[1]},${n[2]})`;try{return t.Color.parse(r)}catch{return null}})(d);return r.set(c,f),f};return a.invalidate=()=>{r.clear(),t.Color.invalidateSystemColors()},a},Da=`sxl-system-colors`,Oa=()=>{if(typeof document>`u`||document.getElementById(Da))return;let e=t.Color.getSystemColorDefaults(),n=Object.keys(e).map(n=>`${t.SYSTEM_COLOR_CSS_PREFIX}${n}:${e[n]};`).join(``),r=document.createElement(`style`);r.id=Da,r.textContent=`:root{${n}}`,document.head.appendChild(r)},ka=()=>{(0,r.useMemo)(()=>{Oa()},[])},Aa=null,ja=[[t.IColor.Named.Window,`var(--sxl-color-base-100)`],[t.IColor.Named.Menu,`var(--sxl-color-base-100)`],[t.IColor.Named.BtnFace,`var(--sxl-color-base-100)`],[t.IColor.Named.InfoBk,`var(--sxl-color-base-100)`],[t.IColor.Named.ScrollBar,`var(--sxl-color-base-100)`],[t.IColor.Named.AppWorkspace,`var(--sxl-color-base-100)`],[t.IColor.Named.Background,`var(--sxl-color-base-100)`],[t.IColor.Named.WindowText,`var(--sxl-color-base-content)`],[t.IColor.Named.MenuText,`var(--sxl-color-base-content)`],[t.IColor.Named.BtnText,`var(--sxl-color-base-content)`],[t.IColor.Named.InfoText,`var(--sxl-color-base-content)`],[t.IColor.Named.CaptionText,`var(--sxl-color-base-content)`],[t.IColor.Named.GrayText,`color-mix(in srgb, var(--sxl-color-base-content) 45%, transparent)`],[t.IColor.Named.InactiveCaptionText,`color-mix(in srgb, var(--sxl-color-base-content) 45%, transparent)`],[t.IColor.Named.Highlight,`var(--sxl-color-primary)`],[t.IColor.Named.ActiveCaption,`var(--sxl-color-primary)`],[t.IColor.Named.HotLight,`var(--sxl-color-primary)`],[t.IColor.Named.HighlightText,`var(--sxl-color-primary-content)`],[t.IColor.Named.BtnHighlight,`var(--sxl-color-base-200)`],[t.IColor.Named.Light3d,`var(--sxl-color-base-200)`],[t.IColor.Named.InactiveCaption,`var(--sxl-color-base-200)`],[t.IColor.Named.ActiveBorder,`var(--sxl-color-base-300)`],[t.IColor.Named.InactiveBorder,`var(--sxl-color-base-300)`],[t.IColor.Named.WindowFrame,`var(--sxl-color-base-300)`],[t.IColor.Named.BtnShadow,`var(--sxl-color-neutral)`],[t.IColor.Named.DkShadow3d,`var(--sxl-color-neutral)`]],Ma={};for(let[e,t]of ja)Ma[`sys-color-${e.toLowerCase()}`]=t;var Na={light:Ma,dark:Ma},Pa=(e=`sxl-defaults`,t)=>(0,s.buildThemeCSS)({app:Na,surfaces:{grid:Na,header:Na},layer:e,scope:t}),Fa=(e,t)=>{let n=``;if(e&&(n=e.includes(` `)?`"${e}"`:e),t)for(let e=0;e<t.length;e++)n.length>0&&(n+=`, `),n+=t[e];return n},Ia=(e,t)=>{let n=t??[];return e===`Aptos Narrow`?[`Calibri`,...n]:n},La=(e,t,n)=>{let r=e.getColorScheme(),i=e.getFontScheme();return{"doc-color-dk1":r.getDk1().toCSS(n),"doc-color-dk2":r.getDk2().toCSS(n),"doc-color-lt1":r.getLt1().toCSS(n),"doc-color-lt2":r.getLt2().toCSS(n),"doc-color-accent1":r.getAccent1().toCSS(n),"doc-color-accent2":r.getAccent2().toCSS(n),"doc-color-accent3":r.getAccent3().toCSS(n),"doc-color-accent4":r.getAccent4().toCSS(n),"doc-color-accent5":r.getAccent5().toCSS(n),"doc-color-accent6":r.getAccent6().toCSS(n),"doc-color-hlink":r.getHlink().toCSS(n),"doc-color-fol-hlink":r.getFolHlink().toCSS(n),"doc-font-major":Fa(i.getMajorFont(),Ia(i.getMajorFont(),i.getMajorFallbacks())),"doc-font-minor":Fa(i.getMinorFont(),Ia(i.getMinorFont(),i.getMinorFallbacks())),"doc-font-size":`${t}pt`}},Ra=(e,t=11,n=`sxl-defaults`,r)=>(0,s.buildThemeCSS)({app:{light:La(e,t,!1),dark:La(e,t,!0)},layer:n,scope:r}),za={Mode:`themeMode`,DarkGrid:`enableDarkGrid`,DarkImages:`enableDarkImages`},Ba=e=>{let[t]=(0,s.usePersistenceState)(za.Mode,null),[n]=(0,s.usePersistenceState)(za.DarkGrid,!1),{themeMode:r}=(0,s.useResolvedThemeMode)({mode:e??t??void 0});return e||(r===`dark`&&n?`dark`:`light`)},Va=()=>{let[e]=(0,s.usePersistenceState)(za.Mode,null),{themeMode:t}=(0,s.useResolvedThemeMode)({mode:e??void 0});return t},Ha=`_sheet-scrollbar_104cg_1`,Ua=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{style:n=s.ReactUtils.EmptyCssProperties,orientation:o,sheet:c,onShowTooltip:u,onCloseTooltip:d,onScrollOffset:f,showCustomScrollButtons:p,offset:m=0,totalSize:h=0,viewportSize:g=0,className:_,endGap:v,...y}=e;if(!c)throw Error(`SheetScrollbar needs an ISheet`);let b=(0,s.useCallbackRef)(u,[u]),x=(0,s.useCallbackRef)(d,[d]),S=(0,r.useRef)(null),C=cn([S,t]),w=o===s.ScrollbarOrientation.Vertical,T=(0,s.useTranslator)(),[E,D]=(0,r.useState)(()=>{let e=(c.getView().getZoomScale()??100)/100,t=c.getView().getTopLeft();return(w?t.top:t.left)*e}),O=()=>{let e=c.getView().getFreezePanes(),t=(c.getView().getZoomScale()??100)/100;if(w){let n=e.coords?.rowIndex??0;if(n===0)return{shift:0,scroll:0};let r=e.topLeft?.top??0;return{shift:(c.getRowHeaders().getOffset(n)-r)*t,scroll:r*t}}{let n=e.coords?.colIndex??0;if(n===0)return{shift:0,scroll:0};let r=e.topLeft?.left??0;return{shift:(c.getColumnHeaders().getOffset(n)-r)*t,scroll:r*t}}},[k,A]=(0,r.useState)(O),[j,M]=(0,r.useState)(null),[N,F]=(0,r.useState)(!1),I=o===s.ScrollbarOrientation.Vertical?c.getRowHeaders():c.getColumnHeaders(),L=()=>{let e=c.getUsedRange()?.getCoords()??a.CoordUtils.EmptyRange,t=c.getSelection().getCoords().cell;return{colIndex:Math.max(e.colEnd,t.colIndex),rowIndex:Math.max(e.rowEnd,t.rowIndex)}},[R,z]=(0,r.useState)(L),B=R?(w?R.rowIndex:R.colIndex)+1:0,V=()=>{let e=L();a.CoordUtils.isEqualCells(R,e)||z(e)};l(c.getView(),{onFreezePaneChange:()=>{A(O)}}),l(c.getSelection(),{onChange:V}),l(c,{onUsedRangeChange:V}),(0,r.useEffect)(()=>{z(L())},[c]);let H=m-k.scroll,U=g-k.shift,W=h-(k.shift+k.scroll),G=I.getOffset(B)*(c.getView().getZoomScale()/100)-(k.scroll+k.shift);(0,r.useEffect)(()=>{if(!j)return N&&x?.(),void F(!1);ee(w,E,U,v,j,c,I,k)},[w,m,E,U,v,k,o,j,I,N,c]);let K=(0,s.useCallbackRef)((e,t,n)=>{D(e);let r=e+k.scroll,i=t+k.shift,a=n+k.shift+k.scroll;f?.(r,i,a)},[f,k]),q=(0,r.useCallback)((e,t,n,r,i,a,c,l)=>{let u=c.getTextAt(c.getIndex(t/(a.getView().getZoomScale()/100)+l.scroll+l.shift)),d={...i,display:o===s.ScrollbarOrientation.Vertical?T(`scrollbar.row`,{title:u}):T(`scrollbar.column`,{title:u})},f=i.element??S.current?.querySelector(`[role="slider"]`);if(f){let t=f.getBoundingClientRect();d.anchor=e?{x:t.left,y:t.top+t.height/2}:{x:t.left+t.width/2,y:t.top}}d.anchor&&(F(!0),b?.(d))},[T]),ee=(0,s.useCallbackRef)(a.TimerUtils.debounce(q,0),[q]),te=(0,s.useCallbackRef)(e=>{M(e.dragging?{element:e.element}:null)},[]);return(0,r.useMemo)(()=>(0,i.jsx)(s.VirtualScrollbar,{ref:C,className:P(_,Ha),style:n,offset:H,viewportSize:U,totalSize:W,orientation:o,showCustomScrollButtons:p,onMouseDown:e=>{e.preventDefault()},onScrollOffset:K,minSize:G,onThumbDrag:te,...y}),[_,H,U,W,o,p,n,G,v])}));Ua.displayName=`SheetScrollbar`;var Wa=(0,r.memo)((0,r.forwardRef)((e,n)=>{let{sheetHeader:a,oppositeSize:c=30,edgeSize:u=1,edgeColor:d=`var(--sxl-color-base-300)`,headerText:f,freezeStart:p,colorScheme:m,verticalPadding:h,horizontalPadding:g,onSheetContextMenu:_,onResizeHeadersStart:v,onResizeHeaders:y,onResizeHeadersEnd:b,onResizeHeadersDown:x,onResizeHeadersUp:S,viewport:C,onSelectionStart:w,onSelectionEnd:T,propsCellRender:E,style:D,className:O,...k}=e,A=(0,r.useMemo)(()=>a.getAxis(),[a]),j=(0,s.useCallbackRef)(v,[v]),M=(0,s.useCallbackRef)(y,[y]),N=(0,s.useCallbackRef)(b,[b]),F=(0,s.useCallbackRef)(x,[x]),I=(0,s.useCallbackRef)(S,[S]),L=(0,r.useRef)(null),[R,z]=(0,r.useReducer)(e=>e+1,0),B=a?.getSheet(),V=(0,r.useRef)(!1);(0,r.useLayoutEffect)(()=>{V.current=!0},[a]);let[U,W]=(0,r.useState)(0),[G,K]=(0,r.useState)(B?.getView().getZoomScale()/100);l(a,{onSizesChange:e=>{K(B?.getView().getZoomScale()/100),ne(J()),W(a.getEntireRange().getCoords().max+1)}}),(0,r.useLayoutEffect)(()=>{K(a?.getSheet().getView().getZoomScale()/100),ne(J())},[a,c]);let q=(0,r.useCallback)((e,t)=>a.hiddenHeadersAt(e,t),[(0,r.useCallback)(e=>a.at(e)?.isHidden()||a.at(e)?.getSize()===0,[a])]),ee=(0,s.useCallbackRef)(e=>a.isSelected(e),[a]),te=(0,s.useCallbackRef)(e=>a.isSelectedAll(e),[a]),J=()=>{let e=A===t.IRange.Axis.Column;return{getColOffset:t=>e?a.getOffset(t):t===0?0:c/G,getColIndex:t=>e?a.getIndex(t):0,getRowOffset:t=>e?t===0?0:c/G:a.getOffset(t),getRowIndex:t=>e?0:a.getIndex(t)}},[Y,ne]=(0,r.useState)(()=>J()),X=(0,r.useMemo)(()=>(0,i.jsx)($i,{sheetHeader:a,isColumn:A===t.IRange.Axis.Column,oppositeSize:c,onResizeHeadersStart:j,onResizeHeaders:M,onResizeHeadersEnd:N,onResizeHeadersDown:F,onResizeHeadersUp:I},`header-resizer-layer-${A}-[${a.getSheet().getId()}]`),[a,c,A,R]),re=(0,s.useCallbackRef)(e=>{let n=A===t.IRange.Axis.Column;_?.({...e,rowIndex:n?-1:e.rowIndex,colIndex:n?e.colIndex:-1})},[A,_]),Z=(0,s.useCallbackRef)(e=>{B?.scrollTo({colStart:e.colIndex,colEnd:e.colIndex,rowStart:e.rowIndex,rowEnd:e.rowIndex},{})},[B]),ie=(0,r.useMemo)(()=>(0,i.jsx)(Ji,{selection:a.getSheet().getSelection(),axis:A,entireCoords:a.getSheet().getEntireRange().getCoords(),edgeSize:u,edgeColor:d,scrollIntoView:Z,onPointerDownInterceptor:(e,n)=>!(e.button===2&&a.isSelectedAll(A===t.IRange.Axis.Column?n.colIndex:n.rowIndex)),onSelectionStart:w,onSelectionEnd:T},`header-selection-layer-${A}-[${a.getSheet().getId()}]`),[a,U,p,u,d,Z]),ae=(0,r.useMemo)(()=>(0,i.jsx)(ua,{axis:A,entireCoords:a.getSheet().getEntireRange().getCoords(),scrollIntoView:Z},`header-reference-layer-${A}-[${a.getSheet().getId()}]`),[a,U,p,A,Z]),oe=(0,r.useMemo)(()=>_?(0,i.jsx)(la,{sheet:a.getSheet(),onSheetContextMenu:re},`context-menu-layer-${A}-[${a.getSheet().getId()}]`):null,[a,_,R]),se=(0,s.useCallbackRef)(e=>f?f(e):a.getTextAt(e),[f,a]),ce=(0,s.useCallbackRef)(e=>{let{range:n,key:r,...o}=e,s=A===t.IRange.Axis.Column?n?.colStart??e.cell.colIndex:n?.rowStart??e.cell.rowIndex,c=a.at(s);return(0,i.jsx)(H,{axis:A,index:s,isSelected:ee,isSelectedAll:te,zoomScale:100*G,headerText:se,verticalPadding:h,horizontalPadding:g,onColumnButtonMouseDown:E?.onColumnButtonMouseDown,propsColumnButton:E?.propsColumnButton,renderColumnButton:E?.renderColumnButton,...o,value:c},`${r}-${A}-[${a.getSheet().getId()}]`)},[R,E,U,G,a]),le=(0,s.useEditMode)(),ue=(0,s.useImperativeElement)(n,()=>({scrollTo:e=>{L.current?.scrollTo(e)},forceRender:()=>{z()},getGridSurface:()=>L.current}),[]),Q=(0,r.useMemo)(()=>{if(C)return A===t.IRange.Axis.Column?new s.AxisViewport(C,new s.Viewport,!0,!1,C):new s.AxisViewport(new s.Viewport,C,!1,!0,C)},[C,A]),de=m===`dark`?`dark`:`light`,$=(0,r.useMemo)(()=>{let e={overflow:`visible`,...(B?.getStyles().getNormal().getFont()).toCSS(`adaptive`,1),...D},n=`white`,r=`black`;if(s.ReactUtils.detectIt().primaryInput!==`touch`){let i=A===t.IRange.Axis.Column?`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 8,14.5 2.3125,8.8125 h 3.25 V 1.5 h 4.875 v 7.3125 h 3.25 z' stroke='${r}' fill='${n}'/%3E%3C/g%3E%3C/svg%3E%0A") 8 15, pointer`:`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${r}' fill='${n}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`;le.getMode()?.key===`formatPainter`&&(i=`url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='${r}' fill='${n}'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer`),e.cursor=i}e.backgroundColor=`var(--sxl-color-base-100)`;let i=A===t.IRange.Axis.Column;return e.boxSizing=`border-box`,e.width=i?`100%`:c,e.height=i?c:`100%`,e.contain=`size layout style`,e.clipPath=i?`inset(-9999px 0px -9999px 0px)`:`inset(0px -9999px 0px -9999px)`,e},[A,le,m,D,c,R]),fe=(0,r.useMemo)(()=>[(0,i.jsx)(Ln,{header:a,renderCell:ce},`header-cells-${A}-[${a.getSheet().getId()}]`),ie,ae,X,oe],[X,ie,ae,oe,a,ce,A]),pe=(0,r.useMemo)(()=>{let e=A===t.IRange.Axis.Column;return(0,i.jsx)(o.GridSurface,{ref:cn([ue,L]),className:P(O,`sheet-header`),style:$,...(0,s.themeSurfaceProps)(`header`,de),viewport:Q,columnCount:e?U:1,rowCount:e?1:U,freezeLeft:e?p:void 0,freezeTop:e?void 0:p,hiddenColumnsAt:e?q:void 0,hiddenRowsAt:e?void 0:q,metrics:Y,...k,children:fe})},[U,fe,Y,Q,$,O,de,k]);return(0,r.useEffect)(()=>{V.current=!1,L.current?.invalidate()},[a]),pe})),Ga=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{sheet:n,colorScheme:a,className:o,style:c,width:u,height:d,onMouseDown:f,...p}=e,[m,h]=(0,r.useState)(n.getSelection().isEntire()),[g,_]=(0,r.useState)(!1),[v]=(0,s.useCommands)(`selectAll`);l(n?.getSelection(),{onChange:()=>{h(n.getSelection().isEntire()),_(n.getSelection().hasTopOrLeft())}});let y=a===`dark`?`dark`:`light`,b=m?`var(--sxl-color-primary)`:`var(--sxl-color-base-100)`,x=m?`color-mix(in srgb, var(--sxl-color-primary) 20%, transparent)`:`var(--sxl-color-base-hover)`,S=`var(--sxl-color-base-300)`,C=s.ReactUtils.getDevicePixelRatio(),w=e=>e/C+`px`;return(0,i.jsxs)(`div`,{tabIndex:-1,className:P(o,`top-left-corner`),...(0,s.themeSurfaceProps)(`header`,y),...p,onMouseDown:e=>{v?.execute(e.ctrlKey||e.button!==0),f?.(e)},style:{gridColumn:`1 / 2`,gridRow:`1 / 2`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxSizing:`border-box`,position:`relative`,cursor:`cell`,zIndex:100,borderRight:`solid ${w(1)} ${S}`,borderBottom:`solid ${w(1)} ${S}`,...c},ref:t,children:[(0,i.jsx)(`div`,{style:{height:d-5+`px`,width:d-5+`px`,clipPath:`path('M${d-5} 0 L0 ${d-5} L${d-5} ${d-5} L${d-5} 0 Z')`,borderRight:`${w(2)} solid ${b}`,borderBottom:`${w(2)} solid ${b}`,background:`${x}`,boxSizing:`border-box`,position:`absolute`,right:w(2),bottom:w(2)}}),(0,i.jsx)(`div`,{style:{position:`absolute`,right:w(-2),bottom:w(-2),width:w(g?2:1),height:w(g?2:1),background:g?`var(--sxl-color-primary)`:`var(--sxl-color-base-300)`}})]})}));Ga.displayName=`TopLeftCorner`;var Ka=Object.freeze([{key:`lightRedFillDarkRedText`,style:{font:{color:`#9C0006`},fill:{type:`solid`,color:`#FFC7CE`}}},{key:`yellowFillDarkYellowText`,style:{font:{color:`#9C6500`},fill:{type:`solid`,color:`#FFEB9C`}}},{key:`greenFillDarkGreenText`,style:{font:{color:`#006100`},fill:{type:`solid`,color:`#C6EFCE`}}},{key:`lightRedFill`,style:{fill:{type:`solid`,color:`#FFC7CE`}}},{key:`redText`,style:{font:{color:`#9C0006`}}},{key:`redBorder`,style:{border:{[t.IBorder.Edge.Left]:{style:t.IBorder.StrokeStyle.Thin,color:`#9C0006`},[t.IBorder.Edge.Top]:{style:t.IBorder.StrokeStyle.Thin,color:`#9C0006`},[t.IBorder.Edge.Right]:{style:t.IBorder.StrokeStyle.Thin,color:`#9C0006`},[t.IBorder.Edge.Bottom]:{style:t.IBorder.StrokeStyle.Thin,color:`#9C0006`}}}}]),qa=`#F8696B`,Ja=`#FFEB84`,Ya=`#63BE7B`,Xa=`#FCFCFF`,Za=`#5A8AC6`,Qa=`#FFEF9C`,$a=e=>{let n=e.map((n,r)=>r===0?{type:t.IConditionalFormat.ColorStopType.Min,color:n}:r===e.length-1?{type:t.IConditionalFormat.ColorStopType.Max,color:n}:{type:t.IConditionalFormat.ColorStopType.Percentile,value:50,color:n});return{type:t.IConditionalFormat.ScaleType.ColorScale,stops:n}},eo=Object.freeze([$a([Ya,Ja,qa]),$a([qa,Ja,Ya]),$a([Ya,Xa,qa]),$a([qa,Xa,Ya]),$a([Za,Xa,qa]),$a([qa,Xa,Za]),$a([Xa,qa]),$a([qa,Xa]),$a([Ya,Xa]),$a([Xa,Ya]),$a([Ya,Qa]),$a([Qa,Ya])]),to=Object.freeze([`#638EC6`,`#63C384`,`#FF555A`,`#FFB628`,`#008AEF`,`#D6007B`]),no=(e,n)=>({type:t.IConditionalFormat.ScaleType.DataBar,stops:[{type:t.IConditionalFormat.ColorStopType.AutoMin},{type:t.IConditionalFormat.ColorStopType.AutoMax}],color:e,...n?{gradient:!0,borderColor:e}:null}),ro=Object.freeze([...to.map(e=>no(e,!0)),...to.map(e=>no(e,!1))]),io=()=>structuredClone(eo[1]),ao=()=>structuredClone(ro[0]),oo=e=>{let n=[];for(let r=0;r<e;r++)n.push({type:t.IConditionalFormat.ColorStopType.Percent,value:Math.round(100*r/e)});return n},so=()=>({type:t.IConditionalFormat.ScaleType.IconSet,iconSet:t.IStyle.IconSet.TrafficLights3,stops:oo(3)}),co=Object.freeze([{key:`directional`,sets:[t.IStyle.IconSet.Arrows3,t.IStyle.IconSet.ArrowsGray3,t.IStyle.IconSet.Triangles3,t.IStyle.IconSet.Arrows4,t.IStyle.IconSet.ArrowsGray4,t.IStyle.IconSet.Arrows5,t.IStyle.IconSet.ArrowsGray5]},{key:`shapes`,sets:[t.IStyle.IconSet.TrafficLights3,t.IStyle.IconSet.TrafficLights3_2,t.IStyle.IconSet.TrafficLights4,t.IStyle.IconSet.Signs3,t.IStyle.IconSet.RedToBlack4]},{key:`indicators`,sets:[t.IStyle.IconSet.Symbols3,t.IStyle.IconSet.Symbols3_2,t.IStyle.IconSet.Flags3]},{key:`ratings`,sets:[t.IStyle.IconSet.Stars3,t.IStyle.IconSet.Rating4,t.IStyle.IconSet.Rating5,t.IStyle.IconSet.Quarters5,t.IStyle.IconSet.Boxes5]}]),lo=(e,t)=>e?[t]:[],uo=new Set([`formatTextRotate0`,`formatTextRotate45`,`formatTextRotate90`,`formatTextRotate270`,`formatTextRotate315`,`formatTextRotateCustom`,`formatTextRotateVertical`]),fo=new Set([`dataTextToColumns`,`sortAscending`,`sortDescending`]);function po(e,n){let r=()=>n.getView();e.updateCommand(`gridlinesToggle`,{callback:()=>{let e=r().isShowColumnGridlines()&&r().isShowRowGridlines();r().update({showColumnGridlines:!e,showRowGridlines:!e})}}),e.updateCommand(`sheetViewToggleGridlinesRows`,{callback:()=>{r().setShowRowGridlines(!r().isShowRowGridlines())}}),e.updateCommand(`sheetViewToggleGridlinesColumns`,{callback:()=>{r().setShowColumnGridlines(!r().isShowColumnGridlines())}}),e.updateCommand(`sheetViewFormatGridlinesColor`,{callback:e=>{r().setGridLineColor(e)},context:()=>({...ho(n),autoColor:null,onColorSelect:()=>{}})}),e.updateCommand(`sheetViewToggleShowHeadings`,{callback:()=>{let e=r().isShowColumnHeaders()&&r().isShowRowHeaders();r().update({showColumnHeaders:!e,showRowHeaders:!e})}}),e.updateCommand(`sheetViewToggleShowHeadingColumns`,{callback:()=>{r().setShowColumnHeaders(!r().isShowColumnHeaders())}}),e.updateCommand(`sheetViewToggleShowHeadingRows`,{callback:()=>{r().setShowRowHeaders(!r().isShowRowHeaders())}}),e.updateCommand(`sheetViewToggleShowHeadingsNumeric`,{callback:()=>{let e=r(),n=e.getColumnHeaderStyle()===t.ISheetView.HeaderTextStyle.Zero&&e.getRowHeaderStyle()===t.ISheetView.HeaderTextStyle.Zero;e.update({columnHeaderStyle:n?t.ISheetView.HeaderTextStyle.A1:t.ISheetView.HeaderTextStyle.Zero,rowHeaderStyle:n?t.ISheetView.HeaderTextStyle.One:t.ISheetView.HeaderTextStyle.Zero})}}),e.updateCommand(`sheetViewToggleFormulaView`,{callback:()=>{r().setShowFormulas(!r().isShowFormulas())}}),e.updateCommand(`sheetViewToggleShowZeros`,{callback:()=>{r().setShowZeros(!r().isShowZeros())}}),e.updateCommand(`calculate`,{callback:()=>{n.calculate()}}),e.updateCommand(`sheetZoomOut`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().zoomOut()}}),e.updateCommand(`sheetZoomIn`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().zoomIn()}}),e.updateCommand(`sheetZoom100`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setZoomScale(100)}}),e.updateCommand(`sheetZoom200`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setZoomScale(200)}}),e.updateCommand(`sheetZoom75`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setZoomScale(75)}}),e.updateCommand(`sheetZoom50`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setZoomScale(50)}}),e.updateCommand(`sheetZoom25`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setZoomScale(25)}}),e.updateCommand(`sheetZoomCustom`,{tags:[`noTransaction`,`noRepeat`],callback:e=>{r().setZoomScale(e??100)}});let i=()=>(r().getFreezePanes().coords?.rowIndex??0)!==0,o=()=>(r().getFreezePanes().coords?.colIndex??0)!==0;e.updateCommand(`freezeToggle`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{let e=n.getSelectedCell().getCoords();i()||o()?r().setFreezePanes(null):r().setFreezePanes({coords:e})}}),e.updateCommand(`freezeToggleHorizontal`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{let e=n.getSelectedCell().getCoords();r().setFreezePanes({coords:{rowIndex:i()?0:e.rowIndex}})}}),e.updateCommand(`freezeToggleVertical`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{let e=n.getSelectedCell().getCoords();r().setFreezePanes({coords:{colIndex:o()?0:e.colIndex}})}}),e.updateCommand(`unfreeze`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{r().setFreezePanes(null)}});let s=()=>{let s=r(),c=s.getColumnHeaderStyle()===t.ISheetView.HeaderTextStyle.Zero&&s.getRowHeaderStyle()===t.ISheetView.HeaderTextStyle.Zero;e.updateCommand(`gridlinesToggle`,{state:s.isShowColumnGridlines()||s.isShowRowGridlines()}),e.updateCommand(`sheetViewToggleGridlinesColumns`,{state:s.isShowColumnGridlines()}),e.updateCommand(`sheetViewToggleGridlinesRows`,{state:s.isShowRowGridlines()}),e.updateCommand(`sheetViewToggleShowHeadings`,{state:s.isShowColumnHeaders()||s.isShowRowHeaders()}),e.updateCommand(`sheetViewToggleShowHeadingColumns`,{state:s.isShowColumnHeaders()}),e.updateCommand(`sheetViewToggleShowHeadingRows`,{state:s.isShowRowHeaders()}),e.updateCommand(`sheetViewToggleShowHeadingsNumeric`,{state:c}),e.updateCommand(`sheetViewToggleFormulaView`,{state:s.isShowFormulas()}),e.updateCommand(`sheetViewToggleShowZeros`,{state:s.isShowZeros()}),e.updateCommand(`sheetViewFormatGridlinesColor`,{state:s.getGridLineColor()});let l=s.getZoomScale();e.updateCommand(`sheetZoom200`,{state:l===200}),e.updateCommand(`sheetZoom100`,{state:l===100}),e.updateCommand(`sheetZoom75`,{state:l===75}),e.updateCommand(`sheetZoom50`,{state:l===50}),e.updateCommand(`sheetZoom25`,{state:l===25}),e.updateCommand(`sheetZoomCustom`,{state:l});let u=n.getSelectedCell().getCoords();if(!u)return;let d=i(),f=o(),p=d||f;e.updateCommand(`freezeToggle`,{state:p,disabledReasons:p||u.rowIndex!==0||u.colIndex!==0?[]:[(0,a.messageKey)(`reason.freezeOrigin`)]}),e.updateCommand(`freezeToggleHorizontal`,{state:d,disabledReasons:d||u.rowIndex!==0?[]:[(0,a.messageKey)(`reason.freezeOrigin`)]}),e.updateCommand(`freezeToggleVertical`,{state:f,disabledReasons:f||u.colIndex!==0?[]:[(0,a.messageKey)(`reason.freezeOrigin`)]}),e.updateCommand(`unfreeze`,{disabledReasons:p?[]:[(0,a.messageKey)(`reason.noFreeze`)]})};s();let c=n.addListeners({onViewChange:s}),l=n.getSelection().addListeners({onChange:s});return()=>{c(),l()}}var mo=new t.Color(`transparent`);function ho(e){let t=e.getStyles();return{schemeLookup:t.schemeLookup(),recentColors:()=>t.recentColors(),addRecentColor:e=>t.addRecentColor(e),clearRecentColors:()=>t.clearRecentColors()}}function go(e,n,r){e.updateCommand(`dataRemoveDuplicates`,{callback:async e=>{let t=n.getSelectedRanges();t.getCount()>1?r?.showError(new a.ExpectedError((0,a.t)(`error.removeDuplicates.multipleRanges`))):t.at(0).removeDuplicates({autoSelect:!0,...e})}}),e.updateCommand(`dataTextToColumns`,{callback:async e=>{let t=n.getSelectedRanges();if(t.getCount()>1)return void r?.showError(new a.ExpectedError((0,a.t)(`error.textToColumns.multipleRanges`)));let i=typeof e==`string`?{delimiter:e}:e;t.at(0).textToColumns({autoSelect:!0,...i})}});let i=async(e,i,o,s)=>{let c=i,l=n.getSelectedRange(),u=n.getSelectedCell(),d=u.getCoords(),f,p=null;if(c){let e=c.getRange().getCoords();p=n.getTables().getItems({address:{colIndex:e.colStart,rowIndex:e.rowStart}})[0]??n.getAutoTable(),p&&!p.getRange().getIntersect(e)&&(p=null)}else if(p=n.getTables().getItems({address:n.getSelectedCell().getCoords()})[0]??n.getAutoTable(),p){let e=p.getRange();e.getIntersect(d)?c=p.getSortAt(d.colIndex-e.getCoords().colStart):p=null}if(c){let e=c,t=p;f=n=>{if(o&&t)return void t.sort({...n,description:s});let r={...n};delete r.sorts,e.setCriteria(r)},u=e.getRange().getCell(),l=t?t.getRange():e.getRange()}else{let r=n.getSelectedRanges();if(r.getCount()>1)throw new a.ExpectedError((0,a.t)(`error.sort.multipleRanges`));let i=r.at(0);i.size===1&&(i=i.getSurrounding()),l=i,f=n=>{i.doBatch(()=>{let r={...n,...e};i.sort(r),i.autoFit({axes:r?.axis===t.IRange.Axis.Column?t.IRange.AxisSelection.Column:t.IRange.AxisSelection.Row,skipCustomSize:!0,minContent:!0})},s)}}let m=async e=>{if(!e)return;let t=await Promise.resolve(r?.showBusy?.((0,a.t)(s))??null);try{f(e)}catch(e){t?.(),r?.showError?.(e);return}t?.()},h=l.getDefaultSortCriteria(t.IRange.Axis.Row,u);if(!h){if(o)throw new a.ExpectedError((0,a.t)(`error.sort.invalidSelection`));return}if(!o)return void await m({...h.options,...e});let g=l,_=h.options;_.hasHeader&&(g=l.getIntersect(h.sortCoords)),g.select();let v={range:l,cell:u},y={initialValue:_,context:()=>v,onInput:e=>{e&&m(e)}};r?.showWindow?.(`sort`,y)};return e.updateCommand(`sortAscending`,{tags:[`noTransaction`],callback:e=>i({reverse:!1},e,!1,(0,a.messageKey)(`op.sortAscending`))}),e.updateCommand(`sortDescending`,{tags:[`noTransaction`],callback:e=>i({reverse:!0},e,!1,(0,a.messageKey)(`op.sortDescending`))}),e.updateCommand(`sortCustom`,{tags:[`noTransaction`],callback:e=>i({},e,!0,(0,a.messageKey)(`op.sortCustom`))}),()=>{}}function _o(e,t,n,r,i){let o=()=>t.getTables().getItems({address:t.getSelectedCell().getCoords()})[0]??null,s=(e,r=!1)=>{let i=o();if(i)return void i.updateStyleOptions(e);let s=t.getSelectedRanges().getFixed(!0),c=t.getSelectedRange().getDefaultSortCriteria(),l={getNames:()=>t.getNames(),resolveRanges:e=>(t.getWorkbook()??t).getRanges(e).getFixed(!0),table:()=>null,styles:()=>null},u={initialValue:{ranges:s,hasHeader:c?.options?.hasHeader??!1},context:()=>l,onInput:n=>{var i;(i=n??null)&&t.doBatch(async()=>{let n=i.ranges.at(0);r&&n.getStyle().clear(),await t.getTables().add(n,{hasHeader:i.hasHeader,properties:{style:e?.name}}).getRange().select()},{description:(0,a.messageKey)(`op.insertTable`)})}};n?.showWindow?.(`tableNew`,u)};e.updateCommand(`insertTable`,{tags:[`noTransaction`],callback:()=>s()});let c=()=>({styles:()=>t.getStyles(),table:()=>o(),getNames:()=>t.getNames(),resolveRanges:e=>(t.getWorkbook()??t).getRanges(e).getFixed(!0)});e.updateCommand(`formatTableStyle`,{tags:[`noTransaction`],callback:e=>s(e),context:c}),e.updateCommand(`formatTableStyleClearCellStyles`,{tags:[`noTransaction`],callback:e=>s(e,!0),context:c}),e.updateCommand(`editTable`,{tags:[`noTransaction`,`noRepeat`],callback:async n=>{let i=null,a=!1;if(n?.isITable?i=n:n?.getValue?.()&&(i=n.getValue(),a=!0),!i){let e=t.getSelectedRange();e.size===1&&(e=e.getSurrounding()),i=o(),await e.select()}if(!i)return;let s=i;if(a)try{await s.select()}catch{}let c={styles:()=>t.getStyles(),table:()=>s,getNames:()=>t.getNames(),resolveRanges:e=>(t.getWorkbook()??t).getRanges(e).getFixed(!0)};e.updateCommand(`editTable`,{context:()=>c}),r?.(`tableDetails`)}});let l=async(e,r)=>{let i=(e=>e?e.isITable?e:e.getValue?.()??null:o())(e);if(i){if(!r){let e=i.getRange().getCoords(),t=(e.colEnd-e.colStart+1)*(e.rowEnd-e.rowStart+1);if(t>1e4&&n?.showOptions&&await n.showOptions({title:(0,a.t)(`dialog.confirm.title`),description:(0,a.t)(`table.convertToRangeWarning`,{count:t}),options:[{id:`Convert`,label:()=>(0,a.t)(`table.convert`)},`Cancel`],defaultOption:`Convert`})!==`Convert`)return}await t.doBatch(()=>{r?i.delete():i.convertToRange()},{description:r?(0,a.messageKey)(`op.deleteTable`):(0,a.messageKey)(`op.convertTableToRange`)})}};e.updateCommand(`deleteTable`,{tags:[`noTransaction`,`noRepeat`],callback:e=>l(e,!0)}),e.updateCommand(`convertTableToRange`,{tags:[`noTransaction`,`noRepeat`],callback:e=>l(e,!1)}),e.updateCommand(`setDefaultTableStyle`,{tags:[`noTransaction`,`noRepeat`],callback:e=>{t.getStyles().setDefaultTableStyle(e)}}),e.updateCommand(`deleteTableStyle`,{tags:[`noTransaction`,`noRepeat`],callback:e=>{t.getStyles().getTableStyle(e)?.delete()}});let u=()=>{let n=o(),r=t.getTables().getItems({address:t.getSelectedRange()}),i=[...lo(!t.getProtection().isFormatCellsAllowed(),(0,a.messageKey)(`reason.sheetProtected`)),...lo(r.length>0&&!n,(0,a.messageKey)(`reason.tableAmbiguous`))];e.updateCommand(`formatTableStyle`,{params:{hasTable:!!n},disabledReasons:i}),e.updateCommand(`formatTableStyleClearCellStyles`,{disabledReasons:i}),e.updateCommand(`insertTable`,{disabledReasons:[...i,...lo(r.length>0,(0,a.messageKey)(`reason.alreadyTable`))]})};u();let d=()=>{e.updateCommand(`editTable`,{state:i?.getActive()===`tableDetails`})};d();let f=i?.addListener({onChange:d}),p=t.getSelection().addListeners({onChange:u}),m=t.addListeners({onTablesChange:u,onProtectionChange:u});return()=>{p(),m(),f?.()}}function vo(e,n){let r=n.sheet;if(!r)return()=>{};let i=n,o=i?.notifier;e.use(vr({transaction:r,notifier:o,manager:i?.manager})),e.updateCommand(`protectionSheetToggle`,{tags:[`noTransaction`,`noRepeat`],callback:async(e,t)=>{let n=r.getProtection(),i=null;try{if(n.isLocked()){let e=null;if(n.hasPassword()){let t=await o?.showInput({title:(0,a.t)(`dialog.password.title`),description:(0,a.t)(`dialog.password.description`),options:[{id:`Unprotect`,label:()=>(0,a.t)(`dialog.unprotect`)},`Cancel`],defaultOption:`Unprotect`,inputType:`password`});if(t?.option!==`Unprotect`)return;e=t.input}i=await Promise.resolve(o?.showBusy(t?.getLabel?.())??null),await n.unlock(e??void 0)}else i=await Promise.resolve(o?.showBusy(t?.getLabel?.())??null),await n.lock();i?.()}catch(e){i?.(),o?.showError(e)}}}),e.updateCommand(`manageDataValidation`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{i?.activateTaskPane?.(`dataValidationDetails`)}}),e.updateCommand(`manageConditionalFormat`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{i?.activateTaskPane?.(`conditionalFormatDetails`)}}),e.updateCommand(`conditionalFormatNewRule`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{i?.activateTaskPane?.(`conditionalFormatDetails`,{args:{insert:!0}})}});let c=e=>{r.getConditionalFormats().add(r.getSelectedRanges(),e)},l=e=>({tags:[`noTransaction`,`noRepeat`],callback:()=>{i?.activateTaskPane?.(`conditionalFormatDetails`,{args:{draft:{condition:e,style:structuredClone(Ka[0].style)}}})}}),u=t.ICondition.BuiltInOperatorNames,d=t.ICondition.BuiltInSelectorNames;e.updateCommand(`conditionalFormatGreaterThan`,l({selector:d.Number,operator:u.GreaterThan,param:10})),e.updateCommand(`conditionalFormatLessThan`,l({selector:d.Number,operator:u.LessThan,param:10})),e.updateCommand(`conditionalFormatBetween`,l({selector:d.Number,operator:u.Between,param:{from:10,to:20}})),e.updateCommand(`conditionalFormatEqualTo`,l({selector:d.Number,operator:u.EqualTo,param:10})),e.updateCommand(`conditionalFormatTextContains`,l({selector:d.Text,operator:u.TextContains,param:``})),e.updateCommand(`conditionalFormatDateOccurring`,l({operator:u.TimePeriod,param:{type:t.ICondition.TimePeriodType.Today}})),e.updateCommand(`conditionalFormatDuplicateValues`,l({operator:u.Not,param:{operator:u.Unique}})),e.updateCommand(`conditionalFormatTopItems`,l({operator:u.TopN,param:{top:!0,limit:10,percent:!1}})),e.updateCommand(`conditionalFormatTopPercent`,l({operator:u.TopN,param:{top:!0,limit:10,percent:!0}})),e.updateCommand(`conditionalFormatBottomItems`,l({operator:u.TopN,param:{top:!1,limit:10,percent:!1}})),e.updateCommand(`conditionalFormatBottomPercent`,l({operator:u.TopN,param:{top:!1,limit:10,percent:!0}})),e.updateCommand(`conditionalFormatAboveAverage`,l({operator:u.Average,param:{type:t.ICondition.AverageType.Above}})),e.updateCommand(`conditionalFormatBelowAverage`,l({operator:u.Average,param:{type:t.ICondition.AverageType.Below}})),e.updateCommand(`conditionalFormatDataBar`,{callback:e=>{c({scale:e?structuredClone(e):ao()})}}),e.updateCommand(`conditionalFormatColorScale`,{callback:e=>{c({scale:e?structuredClone(e):io()})}}),e.updateCommand(`conditionalFormatIconSet`,{callback:()=>{c({scale:so()})}}),e.updateCommand(`conditionalFormatClearSelection`,{callback:()=>{let e=r.getConditionalFormats(),t=new Set;for(let n of r.getSelectedRanges().getCoords())for(let r of e.getItems({address:n}))t.add(r);for(let e of t)e.delete()}}),e.updateCommand(`conditionalFormatClearSheet`,{callback:()=>{for(let e of r.getConditionalFormats().getItems())e.delete()}}),e.updateCommand(`manageProtectedRange`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{i?.activateTaskPane?.(`protectedRangeDetails`)}});let f=async e=>{let n=n=>{r.doBatch(()=>{let i=r.getSelectedRanges();i.merge({axes:e,discardMultipleValues:n}),e===t.IRange.AxisSelection.Both&&i.getStyle().update({alignment:{horizontal:t.ITextFrame.HorizontalAlignment.Center}})},{description:(0,a.messageKey)(`op.mergeCells`)})};try{n(!1)}catch(e){if(e?.type===`discardMultipleValues`&&o?.showOptions){if(await o.showOptions({title:(0,a.t)(`dialog.confirm.title`),description:(0,a.t)(`sheet.mergeCellsWarning`),options:[{id:`Merge`,label:()=>(0,a.t)(`sheet.merge`)},`Cancel`],defaultOption:`Merge`})!==`Merge`)return;try{n(!0)}catch(e){o?.showError?.(e)}}else o?.showError?.(e)}},p=()=>{r.doBatch(()=>{let e=r.getSelectedRanges();e.unmerge(),e.getStyle().update({alignment:{horizontal:null}})},{description:(0,a.messageKey)(`op.unmergeCells`)})};e.updateCommand(`mergeToggle`,{tags:[`noTransaction`],callback:()=>{a.CoordUtils.isSingleCell(r.getSelectedRange().getCoords())||(r.getSelectedRanges().getMerges().length===0?f(t.IRange.AxisSelection.Both):p())}}),e.updateCommand(`mergeHorizontal`,{tags:[`noTransaction`],callback:()=>{f(t.IRange.AxisSelection.Column)}}),e.updateCommand(`mergeVertical`,{tags:[`noTransaction`],callback:()=>{f(t.IRange.AxisSelection.Row)}}),e.updateCommand(`unmerge`,{tags:[`noTransaction`],callback:()=>p()});let m=e.getKeysByTag(`mutator`),h=()=>{let n=r.getProtection(),o=n.isLocked(),s=!n.isFormatCellsAllowed(),c=lo(s,(0,a.messageKey)(`reason.sheetProtected`));e.updateCommand(`protectionSheetToggle`,{state:o,params:{locked:o}});let l=r.getSelectedRanges(),u=r.getSelectedRange(),d=l.getCoords(),f=l.getMerges().length>0,p=l.isOverlapping(),h=!0;for(let e=0;h&&e<d.length;e++)h=a.CoordUtils.isSingleCell(d[e]);let g=d.length===1&&d[0].colStart===d[0].colEnd,_=!(r.getTables().getItems({address:u}).length>0)&&!p&&(f||!h),v=!1,y=!1,b=!1,x=!1;s||(v=l.isEntireColumnsAny(),y=v&&!l.isEntireColumns(),b=l.isEntireRowsAny(),x=b&&!l.isEntireRows());for(let t of m)uo.has(t)||fo.has(t)||e.updateCommand(t,{disabledReasons:c});let S=r.getSelectedCell().getStyle().getAlignment().getHorizontal(),C=S===t.ITextFrame.HorizontalAlignment.CenterContinuous||S===t.ITextFrame.HorizontalAlignment.Fill;for(let t of uo)e.updateCommand(t,{disabledReasons:[...c,...lo(C,(0,a.messageKey)(`reason.continuousSpan`))]});e.updateCommand(`dataTextToColumns`,{disabledReasons:[...c,...lo(!g,(0,a.messageKey)(`reason.singleColumn`)),...lo(o,(0,a.messageKey)(`reason.sheetLocked`))]});let w=[...c,...lo(l.getCount()!==1,(0,a.messageKey)(`reason.sortRange`))];e.updateCommand(`sortAscending`,{disabledReasons:w}),e.updateCommand(`sortDescending`,{disabledReasons:w});let T=lo(!_,(0,a.messageKey)(`reason.mergeUnavailable`));e.updateCommand(`mergeToggle`,{state:f,disabledReasons:[...c,...T]}),e.updateCommand(`mergeHorizontal`,{disabledReasons:[...c,...T]}),e.updateCommand(`mergeVertical`,{disabledReasons:[...c,...T]}),e.updateCommand(`unmerge`,{disabledReasons:[...c,...lo(!f,(0,a.messageKey)(`reason.noMerge`)),...T]});let E=lo(p,(0,a.messageKey)(`reason.overlap`)),D=[...c,...lo(b,(0,a.messageKey)(`reason.entireColumn`)),...E,...lo(y,(0,a.messageKey)(`reason.mixedSelection`))],O=[...c,...lo(v,(0,a.messageKey)(`reason.entireRow`)),...E,...lo(x,(0,a.messageKey)(`reason.mixedSelection`))];e.updateCommand(`insertCellsShiftDown`,{disabledReasons:D}),e.updateCommand(`deleteCellsShiftUp`,{disabledReasons:D}),e.updateCommand(`insertCellsShiftRight`,{disabledReasons:O}),e.updateCommand(`deleteCellsShiftLeft`,{disabledReasons:O});let k=[...c,...lo(b,(0,a.messageKey)(`reason.entireRow`)),...E,...lo(y,(0,a.messageKey)(`reason.mixedSelection`))],A=[...c,...lo(v,(0,a.messageKey)(`reason.entireColumn`)),...E,...lo(x,(0,a.messageKey)(`reason.mixedSelection`))];for(let t of[`insertRows`,`insertRowsAfter`,`deleteRows`])e.updateCommand(t,{disabledReasons:k});for(let t of[`insertColumns`,`insertColumnsAfter`,`deleteColumns`])e.updateCommand(t,{disabledReasons:A});let j=i?.editModeHandler?.getMode()?.key,M=j===`copy`?`copy`:j===`cut`?`cut`:`none`,N=p?1:l.getRowCount(),P=p?1:l.getColumnCount(),F=l.getDefaultShiftAxis()===t.IRange.Axis.Column,I=v&&!y,L=b&&!x,R=I?`rows`:L?`columns`:`none`,z=L?P:N;e.updateCommand(`insertCells`,{params:{mode:M,shift:F?`right`:`down`,span:R,count:z}}),e.updateCommand(`deleteCells`,{params:{shift:F?`left`:`up`,span:R,count:z}}),e.updateCommand(`insertCellsShiftDown`,{params:{mode:M,span:I?`rows`:`none`,count:N}}),e.updateCommand(`deleteCellsShiftUp`,{params:{span:I?`rows`:`none`,count:N}}),e.updateCommand(`insertCellsShiftRight`,{params:{mode:M,span:L?`columns`:`none`,count:P}}),e.updateCommand(`deleteCellsShiftLeft`,{params:{span:L?`columns`:`none`,count:P}});for(let t of[`insertRows`,`insertRowsAfter`])e.updateCommand(t,{params:{mode:M,count:N}});for(let t of[`insertColumns`,`insertColumnsAfter`])e.updateCommand(t,{params:{mode:M,count:P}});e.updateCommand(`deleteRows`,{params:{count:N}}),e.updateCommand(`deleteColumns`,{params:{count:P}}),e.updateCommand(`hideRows`,{params:{count:l.getRowCount()}}),e.updateCommand(`hideColumns`,{params:{count:l.getColumnCount()}})};h();let g=r.addListeners({onProtectionChange:h,onStyleChange:h,onInvalidated:h,onClose:()=>e.remove()}),_=r.getSelection().addListeners({onChange:h}),v=po(e,r),y=function(e,n,r,i){let o=(e,t=!1,r)=>{let i=r??{autoSelect:!0,autoFit:!0},a=n.getSelectedRanges();t&&a.getStyle().update(null,i),a.getStyle().update(e,i)},s=()=>n.getSelectedCell().getStyle().getFont(),c=()=>n.getSelectedCell().getStyle().getAlignment(),l=()=>{let e=s().getWeight();return!isNaN(e)&&e>500};e.updateCommand(`formatBoldToggle`,{callback:()=>{o({font:{weight:l()?400:700}})}}),e.updateCommand(`formatItalicToggle`,{callback:()=>{o({font:{style:s().getStyle()===t.IFont.Style.Italic?t.IFont.Style.Normal:t.IFont.Style.Italic}})}}),e.updateCommand(`formatStrikeThroughToggle`,{callback:()=>{o({font:{strike:!s().getStrike()}})}});let u=(n,r)=>{e.updateCommand(n,{callback:()=>{o({font:{underline:s().getUnderline()===r?t.IFont.UnderlineStyle.None:r}})}})};u(`formatUnderlinedToggle`,t.IFont.UnderlineStyle.Single),u(`formatUnderlinedDoubleToggle`,t.IFont.UnderlineStyle.Double),u(`formatUnderlinedAccountingToggle`,t.IFont.UnderlineStyle.SingleAccounting),u(`formatUnderlinedAccountingDoubleToggle`,t.IFont.UnderlineStyle.DoubleAccounting);let d=(n,r)=>{e.updateCommand(n,{callback:()=>{o({font:{verticalAlign:s().getVerticalAlignment()===r?t.IFont.VerticalAlignment.Baseline:r}})}})};d(`formatSuperscriptToggle`,t.IFont.VerticalAlignment.Super),d(`formatSubscriptToggle`,t.IFont.VerticalAlignment.Sub);let f=(n,r)=>{e.updateCommand(n,{callback:()=>{o({alignment:{overflow:c().getOverflow()===r?t.ITextFrame.Overflow.Visible:r}})}})};f(`formatTextOverflowVisibleToggle`,t.ITextFrame.Overflow.Visible),f(`formatTextOverflowWrapToggle`,t.ITextFrame.Overflow.Wrap),f(`formatTextOverflowClipToggle`,t.ITextFrame.Overflow.Clip),f(`formatTextOverflowShrinkToggle`,t.ITextFrame.Overflow.Shrink),e.updateCommand(`formatTextOverflowEllipsisToggle`,{callback:()=>{o({alignment:{overflow:c().getOverflow()===t.ITextFrame.Overflow.Ellipsis?t.ITextFrame.Overflow.Visible:t.ITextFrame.Overflow.Ellipsis}})},disabledReasons:[(0,a.messageKey)(`reason.notImplemented`)]});let p=(n,r)=>{e.updateCommand(n,{callback:()=>{o({alignment:{vertical:c().getVertical()===r?t.ITextFrame.VerticalAlignment.Bottom:r}})}})};p(`formatAlignTopToggle`,t.ITextFrame.VerticalAlignment.Top),p(`formatAlignMiddleToggle`,t.ITextFrame.VerticalAlignment.Center),p(`formatAlignBottomToggle`,t.ITextFrame.VerticalAlignment.Bottom),p(`formatAlignJustifyVerticalToggle`,t.ITextFrame.VerticalAlignment.Justify),p(`formatAlignDistributedVerticalToggle`,t.ITextFrame.VerticalAlignment.Distributed);let m=(n,r,i=!1)=>{e.updateCommand(n,{callback:()=>{let e=c().getHorizontal()===r?t.ITextFrame.HorizontalAlignment.General:r;o({alignment:i?{horizontal:e,rotation:null}:{horizontal:e}})}})};m(`formatAlignLeftToggle`,t.ITextFrame.HorizontalAlignment.Left),m(`formatAlignCenterToggle`,t.ITextFrame.HorizontalAlignment.Center),m(`formatAlignCenterContinuousToggle`,t.ITextFrame.HorizontalAlignment.CenterContinuous,!0),m(`formatAlignFillToggle`,t.ITextFrame.HorizontalAlignment.Fill,!0),m(`formatAlignDistributedHorizontalToggle`,t.ITextFrame.HorizontalAlignment.Distributed),m(`formatAlignRightToggle`,t.ITextFrame.HorizontalAlignment.Right),m(`formatAlignJustifyToggle`,t.ITextFrame.HorizontalAlignment.Justify),e.updateCommand(`formatBorder`,{callback:e=>{o({border:e})}}),e.updateCommand(`formatFillColor`,{callback:e=>{o({fill:e})}}),e.updateCommand(`formatFontColor`,{callback:e=>{o({font:{color:e}})}}),e.updateCommand(`formatFillColor`,{context:()=>({...ho(n),autoColor:mo,quickColor:i?.getLastFillColor?.()??void 0,onColorSelect:e=>i?.setLastFillColor?.(e??mo)})}),e.updateCommand(`formatFontColor`,{context:()=>({...ho(n),autoColor:n.getStyles().getNormal().getFont().getColor(),quickColor:i?.getLastFontColor?.()??void 0,onColorSelect:e=>i?.setLastFontColor?.(e)})}),e.updateCommand(`formatBorder`,{context:()=>{let e=n.getStyles();return{autoColor:e.getNormal().getFont().getColor(),autoStyle:t.IBorder.StrokeStyle.Thin,schemeLookup:e.schemeLookup(),quickBorder:i?.getLastBorder?.()??void 0,createBorder:t=>e.getNormal().createStyle({border:t}).getBorder(),onBorderSelect:e=>i?.setLastBorder?.(e)}}}),e.updateCommand(`formatFontFamily`,{callback:e=>{o({font:{family:e}})}}),e.updateCommand(`formatFontSize`,{callback:e=>{o({font:{size:e}})}}),e.updateCommand(`formatFontSizeIncrease`,{callback:()=>{o(e=>({font:{size:t.FontUtils.findNextFontSize(e.getFont().getSize(),!0)}}))}}),e.updateCommand(`formatFontSizeDecrease`,{callback:()=>{o(e=>({font:{size:t.FontUtils.findNextFontSize(e.getFont().getSize(),!1)}}))}}),e.updateCommand(`formatNumberFormat`,{callback:e=>{o({numberFormat:e})}}),e.updateCommand(`formatNumberFormatGeneralStyle`,{callback:()=>{o({numberFormat:t.NumberFormat.Type.General})}}),e.updateCommand(`formatNumberFormatNumberStyle`,{callback:()=>{o({numberFormat:`#,##0.00`})}}),e.updateCommand(`formatNumberFormatTimeStyle`,{callback:()=>{o({numberFormat:`h:mm AM/PM`})}}),e.updateCommand(`formatNumberFormatDateStyle`,{callback:()=>{o({numberFormat:`d-mmm-yy`})}}),e.updateCommand(`formatNumberFormatAccountingStyle`,{callback:e=>{o(e?{numberFormat:e}:{named:t.IStyle.BuiltInName.Currency})}}),e.updateCommand(`formatNumberFormatPercentStyle`,{callback:()=>{o({named:t.IStyle.BuiltInName.Percent})}}),e.updateCommand(`formatNumberFormatScientificStyle`,{callback:()=>{o({numberFormat:`0.00E+00`})}}),e.updateCommand(`formatNumberFormatCommaStyle`,{callback:()=>{o({named:t.IStyle.BuiltInName.Comma})}}),e.updateCommand(`formatNumberFormatIncreaseDecimal`,{callback:()=>{o(e=>({numberFormat:t.NumberFormat.Parser.adjustDecimalPlaces(e.getNumberFormat(),1)}))}}),e.updateCommand(`formatNumberFormatDecreaseDecimal`,{callback:()=>{o(e=>({numberFormat:t.NumberFormat.Parser.adjustDecimalPlaces(e.getNumberFormat(),-1)}))}});let h={style:t.IBorder.StrokeStyle.Thin,color:null};e.updateCommand(`formatBorderAddOutline`,{callback:()=>{o({border:{left:h,top:h,right:h,bottom:h}})}}),e.updateCommand(`formatBorderClearOutline`,{callback:()=>{o({border:null})}}),e.updateCommand(`formatIndentDecrease`,{callback:()=>{o(e=>{let t=e.getAlignment().getIndent()-1;return{alignment:{indent:t>0?t:0}}})}}),e.updateCommand(`formatIndentIncrease`,{callback:()=>{o(e=>{let n={alignment:{indent:e.getAlignment().getIndent()+1}};return e.getAlignment().getHorizontal()===t.ITextFrame.HorizontalAlignment.General&&(n.alignment.horizontal=t.ITextFrame.HorizontalAlignment.Left),n})}}),e.updateCommand(`formatCellStyle`,{callback:e=>{n.getSelectedRanges().getStyle().setNamed(e,{autoSelect:!0,autoFit:!0})},context:()=>({styles:()=>n.getStyles(),named:()=>n.getSelectedCell().getStyle().getNamed(),createCell:e=>n.createCell(e)})});let g=e=>{o({alignment:{rotation:e}})};e.updateCommand(`formatTextRotate0`,{callback:()=>g(0)}),e.updateCommand(`formatTextRotate45`,{callback:()=>g(45)}),e.updateCommand(`formatTextRotate90`,{callback:()=>g(90)}),e.updateCommand(`formatTextRotate270`,{callback:()=>g(270)}),e.updateCommand(`formatTextRotate315`,{callback:()=>g(315)}),e.updateCommand(`formatTextRotateCustom`,{callback:e=>g(e??0)}),e.updateCommand(`formatNumberDialog`,{tags:[`noTransaction`],callback:()=>{let e={initialValue:n.getSelectedCell().getStyle().getNumberFormat(),context:()=>n.getSelectedCell(),onInput:e=>{n.doBatch(()=>{n.getSelectedRanges().getStyle().update({numberFormat:e},{autoSelect:!0,autoFit:!0})},{description:(0,a.messageKey)(`op.numberFormat`)})}};r?.showWindow?.(`numberFormat`,e)}}),e.updateCommand(`formatSheetTabColor`,{callback:e=>{n.setTabColor(e)},state:n.getTabColor()??mo,context:()=>({...ho(n),autoColor:mo,onColorSelect:()=>{}})});let _=()=>{let r=s(),i=r.getUnderline(),a=r.getVerticalAlignment();e.updateCommand(`formatBoldToggle`,{state:l()}),e.updateCommand(`formatItalicToggle`,{state:r.getStyle()===t.IFont.Style.Italic}),e.updateCommand(`formatStrikeThroughToggle`,{state:r.getStrike()}),e.updateCommand(`formatUnderlinedToggle`,{state:i===t.IFont.UnderlineStyle.Single}),e.updateCommand(`formatUnderlinedDoubleToggle`,{state:i===t.IFont.UnderlineStyle.Double}),e.updateCommand(`formatUnderlinedAccountingToggle`,{state:i===t.IFont.UnderlineStyle.SingleAccounting}),e.updateCommand(`formatUnderlinedAccountingDoubleToggle`,{state:i===t.IFont.UnderlineStyle.DoubleAccounting}),e.updateCommand(`formatSuperscriptToggle`,{state:a===t.IFont.VerticalAlignment.Super}),e.updateCommand(`formatSubscriptToggle`,{state:a===t.IFont.VerticalAlignment.Sub}),e.updateCommand(`formatFontFamily`,{state:r.getFamily()}),e.updateCommand(`formatFontSize`,{state:r.getSize()});let o=n.getSelectedCell().getStyle().getNumberFormat();e.updateCommand(`formatNumberFormat`,{state:o,context:()=>n.getSelectedCell()}),e.updateCommand(`formatNumberDialog`,{state:o,context:()=>n.getSelectedCell()});let u=n.getSelectedCell().getStyle().getFill(),d=null;u?.getType()===t.IFill.Type.Solid?d=u.getColor():u?.getType()===t.IFill.Type.Gradient?d=u.getStops()?.[0]?.getColor()??null:u?.getType()===t.IFill.Type.Pattern&&(d=u.getBackground()),e.updateCommand(`formatFillColor`,{state:d}),e.updateCommand(`formatFontColor`,{state:r.toJSON()?.color?r.getColor():null});let f=c(),p=f.getOverflow();e.updateCommand(`formatTextOverflowVisibleToggle`,{state:p===t.ITextFrame.Overflow.Visible}),e.updateCommand(`formatTextOverflowWrapToggle`,{state:p===t.ITextFrame.Overflow.Wrap}),e.updateCommand(`formatTextOverflowClipToggle`,{state:p===t.ITextFrame.Overflow.Clip}),e.updateCommand(`formatTextOverflowShrinkToggle`,{state:p===t.ITextFrame.Overflow.Shrink}),e.updateCommand(`formatTextOverflowEllipsisToggle`,{state:p===t.ITextFrame.Overflow.Ellipsis});let m=f.getVertical();e.updateCommand(`formatAlignTopToggle`,{state:m===t.ITextFrame.VerticalAlignment.Top}),e.updateCommand(`formatAlignMiddleToggle`,{state:m===t.ITextFrame.VerticalAlignment.Center}),e.updateCommand(`formatAlignBottomToggle`,{state:m===t.ITextFrame.VerticalAlignment.Bottom}),e.updateCommand(`formatAlignJustifyVerticalToggle`,{state:m===t.ITextFrame.VerticalAlignment.Justify}),e.updateCommand(`formatAlignDistributedVerticalToggle`,{state:m===t.ITextFrame.VerticalAlignment.Distributed});let h=f.getHorizontal();e.updateCommand(`formatAlignLeftToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Left}),e.updateCommand(`formatAlignCenterToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Center}),e.updateCommand(`formatAlignCenterContinuousToggle`,{state:h===t.ITextFrame.HorizontalAlignment.CenterContinuous}),e.updateCommand(`formatAlignFillToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Fill}),e.updateCommand(`formatAlignDistributedHorizontalToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Distributed}),e.updateCommand(`formatAlignRightToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Right}),e.updateCommand(`formatAlignJustifyToggle`,{state:h===t.ITextFrame.HorizontalAlignment.Justify});let g=f.getRotation();e.updateCommand(`formatTextRotate0`,{state:g===0}),e.updateCommand(`formatTextRotate45`,{state:g===45}),e.updateCommand(`formatTextRotate90`,{state:g===90}),e.updateCommand(`formatTextRotate270`,{state:g===270}),e.updateCommand(`formatTextRotate315`,{state:g===315}),e.updateCommand(`formatTextRotateCustom`,{state:g??0})};_();let v=n.addListeners({onStyleChange:_}),y=n.getSelection().addListeners({onChange:_});return()=>{v(),y()}}(e,r,o,i?.pickerMemory),b=function(e,n){let r=e=>{n.getSelectedRanges().clear(e)};return e.updateCommand(`clearContents`,{callback:()=>{r(t.ICell.Content.Values)}}),e.updateCommand(`clearFormats`,{callback:()=>{r(t.ICell.Content.Formats)}}),e.updateCommand(`clearHyperlinks`,{callback:()=>{r(t.ICell.Content.Hyperlinks)}}),e.updateCommand(`clearComments`,{callback:()=>{r(t.ICell.Content.Comments)}}),e.updateCommand(`clearAll`,{callback:()=>{r()}}),e.updateCommand(`deleteHyperlink`,{callback:()=>{n.getSelectedRange().setHyperlink(null)}}),e.updateCommand(`deleteComments`,{callback:()=>{n.getSelectedRange().setComments(null)}}),()=>{}}(e,r),x=function(e,t){let n=(e,n)=>{t.getSelection().selectRegion({contentOnly:e,entireRegion:n})};return e.updateCommand(`selectAll`,{tags:[`noTransaction`,`noRepeat`],callback:e=>{n(!1,e??!1)}}),e.updateCommand(`selectRegion`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{n(!0,!1)}}),e.updateCommand(`selectComments`,{tags:[`noTransaction`,`noRepeat`],disabledReasons:[(0,a.messageKey)(`reason.notImplemented`)],callback:()=>{}}),e.updateCommand(`clearHiddenSelection`,{tags:[`noTransaction`,`noRepeat`],callback:()=>{t.getSelection().clearHidden()}}),()=>{}}(e,r),S=function(e,t){let n=()=>t.getTables().getItems({address:t.getSelectedCell().getCoords()})[0]??null;e.updateCommand(`tableFilterToggle`,{callback:()=>{let e=n();if(e)return void e.setHiddenButtons(!e.isHiddenButtons());let r=t.getAutoTable();r?r.delete():t.addAutoTable()}});let r=()=>{let r=n()??t.getAutoTable(),i=t.getProtection(),o=!i.isAutoTableAllowed()||!i.isSortAllowed();e.updateCommand(`tableFilterToggle`,{state:!!r&&!r.isHiddenButtons(),disabledReasons:lo(o,(0,a.messageKey)(`reason.sheetProtected`))})};r();let i=t.getSelection().addListeners({onChange:r}),o=t.addListeners({onTablesChange:r,onProtectionChange:r});return()=>{i(),o()}}(e,r),C=function(e,n,r){let i=()=>n.getSelectedRanges();e.updateCommand(`hideRows`,{callback:()=>{i().getRowHeaders().setHidden(!0)}}),e.updateCommand(`hideColumns`,{callback:()=>{i().getColumnHeaders().setHidden(!0)}}),e.updateCommand(`unhideRows`,{callback:()=>{i().getRowHeaders().setHidden(!1)}}),e.updateCommand(`unhideColumns`,{callback:()=>{i().getColumnHeaders().setHidden(!1)}}),e.updateCommand(`autoFitRows`,{callback:()=>{i().autoFit({axes:t.IRange.AxisSelection.Row})}}),e.updateCommand(`autoFitColumns`,{callback:()=>{i().autoFit({axes:t.IRange.AxisSelection.Column})}});let o=(e,o)=>{let s=e===t.IRange.Axis.Row,c=s?(0,a.messageKey)(`op.resizeRows`):(0,a.messageKey)(`op.resizeColumns`),l={initialValue:{size:o,unit:`Px`},context:()=>({getAxis:()=>e,getUnitText:()=>`Pt`}),onInput:(e,r)=>{if(r===`Autofit`)return void n.doBatch(()=>i().autoFit({axes:s?t.IRange.AxisSelection.Row:t.IRange.AxisSelection.Column}),{description:(0,a.messageKey)(`op.autofit`),autoSelect:!0});if(!e)return;let o=s?i().getRowHeaders():i().getColumnHeaders();n.doBatch(()=>o.setSize(e.size+e.unit),{description:c,autoSelect:!0})}};r?.showWindow(`resizeHeader`,l)};return e.updateCommand(`resizeRows`,{tags:[`noTransaction`,`noRepeat`],callback:()=>o(t.IRange.Axis.Row,20)}),e.updateCommand(`resizeColumns`,{tags:[`noTransaction`,`noRepeat`],callback:()=>o(t.IRange.Axis.Column,100)}),()=>{}}(e,r,o),w=function(e,n){let r=(e,r)=>{let i=n.getSelectedRanges();i.doBatch(()=>{let r=e===t.IRange.Direction.Up||e===t.IRange.Direction.Down,o=i.getCoords().slice().sort(a.CoordUtils.createRangeComparator(r?t.IRange.Axis.Row:t.IRange.Axis.Column));for(let r of o){let i=r,a=n.getRange(i).getMerges(),o=0,s=0;a.length>0&&(o=a[0].rowEnd-a[0].rowStart,s=a[0].colEnd-a[0].colStart),e===t.IRange.Direction.Left?i={...r,colStart:r.colEnd+s}:e===t.IRange.Direction.Right?i={...r,colEnd:r.colStart+s}:e===t.IRange.Direction.Up?i={...r,rowStart:r.rowEnd+o}:e===t.IRange.Direction.Down&&(i={...r,rowEnd:r.rowStart+o}),n.getRange(i).autoFill(r,{filler:t.AutoFill.Types.Copy}),n.getRange(r).autoFit({axes:t.IRange.AxisSelection.Row,skipCustomSize:!0,minContent:!0})}},{autoSelect:!0,description:r})};return e.updateCommand(`fillDown`,{callback:()=>r(t.IRange.Direction.Down,`Fill Down`)}),e.updateCommand(`fillRight`,{callback:()=>r(t.IRange.Direction.Right,`Fill Right`)}),e.updateCommand(`fillUp`,{callback:()=>r(t.IRange.Direction.Up,`Fill Up`)}),e.updateCommand(`fillLeft`,{callback:()=>r(t.IRange.Direction.Left,`Fill Left`)}),()=>{}}(e,r),T=function(e,n,r,i){let a=async(e,a=!1,o=!1)=>{let s=n.getSelectedRanges();a&&(e===t.IRange.Axis.Row?s=s.getEntireRows(o):e===t.IRange.Axis.Column&&(s=s.getEntireColumns(o)));let c=null,l=r?.getMode()?.key;if((l===`copy`||l===`cut`)&&i){let e=await i.getClipboard().readReference();e&&e.getItemType()===`range`&&(c=e.getItem?.()??null,c?.getCoords?.()||(c=null))}if(c){let n=await s.insertFrom(c,{...c.getMarkOptions(),axis:e,autoSelect:!0});!n||n.isEntireRows()||n.isEntireColumns()||n.autoFit({axes:t.IRange.AxisSelection.Row,minContent:!0}),r?.setMode(null)}else s.insert({axis:e,autoSelect:!0})},o=(e,r=!1)=>{let i=n.getSelectedRanges();r&&(e===t.IRange.Axis.Row?i=i.getEntireRows():e===t.IRange.Axis.Column&&(i=i.getEntireColumns())),i.delete(e)};return e.updateCommand(`insertCells`,{callback:()=>a()}),e.updateCommand(`insertCellsShiftRight`,{callback:()=>a(t.IRange.Axis.Column)}),e.updateCommand(`insertCellsShiftDown`,{callback:()=>a(t.IRange.Axis.Row)}),e.updateCommand(`insertRows`,{callback:()=>a(t.IRange.Axis.Row,!0)}),e.updateCommand(`insertColumns`,{callback:()=>a(t.IRange.Axis.Column,!0)}),e.updateCommand(`insertRowsAfter`,{callback:()=>a(t.IRange.Axis.Row,!0,!0)}),e.updateCommand(`insertColumnsAfter`,{callback:()=>a(t.IRange.Axis.Column,!0,!0)}),e.updateCommand(`deleteCells`,{callback:()=>o()}),e.updateCommand(`deleteCellsShiftUp`,{callback:()=>o(t.IRange.Axis.Row)}),e.updateCommand(`deleteCellsShiftLeft`,{callback:()=>o(t.IRange.Axis.Column)}),e.updateCommand(`deleteRows`,{callback:()=>o(t.IRange.Axis.Row,!0)}),e.updateCommand(`deleteColumns`,{callback:()=>o(t.IRange.Axis.Column,!0)}),()=>{}}(e,r,i?.editModeHandler,i?.globalClipboard),E=go(e,r,o),D=function(e,t,n){return e.updateCommand(`updateHyperlink`,{tags:[`noTransaction`],callback:()=>{n?.showWindow?.(`hyperlink`,{context:()=>t.getSelectedCell(),onInput:e=>{t.doBatch(()=>{t.getSelectedRange().setHyperlink(e)},{description:(0,a.messageKey)(`op.updateHyperlink`)})}})}}),e.updateCommand(`openHyperlink`,{tags:[`noTransaction`,`noRepeat`],callback:async()=>{let e=t.getSelectedCell().getHyperlink();if(e)try{await e.open()}catch(e){n?.showError?.(e)}}}),e.updateCommand(`updateComments`,{tags:[`noTransaction`],callback:()=>{n?.showWindow?.(`comments`,{context:()=>t.getSelectedCell(),onInput:e=>{t.doBatch(()=>{t.getSelectedRange().setComments(e)},{description:(0,a.messageKey)(`op.updateComment`)})}})}}),()=>{}}(e,r,o),O=function(e,t,n,r){let i=async(e,i,o=(0,a.messageKey)(`op.insertImage`))=>{let c=await Promise.resolve(n?.showBusy?.(o)??null);try{await t.getMovables().addPicture(e,{autoSelect:!0,...i}),c?.(),r?.setMode(null)}catch(e){c?.();let t=e;typeof t!=`string`&&(console.warn(e),t=(0,a.t)(`error.insertImage.unresolved`)),n?.showMessage?.(t,{type:s.NotifierType.Error})}};return e.updateCommand(`insertImageFromFile`,{tags:[`noTransaction`,`noRepeat`],callback:async e=>{let t=null,n=null;if(typeof e==`string`?n=e:t=e?.file?e.file:e??null,!t&&(t=await a.DOMUtils.openFileDialog(n??`image/*`),!t))return;let r=await Promise.resolve(t);await i({source:{file:r}},e?.options)}}),e.updateCommand(`insertImageFromURL`,{tags:[`noTransaction`,`noRepeat`],callback:async e=>{if(!e){let t=await n?.showInput?.({title:(0,a.t)(`dialog.insertImage.title`),description:(0,a.t)(`dialog.insertImage.description`),inputLabel:(0,a.t)(`dialog.insertImage.inputLabel`),initialValue:`https://picsum.photos/360`,propsInput:{style:{minWidth:`440px`}},options:[{id:`Insert`,label:()=>(0,a.t)(`dialog.insert`)}]});if(!t||t.option!==`Insert`)return;e=t.input}e&&await i({source:{fetch:e}})}}),()=>{}}(e,r,o,i?.editModeHandler),k=_o(e,r,o,i?.activateTaskPane,i?.taskPaneArea);return()=>{g(),_(),v(),y(),b(),x(),S(),C(),w(),T(),E(),D(),O(),k()}}var{CommandScopeProvider:yo}=s.Command;Br();var bo={dynamic:(e,t)=>{let n=vo(e,t),r=t.editable&&t.sheet?Tt(e,{editable:t.editable,sheet:t.sheet,flavor:`startEdit`}):void 0;return()=>{n(),r?.()}}},xo=({sheet:e,editable:t,scopeRef:n,elementRef:r,children:a})=>s.Command.useCommandScope()?(0,i.jsx)(So,{sheet:e,editable:t,scopeRef:n,elementRef:r,children:a}):(0,i.jsx)(i.Fragment,{children:a}),So=({sheet:e,editable:n,scopeRef:a,elementRef:o,children:c})=>{let l=(0,s.useNotifier)(),u=Qn(),d=(0,s.useEditMode)(),f=(0,s.useGlobalClipboard)(),p=gr(),m=(0,r.useMemo)(()=>({serializer:{parse:t=>t?e?.getStyles().parseColor(t)??null:null,stringify:e=>e?e.toString():``}}),[e]),[h,g]=(0,s.usePersistenceState)(`sheet.lastFillColor`,e?.getStyles().parseColor(t.IColor.Scheme.Bg2),m),[_,v]=(0,s.usePersistenceState)(`sheet.lastFontColor`,e?.getStyles().parseColor(e?.getStyles().getNormal().getFont().getColor()),m),[y,b]=(0,s.usePersistenceState)(`sheet.lastBorder`,null),x=(0,r.useRef)(h);x.current=h;let S=(0,r.useRef)(_);S.current=_;let C=(0,r.useRef)(y);C.current=y;let w=(0,r.useMemo)(()=>({getLastFillColor:()=>x.current,setLastFillColor:g,getLastFontColor:()=>S.current,setLastFontColor:v,getLastBorder:()=>C.current,setLastBorder:b}),[g,v,b]),T=(0,r.useMemo)(()=>({scopeName:`sheet`,contributor:bo,data:{sheet:e,editable:n,notifier:l,manager:p??void 0,activateTaskPane:(e,t)=>u.activate(e,t),taskPaneArea:u,editModeHandler:d,globalClipboard:f,pickerMemory:w}}),[e,n,l,p,u,d,f,w]);return(0,i.jsx)(yo,{spec:T,scopeRef:a,elementRef:o,children:c})};So.displayName=`SheetCommandProviderInner`;var Co=`_sheetxl-sheet_3nny_5`,wo=`_viewport-overlay_3nny_6`,To=(0,r.memo)((0,r.forwardRef)((e,n)=>{let{sheet:c,className:u,style:d=s.ReactUtils.EmptyCssProperties,ref:f,colorScheme:p,gridColorScheme:m,onSheetContextMenu:g,showColumnHeaders:_,propsColumnHeader:v,showRowHeaders:y,propsRowHeader:b,showScrollbars:x=!0,showCellErrors:S=!0,propsScrollPane:C,viewport:w,onViewportChange:T,layers:E,renderMovable:D,viewportComponent:O,onFirstRender:k,editable:A,onFocus:j,onBlur:M,onShowTooltip:N,onCloseTooltip:F,propsGrid:I,propsCellRender:L,...R}=e;if((0,r.useEffect)(()=>{t.LicenseManager._validate(!0)},[]),!c)throw Error(`ISheet must be provided.`);let[z,B]=(0,r.useReducer)(e=>e+1,0),[,V]=(0,r.useReducer)(e=>e+1,0),H=(0,r.useRef)(null),U=(0,s.useCallbackRef)(N,[N]),W=(0,s.useCallbackRef)(F,[F]),G=(0,r.useRef)(null),K=(0,r.useRef)(null);(0,r.useMemo)(()=>{K.current!==c&&(G.current=c?c.getId():null),K.current=c},[c]);let q=Ba(m)===`dark`,te=Va();ka();let J=(0,r.useId)(),Y=(0,r.useMemo)(()=>(0,s.createThemeScopeClass)(`sheet`,J),[J]),ne=(0,r.useMemo)(()=>(0,o.buildGridThemeCSS)({scope:`.${Y}`}),[Y]),X=(0,r.useMemo)(()=>Pa(`sxl-defaults`,`.${Y}`),[Y]),Z=c.getStyles(),ie=Z.getTheme(),ae=Z.getDefaultFontSize(),oe=(0,r.useMemo)(()=>Ra(ie,ae,`sxl-defaults`,`.${Y}`),[ie,ae,Y]),se=(0,s.useEditMode)(),ce=(0,r.useCallback)(e=>{},[]),[le,ue]=(0,r.useState)(null),Q=(0,r.useRef)(null),de=(0,r.useCallback)(e=>{e&&(ue(e),Q.current=e)},[]),[$,fe]=(0,r.useState)(()=>c?.getView()),pe=($?.getZoomScale()??100)/100,me=_??$?.isShowColumnHeaders(),he=y??$?.isShowRowHeaders(),[ge,_e]=(0,r.useState)({width:0,height:0}),ve=ge.width,ye=ge.height,be=(0,r.useMemo)(()=>{let e=jo,n=Ao,r=c?.getStyles().getNormal().getFont();if(ge.width>0&&ge.height>0){let i=r?.toCSS()?.fontFamily??`Calibri`,a=r?.getSize()??8.25,o=t.IFont.getSharedMeasurer()(``+ge.height,Math.ceil(a*t.IFont.getDeviceScale()),i);e=o.width??e,n=o.lineHeight}return{width:Math.round(e+5),height:Math.round(n+3)}},[ve,ye,c]),xe=he?pe*be.width:1,Se=me?pe*be.height:1,Ce=(c?.getColumnHeaders().getDefaultSize()??be.width)+xe+1,we=(c?.getRowHeaders().getDefaultSize()??be.height)+Se+1,Te=(0,r.useRef)(new Map),Ee=(0,r.useRef)(null),De=(0,r.useMemo)(()=>({getColOffset:e=>c.getColumnHeaders().getOffset(e),getColIndex:e=>c.getColumnHeaders().getIndex(e),getRowOffset:e=>c.getRowHeaders().getOffset(e),getRowIndex:e=>c.getRowHeaders().getIndex(e)}),[c]),[Oe,ke]=(0,r.useState)(!1),Ae=ee(),je=(0,r.useMemo)(()=>re(c,{referenceMode:Ae}),[c.getWorkbook()??c,Ae]),Me=A??je;(0,r.useEffect)(()=>{if(!Me)return;let e=Me.getSession();return Me.subscribe(()=>{let t=e;if(e=Me.getSession(),!t||e||!t.getActiveEditorId()?.startsWith(`inline:`))return;let n=Q.current;n?.contains(document.activeElement)&&n.focus()})},[Me]);let Ne=(0,s.useOptionalBoundSyncExternalStore)(Me,e=>e.getSession())?.getCoords()??null,[Pe,Fe]=(0,r.useState)(),Ie=(0,r.useRef)(null),Le=(0,s.useCallbackRef)(()=>{if(Ie.current?.(),Ie.current=null,!Pe||!c)return;let e=G.current;if(e&&e===c.getId()||c.isDeleted())return;let t=c.getRangeAtBounds({x:Pe.left,y:Pe.top,width:Pe.width,height:Pe.height});Ie.current=t.addListener(()=>{lt.current.clear()})},[c,Pe]),Re=(0,s.useCallbackRef)(e=>{if(Fe(e),Le(),!c||G.current)return;let t=(c.getView().getZoomScale()??100)/100;c.getView().setTopLeft(e?{left:e.left/t,top:e.top/t}:null),T?.(e)},[c,T]),[ze,Be]=(0,r.useState)(()=>c?.getView().getTopLeft()),Ve=(0,r.useMemo)(()=>{let e=c?.getView().getTopLeft();return new s.Viewport({topLeft:{left:(e?.left??0)*pe,top:(e?.top??0)*pe},zoom:pe})},[]),He=w??Ve;(0,r.useEffect)(()=>He.subscribe(()=>{He.isReady()&&He.isSettled()&&Re(He.getMetrics())}),[He]),(0,r.useLayoutEffect)(()=>{He.setZoom(pe)},[He,pe]),(0,r.useLayoutEffect)(()=>{ze?.left!=null&&He.setTarget(ze.left*pe,He.getTarget().top)},[He,ze?.left,pe]),(0,r.useLayoutEffect)(()=>{ze?.top!=null&&He.setTarget(He.getTarget().left,ze.top*pe)},[He,ze?.top,pe]);let Ue=(0,r.useRef)(c?.getId()??null);(0,r.useLayoutEffect)(()=>{let e=c?.getId();if(Ue.current===e)return;Ue.current=e;let t=c?.getView().getTopLeft(),n=(c?.getView().getZoomScale()??100)/100;He.setTarget((t?.left??0)*n,(t?.top??0)*n)},[He,c]);let We=(0,s.useCallbackRef)(e=>{let t=a.CoordUtils.cellToRange(e);if(G.current||c.isDeleted())return t;let n=c.getRange(t,{ignoreHidden:!0}).getMerges();return n.length===0?t:n[0]},[c]),Ge=e=>{let t=e?.coords?.colIndex??0,n=e?.coords?.rowIndex??0;if(!e||t===0&&n===0)return null;let r={};return t>0&&(r[a.AnchorLocation.Left]={index:t,offset:e.topLeft?.left??0}),n>0&&(r[a.AnchorLocation.Top]={index:n,offset:e.topLeft?.top??0}),r},[Ke,qe]=(0,r.useState)(()=>Ge(c.getView().getFreezePanes())),Je=Ot(c),Ye=(0,s.useCallbackRef)(e=>{let t=e?.cell??Me.getAnchor().getCoords();t&&(Me.startEdit(t,{mode:e?.editMode?`edit`:`enter`,dirty:e?.text??void 0,initialSelection:e?.initialSelection??null,autoFocus:!1!==e?.autoFocus})||Je())},[Me]),Xe=(0,s.useCallbackRef)(()=>Pe,[Pe]),[Ze,Qe]=(0,r.useState)($?.getMovableSelection().length>0),$e=Ne!==null||Ze,et=(0,r.useMemo)(()=>{let e=se.getMode();return e?.cursor?e.cursor:null},[null,se]);l(c?.getView(),{onFreezePaneChange:()=>{qe(Ge(c.getView().getFreezePanes()))},onTopLeftChange:()=>{Be(c.getView().getTopLeft())},onZoomScaleChange:()=>{V()},onMovableSelectionChange:()=>{Qe(c.getView().getMovableSelection().length>0)}}),l(c,{onViewChange(){fe(c.getView())},onLayoutChange:()=>{let e=c.getEntireRange();_e({height:e.getRowCount(),width:e.getColumnCount()}),nt()},onStyleChange:()=>{nt()},onMovablesChange:()=>{},onTablesChange:()=>{nt()},onInvalidated:()=>{nt()}}),l(c,{onRequestScrollIntoView:async(e,t)=>{if(!t)return!1;let n={colIndex:t?.coords?.colStart,rowIndex:t?.coords?.rowStart};return await Q.current?.scrollCellCoordsIntoView(n,t?.scroll),!0},onRequestFocus:()=>a.DOMUtils.whenFocus(tt.current),onRequestViewport:async()=>{let e=Xe();return e?{x:e.left,y:e.top,width:e.width,height:e.height}:null}},Oo);let tt=(0,s.useImperativeElement)(n,()=>{let e=e=>{c?.getView()&&c.getView().selectMovables([]),Ee.current=null,Q.current?.focus(e)},t=async(e=null)=>{if(e||=c?.getView().getMovableSelection()[0],!e)return!1;let t=e.getRange().getCoords();if(!t)return!1;let n=Q.current?.getPaneFromCell({colIndex:t.colStart,rowIndex:t.rowStart});if(!n)return!1;let r=n.getAnchor();c?.getView().getMovableSelection().indexOf(e)===-1&&c?.getView().selectMovables([e]);let i=Te.current?.get(r);return i?.current?(await i.current.focusMovable(e),!0):(Ee.current={movable:e,anchor:r},!0)};return{getGridSurface:()=>Q.current,getRowHeaderElement:()=>ft.current,getColumnHeaderElement:()=>mt.current,rowHeaderHeight:()=>Se,colHeaderWidth:()=>xe,startEdit:Ye,submitEdit:()=>{Me.commit()},cancelEdit:()=>{Me.cancel()},isEditing:Ne!==null,focus:n=>{let r=Me.getSession(),i=r?.getCoords().scope;(!r||i&&i!==c.getName())&&(c?.getView().getMovableSelection().length>0?t():e(n))},focusSheet:e,focusMovable:t,contains:e=>Q.current?.contains?.(e)??!1,invalidate:nt,isSheetElement:()=>!0,getSheet:()=>c,onWheelScroll:ot}},[c,Me,Ne]),nt=(0,r.useCallback)(()=>{G.current||(lt.current.clear(),Q.current?.invalidate(),B?.())},[]),rt=(0,r.useMemo)(()=>O?(0,i.jsx)(`div`,{className:P(`viewport-overlay`,wo),style:{width:`100%`,height:`100%`,boxSizing:`border-box`,position:`absolute`},children:O}):(0,i.jsx)(i.Fragment,{}),[O]),it=null;me&&he&&(it=(0,i.jsx)(Ga,{width:xe,height:Se,sheet:c,colorScheme:p,onMouseDown:e=>{e.nativeEvent.which===s.MouseButtonCodes.Right?g?.({originalEvent:e,clientX:e.clientX,clientY:e.clientY,rowIndex:-1,colIndex:-1}):Q.current?.focus()}}));let at=(0,r.useRef)(null),ot=(0,s.useCallbackRef)(e=>{if(e.shiftKey||!e.ctrlKey&&!e.metaKey)return;let{deltaY:t}=e,n=t>0?`sheetZoomOut`:t<0?`sheetZoomIn`:null;if(n){let e=at.current;e?.resolve(n,e)?.execute()}return t===0},[]);(0,r.useEffect)(()=>{fe(c.getView()),qe(Ge(c.getView().getFreezePanes())),lt.current.clear(),B()},[le,c?.getView()]);let st=(0,r.useCallback)((e,t)=>c.getRowHeaders().hiddenHeadersAt(e,t),[c]),ct=(0,r.useCallback)((e,t)=>c.getColumnHeaders().hiddenHeadersAt(e,t),[c]),lt=(0,r.useRef)(new Map),ut=(0,s.useCallbackRef)((e,n)=>{if(G.current)return[];let r=lt.current,i=n??e.getVisibleRange();if(!i)return[];let a=`${i.rowStart}:${i.colStart}:${i.rowEnd}:${i.colEnd}`,o=r.get(a);if(o)return o;let s=[];if(c.getRange(i).forEach((e,n)=>{let r=n.getCoords(),i=n.getCell();if(!(e=>{if(e.isEmpty())return!1;let n=e.getSpans();if(n.width>1||n.height>1||e.getStyle().hasVisibleStyling()||$.isShowFormulas()&&e.getFormula()!==null)return!0;let r=e.getValue();return r!==null&&!(!$.isShowZeros()&&r===0&&e.getType()===t.ScalarType.Number)})(i))return;let a;$.isShowFormulas()||(a=i.getExtrusions()??void 0),s.push({cell:r,value:i,range:a})},ko),r.set(a,s),r.size>12){let e=r.keys().next().value;e!==void 0&&r.delete(e)}return s},[c,$.isShowZeros(),$.isShowFormulas()]),dt=(0,r.useMemo)(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px var(--sxl-color-base-100)`},propsPath:{stroke:`var(--sxl-color-base-content)`}}),[]),ft=(0,r.useRef)(null),pt=(0,r.useMemo)(()=>(0,i.jsx)(Wa,{ref:ft,tabIndex:-1,freezeStart:Ke?.[a.AnchorLocation.Top],oppositeSize:xe,sheetHeader:c.getRowHeaders(),colorScheme:p,propsCellRender:L,verticalPadding:Math.max(0,Math.floor(c.getStyles().getNormal().getFont().getSize()/10)),viewport:He,onSheetContextMenu:g,onFocus:()=>{Q.current?.focus()},style:{position:`relative`,flex:`0`,gridColumn:`1 / 2`,gridRow:`2 / 3`,zIndex:1}}),[xe,Se,c,L,He,Ke?.[a.AnchorLocation.Top],g,b,le]),mt=(0,r.useRef)(null),ht=(0,r.useMemo)(()=>(0,i.jsx)(Wa,{ref:mt,tabIndex:-1,freezeStart:Ke?.[a.AnchorLocation.Left],oppositeSize:Se,sheetHeader:c.getColumnHeaders(),colorScheme:p,propsCellRender:L,viewport:He,onSheetContextMenu:g,onFocus:()=>{Q.current?.focus()},style:{position:`relative`,display:`flex`,gridColumn:`2 / 3`,gridRow:`1 / 2`,zIndex:1}}),[Se,c,L,He,Ke?.[a.AnchorLocation.Left],g,v,le]),gt=(0,r.useMemo)(()=>{let e=c.getId();return[(0,i.jsx)(la,{sheet:c,onSheetContextMenu:g},`context-menu-[${e}]`),(0,i.jsx)(Fn,{sheet:c},`background-[${e}]`),(0,i.jsx)(Mn,{sheet:c,sheetView:$},`gridlines-[${e}]`),(0,i.jsx)(nn,{getVisibleCells:ut,sheet:c},`fills-[${e}]`),(0,i.jsx)(Ni,{sheet:c},`conditional-bars-[${e}]`),(0,i.jsx)(kn,{sheet:c,sheetView:$,propsCellRender:L,editable:Me},`cells-[${e}]`),(0,i.jsx)(On,{getVisibleCells:ut,sheet:c},`cell-borders-[${e}]`),(0,i.jsx)(o.Layer,{className:`grid-border`,children:(0,i.jsx)(o.VirtualDiv,{fill:!0,className:`grid-border`,...(0,s.themeSurfaceProps)(`app`,te),style:No})},`grid-border-[${e}]`),(0,i.jsx)(Ri,{sheet:c},`conditional-icons-[${e}]`),(0,i.jsx)(oi,{sheet:c},`spill-[${e}]`),(0,i.jsx)(Pt,{sheet:c,onShowTooltip:U,onCloseTooltip:W},`selection-[${e}]`),(0,i.jsx)(pr,{sheet:c},`table-[${e}]`),(0,i.jsx)(ai,{sheet:c},`table-commands-[${e}]`),(0,i.jsx)(Ut,{sheet:c,sheetView:$,className:`references`},`ref-picker-[${e}]`),(0,i.jsx)(Ca,{sheet:c},`clipboard-[${e}]`),(0,i.jsx)(An,{sheet:c,onColumnButtonMouseDown:L?.onColumnButtonMouseDown,propsColumnButton:L?.propsColumnButton,renderColumnButton:L?.renderColumnButton},`column-buttons-[${e}]`),(0,i.jsx)(Ui,{sheet:c},`validation-[${e}]`),(0,i.jsx)(Jn,{sheet:c,renderMovable:D},`movable-[${e}]`),(0,i.jsx)(jt,{sheet:c,editable:Me,darkMode:q,onEditRejected:Je},`editor-[${e}]`),S?(0,i.jsx)(an,{className:`errors`,sheet:c},`cell-errors-[${e}]`):null,(0,i.jsx)(aa,{sheet:c},`resize-indicator-[${e}]`),E]},[c,Z,D,g,E,Me,S,$,q,te,ut,L,Je]),_t=(0,r.useCallback)((e,t)=>(0,i.jsx)(Fr,{pane:e,children:t}),[]),[vt,yt]=(0,r.useState)(!1),bt=(0,r.useMemo)(()=>{let e=c.getStyles().getNormal(),t=e.getFont(),n=e.getFill();return(0,i.jsx)(o.GridSurface,{className:`sheetxl-sheet-primary`,wrapPane:_t,style:{...Do,cursor:et??null??`cell`,...n.toCSS(`adaptive`),...t.toCSS(`adaptive`,pe),minWidth:Ce,minHeight:we},ref:de,...I,onFirstRender:e=>{yt(!0),I?.onFirstRender?.(e)},freezeLeft:Ke?.[a.AnchorLocation.Left],propsFreezeLeft:dt,freezeTop:Ke?.[a.AnchorLocation.Top],propsFreezeTop:dt,columnCount:ge.width,rowCount:ge.height,metrics:De,getRangeFromCell:We,hiddenRowsAt:st,hiddenColumnsAt:ct,viewport:He,children:gt},`grid-main`)},[ve,ye,et,null,Ce,we,z,gt]);(0,r.useEffect)(()=>{G.current||(lt.current.clear(),B())},[Ke,pe,ze?.left,ze?.top,I,Ce,we,et,gt,null]);let xt=Eo;x||(xt={...xt,...d});let St=q?`dark`:`light`,Ct=(0,s.useCallbackRef)(e=>{let{style:t,...n}=e;return(0,i.jsx)(Ua,{...n,style:{...t,paddingLeft:`4px`,paddingRight:`4px`},sheet:c})},[c]),wt=(0,i.jsxs)(`div`,{...(0,s.themeSurfaceProps)(`grid`,St),style:{gridColumn:`2 / 3`,gridRow:`2 / 3`,overflow:`hidden`,position:`relative`},ref:H,children:[bt,rt,(0,i.jsx)(fa,{style:{position:`absolute`,right:24,bottom:4},colorLicensee:`var(--sxl-color-primary)`,colorCredits:`var(--sxl-color-base-content)`})]}),Tt=(0,i.jsxs)(`div`,{className:Y,style:xt,onTouchStart:()=>{kt()},onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||(ke(!0),j?.(e))},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(ke(!1),M?.(e))},ref:cn([tt,ce]),...R,children:[(0,i.jsx)(`style`,{children:ne}),(0,i.jsx)(`style`,{children:X}),(0,i.jsx)(`style`,{children:oe}),(0,i.jsx)(`div`,{className:P(u,`sheetxl-sheet`,Co),ref:f,...(0,s.themeSurfaceProps)(`grid`,St),style:{position:`absolute`,width:`100%`,height:`100%`,display:`grid`,gridTemplateColumns:`auto 1fr`,gridTemplateRows:`auto 1fr`,flex:`1 1 100%`},children:(0,i.jsxs)(o.SurfaceStateProvider,{children:[it,ht,pt,wt]})})]});x&&(Tt=(0,i.jsx)(s.ScrollPane,{style:{flex:`1 1 100%`,width:`100%`,height:`100%`,overflow:`hidden`,background:`var(--sxl-color-base-100)`,minHeight:2*be.height,minWidth:2*be.width,...d},viewport:He,disableTouch:$e,onWheelScroll:ot,renderScrollbarHorizontal:Ct,renderScrollbarVertical:Ct,...C,children:Tt})),(0,r.useEffect)(()=>{G.current=null,lt.current.clear(),Le(),B?.(),Oe&&tt.current?.focus()},[c]);let[Et,Dt]=(0,r.useState)(!1),kt=(0,s.useCallbackRef)(()=>{Et||Dt(!0)},[Et]);return(0,r.useEffect)(()=>{if(vt)return typeof k==`function`&&k(),s.ReactUtils.detectIt().primaryInput===`touch`&&kt(),()=>{}},[k,vt,Et]),(0,i.jsx)(xo,{sheet:c,editable:A,scopeRef:at,elementRef:tt,children:(0,i.jsx)(s.FloatProvider,{themeScopeClass:Y,themeSurface:`app`,themeMode:p,children:(0,i.jsx)(h,{sheet:c,children:Tt})})})}));To.displayName=`SheetElement`;var Eo=Object.freeze({flex:`1 1 100%`,width:`100%`,height:`100%`,minWidth:0,minHeight:0,display:`flex`,alignContent:`stretch`,position:`relative`}),Do={position:`absolute`,top:0,left:0,bottom:0,right:0},Oo={ignoreModelChange:!0},ko={ignoreHidden:!0,includeMergeOverflow:!0,reuseContext:!0},Ao=20,jo=40,Mo=`solid var(--sxl-color-base-border, light-dark(rgba(0, 0, 0, 0.26), rgba(255, 255, 255, 0.3))) 1px`,No={pointerEvents:`none`,borderTop:Mo,borderLeft:Mo,borderRight:Mo,borderBottom:`none`},Po=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{children:n,disabled:a,style:c,shape:l,isDragging:u,onHide:d,onShow:f,...p}=e,m=(0,r.useMemo)(()=>l?.toJSON()??null,[l]),h=m?.type===`grpSp`,g=h||m?.type===`cxnSp`?void 0:l.getName(),_=(0,o.useGridPane)(),v=(0,s.useImperativeElement)(t,()=>({isShapeEditor:()=>!0}),[]),[y,{height:b,width:x}]=vn();if(!l.isDeleted()&&!h)return(0,i.jsx)(`div`,{className:`shape-editor`,...p,ref:cn([v,y]),style:{width:`100%`,height:`100%`,border:`var(--sxl-color-neutral, grey) solid 1px`,backgroundColor:`var(--sxl-color-base-100, white)`,backgroundImage:`var(--sxl-image-background)`,alignItems:`center`,justifyContent:`center`,zoom:_.getZoom(),display:`flex`,position:`relative`,filter:a?`blur(1px)`:void 0,boxShadow:u?`1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))`:void 0,overflow:`hidden`,wordBreak:`break-word`,...c},children:g})}));Po.displayName=`ShapeEditor`;var Fo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 619 1941 h -299 v -1322 h 299 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1429 1941 h -298 v -1066 h 298 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z`})]}),Io=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 832 1387 h -469 v -640 h 469 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1600 1131 h -469 v -811 h 469 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z`})]}),Lo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 832 1515 h -469 v -1195 h 469 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1600 875 h -469 v -555 h 469 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z`})]}),Ro=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z`})]}),zo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z`})]}),Bo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1877 299 h -1770 v -43 h 1770 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z`})]}),Vo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z`})]}),Ho=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z`})]}),Uo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z`})]}),Wo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z`})]}),Go=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z`})]}),Ko=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1813 277 v 299 h -1706 v -299 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 917 1088 v 299 h -810 v -299 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 896 1109 h -795 v -42 h 838 v 322 h -43 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z`})]}),qo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 704 832 v -469 h 640 v 469 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 917 1600 v -469 h 811 v 469 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z`})]}),Jo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 533 832 v -469 h 1195 v 469 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1173 1600 v -469 h 555 v 469 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z`})]}),Yo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z`})]}),Xo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z`})]}),Zo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1941 1941 h -1834 v -1834 h 1834 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z`})]}),Qo=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z`})]}),$o=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z`})]}),es=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z`})]}),ts=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z`})]}),ns=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z`}),(0,i.jsx)(`path`,{className:`styled info`,d:`M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z`})]}),rs=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 619 1941 h -299 v -1322 h 299 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1429 1941 h -298 v -1066 h 298 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z`})]}),is=e=>(0,i.jsxs)(`svg`,{viewBox:`0,0,2048,2048`,...e,children:[(0,i.jsx)(`path`,{className:`styled high_contrast`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z`}),(0,i.jsx)(`path`,{className:`styled background`,d:`M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z`}),(0,i.jsx)(`path`,{className:`styled info_tint`,d:`M 619 1941 h -299 v -1322 h 299 z`}),(0,i.jsx)(`path`,{className:`styled info_shade`,d:`M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z`}),(0,i.jsx)(`path`,{className:`styled accent_tint`,d:`M 1429 1941 h -298 v -1066 h 298 z`}),(0,i.jsx)(`path`,{className:`styled accent_shade`,d:`M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z`}),(0,i.jsx)(`path`,{className:`styled current_color`,d:`M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z`})]}),as={themed:`_themed_f2asj_9`,small:`_small_f2asj_36`,medium:`_medium_f2asj_37`,large:`_large_f2asj_38`},os=(0,r.memo)(e=>{let{size:t=`medium`,className:n,children:r,...a}=e;return(0,i.jsx)(`span`,{className:P(`icon`,as.themed,as[t],n),...a,children:r})});os.displayName=`ThemedChartIcon`;var ss={types:{0:{type:`column`}}},cs={types:{0:{type:`column`,grouping:`stacked`}}},ls={types:{0:{type:`column`,grouping:`percentStacked`}}},us={types:{0:{type:`line`}}},ds={types:{0:{type:`line`,grouping:`stacked`}}},fs={types:{0:{type:`line`,grouping:`percentStacked`}}},ps={types:{0:{type:`line`,scatterStyle:`lineMarker`}}},ms={types:{0:{type:`line`,scatterStyle:`lineMarker`,grouping:`stacked`}}},hs={types:{0:{type:`line`,scatterStyle:`lineMarker`,grouping:`percentStacked`}}},gs={types:{0:{type:`pie`}}},_s={types:{0:{type:`pie`,holeSize:50}}},vs={types:{0:{type:`bar`}}},ys={types:{0:{type:`bar`,grouping:`stacked`}}},bs={types:{0:{type:`bar`,grouping:`percentStacked`}}},xs={types:{0:{type:`area`}}},Ss={types:{0:{type:`area`,grouping:`stacked`}}},Cs={types:{0:{type:`area`,grouping:`percentStacked`}}},ws={types:{0:{type:`scatter`,scatterStyle:`marker`}}},Ts={types:{0:{type:`scatter`,scatterStyle:`smoothMarker`}}},Es={types:{0:{type:`scatter`,scatterStyle:`smooth`}}},Ds={types:{0:{type:`scatter`,scatterStyle:`lineMarker`}}},Os={types:{0:{type:`scatter`,scatterStyle:`line`}}},ks={Column:`column`,ColumnStacked:`columnStacked`,ColumnStackedPercent:`columnStackedPercent`,Line:`line`,LineStacked:`lineStacked`,LineStackedPercent:`lineStackedPercent`,LineMarkers:`lineMarkers`,LineStackedMarkers:`lineStackedMarkers`,LineStackedPercentMarkers:`lineStackedPercentMarkers`,Pie:`pie`,PieDoughnut:`pieDoughnut`,Bar:`bar`,BarStacked:`barStacked`,BarStackedPercent:`barStackedPercent`,Area:`area`,AreaStacked:`areaStacked`,AreaStackedPercent:`areaStackedPercent`,ScatterMarkers:`scatterMarkers`,ScatterLinesMarkersSmooth:`scatterLinesMarkersSmooth`,ScatterLinesMarkers:`scatterLinesMarkers`,ScatterLinesSmooth:`scatterLinesSmooth`,ScatterLines:`scatterLines`,Bubble:`bubble`,Bubble3D:`bubble3D`},As=new Map;As.set(ks.Column,{Icon:Fo,description:(0,a.messageKey)(`chart.type.column`),template:ss}),As.set(ks.ColumnStacked,{Icon:Io,description:(0,a.messageKey)(`chart.type.columnStacked`),template:cs}),As.set(ks.ColumnStackedPercent,{Icon:Lo,description:(0,a.messageKey)(`chart.type.columnStackedPercent`),template:ls}),As.set(ks.Line,{Icon:Ro,description:(0,a.messageKey)(`chart.type.line`),template:us}),As.set(ks.LineStacked,{Icon:zo,description:(0,a.messageKey)(`chart.type.lineStacked`),template:ds}),As.set(ks.LineStackedPercent,{Icon:Bo,description:(0,a.messageKey)(`chart.type.lineStackedPercent`),template:fs}),As.set(ks.LineMarkers,{Icon:Vo,description:(0,a.messageKey)(`chart.type.lineMarkers`),template:ps}),As.set(ks.LineStackedMarkers,{Icon:Ho,description:(0,a.messageKey)(`chart.type.lineStackedMarkers`),template:ms}),As.set(ks.LineStackedPercentMarkers,{Icon:Uo,description:(0,a.messageKey)(`chart.type.lineStackedPercentMarkers`),template:hs}),As.set(ks.Pie,{Icon:Wo,description:(0,a.messageKey)(`chart.type.pie`),template:gs}),As.set(ks.PieDoughnut,{Icon:Go,description:(0,a.messageKey)(`chart.type.pieDoughnut`),template:_s}),As.set(ks.Bar,{Icon:Ko,description:(0,a.messageKey)(`chart.type.bar`),template:vs}),As.set(ks.BarStacked,{Icon:qo,description:(0,a.messageKey)(`chart.type.barStacked`),template:ys}),As.set(ks.BarStackedPercent,{Icon:Jo,description:(0,a.messageKey)(`chart.type.barStackedPercent`),template:bs}),As.set(ks.Area,{Icon:Yo,description:(0,a.messageKey)(`chart.type.area`),template:xs}),As.set(ks.AreaStacked,{Icon:Xo,description:(0,a.messageKey)(`chart.type.areaStacked`),template:Ss}),As.set(ks.AreaStackedPercent,{Icon:Zo,description:(0,a.messageKey)(`chart.type.areaStackedPercent`),template:Cs}),As.set(ks.ScatterMarkers,{Icon:Qo,description:(0,a.messageKey)(`chart.type.scatterMarkers`),template:ws}),As.set(ks.ScatterLinesMarkersSmooth,{Icon:$o,description:(0,a.messageKey)(`chart.type.scatterLinesMarkersSmooth`),template:Ts}),As.set(ks.ScatterLinesMarkers,{Icon:ts,description:(0,a.messageKey)(`chart.type.scatterLinesMarkers`),template:Ds}),As.set(ks.ScatterLinesSmooth,{Icon:es,description:(0,a.messageKey)(`chart.type.scatterLinesSmooth`),template:Es}),As.set(ks.ScatterLines,{Icon:ns,description:(0,a.messageKey)(`chart.type.scatterLines`),template:Os}),As.set(ks.Bubble,{Icon:rs,description:(0,a.messageKey)(`chart.type.bubble`),template:null}),As.set(ks.Bubble3D,{Icon:is,description:(0,a.messageKey)(`chart.type.bubble3D`),template:null});var js=e=>As.get(e),Ms=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{children:n,disabled:c,chart:l,isDragging:u,onHide:d,onShow:f,...p}=e;(0,r.useEffect)(()=>{},[l]);let m=(0,o.useGridPane)(),h=(0,s.useImperativeElement)(t,()=>({isChartEditor:()=>!0}),[]),[g,{height:_,width:v}]=vn();if(l.isDeleted())return;let y=js(l.getChartType());y||=js(ks.Column);let b=y.Icon;return(0,i.jsx)(`div`,{...p,ref:cn([h,g]),children:(0,i.jsxs)(`div`,{className:`chart-editor`,style:{width:`100%`,height:`100%`,paddingTop:`20px`,paddingBottom:`20px`,backgroundColor:`var(--sxl-color-base-100, white)`,backgroundImage:`var(--sxl-image-background)`,alignItems:`center`,justifyContent:`center`,zoom:m.getZoom(),display:`flex`,flexDirection:`column`,rowGap:`8px`,position:`relative`,border:`var(--sxl-color-neutral, grey) solid 1px`,filter:c?`blur(1px)`:void 0,boxShadow:u?`1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))`:void 0},children:[l.getChartTitle(),(0,i.jsx)(b,{style:{maxWidth:`260px`,fill:`grey`,opacity:.4}}),(0,i.jsx)(`div`,{style:{textAlign:`center`},children:a.CommonUtils.camelToPrettyCase(l.getChartType())})]})})}));Ms.displayName=`ChartEditor`;var Ns=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{children:n,disabled:a,slicer:c,isDragging:l,onHide:u,onShow:d,...f}=e;(0,r.useEffect)(()=>{},[c]);let p=(0,o.useGridPane)(),m=(0,s.useImperativeElement)(t,()=>({isSlicerEditor:()=>!0}),[]),[h,{height:g,width:_}]=vn();if(!c.isDeleted())return(0,i.jsx)(`div`,{...f,ref:cn([m,h]),children:(0,i.jsx)(`div`,{className:`slicer-editor`,style:{width:`100%`,height:`100%`,backgroundColor:`var(--sxl-color-base-100, white)`,backgroundImage:`var(--sxl-image-background)`,alignItems:`center`,justifyContent:`center`,zoom:p.getZoom(),display:`flex`,position:`relative`,border:`var(--sxl-color-neutral, grey) solid 1px`,filter:a?`blur(1px)`:void 0,boxShadow:l?`1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))`:void 0},children:(0,i.jsx)(`div`,{style:{textAlign:`center`},children:c.getDescription()})})})}));Ns.displayName=`SlicerEditor`;var Ps={placement:`bottom-start`,followAnchor:!0},Fs={x:0,y:0,top:0,left:0,bottom:0,right:0,width:0,height:0,toJSON:()=>({})},Is=e=>{let{api:n,grammar:a,disabled:l}=e,u=a===`formula`,d=y(),f=e.workbook===void 0?d:e.workbook,p=te().getMode(),m=!!p?.activeInput&&!n.engaged,[h,g]=(0,r.useState)(-1),[_,v]=(0,r.useState)(null),[b,x]=(0,r.useState)(null),S=(0,r.useMemo)(()=>ft(u?n.tokens:null),[u,n.tokens]),[C,T]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=n.tokens,t=u&&n.engaged&&e&&h>=0?pt(e,S.matchOf,h,n.tokenBase):null;T(e=>mt(e,t)?e:t)},[u,n.engaged,n.tokens,n.tokenBase,h,S]);let E=(0,r.useMemo)(()=>ht(u?_:null,C,S),[u,_,C,S]),O=h>=0?Math.min(h,n.text.length):n.text.length,k=u&&n.engaged&&n.text.length>0&&w(n.text,O),A=k&&O>=n.text.length,j=k&&!A?O:-1,M=(0,r.useMemo)(()=>{if(u){let e=n.tokens;if(!e)return null;let t=n.tokenBase,r=e.map(e=>{let n=t;return t+=(e.text??``).length,n}),a=e.map((e,t)=>{let n=S.unmatched.has(t),a=E.has(t),o=S.depthOf.get(t),s=n||o===void 0||e.isReference?void 0:st(o),c=n?ut:s??D(e),l;(c||a||n)&&(l={},c&&(l.color=c),n&&(l.fontWeight=`bold`),a&&(l.color=`transparent`));let u=e.text??``,d=j>=r[t]&&j<r[t]+u.length;return(0,i.jsxs)(`span`,{"data-si":t,style:l,children:[a&&(0,i.jsx)(`span`,{"aria-hidden":!0,style:ct,children:(0,i.jsx)(`span`,{style:lt(c??`inherit`),children:e.text})}),d?(0,i.jsxs)(i.Fragment,{children:[u.slice(0,j-r[t]),(0,i.jsx)(et,{}),u.slice(j-r[t])]}):u]},`t-${t}`)}),o=n.tokenBase>0?(0,i.jsx)(`span`,{children:n.text.slice(0,n.tokenBase)},`eq`):null,s=A?(0,i.jsx)(et,{},`expected`):null;if(!_)return[o,...a,s].filter(Boolean);let{lo:c,hi:l,outline:u}=_,d=u?it:rt;return[o,...a.slice(0,c),(0,i.jsx)(`span`,{className:`formula-eval-run`,style:d,children:a.slice(c,l+1)},`eval-run`),...a.slice(l+1),s].filter(Boolean)}if(n.segments.length===0)return null;let e=[];return n.segments.forEach((t,n)=>{n>0&&e.push((0,i.jsx)(`span`,{children:`,`},`sep-${n}`));let r=_&&_.lo===n;e.push((0,i.jsx)(`span`,{"data-si":n,style:{...t.valid?{color:o.PICKER_COLORS[n%o.PICKER_COLORS.length]}:null,...r?_.outline?it:rt:null},children:t.text},`seg-${n}`))}),e},[u,n.tokens,n.tokenBase,n.text,n.segments,S,E,_,A,j]),N=!l&&!m&&!!M,P=(0,r.useRef)(null),F=(0,r.useRef)(null),I=(0,r.useRef)(null),[L,R]=(0,r.useState)(null);(0,r.useLayoutEffect)(()=>{if(!N)return void R(null);let e=F.current,t=P.current;if(!e||!t)return;let n=()=>{let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.getComputedStyle(e);R({position:`absolute`,left:n.left-r.left,top:n.top-r.top,width:n.width,height:n.height,boxSizing:`border-box`,paddingLeft:i.paddingLeft,paddingRight:i.paddingRight,paddingTop:i.paddingTop,paddingBottom:i.paddingBottom,font:i.font,letterSpacing:i.letterSpacing,display:`flex`,alignItems:`center`,whiteSpace:`pre`,overflow:`hidden`,pointerEvents:`none`,textAlign:`left`});let a=I.current;a&&(a.scrollLeft=e.scrollLeft)};if(n(),typeof ResizeObserver>`u`)return;let r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[N,n.text]);let z=Ze({text:n.text,getTokens:()=>u?n.tokens:null,active:u&&n.engaged,getCaret:()=>F.current?.selectionStart??n.text.length,getCalculation:()=>{try{return f?.getSelectedSheet().getCalculation()??null}catch{return null}},getNames:()=>{try{return f?.getSelectedSheet().getNames()??null}catch{return null}},getLocale:()=>f?.getLocale()??null,applyText:(e,t)=>{n.replaceText(e,t)},hoveredTokenIndex:b});(0,r.useEffect)(()=>{z.update()},[z.update,n.text,h,n.engaged]);let B=(0,s.useFloatStack)({label:`formula-field-hint`,anchor:(0,r.useMemo)(()=>({getBoundingClientRect:()=>F.current?.getBoundingClientRect()??Fs}),[]),autoFocus:!1,disableClickAway:r.default.useCallback(e=>!!P.current?.contains(e),[]),propsPopper:Ps,createPopupPanel:z.renderPanel}),V=z.active&&!p?.dragging,H=B.reference;(0,r.useEffect)(()=>{V?H.open(0):H.close(0)},[V,H]);let[U,W]=(0,r.useState)(null),G=(0,r.useRef)(null),K=(0,r.useRef)(!1),q=()=>{G.current=null,K.current=!1,W(null),v(null),x(null)},ee=()=>{K.current||q()},J=ie(()=>q(),()=>ne()),Y=t=>{if(!f)return!1;try{return f.getSelectedSheet().getCalculation().createFormula(`=`+t,e.home).isValid()}catch{return!1}},ne=()=>{let t=F.current,r=I.current,i=()=>{K.current&&q()};if(!t||!r||!N)return void i();if(J.isDragging())return;let a=t.selectionStart??0,o=t.selectionEnd??0;if(a===o)return void i();let s=null;if(u){let t=f?se(n.tokens,n.tokenBase,n.text,a,o,Y):null;t&&(s={lo:t.lo,hi:t.hi,key:`sel:f:${t.lo}:${t.hi}:${t.fragment??t.evalIndex}`,evaluate:async()=>{let r=f.getSelectedSheet().getCalculation();return fe(t.fragment===null?await r.createFormula(n.text,e.home).evaluate({evalIndex:t.evalIndex}):await r.createFormula(`=`+t.fragment,e.home).evaluate())}})}else{let e=0,t=-1;for(let r=0;r<n.segments.length;r++){r>0&&(e+=1);let i=e;if(e+=n.segments[r].text.length,i<o&&e>a){if(t>=0){t=-1;break}t=r}}if(t>=0&&n.segments[t].valid){let e=t;s={lo:e,hi:e,key:`sel:s:${e}:${n.segments[e].text}`,evaluate:()=>n.evaluateSegment(e)}}}if(!s)return void i();if(s.key===G.current)return;G.current=s.key,K.current=!0,W(null),x(null),v({lo:s.lo,hi:s.hi,outline:!0});let c=r.querySelector(`[data-si="${s.lo}"]`)?.getBoundingClientRect(),l=r.querySelector(`[data-si="${s.hi}"]`)?.getBoundingClientRect();if(!c)return void q();let d=l&&Math.abs(l.top-c.top)<1?{left:(c.left+l.right)/2,top:c.top-6}:{left:(c.left+c.right)/2,top:c.top-6},p=s.key;s.evaluate().then(e=>{G.current===p&&e!=null&&W({...d,text:e})}).catch(()=>{})};(0,r.useEffect)(()=>{n.engaged||q()},[n.engaged]);let X=r=>{if(r.which!==s.KeyCodes.F9||r.shiftKey||r.ctrlKey||r.altKey||r.metaKey)return!1;let i=F.current;if(!u||!i||!f||l||!n.tokens?.length)return!1;let a=i.selectionStart??0,o=i.selectionEnd??0,c;if(a!==o)c=se(n.tokens,n.tokenBase,n.text,a,o,Y);else{let e=ce(n.tokens);c=e?{...e,...le(n.tokens,n.tokenBase,e.lo,e.hi),fragment:null}:null}if(!c)return!1;r.preventDefault(),r.stopPropagation();let d=n.text,p=f.getSelectedSheet().getCalculation(),m=ue((0,t.getLocaleProfile)(f.getLocale()??`en`).decimal),h=(0,t.getLanguagePack)(),g={t:h?.booleans?.true??`TRUE`,f:h?.booleans?.false??`FALSE`};return(async()=>{let t=null,n=``;try{if(t=de(c.fragment===null?await p.createFormula(d,e.home).evaluate({evalIndex:c.evalIndex}):await p.createFormula(`=`+c.fragment,e.home).evaluate(),m,g),t===null||(n=d.slice(0,c.start)+t+d.slice(c.end),!p.createFormula(n,e.home).isValid()))return}catch{return}let r=F.current;if(!r||r.value!==d)return;s.ReactUtils.replaceRangeText(r,c.start,c.end,t);let i=c.start,a=c.start+t.length;requestAnimationFrame(()=>{F.current?.value===n&&F.current.setSelectionRange(i,a)})})(),!0};return(0,r.useEffect)(()=>{q()},[n.text]),{containerRef:P,inputElRef:F,overlayActive:N,inputHandlers:{onScroll:e=>{let t=I.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft),q(),ne()},onMouseMove:t=>{let r=I.current;if(!r)return;if(J.blocksHover(t)||ae(F.current))return void ee();let i=t.clientX,a=t.clientY,o=r.querySelectorAll(`[data-si]`),s=-1,c=null;for(let e=0;e<o.length;e++){let t=o[e].getBoundingClientRect();if(i>=t.left&&i<=t.right&&a>=t.top&&a<=t.bottom){s=Number(o[e].getAttribute(`data-si`)),c=t;break}}if(s<0||!c)return void q();if(u){let t=n.tokens;if(!t||!f)return void q();let i=oe(t,s);if(!i)return void q();let a=`f:${i.evalIndex}:${i.lo}:${i.hi}`;if(a===G.current)return;G.current=a,W(null),v({lo:i.lo,hi:i.hi}),x(s);let o=r.querySelector(`[data-si="${i.lo}"]`)?.getBoundingClientRect(),l=r.querySelector(`[data-si="${i.hi}"]`)?.getBoundingClientRect(),u=o&&l&&Math.abs(l.top-o.top)<1?{left:(o.left+l.right)/2,top:o.top-6}:{left:(c.left+c.right)/2,top:c.top-6};try{let t=f.getSelectedSheet().getCalculation().createFormula(n.text,e.home);Promise.resolve(t.evaluate({evalIndex:i.evalIndex})).then(e=>{if(G.current!==a)return;let t=fe(e);t!=null&&W({...u,text:t})}).catch(()=>{})}catch{}return}if(!n.segments[s]?.valid)return void q();let l=`s:${s}:${n.segments[s].text}`;if(l===G.current)return;G.current=l,W(null),v({lo:s,hi:s});let d={left:(c.left+c.right)/2,top:c.top-6};n.evaluateSegment(s).then(e=>{G.current===l&&e!=null&&W({...d,text:e})})},onMouseLeave:ee,onSelect:e=>{g(F.current?.selectionStart??-1),ne()},onPointerDown:e=>{J.begin(e),V&&!B.isOpen&&H.open(0)}},inputExpected:k,handleKeyDown:e=>!!z.handleKeyDown(e)||(e.which===s.KeyCodes.Escape&&B.isOpen?(e.preventDefault(),e.stopPropagation(),H.close(0),!0):!!X(e)),overlayElement:N&&L?(0,i.jsx)(`div`,{ref:I,"aria-hidden":!0,style:L,children:(0,i.jsx)(`span`,{style:{whiteSpace:`pre`},children:M})}):null,tipElement:U?(0,c.createPortal)((0,i.jsx)(`div`,{className:`sxl-formula-eval-tip`,style:{...Z,left:U.left,top:U.top},children:U.text}),document.body):null,hintElement:B.component}},Ls=e=>{e.button===0&&e.preventDefault()},Rs=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{grammar:n=`formula`,value:a,onChangeInput:o,onChangeText:c,onDone:l,changeOn:u,workbook:d,apiRef:f,hideAdornment:p,hideError:m,home:h,equals:g,pickAs:_,allowMulti:v,allowCrossSheet:y,disabled:b,className:x,style:S,onKeyDown:C,onFocus:w,onBlur:T,placeholder:E,...D}=e,O=(0,s.useTranslator)(),k=we({value:a,onChange:o,onChangeText:c,onDone:l,changeOn:u,workbook:d,home:h,equals:g,pickAs:_,allowMulti:v,allowCrossSheet:y,disabled:b},n);(0,r.useImperativeHandle)(f,()=>k,[k]);let A=Is({api:k,grammar:n,disabled:b,workbook:d,home:h}),j=!!k.error&&!A.inputExpected,M=!!l,N={display:`inline-flex`,alignItems:`center`,justifyContent:`center`,border:`none`,background:`none`,padding:`0 2px`,margin:0,cursor:`pointer`,color:`inherit`,opacity:.8},F=p?null:(0,i.jsx)(`span`,{className:`sxl-input-adornment`,onMouseDown:Ls,style:{display:`inline-flex`,alignItems:`center`,flex:`0 0 auto`},children:k.engaged&&M?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{type:`button`,"aria-label":`commit-reference`,title:O(`referenceInput.commit`),style:N,disabled:!!k.error,tabIndex:-1,onMouseDown:Ls,onClick:()=>{k.commit()},children:(0,i.jsx)(s.DynamicIcon,{iconKey:`CheckSuccess`})}),(0,i.jsx)(`button`,{type:`button`,"aria-label":`cancel-reference`,title:O(`referenceInput.cancel`),style:N,tabIndex:-1,onMouseDown:Ls,onClick:()=>{k.cancel()},children:(0,i.jsx)(s.DynamicIcon,{iconKey:`CloseError`})})]}):(0,i.jsx)(`button`,{type:`button`,"aria-label":`select-current-range`,title:O(`referenceInput.selectCurrent`),style:b||!k.canSelectCurrent?{...N,opacity:.3,cursor:`default`}:N,disabled:b||!k.canSelectCurrent,tabIndex:-1,onMouseDown:Ls,onClick:()=>{k.engaged||k.togglePoint(),k.selectCurrent()},children:(0,i.jsx)(s.DynamicIcon,{iconKey:`SelectRangeMode`})})});return(0,i.jsxs)(`div`,{ref:e=>{A.containerRef.current=e,typeof t==`function`?t(e):t&&(t.current=e)},className:P(`sxl-formula-input`,x),"data-grammar":n,"data-error":j?``:void 0,"data-engaged":k.engaged?``:void 0,style:{position:`relative`,display:`inline-flex`,flexDirection:`column`,minWidth:0,fontFamily:`var(--sxl-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif)`,...S},children:[(0,i.jsxs)(`span`,{style:{display:`inline-flex`,flexDirection:`row`,alignItems:`center`,border:`1px solid `+(j?`var(--sxl-color-error, #d93025)`:`var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2)))`),borderRadius:`var(--sxl-input-radius, 4px)`,background:`var(--sxl-input-bg, transparent)`},children:[(0,i.jsx)(`input`,{...D,type:`text`,spellCheck:!1,autoComplete:`off`,placeholder:E,disabled:b,readOnly:b||k.inputProps.readOnly,"aria-invalid":!!j||void 0,value:k.inputProps.value,ref:e=>{A.inputElRef.current=e,k.inputProps.ref(e)},onChange:k.inputProps.onChange,onKeyDown:e=>{A.handleKeyDown(e)||(k.inputProps.onKeyDown(e),e.defaultPrevented||C?.(e))},onPointerDown:A.inputHandlers.onPointerDown,onMouseDown:k.inputProps.onMouseDown,onSelect:e=>{k.inputProps.onSelect(e),A.inputHandlers.onSelect(e)},onFocus:e=>{k.inputProps.onFocus(e),w?.(e)},onBlur:e=>{k.inputProps.onBlur(e),T?.(e)},onScroll:A.inputHandlers.onScroll,onMouseMove:A.inputHandlers.onMouseMove,onMouseLeave:A.inputHandlers.onMouseLeave,onContextMenu:e=>{e.stopPropagation()},style:{flex:`1 1 auto`,minWidth:0,font:`inherit`,color:`inherit`,background:`none`,border:`none`,outline:`none`,padding:`var(--sxl-input-padding, 4px 6px)`,...A.overlayActive?{color:`transparent`,caretColor:`var(--sxl-color-text, light-dark(#000, #fff))`}:null}}),F]}),!m&&(0,i.jsx)(`span`,{className:`sxl-formula-input-error`,style:{display:`block`,visibility:j?`visible`:`hidden`,color:`var(--sxl-color-error, #d93025)`,fontSize:`0.75em`,paddingTop:`2px`},children:j?O(k.error):`\xA0`}),A.overlayElement,A.tipElement,A.hintElement]})}));Rs.displayName=`FormulaInput`;var zs=`_editable-input_1u3oj_6`,Bs=e=>(0,i.jsx)(`input`,{...e}),Vs=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{style:n={},className:a,value:o=``,onSubmit:c,onChange:l,onCancel:u,renderInput:d=Bs,styleHover:f={},dragging:p,maxLength:m,disabled:h=!1,readOnly:g=!1,..._}=e,[v,y]=(0,r.useState)(!1),[b,x]=(0,r.useState)(!1),[S,C]=(0,r.useState)(o);(0,r.useEffect)(()=>{C(o)},[o]);let w=(0,r.useRef)(null),[T,E]=(0,r.useState)(null),D=(0,s.useNotifier)(),O=(0,r.useCallback)(function(e){let t=e.message;T!==t&&(D?.showMessage?.(t,{type:s.NotifierType.Error}),E(t))},[D,T]),k=(0,r.useCallback)(e=>{let t=!1;try{t=c?.(e)??!0}catch(e){O(e)}return t?(w.current=null,x(!1),C(e),t):(setTimeout(()=>{w.current?.focus()},0),t)},[c]),A=(0,s.useCallbackRef)(()=>{C(o),w.current=null,x(!1),u?.()},[u,o]),j=(0,r.useMemo)(()=>{if(!b)return null;let e={className:P(zs),autoFocus:!0,spellCheck:!1,name:`editable-label`,autoComplete:`off`,maxLength:m,type:`text`,value:S,onFocus:e=>{w.current||(w.current=e.target,setTimeout(()=>{e.target?.select()},0))},onBlur:e=>{w.current&&k(S)},onChange:e=>{b&&C(e.target.value)},onMouseDown:e=>e.stopPropagation(),onKeyDown:e=>e.code===`Escape`?(e.preventDefault(),void A()):e.code===`Enter`?(e.preventDefault(),void k(e.target.value)):void(e.code===`Tab`?k(e.target.value):e.stopPropagation())};return(0,i.jsx)(i.Fragment,{children:d(e)})},[b,S,k,A,d,h]),[M,N]=(0,r.useState)();(0,r.useLayoutEffect)(()=>{let e=Object.assign({},n);(p||v)&&(e=Object.assign(e,f)),N(e)},[p,v,f,n]),(0,r.useEffect)(()=>{j&&l?.(S)},[j,l,S]);let F=(0,s.useImperativeElement)(t,()=>({startEdit(){h||g||x(!0)},cancel(){A()}}),[]);return(0,i.jsxs)(`div`,{..._,ref:F,style:{flexDirection:`column`,display:`flex`,...M},className:P(a),children:[(0,i.jsxs)(`div`,{style:{position:`relative`,boxSizing:`content-box`,whiteSpace:`pre`,userSelect:`none`,display:`flex`,justifyContent:`center`},onDoubleClick:()=>{h||g||x(!0)},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[(0,i.jsx)(`div`,{className:`editable-label-container`,style:{textAlign:`center`,display:`flex`,minHeight:`1em`,opacity:+!b},children:S}),j]}),(0,i.jsx)(`div`,{style:{whiteSpace:`pre`,position:`relative`,maxHeight:`0px`,height:`0px`,visibility:`hidden`,marginLeft:`1px`,marginRight:`1px`,overflow:`hidden`,...f},children:S})]})})),Hs=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Us(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Ws(e){return`nodeType`in e}function Gs(e){var t;return e?Us(e)?e:Ws(e)&&(t=e.ownerDocument?.defaultView)!=null?t:window:window}function Ks(e){let{Document:t}=Gs(e);return e instanceof t}function qs(e){return!Us(e)&&e instanceof Gs(e).HTMLElement}function Js(e){return e instanceof Gs(e).SVGElement}function Ys(e){return e?Us(e)?e.document:Ws(e)?Ks(e)?e:qs(e)||Js(e)?e.ownerDocument:document:document:document}var Xs=Hs?n.useLayoutEffect:n.useEffect;function Zs(e){let t=(0,n.useRef)(e);return Xs(()=>{t.current=e}),(0,n.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}function Qs(e,t){t===void 0&&(t=[e]);let r=(0,n.useRef)(e);return Xs(()=>{r.current!==e&&(r.current=e)},t),r}function $s(e,t){let r=(0,n.useRef)();return(0,n.useMemo)(()=>{let t=e(r.current);return r.current=t,t},[...t])}function ec(e){let t=Zs(e),r=(0,n.useRef)(null);return[r,(0,n.useCallback)(e=>{e!==r.current&&t?.(e,r.current),r.current=e},[])]}function tc(e){let t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e},[e]),t.current}var nc={};function rc(e,t){return(0,n.useMemo)(()=>{if(t)return t;let n=nc[e]==null?0:nc[e]+1;return nc[e]=n,e+`-`+n},[e,t])}function ic(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var ac=ic(1),oc=ic(-1);function sc(e){if(!e)return!1;let{KeyboardEvent:t}=Gs(e.target);return t&&e instanceof t}function cc(e){if(function(e){if(!e)return!1;let{TouchEvent:t}=Gs(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return`clientX`in e&&`clientY`in e}(e)?{x:e.clientX,y:e.clientY}:null}var lc=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[lc.Translate.toString(e),lc.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),uc=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function dc(e){return e.matches(uc)?e:e.querySelector(uc)}var fc={display:`none`};function pc(e){let{id:t,value:r}=e;return n.default.createElement(`div`,{id:t,style:fc},r)}function mc(e){let{id:t,announcement:r,ariaLiveType:i=`assertive`}=e;return n.default.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":i,"aria-atomic":!0},r)}var hc=(0,n.createContext)(null),gc,_c={draggable:`
27
27
  To pick up a draggable item, press the space bar.
28
28
  While dragging, use the arrow keys to move the item.
29
29
  Press space again to drop the item in its new position, or press escape to cancel.