nolo-cli 0.54.0-alpha.2 → 0.61.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +3 -3
  2. package/{_executeModel-ANY4SIAS.js → _executeModel-CKT6RGTL.js} +58 -49
  3. package/{action-Q4W5JPI5.js → action-76JX3JX3.js} +9 -8
  4. package/{addContentAction-O25HFR37.js → addContentAction-V3NAZRTJ.js} +9 -7
  5. package/{addDialogAgentAction-GH7AUPPB.js → addDialogAgentAction-RZOAF46K.js} +11 -9
  6. package/{agentDeleteCommand-JWIKNWWI.js → agentDeleteCommand-VN7NPXQ4.js} +37 -32
  7. package/{agentEmailCommands-PL22BEU5.js → agentEmailCommands-F2TNAV4A.js} +73 -65
  8. package/{agentGrantCommands-2LEZDADN.js → agentGrantCommands-R3VQEZJR.js} +1 -1
  9. package/{agentListCommands-6NR7AQEK.js → agentListCommands-OSM2ANI3.js} +78 -39
  10. package/{agentMachineCommands-TASPU6OA.js → agentMachineCommands-MTPWYVRV.js} +38 -33
  11. package/{agentPullCommand-M552CYSI.js → agentPullCommand-N7L2CT7L.js} +2 -2
  12. package/agentRecordCommands-VWAWTVVC.js +122 -0
  13. package/agentRunCommand-PLZOBNVK.js +149 -0
  14. package/{agentRunControl-4GHHSXFZ.js → agentRunControl-WECMOO6O.js} +13 -6
  15. package/{agentRuntimeLocal-PCJJ56J2.js → agentRuntimeLocal-XCJLRWQE.js} +35 -28
  16. package/{agentSlice-KYLDUSNN.js → agentSlice-F6DOP4IW.js} +10 -9
  17. package/{appDeleteCommands-WLHMJAVT.js → appDeleteCommands-3BCFTRFJ.js} +37 -32
  18. package/{appDeployCommands-CKON7N2E.js → appDeployCommands-B4GMHCYA.js} +37 -32
  19. package/{appDeployStatusCommands-PXRLDASH.js → appDeployStatusCommands-4MN36WIG.js} +37 -32
  20. package/{appGetCommands-RAB5RM4M.js → appGetCommands-4GJIEUAX.js} +37 -32
  21. package/{appListCommands-GU57FB62.js → appListCommands-CHU53GSX.js} +37 -32
  22. package/{authCommand-QOPOEYEK.js → authCommand-WOTWLJNF.js} +38 -32
  23. package/{authCommands-SBQVTD6V.js → authCommands-ILTBI6JV.js} +8 -6
  24. package/{chatQueueReduxAdapter-5O2WLITN.js → chatQueueReduxAdapter-HNSQXNIR.js} +29 -24
  25. package/{chunk-WL3UOGYO.js → chunk-22BTGNSP.js} +151 -155
  26. package/{chunk-7CH6U3FL.js → chunk-2GRGFCF6.js} +2 -4
  27. package/{chunk-V4KZGLOI.js → chunk-2HPRMEEZ.js} +3059 -1079
  28. package/{chunk-UNZDCI3O.js → chunk-2KDR4CWE.js} +35 -4
  29. package/{chunk-VRZIH5JO.js → chunk-2PGGC63K.js} +1 -1
  30. package/{chunk-T27IEBNQ.js → chunk-2QDDKFG5.js} +74 -1
  31. package/{chunk-7K5VMB4Q.js → chunk-37QVS7BU.js} +21 -8
  32. package/{chunk-UITMHBVK.js → chunk-37XDGCY7.js} +1 -1
  33. package/chunk-3BLB7QKO.js +433 -0
  34. package/{chunk-NQ4N4IGO.js → chunk-3JQ2NRYU.js} +33 -10
  35. package/{chunk-UW4INMD2.js → chunk-3JWKQDA4.js} +2 -2
  36. package/{chunk-IKTHA3JH.js → chunk-3QGUVVX5.js} +2 -2
  37. package/{chunk-WHVQA7PJ.js → chunk-45YO6H7P.js} +97 -35
  38. package/chunk-4C4ST2YE.js +20015 -0
  39. package/{chunk-32I5RVMY.js → chunk-4NJEIGBQ.js} +5 -5
  40. package/{chunk-KUUTWU4I.js → chunk-5ZYA4JJ3.js} +90 -22
  41. package/chunk-6YTOJY35.js +352 -0
  42. package/{chunk-INXBNYCG.js → chunk-7A3RRUCQ.js} +155 -12
  43. package/{chunk-GV35EHNA.js → chunk-7O7KH4X5.js} +1262 -971
  44. package/{chunk-Y7LNKP32.js → chunk-7UF7CQ6B.js} +4 -6
  45. package/{chunk-2BWU4ORW.js → chunk-AQMVUA7N.js} +2 -1
  46. package/{chunk-LA4IDAK7.js → chunk-AVE2YR4F.js} +1056 -3591
  47. package/{chunk-TI5BCZCH.js → chunk-B7DXRX7F.js} +59 -121
  48. package/chunk-BFU6C242.js +66 -0
  49. package/{chunk-FA4SY4F5.js → chunk-BYEJ7K2Z.js} +1 -1
  50. package/chunk-BYXBJQAS.js +0 -0
  51. package/{chunk-IA3A5373.js → chunk-C3FZR5EC.js} +1 -1
  52. package/{chunk-IWUMSAQF.js → chunk-CJCJF5XB.js} +26 -3
  53. package/{chunk-PAHILFNT.js → chunk-CP7VIDZ7.js} +4 -4
  54. package/{chunk-OYNDYVSE.js → chunk-CTCW7U7N.js} +1 -1
  55. package/{chunk-BJLYCOZK.js → chunk-D5XKNNUV.js} +135 -795
  56. package/{chunk-AV6KQCM5.js → chunk-DNNSCSA2.js} +19 -14
  57. package/{chunk-3AOLVADY.js → chunk-DVINR3PL.js} +1 -1
  58. package/{chunk-NI2BS6UD.js → chunk-DWUCB2A3.js} +1 -1
  59. package/{chunk-AA564GBL.js → chunk-DZZL7UBV.js} +1 -1
  60. package/{chunk-6FGXGFAH.js → chunk-E6RGHPDR.js} +6 -4
  61. package/chunk-EDKF7RX4.js +30 -0
  62. package/{chunk-6SZ52ORL.js → chunk-ES6CVKVD.js} +24 -30
  63. package/{chunk-DQLYEGP7.js → chunk-FHAGENAS.js} +3 -4
  64. package/{chunk-56W233KG.js → chunk-FKFMIBTT.js} +5 -1
  65. package/{chunk-INZZJSQF.js → chunk-FZGV4FGK.js} +24 -12
  66. package/{chunk-D3JQPONH.js → chunk-GAL47RNP.js} +1 -1
  67. package/{chunk-6FQ2552G.js → chunk-HBPV76EK.js} +1085 -1150
  68. package/{chunk-LN3OQJGG.js → chunk-HLU5Q2GV.js} +4 -4
  69. package/{chunk-U2A47SVI.js → chunk-HQP7HJDL.js} +7 -7
  70. package/{chunk-H2G6JXTR.js → chunk-HQUORJTM.js} +1 -1
  71. package/{chunk-3Z3DXZBD.js → chunk-IYCUMIYS.js} +24 -20
  72. package/{chunk-7APQB6R6.js → chunk-JX5PJCWS.js} +8 -6
  73. package/{chunk-LYGNQHUW.js → chunk-JYYZCK2Z.js} +2 -4
  74. package/{chunk-PYKV6FSC.js → chunk-KWSQR2KK.js} +16 -31
  75. package/{chunk-VULELK4T.js → chunk-L7B47JXR.js} +37 -64
  76. package/{chunk-4NN3EK7H.js → chunk-LAFC3B2I.js} +1 -1
  77. package/{chunk-VRJUIUIY.js → chunk-LJKICKVC.js} +2 -2
  78. package/chunk-M3JEW6N6.js +193 -0
  79. package/chunk-MBOEV4L2.js +301 -0
  80. package/{chunk-QDHZCAH3.js → chunk-MMZ6ZTVO.js} +229 -74
  81. package/{chunk-JDSUTNYY.js → chunk-MP64VFGD.js} +2 -2
  82. package/{chunk-U5Z7LFZF.js → chunk-MXUDQZXQ.js} +47 -8
  83. package/chunk-N4G4PKQ6.js +23 -0
  84. package/{chunk-SVEUG45B.js → chunk-NHRQCXIQ.js} +0 -24
  85. package/{chunk-KXKQO4Q6.js → chunk-NTW5GWDM.js} +58 -1
  86. package/chunk-ONXOABJR.js +215 -0
  87. package/{chunk-BANYWEYY.js → chunk-OZX2IPKM.js} +8 -3
  88. package/{chunk-Q24S4NDF.js → chunk-P7OOB7QP.js} +1 -1
  89. package/{chunk-GLGD2JGY.js → chunk-PEZJEQAO.js} +7 -7
  90. package/{chunk-GBADO3SM.js → chunk-PQDIDWGX.js} +1 -1
  91. package/chunk-PSCNXBYA.js +11 -0
  92. package/chunk-QEFJJS2I.js +508 -0
  93. package/{chunk-757BGY6Y.js → chunk-QEW2MFDQ.js} +1 -1
  94. package/{chunk-SP3DPVBH.js → chunk-RDBARW6T.js} +8 -3
  95. package/{chunk-TNPCQNGQ.js → chunk-RJ2SAFB5.js} +83 -41
  96. package/{chunk-FGEYVPPR.js → chunk-RVWRKFUB.js} +8 -65
  97. package/{chunk-43CXXVJD.js → chunk-RXX4GDIH.js} +1 -1
  98. package/chunk-SEJ5OS6F.js +49 -0
  99. package/{chunk-MFI4FGHX.js → chunk-SOJM57FX.js} +5 -2
  100. package/{chunk-EKLRRZIN.js → chunk-SPAQ4PVV.js} +0 -5
  101. package/{chunk-L7NG2M6H.js → chunk-TRV2MIDW.js} +89 -74
  102. package/chunk-UAD2WT54.js +64 -0
  103. package/{chunk-RTLJUGQH.js → chunk-UZPQSVM6.js} +2 -2
  104. package/{chunk-3QJTD6DO.js → chunk-VMWYBIXG.js} +9 -7
  105. package/{chunk-ZHXJ6M7T.js → chunk-W7XHHYWM.js} +4 -0
  106. package/{chunk-5WADL4O7.js → chunk-XAVSS3KE.js} +21 -3
  107. package/{chunk-CVT7L2WZ.js → chunk-XOKOSO35.js} +13 -22
  108. package/{chunk-6BYAXNH5.js → chunk-XTJTN3RW.js} +57 -4
  109. package/{chunk-T5HJEUQN.js → chunk-YCDWJX45.js} +1 -1
  110. package/{chunk-MRWGHF56.js → chunk-YDH3FDFQ.js} +12 -356
  111. package/{chunk-H4RYESI6.js → chunk-Z4QSJILV.js} +85 -13
  112. package/chunk-ZJ7UHBJS.js +89 -0
  113. package/{chunk-O5FLGN2L.js → chunk-ZRSJ3JEH.js} +6 -2
  114. package/{cliExecutor-BBUVQU4L.js → cliExecutor-HG3S345O.js} +1 -1
  115. package/{codingSkills-BCQXRZOI.js → codingSkills-VDXQYWX4.js} +2 -2
  116. package/contentThunks-7YG2ZYQC.js +73 -0
  117. package/{cooldownCommands-GI5NNWGL.js → cooldownCommands-BSCH2W7P.js} +2 -2
  118. package/{createAgentAutomationAction-UJLNFFFC.js → createAgentAutomationAction-PJQSCAIO.js} +32 -26
  119. package/createDialogAction-SFEJX6SP.js +64 -0
  120. package/{createPageAction-N3IYABHV.js → createPageAction-B7WRHOQO.js} +35 -28
  121. package/{dbSlice-D5CNGWPD.js → dbSlice-IBVOBVMS.js} +7 -6
  122. package/{deleteFile-44TUM34Y.js → deleteFile-FWP2PSBG.js} +4 -3
  123. package/{dialogCommands-35M6RBAC.js → dialogCommands-VL2X22QC.js} +38 -33
  124. package/{dialogSlice-KO7ADD7H.js → dialogSlice-ANMACABO.js} +29 -24
  125. package/{docCreateCommands-VXHZWQ3P.js → docCreateCommands-ITLGZ5YI.js} +40 -35
  126. package/{docDeleteCommands-4WFAJR6A.js → docDeleteCommands-LH3YNL4C.js} +37 -32
  127. package/{docReadCommands-OYREEFAR.js → docReadCommands-YAJ77F36.js} +36 -31
  128. package/{docStore-5BU76DFK.js → docStore-D4HGHPWI.js} +9 -33
  129. package/{docUpdateCommands-A7QERSME.js → docUpdateCommands-DQBOMH2G.js} +40 -35
  130. package/{fetchMessages-KZQVBXKY.js → fetchMessages-DRABNDPZ.js} +3 -3
  131. package/{getPricing-HAU62AFM.js → getPricing-NM3NUTAS.js} +5 -5
  132. package/handleSendMessageAction-DF2OABGW.js +675 -0
  133. package/index.js +79 -88
  134. package/{lib-2ZTNRXR4.js → lib-FRRS27KN.js} +63 -28
  135. package/{localDialogRead-NQ33HBSI.js → localDialogRead-PUQKFI73.js} +1 -1
  136. package/{localRuntimeAuthority-KQDAE64E.js → localRuntimeAuthority-R5UBODT3.js} +6 -4
  137. package/{localRuntimeDb-PF7CFKDL.js → localRuntimeDb-P37ZTX55.js} +1 -1
  138. package/{machineCommands-J43U3TX5.js → machineCommands-JXDYQ5LB.js} +309 -87
  139. package/{machineWsRunDispatch-Z2Z6STXZ.js → machineWsRunDispatch-3QHI7JX5.js} +67 -59
  140. package/memberThunks-VZI6G7YZ.js +640 -0
  141. package/{models-4QF4BJVY.js → models-FAMINFZ7.js} +2 -2
  142. package/package.json +3 -2
  143. package/{read-RGNPI5H2.js → read-2BYWW7AA.js} +4 -3
  144. package/{readDocTool-6ESWKTXD.js → readDocTool-LC3A7QTB.js} +1 -1
  145. package/{readlineWorkspace-YRPV6JPN.js → readlineWorkspace-KVZTEAHB.js} +4609 -2698
  146. package/{removeDialogAgentAction-JYT73FU2.js → removeDialogAgentAction-SFYZXHNK.js} +14 -12
  147. package/{runAgentClientLoop-5YM5WMAY.js → runAgentClientLoop-KGTEL7ZP.js} +60 -50
  148. package/{runtimeDoctorCommands-JKTTN723.js → runtimeDoctorCommands-CROTMULY.js} +7 -5
  149. package/{setDialogExtraReferencesAction-D564LMYQ.js → setDialogExtraReferencesAction-Q32RGFTA.js} +10 -8
  150. package/{setPrimaryDialogAgentAction-ACY3BLYA.js → setPrimaryDialogAgentAction-BFYJHUJS.js} +14 -12
  151. package/{settingSlice-MKI3MNZJ.js → settingSlice-IRUU4VFB.js} +8 -7
  152. package/{skillDiscovery-GPUDHDTZ.js → skillDiscovery-NTRLM6KP.js} +3 -3
  153. package/{spaceCommands-MY26V52L.js → spaceCommands-KNAYWMCZ.js} +40 -220
  154. package/{streamAgentChatTurn-XV5X5TNQ.js → streamAgentChatTurn-FLYPTXKZ.js} +140 -95
  155. package/{switchDialogAgentAction-CJ5H6SAR.js → switchDialogAgentAction-L2KOKCGG.js} +11 -9
  156. package/{tableCommands-R6WFRDYF.js → tableCommands-SUNTHAYX.js} +1 -1
  157. package/{toolApiClient-B2MFXMEG.js → toolApiClient-VGYUB4P5.js} +4 -2
  158. package/{tools-MIMELA2Y.js → tools-CVLUXK6P.js} +46 -38
  159. package/{tuiSummaryLlmCaller-XJ5BKNNS.js → tuiSummaryLlmCaller-F3DPFFZM.js} +20 -16
  160. package/{updateCommands-IYKLF3JX.js → updateCommands-AJYSD73Y.js} +2 -2
  161. package/{updateDialogTitleAction-EIZUSWHR.js → updateDialogTitleAction-HWJIZEIV.js} +33 -27
  162. package/agentRecordCommands-Z64TA63M.js +0 -114
  163. package/agentRunCommand-4QJQLPRW.js +0 -134
  164. package/agentSuperviseCommands-VB6BUS5H.js +0 -640
  165. package/chunk-6BGAQ3KR.js +0 -7081
  166. package/chunk-FD36SCCD.js +0 -105
  167. package/chunk-J3UALFHL.js +0 -370
  168. package/chunk-RU5D3B22.js +0 -230
  169. package/chunk-YBV6QJKM.js +0 -441
  170. package/createDialogAction-TJCX6GUE.js +0 -58
  171. package/handleSendMessageAction-OSGQJQ45.js +0 -406
  172. package/spaceSlice-JUIXC365.js +0 -127
@@ -4,27 +4,24 @@ import {
4
4
  import {
5
5
  buildDialogAttachmentPlan,
6
6
  extractFileContentIds
7
- } from "./chunk-H2G6JXTR.js";
7
+ } from "./chunk-HQUORJTM.js";
8
8
  import {
9
9
  isOAuthApiKeyRef
10
10
  } from "./chunk-YYLHWIW6.js";
11
- import {
12
- runLlm
13
- } from "./chunk-U2A47SVI.js";
14
11
  import {
15
12
  getApproxPricePerImage
16
13
  } from "./chunk-AGGIDPCZ.js";
14
+ import {
15
+ runLlm
16
+ } from "./chunk-HQP7HJDL.js";
17
17
  import {
18
18
  cleanupCliSessionForDialog
19
- } from "./chunk-32I5RVMY.js";
19
+ } from "./chunk-4NJEIGBQ.js";
20
20
  import {
21
21
  getActiveDialogAgentId,
22
22
  getDialogAgentIds,
23
23
  getPrimaryDialogAgentId
24
24
  } from "./chunk-5RGU3J7P.js";
25
- import {
26
- require_date_fns
27
- } from "./chunk-M76ECQRD.js";
28
25
  import {
29
26
  abortActiveControllers,
30
27
  addPageReferenceToRuntime,
@@ -34,12 +31,17 @@ import {
34
31
  deleteDialogRuntime,
35
32
  getActiveDialogKey,
36
33
  getDialogRuntimeTokens,
37
- require_react,
38
34
  resetDialogRuntimeSessionState,
39
35
  selectCurrentDialogKey,
40
36
  setActiveDialogKey,
41
37
  setDialogConfigError
42
- } from "./chunk-MRWGHF56.js";
38
+ } from "./chunk-6YTOJY35.js";
39
+ import {
40
+ require_date_fns
41
+ } from "./chunk-M76ECQRD.js";
42
+ import {
43
+ require_react
44
+ } from "./chunk-YDH3FDFQ.js";
43
45
  import {
44
46
  DEFAULT_AUTO_EXECUTION_PROFILE,
45
47
  DEFAULT_CONTEXT_WINDOW,
@@ -50,39 +52,48 @@ import {
50
52
  STREAM_TRUNCATED_FALLBACK_MESSAGE,
51
53
  getModelContextWindow,
52
54
  getModelInfo,
55
+ readCacheCreationInputTokens,
56
+ readCacheReadInputTokens,
53
57
  resolveAutoExecutionProfile
54
- } from "./chunk-KUUTWU4I.js";
58
+ } from "./chunk-5ZYA4JJ3.js";
55
59
  import {
56
60
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
57
61
  buildCompactionMetricsFromPlan,
58
62
  buildCompactionUserContent,
59
- estimateTokenCount,
60
63
  formatCompactionMetricsLog,
61
64
  formatFileOperationsFromMessages,
62
65
  formatMessagesForSummaryWithTruncation,
63
66
  normalizeAssistantContentBuffer,
67
+ normalizeTimingMs,
64
68
  planCompression,
65
69
  serializeMessageContent
66
- } from "./chunk-H4RYESI6.js";
70
+ } from "./chunk-Z4QSJILV.js";
71
+ import {
72
+ estimateTokenCount
73
+ } from "./chunk-PSCNXBYA.js";
67
74
  import {
68
75
  findModelConfig,
69
76
  getModelConfig
70
- } from "./chunk-QDHZCAH3.js";
77
+ } from "./chunk-MMZ6ZTVO.js";
71
78
  import {
72
79
  toErrorMessage
73
80
  } from "./chunk-HNMXYYJR.js";
74
81
  import {
75
82
  fetchMessages
76
- } from "./chunk-FA4SY4F5.js";
83
+ } from "./chunk-BYEJ7K2Z.js";
77
84
  import {
85
+ PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
86
+ PLATFORM_HOSTED_GLM_53_FLASH_BASETEN_PRICE,
87
+ PLATFORM_HOSTED_GLM_53_FLASH_MODEL,
78
88
  getPlatformHostedDeepSeekV4Price,
89
+ isPlatformHostedClaudeModel,
79
90
  isPlatformHostedDeepSeekV4Model,
80
91
  isPlatformHostedImageModel,
81
92
  isPlatformHostedOpenAIImageModel
82
- } from "./chunk-WL3UOGYO.js";
93
+ } from "./chunk-22BTGNSP.js";
83
94
  import {
84
95
  nolotusId
85
- } from "./chunk-3QJTD6DO.js";
96
+ } from "./chunk-VMWYBIXG.js";
86
97
  import {
87
98
  asRecordOrEmpty
88
99
  } from "./chunk-KX6YBIHG.js";
@@ -92,7 +103,7 @@ import {
92
103
  remove,
93
104
  selectById,
94
105
  write
95
- } from "./chunk-AV6KQCM5.js";
106
+ } from "./chunk-DNNSCSA2.js";
96
107
  import {
97
108
  buildDialogAgentListIndexDeleteOps,
98
109
  createDialogMessageKeyAndId,
@@ -103,7 +114,7 @@ import {
103
114
  isDialogRecordKey,
104
115
  isPageKey,
105
116
  isTableMetaKey
106
- } from "./chunk-SVEUG45B.js";
117
+ } from "./chunk-NHRQCXIQ.js";
107
118
  import {
108
119
  asOptionalFiniteNumber
109
120
  } from "./chunk-WWC7I6TA.js";
@@ -117,7 +128,7 @@ import {
117
128
  builtinAgentCatalogEntryById,
118
129
  builtinRuntimeFallbackEntries,
119
130
  isBuiltinPlatformAgentKey
120
- } from "./chunk-VULELK4T.js";
131
+ } from "./chunk-L7B47JXR.js";
121
132
  import {
122
133
  extractCustomId,
123
134
  extractUserId,
@@ -132,749 +143,34 @@ import {
132
143
  createSelector,
133
144
  getRuntimeServerContext,
134
145
  parseOwnerUserIdFromDbKey,
135
- scheduleDeleteReplication,
136
- selectIdentityUserId
137
- } from "./chunk-PYKV6FSC.js";
146
+ scheduleDeleteReplication
147
+ } from "./chunk-KWSQR2KK.js";
138
148
  import {
139
149
  createClientLogger,
140
150
  isAbortError
141
151
  } from "./chunk-QOKAKDPE.js";
152
+ import {
153
+ selectIdentityToken,
154
+ selectIdentityUser,
155
+ selectIdentityUserId
156
+ } from "./chunk-SEJ5OS6F.js";
142
157
  import {
143
158
  isTombstoneRecord,
144
159
  shouldReplaceWithNextRecord
145
160
  } from "./chunk-GBRG75BQ.js";
146
- import {
147
- isRecord
148
- } from "./chunk-KUG52IAP.js";
149
161
  import {
150
162
  asTrimmedString
151
163
  } from "./chunk-3EUW3WEO.js";
164
+ import {
165
+ isRecord
166
+ } from "./chunk-KUG52IAP.js";
152
167
  import {
153
168
  asOptionalTrimmedString
154
169
  } from "./chunk-G3SUCT4W.js";
155
170
  import {
156
- __commonJS,
157
171
  __toESM
158
172
  } from "./chunk-4VNS5WPM.js";
159
173
 
160
- // node_modules/react-dom/cjs/react-dom.production.js
161
- var require_react_dom_production = __commonJS({
162
- "node_modules/react-dom/cjs/react-dom.production.js"(exports) {
163
- "use strict";
164
- var React = require_react();
165
- function formatProdErrorMessage(code) {
166
- var url = "https://react.dev/errors/" + code;
167
- if (1 < arguments.length) {
168
- url += "?args[]=" + encodeURIComponent(arguments[1]);
169
- for (var i = 2; i < arguments.length; i++)
170
- url += "&args[]=" + encodeURIComponent(arguments[i]);
171
- }
172
- return "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
173
- }
174
- function noop() {
175
- }
176
- var Internals = {
177
- d: {
178
- f: noop,
179
- r: function() {
180
- throw Error(formatProdErrorMessage(522));
181
- },
182
- D: noop,
183
- C: noop,
184
- L: noop,
185
- m: noop,
186
- X: noop,
187
- S: noop,
188
- M: noop
189
- },
190
- p: 0,
191
- findDOMNode: null
192
- };
193
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
194
- function createPortal$1(children, containerInfo, implementation) {
195
- var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
196
- return {
197
- $$typeof: REACT_PORTAL_TYPE,
198
- key: null == key ? null : "" + key,
199
- children,
200
- containerInfo,
201
- implementation
202
- };
203
- }
204
- var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
205
- function getCrossOriginStringAs(as, input) {
206
- if ("font" === as) return "";
207
- if ("string" === typeof input)
208
- return "use-credentials" === input ? input : "";
209
- }
210
- exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
211
- exports.createPortal = function(children, container) {
212
- var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
213
- if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
214
- throw Error(formatProdErrorMessage(299));
215
- return createPortal$1(children, container, null, key);
216
- };
217
- exports.flushSync = function(fn) {
218
- var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
219
- try {
220
- if (ReactSharedInternals.T = null, Internals.p = 2, fn) return fn();
221
- } finally {
222
- ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f();
223
- }
224
- };
225
- exports.preconnect = function(href, options) {
226
- "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
227
- };
228
- exports.prefetchDNS = function(href) {
229
- "string" === typeof href && Internals.d.D(href);
230
- };
231
- exports.preinit = function(href, options) {
232
- if ("string" === typeof href && options && "string" === typeof options.as) {
233
- var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
234
- "style" === as ? Internals.d.S(
235
- href,
236
- "string" === typeof options.precedence ? options.precedence : void 0,
237
- {
238
- crossOrigin,
239
- integrity,
240
- fetchPriority
241
- }
242
- ) : "script" === as && Internals.d.X(href, {
243
- crossOrigin,
244
- integrity,
245
- fetchPriority,
246
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
247
- });
248
- }
249
- };
250
- exports.preinitModule = function(href, options) {
251
- if ("string" === typeof href)
252
- if ("object" === typeof options && null !== options) {
253
- if (null == options.as || "script" === options.as) {
254
- var crossOrigin = getCrossOriginStringAs(
255
- options.as,
256
- options.crossOrigin
257
- );
258
- Internals.d.M(href, {
259
- crossOrigin,
260
- integrity: "string" === typeof options.integrity ? options.integrity : void 0,
261
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
262
- });
263
- }
264
- } else null == options && Internals.d.M(href);
265
- };
266
- exports.preload = function(href, options) {
267
- if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
268
- var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
269
- Internals.d.L(href, as, {
270
- crossOrigin,
271
- integrity: "string" === typeof options.integrity ? options.integrity : void 0,
272
- nonce: "string" === typeof options.nonce ? options.nonce : void 0,
273
- type: "string" === typeof options.type ? options.type : void 0,
274
- fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
275
- referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
276
- imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
277
- imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
278
- media: "string" === typeof options.media ? options.media : void 0
279
- });
280
- }
281
- };
282
- exports.preloadModule = function(href, options) {
283
- if ("string" === typeof href)
284
- if (options) {
285
- var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
286
- Internals.d.m(href, {
287
- as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
288
- crossOrigin,
289
- integrity: "string" === typeof options.integrity ? options.integrity : void 0
290
- });
291
- } else Internals.d.m(href);
292
- };
293
- exports.requestFormReset = function(form) {
294
- Internals.d.r(form);
295
- };
296
- exports.unstable_batchedUpdates = function(fn, a) {
297
- return fn(a);
298
- };
299
- exports.useFormState = function(action2, initialState2, permalink) {
300
- return ReactSharedInternals.H.useFormState(action2, initialState2, permalink);
301
- };
302
- exports.useFormStatus = function() {
303
- return ReactSharedInternals.H.useHostTransitionStatus();
304
- };
305
- exports.version = "19.2.3";
306
- }
307
- });
308
-
309
- // node_modules/react-dom/cjs/react-dom.development.js
310
- var require_react_dom_development = __commonJS({
311
- "node_modules/react-dom/cjs/react-dom.development.js"(exports) {
312
- "use strict";
313
- "production" !== process.env.NODE_ENV && function() {
314
- function noop() {
315
- }
316
- function testStringCoercion(value) {
317
- return "" + value;
318
- }
319
- function createPortal$1(children, containerInfo, implementation) {
320
- var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
321
- try {
322
- testStringCoercion(key);
323
- var JSCompiler_inline_result = false;
324
- } catch (e) {
325
- JSCompiler_inline_result = true;
326
- }
327
- JSCompiler_inline_result && (console.error(
328
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
329
- "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"
330
- ), testStringCoercion(key));
331
- return {
332
- $$typeof: REACT_PORTAL_TYPE,
333
- key: null == key ? null : "" + key,
334
- children,
335
- containerInfo,
336
- implementation
337
- };
338
- }
339
- function getCrossOriginStringAs(as, input) {
340
- if ("font" === as) return "";
341
- if ("string" === typeof input)
342
- return "use-credentials" === input ? input : "";
343
- }
344
- function getValueDescriptorExpectingObjectForWarning(thing) {
345
- return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"';
346
- }
347
- function getValueDescriptorExpectingEnumForWarning(thing) {
348
- return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
349
- }
350
- function resolveDispatcher() {
351
- var dispatcher = ReactSharedInternals.H;
352
- null === dispatcher && console.error(
353
- "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
354
- );
355
- return dispatcher;
356
- }
357
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
358
- var React = require_react(), Internals = {
359
- d: {
360
- f: noop,
361
- r: function() {
362
- throw Error(
363
- "Invalid form element. requestFormReset must be passed a form that was rendered by React."
364
- );
365
- },
366
- D: noop,
367
- C: noop,
368
- L: noop,
369
- m: noop,
370
- X: noop,
371
- S: noop,
372
- M: noop
373
- },
374
- p: 0,
375
- findDOMNode: null
376
- }, REACT_PORTAL_TYPE = Symbol.for("react.portal"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
377
- "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
378
- "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
379
- );
380
- exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
381
- exports.createPortal = function(children, container) {
382
- var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
383
- if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
384
- throw Error("Target container is not a DOM element.");
385
- return createPortal$1(children, container, null, key);
386
- };
387
- exports.flushSync = function(fn) {
388
- var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
389
- try {
390
- if (ReactSharedInternals.T = null, Internals.p = 2, fn)
391
- return fn();
392
- } finally {
393
- ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error(
394
- "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
395
- );
396
- }
397
- };
398
- exports.preconnect = function(href, options) {
399
- "string" === typeof href && href ? null != options && "object" !== typeof options ? console.error(
400
- "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
401
- getValueDescriptorExpectingEnumForWarning(options)
402
- ) : null != options && "string" !== typeof options.crossOrigin && console.error(
403
- "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
404
- getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
405
- ) : console.error(
406
- "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
407
- getValueDescriptorExpectingObjectForWarning(href)
408
- );
409
- "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
410
- };
411
- exports.prefetchDNS = function(href) {
412
- if ("string" !== typeof href || !href)
413
- console.error(
414
- "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
415
- getValueDescriptorExpectingObjectForWarning(href)
416
- );
417
- else if (1 < arguments.length) {
418
- var options = arguments[1];
419
- "object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error(
420
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
421
- getValueDescriptorExpectingEnumForWarning(options)
422
- ) : console.error(
423
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
424
- getValueDescriptorExpectingEnumForWarning(options)
425
- );
426
- }
427
- "string" === typeof href && Internals.d.D(href);
428
- };
429
- exports.preinit = function(href, options) {
430
- "string" === typeof href && href ? null == options || "object" !== typeof options ? console.error(
431
- "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
432
- getValueDescriptorExpectingEnumForWarning(options)
433
- ) : "style" !== options.as && "script" !== options.as && console.error(
434
- 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
435
- getValueDescriptorExpectingEnumForWarning(options.as)
436
- ) : console.error(
437
- "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
438
- getValueDescriptorExpectingObjectForWarning(href)
439
- );
440
- if ("string" === typeof href && options && "string" === typeof options.as) {
441
- var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
442
- "style" === as ? Internals.d.S(
443
- href,
444
- "string" === typeof options.precedence ? options.precedence : void 0,
445
- {
446
- crossOrigin,
447
- integrity,
448
- fetchPriority
449
- }
450
- ) : "script" === as && Internals.d.X(href, {
451
- crossOrigin,
452
- integrity,
453
- fetchPriority,
454
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
455
- });
456
- }
457
- };
458
- exports.preinitModule = function(href, options) {
459
- var encountered = "";
460
- "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
461
- void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".");
462
- if (encountered)
463
- console.error(
464
- "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
465
- encountered
466
- );
467
- else
468
- switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) {
469
- case "script":
470
- break;
471
- default:
472
- encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error(
473
- 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
474
- encountered,
475
- href
476
- );
477
- }
478
- if ("string" === typeof href)
479
- if ("object" === typeof options && null !== options) {
480
- if (null == options.as || "script" === options.as)
481
- encountered = getCrossOriginStringAs(
482
- options.as,
483
- options.crossOrigin
484
- ), Internals.d.M(href, {
485
- crossOrigin: encountered,
486
- integrity: "string" === typeof options.integrity ? options.integrity : void 0,
487
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
488
- });
489
- } else null == options && Internals.d.M(href);
490
- };
491
- exports.preload = function(href, options) {
492
- var encountered = "";
493
- "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
494
- null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
495
- encountered && console.error(
496
- 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
497
- encountered
498
- );
499
- if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
500
- encountered = options.as;
501
- var crossOrigin = getCrossOriginStringAs(
502
- encountered,
503
- options.crossOrigin
504
- );
505
- Internals.d.L(href, encountered, {
506
- crossOrigin,
507
- integrity: "string" === typeof options.integrity ? options.integrity : void 0,
508
- nonce: "string" === typeof options.nonce ? options.nonce : void 0,
509
- type: "string" === typeof options.type ? options.type : void 0,
510
- fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
511
- referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
512
- imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
513
- imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
514
- media: "string" === typeof options.media ? options.media : void 0
515
- });
516
- }
517
- };
518
- exports.preloadModule = function(href, options) {
519
- var encountered = "";
520
- "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
521
- void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
522
- encountered && console.error(
523
- 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
524
- encountered
525
- );
526
- "string" === typeof href && (options ? (encountered = getCrossOriginStringAs(
527
- options.as,
528
- options.crossOrigin
529
- ), Internals.d.m(href, {
530
- as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
531
- crossOrigin: encountered,
532
- integrity: "string" === typeof options.integrity ? options.integrity : void 0
533
- })) : Internals.d.m(href));
534
- };
535
- exports.requestFormReset = function(form) {
536
- Internals.d.r(form);
537
- };
538
- exports.unstable_batchedUpdates = function(fn, a) {
539
- return fn(a);
540
- };
541
- exports.useFormState = function(action2, initialState2, permalink) {
542
- return resolveDispatcher().useFormState(action2, initialState2, permalink);
543
- };
544
- exports.useFormStatus = function() {
545
- return resolveDispatcher().useHostTransitionStatus();
546
- };
547
- exports.version = "19.2.3";
548
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
549
- }();
550
- }
551
- });
552
-
553
- // node_modules/react-dom/index.js
554
- var require_react_dom = __commonJS({
555
- "node_modules/react-dom/index.js"(exports, module) {
556
- "use strict";
557
- function checkDCE() {
558
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") {
559
- return;
560
- }
561
- if (process.env.NODE_ENV !== "production") {
562
- throw new Error("^_^");
563
- }
564
- try {
565
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
566
- } catch (err) {
567
- console.error(err);
568
- }
569
- }
570
- if (process.env.NODE_ENV === "production") {
571
- checkDCE();
572
- module.exports = require_react_dom_production();
573
- } else {
574
- module.exports = require_react_dom_development();
575
- }
576
- }
577
- });
578
-
579
- // node_modules/react/cjs/react-jsx-runtime.production.js
580
- var require_react_jsx_runtime_production = __commonJS({
581
- "node_modules/react/cjs/react-jsx-runtime.production.js"(exports) {
582
- "use strict";
583
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
584
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
585
- function jsxProd(type, config, maybeKey) {
586
- var key = null;
587
- void 0 !== maybeKey && (key = "" + maybeKey);
588
- void 0 !== config.key && (key = "" + config.key);
589
- if ("key" in config) {
590
- maybeKey = {};
591
- for (var propName in config)
592
- "key" !== propName && (maybeKey[propName] = config[propName]);
593
- } else maybeKey = config;
594
- config = maybeKey.ref;
595
- return {
596
- $$typeof: REACT_ELEMENT_TYPE,
597
- type,
598
- key,
599
- ref: void 0 !== config ? config : null,
600
- props: maybeKey
601
- };
602
- }
603
- exports.Fragment = REACT_FRAGMENT_TYPE;
604
- exports.jsx = jsxProd;
605
- exports.jsxs = jsxProd;
606
- }
607
- });
608
-
609
- // node_modules/react/cjs/react-jsx-runtime.development.js
610
- var require_react_jsx_runtime_development = __commonJS({
611
- "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
612
- "use strict";
613
- "production" !== process.env.NODE_ENV && function() {
614
- function getComponentNameFromType(type) {
615
- if (null == type) return null;
616
- if ("function" === typeof type)
617
- return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
618
- if ("string" === typeof type) return type;
619
- switch (type) {
620
- case REACT_FRAGMENT_TYPE:
621
- return "Fragment";
622
- case REACT_PROFILER_TYPE:
623
- return "Profiler";
624
- case REACT_STRICT_MODE_TYPE:
625
- return "StrictMode";
626
- case REACT_SUSPENSE_TYPE:
627
- return "Suspense";
628
- case REACT_SUSPENSE_LIST_TYPE:
629
- return "SuspenseList";
630
- case REACT_ACTIVITY_TYPE:
631
- return "Activity";
632
- }
633
- if ("object" === typeof type)
634
- switch ("number" === typeof type.tag && console.error(
635
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
636
- ), type.$$typeof) {
637
- case REACT_PORTAL_TYPE:
638
- return "Portal";
639
- case REACT_CONTEXT_TYPE:
640
- return type.displayName || "Context";
641
- case REACT_CONSUMER_TYPE:
642
- return (type._context.displayName || "Context") + ".Consumer";
643
- case REACT_FORWARD_REF_TYPE:
644
- var innerType = type.render;
645
- type = type.displayName;
646
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
647
- return type;
648
- case REACT_MEMO_TYPE:
649
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
650
- case REACT_LAZY_TYPE:
651
- innerType = type._payload;
652
- type = type._init;
653
- try {
654
- return getComponentNameFromType(type(innerType));
655
- } catch (x) {
656
- }
657
- }
658
- return null;
659
- }
660
- function testStringCoercion(value) {
661
- return "" + value;
662
- }
663
- function checkKeyStringCoercion(value) {
664
- try {
665
- testStringCoercion(value);
666
- var JSCompiler_inline_result = false;
667
- } catch (e) {
668
- JSCompiler_inline_result = true;
669
- }
670
- if (JSCompiler_inline_result) {
671
- JSCompiler_inline_result = console;
672
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
673
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
674
- JSCompiler_temp_const.call(
675
- JSCompiler_inline_result,
676
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
677
- JSCompiler_inline_result$jscomp$0
678
- );
679
- return testStringCoercion(value);
680
- }
681
- }
682
- function getTaskName(type) {
683
- if (type === REACT_FRAGMENT_TYPE) return "<>";
684
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
685
- return "<...>";
686
- try {
687
- var name = getComponentNameFromType(type);
688
- return name ? "<" + name + ">" : "<...>";
689
- } catch (x) {
690
- return "<...>";
691
- }
692
- }
693
- function getOwner() {
694
- var dispatcher = ReactSharedInternals.A;
695
- return null === dispatcher ? null : dispatcher.getOwner();
696
- }
697
- function UnknownOwner() {
698
- return Error("react-stack-top-frame");
699
- }
700
- function hasValidKey(config) {
701
- if (hasOwnProperty.call(config, "key")) {
702
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
703
- if (getter && getter.isReactWarning) return false;
704
- }
705
- return void 0 !== config.key;
706
- }
707
- function defineKeyPropWarningGetter(props, displayName) {
708
- function warnAboutAccessingKey() {
709
- specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
710
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
711
- displayName
712
- ));
713
- }
714
- warnAboutAccessingKey.isReactWarning = true;
715
- Object.defineProperty(props, "key", {
716
- get: warnAboutAccessingKey,
717
- configurable: true
718
- });
719
- }
720
- function elementRefGetterWithDeprecationWarning() {
721
- var componentName = getComponentNameFromType(this.type);
722
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
723
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
724
- ));
725
- componentName = this.props.ref;
726
- return void 0 !== componentName ? componentName : null;
727
- }
728
- function ReactElement(type, key, props, owner, debugStack, debugTask) {
729
- var refProp = props.ref;
730
- type = {
731
- $$typeof: REACT_ELEMENT_TYPE,
732
- type,
733
- key,
734
- props,
735
- _owner: owner
736
- };
737
- null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
738
- enumerable: false,
739
- get: elementRefGetterWithDeprecationWarning
740
- }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
741
- type._store = {};
742
- Object.defineProperty(type._store, "validated", {
743
- configurable: false,
744
- enumerable: false,
745
- writable: true,
746
- value: 0
747
- });
748
- Object.defineProperty(type, "_debugInfo", {
749
- configurable: false,
750
- enumerable: false,
751
- writable: true,
752
- value: null
753
- });
754
- Object.defineProperty(type, "_debugStack", {
755
- configurable: false,
756
- enumerable: false,
757
- writable: true,
758
- value: debugStack
759
- });
760
- Object.defineProperty(type, "_debugTask", {
761
- configurable: false,
762
- enumerable: false,
763
- writable: true,
764
- value: debugTask
765
- });
766
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
767
- return type;
768
- }
769
- function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
770
- var children = config.children;
771
- if (void 0 !== children)
772
- if (isStaticChildren)
773
- if (isArrayImpl(children)) {
774
- for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
775
- validateChildKeys(children[isStaticChildren]);
776
- Object.freeze && Object.freeze(children);
777
- } else
778
- console.error(
779
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
780
- );
781
- else validateChildKeys(children);
782
- if (hasOwnProperty.call(config, "key")) {
783
- children = getComponentNameFromType(type);
784
- var keys = Object.keys(config).filter(function(k) {
785
- return "key" !== k;
786
- });
787
- isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
788
- didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
789
- 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
790
- isStaticChildren,
791
- children,
792
- keys,
793
- children
794
- ), didWarnAboutKeySpread[children + isStaticChildren] = true);
795
- }
796
- children = null;
797
- void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
798
- hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
799
- if ("key" in config) {
800
- maybeKey = {};
801
- for (var propName in config)
802
- "key" !== propName && (maybeKey[propName] = config[propName]);
803
- } else maybeKey = config;
804
- children && defineKeyPropWarningGetter(
805
- maybeKey,
806
- "function" === typeof type ? type.displayName || type.name || "Unknown" : type
807
- );
808
- return ReactElement(
809
- type,
810
- children,
811
- maybeKey,
812
- getOwner(),
813
- debugStack,
814
- debugTask
815
- );
816
- }
817
- function validateChildKeys(node) {
818
- isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
819
- }
820
- function isValidElement(object) {
821
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
822
- }
823
- var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
824
- return null;
825
- };
826
- React = {
827
- react_stack_bottom_frame: function(callStackForError) {
828
- return callStackForError();
829
- }
830
- };
831
- var specialPropKeyWarningShown;
832
- var didWarnAboutElementRef = {};
833
- var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
834
- React,
835
- UnknownOwner
836
- )();
837
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
838
- var didWarnAboutKeySpread = {};
839
- exports.Fragment = REACT_FRAGMENT_TYPE;
840
- exports.jsx = function(type, config, maybeKey) {
841
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
842
- return jsxDEVImpl(
843
- type,
844
- config,
845
- maybeKey,
846
- false,
847
- trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
848
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
849
- );
850
- };
851
- exports.jsxs = function(type, config, maybeKey) {
852
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
853
- return jsxDEVImpl(
854
- type,
855
- config,
856
- maybeKey,
857
- true,
858
- trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
859
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
860
- );
861
- };
862
- }();
863
- }
864
- });
865
-
866
- // node_modules/react/jsx-runtime.js
867
- var require_jsx_runtime = __commonJS({
868
- "node_modules/react/jsx-runtime.js"(exports, module) {
869
- "use strict";
870
- if (process.env.NODE_ENV === "production") {
871
- module.exports = require_react_jsx_runtime_production();
872
- } else {
873
- module.exports = require_react_jsx_runtime_development();
874
- }
875
- }
876
- });
877
-
878
174
  // packages/chat/dialog/actions/addReferenceKeysAction.ts
879
175
  var extractReferenceKeys = (content) => {
880
176
  const keys = /* @__PURE__ */ new Set();
@@ -918,7 +214,7 @@ var addReferenceKeysAction = createAsyncThunk(
918
214
  // packages/chat/messages/toolPresentation.ts
919
215
  var SUMMARY_EMOJI_PREFIX = new RegExp("^(\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\[[vx!]\\])\\s*", "u");
920
216
 
921
- // packages/chat/messages/web/assistantReplyPendingState.ts
217
+ // packages/chat/messages/assistantMessageFacts.ts
922
218
  var isAssistantToolStub = (msg) => msg?.role === "assistant" && (msg.content == null || typeof msg.content === "string" && msg.content.trim().length === 0 || Array.isArray(msg.content) && msg.content.length === 0) && Array.isArray(msg?.tool_calls) && msg.tool_calls.length > 0;
923
219
 
924
220
  // packages/chat/messages/messageDeleteCascade.ts
@@ -1888,6 +1184,12 @@ function applyMessageStreamingUpsert(existing, chunk) {
1888
1184
  ...chunk
1889
1185
  };
1890
1186
  merged.isStreaming = true;
1187
+ if (existing && existing.role === "assistant" && merged.role === "assistant" && typeof existing.content === "string" && existing.content.length > 0 && typeof merged.content === "string" && merged.content.length < existing.content.length && existing.content.startsWith(merged.content)) {
1188
+ merged.content = existing.content;
1189
+ }
1190
+ if (existing && existing.role === "assistant" && merged.role === "assistant" && typeof existing.thinkContent === "string" && existing.thinkContent.length > 0 && typeof merged.thinkContent === "string" && merged.thinkContent.length < existing.thinkContent.length && existing.thinkContent.startsWith(merged.thinkContent)) {
1191
+ merged.thinkContent = existing.thinkContent;
1192
+ }
1891
1193
  return merged;
1892
1194
  }
1893
1195
 
@@ -2642,7 +1944,7 @@ async function captureUnderstandingFromCompletedUiTurn(input) {
2642
1944
  const latestUserInput = getLatestUserInputFromMessages(input.messages);
2643
1945
  if (!latestUserInput) return;
2644
1946
  const state = input.state;
2645
- const token = typeof state?.auth?.currentToken === "string" ? state.auth.currentToken : null;
1947
+ const token = selectIdentityToken(state) ?? null;
2646
1948
  const baseUrl = resolveMemoryCaptureBaseUrl(state);
2647
1949
  if (!token || !baseUrl) return;
2648
1950
  const dialog = input.dialogKey ? selectById(state, input.dialogKey) : void 0;
@@ -3584,7 +2886,7 @@ var messageSlice = createSliceWithThunks({
3584
2886
  runtimeOptions: args.runtimeOptions
3585
2887
  });
3586
2888
  if (agentKeyToUse) {
3587
- const { streamAgentChatTurn } = await import("./agentSlice-KYLDUSNN.js");
2889
+ const { streamAgentChatTurn } = await import("./agentSlice-F6DOP4IW.js");
3588
2890
  await dispatch(
3589
2891
  streamAgentChatTurn({
3590
2892
  agentKey: agentKeyToUse,
@@ -3649,11 +2951,11 @@ var messageSlice_default = messageSlice.reducer;
3649
2951
  var import_date_fns = __toESM(require_date_fns());
3650
2952
  import { ulid } from "ulid";
3651
2953
 
3652
- // packages/render/web/ui/Toast.tsx
3653
- var import_react2 = __toESM(require_react(), 1);
3654
- var import_react_dom = __toESM(require_react_dom(), 1);
3655
- var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
2954
+ // packages/render/web/ui/toastStore.ts
3656
2955
  var EXIT_MS = 320;
2956
+ var raf = typeof globalThis.requestAnimationFrame === "function" ? (cb) => globalThis.requestAnimationFrame(cb) : (cb) => {
2957
+ setTimeout(cb, 16);
2958
+ };
3657
2959
  var ToastStore = class {
3658
2960
  toasts = [];
3659
2961
  listeners = /* @__PURE__ */ new Set();
@@ -3669,8 +2971,8 @@ var ToastStore = class {
3669
2971
  const entry = { ...item, id, phase: "entering" };
3670
2972
  this.toasts = [...filtered, entry];
3671
2973
  this.notify();
3672
- requestAnimationFrame(
3673
- () => requestAnimationFrame(() => {
2974
+ raf(
2975
+ () => raf(() => {
3674
2976
  this.toasts = this.toasts.map(
3675
2977
  (t) => t.id === id ? { ...t, phase: "visible" } : t
3676
2978
  );
@@ -3724,6 +3026,7 @@ var toast = Object.assign(
3724
3026
  {
3725
3027
  success: (message, options) => add(message, "success", options),
3726
3028
  error: (message, options) => add(message, "error", options),
3029
+ info: (message, options) => add(message, "default", options),
3727
3030
  loading: (message, options) => add(message, "loading", options),
3728
3031
  dismiss: (id) => toastManager.close(id)
3729
3032
  }
@@ -3763,10 +3066,6 @@ var saveTokenRecord = async (tokenData, record, thunkApi, callId) => {
3763
3066
  }
3764
3067
  };
3765
3068
 
3766
- // packages/identity/actions.local.ts
3767
- var NOOP_ACTION = { type: "identity/noop" };
3768
- var deductBalance = (_amount) => NOOP_ACTION;
3769
-
3770
3069
  // packages/ai/token/calculatePrice.ts
3771
3070
  var sanitizeCost = (raw) => {
3772
3071
  const rounded = Number(raw.toFixed(6));
@@ -3832,6 +3131,9 @@ var resolveEffectiveModelPrice = ({
3832
3131
  if (provider === "google") {
3833
3132
  return resolveGoogleServiceTierPrice(model, resolvedPrice, billingServiceTier);
3834
3133
  }
3134
+ if (provider === "runinfra" || provider === "baseten") {
3135
+ return resolvedPrice;
3136
+ }
3835
3137
  return resolvedPrice;
3836
3138
  };
3837
3139
  var getEffectivePrices = (resolvedPrice, externalPrice) => {
@@ -3880,17 +3182,23 @@ var calculateAnthropicCost = (resolvedPrice, usage, externalPrice) => {
3880
3182
  var calculateCacheBasedCost = (resolvedPrice, usage, externalPrice) => {
3881
3183
  const { input_tokens, output_tokens, cache_read_input_tokens } = usage;
3882
3184
  const { input: effectiveInputPrice, output: effectiveOutputPrice } = getEffectivePrices(resolvedPrice, externalPrice);
3883
- const cacheMissTokens = input_tokens - cache_read_input_tokens;
3185
+ const inputTokens = Math.max(0, input_tokens ?? 0);
3186
+ const cacheRead = Math.min(
3187
+ Math.max(0, cache_read_input_tokens ?? 0),
3188
+ inputTokens
3189
+ );
3190
+ const outputTokens = Math.max(0, output_tokens ?? 0);
3191
+ const cacheMissTokens = inputTokens - cacheRead;
3884
3192
  const cacheHitPrice = resolvedPrice.inputCacheHit || 0;
3885
- const regularTotal = (cacheMissTokens * resolvedPrice.input + cache_read_input_tokens * cacheHitPrice + output_tokens * resolvedPrice.output) / 1e6;
3886
- const chargeTotal = (cacheMissTokens * effectiveInputPrice + cache_read_input_tokens * cacheHitPrice + output_tokens * effectiveOutputPrice) / 1e6;
3193
+ const regularTotal = (cacheMissTokens * resolvedPrice.input + cacheRead * cacheHitPrice + outputTokens * resolvedPrice.output) / 1e6;
3194
+ const chargeTotal = (cacheMissTokens * effectiveInputPrice + cacheRead * cacheHitPrice + outputTokens * effectiveOutputPrice) / 1e6;
3887
3195
  return {
3888
3196
  regular: regularTotal,
3889
3197
  charge: chargeTotal,
3890
3198
  details: {
3891
3199
  inputCost: cacheMissTokens * resolvedPrice.input / 1e6,
3892
- outputCost: output_tokens * resolvedPrice.output / 1e6,
3893
- cachingReadCost: cache_read_input_tokens * cacheHitPrice / 1e6,
3200
+ outputCost: outputTokens * resolvedPrice.output / 1e6,
3201
+ cachingReadCost: cacheRead * cacheHitPrice / 1e6,
3894
3202
  cachingWriteCost: 0
3895
3203
  }
3896
3204
  };
@@ -3969,6 +3277,8 @@ var calculateBasicCost = (model, usage, provider, externalPrice, billingServiceT
3969
3277
  case "deepseek":
3970
3278
  case "openai":
3971
3279
  case "deepinfra":
3280
+ case "runinfra":
3281
+ case "baseten":
3972
3282
  return calculateCacheBasedCost(resolvedPrice, usage, externalPrice);
3973
3283
  // without it keep simple full-price billing so cached tokens are not
3974
3284
  // priced at 0 — but a platform-hosted model用于 agentic 循环时必须补上
@@ -4047,6 +3357,18 @@ var calculatePrice = ({
4047
3357
  try {
4048
3358
  model = getModelConfig(provider, modelName);
4049
3359
  } catch {
3360
+ if (provider === "baseten" && /^(?:zai-org\/)?glm-5[.-]3-flash$/i.test(modelName)) {
3361
+ const costs3 = calculateBasicCost(
3362
+ { name: modelName, hasVision: true, price: PLATFORM_HOSTED_GLM_53_FLASH_BASETEN_PRICE },
3363
+ usage,
3364
+ "baseten",
3365
+ externalPrice,
3366
+ billingServiceTier,
3367
+ nowMs
3368
+ );
3369
+ const pay3 = calculatePayDistribution(costs3, externalPrice, sharingLevel);
3370
+ return { cost: sanitizeCost(costs3.charge), pay: pay3 };
3371
+ }
4050
3372
  if (isPlatformHostedImageModel(modelName)) {
4051
3373
  const hostedImageModel = getModelConfig("nolo", modelName);
4052
3374
  const costs3 = calculateBasicCost(
@@ -4067,7 +3389,7 @@ var calculatePrice = ({
4067
3389
  return { cost: sanitizeCost(adjusted.charge), pay: pay3 };
4068
3390
  }
4069
3391
  if ((provider === "nolo" || provider === "deepseek") && isPlatformHostedDeepSeekV4Model(modelName)) {
4070
- const hostedModel = getModelConfig("nolo", modelName);
3392
+ const hostedModel = getModelConfig("nolo", PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL);
4071
3393
  const costs3 = calculateBasicCost(
4072
3394
  hostedModel,
4073
3395
  usage,
@@ -4079,6 +3401,19 @@ var calculatePrice = ({
4079
3401
  const pay3 = calculatePayDistribution(costs3, externalPrice, sharingLevel);
4080
3402
  return { cost: sanitizeCost(costs3.charge), pay: pay3 };
4081
3403
  }
3404
+ if (provider === "nolo" && isPlatformHostedClaudeModel(modelName)) {
3405
+ const compatModel = getModelConfig("nolo", PLATFORM_HOSTED_GLM_53_FLASH_MODEL);
3406
+ const costs3 = calculateBasicCost(
3407
+ compatModel,
3408
+ usage,
3409
+ provider,
3410
+ externalPrice,
3411
+ billingServiceTier,
3412
+ nowMs
3413
+ );
3414
+ const pay3 = calculatePayDistribution(costs3, externalPrice, sharingLevel);
3415
+ return { cost: sanitizeCost(costs3.charge), pay: pay3 };
3416
+ }
4082
3417
  const zeroCostModel = {
4083
3418
  name: modelName,
4084
3419
  hasVision: false,
@@ -4131,14 +3466,6 @@ var finiteTokenCount = (value) => {
4131
3466
  if (finite === void 0) return void 0;
4132
3467
  return Math.max(0, Math.floor(finite));
4133
3468
  };
4134
- var readNestedTokenCount = (value, path) => {
4135
- let cursor = value;
4136
- for (const key of path) {
4137
- if (!cursor || typeof cursor !== "object") return void 0;
4138
- cursor = cursor[key];
4139
- }
4140
- return finiteTokenCount(cursor);
4141
- };
4142
3469
  var readFiniteNumberField = (usage, field) => {
4143
3470
  if (!usage || typeof usage !== "object") return void 0;
4144
3471
  if (!(field in usage)) return void 0;
@@ -4159,8 +3486,8 @@ var normalizeUsage = (usage) => {
4159
3486
  }
4160
3487
  const inputTokens = "input_tokens" in usage ? usage.input_tokens ?? 0 : "prompt_tokens" in usage ? usage.prompt_tokens : 0;
4161
3488
  const outputTokens = "output_tokens" in usage ? usage.output_tokens ?? 0 : "completion_tokens" in usage ? usage.completion_tokens : 0;
4162
- const cacheCreationInputTokens = "cache_creation_input_tokens" in usage ? usage.cache_creation_input_tokens ?? 0 : "prompt_cache_miss_tokens" in usage ? usage.prompt_cache_miss_tokens ?? 0 : 0;
4163
- const cacheReadInputTokens = finiteTokenCount(usage.cache_read_input_tokens) ?? finiteTokenCount(usage.prompt_cache_hit_tokens) ?? readNestedTokenCount(usage, ["input_tokens_details", "cached_tokens"]) ?? readNestedTokenCount(usage, ["prompt_tokens_details", "cached_tokens"]) ?? 0;
3489
+ const cacheCreationInputTokens = readCacheCreationInputTokens(usage);
3490
+ const cacheReadInputTokens = readCacheReadInputTokens(usage);
4164
3491
  let cost = 0;
4165
3492
  const providedCost = readFiniteNumberField(usage, "cost");
4166
3493
  if (providedCost !== void 0) {
@@ -4183,6 +3510,12 @@ var normalizeUsage = (usage) => {
4183
3510
  const providerRequestIds = normalizeStringArray(
4184
3511
  usage.provider_request_ids
4185
3512
  );
3513
+ const firstOutputMs = normalizeTimingMs(
3514
+ readFiniteNumberField(usage, "firstOutputMs") ?? readFiniteNumberField(usage, "firstTokenMs")
3515
+ );
3516
+ const callDurationMs = normalizeTimingMs(
3517
+ readFiniteNumberField(usage, "callDurationMs") ?? readFiniteNumberField(usage, "durationMs")
3518
+ );
4186
3519
  return {
4187
3520
  input_tokens: inputTokens,
4188
3521
  output_tokens: outputTokens,
@@ -4199,7 +3532,9 @@ var normalizeUsage = (usage) => {
4199
3532
  ...billingEstimated ? { billing_estimated: true } : {},
4200
3533
  ...serverBilled ? { server_billed: true } : {},
4201
3534
  ...providerCallId ? { provider_call_id: providerCallId } : {},
4202
- ...xaiTicks !== void 0 ? { cost_in_usd_ticks: xaiTicks } : {}
3535
+ ...xaiTicks !== void 0 ? { cost_in_usd_ticks: xaiTicks } : {},
3536
+ ...firstOutputMs !== void 0 ? { firstOutputMs } : {},
3537
+ ...callDurationMs !== void 0 ? { callDurationMs } : {}
4203
3538
  };
4204
3539
  };
4205
3540
 
@@ -4245,7 +3580,16 @@ function resolveTokenUsagePricing(args) {
4245
3580
  const billedProvider = billingTarget.provider;
4246
3581
  const billedModel = billingTarget.model;
4247
3582
  const billedServiceTier = billingTarget.serviceTier;
4248
- const hasExternalPrice = agentConfig.inputPrice !== void 0 && agentConfig.inputPrice > 0 || agentConfig.outputPrice !== void 0 && agentConfig.outputPrice > 0;
3583
+ const canonicalAgentId = args.agentId?.trim();
3584
+ const isCodeOwnedBuiltin = isBuiltinPlatformAgentKey(canonicalAgentId);
3585
+ const isPlatformBilled = agentConfig.apiSource === "platform";
3586
+ const hasPersistedPrices = agentConfig.inputPrice !== void 0 && agentConfig.inputPrice > 0 || agentConfig.outputPrice !== void 0 && agentConfig.outputPrice > 0;
3587
+ if (isPlatformBilled && !isCodeOwnedBuiltin && hasPersistedPrices) {
3588
+ console.warn(
3589
+ `[billing] platform agent ignored persisted prices (input=${agentConfig.inputPrice}, output=${agentConfig.outputPrice}); canonical key missing or not in builtin set: "${canonicalAgentId || ""}"`
3590
+ );
3591
+ }
3592
+ const hasExternalPrice = !isCodeOwnedBuiltin && !isPlatformBilled && hasPersistedPrices;
4249
3593
  const { cost, pay } = calculatePrice({
4250
3594
  provider: billedProvider,
4251
3595
  modelName: billedModel,
@@ -4307,14 +3651,10 @@ var prepareTokenUsageData = ({
4307
3651
  entry_path
4308
3652
  }) => {
4309
3653
  const resolvedAgentId = typeof agentId === "string" && agentId.trim() || typeof cybotId === "string" && cybotId.trim() || "";
4310
- if (!resolvedAgentId) {
4311
- throw new Error(
4312
- "prepareTokenUsageData requires a non-empty agentId or cybotId"
4313
- );
4314
- }
4315
3654
  const { usage, billedProvider, billedModel, billedServiceTier, cost, pay, hasExternalPrice } = resolveTokenUsagePricing({
4316
3655
  rawUsage,
4317
3656
  agentConfig,
3657
+ agentId: resolvedAgentId,
4318
3658
  nowMs: timestamp
4319
3659
  });
4320
3660
  const recordProvider = billedProvider ?? agentConfig.provider ?? "unknown";
@@ -4613,7 +3953,7 @@ var saveTokenUsage = async (data, thunkApi) => {
4613
3953
  };
4614
3954
  var updateTokensAction = async ({ dialogId, dialogKey, usage: legacyUsage, usageRecord, agentConfig }, thunkApi) => {
4615
3955
  const state = thunkApi.getState();
4616
- const { currentUser } = state.auth;
3956
+ const currentUser = selectIdentityUser(state);
4617
3957
  const dialogConfig = dialogKey ? selectById(state, dialogKey) : null;
4618
3958
  const dialogConfigUserId = dialogConfig?.userId;
4619
3959
  const ownerUserId = resolveMessageOwner({
@@ -4673,7 +4013,7 @@ var updateTokensAction = async ({ dialogId, dialogKey, usage: legacyUsage, usage
4673
4013
  }
4674
4014
  await saveTokenUsage(persistedTokenData, thunkApi);
4675
4015
  if (persistedTokenData.billable === true || persistedTokenData.billable === void 0 && result.cost > 0) {
4676
- thunkApi.dispatch(deductBalance(result.cost));
4016
+ thunkApi.extra?.accountSession?.deductBalance(result.cost);
4677
4017
  }
4678
4018
  if (dialogKey) {
4679
4019
  await queueDialogTokenPatch(dialogKey, async () => {
@@ -4786,7 +4126,7 @@ var deleteOwnedDialogAttachments = async (args) => {
4786
4126
  metadataReadFailures
4787
4127
  });
4788
4128
  if (!plan.deleteCandidates.length) return plan;
4789
- const { deleteFileAction } = await import("./deleteFile-44TUM34Y.js");
4129
+ const { deleteFileAction } = await import("./deleteFile-FWP2PSBG.js");
4790
4130
  for (const candidate of plan.deleteCandidates) {
4791
4131
  if (candidate.fileDbKey) {
4792
4132
  await deleteFileAction(candidate.fileDbKey, args.thunkApi);
@@ -4848,7 +4188,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4848
4188
  }
4849
4189
  if (isCurrentDialog) {
4850
4190
  await thunkApi.dispatch(resetMsgs());
4851
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-KO7ADD7H.js");
4191
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-ANMACABO.js");
4852
4192
  dispatch(clearPendingAttachments2());
4853
4193
  }
4854
4194
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -4856,39 +4196,39 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4856
4196
 
4857
4197
  // packages/chat/dialog/dialogSlice.ts
4858
4198
  var runCreateDialogAction = async (args, thunkApi) => {
4859
- const { createDialogAction } = await import("./createDialogAction-TJCX6GUE.js");
4199
+ const { createDialogAction } = await import("./createDialogAction-SFEJX6SP.js");
4860
4200
  return createDialogAction(args, thunkApi);
4861
4201
  };
4862
4202
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
4863
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-UJLNFFFC.js");
4203
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-PJQSCAIO.js");
4864
4204
  return createAgentAutomationAction(args, thunkApi);
4865
4205
  };
4866
4206
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
4867
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-EIZUSWHR.js");
4207
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-HWJIZEIV.js");
4868
4208
  return updateDialogTitleAction(args, thunkApi);
4869
4209
  };
4870
4210
  var runAddDialogAgentAction = async (args, thunkApi) => {
4871
- const { addDialogAgentAction } = await import("./addDialogAgentAction-GH7AUPPB.js");
4211
+ const { addDialogAgentAction } = await import("./addDialogAgentAction-RZOAF46K.js");
4872
4212
  return addDialogAgentAction(args, thunkApi);
4873
4213
  };
4874
4214
  var runRemoveDialogAgentAction = async (args, thunkApi) => {
4875
- const { removeDialogAgentAction } = await import("./removeDialogAgentAction-JYT73FU2.js");
4215
+ const { removeDialogAgentAction } = await import("./removeDialogAgentAction-SFYZXHNK.js");
4876
4216
  return removeDialogAgentAction(args, thunkApi);
4877
4217
  };
4878
4218
  var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
4879
- const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-ACY3BLYA.js");
4219
+ const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-BFYJHUJS.js");
4880
4220
  return setPrimaryDialogAgentAction(args, thunkApi);
4881
4221
  };
4882
4222
  var runSwitchDialogAgentAction = async (args, thunkApi) => {
4883
- const { switchDialogAgentAction } = await import("./switchDialogAgentAction-CJ5H6SAR.js");
4223
+ const { switchDialogAgentAction } = await import("./switchDialogAgentAction-L2KOKCGG.js");
4884
4224
  return switchDialogAgentAction(args, thunkApi);
4885
4225
  };
4886
4226
  var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
4887
- const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-D564LMYQ.js");
4227
+ const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-Q32RGFTA.js");
4888
4228
  return setDialogExtraReferencesAction(args, thunkApi);
4889
4229
  };
4890
4230
  var runHandleSendMessageAction = async (args, thunkApi) => {
4891
- const { handleSendMessageAction } = await import("./handleSendMessageAction-OSGQJQ45.js");
4231
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-DF2OABGW.js");
4892
4232
  return handleSendMessageAction(args, thunkApi);
4893
4233
  };
4894
4234
  function clearDialogState() {
@@ -4901,7 +4241,7 @@ var createPageAndAddReference = createAsyncThunk(
4901
4241
  async (payload, { dispatch, getState, rejectWithValue }) => {
4902
4242
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
4903
4243
  try {
4904
- const { createDocState } = await import("./docStore-5BU76DFK.js");
4244
+ const { createDocState } = await import("./docStore-D4HGHPWI.js");
4905
4245
  const pageKey = await createDocState(
4906
4246
  { slateData, title },
4907
4247
  { dispatch, getState }