@sheetxl/sdk 0.8.0-beta.12 → 0.8.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/THIRD-PARTY-NOTICES.md +172 -0
  2. package/browser/esm/{CBYMTDzMf1Vh7pkw.mjs → 3t4S9eda2I6jFad0.mjs} +1 -1
  3. package/browser/esm/{Bg5Di9GLNAkbqQ1P.mjs → AXlD9K1gCwPU4gCO.mjs} +1926 -1298
  4. package/browser/esm/{w6Jea0TiclPrYZ2M.mjs → B1aH_qa-czVyEVHd.mjs} +509 -509
  5. package/browser/esm/{DZiivy0NmO1Vnyzk.mjs → BEDfJP2tcuRy2Y2E.mjs} +2 -2
  6. package/browser/esm/{BdCJNawfifyPupCP.mjs → BLYl-afJe_3std8i.mjs} +1 -1
  7. package/browser/esm/{D2RZh0O9neOsyLAE.mjs → BPPMKyMn65i1a1mE.mjs} +69 -48
  8. package/browser/esm/{yuhcOYw6SHQ-RCm3.mjs → BSXQAXwZdJKYTO4P.mjs} +30 -30
  9. package/browser/esm/{-Jx-jNHmtIQQfLvK.mjs → BVqIknGhQCLUB_7Q.mjs} +1 -1
  10. package/browser/esm/{fXWUMDhZ5yMSO629.mjs → BWoz4kQdA5KKJfl6.mjs} +1 -1
  11. package/browser/esm/{DwwR3O2sEZApPSTF.mjs → Bdcd3QOzsc0aVMjN.mjs} +3 -3
  12. package/browser/esm/{2mIwPy2D2JUX-9wx.mjs → BpwULQPKbb4R9Jew.mjs} +2 -2
  13. package/browser/esm/{CwOPLXU3-9ZHGyOT.mjs → C7hpfT-sX2lyLS-D.mjs} +1 -1
  14. package/browser/esm/{BIHrHjRGWVlJglcp.mjs → CImFKFaYToUH-bSE.mjs} +2 -2
  15. package/browser/esm/{BTFBedJMRWGvZyCE.mjs → CM_X1zZYzEUPaNJL.mjs} +1 -1
  16. package/browser/esm/CPIWV3Enlh_BF2TY.mjs +19 -0
  17. package/browser/esm/{CndRBvVfQUJIYRRj.mjs → ChYgQL-8qIDFmX31.mjs} +50 -50
  18. package/browser/esm/{BudSIfXBAsTxvu-K.mjs → CtC__ALh4I8PKIln.mjs} +10071 -9246
  19. package/browser/esm/{qO-ujUrgq6H3TQix.mjs → Cy8uYCggktF83278.mjs} +1 -1
  20. package/browser/esm/D2NFcBM4xsv0JJ1q.mjs +184 -0
  21. package/browser/esm/{D9xNz46kAfXMZzp4.mjs → D39XcmtPXVtMN4yF.mjs} +2 -2
  22. package/browser/esm/{CdEO8CEee6lEhabA.mjs → DBvu0tdSf-5vol4e.mjs} +2 -2
  23. package/browser/esm/{Tah7cnFb_HNZdLtj.mjs → DIfAk63CvaOZ3QKi.mjs} +3 -3
  24. package/browser/esm/{B3wf5vZCsWfWsDbj.mjs → D_XMi4_5iO2rkET5.mjs} +1 -1
  25. package/browser/esm/{DgrAuRD2qr2DvFeJ.mjs → Dh84MDs-OhdCPCIg.mjs} +44 -44
  26. package/browser/esm/{DPhGQLNGmDZwODwJ.mjs → Dhw5XEJYFrkYjdU2.mjs} +94 -94
  27. package/browser/esm/{Cxjxk0ncRKx80I-w.mjs → DiXeQjc0WJGLSVEo.mjs} +1 -1
  28. package/browser/esm/DnR0xY7_iE3TmMcg.mjs +348 -0
  29. package/browser/esm/{DK899HhWX1HINMC1.mjs → DnqwX3-2NfGBaXXl.mjs} +25 -25
  30. package/browser/esm/{D64dM68B1pKYFzdP.mjs → DonQz2Tc3k9lNT8E.mjs} +2 -2
  31. package/browser/esm/{Bt8_m94tBdks209L.mjs → DvvqmUQ9Z0NFm1-4.mjs} +1 -1
  32. package/browser/esm/{BnC4-27Igwb8oDf2.mjs → Ln4gsmhqH1LyoANj.mjs} +44 -43
  33. package/browser/esm/{CUzYuYTTGsChC_kZ.mjs → MuNBN02MyZ558c_K.mjs} +2052 -1583
  34. package/browser/esm/{CRkYR-siY2C994KV.mjs → SwLp-iElwDjfcJtv.mjs} +1 -1
  35. package/browser/esm/{C9u8FUewte5ugUjH.mjs → UMQTbO0zNmBpzW1V.mjs} +725 -716
  36. package/browser/esm/aRXqxIzjuSLwawMh.mjs +18 -0
  37. package/browser/esm/index.mjs +482 -440
  38. package/browser/esm/{hCQJcmIzPDxDEv2q.mjs → oSCy1X5CJ1iYtGDp.mjs} +2 -2
  39. package/browser/esm/{DobHLF6VjHr7Xi40.mjs → qCqzZW74-fhaIG2V.mjs} +1 -1
  40. package/browser/esm/{CNdjyofiRu6CYOrr.mjs → r_EZapMBdyS4gUd-.mjs} +50 -48
  41. package/browser/esm/yuF8SbWfjBfrxcq5.mjs +367 -0
  42. package/licenses/dependencies.txt +71 -1
  43. package/node/esm/99miMotf3dOuG5Jk.mjs +372 -0
  44. package/node/esm/{-TA0MneBDKdGhsib.mjs → B3hBxzqJ2_hUylNr.mjs} +3329 -2852
  45. package/node/esm/{BNXLOEddJ6O9gYws.mjs → B5VmOC0jO9Zbh9Mq.mjs} +2 -2
  46. package/node/esm/{DhS6yWjrrSNIJMsn.mjs → B6jhx5pHPs2W5GE7.mjs} +234 -225
  47. package/node/esm/{DUTmDHbFbhLDT4F3.mjs → BCjHRVU8tC5lYypg.mjs} +1 -1
  48. package/node/esm/BEBt5fo__rvT2q_u.mjs +310 -0
  49. package/node/esm/{icn2nX5Z8e_3mNAv.mjs → BELc5aQ_pFPgbiso.mjs} +1 -1
  50. package/node/esm/{DrCf6ITcBhVOFpRj.mjs → BEdxa3I4VOiCsvy7.mjs} +7 -7
  51. package/node/esm/{D3ptRKzASqBut1DE.mjs → BLPrFp_jKGYgWPX1.mjs} +2 -2
  52. package/node/esm/{BskP3b8vUoIOGLY6.mjs → BSVttk12GXNfKZ9k.mjs} +2 -2
  53. package/node/esm/{D4ROK9UwDpS6jO3Z.mjs → BXg-D8Rc_iyB8p7X.mjs} +1 -1
  54. package/node/esm/{DV5CU37aEbFbWFL0.mjs → BfEdeOg4iYXaYTlh.mjs} +1 -1
  55. package/node/esm/BuyAYLI4s33-vmgG.mjs +18 -0
  56. package/node/esm/{C_xf5Bz30VqiJjXn.mjs → C-5JLSNof0FhkuFd.mjs} +1 -1
  57. package/node/esm/{eimUGjiIP-b8HiM6.mjs → C3S4hF1vn0NyJPPd.mjs} +52 -52
  58. package/node/esm/{BL2iiEoqxDEV2Xrg.mjs → CI8UIWR01z9QDlzH.mjs} +3348 -2610
  59. package/node/esm/{pYtP7wPyS96NQyXS.mjs → CPsGyt3vnOdLTShj.mjs} +25 -25
  60. package/node/esm/{CG-qBU5BAaVz7e-P.mjs → Ccocd9DTvOnlOE9D.mjs} +1 -1
  61. package/node/esm/{C14-R6tifRh7pc0p.mjs → CdSTmD2ZvG9NesNR.mjs} +1 -1
  62. package/node/esm/{Q_S1g46ZOTrdhTae.mjs → Crn6dnSQQRCQAnQ-.mjs} +1 -1
  63. package/node/esm/{DdoiuKg9BKubtF1V.mjs → Cyeq1rDslIqF1LKz.mjs} +1 -1
  64. package/node/esm/{Ci_zLYmCD7e-C79O.mjs → D30rC6AWaGGf3CaC.mjs} +1 -1
  65. package/node/esm/D4Y1WJgjiFEgbWrW.mjs +115 -0
  66. package/node/esm/{Vocy-I9dKzZMr0Ct.mjs → DLdXl0O0TXuyqLU4.mjs} +10898 -10685
  67. package/node/esm/{D8hO07ToAibIuniw.mjs → DbPUG2DcQ3T_QhcJ.mjs} +138 -136
  68. package/node/esm/{lGJ42sHqg5if2bba.mjs → DeFE8QfuCeGw-mvd.mjs} +458 -458
  69. package/node/esm/{CiIymQN6aJCul62g.mjs → DiCMnYA2bttmrX3q.mjs} +9 -9
  70. package/node/esm/{DhTya_mhmN53vskv.mjs → Dlk2ZYExFgQ0xE2H.mjs} +1 -1
  71. package/node/esm/{Btw4148Ot8ifhNc1.mjs → I-FZojIFWluC6X-j.mjs} +1 -1
  72. package/node/esm/{C99zzq8DImQXi4BQ.mjs → Lj98EH6coGdKUzuS.mjs} +10 -10
  73. package/node/esm/{B-HUPAcqvK0eeeCz.mjs → NA-8urR7T1NCwrgD.mjs} +38 -37
  74. package/node/esm/{DxazKtROyaI51dWl.mjs → YpOpRyciqQLIY1-G.mjs} +1 -1
  75. package/node/esm/{CkRYLed8Mmn3giNg.mjs → b3XnssSr9lmvAC2N.mjs} +2 -2
  76. package/node/esm/clgEkmEwfB28nkz2.mjs +351 -0
  77. package/node/esm/index.mjs +584 -540
  78. package/node/esm/{CRt3vXe6YmXzqk3H.mjs → pF2vCOTmrxPAB41Q.mjs} +102 -102
  79. package/node/esm/{CBuEu5Jk-LfaDy-H.mjs → uLrulyR7IXq0SF4j.mjs} +44 -44
  80. package/node/esm/{C_aL7CGS1lrNn1Ng.mjs → xRGObcoaGDnAZFnj.mjs} +1 -1
  81. package/package.json +10 -7
  82. package/resources/contents.json +108 -0
  83. package/resources/fonts/aptos-bold-italic.hinted.json +125 -0
  84. package/resources/fonts/aptos-bold-italic.metrics.json +221 -0
  85. package/resources/fonts/aptos-bold-italic.rows.json +8 -0
  86. package/resources/fonts/aptos-bold.hinted.json +125 -0
  87. package/resources/fonts/aptos-bold.metrics.json +221 -0
  88. package/resources/fonts/aptos-bold.rows.json +8 -0
  89. package/resources/fonts/aptos-display-bold-italic.hinted.json +125 -0
  90. package/resources/fonts/aptos-display-bold-italic.metrics.json +221 -0
  91. package/resources/fonts/aptos-display-bold-italic.rows.json +8 -0
  92. package/resources/fonts/aptos-display-bold.hinted.json +125 -0
  93. package/resources/fonts/aptos-display-bold.metrics.json +221 -0
  94. package/resources/fonts/aptos-display-bold.rows.json +8 -0
  95. package/resources/fonts/aptos-display-italic.hinted.json +124 -0
  96. package/resources/fonts/aptos-display-italic.metrics.json +221 -0
  97. package/resources/fonts/aptos-display-italic.rows.json +8 -0
  98. package/resources/fonts/aptos-display-regular.hinted.json +125 -0
  99. package/resources/fonts/aptos-display-regular.metrics.json +221 -0
  100. package/resources/fonts/aptos-display-regular.rows.json +8 -0
  101. package/resources/fonts/aptos-italic.hinted.json +125 -0
  102. package/resources/fonts/aptos-italic.metrics.json +221 -0
  103. package/resources/fonts/aptos-italic.rows.json +8 -0
  104. package/resources/fonts/aptos-narrow-bold-italic.hinted.json +125 -0
  105. package/resources/fonts/aptos-narrow-bold-italic.metrics.json +221 -0
  106. package/resources/fonts/aptos-narrow-bold-italic.rows.json +8 -0
  107. package/resources/fonts/aptos-narrow-bold.hinted.json +125 -0
  108. package/resources/fonts/aptos-narrow-bold.metrics.json +221 -0
  109. package/resources/fonts/aptos-narrow-bold.rows.json +8 -0
  110. package/resources/fonts/aptos-narrow-italic.hinted.json +125 -0
  111. package/resources/fonts/aptos-narrow-italic.metrics.json +221 -0
  112. package/resources/fonts/aptos-narrow-italic.rows.json +8 -0
  113. package/resources/fonts/aptos-narrow-regular.hinted.json +125 -0
  114. package/resources/fonts/aptos-narrow-regular.metrics.json +221 -0
  115. package/resources/fonts/aptos-narrow-regular.rows.json +8 -0
  116. package/resources/fonts/aptos-regular.hinted.json +125 -0
  117. package/resources/fonts/aptos-regular.metrics.json +221 -0
  118. package/resources/fonts/aptos-regular.rows.json +8 -0
  119. package/resources/fonts/arial-bold-italic.rows.json +0 -1
  120. package/resources/fonts/arial-bold.rows.json +0 -1
  121. package/resources/fonts/arial-italic.rows.json +0 -1
  122. package/resources/fonts/arial-regular.rows.json +0 -1
  123. package/resources/fonts/calibri-bold-italic.rows.json +0 -1
  124. package/resources/fonts/calibri-bold.rows.json +0 -1
  125. package/resources/fonts/calibri-italic.rows.json +0 -1
  126. package/resources/fonts/calibri-regular.rows.json +0 -1
  127. package/resources/fonts/cambria-bold-italic.rows.json +0 -1
  128. package/resources/fonts/cambria-bold.rows.json +0 -1
  129. package/resources/fonts/cambria-italic.rows.json +0 -1
  130. package/resources/fonts/cambria-regular.rows.json +0 -1
  131. package/resources/fonts/contents.json +240 -0
  132. package/resources/fonts/courier-new-bold-italic.rows.json +0 -1
  133. package/resources/fonts/courier-new-bold.rows.json +0 -1
  134. package/resources/fonts/courier-new-italic.rows.json +0 -1
  135. package/resources/fonts/courier-new-regular.rows.json +0 -1
  136. package/resources/fonts/times-new-roman-bold-italic.rows.json +0 -1
  137. package/resources/fonts/times-new-roman-bold.rows.json +0 -1
  138. package/resources/fonts/times-new-roman-italic.rows.json +0 -1
  139. package/resources/fonts/times-new-roman-regular.rows.json +0 -1
  140. package/resources/locales/de/model.msg.json +4 -0
  141. package/resources/locales/en/model.msg.json +4 -0
  142. package/types/scripting-api.json +9339 -9320
  143. package/types/scripting.d.ts +322 -200
  144. package/types/src/.generated/wasm/sdk.d.ts +5 -27
  145. package/types/src/address/AddressUtils.d.ts +8 -0
  146. package/types/src/address/_SheetNameQuoteChars.d.ts +3 -0
  147. package/types/src/anomalies/_FocusTable.d.ts +0 -6
  148. package/types/src/calculation/Calculation.d.ts +20 -95
  149. package/types/src/calculation/ExternalBookBindings.d.ts +0 -26
  150. package/types/src/calculation/NamedFormulaCollection.d.ts +6 -2
  151. package/types/src/calculation/TokenType.d.ts +0 -10
  152. package/types/src/calculation/_CloneBoundary.d.ts +0 -24
  153. package/types/src/calculation/_FormulaToolkit.d.ts +0 -5
  154. package/types/src/calculation/compiler/ASTTypes.d.ts +0 -13
  155. package/types/src/calculation/compiler/CompilerUtils.d.ts +0 -227
  156. package/types/src/calculation/compiler/FormulaLexer.d.ts +0 -8
  157. package/types/src/calculation/compiler/FormulaParser.d.ts +0 -61
  158. package/types/src/calculation/compiler/ParserUtils.d.ts +0 -24
  159. package/types/src/calculation/compiler/Types.d.ts +0 -52
  160. package/types/src/calculation/engine/CalcBackend.d.ts +15 -157
  161. package/types/src/calculation/engine/index.d.ts +0 -8
  162. package/types/src/calculation/executor/CalcExecutor.d.ts +13 -130
  163. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +30 -11
  164. package/types/src/calculation/executor/CircularReference.d.ts +0 -17
  165. package/types/src/calculation/executor/_BlockOrder.d.ts +29 -0
  166. package/types/src/calculation/executor/_WhatIf.d.ts +0 -19
  167. package/types/src/calculation/formula/FormulaBlock.d.ts +0 -28
  168. package/types/src/calculation/formula/FormulaRecordView.d.ts +0 -15
  169. package/types/src/calculation/formula/IFormulaBlock.d.ts +0 -12
  170. package/types/src/calculation/formula/LambdaValue.d.ts +0 -15
  171. package/types/src/calculation/formula/TokenUtils.d.ts +1 -8
  172. package/types/src/calculation/grid/CalcGrid.d.ts +5 -59
  173. package/types/src/calculation/grid/CalcGridBackend.d.ts +8 -9
  174. package/types/src/calculation/grid/CalcGridProxy.d.ts +0 -13
  175. package/types/src/calculation/grid/CalcGridUtils.d.ts +18 -22
  176. package/types/src/calculation/grid/ICalcGrid.d.ts +13 -98
  177. package/types/src/calculation/grid/_CalcRequest.d.ts +1 -29
  178. package/types/src/calculation/spatial/CircularEntry.d.ts +0 -10
  179. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +52 -82
  180. package/types/src/calculation/spatial/SpillEntry.d.ts +10 -7
  181. package/types/src/calculation/state/CalcScope.d.ts +0 -9
  182. package/types/src/calculation/state/CalcState.d.ts +0 -12
  183. package/types/src/calculation/state/CalculationContext.d.ts +4 -37
  184. package/types/src/calculation/state/DeferredCalls.d.ts +11 -64
  185. package/types/src/calculation/state/IContextContainer.d.ts +4 -60
  186. package/types/src/calculation/state/_KeepBlanks.d.ts +5 -0
  187. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +46 -33
  188. package/types/src/calculation/state/_WhatIfLayer.d.ts +0 -14
  189. package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +0 -42
  190. package/types/src/calculation/symbol/ISymbolRegistry.d.ts +0 -6
  191. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +0 -12
  192. package/types/src/calculation/symbol/SymbolRegistry.d.ts +0 -9
  193. package/types/src/calculation/toolkit/index.d.ts +0 -8
  194. package/types/src/cell/ICell.d.ts +14 -28
  195. package/types/src/cellRange/ICellRange.d.ts +22 -11
  196. package/types/src/chart/Chart.d.ts +0 -16
  197. package/types/src/chart/_ChartParts.d.ts +0 -39
  198. package/types/src/chart/_ChartSource.d.ts +0 -14
  199. package/types/src/chart/createChart.d.ts +1 -1
  200. package/types/src/chart/kinds/ChartKind.d.ts +4 -4
  201. package/types/src/chart/kinds/_Placeholder.d.ts +0 -1
  202. package/types/src/chart/layout/TextMeasurer.d.ts +0 -20
  203. package/types/src/chart/layout/_LayoutUtils.d.ts +0 -16
  204. package/types/src/chart/math/BoxStats.d.ts +0 -8
  205. package/types/src/chart/math/DateUnitCalcs.d.ts +0 -10
  206. package/types/src/chart/math/Histogram.d.ts +0 -17
  207. package/types/src/chart/math/OrdUnitCalcs.d.ts +0 -53
  208. package/types/src/chart/math/Treemap.d.ts +0 -15
  209. package/types/src/chart/math/Trendlines.d.ts +0 -8
  210. package/types/src/chart/math/UnitCalcs.d.ts +0 -22
  211. package/types/src/chart/model/_Edits.d.ts +0 -33
  212. package/types/src/chart/model/_Grouping.d.ts +0 -25
  213. package/types/src/chart/model/_Inference.d.ts +0 -18
  214. package/types/src/chart/model/_NewChart.d.ts +0 -41
  215. package/types/src/chart/model/_OfPie.d.ts +0 -7
  216. package/types/src/chart/resolve/_LegacyStyles.d.ts +0 -20
  217. package/types/src/chart/resolve/_Resolve.d.ts +0 -19
  218. package/types/src/chart/resolve/_ResolvedChart.d.ts +0 -6
  219. package/types/src/collections/_GridUtils.d.ts +0 -10
  220. package/types/src/comment/_NoteBox.d.ts +0 -15
  221. package/types/src/condition/AnchoredConditional.d.ts +1 -23
  222. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +0 -49
  223. package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +0 -10
  224. package/types/src/condition/ICondition.d.ts +2 -2
  225. package/types/src/condition/_ConditionUtils.d.ts +0 -38
  226. package/types/src/externalBook/ExternalBookCollection.d.ts +0 -15
  227. package/types/src/externalBook/ExternalBookName.d.ts +2 -3
  228. package/types/src/externalBook/IExternalBook.d.ts +13 -14
  229. package/types/src/fetch/IFetcher.d.ts +2 -1
  230. package/types/src/fetch/_WorkbookFetch.d.ts +1 -1
  231. package/types/src/font/AdvanceTable.d.ts +16 -42
  232. package/types/src/font/IFont.d.ts +32 -9
  233. package/types/src/font/TableFileAdvanceBuilder.d.ts +6 -3
  234. package/types/src/font/_FontUtils.d.ts +0 -8
  235. package/types/src/font/_StandIns.d.ts +33 -0
  236. package/types/src/io/IWorkbookIO.d.ts +3 -3
  237. package/types/src/io/WorkbookOrigin.d.ts +2 -2
  238. package/types/src/license/LicenseManager.d.ts +2 -1
  239. package/types/src/license/_Utils.d.ts +4 -3
  240. package/types/src/license/details.d.ts +3 -1
  241. package/types/src/license/keys.d.ts +6 -0
  242. package/types/src/license/license-key.d.ts +15 -33
  243. package/types/src/license/token.d.ts +55 -0
  244. package/types/src/picture/IPicture.d.ts +45 -0
  245. package/types/src/picture/Picture.d.ts +12 -0
  246. package/types/src/pivot/PivotTable.d.ts +0 -7
  247. package/types/src/primitives/AsyncValue.d.ts +0 -12
  248. package/types/src/primitives/PrimitiveUtils.d.ts +1 -110
  249. package/types/src/primitives/Range.d.ts +0 -60
  250. package/types/src/primitives/ScalarCollation.d.ts +0 -106
  251. package/types/src/primitives/stats/AggregateStats.d.ts +0 -19
  252. package/types/src/print/PageLayout.d.ts +0 -6
  253. package/types/src/reference/ReferenceUtils.d.ts +4 -2
  254. package/types/src/richData/RichDataRegistry.d.ts +6 -0
  255. package/types/src/scripting/TypedFunction.d.ts +0 -109
  256. package/types/src/scripting/enumManifest.browser.d.ts +7 -2
  257. package/types/src/sheet/IWorksheet.d.ts +2 -5
  258. package/types/src/sheet/NamedCellRange.d.ts +0 -21
  259. package/types/src/sheet/SheetCell.d.ts +8 -2
  260. package/types/src/sheet/Worksheet.d.ts +7 -48
  261. package/types/src/sheet/_DelimitedText.d.ts +13 -0
  262. package/types/src/sheet/_IgnoredErrors.d.ts +0 -12
  263. package/types/src/sheet/_ScalarListFactory.d.ts +0 -19
  264. package/types/src/sheet/_SheetCoords.d.ts +0 -7
  265. package/types/src/sheet/_SheetFilterUtils.d.ts +0 -8
  266. package/types/src/sheet/_SheetStateReader.d.ts +0 -10
  267. package/types/src/sheet/_SheetStateTypes.d.ts +0 -3
  268. package/types/src/sheet/_SheetUtils.d.ts +1 -1
  269. package/types/src/sheet/style/_RowLine.d.ts +32 -0
  270. package/types/src/sheet/style/_StyleUtils.d.ts +6 -14
  271. package/types/src/sheetView/_SheetViewUtils.d.ts +0 -1
  272. package/types/src/slicer/_BuiltInSlicerStyles.d.ts +0 -5
  273. package/types/src/style/ICellStyle.d.ts +4 -0
  274. package/types/src/table/AnchoredTable.d.ts +0 -147
  275. package/types/src/text/TextFrame.d.ts +4 -1
  276. package/types/src/text/TextStacked.d.ts +0 -24
  277. package/types/src/text/TextWrapper.d.ts +3 -5
  278. package/types/src/text/_LineBox.d.ts +24 -0
  279. package/types/src/text/_TextUtils.d.ts +5 -2
  280. package/types/src/text/_TextWrapperFallback.d.ts +2 -1
  281. package/types/src/wasm/sdkWasm.d.ts +1 -1
  282. package/types/src/workbook/Workbook.d.ts +0 -10
  283. package/browser/esm/2WuhYrIpYmOR5H73.mjs +0 -698
  284. package/browser/esm/CTe2qfmIUEad6FJv.mjs +0 -199
  285. package/browser/esm/CfRqiPDg6RBTg1EN.mjs +0 -367
  286. package/browser/esm/DVroRnhi-5IDXNgM.mjs +0 -210
  287. package/browser/esm/DwZCT7DZiiXoTweg.mjs +0 -14
  288. package/node/esm/BSvOluusoDM4z_dx.mjs +0 -811
  289. package/node/esm/CPI58duc0j0a-HpJ.mjs +0 -115
  290. package/node/esm/DggQ23jKMpwhENfa.mjs +0 -372
  291. package/node/esm/Dn1M7YWi25DeeYUb.mjs +0 -210
  292. package/node/esm/ZXPFcsT2zrALCZux.mjs +0 -289
@@ -1,19 +1,19 @@
1
1
  /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.14
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { a as e, l as t, o as n, t as r, u as i } from "./DobHLF6VjHr7Xi40.mjs";
8
- import { $t as a, A as o, Ai as s, Ar as c, Br as l, Bt as u, C as d, Ci as f, Cr as p, Ct as m, D as h, Di as g, Dt as _, E as v, Ei as y, Et as b, F as x, Fi as S, Fr as C, Ft as w, Gr as ee, Hr as te, Ht as ne, I as re, Ii as ie, Ir as ae, It as oe, Jr as se, Jt as ce, Kr as le, Kt as ue, L as de, Li as fe, Lr as pe, Mi as me, Mn as he, Mr as ge, Ni as _e, Nn as ve, Nr as ye, Nt as be, O as xe, Oi as Se, Ot as Ce, P as we, Pi as Te, Pr as Ee, Pt as De, Qt as Oe, Ri as ke, Rr as Ae, Rt as je, S as Me, Si as Ne, Sr as Pe, T as Fe, Ti as Ie, Tn as Le, Tt as Re, Ur as ze, Ut as Be, Vr as Ve, Vt as He, Wr as Ue, Wt as We, Xt as Ge, Yr as Ke, Yt as qe, Zt as Je, _a as Ye, _i as T, a as Xe, b as E, bi as Ze, ca as Qe, cn as D, da as $e, di as et, dn as tt, en as nt, fa as rt, fi as it, fn as at, ga as O, ha as ot, i as st, j as ct, jn as lt, jr as ut, k as dt, ki as ft, kr as pt, kt as mt, la as ht, ma as gt, nn as _t, oa as vt, on as yt, pa as bt, pn as xt, qr as St, qt as Ct, r as wt, ri as Tt, si as Et, sn as Dt, ta as Ot, ti as kt, tn as k, ua as At, ui as jt, un as Mt, v as Nt, va as Pt, vi as Ft, w as A, wi as It, wn as Lt, wt as Rt, x as zt, xi as Bt, xr as Vt, y as j, ya as Ht, yi as Ut, zi as Wt, zr as Gt, zt as Kt } from "./BudSIfXBAsTxvu-K.mjs";
9
- import { $t as qt, B as Jt, Ct as Yt, E as Xt, Gt as Zt, H as Qt, I as $t, Kt as en, L as tn, O as nn, Qt as rn, R as an, St as on, V as sn, W as cn, Yt as M, at as ln, ct as un, dt as dn, en as N, ft as P, lt as fn, ot as pn, qt as F, rt as mn, st as hn, ut as gn, z as _n } from "./Bg5Di9GLNAkbqQ1P.mjs";
10
- import { n as vn, t as yn } from "./DwwR3O2sEZApPSTF.mjs";
11
- import { t as bn } from "./DVroRnhi-5IDXNgM.mjs";
7
+ import { r as e } from "./BWoz4kQdA5KKJfl6.mjs";
8
+ import { a as t, l as n, o as r, t as i, u as a } from "./qCqzZW74-fhaIG2V.mjs";
9
+ import { $t as o, A as s, Ai as c, Ar as l, At as u, Bi as d, Br as f, Bt as p, C as m, Ci as h, Cr as g, D as _, Di as v, Dt as y, E as b, Ei as x, En as S, Et as C, F as w, Fi as ee, Fr as te, Ft as ne, Gr as re, Gt as ie, Hr as ae, Ht as oe, I as se, Ii as ce, Ir as le, It as ue, Jr as de, Jt as fe, Kr as pe, L as me, Li as he, Lr as ge, Lt as _e, M as ve, Mn as ye, Mr as be, Ni as xe, Nn as Se, Nr as Ce, O as we, Oi as Te, Ot as Ee, Pi as De, Pn as Oe, Pr as ke, Pt as Ae, Qt as je, R as Me, Ri as Ne, Rr as Pe, S as Fe, Si as Ie, Sr as Le, T, Ti as Re, Tn as ze, Tt as Be, Ur as Ve, Ut as He, Vr as Ue, Vt as We, Wr as Ge, Wt as Ke, Xt as qe, Yr as Je, Yt as Ye, Zt as Xe, _a as E, a as Ze, ai as Qe, b as D, ba as $e, bi as et, ci as tt, cn as nt, da as rt, di as it, dn as at, en as ot, fa as st, fi as ct, fn as lt, ga as ut, ha as dt, i as ft, j as pt, ji as mt, jr as ht, k as gt, ki as _t, kr as vt, kt as yt, la as bt, ln as O, ma as xt, mn as St, na as Ct, nn as k, pa as wt, pi as Tt, pn as Et, qr as Dt, qt as Ot, r as kt, ri as At, rn as jt, sa as Mt, sn as Nt, ti as Pt, tn as Ft, ua as It, v as Lt, va as Rt, vi as A, w as zt, wi as Bt, wr as Vt, wt as Ht, x as j, xi as Ut, y as Wt, ya as Gt, yi as Kt, zi as qt, zr as Jt, zt as Yt } from "./CtC__ALh4I8PKIln.mjs";
10
+ import { A as Xt, B as Zt, H as Qt, Jt as $t, K as en, O as tn, R as nn, Tt as rn, U as an, V as on, W as sn, Yt as M, Zt as N, at as cn, ct as ln, dt as un, ft as dn, in as P, k as fn, lt as pn, mt as F, nn as mn, pt as hn, qt as gn, rn as _n, st as vn, ut as yn, wt as bn, z as xn } from "./AXlD9K1gCwPU4gCO.mjs";
11
+ import { n as Sn, t as Cn } from "./Bdcd3QOzsc0aVMjN.mjs";
12
12
  import { FormulaError as I, ScalarType as L } from "@sheetxl/primitives";
13
- import { BufferUtils as xn, CommonUtils as R, CoordUtils as z, DOMUtils as Sn, DefaultLanguagePackService as Cn, ExpectedError as B, InvalidPasswordError as wn, MimeType as Tn, Notifier as En, NullNotAllowedError as Dn, OutOfBoundsError as V, PasswordRequiredError as On, ProtectedError as H, UndoManager as kn, messageKey as U, t as W } from "@sheetxl/utils";
13
+ import { BufferUtils as wn, CommonUtils as R, CoordUtils as z, DOMUtils as Tn, DefaultLanguagePackService as En, ExpectedError as B, ImageUtils as Dn, InvalidPasswordError as On, MimeType as kn, Notifier as An, NullNotAllowedError as jn, OutOfBoundsError as V, PasswordRequiredError as Mn, ProtectedError as H, UndoManager as Nn, messageKey as U, t as W } from "@sheetxl/utils";
14
14
  export * from "@sheetxl/primitives";
15
15
  export * from "@sheetxl/utils";
16
- var An, jn = class extends kn {
16
+ var Pn, Fn = class extends Nn {
17
17
  constructor(e, t = 50) {
18
18
  super(t), this._transactions = e, this._floorId = e ? e.getCurrentCommit(!1).getId() : null, this._removeListener = e?.addListener({ onCommitChange: () => this._notifyOnStackChange() });
19
19
  }
@@ -98,14 +98,14 @@ var An, jn = class extends kn {
98
98
  return e.length === 0 && this._repeatOperation !== null && e.push(this._repeatOperation.description), Object.freeze(e);
99
99
  }
100
100
  getUndoEntries() {
101
- return this._undoCommits().map(Nn);
101
+ return this._undoCommits().map(Ln);
102
102
  }
103
103
  getRedoEntries() {
104
- let e = this._redoCommits().map(Nn);
104
+ let e = this._redoCommits().map(Ln);
105
105
  return e.length === 0 && this._repeatOperation !== null && e.push({
106
106
  description: this._repeatOperation.description,
107
107
  author: null,
108
- meta: Mn
108
+ meta: In
109
109
  }), Object.freeze(e);
110
110
  }
111
111
  addUndoOperation() {
@@ -117,15 +117,15 @@ var An, jn = class extends kn {
117
117
  close() {
118
118
  this._removeListener?.();
119
119
  }
120
- }, Mn = Object.freeze({}), Nn = (e) => ({
120
+ }, In = Object.freeze({}), Ln = (e) => ({
121
121
  description: e.getDescription(),
122
122
  author: e.getAuthor(),
123
- meta: e.getMeta() ?? Mn
124
- }), Pn = class {
125
- constructor(t, n) {
126
- this._dirty = !1, this._store = t, this._savedCommitId = t.getCurrentCommit()?.getId() ?? null, this._emitter = new e(this);
123
+ meta: e.getMeta() ?? In
124
+ }), Rn = class {
125
+ constructor(e, n) {
126
+ this._dirty = !1, this._store = e, this._savedCommitId = e.getCurrentCommit()?.getId() ?? null, this._emitter = new t(this);
127
127
  let r = this;
128
- this._removeStoreListener = t.addListener({
128
+ this._removeStoreListener = e.addListener({
129
129
  onCommitEnd() {
130
130
  r._recompute();
131
131
  },
@@ -159,10 +159,10 @@ var An, jn = class extends kn {
159
159
  this._removeStoreListener?.(), this._removeCommitListener?.(), this._emitter.close();
160
160
  }
161
161
  };
162
- An ||= {};
163
- var Fn, G = class t {
162
+ Pn ||= {};
163
+ var zn, G = class e {
164
164
  constructor(n, r = {}) {
165
- this._password = null, this._emitter = new e(this), this._path = n ?? null, this._name = r.name ?? null, this._format = r.format ?? null, this._size = r.size ?? null, this._lastModified = r.lastModified ?? null, this._canWrite = r.canWrite ?? t._defaultCanWrite(this._path), this._encryption = r.encryption ?? null;
165
+ this._password = null, this._emitter = new t(this), this._path = n ?? null, this._name = r.name ?? null, this._format = r.format ?? null, this._size = r.size ?? null, this._lastModified = r.lastModified ?? null, this._canWrite = r.canWrite ?? e._defaultCanWrite(this._path), this._encryption = r.encryption ?? null;
166
166
  }
167
167
  static _defaultCanWrite(e) {
168
168
  return !!e && !/^(https?:|data:|blob:)/i.test(e);
@@ -173,7 +173,7 @@ var Fn, G = class t {
173
173
  getName() {
174
174
  if (this._name !== null && this._name !== void 0) return this._name;
175
175
  let e = this._cleanPath();
176
- return e && ot(e) || null;
176
+ return e && ut(e) || null;
177
177
  }
178
178
  getPath() {
179
179
  return this._path;
@@ -184,7 +184,7 @@ var Fn, G = class t {
184
184
  getExtension() {
185
185
  let e = this._cleanPath();
186
186
  if (!e) return null;
187
- let t = O(e);
187
+ let t = E(e);
188
188
  return t ? t.toLowerCase() : null;
189
189
  }
190
190
  getEncryption() {
@@ -234,18 +234,18 @@ var Fn, G = class t {
234
234
  ];
235
235
  return `${t} ${(n / 1024 ** r).toFixed(2)}${i[Math.min(r, i.length - 1)]}`;
236
236
  }
237
- }, K = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new Set(), Ln = (e) => K.get(e) ?? null, Rn = () => Array.from(In, (e) => e.getOrigin()), zn = class t {
237
+ }, K = /* @__PURE__ */ new WeakMap(), Bn = /* @__PURE__ */ new Set(), Vn = (e) => K.get(e) ?? null, Hn = () => Array.from(Bn, (e) => e.getOrigin()), Un = class e {
238
238
  constructor(n) {
239
- this._released = !1, t._assertFree(n), this._emitter = new e(this), this._origin = n, K.set(n, this), In.add(this);
239
+ this._released = !1, e._assertFree(n), this._emitter = new t(this), this._origin = n, K.set(n, this), Bn.add(this);
240
240
  }
241
241
  getOrigin() {
242
242
  return this._origin;
243
243
  }
244
- setOrigin(e) {
245
- e !== this._origin && (t._assertFree(e), this._released || (K.delete(this._origin), K.set(e, this)), this._origin = e, this._emitter.notify("onOriginChange"));
244
+ setOrigin(t) {
245
+ t !== this._origin && (e._assertFree(t), this._released || (K.delete(this._origin), K.set(t, this)), this._origin = t, this._emitter.notify("onOriginChange"));
246
246
  }
247
247
  release() {
248
- this._released || (this._released = !0, K.get(this._origin) === this && K.delete(this._origin), In.delete(this));
248
+ this._released || (this._released = !0, K.get(this._origin) === this && K.delete(this._origin), Bn.delete(this));
249
249
  }
250
250
  addListeners(e, t) {
251
251
  return this._emitter.addListeners(e, t);
@@ -253,7 +253,7 @@ var Fn, G = class t {
253
253
  static _assertFree(e) {
254
254
  if (K.has(e)) throw Error("This origin already backs an open workbook; an origin backs one workbook at a time.");
255
255
  }
256
- }, Bn = class {
256
+ }, Wn = class {
257
257
  constructor() {
258
258
  this._defaultStringSourceType = "filepath";
259
259
  }
@@ -271,10 +271,10 @@ var Fn, G = class t {
271
271
  }
272
272
  switch (o) {
273
273
  case "file": {
274
- let e = n, r = e?.name, o = r ? `${ot(r)}` : "";
274
+ let e = n, r = e?.name, o = r ? `${ut(r)}` : "";
275
275
  s = await e.arrayBuffer(), c = {
276
276
  format: a,
277
- ext: O(r),
277
+ ext: E(r),
278
278
  name: o,
279
279
  absolutePath: r,
280
280
  size: e.size,
@@ -298,7 +298,7 @@ var Fn, G = class t {
298
298
  let [, t] = n.split(",");
299
299
  e = t;
300
300
  } else e = n;
301
- s = xn.base64ToArrayBuffer(e), c = {
301
+ s = wn.base64ToArrayBuffer(e), c = {
302
302
  format: a,
303
303
  size: e.length
304
304
  };
@@ -314,7 +314,7 @@ var Fn, G = class t {
314
314
  e = i.input, t = i.init, r = i.timeout;
315
315
  }
316
316
  }
317
- let i = r || 3e4, o = new AbortController(), l = setTimeout(() => o.abort(), i), u = typeof e == "string" ? e : e.toString(), d = O(u);
317
+ let i = r || 3e4, o = new AbortController(), l = setTimeout(() => o.abort(), i), u = typeof e == "string" ? e : e.toString(), d = E(u);
318
318
  try {
319
319
  let n = await fetch(e, {
320
320
  ...t,
@@ -326,7 +326,7 @@ var Fn, G = class t {
326
326
  s = r, c = {
327
327
  format: a,
328
328
  ext: d,
329
- name: ot(u, !0),
329
+ name: ut(u, !0),
330
330
  absolutePath: u
331
331
  };
332
332
  } catch (e) {
@@ -366,7 +366,7 @@ var Fn, G = class t {
366
366
  return t.absolutePath ? this.findOpenPath(t.absolutePath) : null;
367
367
  }
368
368
  findOpenPath(e, t) {
369
- return Rn().find((n) => {
369
+ return Hn().find((n) => {
370
370
  if (n === t || !n.canWrite()) return !1;
371
371
  let r = n.getPath();
372
372
  return !!r && this.isSamePath(r, e);
@@ -397,21 +397,21 @@ var Fn, G = class t {
397
397
  }
398
398
  if (typeof File < "u" && e instanceof File) return "file";
399
399
  if (typeof Blob < "u" && e instanceof Blob) return "blob";
400
- let t = e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]", n = ArrayBuffer.isView(e), r = xn.isNodeBuffer(e);
400
+ let t = e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]", n = ArrayBuffer.isView(e), r = wn.isNodeBuffer(e);
401
401
  return t || n || r ? "buffer" : typeof ReadableStream < "u" && e instanceof ReadableStream || Object.prototype.toString.call(e) === "[object ReadableStream]" || e && typeof e.getReader == "function" && e.locked !== void 0 ? "stream" : null;
402
402
  }
403
- }, Vn = class extends Bn {
403
+ }, Gn = class extends Wn {
404
404
  constructor(e, t) {
405
405
  super(), this._getWriteFormats = e, this._getReadFormats = t, this._defaultStringSourceType = "fetch", this._handleCache = /* @__PURE__ */ new WeakMap();
406
406
  }
407
407
  async fileFromHandle(e) {
408
- return Un(e) ? e.getFile() : null;
408
+ return qn(e) ? e.getFile() : null;
409
409
  }
410
410
  async resolveSource() {
411
411
  let e = await this._getReadFormats?.() ?? [];
412
412
  if (typeof globalThis.showOpenFilePicker == "function") try {
413
413
  let t = function(e) {
414
- let t = Hn(e);
414
+ let t = Kn(e);
415
415
  if (t.length <= 1) return t;
416
416
  let n = /* @__PURE__ */ new Set(), r = {};
417
417
  for (let e of t) for (let [t, i] of Object.entries(e.accept)) for (let e of i) n.has(e) || (n.add(e), (r[t] ??= []).push(e));
@@ -426,13 +426,13 @@ var Fn, G = class t {
426
426
  throw e;
427
427
  }
428
428
  let t = e.flatMap((e) => e.exts.map((e) => "." + e)).join(", ");
429
- return Sn.openFileDialog(t);
429
+ return Tn.openFileDialog(t);
430
430
  }
431
431
  async findOpenOrigin(e) {
432
- return Un(e) ? this._findOpenHandle(e) : null;
432
+ return qn(e) ? this._findOpenHandle(e) : null;
433
433
  }
434
434
  async _findOpenHandle(e, t) {
435
- for (let n of Rn()) {
435
+ for (let n of Hn()) {
436
436
  if (n === t || !n.canWrite()) continue;
437
437
  let r = this._handleCache.get(n);
438
438
  if (r && typeof r.isSameEntry == "function" && await r.isSameEntry(e)) return n;
@@ -440,7 +440,7 @@ var Fn, G = class t {
440
440
  return null;
441
441
  }
442
442
  async onWorkbookRead(e, t) {
443
- if (!Un(t)) return;
443
+ if (!qn(t)) return;
444
444
  let n = e.getOrigin?.();
445
445
  n?.canWrite() && this._handleCache.set(n, t);
446
446
  }
@@ -467,17 +467,17 @@ var Fn, G = class t {
467
467
  if (!a) {
468
468
  c = await globalThis.showSaveFilePicker({
469
469
  suggestedName: n,
470
- types: Hn(o)
470
+ types: Kn(o)
471
471
  });
472
472
  let t = await this._findOpenHandle(c, e.workbook?.getOrigin?.());
473
473
  if (t) throw new B(W("error.io.openElsewhere", { name: t.getName() ?? c.name ?? "" }));
474
474
  }
475
- let s = Gn(c.name ?? n), l = o.find((e) => e.exts.some((e) => e.toLowerCase() === s)) ?? r, u = a ? t : new G(c.name ?? n, {
475
+ let s = Yn(c.name ?? n), l = o.find((e) => e.exts.some((e) => e.toLowerCase() === s)) ?? r, u = a ? t : new G(c.name ?? n, {
476
476
  format: l.key,
477
477
  canWrite: !0
478
478
  }), d = await i(l.key, u);
479
479
  if (!d) return null;
480
- let f = new Blob([Wn(d)], { type: l.mimeType || "application/octet-stream" }), p = await c.createWritable();
480
+ let f = new Blob([Jn(d)], { type: l.mimeType || "application/octet-stream" }), p = await c.createWritable();
481
481
  if (await p.write(f), await p.close(), this._handleCache.set(u, c), u instanceof G) {
482
482
  let e = await Promise.resolve(c.getFile?.()).then((e) => e?.lastModified ?? null, () => null);
483
483
  u.update({
@@ -490,19 +490,19 @@ var Fn, G = class t {
490
490
  if (e?.name === "AbortError") return null;
491
491
  if (e instanceof B) throw e;
492
492
  }
493
- let l = t.getPath(), u = l ? l.split(/[/\\]/).pop() : null, d = u && r.exts.some((e) => e.toLowerCase() === Gn(u)) ? u : n, f = l !== d || t.canWrite() ? new G(d, {
493
+ let l = t.getPath(), u = l ? l.split(/[/\\]/).pop() : null, d = u && r.exts.some((e) => e.toLowerCase() === Yn(u)) ? u : n, f = l !== d || t.canWrite() ? new G(d, {
494
494
  format: r.key,
495
495
  canWrite: !1
496
496
  }) : t, p = await i(r.key, f);
497
497
  if (!p) return null;
498
- let m = new Blob([Wn(p)], { type: r.mimeType || "application/octet-stream" });
498
+ let m = new Blob([Jn(p)], { type: r.mimeType || "application/octet-stream" });
499
499
  return function(e, t) {
500
500
  let n = URL.createObjectURL(e), r = document.createElement("a");
501
501
  r.style.display = "none", r.href = n, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
502
502
  }(m, d), f instanceof G && f.update({ size: m.size }), f;
503
503
  }
504
504
  };
505
- function Hn(e) {
505
+ function Kn(e) {
506
506
  return e.map((e) => {
507
507
  let t = e.mimeType && e.mimeType.includes("/") ? e.mimeType : "application/octet-stream";
508
508
  return {
@@ -511,27 +511,27 @@ function Hn(e) {
511
511
  };
512
512
  });
513
513
  }
514
- function Un(e) {
514
+ function qn(e) {
515
515
  return !!e && e.kind === "file" && typeof e.getFile == "function";
516
516
  }
517
- function Wn(e) {
517
+ function Jn(e) {
518
518
  if (typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) {
519
519
  let t = new ArrayBuffer(e.byteLength);
520
520
  return new Uint8Array(t).set(new Uint8Array(e)), t;
521
521
  }
522
522
  return e;
523
523
  }
524
- function Gn(e) {
524
+ function Yn(e) {
525
525
  let t = e.lastIndexOf(".");
526
526
  return t >= 0 ? e.slice(t + 1).toLowerCase() : "";
527
527
  }
528
- (Fn ||= {}).SortOn = {
528
+ (zn ||= {}).SortOn = {
529
529
  Value: "value",
530
530
  FillColor: "fillColor",
531
531
  FontColor: "fontColor",
532
532
  Icon: "icon"
533
533
  };
534
- var Kn = {
534
+ var Xn = {
535
535
  TopLeft: "tl",
536
536
  Top: "t",
537
537
  TopRight: "tr",
@@ -541,7 +541,7 @@ var Kn = {
541
541
  BottomLeft: "bl",
542
542
  Bottom: "b",
543
543
  BottomRight: "br"
544
- }, q = ln.BuiltInName, qn = {
544
+ }, q = vn.BuiltInName, Zn = {
545
545
  [q.Normal]: U("style.builtin.normal"),
546
546
  [q.Comma]: U("style.builtin.comma"),
547
547
  [q.Currency]: U("style.builtin.currency"),
@@ -563,31 +563,31 @@ var Kn = {
563
563
  [q.Bad]: U("style.builtin.bad"),
564
564
  [q.Neutral]: U("style.builtin.neutral"),
565
565
  [q.ExplanatoryText]: U("style.builtin.explanatoryText")
566
- }, Jn = U("style.builtin.heading"), Yn = U("style.builtin.accent"), Xn = U("style.builtin.accentTint"), Zn = /^Heading ([1-4])$/, Qn = /^Accent([1-6])$/, $n = /^(20|40|60)% - Accent([1-6])$/;
567
- function er(e) {
568
- let t = qn[e];
566
+ }, Qn = U("style.builtin.heading"), $n = U("style.builtin.accent"), er = U("style.builtin.accentTint"), tr = /^Heading ([1-4])$/, nr = /^Accent([1-6])$/, rr = /^(20|40|60)% - Accent([1-6])$/;
567
+ function ir(e) {
568
+ let t = Zn[e];
569
569
  if (t) return { key: t };
570
- let n = Zn.exec(e);
570
+ let n = tr.exec(e);
571
571
  return n ? {
572
- key: Jn,
572
+ key: Qn,
573
573
  params: { n: +n[1] }
574
- } : (n = Qn.exec(e), n ? {
575
- key: Yn,
574
+ } : (n = nr.exec(e), n ? {
575
+ key: $n,
576
576
  params: { n: +n[1] }
577
- } : (n = $n.exec(e), n ? {
578
- key: Xn,
577
+ } : (n = rr.exec(e), n ? {
578
+ key: er,
579
579
  params: {
580
580
  pct: +n[1],
581
581
  n: +n[2]
582
582
  }
583
583
  } : null));
584
584
  }
585
- var tr, nr, rr, ir, ar = (e, t, n, r, i) => {
585
+ var ar, or, sr, cr, lr = (e, t, n, r, i) => {
586
586
  let a = JSON.parse(JSON.stringify(e.definition));
587
587
  a.adjs ||= [];
588
588
  let o = "", s = 0, c = 0;
589
- t > 0 ? (c = t, s = 100 - t, o = W("op.lighterPercent", { percent: t })) : t < 0 && (s = 100 + t, o = W("op.darkerPercent", { percent: -t })), s && a.adjs.push({ [dn.AdjustmentType.LumMod]: s }), c && a.adjs.push({ [dn.AdjustmentType.LumOff]: c });
590
- let l = new fn({
589
+ t > 0 ? (c = t, s = 100 - t, o = W("op.lighterPercent", { percent: t })) : t < 0 && (s = 100 + t, o = W("op.darkerPercent", { percent: -t })), s && a.adjs.push({ [hn.AdjustmentType.LumMod]: s }), c && a.adjs.push({ [hn.AdjustmentType.LumOff]: c });
590
+ let l = new un({
591
591
  val: a.val,
592
592
  adjs: a.adjs
593
593
  }, n), u = l.toString();
@@ -598,14 +598,14 @@ var tr, nr, rr, ir, ar = (e, t, n, r, i) => {
598
598
  definition: a
599
599
  };
600
600
  };
601
- function or(e, t, n, r) {
601
+ function ur(e, t, n, r) {
602
602
  let i = [];
603
603
  for (let a = 0; a < e.length; a++) {
604
604
  let o = [];
605
605
  i.push(o);
606
606
  let s = (i) => {
607
- for (let s = 0; s < i.length; s++) o.push(ar(e[a], i[s], t, n, r));
608
- }, c = new fn({
607
+ for (let s = 0; s < i.length; s++) o.push(lr(e[a], i[s], t, n, r));
608
+ }, c = new un({
609
609
  val: e[a].definition.val,
610
610
  adjs: e[a].definition.adjs
611
611
  }, t).toHSLA().lum;
@@ -643,11 +643,11 @@ function or(e, t, n, r) {
643
643
  }
644
644
  return i;
645
645
  }
646
- (tr ||= {}).buildPalette = or, nr ||= {}, rr ||= {}, ir ||= {};
647
- var sr, J = null;
648
- function cr() {
646
+ (ar ||= {}).buildPalette = ur, or ||= {}, sr ||= {}, cr ||= {};
647
+ var dr, J = null;
648
+ function fr() {
649
649
  if (!J) {
650
- let e = import("./Tah7cnFb_HNZdLtj.mjs").then(({ initializeFunctions: e }) => {
650
+ let e = import("./DIfAk63CvaOZ3QKi.mjs").then(({ initializeFunctions: e }) => {
651
651
  let t = e(() => null);
652
652
  return Object.freeze(Array.from(t.keys()));
653
653
  });
@@ -657,14 +657,14 @@ function cr() {
657
657
  }
658
658
  return J;
659
659
  }
660
- function lr(e) {
661
- return ve.peek()?.readFormulaLiteral(e);
660
+ function pr(e) {
661
+ return Oe.peek()?.readFormulaLiteral(e);
662
662
  }
663
- function ur(e, t) {
664
- let n = dr(e), r = dr(t);
663
+ function mr(e, t) {
664
+ let n = hr(e), r = hr(t);
665
665
  return n === r ? e === t ? 0 : typeof e == "number" && typeof t == "number" ? e < t ? -1 : 1 : typeof e == "string" && typeof t == "string" ? e < t ? -1 : +(e > t) : typeof e == "boolean" ? e ? 1 : -1 : I.isError(e) && I.isError(t) ? e.getCode() - t.getCode() : 0 : n - r;
666
666
  }
667
- function dr(e) {
667
+ function hr(e) {
668
668
  if (e === null) return 0;
669
669
  switch (typeof e) {
670
670
  case "number": return 1;
@@ -675,13 +675,13 @@ function dr(e) {
675
675
  }
676
676
  (function(e) {
677
677
  function t(e) {
678
- return ve.peek()?.getFunctionDeclaration(e) ?? null;
678
+ return Oe.peek()?.getFunctionDeclaration(e) ?? null;
679
679
  }
680
680
  e.get = t, e.has = function(e) {
681
681
  return t(e) !== null;
682
682
  };
683
- })(sr ||= {});
684
- var fr = class {
683
+ })(dr ||= {});
684
+ var gr = class {
685
685
  constructor(e) {
686
686
  this._children = e;
687
687
  }
@@ -726,19 +726,19 @@ var fr = class {
726
726
  let n = t[e].getSortedNumbers().getValues();
727
727
  n.length > 0 && r.push(n);
728
728
  }
729
- e = new wt(function(e) {
729
+ e = new kt(function(e) {
730
730
  let t = e.length;
731
- if (t === 0) return pr;
731
+ if (t === 0) return _r;
732
732
  if (t === 1) return e[0];
733
733
  let n = e[0];
734
- for (let r = 1; r < t; r++) n = mr(n, e[r]);
734
+ for (let r = 1; r < t; r++) n = vr(n, e[r]);
735
735
  return Object.freeze(n);
736
736
  }(r)), this._sortedNumbers = e;
737
737
  }
738
738
  return e;
739
739
  }
740
740
  getRanked(e) {
741
- return st(this._children, e, ur)[Symbol.iterator]();
741
+ return ft(this._children, e, mr)[Symbol.iterator]();
742
742
  }
743
743
  getFrequencies(e) {
744
744
  if (e) return this._mergeFrequencies(e);
@@ -746,7 +746,7 @@ var fr = class {
746
746
  return t || (t = this._mergeFrequencies(), this._frequencies = t), t;
747
747
  }
748
748
  _mergeFrequencies(e) {
749
- let t = e?.keyFn ?? p, n = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, a = i.length, o = 0, s = 0, c = !1;
749
+ let t = e?.keyFn ?? Vt, n = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, a = i.length, o = 0, s = 0, c = !1;
750
750
  for (let l = 0; l < a; l++) {
751
751
  let a = i[l].getFrequencies(e);
752
752
  o += a.getVisitedCount(), s += a.getTotalCount(), c ||= a.isTruncated();
@@ -759,7 +759,7 @@ var fr = class {
759
759
  }) : c = !0, d = u.next();
760
760
  }
761
761
  }
762
- return Pe.fromGroups(r, t, e, ur, o, s, c);
762
+ return g.fromGroups(r, t, e, mr, o, s, c);
763
763
  }
764
764
  getTypedCounts(e) {
765
765
  let t = this._typedCounts;
@@ -809,24 +809,24 @@ var fr = class {
809
809
  let a = n.numericalCount;
810
810
  a <= 0 || (r.numericalCount += a, r.sum += n.sum, r.sumSq += n.varP * a + n.sum * n.sum / a, (r.min === void 0 || n.min < r.min) && (r.min = n.min), (r.max === void 0 || n.max > r.max) && (r.max = n.max));
811
811
  }
812
- return Xe(r);
812
+ return Ze(r);
813
813
  }
814
- }, pr = Object.freeze([]);
815
- function mr(e, t) {
814
+ }, _r = Object.freeze([]);
815
+ function vr(e, t) {
816
816
  let n = e.length, r = t.length, i = Array(n + r), a = 0, o = 0, s = 0;
817
817
  for (; a < n && o < r;) i[s++] = e[a] <= t[o] ? e[a++] : t[o++];
818
818
  for (; a < n;) i[s++] = e[a++];
819
819
  for (; o < r;) i[s++] = t[o++];
820
820
  return i;
821
821
  }
822
- var hr, gr = class {
822
+ var yr, br = class {
823
823
  constructor(e, t) {
824
824
  this._source = null, this.cacheId = e, this.part = t;
825
825
  }
826
826
  _hold(e) {
827
827
  let t = this.part?.xml;
828
828
  if (!t || this._source) return;
829
- let n = Oe(t, "worksheetSource", "ref"), r = Oe(t, "worksheetSource", "sheet");
829
+ let n = o(t, "worksheetSource", "ref"), r = o(t, "worksheetSource", "sheet");
830
830
  if (!n || !r || n.includes("#REF!")) return;
831
831
  let i = e(r);
832
832
  if (!i) return;
@@ -835,7 +835,7 @@ var hr, gr = class {
835
835
  wired: null,
836
836
  last: null
837
837
  };
838
- this._source = a, i(`${et(r)}!${Je(n)}`, (e) => {
838
+ this._source = a, i(`${ct(r)}!${je(n)}`, (e) => {
839
839
  a.formula = e.formula;
840
840
  let t = e.formula.getExpression();
841
841
  a.wired ??= t, e.formula.hasRefError() || (a.last = t);
@@ -846,8 +846,8 @@ var hr, gr = class {
846
846
  if (!e || !t?.formula) return e;
847
847
  let n = t.formula.hasRefError() ? t.last : t.formula.getExpression();
848
848
  if (n === null || n === t.wired) return e;
849
- let r = v(n);
850
- return r ? nt(nt(e, "worksheetSource", "ref", a(r.reference)), "worksheetSource", "sheet", r.sheet) : nt(e, "worksheetSource", "ref", a(n));
849
+ let r = _(n);
850
+ return r ? Ft(Ft(e, "worksheetSource", "ref", ot(r.reference)), "worksheetSource", "sheet", r.sheet) : Ft(e, "worksheetSource", "ref", ot(n));
851
851
  }
852
852
  toJSON(e) {
853
853
  let t = { cacheId: this.cacheId }, n = k.toJSON(this.part, e);
@@ -857,7 +857,7 @@ var hr, gr = class {
857
857
  }
858
858
  return t;
859
859
  }
860
- }, _r = class {
860
+ }, xr = class {
861
861
  constructor(e, t) {
862
862
  this._deleted = !1, this._json = { ...e }, this._deleteFromCollection = t ?? null;
863
863
  }
@@ -891,7 +891,7 @@ var hr, gr = class {
891
891
  get isIPerson() {
892
892
  return !0;
893
893
  }
894
- }, vr = class extends Ht {
894
+ }, Sr = class extends $e {
895
895
  constructor(e) {
896
896
  super(), this._byId = /* @__PURE__ */ new Map(), this._byDisplayName = /* @__PURE__ */ new Map(), this._items = null, this._current = null, e && this.fromJSON(e);
897
897
  }
@@ -912,7 +912,7 @@ var hr, gr = class {
912
912
  let e = this._byDisplayName.get(r);
913
913
  if (e) return e;
914
914
  }
915
- let i = new _r({
915
+ let i = new xr({
916
916
  ...t,
917
917
  displayName: r,
918
918
  id: n ?? R.uuidV4().toUpperCase()
@@ -955,7 +955,7 @@ var hr, gr = class {
955
955
  get isIPersonCollection() {
956
956
  return !0;
957
957
  }
958
- }, yr = (e, t) => {
958
+ }, Cr = (e, t) => {
959
959
  let n = [0];
960
960
  for (let t = 0; t < e.length; t++) e[t] === "\n" && n.push(t + 1);
961
961
  let r = t.map((e) => ` ${((e) => {
@@ -967,9 +967,9 @@ var hr, gr = class {
967
967
  return `${t + 1}:${e - n[t] + 1}`;
968
968
  })(e.start)} ${e.code}: ${e.message}`), i = t.length;
969
969
  return `Script has ${i} compile error${i === 1 ? "" : "s"}:\n${r.join("\n")}`;
970
- }, br = class {
971
- constructor(t) {
972
- this._options = t, this._emitter = new e(this), this._initState();
970
+ }, wr = class {
971
+ constructor(e) {
972
+ this._options = e, this._emitter = new t(this), this._initState();
973
973
  }
974
974
  _initState() {}
975
975
  getModules() {
@@ -992,13 +992,13 @@ var hr, gr = class {
992
992
  minify: !0,
993
993
  ...e
994
994
  });
995
- return t.module ? await D(tt.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
995
+ return t.module ? await O(lt.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
996
996
  }
997
997
  addModule(e, t, n) {
998
998
  this._modules.add(e, t, n);
999
999
  }
1000
1000
  async addModuleFromJSON(e, t, n) {
1001
- let r = await D(e, t);
1001
+ let r = await O(e, t);
1002
1002
  return this.addModule(e, r, n), r;
1003
1003
  }
1004
1004
  executeMacro(e, t, n) {
@@ -1014,7 +1014,7 @@ var hr, gr = class {
1014
1014
  }
1015
1015
  async run(e, t) {
1016
1016
  try {
1017
- let n = typeof e == "string" ? await this.createModule({ source: e }) : await D(tt.DEFAULT_MODULE, e), r = typeof e == "string" ? e : e?.source ?? "";
1017
+ let n = typeof e == "string" ? await this.createModule({ source: e }) : await O(lt.DEFAULT_MODULE, e), r = typeof e == "string" ? e : e?.source ?? "";
1018
1018
  return await this._runModule(n, r, t);
1019
1019
  } catch (e) {
1020
1020
  return {
@@ -1031,7 +1031,7 @@ var hr, gr = class {
1031
1031
  };
1032
1032
  let i = e.getDiagnostics(), a = i.filter((e) => e.severity === "error");
1033
1033
  if (a.length > 0) {
1034
- let e = Error(yr(t, a));
1034
+ let e = Error(Cr(t, a));
1035
1035
  return e.diagnostics = a, {
1036
1036
  ok: !1,
1037
1037
  error: e,
@@ -1082,7 +1082,7 @@ var hr, gr = class {
1082
1082
  }
1083
1083
  if (!i || i.length === 0) return R.EmptyArray;
1084
1084
  let o = e?.text ? e.text.trim().toUpperCase() : null;
1085
- return o ? Mt(i, o) : i.sort((e, t) => {
1085
+ return o ? at(i, o) : i.sort((e, t) => {
1086
1086
  let n = e.getName().toUpperCase(), r = t.getName().toUpperCase();
1087
1087
  return n < r ? -1 : +(n > r);
1088
1088
  }), n !== void 0 && i.length > n ? i.slice(0, n) : i;
@@ -1109,7 +1109,7 @@ var hr, gr = class {
1109
1109
  }), r = t.length;
1110
1110
  for (let n = 0; n < r; n++) await t[n].execute(e);
1111
1111
  } catch (e) {
1112
- En.error("Error executing autoRun script:", e);
1112
+ An.error("Error executing autoRun script:", e);
1113
1113
  }
1114
1114
  }
1115
1115
  }
@@ -1120,13 +1120,13 @@ var hr, gr = class {
1120
1120
  for (let i = 0; i < r.length; i++) {
1121
1121
  let a = r[i], o = t[a];
1122
1122
  try {
1123
- n[a] = await D(a, o, !1, [], o?.scope === "workbook" ? e : null);
1123
+ n[a] = await O(a, o, !1, [], o?.scope === "workbook" ? e : null);
1124
1124
  } catch (e) {
1125
- En.error(`Could not load script '${a}'; it will be unavailable.`, e);
1125
+ An.error(`Could not load script '${a}'; it will be unavailable.`, e);
1126
1126
  }
1127
1127
  }
1128
1128
  }
1129
- let r = this, i = new Lt({
1129
+ let r = this, i = new ze({
1130
1130
  transactions: this._options?.transactions,
1131
1131
  initial: n,
1132
1132
  isReadOnly: () => r.isReadOnly(),
@@ -1154,15 +1154,36 @@ var hr, gr = class {
1154
1154
  get isIScript() {
1155
1155
  return !0;
1156
1156
  }
1157
- }, xr = /^([a-z][a-z0-9+.-]*):/i, Sr = (e) => {
1157
+ }, Tr = /^([a-z][a-z0-9+.-]*):/i, Er = (e) => {
1158
1158
  let t = e.toLowerCase();
1159
1159
  return t.endsWith(":") ? t : t + ":";
1160
- }, Cr = (e, t) => globalThis.fetch(e, t), wr = class {
1160
+ }, Dr = async (e, t) => {
1161
+ try {
1162
+ return await globalThis.fetch(e, t);
1163
+ } catch (n) {
1164
+ throw n instanceof TypeError && await (async (e, t) => {
1165
+ let n = globalThis.location;
1166
+ if (!n || t?.method && t.method.toUpperCase() !== "GET") return !1;
1167
+ let r = new AbortController(), i = setTimeout(() => r.abort(), 5e3);
1168
+ try {
1169
+ return new URL(e, n.href).origin !== n.origin && (await globalThis.fetch(e, {
1170
+ mode: "no-cors",
1171
+ credentials: "omit",
1172
+ signal: r.signal
1173
+ }), !0);
1174
+ } catch {
1175
+ return !1;
1176
+ } finally {
1177
+ clearTimeout(i), r.abort();
1178
+ }
1179
+ })(e, t) ? new I.Blocked("This site is restricted: it doesn't allow web apps to read its data, so the browser blocked the request for security.", { cause: n }) : n;
1180
+ }
1181
+ }, Or = class {
1161
1182
  constructor() {
1162
- this._handlers = /* @__PURE__ */ new Map([["http:", Cr], ["https:", Cr]]);
1183
+ this._handlers = /* @__PURE__ */ new Map([["http:", Dr], ["https:", Dr]]);
1163
1184
  }
1164
1185
  fetch(e, t) {
1165
- let n = xr.exec(e)?.[1], r = this._handlers.get(n ? Sr(n) : "https:");
1186
+ let n = Tr.exec(e)?.[1], r = this._handlers.get(n ? Er(n) : "https:");
1166
1187
  if (!r) return Promise.reject(/* @__PURE__ */ TypeError(`No fetcher serves '${n}:'.`));
1167
1188
  try {
1168
1189
  return r(e, t);
@@ -1171,7 +1192,7 @@ var hr, gr = class {
1171
1192
  }
1172
1193
  }
1173
1194
  register(e, t) {
1174
- let n = Sr(e), r = this._handlers.get(n);
1195
+ let n = Er(e), r = this._handlers.get(n);
1175
1196
  return this._handlers.set(n, t), () => {
1176
1197
  this._handlers.get(n) === t && (r ? this._handlers.set(n, r) : this._handlers.delete(n));
1177
1198
  };
@@ -1179,17 +1200,17 @@ var hr, gr = class {
1179
1200
  get isIFetcher() {
1180
1201
  return !0;
1181
1202
  }
1182
- }, Tr = /* @__PURE__ */ new Set([
1203
+ }, kr = /* @__PURE__ */ new Set([
1183
1204
  101,
1184
1205
  103,
1185
1206
  204,
1186
1207
  205,
1187
1208
  304
1188
- ]), Y = (e) => new Response(Tr.has(e.status) ? null : e.body, {
1209
+ ]), Y = (e) => new Response(kr.has(e.status) ? null : e.body, {
1189
1210
  status: e.status,
1190
1211
  statusText: e.statusText,
1191
1212
  headers: e.headers
1192
- }), Er = class {
1213
+ }), Ar = class {
1193
1214
  constructor(e, t) {
1194
1215
  this._kept = /* @__PURE__ */ new Map(), this._cached = /* @__PURE__ */ new Map(), this._inFlight = /* @__PURE__ */ new Map(), this._resources = e, this._fetcher = t;
1195
1216
  }
@@ -1239,7 +1260,7 @@ var hr, gr = class {
1239
1260
  });
1240
1261
  }
1241
1262
  async _request(e, t) {
1242
- let n = await this._fetcher.fetch(e, t), r = Tr.has(n.status) ? null : await n.arrayBuffer(), i = [];
1263
+ let n = await this._fetcher.fetch(e, t), r = kr.has(n.status) ? null : await n.arrayBuffer(), i = [];
1243
1264
  n.headers.forEach((e, t) => {
1244
1265
  i.push([t, e]);
1245
1266
  });
@@ -1250,14 +1271,14 @@ var hr, gr = class {
1250
1271
  body: r
1251
1272
  };
1252
1273
  if (n.ok && r && r.byteLength > 0) {
1253
- let t = await new C({ source: { buffer: r } }).getType();
1274
+ let t = await new te({ source: { buffer: r } }).getType();
1254
1275
  t?.mime.startsWith("image/") ? (a.headers = i.filter(([e]) => e.toLowerCase() !== "content-type"), a.headers.push(["content-type", t.mime])) : this._cached.set(e, a);
1255
1276
  }
1256
1277
  return a;
1257
1278
  }
1258
- }, Dr = class {
1279
+ }, jr = class {
1259
1280
  constructor(e, t, n, r) {
1260
- this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = n, this._topLeft = t ?? z.EmptyCell, this._sheet = new A({
1281
+ this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = n, this._topLeft = t ?? z.EmptyCell, this._sheet = new T({
1261
1282
  runtime: e,
1262
1283
  styles: this._styles,
1263
1284
  calcOnLoad: "none",
@@ -1278,32 +1299,32 @@ var hr, gr = class {
1278
1299
  e.includes(r) && delete i[r];
1279
1300
  }
1280
1301
  }
1281
- let a = sn(i.fontFamily);
1302
+ let a = an(i.fontFamily);
1282
1303
  r.font = {}, a && (r.font.family = a.family, r.font.fallbacks = a.fallbacks, r.font.size = a.size), r.font.size = i.fontSize, r.font.weight = i.fontWeight, r.font.style = i.fontStyle, r.font.color = i.color;
1283
- let o = an(i.textDecoration);
1284
- r.font.underline = o.underline, r.font.strike = o.strike ? M.StrikeStyle.Single : M.StrikeStyle.None, i.textUnderlineStyle && (r.font.underline = _n(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = tn(i.textAlign)), i?.textAlign && !r.alignment.horizontal && i?.textAlign !== "general" && (i.textAlign === "center-across" ? r.alignment.horizontal = N.HorizontalAlignment.CenterContinuous : i.textAlign === "fill" ? r.alignment.horizontal = N.HorizontalAlignment.Fill : i.textAlign === "121" || i.textAlign === "010" ? (r.alignment.horizontal = N.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = i.textAlign === "121") : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && (i.verticalAlign.toLowerCase() === "super" ? r.font.baseline = F.Baseline.Superscript : i.verticalAlign.toLowerCase() === "sub" ? r.font.baseline = F.Baseline.Subscript : r.alignment.vertical = Jt(i.verticalAlign), r.alignment.vertical || (i.verticalAlign === "121" ? r.alignment.vertical = N.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = i.whiteSpace === "no-wrap" || i.whiteSpace === "nowrap" ? N.Overflow.Visible : N.Overflow.Wrap), i.msoTextControl === "shrinktofit" && (r.alignment.overflow = N.Overflow.Shrink);
1304
+ let o = Zt(i.textDecoration);
1305
+ r.font.underline = o.underline, r.font.strike = o.strike ? N.StrikeStyle.Single : N.StrikeStyle.None, i.textUnderlineStyle && (r.font.underline = on(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = xn(i.textAlign)), i?.textAlign && !r.alignment.horizontal && i?.textAlign !== "general" && (i.textAlign === "center-across" ? r.alignment.horizontal = P.HorizontalAlignment.CenterContinuous : i.textAlign === "fill" ? r.alignment.horizontal = P.HorizontalAlignment.Fill : i.textAlign === "121" || i.textAlign === "010" ? (r.alignment.horizontal = P.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = i.textAlign === "121") : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && (i.verticalAlign.toLowerCase() === "super" ? r.font.baseline = M.Baseline.Superscript : i.verticalAlign.toLowerCase() === "sub" ? r.font.baseline = M.Baseline.Subscript : r.alignment.vertical = Qt(i.verticalAlign), r.alignment.vertical || (i.verticalAlign === "121" ? r.alignment.vertical = P.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = i.whiteSpace === "no-wrap" || i.whiteSpace === "nowrap" ? P.Overflow.Visible : P.Overflow.Wrap), i.msoTextControl === "shrinktofit" && (r.alignment.overflow = P.Overflow.Shrink);
1285
1306
  let s = null;
1286
1307
  if (i.background ? s = i.background : i.backgroundColor && (s = i.backgroundColor), s && (r.fill = { color: s }), i.msoPattern) {
1287
- let e = cn(i.msoPattern);
1288
- e && (e.patternType === un.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== un.BuiltInSheetPattern.None && (s && (e.background = s), r.fill = e));
1308
+ let e = en(i.msoPattern);
1309
+ e && (e.patternType === yn.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== yn.BuiltInSheetPattern.None && (s && (e.background = s), r.fill = e));
1289
1310
  }
1290
- i.layoutFlow === "vertical" || i.layoutFlow === "vertical-ideographic" ? r.alignment.stacked = !0 : i.msoRotate !== void 0 && (r.alignment.rotation = $t(i.msoRotate));
1311
+ i.layoutFlow === "vertical" || i.layoutFlow === "vertical-ideographic" ? r.alignment.stacked = !0 : i.msoRotate !== void 0 && (r.alignment.rotation = nn(i.msoRotate));
1291
1312
  let c = (e, t) => {
1292
1313
  e && (r.borders ||= {}, r.borders[e] = t);
1293
1314
  };
1294
1315
  i.border && i.border !== "none" && (c("top", i.border), c("left", i.border), c("right", i.border), c("bottom", i.border)), i.borderTop && c("top", i.borderTop), i.borderLeft && c("left", i.borderLeft), i.borderRight && c("right", i.borderRight), i.borderBottom && c("bottom", i.borderBottom), i.msoDiagonalUp && c("diagonalUp", i.msoDiagonalUp), i.msoDiagonalDown && c("diagonalDown", i.msoDiagonalDown);
1295
1316
  let l = r.numberFormat;
1296
- i.msoNumberFormat && (l = mn(i.msoNumberFormat), l.includes("\\") ? l = null : l === "Fixed" ? l = P.Styles.lookupStyle(r.numberFormat).formatType === P.Type.Number ? null : P.Type.Number : l === "Percent" && (l = P.Styles.lookupStyle(r.numberFormat).formatType === P.Type.Percentage ? null : P.Type.Percentage)), l && (r.numberFormat = l), e.style = this._styles.normalize(r), n && Object.keys(e.style).length === 0 && delete e.style;
1317
+ i.msoNumberFormat && (l = cn(i.msoNumberFormat), l.includes("\\") ? l = null : l === "Fixed" ? l = F.Styles.lookupStyle(r.numberFormat).formatType === F.Type.Number ? null : F.Type.Number : l === "Percent" && (l = F.Styles.lookupStyle(r.numberFormat).formatType === F.Type.Percentage ? null : F.Type.Percentage)), l && (r.numberFormat = l), e.style = this._styles.normalize(r), n && Object.keys(e.style).length === 0 && delete e.style;
1297
1318
  }
1298
1319
  onCell(e, t, n, r, i) {
1299
1320
  let a = r(i), o = { value: t === void 0 ? n ?? "" : t };
1300
1321
  if (typeof o.value == "string" && o.value.length === 0 && (o.value = void 0), a && this.applyCSSStyle(o, a), typeof o.value == "string" && /^#+$/.test(o.value)) {
1301
1322
  let e = o.style?.numberFormat;
1302
- e && (on(e) || Yt(e)) && (o.value = I.BuiltIn.Num);
1323
+ e && (bn(e) || rn(e)) && (o.value = I.BuiltIn.Num);
1303
1324
  }
1304
1325
  if (i?.tagName.toUpperCase() === "TD") {
1305
1326
  let e = o.style, t = e?.font ?? {};
1306
- (i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike = M.StrikeStyle.Single), i.querySelectorAll("sub").length > 0 && (t.baseline = F.Baseline.Subscript), i.querySelectorAll("sup").length > 0 && (t.baseline = F.Baseline.Superscript), (i.querySelectorAll("b").length > 0 || i.querySelectorAll("strong").length > 0) && (t.weight = 700), i.querySelectorAll("i").length > 0 && (t.style = M.Style.Italic), i.querySelectorAll("u").length > 0 && (t.underline = M.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, o.style = e), e.font || (e.font = t));
1327
+ (i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike = N.StrikeStyle.Single), i.querySelectorAll("sub").length > 0 && (t.baseline = M.Baseline.Subscript), i.querySelectorAll("sup").length > 0 && (t.baseline = M.Baseline.Superscript), (i.querySelectorAll("b").length > 0 || i.querySelectorAll("strong").length > 0) && (t.weight = 700), i.querySelectorAll("i").length > 0 && (t.style = N.Style.Italic), i.querySelectorAll("u").length > 0 && (t.underline = N.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, o.style = e), e.font || (e.font = t));
1307
1328
  let n = i.querySelectorAll("a");
1308
1329
  if (n.length > 0) {
1309
1330
  let e = n[0].getAttribute("href");
@@ -1350,8 +1371,8 @@ var hr, gr = class {
1350
1371
  let i = n(r);
1351
1372
  if (i.msoHeightSource !== "userset" || !r) return;
1352
1373
  let a = r.getAttribute("height") ?? i.height, o = null;
1353
- if (a && (o = Qt(a, this._styles.getNormal().getFont().getSize(), "px")), o === null) for (let e = 0; e < r.cells.length; e++) {
1354
- let t = r.cells[e], i = t.getAttribute("height") ?? n(t).height, a = Qt(i, this._styles.getNormal().getFont().getSize(), "px");
1374
+ if (a && (o = sn(a, this._styles.getNormal().getFont().getSize(), "px")), o === null) for (let e = 0; e < r.cells.length; e++) {
1375
+ let t = r.cells[e], i = t.getAttribute("height") ?? n(t).height, a = sn(i, this._styles.getNormal().getFont().getSize(), "px");
1355
1376
  a !== null && (o = Math.max(a, o ?? 0));
1356
1377
  }
1357
1378
  o !== null && this._rowsReading.push({
@@ -1359,19 +1380,19 @@ var hr, gr = class {
1359
1380
  min: this._topLeft.rowIndex + e,
1360
1381
  max: this._topLeft.rowIndex + e + t - 1
1361
1382
  },
1362
- update: { size: o * M.getDeviceScale() }
1383
+ update: { size: o * N.getDeviceScale() }
1363
1384
  });
1364
1385
  }
1365
1386
  onColumn(e, t, n, r) {
1366
1387
  let i = n(r);
1367
1388
  if (i.msoWidthSource !== "userset" || !r) return;
1368
1389
  let a = r.getAttribute("width") ?? i.width, o = null;
1369
- a && (o = Qt(a, this._styles.getNormal().getFont().getSize(), "px")), o !== null && this._colsReading.push({
1390
+ a && (o = sn(a, this._styles.getNormal().getFont().getSize(), "px")), o !== null && this._colsReading.push({
1370
1391
  address: {
1371
1392
  min: this._topLeft.colIndex + e,
1372
1393
  max: this._topLeft.colIndex + e + t - 1
1373
1394
  },
1374
- update: { size: o * M.getDeviceScale() }
1395
+ update: { size: o * N.getDeviceScale() }
1375
1396
  });
1376
1397
  }
1377
1398
  onDone() {
@@ -1382,9 +1403,9 @@ var hr, gr = class {
1382
1403
  sheet() {
1383
1404
  return this._sheet;
1384
1405
  }
1385
- }, Or = class {
1406
+ }, Mr = class {
1386
1407
  constructor(e) {
1387
- if (!e) throw new Dn("snapshot is required.");
1408
+ if (!e) throw new jn("snapshot is required.");
1388
1409
  this._snapshot = e;
1389
1410
  }
1390
1411
  getItemType() {
@@ -1414,9 +1435,9 @@ var hr, gr = class {
1414
1435
  get isClipboardItem() {
1415
1436
  return !0;
1416
1437
  }
1417
- }, kr = class {
1438
+ }, Nr = class {
1418
1439
  constructor(e, t, n, r, i) {
1419
- if (this._parsed = void 0, this._runtime = e, !t) throw new Dn("nativeItems are required.");
1440
+ if (this._parsed = void 0, this._runtime = e, !t) throw new jn("nativeItems are required.");
1420
1441
  this._topLeft = n ?? z.EmptyCell, this._native = t, this._markOptions = Object.freeze(r ?? {}), this._styles = i;
1421
1442
  }
1422
1443
  getItemType() {
@@ -1462,15 +1483,15 @@ var hr, gr = class {
1462
1483
  async parse() {
1463
1484
  let e, t = this._native?.text, n = this._native.html;
1464
1485
  if (n === null && t && t.includes("<table")) try {
1465
- let e = new DOMParser().parseFromString(t, Tn.Html), r = e.querySelector("parsererror");
1486
+ let e = new DOMParser().parseFromString(t, kn.Html), r = e.querySelector("parsererror");
1466
1487
  if (r) throw new B("Unable to parse: " + r);
1467
1488
  n = e, t = null;
1468
1489
  } catch {
1469
1490
  console.warn("Discovered text as html table but could could not parse.");
1470
1491
  }
1471
1492
  try {
1472
- let r = new Dr(this._runtime, this._topLeft, this._styles, n ? "HTML" : "Text"), i = await Promise.resolve(t ? re(t) : [[]]), a;
1473
- if (x(n, i, r) ? (e = r.sheet(), a = e.getUsedRange()) : n = null, a) {
1493
+ let r = new jr(this._runtime, this._topLeft, this._styles, n ? "HTML" : "Text"), i = await Promise.resolve(t ? me(t) : [[]]), a;
1494
+ if (se(n, i, r) ? (e = r.sheet(), a = e.getUsedRange()) : n = null, a) {
1474
1495
  let t = a.getSnapshot();
1475
1496
  return this._parsed = {
1476
1497
  prepare: (e, n) => t.prepare?.(e, n),
@@ -1484,23 +1505,24 @@ var hr, gr = class {
1484
1505
  throw e;
1485
1506
  }
1486
1507
  if (!t && !n && this._native.image) {
1487
- let e = await this._native.image.arrayBuffer(), t = null;
1508
+ let e = await this._native.image.arrayBuffer(), t = Dn.getPngStatedSize(e), n = null;
1488
1509
  return this._parsed = {
1489
- async prepare(n) {
1490
- let r = n.getWorksheet();
1491
- t = {
1492
- sheet: r,
1493
- options: await r.getMovables()._preparePicture({ source: { buffer: e } }, {
1510
+ async prepare(r) {
1511
+ let i = r.getWorksheet();
1512
+ n = {
1513
+ sheet: i,
1514
+ options: await i.getMovables()._preparePicture({ source: { buffer: e } }, {
1494
1515
  type: "picture",
1495
1516
  description: U("op.copyImageFromClipboard"),
1496
- autoSelect: !0
1517
+ autoSelect: !0,
1518
+ ...t && { bounds: t }
1497
1519
  })
1498
1520
  };
1499
1521
  },
1500
- copyTo(e, n) {
1522
+ copyTo(e, t) {
1501
1523
  let r = e.getWorksheet();
1502
- if (t?.sheet !== r) throw Error("The image was not prepared for this sheet.");
1503
- return r.getMovables()._insertNow(t.options), null;
1524
+ if (n?.sheet !== r) throw Error("The image was not prepared for this sheet.");
1525
+ return r.getMovables()._insertNow(n.options), null;
1504
1526
  },
1505
1527
  getName: () => "Image"
1506
1528
  }, !0;
@@ -1510,9 +1532,9 @@ var hr, gr = class {
1510
1532
  get isClipboardItem() {
1511
1533
  return !0;
1512
1534
  }
1513
- }, Ar = class {
1514
- constructor(t) {
1515
- this._closed = !1, this._kind = t.kind, this._id = t.id, this._part = t.part, this._styles = t.styles, this._tabColor = t.tabColor ? this._styles.parseColor(t.tabColor) : null, this._transactions = t.transactions, this._workbook = t.workbook ?? null, this._container = t.container, this._emitter = new e(this, this._transactions);
1535
+ }, Pr = class {
1536
+ constructor(e) {
1537
+ this._closed = !1, this._kind = e.kind, this._id = e.id, this._part = e.part, this._styles = e.styles, this._tabColor = e.tabColor ? this._styles.parseColor(e.tabColor) : null, this._transactions = e.transactions, this._workbook = e.workbook ?? null, this._container = e.container, this._emitter = new t(this, this._transactions);
1516
1538
  }
1517
1539
  getKind() {
1518
1540
  return this._kind;
@@ -1527,11 +1549,11 @@ var hr, gr = class {
1527
1549
  return this._assertOpen(), this._container.setName(e, t), this;
1528
1550
  }
1529
1551
  getVisibility() {
1530
- return this._closed ? T.Visibility.VeryHidden : this._container.getVisibility();
1552
+ return this._closed ? A.Visibility.VeryHidden : this._container.getVisibility();
1531
1553
  }
1532
1554
  setVisibility(e = !0, t) {
1533
1555
  let n;
1534
- return this._assertOpen(), n = !0 === e ? T.Visibility.Visible : !1 === e ? T.Visibility.Hidden : e, this._container.setVisibility(n, t), this;
1556
+ return this._assertOpen(), n = !0 === e ? A.Visibility.Visible : !1 === e ? A.Visibility.Hidden : e, this._container.setVisibility(n, t), this;
1535
1557
  }
1536
1558
  getIndex() {
1537
1559
  return this._container.getIndex();
@@ -1599,12 +1621,12 @@ var hr, gr = class {
1599
1621
  return !0;
1600
1622
  }
1601
1623
  };
1602
- (hr ||= {}).Visibility = {
1624
+ (yr ||= {}).Visibility = {
1603
1625
  Visible: "visible",
1604
1626
  Hidden: "hidden",
1605
1627
  VeryHidden: "veryHidden"
1606
1628
  };
1607
- var X, jr = {
1629
+ var X, Fr = {
1608
1630
  showFormulaBar: !0,
1609
1631
  showTabs: !0,
1610
1632
  tabRatio: 600,
@@ -1615,11 +1637,11 @@ var X, jr = {
1615
1637
  firstTab: 0,
1616
1638
  windowBounds: null,
1617
1639
  minimized: !1,
1618
- visibility: hr.Visibility.Visible,
1640
+ visibility: yr.Visibility.Visible,
1619
1641
  autoFilterDateGrouping: !0
1620
- }, Mr = class {
1621
- constructor(t) {
1622
- this._id = R.uuidV4(), this._emitter = new e(this), this._state = { ...jr }, t?.json && this._fromJSON(t?.json);
1642
+ }, Ir = class {
1643
+ constructor(e) {
1644
+ this._id = R.uuidV4(), this._emitter = new t(this), this._state = { ...Fr }, e?.json && this._fromJSON(e?.json);
1623
1645
  }
1624
1646
  getId() {
1625
1647
  return this._id;
@@ -1707,7 +1729,7 @@ var X, jr = {
1707
1729
  let e = {}, t = Object.keys(this._state), n = t.length;
1708
1730
  for (let r = 0; r < n; r++) {
1709
1731
  let n = t[r], i = this._state[n];
1710
- i != null && i !== jr[n] && (e[n] = i);
1732
+ i != null && i !== Fr[n] && (e[n] = i);
1711
1733
  }
1712
1734
  return Object.keys(e).length === 0 && (e = null), e;
1713
1735
  }
@@ -1717,7 +1739,7 @@ var X, jr = {
1717
1739
  }
1718
1740
  update(e, t = !0) {
1719
1741
  this._state = {
1720
- ...jr,
1742
+ ...Fr,
1721
1743
  ...this._state,
1722
1744
  ...e
1723
1745
  }, t && this._emitter.notify("onViewChange");
@@ -1732,13 +1754,13 @@ var X, jr = {
1732
1754
  get isIWorkbookView() {
1733
1755
  return !0;
1734
1756
  }
1735
- }, Nr = Object.freeze({
1757
+ }, Lr = Object.freeze({
1736
1758
  structure: !1,
1737
1759
  windows: !1,
1738
1760
  revision: !0,
1739
1761
  password: null,
1740
1762
  revisionsPassword: null
1741
- }), Pr = class extends Ae {
1763
+ }), Rr = class extends Pe {
1742
1764
  isWindowsAllowed() {
1743
1765
  return this._isPropertyAllowed("windows");
1744
1766
  }
@@ -1760,7 +1782,7 @@ var X, jr = {
1760
1782
  let n = Object.keys(t), r = n.length;
1761
1783
  for (let i = 0; i < r; i++) {
1762
1784
  let r = n[i], a = t[r];
1763
- a != null && a !== Nr[r] && (e[r] = a);
1785
+ a != null && a !== Lr[r] && (e[r] = a);
1764
1786
  }
1765
1787
  }
1766
1788
  return super._toJSON(e);
@@ -1779,7 +1801,7 @@ var X, jr = {
1779
1801
  String: "string",
1780
1802
  Float: "float"
1781
1803
  };
1782
- var Fr = (e) => {
1804
+ var zr = (e) => {
1783
1805
  if (typeof e == "string") return {
1784
1806
  type: X.Type.String,
1785
1807
  value: e
@@ -1803,7 +1825,7 @@ var Fr = (e) => {
1803
1825
  };
1804
1826
  }
1805
1827
  throw Error("A custom property value must be a string, number, boolean or Date.");
1806
- }, Ir = class {
1828
+ }, Br = class {
1807
1829
  constructor(e, t) {
1808
1830
  this._json = e, this._owner = t;
1809
1831
  }
@@ -1823,7 +1845,7 @@ var Fr = (e) => {
1823
1845
  setValue(e) {
1824
1846
  this._owner._assertCustomEditable(this), this._json = {
1825
1847
  ...this._json,
1826
- ...Fr(e)
1848
+ ...zr(e)
1827
1849
  };
1828
1850
  }
1829
1851
  delete() {
@@ -1832,7 +1854,7 @@ var Fr = (e) => {
1832
1854
  toJSON() {
1833
1855
  return { ...this._json };
1834
1856
  }
1835
- }, Lr = class {
1857
+ }, Vr = class {
1836
1858
  constructor(e) {
1837
1859
  this._json = {}, this._custom = [], this._assertOpen = e;
1838
1860
  }
@@ -1922,9 +1944,9 @@ var Fr = (e) => {
1922
1944
  if (this._assertOpen(), typeof e != "string" || e === "") throw Error("A custom property needs a name.");
1923
1945
  let n = this.getCustomProperty(e);
1924
1946
  if (n) return n.setValue(t), n;
1925
- let r = new Ir({
1947
+ let r = new Br({
1926
1948
  key: e,
1927
- ...Fr(t)
1949
+ ...zr(t)
1928
1950
  }, this);
1929
1951
  return this._custom.push(r), r;
1930
1952
  }
@@ -1939,26 +1961,26 @@ var Fr = (e) => {
1939
1961
  }
1940
1962
  fromJSON(e) {
1941
1963
  let { custom: t, ...n } = e ?? {};
1942
- this._json = n, this._custom = (t ?? []).map((e) => new Ir({ ...e }, this));
1964
+ this._json = n, this._custom = (t ?? []).map((e) => new Br({ ...e }, this));
1943
1965
  }
1944
1966
  toJSON() {
1945
1967
  let e = { ...this._json };
1946
1968
  return this._custom.length > 0 && (e.custom = this._custom.map((e) => e.toJSON())), e;
1947
1969
  }
1948
1970
  };
1949
- function Rr(e) {
1971
+ function Hr(e) {
1950
1972
  return W("error.workbook.invalidSheetKey", { key: e });
1951
1973
  }
1952
- function zr(e) {
1974
+ function Ur(e) {
1953
1975
  return W("error.workbook.sheetNameNotFound", { sheetName: e });
1954
1976
  }
1955
- function Br(e, t) {
1977
+ function Wr(e, t) {
1956
1978
  return W(t === "chart" ? "error.workbook.sheetIsChart" : t === "macro" ? "error.workbook.sheetIsMacro" : "error.workbook.sheetIsDialog", { sheetName: e });
1957
1979
  }
1958
- function Vr(e, t) {
1980
+ function Gr(e, t) {
1959
1981
  return t === "chart" ? W("error.workbook.selectedIsChart", { sheetName: e }) : t === "macro" ? W("error.workbook.selectedIsMacro", { sheetName: e }) : t === "dialog" ? W("error.workbook.selectedIsDialog", { sheetName: e }) : W("error.workbook.noWorksheet");
1960
1982
  }
1961
- var Hr = class extends Ht {
1983
+ var Kr = class extends $e {
1962
1984
  constructor(e, t, n, r) {
1963
1985
  super(), this._add = e, this._get = t, this._addListeners = n, this._getSelected = r;
1964
1986
  }
@@ -1989,25 +2011,25 @@ var Hr = class extends Ht {
1989
2011
  get isIWorksheetCollection() {
1990
2012
  return !0;
1991
2013
  }
1992
- }, Ur = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), Wr = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
1993
- function Gr(e) {
2014
+ }, qr = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), Jr = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
2015
+ function Yr(e) {
1994
2016
  let t = W(U("workbook.defaultSheetName"), { n: e + 1 });
1995
2017
  return t === "workbook.defaultSheetName" ? `Sheet${e + 1}` : t;
1996
2018
  }
1997
- function Kr(e, t) {
2019
+ function Xr(e, t) {
1998
2020
  return {
1999
- ...zt,
2021
+ ...Fe,
2000
2022
  getWorksheet: () => null,
2001
- toString: () => Tt(e, t)
2023
+ toString: () => At(e, t)
2002
2024
  };
2003
2025
  }
2004
- function qr(e, t = !1) {
2026
+ function Zr(e, t = !1) {
2005
2027
  if (!e) throw Error(W("error.workbook.sheetNameBlank"));
2006
- if (Ur.test(e)) {
2028
+ if (qr.test(e)) {
2007
2029
  if (!t) throw Error(function(e) {
2008
2030
  return e ? W("error.workbook.sheetNameInvalidCharsNamed", { sheetName: e }) : W("error.workbook.sheetNameInvalidChars");
2009
2031
  }(e));
2010
- e = e.replace(Ur, "");
2032
+ e = e.replace(qr, "");
2011
2033
  }
2012
2034
  if (e.length === 0) throw Error(W("error.workbook.sheetNameBlank"));
2013
2035
  let n = e.length;
@@ -2021,7 +2043,7 @@ function qr(e, t = !1) {
2021
2043
  }
2022
2044
  return e;
2023
2045
  }
2024
- var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2046
+ var Qr, $r = "workbook.activeSheet", ei = class e extends zt {
2025
2047
  constructor(e, t, n, r) {
2026
2048
  super(e, t, r), this._workbook = n;
2027
2049
  }
@@ -2032,24 +2054,24 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2032
2054
  let r = this._options;
2033
2055
  return n && (r = {
2034
2056
  ...this._options,
2035
- getOptions: E(this._options?.getOptions, n)
2057
+ getOptions: j(this._options?.getOptions, n)
2036
2058
  }), new e(t, this._internal, this._workbook, r);
2037
2059
  }
2038
2060
  _createRange(e, t) {
2039
- let n = e ? { ...e } : null, r = this._workbook, i = n ? r._getSheetRef(n.scope, T.Visibility.VeryHidden) : null;
2040
- if (i && !i.sheet.isIWorksheet) throw new B(Br(i.name, i.sheet.getKind()));
2061
+ let n = e ? { ...e } : null, r = this._workbook, i = n ? r._getSheetRef(n.scope, A.Visibility.VeryHidden) : null;
2062
+ if (i && !i.sheet.isIWorksheet) throw new B(Wr(i.name, i.sheet.getKind()));
2041
2063
  if (!i) {
2042
2064
  let e = r._anchorWorksheet();
2043
- return delete n?.scope, Kr(n, n ? {
2044
- scope: Ke,
2065
+ return delete n?.scope, Xr(n, n ? {
2066
+ scope: Je,
2045
2067
  ...e.getEntireRange().getCoords()
2046
2068
  } : null);
2047
2069
  }
2048
2070
  let a = this._options;
2049
2071
  return t && (a = {
2050
2072
  ...this._options,
2051
- getOptions: E(this._options.getOptions, t)
2052
- }), new Zr(e, j(i.sheet), this._workbook, a);
2073
+ getOptions: j(this._options.getOptions, t)
2074
+ }), new ti(e, D(i.sheet), this._workbook, a);
2053
2075
  }
2054
2076
  async select(e) {
2055
2077
  let t = [], n = null, r = this.getCoords();
@@ -2073,15 +2095,15 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2073
2095
  }
2074
2096
  getAddress(e) {
2075
2097
  let t = this._internal.getSheet(), n = t.getEntireRange().getCoords();
2076
- return kt(this.getCoords(), {
2098
+ return Pt(this.getCoords(), {
2077
2099
  ...n,
2078
2100
  scope: t.getName()
2079
- }, Tt, jt, e);
2101
+ }, At, it, e);
2080
2102
  }
2081
2103
  toString() {
2082
2104
  return this.getAddress();
2083
2105
  }
2084
- }, Zr = class e extends De {
2106
+ }, ti = class e extends ne {
2085
2107
  constructor(e, t, n, r) {
2086
2108
  super(e, t, r), this._workbook = n;
2087
2109
  }
@@ -2089,17 +2111,17 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2089
2111
  let n = this._options;
2090
2112
  return t && (n = {
2091
2113
  ...this._options,
2092
- getOptions: E(this._options?.getOptions, t)
2093
- }), new Xr(e, this._internal, this._workbook, n);
2114
+ getOptions: j(this._options?.getOptions, t)
2115
+ }), new ei(e, this._internal, this._workbook, n);
2094
2116
  }
2095
2117
  _createRange(t, n) {
2096
2118
  let r = this._internal;
2097
- if (!t) return Nt(r.getSheet(), r.getSheet().getEntireCoords());
2098
- if (r.validateCoords(t), r.getSheet().isClosed()) return Nt(null, r.getSheet().getEntireCoords(), t);
2119
+ if (!t) return Wt(r.getSheet(), r.getSheet().getEntireCoords());
2120
+ if (r.validateCoords(t), r.getSheet().isClosed()) return Wt(null, r.getSheet().getEntireCoords(), t);
2099
2121
  let i = this._options;
2100
2122
  return n && (i = {
2101
2123
  ...this._options,
2102
- getOptions: E(this._options?.getOptions, n)
2124
+ getOptions: j(this._options?.getOptions, n)
2103
2125
  }), new e(t, this._internal, this._workbook, i);
2104
2126
  }
2105
2127
  addListener(e, t) {
@@ -2112,7 +2134,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2112
2134
  }
2113
2135
  getAddress(e) {
2114
2136
  let t = this._internal.getSheet(), n = t?.getEntireRange().getCoords() ?? null;
2115
- return Tt(this.getCoords(), {
2137
+ return At(this.getCoords(), {
2116
2138
  ...n,
2117
2139
  scope: t.getName()
2118
2140
  });
@@ -2120,13 +2142,13 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2120
2142
  toString() {
2121
2143
  return this.getAddress();
2122
2144
  }
2123
- }, Qr = (e) => !!e && typeof e == "object" && typeof e.getOrigin == "function", $r = class {
2124
- constructor(t) {
2125
- this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new Ge(() => {
2145
+ }, ni = (e) => !!e && typeof e == "object" && typeof e.getOrigin == "function", ri = class {
2146
+ constructor(n) {
2147
+ this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new Xe(() => {
2126
2148
  let e = [];
2127
2149
  for (let t of this.getWorksheets()) e.push(...t.getPivotTables());
2128
2150
  return e;
2129
- }), this._people = new vr(), this._commentCollection = new Kt(null, (e, t, n) => {
2151
+ }), this._people = new Sr(), this._commentCollection = new p(null, (e, t, n) => {
2130
2152
  let r = [];
2131
2153
  for (let i of this.getWorksheets()) r.push(...i.getComments().getItems(e ? {
2132
2154
  address: e,
@@ -2139,126 +2161,126 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2139
2161
  return r;
2140
2162
  }, (e, t) => this.addListeners({ onSheetsChange: e.onCollectionChange ? () => {
2141
2163
  e.onCollectionChange(this._commentCollection);
2142
- } : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._documentProperties = new Lr(() => {
2164
+ } : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._documentProperties = new Vr(() => {
2143
2165
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
2144
2166
  }), this._locale = null, this._localeOverrides = null, this._startModules = /* @__PURE__ */ new WeakSet();
2145
- let n = typeof t == "string" ? { origin: t } : { ...t }, r = n.origin;
2146
- this._ownOriginProvider = !Qr(r), this._originProvider = Qr(r) ? r : new zn(typeof r == "string" ? new G(null, { name: r }) : r ?? new G(null)), delete n.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
2147
- let a = n.json;
2148
- delete n.json, this._transactions = n.transactions ?? new i(), this._id = this._transactions.create(), this._ownTransactions = !n.transactions, this._emitter = new e(this, this._transactions), this._runtime = n.runtime ?? new Qe("Workbook Runtime", {
2167
+ let r = typeof n == "string" ? { origin: n } : { ...n }, i = r.origin;
2168
+ this._ownOriginProvider = !ni(i), this._originProvider = ni(i) ? i : new Un(typeof i == "string" ? new G(null, { name: i }) : i ?? new G(null)), delete r.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
2169
+ let o = r.json;
2170
+ delete r.json, this._transactions = r.transactions ?? new a(), this._id = this._transactions.create(), this._ownTransactions = !r.transactions, this._emitter = new t(this, this._transactions), this._runtime = r.runtime ?? new bt("Workbook Runtime", {
2149
2171
  isDate1904: () => this._isDate1904,
2150
2172
  getNow: () => this._transactions.getCurrentCommit().getTimestamp(),
2151
- getLocale: () => this._locale ?? At() ?? ht(),
2173
+ getLocale: () => this._locale ?? rt() ?? It(),
2152
2174
  getLocaleOverrides: () => this._localeOverrides
2153
- }), this._listenerLanguage = Cn.addChangeListener(() => {
2175
+ }), this._listenerLanguage = En.addChangeListener(() => {
2154
2176
  this._closed || this._notifyAllChange();
2155
2177
  });
2156
- let o = this, s = this._beginCommit({ description: U(a ? "op.openWorkbook" : "op.newWorkbook") });
2178
+ let s = this, c = this._beginCommit({ description: U(o ? "op.openWorkbook" : "op.newWorkbook") });
2157
2179
  try {
2158
- this._strings = n.strings ?? new ye(), this._ownStrings = !n.strings, this._richValues = n.richData ?? new ue(), this._resources = n.resources ?? new Ee(), this._ownResources = !n.resources, this._fetch = new Er(this._resources, n.fetcher ?? new wr()), this._createSheetName = n.createSheetNameCallback ?? Gr;
2159
- let e = n.createWorksheetCallback;
2160
- e ||= (e) => new A(e), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (t, n, r, i, a, s, c) => {
2180
+ this._strings = r.strings ?? new Ce(), this._ownStrings = !r.strings, this._richValues = r.richData ?? new Ot(), this._resources = r.resources ?? new ke(), this._ownResources = !r.resources, this._fetch = new Ar(this._resources, r.fetcher ?? new Or()), this._createSheetName = r.createSheetNameCallback ?? Yr;
2181
+ let t = r.createWorksheetCallback;
2182
+ t ||= (e) => new T(e), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (e, n, r, i, a, o, c) => {
2161
2183
  let l = null, u = {
2162
- runtime: o._runtime,
2163
- readonly: o._options.readonly ?? !1,
2164
- disableLoadAutoFit: o._options.disableLoadAutoFit ?? !1,
2165
- opener: o._options.opener,
2166
- transactions: o._transactions,
2167
- styles: o._styles,
2168
- strings: o._strings,
2169
- richData: o._richValues,
2170
- resources: o._resources,
2171
- names: o._names,
2172
- workbook: o,
2173
- calculation: o._calculation,
2174
- resolveRange: (e) => o._options.resolveRange?.(e) ?? o.getRange(e),
2184
+ runtime: s._runtime,
2185
+ readonly: s._options.readonly ?? !1,
2186
+ disableLoadAutoFit: s._options.disableLoadAutoFit ?? !1,
2187
+ opener: s._options.opener,
2188
+ transactions: s._transactions,
2189
+ styles: s._styles,
2190
+ strings: s._strings,
2191
+ richData: s._richValues,
2192
+ resources: s._resources,
2193
+ names: s._names,
2194
+ workbook: s,
2195
+ calculation: s._calculation,
2196
+ resolveRange: (e) => s._options.resolveRange?.(e) ?? s.getRange(e),
2175
2197
  container: {
2176
- beforeFromJSON: (e) => {
2177
- l = e, o._addSheetRef({
2198
+ beforeFromJSON: (t) => {
2199
+ l = t, s._addSheetRef({
2178
2200
  name: n,
2179
- id: t,
2180
- visibility: r ?? T.Visibility.Visible,
2201
+ id: e,
2202
+ visibility: r ?? A.Visibility.Visible,
2181
2203
  sheetId: a,
2182
- sheet: e
2204
+ sheet: t
2183
2205
  }, i);
2184
2206
  },
2185
2207
  getName: () => {
2186
- let e = o._getSheetRef(l);
2208
+ let e = s._getSheetRef(l);
2187
2209
  return e ? e.name : n;
2188
2210
  },
2189
2211
  setName: (e, t) => {
2190
- o._getSheetRef(l) && o._setSheetName(l, e, t);
2212
+ s._getSheetRef(l) && s._setSheetName(l, e, t);
2191
2213
  },
2192
- setNameChangeCallback: (e) => {
2193
- o._sheetOnNameChange.set(t, e);
2214
+ setNameChangeCallback: (t) => {
2215
+ s._sheetOnNameChange.set(e, t);
2194
2216
  },
2195
2217
  getVisibility: () => {
2196
- let e = o._getSheetRef(l);
2197
- return e ? e.visibility : T.Visibility.Visible;
2218
+ let e = s._getSheetRef(l);
2219
+ return e ? e.visibility : A.Visibility.Visible;
2198
2220
  },
2199
2221
  setVisibility: (e, t) => {
2200
- o._setSheetVisibility(l, e, t);
2222
+ s._setSheetVisibility(l, e, t);
2201
2223
  },
2202
- setVisibilityCallback: (e) => {
2203
- o._sheetOnVisibilityChange.set(t, e);
2224
+ setVisibilityCallback: (t) => {
2225
+ s._sheetOnVisibilityChange.set(e, t);
2204
2226
  },
2205
- duplicate: () => o._duplicateSheet(l),
2227
+ duplicate: () => s._duplicateSheet(l),
2206
2228
  getIndex: () => {
2207
- let e = o._getSheetRef(l);
2208
- return e ? o._getOffsetForId(e.id, o._getSheetRefs(T.Visibility.VeryHidden)) : i;
2229
+ let e = s._getSheetRef(l);
2230
+ return e ? s._getOffsetForId(e.id, s._getSheetRefs(A.Visibility.VeryHidden)) : i;
2209
2231
  },
2210
2232
  setIndex: (e, t) => {
2211
- let n = o._getSheetRef(l, T.Visibility.VeryHidden);
2212
- return !!n && (o._moveSheet(n, e, t), !0);
2233
+ let n = s._getSheetRef(l, A.Visibility.VeryHidden);
2234
+ return !!n && (s._moveSheet(n, e, t), !0);
2213
2235
  },
2214
- setIndexCallback: (e) => {
2215
- o._sheetOnIndexChange.set(t, e);
2236
+ setIndexCallback: (t) => {
2237
+ s._sheetOnIndexChange.set(e, t);
2216
2238
  },
2217
- requestSelect: () => o._requestSelect(l)
2239
+ requestSelect: () => s._requestSelect(l)
2218
2240
  }
2219
2241
  };
2220
- return s && (u.json = s), c !== void 0 && (u.uid = () => c), l = e(u, n, i, r), l;
2221
- }, this._namedTableSource = new ut({
2222
- getSheets: () => o._sheets ? o.getWorksheets().getItems() : R.EmptyArray,
2223
- addSheetsListener: (e, t) => o.addListeners({ onSheetsChange: e }, t)
2224
- }), this._names = n.names ?? new _t({
2225
- addressToRanges: (e) => o.getRanges(e),
2226
- getCurrentScope: () => o.getSelectedWorksheet()?.getName() ?? null,
2227
- isReadOnly: () => (o._options.readonly ?? !1) || o._isStructureProtected(),
2228
- transactions: o._transactions,
2229
- getSources: () => o._calculation ? [o._calculation.getNamedFormulas(), o._namedTableSource] : R.EmptyArray
2230
- }), this._ownNames = !n.names, this._calculation = n.calculation ?? new h({
2231
- runtime: o._runtime,
2232
- functions: n.functions,
2233
- json: a?.calc,
2234
- isNamesReadOnly: () => o._isStructureProtected(),
2242
+ return o && (u.json = o), c !== void 0 && (u.uid = () => c), l = t(u, n, i, r), l;
2243
+ }, this._namedTableSource = new ht({
2244
+ getSheets: () => s._sheets ? s.getWorksheets().getItems() : R.EmptyArray,
2245
+ addSheetsListener: (e, t) => s.addListeners({ onSheetsChange: e }, t)
2246
+ }), this._names = r.names ?? new jt({
2247
+ addressToRanges: (e) => s.getRanges(e),
2248
+ getCurrentScope: () => s.getSelectedWorksheet()?.getName() ?? null,
2249
+ isReadOnly: () => (s._options.readonly ?? !1) || s._isStructureProtected(),
2250
+ transactions: s._transactions,
2251
+ getSources: () => s._calculation ? [s._calculation.getNamedFormulas(), s._namedTableSource] : R.EmptyArray
2252
+ }), this._ownNames = !r.names, this._calculation = r.calculation ?? new we({
2253
+ runtime: s._runtime,
2254
+ functions: r.functions,
2255
+ json: o?.calc,
2256
+ isNamesReadOnly: () => s._isStructureProtected(),
2235
2257
  getActiveCell: () => {
2236
- let e = o.getSelectedWorksheet(), t = e?.getSelectedRange()?.getCoords();
2258
+ let e = s.getSelectedWorksheet(), t = e?.getSelectedRange()?.getCoords();
2237
2259
  return e && t ? {
2238
2260
  rowIndex: t.rowStart,
2239
2261
  colIndex: t.colStart,
2240
2262
  scope: e.getId()
2241
2263
  } : null;
2242
2264
  },
2243
- getRange: o.getRange.bind(o),
2244
- getRanges: o.getRanges.bind(o),
2245
- createGraphRanges: (e, t) => o._createGraphRanges(e, t),
2265
+ getRange: s.getRange.bind(s),
2266
+ getRanges: s.getRanges.bind(s),
2267
+ createGraphRanges: (e, t) => s._createGraphRanges(e, t),
2246
2268
  getSheetIndex: (e) => {
2247
2269
  if (e === void 0) {
2248
- let e = o.getSelectedSheet();
2249
- return e ? this._getSheetRefs(T.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
2270
+ let e = s.getSelectedSheet();
2271
+ return e ? this._getSheetRefs(A.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
2250
2272
  }
2251
- let t = this._getSheetRefs(T.Visibility.VeryHidden);
2273
+ let t = this._getSheetRefs(A.Visibility.VeryHidden);
2252
2274
  e = e.toLowerCase();
2253
2275
  let n = t.length;
2254
2276
  for (let r = 0; r < n; r++) if (t[r].name.toLowerCase() === e) return r;
2255
2277
  try {
2256
- ei.address = e;
2257
- let t = this._names.getItems(ei);
2278
+ ii.address = e;
2279
+ let t = this._names.getItems(ii);
2258
2280
  if (!t || t.length === 0) return -1;
2259
2281
  let n = t[0].getRanges?.()?.getCoords()?.[0]?.scope;
2260
2282
  if (!n) return -1;
2261
- let r = this._getSheetRefs(T.Visibility.VeryHidden);
2283
+ let r = this._getSheetRefs(A.Visibility.VeryHidden);
2262
2284
  n = n.toLowerCase();
2263
2285
  let i = r.length;
2264
2286
  for (let e = 0; e < i; e++) if (r[e].name.toLowerCase() === n) return e;
@@ -2267,37 +2289,56 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2267
2289
  }
2268
2290
  return -1;
2269
2291
  },
2270
- getSheetCount: () => o._getSheetRefs(T.Visibility.VeryHidden).length,
2271
- externalBooks: a?.externalBooks,
2272
- externalBookResolver: n.externalBookResolver,
2273
- namedCollection: o._names,
2274
- strings: o._strings,
2292
+ getSheetCount: () => s._getSheetRefs(A.Visibility.VeryHidden).length,
2293
+ externalBooks: o?.externalBooks,
2294
+ externalBookResolver: r.externalBookResolver,
2295
+ namedCollection: s._names,
2296
+ strings: s._strings,
2275
2297
  get resources() {
2276
- return o._resources;
2298
+ return s._resources;
2277
2299
  },
2278
- fetch: (e, t) => o._fetch.fetch(e, t),
2279
- startFunctions: () => o._startFunctions(),
2280
- transactions: o._transactions,
2281
- names: a?.names
2282
- }), this._ownCalculation = !n.calculation, this._scripts = this._createScripts(a?.modules), this._ownNames = !n.names, this._options = Object.freeze({ ...n });
2283
- let t = a?.sheets?.length ? a.sheets.map((e) => e.name) : [this._createSheetName(0)], r = t.map((e) => e + "-" + R.uuidV4()), i = (e) => {
2284
- let t = a?.sheets?.[e]?.kind;
2285
- return !!t && t !== T.Kind.Worksheet;
2300
+ fetch: (e, t) => s._fetch.fetch(e, t),
2301
+ parseText: (t, n) => (async (t, n, r) => {
2302
+ let i = await import("./BpwULQPKbb4R9Jew.mjs").then((t) => e(t.default, 1)), a = (i.default ?? i).parse(n, {
2303
+ delimiter: r?.delimiter ?? ",",
2304
+ skipEmptyLines: !1
2305
+ }).data, o = a.length, s = a[o - 1];
2306
+ s && s.length === 1 && s[0] === "" && o--;
2307
+ let c = 0;
2308
+ for (let e = 0; e < o; e++) a[e].length > c && (c = a[e].length);
2309
+ let l = Array(o);
2310
+ for (let e = 0; e < o; e++) {
2311
+ let n = a[e], r = Array(c);
2312
+ for (let e = 0; e < c; e++) {
2313
+ let i = n[e];
2314
+ r[e] = i === void 0 || i === "" ? null : Lt(t, i).value;
2315
+ }
2316
+ l[e] = r;
2317
+ }
2318
+ return l;
2319
+ })(s._runtime, t, n),
2320
+ startFunctions: () => s._startFunctions(),
2321
+ transactions: s._transactions,
2322
+ names: o?.names
2323
+ }), this._ownCalculation = !r.calculation, this._scripts = this._createScripts(o?.modules), this._ownNames = !r.names, this._options = Object.freeze({ ...r });
2324
+ let n = o?.sheets?.length ? o.sheets.map((e) => e.name) : [this._createSheetName(0)], i = n.map((e) => e + "-" + R.uuidV4()), a = (e) => {
2325
+ let t = o?.sheets?.[e]?.kind;
2326
+ return !!t && t !== A.Kind.Worksheet;
2286
2327
  };
2287
- this._calculation._setSheets(t.map((e, t) => i(t) ? [
2288
- r[t],
2328
+ this._calculation._setSheets(n.map((e, t) => a(t) ? [
2329
+ i[t],
2289
2330
  e,
2290
2331
  !0
2291
- ] : [r[t], e]));
2292
- let c = n.calcOnLoad ?? "auto", l = !1, u = (async () => {
2332
+ ] : [i[t], e]));
2333
+ let l = r.calcOnLoad ?? "auto", u = !1, d = (async () => {
2293
2334
  try {
2294
- if (this._ownCalculation && c !== "none" && (c === "full" || c === "auto" && !0 === a?.calc?.fullCalcOnLoad ? await this._calculation.calculate({ full: !0 }) : await this._calculation.start(), this._closed)) return;
2335
+ if (this._ownCalculation && l !== "none" && (l === "full" || l === "auto" && !0 === o?.calc?.fullCalcOnLoad ? await this._calculation._calculateForLoad() : await this._calculation.start(), this._closed)) return;
2295
2336
  await this._scripts.start();
2296
2337
  } finally {
2297
- l = !0, this._starting = null;
2338
+ u = !0, this._starting = null;
2298
2339
  }
2299
2340
  })();
2300
- l || (this._starting = u), this._starting?.catch(() => {}), a ? this._fromJSON(a, r) : (this._initState(), this._addSheet(!1, t[0], null, r[0])), this._sheets = new Hr((e) => o._addSheetOptions(e), (e, t) => {
2341
+ u || (this._starting = d), this._starting?.catch(() => {}), o ? this._fromJSON(o, i) : (this._initState(), this._addSheet(!1, n[0], null, i[0])), this._sheets = new Kr((e) => s._addSheetOptions(e), (e, t) => {
2301
2342
  if (e) {
2302
2343
  let n = this._getSheetRef(e, t);
2303
2344
  return n && Z(n) ? [n.sheet] : R.EmptyArray;
@@ -2305,17 +2346,17 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2305
2346
  return this._getWorksheets(t);
2306
2347
  }, (e, t) => {
2307
2348
  let n = e.onCollectionChange, r = e.onInvalidated;
2308
- return o._emitter.addListeners({
2349
+ return s._emitter.addListeners({
2309
2350
  onSheetsChange: n ? () => {
2310
- n(o._sheets);
2351
+ n(s._sheets);
2311
2352
  } : void 0,
2312
2353
  onInvalidated: r ? () => {
2313
- r(o._sheets);
2354
+ r(s._sheets);
2314
2355
  } : void 0
2315
2356
  }, t);
2316
- }, () => o.getSelectedWorksheet()), this._ownCalculation && (n.calcOnLoad ?? "auto") !== "none" && this._calculation.hydrateNames(), this._emitter.notify("onLoad"), this._ownTransactions ? s.amend() : s.commit();
2357
+ }, () => s.getSelectedWorksheet()), this._ownCalculation && (r.calcOnLoad ?? "auto") !== "none" && this._calculation.hydrateNames(), this._emitter.notify("onLoad"), this._ownTransactions ? c.amend() : c.commit();
2317
2358
  } catch (e) {
2318
- throw s.rollback(), e;
2359
+ throw c.rollback(), e;
2319
2360
  }
2320
2361
  this._initializing = !1;
2321
2362
  }
@@ -2323,13 +2364,13 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2323
2364
  let e = this._getSheetRefs();
2324
2365
  for (let t = (e ? e.length : 0) - 1; t >= 0; t--);
2325
2366
  let t = this._options;
2326
- this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new St().getDefaultTheme(), this._styles = t?.styles ?? new Gt(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new Mr()), this._listenerProtection?.(), this._protection = new Pr(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
2367
+ this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new Dt().getDefaultTheme(), this._styles = t?.styles ?? new Jt(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new Ir()), this._listenerProtection?.(), this._protection = new Rr(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
2327
2368
  n._emitter.notify("onProtectionChange");
2328
2369
  } });
2329
2370
  let n = this;
2330
2371
  this._transactionsRemoveListener = this._transactions.addStateListener(this._id, {
2331
2372
  async onAfterStateChange(e, t, r, i, a) {
2332
- let o = n._view, s = a?.[Yr], c = r ? s?.before : s?.after, l = s?.viewId === o.getId() && c != null, u = l ? c : o.getActiveSheetId(), d = l && t.getId() === n._lastTransactionUUID ? n._getSheetRef({ id: u }) : null;
2373
+ let o = n._view, s = a?.[$r], c = r ? s?.before : s?.after, l = s?.viewId === o.getId() && c != null, u = l ? c : o.getActiveSheetId(), d = l && t.getId() === n._lastTransactionUUID ? n._getSheetRef({ id: u }) : null;
2333
2374
  d ? await d.sheet.select() : n._resyncActiveSheet(u, e), n._lastTransactionUUID = t.getId(), (r || i) && n._emitter.notify("onSheetsChange"), n._emitter.notify("onSelectedSheetChange"), n._emitter.notify("onViewChange");
2334
2375
  },
2335
2376
  onRestoreOrRevert() {
@@ -2439,10 +2480,10 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2439
2480
  return this._transactions;
2440
2481
  }
2441
2482
  getChanges(e) {
2442
- let t = this._transactions, [n, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], a = this.getWorksheets().getItems({ visibility: T.Visibility.VeryHidden });
2483
+ let t = this._transactions, [n, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], a = this.getWorksheets().getItems({ visibility: A.Visibility.VeryHidden });
2443
2484
  for (let e = 0; e < a.length; e++) {
2444
2485
  let t = a[e];
2445
- t instanceof A && i.push(...t._changeEventsOf(n, r ?? null));
2486
+ t instanceof T && i.push(...t._changeEventsOf(n, r ?? null));
2446
2487
  }
2447
2488
  return i;
2448
2489
  }
@@ -2495,7 +2536,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2495
2536
  return this.getSelectedWorksheet();
2496
2537
  }
2497
2538
  getSheets(e) {
2498
- let t = this._getSheetRefs(e?.visibility ?? T.Visibility.Visible), n = Array(t.length);
2539
+ let t = this._getSheetRefs(e?.visibility ?? A.Visibility.Visible), n = Array(t.length);
2499
2540
  for (let e = 0; e < t.length; e++) n[e] = t[e].sheet;
2500
2541
  return n;
2501
2542
  }
@@ -2503,19 +2544,19 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2503
2544
  if (e === void 0) return this.getSelectedSheet();
2504
2545
  if (!e) throw Error(W("error.workbook.sheetNameNotProvided"));
2505
2546
  let t = this._getSheetRef(e);
2506
- if (!t) throw new V(zr(e));
2547
+ if (!t) throw new V(Ur(e));
2507
2548
  return t.sheet;
2508
2549
  }
2509
- getWorksheet(e, t = T.Visibility.Visible) {
2550
+ getWorksheet(e, t = A.Visibility.Visible) {
2510
2551
  if (typeof e == "number") return this.getWorksheetAt(e, t);
2511
2552
  if (e === void 0) return this._requireSelectedWorksheet();
2512
2553
  if (!e) throw Error(W("error.workbook.sheetNameNotProvided"));
2513
2554
  let n = this._getSheetRef(e, t);
2514
- if (!n) throw new V(zr(e));
2515
- if (!Z(n)) throw new V(Br(n.name, n.sheet.getKind()));
2555
+ if (!n) throw new V(Ur(e));
2556
+ if (!Z(n)) throw new V(Wr(n.name, n.sheet.getKind()));
2516
2557
  return n.sheet;
2517
2558
  }
2518
- getWorksheetAt(e, t = T.Visibility.Visible) {
2559
+ getWorksheetAt(e, t = A.Visibility.Visible) {
2519
2560
  let n = this._getWorksheets(t)[e];
2520
2561
  if (!n) throw new V(function(e) {
2521
2562
  return W("error.workbook.sheetIndexNotFound", { index: e });
@@ -2526,10 +2567,10 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2526
2567
  let e = this.getSelectedWorksheet();
2527
2568
  if (e) return e;
2528
2569
  let t = this.getSelectedSheet();
2529
- throw new B(Vr(t?.getName() ?? "", t?.getKind() ?? T.Kind.Worksheet));
2570
+ throw new B(Gr(t?.getName() ?? "", t?.getKind() ?? A.Kind.Worksheet));
2530
2571
  }
2531
2572
  _anchorWorksheet() {
2532
- return this.getSelectedWorksheet() || (this._getWorksheets(T.Visibility.VeryHidden)[0] ?? null);
2573
+ return this.getSelectedWorksheet() || (this._getWorksheets(A.Visibility.VeryHidden)[0] ?? null);
2533
2574
  }
2534
2575
  getWorksheets() {
2535
2576
  return this._sheets;
@@ -2537,7 +2578,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2537
2578
  addWorksheet(e) {
2538
2579
  return this.getWorksheets().add(e);
2539
2580
  }
2540
- _getWorksheets(e = T.Visibility.Visible) {
2581
+ _getWorksheets(e = A.Visibility.Visible) {
2541
2582
  let t = this._getSheetRefs(e), n = [], r = t.length;
2542
2583
  for (let e = 0; e < r; e++) {
2543
2584
  let r = t[e];
@@ -2545,27 +2586,27 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2545
2586
  }
2546
2587
  return n;
2547
2588
  }
2548
- _getSheetRefs(e = T.Visibility.Visible) {
2589
+ _getSheetRefs(e = A.Visibility.Visible) {
2549
2590
  let t = this._getState();
2550
- return t ? e === T.Visibility.Visible ? t.sheetRefsVisible : e === T.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === T.Visibility.VeryHidden ? t.sheetRefsAll : R.EmptyArray : [];
2591
+ return t ? e === A.Visibility.Visible ? t.sheetRefsVisible : e === A.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === A.Visibility.VeryHidden ? t.sheetRefsAll : R.EmptyArray : [];
2551
2592
  }
2552
- _getSheetRef(e, t = T.Visibility.Visible) {
2593
+ _getSheetRef(e, t = A.Visibility.Visible) {
2553
2594
  let n = null;
2554
2595
  return typeof e == "number" ? this._getSheetRefs(t)[e] : (typeof e == "string" ? n = this._getState().refsByLowerCaseName.get(e.toLowerCase()) : !0 === e?.isISheet ? n = this._getState().refsByInstance.get(e) : e?.id !== void 0 && (n = this._getState().refsById.get(e.id)), n);
2555
2596
  }
2556
2597
  _validateNewSheetName(e, t = !0) {
2557
2598
  if (e == null) return e;
2558
- if (qr(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new B(W("error.workbook.nameTaken"));
2599
+ if (Zr(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new B(W("error.workbook.nameTaken"));
2559
2600
  return e.substring(0, 31);
2560
2601
  }
2561
2602
  findValidSheetName(e) {
2562
- e &&= qr(e, !0);
2603
+ e &&= Zr(e, !0);
2563
2604
  try {
2564
2605
  return function(e, t) {
2565
2606
  try {
2566
2607
  if (t(e)) return e;
2567
2608
  } catch {}
2568
- let n, r, i = Wr.exec(e);
2609
+ let n, r, i = Jr.exec(e);
2569
2610
  for (i === null ? (n = e + " ", r = 1) : (n = e.substring(0, i.index), r = parseFloat(i[1])); r < 256;) {
2570
2611
  r++;
2571
2612
  let e = "(" + r + ")", i = n.substring(0, 31 - e.length) + e;
@@ -2580,7 +2621,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2580
2621
  }
2581
2622
  }
2582
2623
  isValidSheetNameCharacter(e) {
2583
- return !Ur.test(e);
2624
+ return !qr.test(e);
2584
2625
  }
2585
2626
  _isStructureProtected() {
2586
2627
  return !this._initializing && !this.getProtection().isStructureAllowed();
@@ -2622,13 +2663,13 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2622
2663
  }
2623
2664
  _addSheet(e, t = null, n = null, r) {
2624
2665
  t = this._nextSheetName(t);
2625
- let i = this._getState(), a = this._createSheet(i.lastId, t, T.Visibility.Visible, n, void 0, null, r);
2666
+ let i = this._getState(), a = this._createSheet(i.lastId, t, A.Visibility.Visible, n, void 0, null, r);
2626
2667
  if (!a) throw new B(W("error.workbook.sheetNameBlank"));
2627
2668
  return e && (this._tellSheets(), this._emitter.notify("onSheetsChange")), a;
2628
2669
  }
2629
2670
  _createOpaqueSheet(e, t, n, r, i, a, o, s, c) {
2630
2671
  let l = this, u = null;
2631
- return u = new Ar({
2672
+ return u = new Pr({
2632
2673
  kind: a,
2633
2674
  id: c ?? t + "-" + R.uuidV4(),
2634
2675
  part: o,
@@ -2641,25 +2682,25 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2641
2682
  setName: (e, t) => {
2642
2683
  l._setSheetName(u, e, t);
2643
2684
  },
2644
- getVisibility: () => l._getSheetRef(u, T.Visibility.VeryHidden)?.visibility ?? T.Visibility.Visible,
2685
+ getVisibility: () => l._getSheetRef(u, A.Visibility.VeryHidden)?.visibility ?? A.Visibility.Visible,
2645
2686
  setVisibility: (e, t) => {
2646
2687
  l._setSheetVisibility(u, e, t);
2647
2688
  },
2648
2689
  getIndex: () => {
2649
- let e = l._getSheetRef(u, T.Visibility.VeryHidden);
2650
- return e ? l._getOffsetForId(e.id, l._getSheetRefs(T.Visibility.VeryHidden)) : -1;
2690
+ let e = l._getSheetRef(u, A.Visibility.VeryHidden);
2691
+ return e ? l._getOffsetForId(e.id, l._getSheetRefs(A.Visibility.VeryHidden)) : -1;
2651
2692
  },
2652
2693
  setIndex: (e, t) => {
2653
- let n = l._getSheetRef(u, T.Visibility.VeryHidden);
2694
+ let n = l._getSheetRef(u, A.Visibility.VeryHidden);
2654
2695
  n && l._moveSheet(n, e, t);
2655
2696
  },
2656
2697
  requestSelect: () => l._requestSelect(u),
2657
- isAttached: () => !!l._getSheetRef(u, T.Visibility.VeryHidden)
2698
+ isAttached: () => !!l._getSheetRef(u, A.Visibility.VeryHidden)
2658
2699
  }
2659
2700
  }), this._sheetOnNameChange.set(e, () => u._notify("onNameChange")), this._sheetOnVisibilityChange.set(e, () => u._notify("onVisibilityChange")), this._sheetOnIndexChange.set(e, () => u._notify("onIndexChange")), this._addSheetRef({
2660
2701
  name: t,
2661
2702
  id: e,
2662
- visibility: n ?? T.Visibility.Visible,
2703
+ visibility: n ?? A.Visibility.Visible,
2663
2704
  sheetId: i,
2664
2705
  sheet: u
2665
2706
  }, r), u;
@@ -2675,7 +2716,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2675
2716
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
2676
2717
  if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
2677
2718
  let t = e, n = [], r = [], i = t.length;
2678
- for (let e = 0; e < i; e++) t[e].visibility === T.Visibility.Visible ? (n.push(t[e]), r.push(t[e])) : t[e].visibility === T.Visibility.Hidden && r.push(t[e]);
2719
+ for (let e = 0; e < i; e++) t[e].visibility === A.Visibility.Visible ? (n.push(t[e]), r.push(t[e])) : t[e].visibility === A.Visibility.Hidden && r.push(t[e]);
2679
2720
  this._updateState({
2680
2721
  sheetRefsAll: t,
2681
2722
  sheetRefsVisible: n,
@@ -2715,7 +2756,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2715
2756
  p._validateDeleteSheet(e);
2716
2757
  },
2717
2758
  onDelete(e) {
2718
- let t = p._getSheetRef(e, T.Visibility.VeryHidden);
2759
+ let t = p._getSheetRef(e, A.Visibility.VeryHidden);
2719
2760
  if (!t) return;
2720
2761
  let n = p._beginCommit({ description: W("op.deleteSheet", { name: t.name }) });
2721
2762
  try {
@@ -2771,7 +2812,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2771
2812
  }
2772
2813
  _recordActiveSheet(e, t, n) {
2773
2814
  let r = this.getView().getId();
2774
- e.setIntent(Yr, (e) => ({
2815
+ e.setIntent($r, (e) => ({
2775
2816
  viewId: r,
2776
2817
  before: e?.before ?? t,
2777
2818
  after: n
@@ -2801,7 +2842,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2801
2842
  let n = this._view.getActiveSheetId();
2802
2843
  n ??= (this._view.setActiveSheetId(t), t);
2803
2844
  let r = e.refsById.get(n);
2804
- r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), n = t), r.visibility === T.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(n, e.sheetRefsVisible));
2845
+ r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), n = t), r.visibility === A.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(n, e.sheetRefsVisible));
2805
2846
  }
2806
2847
  _validateDeleteSheet(e) {
2807
2848
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
@@ -2821,7 +2862,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2821
2862
  find(e) {
2822
2863
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
2823
2864
  let t = this._getWorksheets();
2824
- if (t.length === 0) return { next: () => vt };
2865
+ if (t.length === 0) return { next: () => Mt };
2825
2866
  if (t.length === 1) return t[0].find(e);
2826
2867
  typeof e == "string" && (e = { text: e });
2827
2868
  let n = !e?.reverse, r = e?.disableWrap ?? !1, i = this._worksheetOffsetFrom(this.getSelectedSheetIndex(), t), a = i, o = t[a], s = !1;
@@ -2847,7 +2888,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2847
2888
  }
2848
2889
  if (!d && s && a === i && (u.done || !c || !u.done && f(u.value.getCoords(), c) >= 0) && (d = !0), d) {
2849
2890
  let e = u;
2850
- return u = vt, e;
2891
+ return u = Mt, e;
2851
2892
  }
2852
2893
  let p = u;
2853
2894
  return u = l.next(), p;
@@ -2859,7 +2900,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2859
2900
  } };
2860
2901
  }
2861
2902
  replace(e, t, n) {
2862
- let r = 0, i = null, a = typeof t == "function", o = n?.maxCount ?? 2 ** 53 - 1, s = !n?.maxCount, c = "", l = typeof t == "string" ? gt(t) : null, u = n?.description ?? U("op.replace"), d = this._transactions.beginCommit({ description: u });
2903
+ let r = 0, i = null, a = typeof t == "function", o = n?.maxCount ?? 2 ** 53 - 1, s = !n?.maxCount, c = "", l = typeof t == "string" ? dt(t) : null, u = n?.description ?? U("op.replace"), d = this._transactions.beginCommit({ description: u });
2863
2904
  try {
2864
2905
  let u = null, f = null, p = e.next();
2865
2906
  for (; !p.done && r < o;) {
@@ -2916,7 +2957,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2916
2957
  if (!this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
2917
2958
  let t = this._getSheetRefs(), n = this.getSelectedSheetIndex(), r = null;
2918
2959
  if (e) {
2919
- if (r = this._getSheetRef(e), !r) throw new B(Rr(r));
2960
+ if (r = this._getSheetRef(e), !r) throw new B(Hr(r));
2920
2961
  } else r = t[n];
2921
2962
  if (!r) return null;
2922
2963
  if (!Z(r)) throw new B((i = r.name, W("error.workbook.sheetNotDuplicable", { sheetName: i })));
@@ -2933,32 +2974,33 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2933
2974
  return u;
2934
2975
  }
2935
2976
  _createRange(e, t) {
2936
- let n = e ? { ...e } : null, r = n ? this._getSheetRef(n.scope, T.Visibility.VeryHidden) : null;
2937
- if (r && !Z(r)) throw new B(Br(r.name, r.sheet.getKind()));
2977
+ let n = e ? { ...e } : null, r = n ? this._getSheetRef(n.scope, A.Visibility.VeryHidden) : null;
2978
+ if (r && !Z(r)) throw new B(Wr(r.name, r.sheet.getKind()));
2938
2979
  if (!r) {
2939
2980
  let e = this._anchorWorksheet();
2940
- return e ? (delete n?.scope, Kr(n, n ? {
2941
- scope: Ke,
2981
+ return e ? (delete n?.scope, Xr(n, n ? {
2982
+ scope: Je,
2942
2983
  ...e.getEntireRange().getCoords()
2943
2984
  } : null)) : void console.warn(W("error.workbook.noVisibleRefs"));
2944
2985
  }
2945
2986
  let i = r.sheet, a = null;
2946
- return t && (a = { getOptions: t }), new Zr(e, j(i), this, a);
2987
+ return t && (a = { getOptions: t }), new ti(e, D(i), this, a);
2947
2988
  }
2948
2989
  _createRanges(e, t) {
2949
2990
  let n = this._anchorWorksheet();
2950
- if (!n) throw new B(Vr("", T.Kind.Worksheet));
2991
+ if (!n) throw new B(Gr("", A.Kind.Worksheet));
2951
2992
  let r = null;
2952
- return t && (r = { getOptions: t }), new Xr(e, j(n), this, r);
2993
+ return t && (r = { getOptions: t }), new ei(e, D(n), this, r);
2953
2994
  }
2954
2995
  getRange(e, t) {
2955
2996
  if (e === void 0) return this.getSelectedRange(t);
2997
+ typeof e == "number" && (e = Qe(arguments), t = void 0);
2956
2998
  try {
2957
2999
  let n = this._rangesAddressToCoords(e);
2958
3000
  if (n.length !== 1) throw new B(W("error.address.singleRangeOnlyAlt"));
2959
3001
  return this._createRange(n[0], t);
2960
3002
  } catch (t) {
2961
- throw t instanceof V ? new V(t.message) : new B(t.message ?? pe(e));
3003
+ throw t instanceof V ? new V(t.message) : new B(t.message ?? ge(e));
2962
3004
  }
2963
3005
  }
2964
3006
  getCell(e) {
@@ -2969,38 +3011,38 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
2969
3011
  }
2970
3012
  getRanges(e, t) {
2971
3013
  let n = this._rangesAddressToCoords(e);
2972
- if (n.length === 0) throw new B(pe(e));
3014
+ if (n.length === 0) throw new B(ge(e));
2973
3015
  return this._createRanges(n, t);
2974
3016
  }
2975
3017
  _createGraphRanges(e, t) {
2976
3018
  let n = [], r = this.getCalculation()?.getNamedFormulas() ?? null;
2977
3019
  for (let e = 0; e < t.length; e++) {
2978
- let i = t[e], a = i.sheetName ? this._getSheetRef(i.sheetName, T.Visibility.VeryHidden) : null, o = a && Z(a) ? a.sheet : this._anchorWorksheet();
2979
- o && n.push(new be(i, r, j(o), null));
3020
+ let i = t[e], a = i.sheetName ? this._getSheetRef(i.sheetName, A.Visibility.VeryHidden) : null, o = a && Z(a) ? a.sheet : this._anchorWorksheet();
3021
+ o && n.push(new Ae(i, r, D(o), null));
2980
3022
  }
2981
3023
  for (let t = 0; t < e.length; t++) n.push(e[t]);
2982
3024
  let i = this._anchorWorksheet();
2983
- return n.length !== 0 && i ? new Xr(n, j(i), this, null) : null;
3025
+ return n.length !== 0 && i ? new ei(n, D(i), this, null) : null;
2984
3026
  }
2985
3027
  getAnomalies(e) {
2986
3028
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
2987
- let t = oe(e), n = this._getWorksheets(T.Visibility.VeryHidden).map((e) => {
2988
- let t = j(e);
3029
+ let t = _e(e), n = this._getWorksheets(A.Visibility.VeryHidden).map((e) => {
3030
+ let t = D(e);
2989
3031
  return {
2990
3032
  bounds: t.getSheet().getEntireCoords(),
2991
3033
  internal: t,
2992
3034
  qualified: !0
2993
3035
  };
2994
3036
  });
2995
- return new w(n, () => (this.getSelectedWorksheet() ?? this._getWorksheets(T.Visibility.VeryHidden)[0]).getEntireRange(), t);
3037
+ return new ue(n, () => (this.getSelectedWorksheet() ?? this._getWorksheets(A.Visibility.VeryHidden)[0]).getEntireRange(), t);
2996
3038
  }
2997
3039
  getStats(e) {
2998
3040
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
2999
- let t = this._getWorksheets(T.Visibility.VeryHidden), n = t.length;
3041
+ let t = this._getWorksheets(A.Visibility.VeryHidden), n = t.length;
3000
3042
  if (n === 1) return t[0].getStats(e);
3001
3043
  let r = Array(n);
3002
3044
  for (let i = 0; i < n; i++) r[i] = t[i].getStats(e);
3003
- return new fr(r);
3045
+ return new gr(r);
3004
3046
  }
3005
3047
  _activeRangeCoords() {
3006
3048
  let e = this._requireSelectedWorksheet(), t = e.getSelection().getRanges().getCoords(), n = e.getName(), r = t.length, i = Array(r);
@@ -3025,7 +3067,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3025
3067
  getSelectedCell() {
3026
3068
  return this._requireSelectedWorksheet().getSelectedCell();
3027
3069
  }
3028
- _rangesAddressToCoords(e, t = !0, n = T.Visibility.Hidden) {
3070
+ _rangesAddressToCoords(e, t = !0, n = A.Visibility.Hidden) {
3029
3071
  if (!e) throw new B(W("error.address.noAddress"));
3030
3072
  let r = this.getSelectedWorksheet(), i = { ...(r ?? this._anchorWorksheet())?.getEntireRange().getCoords() }, a = r?.getName();
3031
3073
  if (a && (i.scope = a), typeof e == "string") {
@@ -3035,26 +3077,26 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3035
3077
  t === "r" ? r.rowStart = r.rowEnd = n.rowIndex : r.colStart = r.colEnd = n.colIndex, e = r;
3036
3078
  }
3037
3079
  }
3038
- let s = this, c = Et(e, i, it, (e) => {
3080
+ let o = this, s = tt(e, i, Tt, (e) => {
3039
3081
  if (!t) return null;
3040
3082
  if (typeof e == "string") {
3041
- let t = ct(e, {
3042
- getTable: (e) => o(s.getNames().getByName(e)),
3083
+ let t = ve(e, {
3084
+ getTable: (e) => pt(o.getNames().getByName(e)),
3043
3085
  getAnchor: () => r ? {
3044
3086
  sheet: r,
3045
3087
  coords: r.getSelectedCell().getCoords()
3046
3088
  } : null
3047
3089
  });
3048
3090
  if (t) return [t];
3049
- let n = s.getNames().getByName(e)?.getRanges?.();
3091
+ let n = o.getNames().getByName(e)?.getRanges?.();
3050
3092
  if (n) return n.getCoords();
3051
3093
  }
3052
3094
  throw new B(`Invalid sheet reference '${e}'.`);
3053
- }), l = c.length;
3054
- for (let e = 0; e < l; e++) this._validateCoords(c[e], n);
3055
- return c;
3095
+ }), c = s.length;
3096
+ for (let e = 0; e < c; e++) this._validateCoords(s[e], n);
3097
+ return s;
3056
3098
  }
3057
- _validateCoords(e, t = T.Visibility.Visible, n = W("error.sheet.oobRange")) {
3099
+ _validateCoords(e, t = A.Visibility.Visible, n = W("error.sheet.oobRange")) {
3058
3100
  if (e === null) return;
3059
3101
  let r = this.getWorksheet(e.scope ?? void 0, t).getEntireRange().getCoords();
3060
3102
  if (!z.isRangeWithinRange(e, r)) throw new V(n);
@@ -3081,7 +3123,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3081
3123
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
3082
3124
  if (!this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
3083
3125
  let r = this._getSheetRef(e);
3084
- if (!r) throw new B(Rr(e));
3126
+ if (!r) throw new B(Hr(e));
3085
3127
  if (t === r.name) return r.sheet;
3086
3128
  if ((t = this._validateNewSheetName(t)) == null) throw new B(W("error.workbook.sheetNameNotProvided"));
3087
3129
  let i = Object.freeze({
@@ -3098,23 +3140,23 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3098
3140
  }
3099
3141
  return a;
3100
3142
  }
3101
- _setSheetVisibility(e, t = T.Visibility.Visible, n) {
3143
+ _setSheetVisibility(e, t = A.Visibility.Visible, n) {
3102
3144
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
3103
3145
  if (!this.getProtection().isStructureAllowed()) throw new H(W("error.workbook.protection"));
3104
- let r = this._getSheetRef(e, T.Visibility.VeryHidden);
3146
+ let r = this._getSheetRef(e, A.Visibility.VeryHidden);
3105
3147
  if (!r) return null;
3106
3148
  if (t === r.visibility) return;
3107
3149
  let i = null, a = "";
3108
- t === T.Visibility.Visible ? a = U("op.unhideSheet") : t === T.Visibility.Hidden ? a = U("op.hideSheet") : t === T.Visibility.VeryHidden && (a = U("op.veryHideSheet"));
3150
+ t === A.Visibility.Visible ? a = U("op.unhideSheet") : t === A.Visibility.Hidden ? a = U("op.hideSheet") : t === A.Visibility.VeryHidden && (a = U("op.veryHideSheet"));
3109
3151
  let o = this.beginCommit(a);
3110
3152
  try {
3111
3153
  let e = this._getState().sheetRefsVisible;
3112
- if (t !== T.Visibility.Visible && e.length === 1 && e[0].id === r.id) throw new B(W("error.workbook.sheetOne"));
3154
+ if (t !== A.Visibility.Visible && e.length === 1 && e[0].id === r.id) throw new B(W("error.workbook.sheetOne"));
3113
3155
  let a = {
3114
3156
  ...r,
3115
3157
  visibility: t
3116
3158
  }, s = -1;
3117
- t !== T.Visibility.Visible && (s = this._getOffsetForId(r.id, e)), i = this._updateSheetRef(r, a).sheet, t !== T.Visibility.Visible && this._adjustRemoveSelectionIfRequired(s, r.id), this._adjustSheetNamesIfRequired(), o.commit(n);
3159
+ t !== A.Visibility.Visible && (s = this._getOffsetForId(r.id, e)), i = this._updateSheetRef(r, a).sheet, t !== A.Visibility.Visible && this._adjustRemoveSelectionIfRequired(s, r.id), this._adjustSheetNamesIfRequired(), o.commit(n);
3118
3160
  } catch (e) {
3119
3161
  throw o.rollback(), e;
3120
3162
  }
@@ -3143,9 +3185,9 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3143
3185
  _setSelectedSheet(e) {
3144
3186
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
3145
3187
  let t = this._getSheetRef(e);
3146
- if (!t) throw new B(Rr(e));
3188
+ if (!t) throw new B(Hr(e));
3147
3189
  let n = null;
3148
- return t.visibility !== T.Visibility.Visible && this._setSheetVisibility(t, T.Visibility.Visible), this._view.setActiveSheetId(t.id), n = t.sheet, n;
3190
+ return t.visibility !== A.Visibility.Visible && this._setSheetVisibility(t, A.Visibility.Visible), this._view.setActiveSheetId(t.id), n = t.sheet, n;
3149
3191
  }
3150
3192
  getProtection() {
3151
3193
  return this._protection;
@@ -3163,7 +3205,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3163
3205
  return this._calculation;
3164
3206
  }
3165
3207
  getFonts() {
3166
- return me.getShared();
3208
+ return xe.getShared();
3167
3209
  }
3168
3210
  createFormula(e, t, n) {
3169
3211
  return this.getCalculation().createFormula(e, t, n);
@@ -3237,7 +3279,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3237
3279
  }
3238
3280
  _fromJSON(e, t) {
3239
3281
  if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || e.sheets.length === 0) throw new B(W("error.workbook.sheetOne"));
3240
- e.theme && (this._theme = new le(e.theme), this._styles.setTheme(this._theme));
3282
+ e.theme && (this._theme = new pe(e.theme), this._styles.setTheme(this._theme));
3241
3283
  let n = this._strings.beginPersist(), r = this._resources.beginPersist(), i = this._styles.beginPersist(), a = this._richValues.beginPersist();
3242
3284
  try {
3243
3285
  n.fromJSON(e.strings), r.fromJSON(e.resources), this._fetch.adopt(this._resources.getItems()), i.fromJSON(e.styles), a.fromJSON(e.richData, {
@@ -3250,7 +3292,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3250
3292
  let e = r.fromResourceId.bind(r);
3251
3293
  for (let t = 0; t < s.length; t++) {
3252
3294
  let n = s[t];
3253
- n && typeof n.cacheId == "number" && o.push(new gr(n.cacheId, k.fromJSON(n.part, e)));
3295
+ n && typeof n.cacheId == "number" && o.push(new br(n.cacheId, k.fromJSON(n.part, e)));
3254
3296
  }
3255
3297
  }
3256
3298
  this._pivotCaches = o, this._people.fromJSON(e.people);
@@ -3259,11 +3301,11 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3259
3301
  let d = null, f = null;
3260
3302
  this._isLoadingSheets = !0;
3261
3303
  for (let e = 0; e < l; e++) {
3262
- let n = c[e], i = n.visibility || T.Visibility.Visible, a = e;
3263
- f = a, i === T.Visibility.Visible ? d === null && (d = a) : u !== null && u === a && (u = null);
3304
+ let n = c[e], i = n.visibility || A.Visibility.Visible, a = e;
3305
+ f = a, i === A.Visibility.Visible ? d === null && (d = a) : u !== null && u === a && (u = null);
3264
3306
  try {
3265
- let o = n.kind ?? T.Kind.Worksheet;
3266
- if (o !== T.Kind.Worksheet) {
3307
+ let o = n.kind ?? A.Kind.Worksheet;
3308
+ if (o !== A.Kind.Worksheet) {
3267
3309
  let s = n.sheet, c = k.fromJSON(s?.part, r.fromResourceId.bind(r));
3268
3310
  if (!c) throw new B(W("error.workbook.sheetPartMissing", { sheetName: n.name }));
3269
3311
  this._createOpaqueSheet(a, n.name, i, e, n.sheetId, o, c, s?.tabColor ?? null, t?.[e]);
@@ -3272,9 +3314,9 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3272
3314
  throw this._isLoadingSheets = !1, e;
3273
3315
  }
3274
3316
  }
3275
- this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._updateState({ lastId: f }), e.view.activeSheetId = u ?? d, this.setView(new Mr({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
3317
+ this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._updateState({ lastId: f }), e.view.activeSheetId = u ?? d, this.setView(new Ir({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
3276
3318
  let p = this;
3277
- this._protection = new Pr(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
3319
+ this._protection = new Rr(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
3278
3320
  p._emitter.notify("onProtectionChange", { source: e });
3279
3321
  } }), this._emitter.notify("onLoad");
3280
3322
  } finally {
@@ -3294,14 +3336,14 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3294
3336
  }
3295
3337
  _createScripts(e) {
3296
3338
  let t = this;
3297
- return new br({
3339
+ return new wr({
3298
3340
  transactions: this._transactions,
3299
3341
  json: e,
3300
3342
  workbook: t,
3301
3343
  getBuiltInFunctions: () => t._calculation?.getFunctions(),
3302
3344
  onAdd: (e, n) => {
3303
3345
  let r = t._calculation;
3304
- r.getStatus() !== Vt.Status.Off && r.start().then(async () => {
3346
+ r.getStatus() !== Le.Status.Off && r.start().then(async () => {
3305
3347
  if (t._startModules.has(n)) return;
3306
3348
  let e = n.getFunctions().getItems({
3307
3349
  type: "formula",
@@ -3312,7 +3354,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3312
3354
  try {
3313
3355
  await this._calculation.getFunctions().add(n);
3314
3356
  } catch (e) {
3315
- En.error(e?.message ?? String(e), e);
3357
+ An.error(e?.message ?? String(e), e);
3316
3358
  }
3317
3359
  }
3318
3360
  }).catch(() => {});
@@ -3324,7 +3366,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3324
3366
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
3325
3367
  await Promise.resolve(this._starting);
3326
3368
  let t = this.getCalculation();
3327
- t.getStatus() !== Vt.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
3369
+ t.getStatus() !== Le.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
3328
3370
  let n = { sheets: [] }, r = e?.ignoreStyles ?? !1;
3329
3371
  if (!r) {
3330
3372
  let e = this._theme.toJSON();
@@ -3354,7 +3396,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3354
3396
  sheet: n
3355
3397
  };
3356
3398
  }
3357
- a.sheetId !== void 0 && (s.sheetId = a.sheetId), a.visibility === T.Visibility.Visible ? d === null && (d = o) : s.visibility = a.visibility, a.id === t && (i = o), n.sheets.push(s);
3399
+ a.sheetId !== void 0 && (s.sheetId = a.sheetId), a.visibility === A.Visibility.Visible ? d === null && (d = o) : s.visibility = a.visibility, a.id === t && (i = o), n.sheets.push(s);
3358
3400
  }
3359
3401
  if (!r) {
3360
3402
  let e = l.toJSON();
@@ -3412,24 +3454,24 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3412
3454
  } catch (e) {
3413
3455
  console.warn("error on close", e);
3414
3456
  }
3415
- this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof zn && this._originProvider.release(), this._closed = !0;
3457
+ this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof Un && this._originProvider.release(), this._closed = !0;
3416
3458
  }
3417
3459
  beginCommit(e) {
3418
3460
  if (this._closed) throw Error(W("error.workbook.modelClosed"));
3419
3461
  return this._beginCommit(typeof e == "string" ? { description: e } : e);
3420
3462
  }
3421
3463
  doBatch(e, t) {
3422
- let r = this;
3464
+ let n = this;
3423
3465
  t = typeof t == "string" ? { description: t } : {
3424
3466
  description: U("op.updateWorkbook"),
3425
3467
  ...t
3426
3468
  };
3427
- let i = n.bind(this._transactions, this, e);
3469
+ let i = r.bind(this._transactions, this, e);
3428
3470
  return this._transactions.doBatch(i.callback, {
3429
3471
  ...t,
3430
3472
  onChildCommit: i.onChildCommit
3431
3473
  }, (e, t) => {
3432
- i.close(), e.getDepth() === 0 && (r._lastTransactionUUID = e.getId());
3474
+ i.close(), e.getDepth() === 0 && (n._lastTransactionUUID = e.getId());
3433
3475
  });
3434
3476
  }
3435
3477
  _beginCommit(e) {
@@ -3462,7 +3504,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3462
3504
  get isIWorkbook() {
3463
3505
  return !0;
3464
3506
  }
3465
- }, ei = { address: null }, Z = (e) => e.sheet.getKind() === T.Kind.Worksheet, ti = class {
3507
+ }, ii = { address: null }, Z = (e) => e.sheet.getKind() === A.Kind.Worksheet, ai = class {
3466
3508
  constructor() {
3467
3509
  this._readFormats = [], this._writeFormats = [], this._encryptions = [];
3468
3510
  }
@@ -3536,9 +3578,9 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3536
3578
  return !0;
3537
3579
  });
3538
3580
  }
3539
- }, ni = /* @__PURE__ */ new WeakMap(), ri = (e) => !!e && typeof e == "object" && typeof e.getPath == "function" && typeof e.canWrite == "function", ii = class {
3581
+ }, oi = /* @__PURE__ */ new WeakMap(), si = (e) => !!e && typeof e == "object" && typeof e.getPath == "function" && typeof e.canWrite == "function", ci = class {
3540
3582
  constructor() {
3541
- this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new e(this), this._registry = new ti(), this._defaultStore = new Vn(() => this.getWriteFormats(), () => this.getReadFormats());
3583
+ this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new t(this), this._registry = new ai(), this._defaultStore = new Gn(() => this.getWriteFormats(), () => this.getReadFormats());
3542
3584
  }
3543
3585
  getBackingStore() {
3544
3586
  return this._backingStore ?? this._defaultStore;
@@ -3578,10 +3620,10 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3578
3620
  async read(e) {
3579
3621
  let t = null;
3580
3622
  if (typeof e == "string") e = { source: e };
3581
- else if (ri(e)) {
3623
+ else if (si(e)) {
3582
3624
  let n = e.getPath();
3583
3625
  if (!n) throw Error("Cannot read from an unbound origin (no path).");
3584
- Ln(e) ? e = {
3626
+ Vn(e) ? e = {
3585
3627
  source: n,
3586
3628
  asCopy: !0
3587
3629
  } : (t = e, e = { source: n });
@@ -3655,7 +3697,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3655
3697
  try {
3656
3698
  return i = await r.decode(e, t), !0;
3657
3699
  } catch (e) {
3658
- if (!(e instanceof wn)) throw e;
3700
+ if (!(e instanceof On)) throw e;
3659
3701
  return !1;
3660
3702
  }
3661
3703
  };
@@ -3665,7 +3707,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3665
3707
  };
3666
3708
  if (!n?.onPassword) {
3667
3709
  let e = t.getName();
3668
- throw new On(e ? W("error.io.passwordRequired", { name: e }) : W("error.io.passwordRequiredUnnamed"));
3710
+ throw new Mn(e ? W("error.io.passwordRequired", { name: e }) : W("error.io.passwordRequiredUnnamed"));
3669
3711
  }
3670
3712
  let o = await Promise.resolve(n.onPassword({
3671
3713
  origin: t,
@@ -3677,7 +3719,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3677
3719
  bytes: i,
3678
3720
  password: o
3679
3721
  };
3680
- throw new wn(W("error.io.passwordIncorrect"));
3722
+ throw new On(W("error.io.passwordIncorrect"));
3681
3723
  }
3682
3724
  async writeArrayBuffer(e, t) {
3683
3725
  if (!t?.format) throw Error("A format must be specified to write to an ArrayBuffer (e.g. { format: 'xlsx' }).");
@@ -3686,7 +3728,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3686
3728
  return this._writeArrayBuffer(e, n, t);
3687
3729
  }
3688
3730
  async write(e, t, n) {
3689
- return typeof t == "string" || ri(t) ? this._write(e, t, !1, n) : this._write(e, e?.getOrigin?.(), !0, t ?? n);
3731
+ return typeof t == "string" || si(t) ? this._write(e, t, !1, n) : this._write(e, e?.getOrigin?.(), !0, t ?? n);
3690
3732
  }
3691
3733
  async writeAs(e, t, n) {
3692
3734
  if (!t) throw Error("A target must be provided for writeAs (use write(workbook) for a plain save).");
@@ -3710,13 +3752,13 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3710
3752
  }
3711
3753
  if (typeof t == "string") {
3712
3754
  let e = i.getPath();
3713
- i = new G(O(e) ? e : `${e}.${o.exts[0]}`, { format: o.key });
3755
+ i = new G(E(e) ? e : `${e}.${o.exts[0]}`, { format: o.key });
3714
3756
  }
3715
3757
  let c = i.getEncryption(), l = e.getOrigin?.(), u = (i instanceof G ? i.getPassword() : null) ?? (l instanceof G ? l.getPassword() : null), d = i.isEncrypted() || (l?.isEncrypted() ?? !1), f = r?.password === void 0 ? u ?? (d ? void 0 : null) : r.password, p = null;
3716
3758
  if (f === void 0) {
3717
3759
  if (d) {
3718
3760
  let e = i.getName();
3719
- throw new On(e ? W("error.io.passwordRequiredSave", { name: e }) : W("error.io.passwordRequiredSaveUnnamed"));
3761
+ throw new Mn(e ? W("error.io.passwordRequiredSave", { name: e }) : W("error.io.passwordRequiredSaveUnnamed"));
3720
3762
  }
3721
3763
  } else if (f !== null && (p = await this._registry.getEncryption(c), !p)) throw new B(W("error.io.encryptionUnavailable"));
3722
3764
  let m = `${i.getName() ?? W("workbook.defaultName")}.${o.exts[0]}`, h = r?.progress, g = !i.getPath() || !i.canWrite() || !!r?.prompt, _ = !1, v = this, y = null, b = [], x = {
@@ -3744,7 +3786,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3744
3786
  }))(h, l), d = await v._writeArrayBuffer(e, c, {
3745
3787
  ...r,
3746
3788
  progress: u
3747
- }), m = ni.get(s);
3789
+ }), m = oi.get(s);
3748
3790
  if (l.some((e) => !m?.has(e.message)) && r?.onWarnings) {
3749
3791
  let t = await Promise.resolve(r.onWarnings({
3750
3792
  workbook: e,
@@ -3763,11 +3805,11 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3763
3805
  if (!t.write) throw Error("The active backing store is read-only (no write implementation).");
3764
3806
  if (S = await t.write(x), S) {
3765
3807
  if (f !== void 0 && S instanceof G && (S.setPassword(f), S.update({ encryption: p ? p.key : null })), b.length) {
3766
- let e = ni.get(S) ?? /* @__PURE__ */ new Set();
3808
+ let e = oi.get(S) ?? /* @__PURE__ */ new Set();
3767
3809
  for (let t of b) e.add(t.message);
3768
- ni.set(S, e);
3810
+ oi.set(S, e);
3769
3811
  }
3770
- n && S !== e.getOrigin() && Ln(e.getOrigin())?.setOrigin(S);
3812
+ n && S !== e.getOrigin() && Vn(e.getOrigin())?.setOrigin(S);
3771
3813
  let t = y ?? e.getTransactions?.()?.getCurrentCommit() ?? null;
3772
3814
  this._emitter.notify("onWrite", {
3773
3815
  params: {
@@ -3787,7 +3829,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3787
3829
  return S;
3788
3830
  }
3789
3831
  _stripExtension(e) {
3790
- let t = O(e);
3832
+ let t = E(e);
3791
3833
  return t ? e.slice(0, e.length - t.length - 1) : e;
3792
3834
  }
3793
3835
  _baseName(e) {
@@ -3807,7 +3849,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3807
3849
  async _readArrayBuffer(e, t, n) {
3808
3850
  if (!e) throw Error("ArrayBuffer must be specified.");
3809
3851
  if (!t) throw Error("format must be specified.");
3810
- if (e.byteLength === 0) return new $r(n?.createWorkbookOptions);
3852
+ if (e.byteLength === 0) return new ri(n?.createWorkbookOptions);
3811
3853
  let r = t.handler;
3812
3854
  if (!r) throw Error(`Unable to resolve a read handler for '${t.key}'.`);
3813
3855
  let i;
@@ -3819,12 +3861,12 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3819
3861
  reason: e?.message ?? String(e)
3820
3862
  }), { cause: e });
3821
3863
  }
3822
- return await yt(), i;
3864
+ return await Nt(), i;
3823
3865
  }
3824
3866
  get isIWorkbookIO() {
3825
3867
  return !0;
3826
3868
  }
3827
- }, ai = new ii(), oi = class {
3869
+ }, li = new ci(), ui = class {
3828
3870
  constructor() {
3829
3871
  this._buffer = null, this._formatKey = null;
3830
3872
  }
@@ -3838,7 +3880,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3838
3880
  async read(e) {
3839
3881
  return this._buffer ? e.decode(this._buffer, { format: this._formatKey ?? void 0 }) : null;
3840
3882
  }
3841
- }, si = "locales", ci = "fonts", li = {
3883
+ }, di = "locales", fi = "fonts", pi = {
3842
3884
  suffix: ".msg.json",
3843
3885
  async extract(e) {
3844
3886
  let t = e.relPath.split("/");
@@ -3848,7 +3890,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3848
3890
  } : null;
3849
3891
  },
3850
3892
  place: (e, t) => t ? `${t}/${e}` : null
3851
- }, ui = [
3893
+ }, mi = [
3852
3894
  ".woff2",
3853
3895
  ".woff",
3854
3896
  ".ttf",
@@ -3858,7 +3900,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3858
3900
  ].map((e) => ({
3859
3901
  suffix: e,
3860
3902
  place: (e, t) => t ? `${t}/${e}` : e
3861
- })), di = {
3903
+ })), hi = {
3862
3904
  suffix: ".metrics.json",
3863
3905
  async extract(e) {
3864
3906
  let t = await e.readJson();
@@ -3869,13 +3911,13 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3869
3911
  } : null;
3870
3912
  },
3871
3913
  place: (e, t) => t ? `${t}/${e}` : e
3872
- }, fi = [{
3873
- kind: si,
3874
- files: [li]
3914
+ }, gi = [{
3915
+ kind: di,
3916
+ files: [pi]
3875
3917
  }, {
3876
- kind: ci,
3918
+ kind: fi,
3877
3919
  files: [
3878
- di,
3920
+ hi,
3879
3921
  {
3880
3922
  suffix: ".hinted.json",
3881
3923
  async extract(e) {
@@ -3887,7 +3929,7 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3887
3929
  hinted: !0
3888
3930
  } : null;
3889
3931
  },
3890
- place: di.place
3932
+ place: hi.place
3891
3933
  },
3892
3934
  {
3893
3935
  suffix: ".rows.json",
@@ -3900,40 +3942,40 @@ var Jr, Yr = "workbook.activeSheet", Xr = class e extends d {
3900
3942
  rows: !0
3901
3943
  } : null;
3902
3944
  },
3903
- place: di.place
3945
+ place: hi.place
3904
3946
  },
3905
- ...ui
3947
+ ...mi
3906
3948
  ]
3907
3949
  }];
3908
- async function pi(e, t) {
3909
- let { Chart: n } = await import("./CNdjyofiRu6CYOrr.mjs");
3950
+ async function _i(e, t) {
3951
+ let { Chart: n } = await import("./r_EZapMBdyS4gUd-.mjs");
3910
3952
  return new n({
3911
3953
  json: e,
3912
3954
  getStyles: t?.getStyles
3913
3955
  });
3914
3956
  }
3915
- Jr ||= {};
3957
+ Qr ||= {};
3916
3958
  var Q = null;
3917
- function mi() {
3959
+ function vi() {
3918
3960
  if (!Q) {
3919
- let e = import("./hCQJcmIzPDxDEv2q.mjs").then((e) => e.loadScriptingDeclarations());
3961
+ let e = import("./oSCy1X5CJ1iYtGDp.mjs").then((e) => e.loadScriptingDeclarations());
3920
3962
  e.catch(() => {
3921
3963
  Q = null;
3922
3964
  }), Q = e;
3923
3965
  }
3924
3966
  return Q;
3925
3967
  }
3926
- var hi, gi, _i, $ = null;
3927
- function vi() {
3968
+ var yi, bi, xi, $ = null;
3969
+ function Si() {
3928
3970
  if (!$) {
3929
- let e = import("./hCQJcmIzPDxDEv2q.mjs").then((e) => e.loadScriptingApi()).then((e) => JSON.parse(e));
3971
+ let e = import("./oSCy1X5CJ1iYtGDp.mjs").then((e) => e.loadScriptingApi()).then((e) => JSON.parse(e));
3930
3972
  e.catch(() => {
3931
3973
  $ = null;
3932
3974
  }), $ = e;
3933
3975
  }
3934
3976
  return $;
3935
3977
  }
3936
- hi ||= {}, (gi ||= {}).Type = {
3978
+ yi ||= {}, (bi ||= {}).Type = {
3937
3979
  Button: "button",
3938
3980
  CheckBox: "checkBox",
3939
3981
  OptionButton: "optionButton",
@@ -3946,12 +3988,12 @@ hi ||= {}, (gi ||= {}).Type = {
3946
3988
  EditBox: "editBox",
3947
3989
  Dialog: "dialog",
3948
3990
  Unknown: "formControl"
3949
- }, (_i ||= {}).DropStyle = {
3991
+ }, (xi ||= {}).DropStyle = {
3950
3992
  Combo: "combo",
3951
3993
  ComboEdit: "comboEdit",
3952
3994
  Simple: "simple"
3953
3995
  };
3954
- var yi = class extends Le {
3996
+ var Ci = class extends S {
3955
3997
  constructor(e) {
3956
3998
  super(e);
3957
3999
  }
@@ -3964,8 +4006,8 @@ var yi = class extends Le {
3964
4006
  colEnd: (e?.size?.width ?? 5) - 1,
3965
4007
  rowEnd: (e?.size?.height ?? 5) - 1
3966
4008
  },
3967
- getRanges: (e) => new Me(null)
4009
+ getRanges: (e) => new m(null)
3968
4010
  }, super._initializeOptions(e);
3969
4011
  }
3970
- }, bi = "0.8.0-beta.12", xi = "2026-10-29T20:28:05.246Z";
3971
- export { Ht as AbstractCollection, r as AbstractMovableContent, We as AddressUtils, oi as ArrayBackingStore, we as AutoFill, xi as BUILD_DATE, u as CellControlRegistry, It as CellImage, Ie as CellImageKind, dt as ChartElementSelection, yn as ChartKinds, He as CheckboxKind, fn as Color, lt as Condition, Ft as DateUtils, ii as DefaultWorkbookIO, m as EXTERNAL_LINK_PATH_REL_TYPE, kr as ExternalRangeClipboardItem, ci as FONTS_KIND, wr as Fetcher, en as FontUtils, he as FormulaText, sr as FunctionDeclarations, de as GeomUtils, y as Hyperlink, g as HyperlinkKind, ge as IAnchored, Zt as IBorders, Vt as ICalculation, qe as ICell, ir as ICellHeaderRange, c as ICellRange, rr as ICellRanges, ln as ICellStyle, dn as IColor, pt as ICondition, Be as IConditionalFormat, X as ICustomProperty, ne as IDataValidation, _i as IDropDown, pn as IEffect, un as IFill, M as IFont, me as IFontCollection, F as IFontStyle, gi as IFormControl, bn as IGeometry, hi as IMovable, xe as IPageLayout, Jr as IPicture, nr as IResource, s as IRichDataKind, tt as IScript, nn as IShape, T as ISheet, l as ISlicerStyle, Fn as ISort, hn as IStroke, ee as ITable, Ue as ITableStyle, Ye as IText, N as ITextFrame, tr as ITheme, se as IThemeCollection, An as IWorkbookIO, hr as IWorkbookView, je as IWorksheetView, si as LOCALES_KIND, ae as LicenseManager, Dt as MovableContentRegistry, ze as NamedStyleCollection, P as NumberFormat, vn as PaintUtils, vr as PersonCollection, Or as RangeClipboardItem, Kn as RectAlignment, Pt as Registry, C as Resource, Ee as ResourceCollection, Ne as RichArray, f as RichArrayKind, ue as RichDataCollection, Ze as RichDataRegistry, Bt as RichRecord, Se as RichText, ft as RichTextKind, fi as SHEETXL_RESOURCE_KINDS, gn as SYSTEM_COLOR_CSS_PREFIX, Xt as ShapeStyleUtils, _e as SimpleFontFace, Ve as SlicerStyleCollection, Ut as Sort, ye as StringCollection, Gt as StyleCollection, yi as Table, te as TableStyleCollection, rt as TextRotation, $e as TextStacked, bt as TextUtils, le as Theme, St as ThemeCollection, t as TransactionConflictError, Pn as TransactionSaveStateManager, i as TransactionStore, jn as TransactionUndoManager, Ot as Tuple, bi as VERSION, $r as Workbook, ai as WorkbookIO, G as WorkbookOrigin, Mr as WorkbookView, A as Worksheet, er as builtInStyleNameDisplay, Fe as createCellRangeCounts, pi as createChart, Rt as externalBookClosedName, Re as externalBookFileName, b as externalBookLocation, _ as externalBookOpenName, Ct as findLabel, cr as getBuiltInFunctionNames, S as getLanguagePack, rn as getLocaleProfile, at as getScriptRuntime, vi as getScriptingApi, mi as getScriptingDeclarations, ie as localizeBoolean, fe as localizeErrorLabel, qt as makeLocaleProfile, ce as normalizeLabel, ke as parseBooleanLocal, Wt as parseErrorLocal, Ce as parseExternalScope, lr as parseFormulaLiteral, Te as registerSdkLocales, mt as sourceEntryFromPath, xt as withScriptRuntime };
4012
+ }, wi = "0.8.0-beta.14", Ti = "2026-11-04T17:50:50.158Z";
4013
+ export { $e as AbstractCollection, i as AbstractMovableContent, ie as AddressUtils, ui as ArrayBackingStore, w as AutoFill, Ti as BUILD_DATE, We as CellControlRegistry, Re as CellImage, x as CellImageKind, s as ChartElementSelection, Cn as ChartKinds, oe as CheckboxKind, un as Color, ye as Condition, Kt as DateUtils, ci as DefaultWorkbookIO, Ht as EXTERNAL_LINK_PATH_REL_TYPE, Nr as ExternalRangeClipboardItem, fi as FONTS_KIND, Or as Fetcher, $t as FontUtils, Se as FormulaText, dr as FunctionDeclarations, Me as GeomUtils, v as Hyperlink, Te as HyperlinkKind, be as IAnchored, gn as IBorders, Le as ICalculation, qe as ICell, cr as ICellHeaderRange, l as ICellRange, sr as ICellRanges, vn as ICellStyle, hn as IColor, vt as ICondition, Ke as IConditionalFormat, X as ICustomProperty, He as IDataValidation, xi as IDropDown, ln as IEffect, yn as IFill, N as IFont, xe as IFontCollection, M as IFontStyle, bi as IFormControl, Xt as IGeometry, yi as IMovable, gt as IPageLayout, Qr as IPicture, or as IResource, mt as IRichDataKind, lt as IScript, fn as IShape, A as ISheet, f as ISlicerStyle, zn as ISort, pn as IStroke, re as ITable, Ge as ITableStyle, Rt as IText, P as ITextFrame, ar as ITheme, de as IThemeCollection, Pn as IWorkbookIO, yr as IWorkbookView, Yt as IWorksheetView, di as LOCALES_KIND, le as LicenseManager, nt as MovableContentRegistry, Ve as NamedStyleCollection, F as NumberFormat, Sn as PaintUtils, Sr as PersonCollection, Mr as RangeClipboardItem, Xn as RectAlignment, Gt as Registry, te as Resource, ke as ResourceCollection, h as RichArray, Bt as RichArrayKind, Ot as RichDataCollection, Ut as RichDataRegistry, Ie as RichRecord, _t as RichText, c as RichTextKind, gi as SHEETXL_RESOURCE_KINDS, dn as SYSTEM_COLOR_CSS_PREFIX, tn as ShapeStyleUtils, De as SimpleFontFace, Ue as SlicerStyleCollection, et as Sort, Ce as StringCollection, Jt as StyleCollection, Ci as Table, ae as TableStyleCollection, wt as TextRotation, st as TextStacked, xt as TextUtils, pe as Theme, Dt as ThemeCollection, n as TransactionConflictError, Rn as TransactionSaveStateManager, a as TransactionStore, Fn as TransactionUndoManager, Ct as Tuple, wi as VERSION, ri as Workbook, li as WorkbookIO, G as WorkbookOrigin, Ir as WorkbookView, T as Worksheet, ir as builtInStyleNameDisplay, b as createCellRangeCounts, _i as createChart, Be as externalBookClosedName, C as externalBookFileName, y as externalBookLocation, Ee as externalBookOpenName, fe as findLabel, fr as getBuiltInFunctionNames, ce as getLanguagePack, mn as getLocaleProfile, Et as getScriptRuntime, Si as getScriptingApi, vi as getScriptingDeclarations, he as localizeBoolean, Ne as localizeErrorLabel, _n as makeLocaleProfile, Ye as normalizeLabel, qt as parseBooleanLocal, d as parseErrorLocal, yt as parseExternalScope, pr as parseFormulaLiteral, ee as registerSdkLocales, u as sourceEntryFromPath, St as withScriptRuntime };