@arcadeai/design-system 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/README.md +95 -0
  2. package/dist/arcade-CadnNaba.js +1543 -0
  3. package/dist/assets/index.css +1 -1
  4. package/dist/components/index.d.ts +1 -0
  5. package/dist/components/index.js +431 -199
  6. package/dist/components/ui/atoms/accordion.js +2 -2
  7. package/dist/components/ui/atoms/alert.js +2 -2
  8. package/dist/components/ui/atoms/avatar.js +3 -3
  9. package/dist/components/ui/atoms/badge.js +2 -2
  10. package/dist/components/ui/atoms/breadcrumb.js +13 -15
  11. package/dist/components/ui/atoms/button.js +2 -2
  12. package/dist/components/ui/atoms/byoc-badge.js +2 -2
  13. package/dist/components/ui/atoms/card.js +1 -1
  14. package/dist/components/ui/atoms/chart.js +1 -1
  15. package/dist/components/ui/atoms/checkbox.js +2 -2
  16. package/dist/components/ui/atoms/collapsible.js +1 -1
  17. package/dist/components/ui/atoms/command.js +2 -2
  18. package/dist/components/ui/atoms/dialog.js +8 -8
  19. package/dist/components/ui/atoms/dropdown-menu.js +3 -3
  20. package/dist/components/ui/atoms/form.d.ts +1 -1
  21. package/dist/components/ui/atoms/form.js +8 -7
  22. package/dist/components/ui/atoms/hover-card.js +3 -3
  23. package/dist/components/ui/atoms/icons/adp.d.ts +3 -0
  24. package/dist/components/ui/atoms/icons/adp.js +40 -0
  25. package/dist/components/ui/atoms/icons/aha.d.ts +3 -0
  26. package/dist/components/ui/atoms/icons/aha.js +28 -0
  27. package/dist/{assets → components/ui/atoms}/icons/airtable.js +4 -0
  28. package/dist/components/ui/atoms/icons/amplitude.d.ts +3 -0
  29. package/dist/components/ui/atoms/icons/amplitude.js +33 -0
  30. package/dist/components/ui/atoms/icons/arcade.d.ts +3 -0
  31. package/dist/components/ui/atoms/icons/arcade.js +33 -0
  32. package/dist/{assets → components/ui/atoms}/icons/asana.js +1 -0
  33. package/dist/components/ui/atoms/icons/ashby.d.ts +3 -0
  34. package/dist/components/ui/atoms/icons/ashby.js +50 -0
  35. package/dist/{assets → components/ui/atoms}/icons/atlassian.js +14 -4
  36. package/dist/{assets → components/ui/atoms}/icons/auth0.js +1 -0
  37. package/dist/{assets → components/ui/atoms}/icons/azure.js +43 -22
  38. package/dist/components/ui/atoms/icons/bamboohr.d.ts +3 -0
  39. package/dist/components/ui/atoms/icons/bamboohr.js +31 -0
  40. package/dist/components/ui/atoms/icons/basecamp.d.ts +3 -0
  41. package/dist/components/ui/atoms/icons/basecamp.js +57 -0
  42. package/dist/components/ui/atoms/icons/bill.d.ts +3 -0
  43. package/dist/components/ui/atoms/icons/bill.js +55 -0
  44. package/dist/components/ui/atoms/icons/bitbucket.d.ts +3 -0
  45. package/dist/components/ui/atoms/icons/bitbucket.js +38 -0
  46. package/dist/{assets → components/ui/atoms}/icons/bluesky.js +1 -0
  47. package/dist/{assets → components/ui/atoms}/icons/box.js +1 -0
  48. package/dist/components/ui/atoms/icons/braze.d.ts +3 -0
  49. package/dist/components/ui/atoms/icons/braze.js +28 -0
  50. package/dist/components/ui/atoms/icons/brex.d.ts +3 -0
  51. package/dist/components/ui/atoms/icons/brex.js +29 -0
  52. package/dist/components/ui/atoms/icons/buffer.d.ts +3 -0
  53. package/dist/components/ui/atoms/icons/buffer.js +33 -0
  54. package/dist/components/ui/atoms/icons/calendly.js +80 -0
  55. package/dist/components/ui/atoms/icons/clickhouse.d.ts +3 -0
  56. package/dist/components/ui/atoms/icons/clickhouse.js +26 -0
  57. package/dist/components/ui/atoms/icons/clickup.d.ts +3 -0
  58. package/dist/{assets → components/ui/atoms}/icons/clickup.js +16 -4
  59. package/dist/components/ui/atoms/icons/closeio.d.ts +3 -0
  60. package/dist/components/ui/atoms/icons/closeio.js +68 -0
  61. package/dist/{assets → components/ui/atoms}/icons/coinbase.js +21 -8
  62. package/dist/{assets → components/ui/atoms}/icons/confluence.js +18 -4
  63. package/dist/{assets → components/ui/atoms}/icons/datadog.js +1 -0
  64. package/dist/components/ui/atoms/icons/digital-ocean.d.ts +3 -0
  65. package/dist/components/ui/atoms/icons/digital-ocean.js +22 -0
  66. package/dist/{assets → components/ui/atoms}/icons/discord.js +1 -0
  67. package/dist/{assets → components/ui/atoms}/icons/dropbox.js +1 -0
  68. package/dist/components/ui/atoms/icons/e2b.d.ts +3 -0
  69. package/dist/components/ui/atoms/icons/e2b.js +19 -0
  70. package/dist/{assets → components/ui/atoms}/icons/ebay.js +4 -0
  71. package/dist/components/ui/atoms/icons/evernote.d.ts +3 -0
  72. package/dist/components/ui/atoms/icons/evernote.js +29 -0
  73. package/dist/components/ui/atoms/icons/factorial.d.ts +3 -0
  74. package/dist/components/ui/atoms/icons/factorial.js +50 -0
  75. package/dist/{assets → components/ui/atoms}/icons/figma.js +18 -2
  76. package/dist/components/ui/atoms/icons/firecrawl.d.ts +3 -0
  77. package/dist/components/ui/atoms/icons/firecrawl.js +19 -0
  78. package/dist/components/ui/atoms/icons/generic.d.ts +3 -0
  79. package/dist/components/ui/atoms/icons/generic.js +27 -0
  80. package/dist/{assets → components/ui/atoms}/icons/github.js +4 -3
  81. package/dist/{assets → components/ui/atoms}/icons/gitlab.js +4 -0
  82. package/dist/{assets → components/ui/atoms}/icons/gmail.js +11 -2
  83. package/dist/components/ui/atoms/icons/google-calendar.js +98 -0
  84. package/dist/{assets → components/ui/atoms}/icons/google-contacts.js +4 -0
  85. package/dist/components/ui/atoms/icons/google-docs.js +328 -0
  86. package/dist/{assets → components/ui/atoms}/icons/google-drive.js +6 -0
  87. package/dist/{assets → components/ui/atoms}/icons/google-finance.js +8 -1
  88. package/dist/{assets → components/ui/atoms}/icons/google-flight.js +49 -20
  89. package/dist/components/ui/atoms/icons/google-flights.d.ts +3 -0
  90. package/dist/components/ui/atoms/icons/google-flights.js +109 -0
  91. package/dist/{assets → components/ui/atoms}/icons/google-hotels.js +10 -1
  92. package/dist/components/ui/atoms/icons/google-jobs.d.ts +3 -0
  93. package/dist/components/ui/atoms/icons/google-jobs.js +103 -0
  94. package/dist/{assets → components/ui/atoms}/icons/google-maps.js +5 -0
  95. package/dist/{assets → components/ui/atoms}/icons/google-news.js +27 -3
  96. package/dist/{assets → components/ui/atoms}/icons/google-sheets.js +3 -0
  97. package/dist/{assets → components/ui/atoms}/icons/google-shopping.js +9 -1
  98. package/dist/components/ui/atoms/icons/google-slides.d.ts +3 -0
  99. package/dist/components/ui/atoms/icons/google-slides.js +243 -0
  100. package/dist/{assets → components/ui/atoms}/icons/google.js +4 -0
  101. package/dist/{assets → components/ui/atoms}/icons/heroku.js +1 -0
  102. package/dist/components/ui/atoms/icons/hootsuite.d.ts +3 -0
  103. package/dist/components/ui/atoms/icons/hootsuite.js +43 -0
  104. package/dist/components/ui/atoms/icons/hubspot.d.ts +3 -0
  105. package/dist/{assets → components/ui/atoms}/icons/hubspot.js +2 -1
  106. package/dist/{assets → components/ui/atoms}/icons/index.d.ts +48 -0
  107. package/dist/components/ui/atoms/icons/index.js +220 -0
  108. package/dist/components/ui/atoms/icons/intercom.d.ts +3 -0
  109. package/dist/components/ui/atoms/icons/intercom.js +26 -0
  110. package/dist/{assets → components/ui/atoms}/icons/jira.js +15 -7
  111. package/dist/{assets → components/ui/atoms}/icons/linear.js +1 -0
  112. package/dist/components/ui/atoms/icons/linkedin.d.ts +3 -0
  113. package/dist/{assets → components/ui/atoms}/icons/linkedin.js +5 -4
  114. package/dist/components/ui/atoms/icons/mailchimp.d.ts +3 -0
  115. package/dist/components/ui/atoms/icons/mailchimp.js +70 -0
  116. package/dist/components/ui/atoms/icons/mcp.d.ts +3 -0
  117. package/dist/components/ui/atoms/icons/mcp.js +23 -0
  118. package/dist/components/ui/atoms/icons/microsoft-dynamics.d.ts +3 -0
  119. package/dist/components/ui/atoms/icons/microsoft-dynamics.js +172 -0
  120. package/dist/components/ui/atoms/icons/microsoft-sharepoint.d.ts +3 -0
  121. package/dist/components/ui/atoms/icons/microsoft-sharepoint.js +88 -0
  122. package/dist/components/ui/atoms/icons/microsoft-teams.d.ts +3 -0
  123. package/dist/components/ui/atoms/icons/microsoft-teams.js +119 -0
  124. package/dist/{assets → components/ui/atoms}/icons/microsoft.js +4 -0
  125. package/dist/components/ui/atoms/icons/miro.d.ts +3 -0
  126. package/dist/components/ui/atoms/icons/miro.js +35 -0
  127. package/dist/components/ui/atoms/icons/monday.d.ts +3 -0
  128. package/dist/components/ui/atoms/icons/monday.js +60 -0
  129. package/dist/components/ui/atoms/icons/netsuite.d.ts +3 -0
  130. package/dist/{assets → components/ui/atoms}/icons/netsuite.js +35 -26
  131. package/dist/{assets → components/ui/atoms}/icons/notion.js +2 -0
  132. package/dist/components/ui/atoms/icons/oauth.d.ts +3 -0
  133. package/dist/{assets → components/ui/atoms}/icons/oauth.js +66 -8
  134. package/dist/components/ui/atoms/icons/obsidian.d.ts +3 -0
  135. package/dist/components/ui/atoms/icons/obsidian.js +220 -0
  136. package/dist/components/ui/atoms/icons/okta.d.ts +3 -0
  137. package/dist/components/ui/atoms/icons/okta.js +56 -0
  138. package/dist/components/ui/atoms/icons/one-drive.d.ts +3 -0
  139. package/dist/components/ui/atoms/icons/one-drive.js +38 -0
  140. package/dist/{assets → components/ui/atoms}/icons/outlook-calendar.js +18 -0
  141. package/dist/{assets → components/ui/atoms}/icons/outlook-mail.js +4 -0
  142. package/dist/components/ui/atoms/icons/pinecone.d.ts +3 -0
  143. package/dist/components/ui/atoms/icons/pinecone.js +29 -0
  144. package/dist/{assets → components/ui/atoms}/icons/pinterest.js +1 -0
  145. package/dist/components/ui/atoms/icons/pipedrive.d.ts +3 -0
  146. package/dist/components/ui/atoms/icons/pipedrive.js +59 -0
  147. package/dist/components/ui/atoms/icons/plaid.d.ts +3 -0
  148. package/dist/components/ui/atoms/icons/plaid.js +37 -0
  149. package/dist/{assets → components/ui/atoms}/icons/postgres.js +30 -20
  150. package/dist/components/ui/atoms/icons/quickbooks.d.ts +3 -0
  151. package/dist/components/ui/atoms/icons/quickbooks.js +25 -0
  152. package/dist/components/ui/atoms/icons/reddit.js +315 -0
  153. package/dist/{assets → components/ui/atoms}/icons/salesforce.js +3 -0
  154. package/dist/{assets → components/ui/atoms}/icons/shopify.js +3 -0
  155. package/dist/components/ui/atoms/icons/singlestore.d.ts +3 -0
  156. package/dist/components/ui/atoms/icons/singlestore.js +284 -0
  157. package/dist/{assets → components/ui/atoms}/icons/slack.js +7 -1
  158. package/dist/components/ui/atoms/icons/snowflake.d.ts +3 -0
  159. package/dist/components/ui/atoms/icons/snowflake.js +26 -0
  160. package/dist/components/ui/atoms/icons/splunk.d.ts +3 -0
  161. package/dist/components/ui/atoms/icons/splunk.js +54 -0
  162. package/dist/{assets → components/ui/atoms}/icons/spotify.js +1 -0
  163. package/dist/components/ui/atoms/icons/square.d.ts +3 -0
  164. package/dist/components/ui/atoms/icons/square.js +41 -0
  165. package/dist/components/ui/atoms/icons/squarespace.d.ts +3 -0
  166. package/dist/components/ui/atoms/icons/squarespace.js +29 -0
  167. package/dist/{assets → components/ui/atoms}/icons/stripe.js +1 -0
  168. package/dist/{assets → components/ui/atoms}/icons/tesla.js +5 -1
  169. package/dist/{assets → components/ui/atoms}/icons/tiktok.js +3 -0
  170. package/dist/components/ui/atoms/icons/trello.d.ts +3 -0
  171. package/dist/components/ui/atoms/icons/trello.js +59 -0
  172. package/dist/{assets → components/ui/atoms}/icons/twilio.js +11 -4
  173. package/dist/{assets → components/ui/atoms}/icons/twitch.js +6 -1
  174. package/dist/components/ui/atoms/icons/utils.d.ts +56 -0
  175. package/dist/components/ui/atoms/icons/utils.js +41 -0
  176. package/dist/{assets → components/ui/atoms}/icons/vercel.js +1 -0
  177. package/dist/{assets → components/ui/atoms}/icons/walmart.js +2 -0
  178. package/dist/components/ui/atoms/icons/weaviate.d.ts +3 -0
  179. package/dist/components/ui/atoms/icons/weaviate.js +229 -0
  180. package/dist/components/ui/atoms/icons/workday.d.ts +3 -0
  181. package/dist/components/ui/atoms/icons/workday.js +97 -0
  182. package/dist/components/ui/atoms/icons/wrike.d.ts +3 -0
  183. package/dist/components/ui/atoms/icons/wrike.js +16 -0
  184. package/dist/{assets → components/ui/atoms}/icons/x.js +4 -4
  185. package/dist/components/ui/atoms/icons/xero.js +87 -0
  186. package/dist/components/ui/atoms/icons/youtube.d.ts +3 -0
  187. package/dist/{assets → components/ui/atoms}/icons/youtube.js +3 -1
  188. package/dist/components/ui/atoms/icons/zendesk.d.ts +3 -0
  189. package/dist/components/ui/atoms/icons/zendesk.js +27 -0
  190. package/dist/{assets → components/ui/atoms}/icons/zoom.js +30 -17
  191. package/dist/components/ui/atoms/index.d.ts +2 -0
  192. package/dist/components/ui/atoms/index.js +416 -197
  193. package/dist/components/ui/atoms/input.js +1 -1
  194. package/dist/components/ui/atoms/label.js +1 -1
  195. package/dist/components/ui/atoms/popover.js +3 -3
  196. package/dist/components/ui/atoms/pro-badge.js +2 -2
  197. package/dist/components/ui/atoms/progress.js +19 -18
  198. package/dist/components/ui/atoms/radio-group.js +2 -2
  199. package/dist/components/ui/atoms/resizable.js +24 -1527
  200. package/dist/components/ui/atoms/scroll-area.js +4 -4
  201. package/dist/components/ui/atoms/select.js +4 -4
  202. package/dist/components/ui/atoms/separator.js +1 -1
  203. package/dist/components/ui/atoms/sheet.js +2 -2
  204. package/dist/components/ui/atoms/sidebar.js +104 -104
  205. package/dist/components/ui/atoms/skeleton.js +1 -1
  206. package/dist/components/ui/atoms/slider.js +1 -1
  207. package/dist/components/ui/atoms/switch.js +1 -1
  208. package/dist/components/ui/atoms/table.js +1 -1
  209. package/dist/components/ui/atoms/tabs.js +2 -2
  210. package/dist/components/ui/atoms/textarea.js +1 -1
  211. package/dist/components/ui/atoms/toggle.js +2 -2
  212. package/dist/components/ui/atoms/tooltip.js +61 -61
  213. package/dist/components/ui/atoms/view-tools-control.d.ts +12 -0
  214. package/dist/components/ui/atoms/view-tools-control.js +53 -0
  215. package/dist/components/ui/index.d.ts +3 -0
  216. package/dist/components/ui/index.js +431 -199
  217. package/dist/components/ui/molecules/empty-state.d.ts +5 -0
  218. package/dist/components/ui/molecules/empty-state.js +25 -0
  219. package/dist/components/ui/molecules/index.d.ts +7 -0
  220. package/dist/components/ui/molecules/index.js +13 -0
  221. package/dist/components/ui/molecules/requirement-badges.d.ts +29 -0
  222. package/dist/components/ui/molecules/requirement-badges.js +25 -0
  223. package/dist/components/ui/molecules/tool-card.d.ts +17 -0
  224. package/dist/components/ui/molecules/tool-card.js +127 -0
  225. package/dist/components/ui/molecules/toolkit-card.d.ts +24 -0
  226. package/dist/components/ui/molecules/toolkit-card.js +13 -0
  227. package/dist/components/ui/molecules/toolkit-picker-trigger.d.ts +8 -0
  228. package/dist/components/ui/molecules/toolkit-picker-trigger.js +105 -0
  229. package/dist/components/ui/molecules/toolkit-selection-summary.d.ts +11 -0
  230. package/dist/components/ui/molecules/toolkit-selection-summary.js +120 -0
  231. package/dist/components/ui/organisms/index.d.ts +2 -0
  232. package/dist/components/ui/organisms/index.js +4 -0
  233. package/dist/components/ui/organisms/toolkit-picker/components/footer-summary.d.ts +1 -0
  234. package/dist/components/ui/organisms/toolkit-picker/components/footer-summary.js +36 -0
  235. package/dist/components/ui/organisms/toolkit-picker/components/search-input.d.ts +1 -0
  236. package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +37 -0
  237. package/dist/components/ui/organisms/toolkit-picker/components/select-button.d.ts +9 -0
  238. package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +36 -0
  239. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.d.ts +9 -0
  240. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +39 -0
  241. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-filter.test.d.ts +1 -0
  242. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-filter.test.js +40 -0
  243. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-search.test.d.ts +1 -0
  244. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-search.test.js +46 -0
  245. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-selection.test.d.ts +1 -0
  246. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-selection.test.js +28 -0
  247. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts +41 -0
  248. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.js +281 -0
  249. package/dist/components/ui/organisms/toolkit-picker/index.d.ts +14 -0
  250. package/dist/components/ui/organisms/toolkit-picker/index.js +16 -0
  251. package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts +7 -0
  252. package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.js +514 -0
  253. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.d.ts +2 -0
  254. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +405 -0
  255. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.test.d.ts +0 -0
  256. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.test.js +11859 -0
  257. package/dist/components/ui/utils/memo.d.ts +2 -0
  258. package/dist/components/ui/utils/memo.js +25 -0
  259. package/dist/components/ui/utils/memo.test.d.ts +1 -0
  260. package/dist/components/ui/utils/memo.test.js +36 -0
  261. package/dist/{index-CQhYMnjT.js → index-BDE30rcJ.js} +1 -1
  262. package/dist/{index-CtSXVDca.js → index-BDIfjxqB.js} +1 -1
  263. package/dist/{index-C8_QusYl.js → index-BGfrl8IX.js} +1 -1
  264. package/dist/{index-BSWzylXR.js → index-BzU0xzeS.js} +3 -3
  265. package/dist/index-DH9yRdVk.js +1540 -0
  266. package/dist/lib/arcade/arcade.d.ts +100 -0
  267. package/dist/lib/arcade/arcade.js +6 -0
  268. package/dist/lib/arcade/arcade.test.d.ts +1 -0
  269. package/dist/lib/arcade/arcade.test.js +299 -0
  270. package/dist/lib/arcade/mocks.d.ts +2 -0
  271. package/dist/lib/arcade/mocks.js +547 -0
  272. package/dist/lib/utils.d.ts +1 -0
  273. package/dist/lib/utils.js +3 -2
  274. package/dist/lib/utils.test.d.ts +1 -0
  275. package/dist/lib/utils.test.js +43 -0
  276. package/dist/magic-string.es-QnVUNas7.js +660 -0
  277. package/dist/main.d.ts +1 -0
  278. package/dist/main.js +431 -199
  279. package/dist/metadata/oauth-providers.d.ts +69 -0
  280. package/dist/metadata/oauth-providers.js +260 -0
  281. package/dist/metadata/toolkits.d.ts +24 -0
  282. package/dist/metadata/toolkits.js +1500 -0
  283. package/dist/react-resizable-panels.browser-ZHjTH32c.js +1509 -0
  284. package/dist/react.esm-CFMQn0EI.js +35565 -0
  285. package/dist/toolkit-card-UG1sZ0Le.js +305 -0
  286. package/dist/{utils-CRiPKpXj.js → utils-Db4QWi-E.js} +204 -189
  287. package/dist/vi.bdSIJ99Y-CQ1FdEM8.js +11542 -0
  288. package/package.json +71 -58
  289. package/dist/assets/icons/calendly.js +0 -64
  290. package/dist/assets/icons/clickup.d.ts +0 -3
  291. package/dist/assets/icons/e2b.d.ts +0 -3
  292. package/dist/assets/icons/e2b.js +0 -9
  293. package/dist/assets/icons/firecrawl.d.ts +0 -5
  294. package/dist/assets/icons/firecrawl.js +0 -17
  295. package/dist/assets/icons/google-calendar.js +0 -93
  296. package/dist/assets/icons/google-docs.js +0 -229
  297. package/dist/assets/icons/hubspot.d.ts +0 -3
  298. package/dist/assets/icons/index.js +0 -126
  299. package/dist/assets/icons/linkedin.d.ts +0 -3
  300. package/dist/assets/icons/netsuite.d.ts +0 -3
  301. package/dist/assets/icons/oauth.d.ts +0 -3
  302. package/dist/assets/icons/reddit.js +0 -268
  303. package/dist/assets/icons/utils.d.ts +0 -409
  304. package/dist/assets/icons/utils.js +0 -422
  305. package/dist/assets/icons/xero.js +0 -63
  306. package/dist/assets/icons/youtube.d.ts +0 -3
  307. package/dist/index-PlrlSrPo.js +0 -1537
  308. /package/dist/{assets → components/ui/atoms}/icons/airtable.d.ts +0 -0
  309. /package/dist/{assets → components/ui/atoms}/icons/asana.d.ts +0 -0
  310. /package/dist/{assets → components/ui/atoms}/icons/atlassian.d.ts +0 -0
  311. /package/dist/{assets → components/ui/atoms}/icons/auth0.d.ts +0 -0
  312. /package/dist/{assets → components/ui/atoms}/icons/azure.d.ts +0 -0
  313. /package/dist/{assets → components/ui/atoms}/icons/bluesky.d.ts +0 -0
  314. /package/dist/{assets → components/ui/atoms}/icons/box.d.ts +0 -0
  315. /package/dist/{assets → components/ui/atoms}/icons/calendly.d.ts +0 -0
  316. /package/dist/{assets → components/ui/atoms}/icons/coinbase.d.ts +0 -0
  317. /package/dist/{assets → components/ui/atoms}/icons/confluence.d.ts +0 -0
  318. /package/dist/{assets → components/ui/atoms}/icons/datadog.d.ts +0 -0
  319. /package/dist/{assets → components/ui/atoms}/icons/discord.d.ts +0 -0
  320. /package/dist/{assets → components/ui/atoms}/icons/dropbox.d.ts +0 -0
  321. /package/dist/{assets → components/ui/atoms}/icons/ebay.d.ts +0 -0
  322. /package/dist/{assets → components/ui/atoms}/icons/figma.d.ts +0 -0
  323. /package/dist/{assets → components/ui/atoms}/icons/github.d.ts +0 -0
  324. /package/dist/{assets → components/ui/atoms}/icons/gitlab.d.ts +0 -0
  325. /package/dist/{assets → components/ui/atoms}/icons/gmail.d.ts +0 -0
  326. /package/dist/{assets → components/ui/atoms}/icons/google-calendar.d.ts +0 -0
  327. /package/dist/{assets → components/ui/atoms}/icons/google-contacts.d.ts +0 -0
  328. /package/dist/{assets → components/ui/atoms}/icons/google-docs.d.ts +0 -0
  329. /package/dist/{assets → components/ui/atoms}/icons/google-drive.d.ts +0 -0
  330. /package/dist/{assets → components/ui/atoms}/icons/google-finance.d.ts +0 -0
  331. /package/dist/{assets → components/ui/atoms}/icons/google-flight.d.ts +0 -0
  332. /package/dist/{assets → components/ui/atoms}/icons/google-hotels.d.ts +0 -0
  333. /package/dist/{assets → components/ui/atoms}/icons/google-maps.d.ts +0 -0
  334. /package/dist/{assets → components/ui/atoms}/icons/google-news.d.ts +0 -0
  335. /package/dist/{assets → components/ui/atoms}/icons/google-sheets.d.ts +0 -0
  336. /package/dist/{assets → components/ui/atoms}/icons/google-shopping.d.ts +0 -0
  337. /package/dist/{assets → components/ui/atoms}/icons/google.d.ts +0 -0
  338. /package/dist/{assets → components/ui/atoms}/icons/heroku.d.ts +0 -0
  339. /package/dist/{assets → components/ui/atoms}/icons/jira.d.ts +0 -0
  340. /package/dist/{assets → components/ui/atoms}/icons/linear.d.ts +0 -0
  341. /package/dist/{assets → components/ui/atoms}/icons/microsoft.d.ts +0 -0
  342. /package/dist/{assets → components/ui/atoms}/icons/notion.d.ts +0 -0
  343. /package/dist/{assets → components/ui/atoms}/icons/outlook-calendar.d.ts +0 -0
  344. /package/dist/{assets → components/ui/atoms}/icons/outlook-mail.d.ts +0 -0
  345. /package/dist/{assets → components/ui/atoms}/icons/pinterest.d.ts +0 -0
  346. /package/dist/{assets → components/ui/atoms}/icons/postgres.d.ts +0 -0
  347. /package/dist/{assets → components/ui/atoms}/icons/reddit.d.ts +0 -0
  348. /package/dist/{assets → components/ui/atoms}/icons/salesforce.d.ts +0 -0
  349. /package/dist/{assets → components/ui/atoms}/icons/shopify.d.ts +0 -0
  350. /package/dist/{assets → components/ui/atoms}/icons/slack.d.ts +0 -0
  351. /package/dist/{assets → components/ui/atoms}/icons/spotify.d.ts +0 -0
  352. /package/dist/{assets → components/ui/atoms}/icons/stripe.d.ts +0 -0
  353. /package/dist/{assets → components/ui/atoms}/icons/tesla.d.ts +0 -0
  354. /package/dist/{assets → components/ui/atoms}/icons/tiktok.d.ts +0 -0
  355. /package/dist/{assets → components/ui/atoms}/icons/twilio.d.ts +0 -0
  356. /package/dist/{assets → components/ui/atoms}/icons/twitch.d.ts +0 -0
  357. /package/dist/{assets → components/ui/atoms}/icons/vercel.d.ts +0 -0
  358. /package/dist/{assets → components/ui/atoms}/icons/walmart.d.ts +0 -0
  359. /package/dist/{assets → components/ui/atoms}/icons/x.d.ts +0 -0
  360. /package/dist/{assets → components/ui/atoms}/icons/xero.d.ts +0 -0
  361. /package/dist/{assets → components/ui/atoms}/icons/zoom.d.ts +0 -0
@@ -0,0 +1,1543 @@
1
+ import { TOOLKIT_CATALOGUE as tt } from "./metadata/toolkits.js";
2
+ import { r as pe } from "./utils-Db4QWi-E.js";
3
+ let ye = !1, D, Re, Y, Se, Ee;
4
+ function Pe(t, e = { auto: !1 }) {
5
+ if (ye)
6
+ throw new Error(`you must \`import '@arcadeai/arcadejs/shims/${t.kind}'\` before importing anything else from @arcadeai/arcadejs`);
7
+ if (D)
8
+ throw new Error(`can't \`import '@arcadeai/arcadejs/shims/${t.kind}'\` after \`import '@arcadeai/arcadejs/shims/${D}'\``);
9
+ ye = e.auto, D = t.kind, Re = t.fetch, t.Request, t.Response, t.Headers, t.FormData, t.Blob, Y = t.File, t.ReadableStream, t.getMultipartRequestOptions, Se = t.getDefaultAgent, Ee = t.fileFromPath, t.isFsReadStream;
10
+ }
11
+ class rt {
12
+ constructor(e) {
13
+ this.body = e;
14
+ }
15
+ get [Symbol.toStringTag]() {
16
+ return "MultipartBody";
17
+ }
18
+ }
19
+ function ke({ manuallyImported: t } = {}) {
20
+ const e = t ? "You may need to use polyfills" : "Add one of these imports before your first `import … from '@arcadeai/arcadejs'`:\n- `import '@arcadeai/arcadejs/shims/node'` (if you're running on Node)\n- `import '@arcadeai/arcadejs/shims/web'` (otherwise)\n";
21
+ let r, n, s, o;
22
+ try {
23
+ r = fetch, n = Request, s = Response, o = Headers;
24
+ } catch (i) {
25
+ throw new Error(`this environment is missing the following Web Fetch API type: ${i.message}. ${e}`);
26
+ }
27
+ return {
28
+ kind: "web",
29
+ fetch: r,
30
+ Request: n,
31
+ Response: s,
32
+ Headers: o,
33
+ FormData: (
34
+ // @ts-ignore
35
+ typeof FormData < "u" ? FormData : class {
36
+ // @ts-ignore
37
+ constructor() {
38
+ throw new Error(`file uploads aren't supported in this environment yet as 'FormData' is undefined. ${e}`);
39
+ }
40
+ }
41
+ ),
42
+ Blob: typeof Blob < "u" ? Blob : class {
43
+ constructor() {
44
+ throw new Error(`file uploads aren't supported in this environment yet as 'Blob' is undefined. ${e}`);
45
+ }
46
+ },
47
+ File: (
48
+ // @ts-ignore
49
+ typeof File < "u" ? File : class {
50
+ // @ts-ignore
51
+ constructor() {
52
+ throw new Error(`file uploads aren't supported in this environment yet as 'File' is undefined. ${e}`);
53
+ }
54
+ }
55
+ ),
56
+ ReadableStream: (
57
+ // @ts-ignore
58
+ typeof ReadableStream < "u" ? ReadableStream : class {
59
+ // @ts-ignore
60
+ constructor() {
61
+ throw new Error(`streaming isn't supported in this environment yet as 'ReadableStream' is undefined. ${e}`);
62
+ }
63
+ }
64
+ ),
65
+ getMultipartRequestOptions: async (i, l) => ({
66
+ ...l,
67
+ body: new rt(i)
68
+ }),
69
+ getDefaultAgent: (i) => {
70
+ },
71
+ fileFromPath: () => {
72
+ throw new Error("The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/ArcadeAI/arcade-js#file-uploads");
73
+ },
74
+ isFsReadStream: (i) => !1
75
+ };
76
+ }
77
+ Pe(ke({ manuallyImported: !0 }));
78
+ const Z = "RFC3986", ee = {
79
+ RFC1738: (t) => String(t).replace(/%20/g, "+"),
80
+ RFC3986: (t) => String(t)
81
+ }, nt = "RFC1738", st = Array.isArray, _ = (() => {
82
+ const t = [];
83
+ for (let e = 0; e < 256; ++e)
84
+ t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
85
+ return t;
86
+ })(), V = 1024, ot = (t, e, r, n, s) => {
87
+ if (t.length === 0)
88
+ return t;
89
+ let o = t;
90
+ if (typeof t == "symbol" ? o = Symbol.prototype.toString.call(t) : typeof t != "string" && (o = String(t)), r === "iso-8859-1")
91
+ return escape(o).replace(/%u[0-9a-f]{4}/gi, function(l) {
92
+ return "%26%23" + parseInt(l.slice(2), 16) + "%3B";
93
+ });
94
+ let i = "";
95
+ for (let l = 0; l < o.length; l += V) {
96
+ const c = o.length >= V ? o.slice(l, l + V) : o, u = [];
97
+ for (let p = 0; p < c.length; ++p) {
98
+ let a = c.charCodeAt(p);
99
+ if (a === 45 || // -
100
+ a === 46 || // .
101
+ a === 95 || // _
102
+ a === 126 || // ~
103
+ a >= 48 && a <= 57 || // 0-9
104
+ a >= 65 && a <= 90 || // a-z
105
+ a >= 97 && a <= 122 || // A-Z
106
+ s === nt && (a === 40 || a === 41)) {
107
+ u[u.length] = c.charAt(p);
108
+ continue;
109
+ }
110
+ if (a < 128) {
111
+ u[u.length] = _[a];
112
+ continue;
113
+ }
114
+ if (a < 2048) {
115
+ u[u.length] = _[192 | a >> 6] + _[128 | a & 63];
116
+ continue;
117
+ }
118
+ if (a < 55296 || a >= 57344) {
119
+ u[u.length] = _[224 | a >> 12] + _[128 | a >> 6 & 63] + _[128 | a & 63];
120
+ continue;
121
+ }
122
+ p += 1, a = 65536 + ((a & 1023) << 10 | c.charCodeAt(p) & 1023), u[u.length] = _[240 | a >> 18] + _[128 | a >> 12 & 63] + _[128 | a >> 6 & 63] + _[128 | a & 63];
123
+ }
124
+ i += u.join("");
125
+ }
126
+ return i;
127
+ };
128
+ function it(t) {
129
+ return !t || typeof t != "object" ? !1 : !!(t.constructor && t.constructor.isBuffer && t.constructor.isBuffer(t));
130
+ }
131
+ function me(t, e) {
132
+ if (st(t)) {
133
+ const r = [];
134
+ for (let n = 0; n < t.length; n += 1)
135
+ r.push(e(t[n]));
136
+ return r;
137
+ }
138
+ return e(t);
139
+ }
140
+ const at = Object.prototype.hasOwnProperty, Te = {
141
+ brackets(t) {
142
+ return String(t) + "[]";
143
+ },
144
+ comma: "comma",
145
+ indices(t, e) {
146
+ return String(t) + "[" + e + "]";
147
+ },
148
+ repeat(t) {
149
+ return String(t);
150
+ }
151
+ }, A = Array.isArray, ct = Array.prototype.push, ve = function(t, e) {
152
+ ct.apply(t, A(e) ? e : [e]);
153
+ }, ut = Date.prototype.toISOString, y = {
154
+ addQueryPrefix: !1,
155
+ allowDots: !1,
156
+ allowEmptyArrays: !1,
157
+ arrayFormat: "indices",
158
+ charset: "utf-8",
159
+ charsetSentinel: !1,
160
+ delimiter: "&",
161
+ encode: !0,
162
+ encodeDotInKeys: !1,
163
+ encoder: ot,
164
+ encodeValuesOnly: !1,
165
+ format: Z,
166
+ formatter: ee[Z],
167
+ /** @deprecated */
168
+ indices: !1,
169
+ serializeDate(t) {
170
+ return ut.call(t);
171
+ },
172
+ skipNulls: !1,
173
+ strictNullHandling: !1
174
+ };
175
+ function lt(t) {
176
+ return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "symbol" || typeof t == "bigint";
177
+ }
178
+ const Q = {};
179
+ function Ce(t, e, r, n, s, o, i, l, c, u, p, a, h, m, x, E, R, X) {
180
+ let f = t, F = X, $ = 0, le = !1;
181
+ for (; (F = F.get(Q)) !== void 0 && !le; ) {
182
+ const g = F.get(t);
183
+ if ($ += 1, typeof g < "u") {
184
+ if (g === $)
185
+ throw new RangeError("Cyclic object value");
186
+ le = !0;
187
+ }
188
+ typeof F.get(Q) > "u" && ($ = 0);
189
+ }
190
+ if (typeof u == "function" ? f = u(e, f) : f instanceof Date ? f = h?.(f) : r === "comma" && A(f) && (f = me(f, function(g) {
191
+ return g instanceof Date ? h?.(g) : g;
192
+ })), f === null) {
193
+ if (o)
194
+ return c && !E ? (
195
+ // @ts-expect-error
196
+ c(e, y.encoder, R, "key", m)
197
+ ) : e;
198
+ f = "";
199
+ }
200
+ if (lt(f) || it(f)) {
201
+ if (c) {
202
+ const g = E ? e : c(e, y.encoder, R, "key", m);
203
+ return [
204
+ x?.(g) + "=" + // @ts-expect-error
205
+ x?.(c(f, y.encoder, R, "value", m))
206
+ ];
207
+ }
208
+ return [x?.(e) + "=" + x?.(String(f))];
209
+ }
210
+ const K = [];
211
+ if (typeof f > "u")
212
+ return K;
213
+ let I;
214
+ if (r === "comma" && A(f))
215
+ E && c && (f = me(f, c)), I = [{ value: f.length > 0 ? f.join(",") || null : void 0 }];
216
+ else if (A(u))
217
+ I = u;
218
+ else {
219
+ const g = Object.keys(f);
220
+ I = p ? g.sort(p) : g;
221
+ }
222
+ const fe = l ? String(e).replace(/\./g, "%2E") : String(e), j = n && A(f) && f.length === 1 ? fe + "[]" : fe;
223
+ if (s && A(f) && f.length === 0)
224
+ return j + "[]";
225
+ for (let g = 0; g < I.length; ++g) {
226
+ const k = I[g], de = (
227
+ // @ts-ignore
228
+ typeof k == "object" && typeof k.value < "u" ? k.value : f[k]
229
+ );
230
+ if (i && de === null)
231
+ continue;
232
+ const W = a && l ? k.replace(/\./g, "%2E") : k, et = A(f) ? typeof r == "function" ? r(j, W) : j : j + (a ? "." + W : "[" + W + "]");
233
+ X.set(t, $);
234
+ const he = /* @__PURE__ */ new WeakMap();
235
+ he.set(Q, X), ve(K, Ce(
236
+ de,
237
+ et,
238
+ r,
239
+ n,
240
+ s,
241
+ o,
242
+ i,
243
+ l,
244
+ // @ts-ignore
245
+ r === "comma" && E && A(f) ? null : c,
246
+ u,
247
+ p,
248
+ a,
249
+ h,
250
+ m,
251
+ x,
252
+ E,
253
+ R,
254
+ he
255
+ ));
256
+ }
257
+ return K;
258
+ }
259
+ function ft(t = y) {
260
+ if (typeof t.allowEmptyArrays < "u" && typeof t.allowEmptyArrays != "boolean")
261
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
262
+ if (typeof t.encodeDotInKeys < "u" && typeof t.encodeDotInKeys != "boolean")
263
+ throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
264
+ if (t.encoder !== null && typeof t.encoder < "u" && typeof t.encoder != "function")
265
+ throw new TypeError("Encoder has to be a function.");
266
+ const e = t.charset || y.charset;
267
+ if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
268
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
269
+ let r = Z;
270
+ if (typeof t.format < "u") {
271
+ if (!at.call(ee, t.format))
272
+ throw new TypeError("Unknown format option provided.");
273
+ r = t.format;
274
+ }
275
+ const n = ee[r];
276
+ let s = y.filter;
277
+ (typeof t.filter == "function" || A(t.filter)) && (s = t.filter);
278
+ let o;
279
+ if (t.arrayFormat && t.arrayFormat in Te ? o = t.arrayFormat : "indices" in t ? o = t.indices ? "indices" : "repeat" : o = y.arrayFormat, "commaRoundTrip" in t && typeof t.commaRoundTrip != "boolean")
280
+ throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
281
+ const i = typeof t.allowDots > "u" ? t.encodeDotInKeys ? !0 : y.allowDots : !!t.allowDots;
282
+ return {
283
+ addQueryPrefix: typeof t.addQueryPrefix == "boolean" ? t.addQueryPrefix : y.addQueryPrefix,
284
+ // @ts-ignore
285
+ allowDots: i,
286
+ allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays : y.allowEmptyArrays,
287
+ arrayFormat: o,
288
+ charset: e,
289
+ charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : y.charsetSentinel,
290
+ commaRoundTrip: !!t.commaRoundTrip,
291
+ delimiter: typeof t.delimiter > "u" ? y.delimiter : t.delimiter,
292
+ encode: typeof t.encode == "boolean" ? t.encode : y.encode,
293
+ encodeDotInKeys: typeof t.encodeDotInKeys == "boolean" ? t.encodeDotInKeys : y.encodeDotInKeys,
294
+ encoder: typeof t.encoder == "function" ? t.encoder : y.encoder,
295
+ encodeValuesOnly: typeof t.encodeValuesOnly == "boolean" ? t.encodeValuesOnly : y.encodeValuesOnly,
296
+ filter: s,
297
+ format: r,
298
+ formatter: n,
299
+ serializeDate: typeof t.serializeDate == "function" ? t.serializeDate : y.serializeDate,
300
+ skipNulls: typeof t.skipNulls == "boolean" ? t.skipNulls : y.skipNulls,
301
+ // @ts-ignore
302
+ sort: typeof t.sort == "function" ? t.sort : null,
303
+ strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : y.strictNullHandling
304
+ };
305
+ }
306
+ function dt(t, e = {}) {
307
+ let r = t;
308
+ const n = ft(e);
309
+ let s, o;
310
+ typeof n.filter == "function" ? (o = n.filter, r = o("", r)) : A(n.filter) && (o = n.filter, s = o);
311
+ const i = [];
312
+ if (typeof r != "object" || r === null)
313
+ return "";
314
+ const l = Te[n.arrayFormat], c = l === "comma" && n.commaRoundTrip;
315
+ s || (s = Object.keys(r)), n.sort && s.sort(n.sort);
316
+ const u = /* @__PURE__ */ new WeakMap();
317
+ for (let h = 0; h < s.length; ++h) {
318
+ const m = s[h];
319
+ n.skipNulls && r[m] === null || ve(i, Ce(
320
+ r[m],
321
+ m,
322
+ // @ts-expect-error
323
+ l,
324
+ c,
325
+ n.allowEmptyArrays,
326
+ n.strictNullHandling,
327
+ n.skipNulls,
328
+ n.encodeDotInKeys,
329
+ n.encode ? n.encoder : null,
330
+ n.filter,
331
+ n.sort,
332
+ n.allowDots,
333
+ n.serializeDate,
334
+ n.format,
335
+ n.formatter,
336
+ n.encodeValuesOnly,
337
+ n.charset,
338
+ u
339
+ ));
340
+ }
341
+ const p = i.join(n.delimiter);
342
+ let a = n.addQueryPrefix === !0 ? "?" : "";
343
+ return n.charsetSentinel && (n.charset === "iso-8859-1" ? a += "utf8=%26%2310003%3B&" : a += "utf8=%E2%9C%93&"), p.length > 0 ? a + p : "";
344
+ }
345
+ const T = "1.9.1";
346
+ class P extends Error {
347
+ }
348
+ class w extends P {
349
+ constructor(e, r, n, s) {
350
+ super(`${w.makeMessage(e, r, n)}`), this.status = e, this.headers = s, this.error = r;
351
+ }
352
+ static makeMessage(e, r, n) {
353
+ const s = r?.message ? typeof r.message == "string" ? r.message : JSON.stringify(r.message) : r ? JSON.stringify(r) : n;
354
+ return e && s ? `${e} ${s}` : e ? `${e} status code (no body)` : s || "(no status code or body)";
355
+ }
356
+ static generate(e, r, n, s) {
357
+ if (!e || !s)
358
+ return new q({ message: n, cause: re(r) });
359
+ const o = r;
360
+ return e === 400 ? new De(e, o, n, s) : e === 401 ? new Le(e, o, n, s) : e === 403 ? new Oe(e, o, n, s) : e === 404 ? new Fe(e, o, n, s) : e === 409 ? new $e(e, o, n, s) : e === 422 ? new je(e, o, n, s) : e === 429 ? new Ue(e, o, n, s) : e >= 500 ? new Be(e, o, n, s) : new w(e, o, n, s);
361
+ }
362
+ }
363
+ class te extends w {
364
+ constructor({ message: e } = {}) {
365
+ super(void 0, void 0, e || "Request was aborted.", void 0);
366
+ }
367
+ }
368
+ class q extends w {
369
+ constructor({ message: e, cause: r }) {
370
+ super(void 0, void 0, e || "Connection error.", void 0), r && (this.cause = r);
371
+ }
372
+ }
373
+ class Ie extends q {
374
+ constructor({ message: e } = {}) {
375
+ super({ message: e ?? "Request timed out." });
376
+ }
377
+ }
378
+ class De extends w {
379
+ }
380
+ class Le extends w {
381
+ }
382
+ class Oe extends w {
383
+ }
384
+ class Fe extends w {
385
+ }
386
+ class $e extends w {
387
+ }
388
+ class je extends w {
389
+ }
390
+ class Ue extends w {
391
+ }
392
+ class Be extends w {
393
+ }
394
+ const Me = () => {
395
+ D || Pe(ke(), { auto: !0 });
396
+ };
397
+ Me();
398
+ const ht = (t) => t != null && typeof t == "object" && typeof t.url == "string" && typeof t.blob == "function", pt = (t) => t != null && typeof t == "object" && typeof t.name == "string" && typeof t.lastModified == "number" && N(t), N = (t) => t != null && typeof t == "object" && typeof t.size == "number" && typeof t.type == "string" && typeof t.text == "function" && typeof t.slice == "function" && typeof t.arrayBuffer == "function";
399
+ async function yt(t, e, r) {
400
+ if (t = await t, pt(t))
401
+ return t;
402
+ if (ht(t)) {
403
+ const s = await t.blob();
404
+ e || (e = new URL(t.url).pathname.split(/[\\/]/).pop() ?? "unknown_file");
405
+ const o = N(s) ? [await s.arrayBuffer()] : [s];
406
+ return new Y(o, e, r);
407
+ }
408
+ const n = await mt(t);
409
+ if (e || (e = wt(t) ?? "unknown_file"), !r?.type) {
410
+ const s = n[0]?.type;
411
+ typeof s == "string" && (r = { ...r, type: s });
412
+ }
413
+ return new Y(n, e, r);
414
+ }
415
+ async function mt(t) {
416
+ let e = [];
417
+ if (typeof t == "string" || ArrayBuffer.isView(t) || // includes Uint8Array, Buffer, etc.
418
+ t instanceof ArrayBuffer)
419
+ e.push(t);
420
+ else if (N(t))
421
+ e.push(await t.arrayBuffer());
422
+ else if (bt(t))
423
+ for await (const r of t)
424
+ e.push(r);
425
+ else
426
+ throw new Error(`Unexpected data type: ${typeof t}; constructor: ${t?.constructor?.name}; props: ${gt(t)}`);
427
+ return e;
428
+ }
429
+ function gt(t) {
430
+ return `[${Object.getOwnPropertyNames(t).map((r) => `"${r}"`).join(", ")}]`;
431
+ }
432
+ function wt(t) {
433
+ return G(t.name) || G(t.filename) || // For fs.ReadStream
434
+ G(t.path)?.split(/[\\/]/).pop();
435
+ }
436
+ const G = (t) => {
437
+ if (typeof t == "string")
438
+ return t;
439
+ if (typeof Buffer < "u" && t instanceof Buffer)
440
+ return String(t);
441
+ }, bt = (t) => t != null && typeof t == "object" && typeof t[Symbol.asyncIterator] == "function", ge = (t) => t && typeof t == "object" && t.body && t[Symbol.toStringTag] === "MultipartBody";
442
+ var qe = function(t, e, r, n, s) {
443
+ if (n === "m") throw new TypeError("Private method is not writable");
444
+ if (n === "a" && !s) throw new TypeError("Private accessor was defined without a setter");
445
+ if (typeof e == "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
446
+ return n === "a" ? s.call(t, r) : s ? s.value = r : e.set(t, r), r;
447
+ }, Ne = function(t, e, r, n) {
448
+ if (r === "a" && !n) throw new TypeError("Private accessor was defined without a getter");
449
+ if (typeof e == "function" ? t !== e || !n : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
450
+ return r === "m" ? n : r === "a" ? n.call(t) : n ? n.value : e.get(t);
451
+ }, M, U;
452
+ Me();
453
+ async function He(t) {
454
+ const { response: e } = t;
455
+ if (e.status === 204)
456
+ return null;
457
+ if (t.options.__binaryResponse)
458
+ return e;
459
+ const n = e.headers.get("content-type")?.split(";")[0]?.trim();
460
+ if (n?.includes("application/json") || n?.endsWith("+json")) {
461
+ const i = await e.json();
462
+ return L("response", e.status, e.url, e.headers, i), i;
463
+ }
464
+ const o = await e.text();
465
+ return L("response", e.status, e.url, e.headers, o), o;
466
+ }
467
+ class H extends Promise {
468
+ constructor(e, r = He) {
469
+ super((n) => {
470
+ n(null);
471
+ }), this.responsePromise = e, this.parseResponse = r;
472
+ }
473
+ _thenUnwrap(e) {
474
+ return new H(this.responsePromise, async (r) => e(await this.parseResponse(r), r));
475
+ }
476
+ /**
477
+ * Gets the raw `Response` instance instead of parsing the response
478
+ * data.
479
+ *
480
+ * If you want to parse the response body but still get the `Response`
481
+ * instance, you can use {@link withResponse()}.
482
+ *
483
+ * 👋 Getting the wrong TypeScript type for `Response`?
484
+ * Try setting `"moduleResolution": "NodeNext"` if you can,
485
+ * or add one of these imports before your first `import … from '@arcadeai/arcadejs'`:
486
+ * - `import '@arcadeai/arcadejs/shims/node'` (if you're running on Node)
487
+ * - `import '@arcadeai/arcadejs/shims/web'` (otherwise)
488
+ */
489
+ asResponse() {
490
+ return this.responsePromise.then((e) => e.response);
491
+ }
492
+ /**
493
+ * Gets the parsed response data and the raw `Response` instance.
494
+ *
495
+ * If you just want to get the raw `Response` instance without parsing it,
496
+ * you can use {@link asResponse()}.
497
+ *
498
+ *
499
+ * 👋 Getting the wrong TypeScript type for `Response`?
500
+ * Try setting `"moduleResolution": "NodeNext"` if you can,
501
+ * or add one of these imports before your first `import … from '@arcadeai/arcadejs'`:
502
+ * - `import '@arcadeai/arcadejs/shims/node'` (if you're running on Node)
503
+ * - `import '@arcadeai/arcadejs/shims/web'` (otherwise)
504
+ */
505
+ async withResponse() {
506
+ const [e, r] = await Promise.all([this.parse(), this.asResponse()]);
507
+ return { data: e, response: r };
508
+ }
509
+ parse() {
510
+ return this.parsedPromise || (this.parsedPromise = this.responsePromise.then(this.parseResponse)), this.parsedPromise;
511
+ }
512
+ then(e, r) {
513
+ return this.parse().then(e, r);
514
+ }
515
+ catch(e) {
516
+ return this.parse().catch(e);
517
+ }
518
+ finally(e) {
519
+ return this.parse().finally(e);
520
+ }
521
+ }
522
+ class xt {
523
+ constructor({
524
+ baseURL: e,
525
+ baseURLOverridden: r,
526
+ maxRetries: n = 2,
527
+ timeout: s = 6e4,
528
+ // 1 minute
529
+ httpAgent: o,
530
+ fetch: i
531
+ }) {
532
+ M.set(this, void 0), this.baseURL = e, qe(this, M, r, "f"), this.maxRetries = J("maxRetries", n), this.timeout = J("timeout", s), this.httpAgent = o, this.fetch = i ?? Re;
533
+ }
534
+ authHeaders(e) {
535
+ return {};
536
+ }
537
+ /**
538
+ * Override this to add your own default headers, for example:
539
+ *
540
+ * {
541
+ * ...super.defaultHeaders(),
542
+ * Authorization: 'Bearer 123',
543
+ * }
544
+ */
545
+ defaultHeaders(e) {
546
+ return {
547
+ Accept: "application/json",
548
+ ...["head", "get"].includes(e.method) ? {} : { "Content-Type": "application/json" },
549
+ "User-Agent": this.getUserAgent(),
550
+ ...kt(),
551
+ ...this.authHeaders(e)
552
+ };
553
+ }
554
+ /**
555
+ * Override this to add your own headers validation:
556
+ */
557
+ validateHeaders(e, r) {
558
+ }
559
+ defaultIdempotencyKey() {
560
+ return `stainless-node-retry-${Dt()}`;
561
+ }
562
+ get(e, r) {
563
+ return this.methodRequest("get", e, r);
564
+ }
565
+ post(e, r) {
566
+ return this.methodRequest("post", e, r);
567
+ }
568
+ patch(e, r) {
569
+ return this.methodRequest("patch", e, r);
570
+ }
571
+ put(e, r) {
572
+ return this.methodRequest("put", e, r);
573
+ }
574
+ delete(e, r) {
575
+ return this.methodRequest("delete", e, r);
576
+ }
577
+ methodRequest(e, r, n) {
578
+ return this.request(Promise.resolve(n).then(async (s) => {
579
+ const o = s && N(s?.body) ? new DataView(await s.body.arrayBuffer()) : s?.body instanceof DataView ? s.body : s?.body instanceof ArrayBuffer ? new DataView(s.body) : s && ArrayBuffer.isView(s?.body) ? new DataView(s.body.buffer) : s?.body;
580
+ return { method: e, path: r, ...s, body: o };
581
+ }));
582
+ }
583
+ getAPIList(e, r, n) {
584
+ return this.requestAPIList(r, { method: "get", path: e, ...n });
585
+ }
586
+ calculateContentLength(e) {
587
+ if (typeof e == "string") {
588
+ if (typeof Buffer < "u")
589
+ return Buffer.byteLength(e, "utf8").toString();
590
+ if (typeof TextEncoder < "u")
591
+ return new TextEncoder().encode(e).length.toString();
592
+ } else if (ArrayBuffer.isView(e))
593
+ return e.byteLength.toString();
594
+ return null;
595
+ }
596
+ async buildRequest(e, { retryCount: r = 0 } = {}) {
597
+ const n = { ...e }, { method: s, path: o, query: i, defaultBaseURL: l, headers: c = {} } = n, u = ArrayBuffer.isView(n.body) || n.__binaryRequest && typeof n.body == "string" ? n.body : ge(n.body) ? n.body.body : n.body ? JSON.stringify(n.body, null, 2) : null, p = this.calculateContentLength(u), a = this.buildURL(o, i, l);
598
+ "timeout" in n && J("timeout", n.timeout), n.timeout = n.timeout ?? this.timeout;
599
+ const h = n.httpAgent ?? this.httpAgent ?? Se(a), m = n.timeout + 1e3;
600
+ typeof h?.options?.timeout == "number" && m > (h.options.timeout ?? 0) && (h.options.timeout = m), this.idempotencyHeader && s !== "get" && (e.idempotencyKey || (e.idempotencyKey = this.defaultIdempotencyKey()), c[this.idempotencyHeader] = e.idempotencyKey);
601
+ const x = this.buildHeaders({ options: n, headers: c, contentLength: p, retryCount: r });
602
+ return { req: {
603
+ method: s,
604
+ ...u && { body: u },
605
+ headers: x,
606
+ ...h && { agent: h },
607
+ // @ts-ignore node-fetch uses a custom AbortSignal type that is
608
+ // not compatible with standard web types
609
+ signal: n.signal ?? null
610
+ }, url: a, timeout: n.timeout };
611
+ }
612
+ buildHeaders({ options: e, headers: r, contentLength: n, retryCount: s }) {
613
+ const o = {};
614
+ n && (o["content-length"] = n);
615
+ const i = this.defaultHeaders(e);
616
+ return Ae(o, i), Ae(o, r), ge(e.body) && D !== "node" && delete o["content-type"], B(i, "x-stainless-retry-count") === void 0 && B(r, "x-stainless-retry-count") === void 0 && (o["x-stainless-retry-count"] = String(s)), B(i, "x-stainless-timeout") === void 0 && B(r, "x-stainless-timeout") === void 0 && e.timeout && (o["x-stainless-timeout"] = String(Math.trunc(e.timeout / 1e3))), this.validateHeaders(o, r), o;
617
+ }
618
+ /**
619
+ * Used as a callback for mutating the given `FinalRequestOptions` object.
620
+ */
621
+ async prepareOptions(e) {
622
+ }
623
+ /**
624
+ * Used as a callback for mutating the given `RequestInit` object.
625
+ *
626
+ * This is useful for cases where you want to add certain headers based off of
627
+ * the request properties, e.g. `method` or `url`.
628
+ */
629
+ async prepareRequest(e, { url: r, options: n }) {
630
+ }
631
+ parseHeaders(e) {
632
+ return e ? Symbol.iterator in e ? Object.fromEntries(Array.from(e).map((r) => [...r])) : { ...e } : {};
633
+ }
634
+ makeStatusError(e, r, n, s) {
635
+ return w.generate(e, r, n, s);
636
+ }
637
+ request(e, r = null) {
638
+ return new H(this.makeRequest(e, r));
639
+ }
640
+ async makeRequest(e, r) {
641
+ const n = await e, s = n.maxRetries ?? this.maxRetries;
642
+ r == null && (r = s), await this.prepareOptions(n);
643
+ const { req: o, url: i, timeout: l } = await this.buildRequest(n, {
644
+ retryCount: s - r
645
+ });
646
+ if (await this.prepareRequest(o, { url: i, options: n }), L("request", i, n, o.headers), n.signal?.aborted)
647
+ throw new te();
648
+ const c = new AbortController(), u = await this.fetchWithTimeout(i, o, l, c).catch(re);
649
+ if (u instanceof Error) {
650
+ if (n.signal?.aborted)
651
+ throw new te();
652
+ if (r)
653
+ return this.retryRequest(n, r);
654
+ throw u.name === "AbortError" ? new Ie() : new q({ cause: u });
655
+ }
656
+ const p = Rt(u.headers);
657
+ if (!u.ok) {
658
+ if (r && this.shouldRetry(u)) {
659
+ const R = `retrying, ${r} attempts remaining`;
660
+ return L(`response (error; ${R})`, u.status, i, p), this.retryRequest(n, r, p);
661
+ }
662
+ const a = await u.text().catch((R) => re(R).message), h = Tt(a), m = h ? void 0 : a;
663
+ throw L(`response (error; ${r ? "(error; no more retries left)" : "(error; not retryable)"})`, u.status, i, p, m), this.makeStatusError(u.status, h, m, p);
664
+ }
665
+ return { response: u, options: n, controller: c };
666
+ }
667
+ requestAPIList(e, r) {
668
+ const n = this.makeRequest(r, null);
669
+ return new At(this, n, e);
670
+ }
671
+ buildURL(e, r, n) {
672
+ const s = !Ne(this, M, "f") && n || this.baseURL, o = Ct(e) ? new URL(e) : new URL(s + (s.endsWith("/") && e.startsWith("/") ? e.slice(1) : e)), i = this.defaultQuery();
673
+ return ze(i) || (r = { ...i, ...r }), typeof r == "object" && r && !Array.isArray(r) && (o.search = this.stringifyQuery(r)), o.toString();
674
+ }
675
+ stringifyQuery(e) {
676
+ return Object.entries(e).filter(([r, n]) => typeof n < "u").map(([r, n]) => {
677
+ if (typeof n == "string" || typeof n == "number" || typeof n == "boolean")
678
+ return `${encodeURIComponent(r)}=${encodeURIComponent(n)}`;
679
+ if (n === null)
680
+ return `${encodeURIComponent(r)}=`;
681
+ throw new P(`Cannot stringify type ${typeof n}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`);
682
+ }).join("&");
683
+ }
684
+ async fetchWithTimeout(e, r, n, s) {
685
+ const { signal: o, ...i } = r || {};
686
+ o && o.addEventListener("abort", () => s.abort());
687
+ const l = setTimeout(() => s.abort(), n), c = {
688
+ signal: s.signal,
689
+ ...i
690
+ };
691
+ return c.method && (c.method = c.method.toUpperCase()), // use undefined this binding; fetch errors if bound to something else in browser/cloudflare
692
+ this.fetch.call(void 0, e, c).finally(() => {
693
+ clearTimeout(l);
694
+ });
695
+ }
696
+ shouldRetry(e) {
697
+ const r = e.headers.get("x-should-retry");
698
+ return r === "true" ? !0 : r === "false" ? !1 : e.status === 408 || e.status === 409 || e.status === 429 || e.status >= 500;
699
+ }
700
+ async retryRequest(e, r, n) {
701
+ let s;
702
+ const o = n?.["retry-after-ms"];
703
+ if (o) {
704
+ const l = parseFloat(o);
705
+ Number.isNaN(l) || (s = l);
706
+ }
707
+ const i = n?.["retry-after"];
708
+ if (i && !s) {
709
+ const l = parseFloat(i);
710
+ Number.isNaN(l) ? s = Date.parse(i) - Date.now() : s = l * 1e3;
711
+ }
712
+ if (!(s && 0 <= s && s < 60 * 1e3)) {
713
+ const l = e.maxRetries ?? this.maxRetries;
714
+ s = this.calculateDefaultRetryTimeoutMillis(r, l);
715
+ }
716
+ return await It(s), this.makeRequest(e, r - 1);
717
+ }
718
+ calculateDefaultRetryTimeoutMillis(e, r) {
719
+ const o = r - e, i = Math.min(0.5 * Math.pow(2, o), 8), l = 1 - Math.random() * 0.25;
720
+ return i * l * 1e3;
721
+ }
722
+ getUserAgent() {
723
+ return `${this.constructor.name}/JS ${T}`;
724
+ }
725
+ }
726
+ M = /* @__PURE__ */ new WeakMap();
727
+ class _t {
728
+ constructor(e, r, n, s) {
729
+ U.set(this, void 0), qe(this, U, e, "f"), this.options = s, this.response = r, this.body = n;
730
+ }
731
+ hasNextPage() {
732
+ return this.getPaginatedItems().length ? this.nextPageInfo() != null : !1;
733
+ }
734
+ async getNextPage() {
735
+ const e = this.nextPageInfo();
736
+ if (!e)
737
+ throw new P("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");
738
+ const r = { ...this.options };
739
+ if ("params" in e && typeof r.query == "object")
740
+ r.query = { ...r.query, ...e.params };
741
+ else if ("url" in e) {
742
+ const n = [...Object.entries(r.query || {}), ...e.url.searchParams.entries()];
743
+ for (const [s, o] of n)
744
+ e.url.searchParams.set(s, o);
745
+ r.query = void 0, r.path = e.url.toString();
746
+ }
747
+ return await Ne(this, U, "f").requestAPIList(this.constructor, r);
748
+ }
749
+ async *iterPages() {
750
+ let e = this;
751
+ for (yield e; e.hasNextPage(); )
752
+ e = await e.getNextPage(), yield e;
753
+ }
754
+ async *[(U = /* @__PURE__ */ new WeakMap(), Symbol.asyncIterator)]() {
755
+ for await (const e of this.iterPages())
756
+ for (const r of e.getPaginatedItems())
757
+ yield r;
758
+ }
759
+ }
760
+ class At extends H {
761
+ constructor(e, r, n) {
762
+ super(r, async (s) => new n(e, s.response, await He(s), s.options));
763
+ }
764
+ /**
765
+ * Allow auto-paginating iteration on an unawaited list call, eg:
766
+ *
767
+ * for await (const item of client.items.list()) {
768
+ * console.log(item)
769
+ * }
770
+ */
771
+ async *[Symbol.asyncIterator]() {
772
+ const e = await this;
773
+ for await (const r of e)
774
+ yield r;
775
+ }
776
+ }
777
+ const Rt = (t) => new Proxy(Object.fromEntries(
778
+ // @ts-ignore
779
+ t.entries()
780
+ ), {
781
+ get(e, r) {
782
+ const n = r.toString();
783
+ return e[n.toLowerCase()] || e[n];
784
+ }
785
+ }), St = {
786
+ method: !0,
787
+ path: !0,
788
+ query: !0,
789
+ body: !0,
790
+ headers: !0,
791
+ defaultBaseURL: !0,
792
+ maxRetries: !0,
793
+ stream: !0,
794
+ timeout: !0,
795
+ httpAgent: !0,
796
+ signal: !0,
797
+ idempotencyKey: !0,
798
+ __binaryRequest: !0,
799
+ __binaryResponse: !0
800
+ }, S = (t) => typeof t == "object" && t !== null && !ze(t) && Object.keys(t).every((e) => Xe(St, e)), Et = () => {
801
+ if (typeof Deno < "u" && Deno.build != null)
802
+ return {
803
+ "X-Stainless-Lang": "js",
804
+ "X-Stainless-Package-Version": T,
805
+ "X-Stainless-OS": be(Deno.build.os),
806
+ "X-Stainless-Arch": we(Deno.build.arch),
807
+ "X-Stainless-Runtime": "deno",
808
+ "X-Stainless-Runtime-Version": typeof Deno.version == "string" ? Deno.version : Deno.version?.deno ?? "unknown"
809
+ };
810
+ if (typeof EdgeRuntime < "u")
811
+ return {
812
+ "X-Stainless-Lang": "js",
813
+ "X-Stainless-Package-Version": T,
814
+ "X-Stainless-OS": "Unknown",
815
+ "X-Stainless-Arch": `other:${EdgeRuntime}`,
816
+ "X-Stainless-Runtime": "edge",
817
+ "X-Stainless-Runtime-Version": process.version
818
+ };
819
+ if (Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]")
820
+ return {
821
+ "X-Stainless-Lang": "js",
822
+ "X-Stainless-Package-Version": T,
823
+ "X-Stainless-OS": be(process.platform),
824
+ "X-Stainless-Arch": we(process.arch),
825
+ "X-Stainless-Runtime": "node",
826
+ "X-Stainless-Runtime-Version": process.version
827
+ };
828
+ const t = Pt();
829
+ return t ? {
830
+ "X-Stainless-Lang": "js",
831
+ "X-Stainless-Package-Version": T,
832
+ "X-Stainless-OS": "Unknown",
833
+ "X-Stainless-Arch": "unknown",
834
+ "X-Stainless-Runtime": `browser:${t.browser}`,
835
+ "X-Stainless-Runtime-Version": t.version
836
+ } : {
837
+ "X-Stainless-Lang": "js",
838
+ "X-Stainless-Package-Version": T,
839
+ "X-Stainless-OS": "Unknown",
840
+ "X-Stainless-Arch": "unknown",
841
+ "X-Stainless-Runtime": "unknown",
842
+ "X-Stainless-Runtime-Version": "unknown"
843
+ };
844
+ };
845
+ function Pt() {
846
+ if (typeof navigator > "u" || !navigator)
847
+ return null;
848
+ const t = [
849
+ { key: "edge", pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
850
+ { key: "ie", pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
851
+ { key: "ie", pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
852
+ { key: "chrome", pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
853
+ { key: "firefox", pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
854
+ { key: "safari", pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ }
855
+ ];
856
+ for (const { key: e, pattern: r } of t) {
857
+ const n = r.exec(navigator.userAgent);
858
+ if (n) {
859
+ const s = n[1] || 0, o = n[2] || 0, i = n[3] || 0;
860
+ return { browser: e, version: `${s}.${o}.${i}` };
861
+ }
862
+ }
863
+ return null;
864
+ }
865
+ const we = (t) => t === "x32" ? "x32" : t === "x86_64" || t === "x64" ? "x64" : t === "arm" ? "arm" : t === "aarch64" || t === "arm64" ? "arm64" : t ? `other:${t}` : "unknown", be = (t) => (t = t.toLowerCase(), t.includes("ios") ? "iOS" : t === "android" ? "Android" : t === "darwin" ? "MacOS" : t === "win32" ? "Windows" : t === "freebsd" ? "FreeBSD" : t === "openbsd" ? "OpenBSD" : t === "linux" ? "Linux" : t ? `Other:${t}` : "Unknown");
866
+ let xe;
867
+ const kt = () => xe ?? (xe = Et()), Tt = (t) => {
868
+ try {
869
+ return JSON.parse(t);
870
+ } catch {
871
+ return;
872
+ }
873
+ }, vt = /^[a-z][a-z0-9+.-]*:/i, Ct = (t) => vt.test(t), It = (t) => new Promise((e) => setTimeout(e, t)), J = (t, e) => {
874
+ if (typeof e != "number" || !Number.isInteger(e))
875
+ throw new P(`${t} must be an integer`);
876
+ if (e < 0)
877
+ throw new P(`${t} must be a positive integer`);
878
+ return e;
879
+ }, re = (t) => {
880
+ if (t instanceof Error)
881
+ return t;
882
+ if (typeof t == "object" && t !== null)
883
+ try {
884
+ return new Error(JSON.stringify(t));
885
+ } catch {
886
+ }
887
+ return new Error(t);
888
+ }, _e = (t) => {
889
+ if (typeof process < "u")
890
+ return process.env?.[t]?.trim() ?? void 0;
891
+ if (typeof Deno < "u")
892
+ return Deno.env?.get?.(t)?.trim();
893
+ };
894
+ function ze(t) {
895
+ if (!t)
896
+ return !0;
897
+ for (const e in t)
898
+ return !1;
899
+ return !0;
900
+ }
901
+ function Xe(t, e) {
902
+ return Object.prototype.hasOwnProperty.call(t, e);
903
+ }
904
+ function Ae(t, e) {
905
+ for (const r in e) {
906
+ if (!Xe(e, r))
907
+ continue;
908
+ const n = r.toLowerCase();
909
+ if (!n)
910
+ continue;
911
+ const s = e[r];
912
+ s === null ? delete t[n] : s !== void 0 && (t[n] = s);
913
+ }
914
+ }
915
+ function L(t, ...e) {
916
+ typeof process < "u" && process?.env?.DEBUG === "true" && console.log(`Arcade:DEBUG:${t}`, ...e);
917
+ }
918
+ const Dt = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
919
+ const e = Math.random() * 16 | 0;
920
+ return (t === "x" ? e : e & 3 | 8).toString(16);
921
+ }), Lt = (t) => typeof t?.get == "function", B = (t, e) => {
922
+ const r = e.toLowerCase();
923
+ if (Lt(t)) {
924
+ const n = e[0]?.toUpperCase() + e.substring(1).replace(/([^\w])(\w)/g, (s, o, i) => o + i.toUpperCase());
925
+ for (const s of [e, r, e.toUpperCase(), n]) {
926
+ const o = t.get(s);
927
+ if (o)
928
+ return o;
929
+ }
930
+ }
931
+ for (const [n, s] of Object.entries(t))
932
+ if (n.toLowerCase() === r)
933
+ return Array.isArray(s) ? (s.length <= 1 || console.warn(`Received ${s.length} entries for the ${e} header, using the first entry.`), s[0]) : s;
934
+ };
935
+ class O extends _t {
936
+ constructor(e, r, n, s) {
937
+ super(e, r, n, s), this.items = n.items || [], this.total_count = n.total_count || 0, this.offset = n.offset || 0;
938
+ }
939
+ getPaginatedItems() {
940
+ return this.items ?? [];
941
+ }
942
+ // @deprecated Please use `nextPageInfo()` instead
943
+ nextPageParams() {
944
+ const e = this.nextPageInfo();
945
+ if (!e)
946
+ return null;
947
+ if ("params" in e)
948
+ return e.params;
949
+ const r = Object.fromEntries(e.url.searchParams);
950
+ return Object.keys(r).length ? r : null;
951
+ }
952
+ nextPageInfo() {
953
+ const e = this.offset;
954
+ if (!e)
955
+ return null;
956
+ const r = this.getPaginatedItems().length, n = e + r, s = this.total_count;
957
+ return s && n < s ? { params: { offset: n } } : null;
958
+ }
959
+ }
960
+ class b {
961
+ constructor(e) {
962
+ this._client = e;
963
+ }
964
+ }
965
+ class Ke extends b {
966
+ /**
967
+ * Create a new auth provider
968
+ */
969
+ create(e, r) {
970
+ return this._client.post("/v1/admin/auth_providers", { body: e, ...r });
971
+ }
972
+ /**
973
+ * List a page of auth providers that are available to the caller
974
+ */
975
+ list(e) {
976
+ return this._client.get("/v1/admin/auth_providers", e);
977
+ }
978
+ /**
979
+ * Delete a specific auth provider
980
+ */
981
+ delete(e, r) {
982
+ return this._client.delete(`/v1/admin/auth_providers/${e}`, r);
983
+ }
984
+ /**
985
+ * Get the details of a specific auth provider
986
+ */
987
+ get(e, r) {
988
+ return this._client.get(`/v1/admin/auth_providers/${e}`, r);
989
+ }
990
+ /**
991
+ * Patch an existing auth provider
992
+ */
993
+ patch(e, r, n) {
994
+ return this._client.patch(`/v1/admin/auth_providers/${e}`, { body: r, ...n });
995
+ }
996
+ }
997
+ class We extends b {
998
+ /**
999
+ * List all secrets that are visible to the caller
1000
+ */
1001
+ list(e) {
1002
+ return this._client.get("/v1/admin/secrets", e);
1003
+ }
1004
+ /**
1005
+ * Delete a secret by its ID
1006
+ */
1007
+ delete(e, r) {
1008
+ return this._client.delete(`/v1/admin/secrets/${e}`, {
1009
+ ...r,
1010
+ headers: { Accept: "*/*", ...r?.headers }
1011
+ });
1012
+ }
1013
+ }
1014
+ class ne extends b {
1015
+ list(e = {}, r) {
1016
+ return S(e) ? this.list({}, e) : this._client.getAPIList("/v1/admin/user_connections", se, {
1017
+ query: e,
1018
+ ...r
1019
+ });
1020
+ }
1021
+ /**
1022
+ * Delete a user/auth provider connection
1023
+ */
1024
+ delete(e, r) {
1025
+ return this._client.delete(`/v1/admin/user_connections/${e}`, {
1026
+ ...r,
1027
+ headers: { Accept: "*/*", ...r?.headers }
1028
+ });
1029
+ }
1030
+ }
1031
+ class se extends O {
1032
+ }
1033
+ ne.UserConnectionResponsesOffsetPage = se;
1034
+ class v extends b {
1035
+ constructor() {
1036
+ super(...arguments), this.userConnections = new ne(this._client), this.authProviders = new Ke(this._client), this.secrets = new We(this._client);
1037
+ }
1038
+ }
1039
+ v.UserConnections = ne;
1040
+ v.UserConnectionResponsesOffsetPage = se;
1041
+ v.AuthProviders = Ke;
1042
+ v.Secrets = We;
1043
+ const Ot = 45;
1044
+ class Ft extends Error {
1045
+ constructor(e) {
1046
+ super(e), this.name = "AuthorizationError";
1047
+ }
1048
+ }
1049
+ class Ve extends b {
1050
+ /**
1051
+ * Starts the authorization process for a given provider and scopes.
1052
+ * @param userId - The user ID for which authorization is being requested
1053
+ * @param provider - The authorization provider (e.g., 'github', 'google', 'linkedin', 'microsoft', 'slack', 'spotify', 'x', 'zoom')
1054
+ * @param options - Optional parameters
1055
+ * @param options.providerType - The type of authorization provider. Defaults to 'oauth2'
1056
+ * @param options.scopes - A list of scopes required for authorization, if any. Defaults to []
1057
+ * @returns The authorization response
1058
+ *
1059
+ * Example:
1060
+ * ```ts
1061
+ * const authResponse = await client.auth.start("user@example.com", "github");
1062
+ * ```
1063
+ */
1064
+ start(e, r, n = {}) {
1065
+ const { providerType: s = "oauth2", scopes: o = [] } = n, i = {
1066
+ provider_id: r,
1067
+ provider_type: s,
1068
+ oauth2: {
1069
+ scopes: o
1070
+ }
1071
+ };
1072
+ return this.authorize({
1073
+ auth_requirement: i,
1074
+ user_id: e
1075
+ });
1076
+ }
1077
+ /**
1078
+ * Starts the authorization process for given authorization requirements
1079
+ */
1080
+ authorize(e, r) {
1081
+ return this._client.post("/v1/auth/authorize", { body: e, ...r });
1082
+ }
1083
+ /**
1084
+ * Confirms a user's details during an authorization flow
1085
+ */
1086
+ confirmUser(e, r) {
1087
+ return this._client.post("/v1/auth/confirm_user", { body: e, ...r });
1088
+ }
1089
+ /**
1090
+ * Checks the status of an ongoing authorization process for a specific tool. If
1091
+ * 'wait' param is present, does not respond until either the auth status becomes
1092
+ * completed or the timeout is reached.
1093
+ */
1094
+ status(e, r) {
1095
+ return this._client.get("/v1/auth/status", { query: e, ...r });
1096
+ }
1097
+ /**
1098
+ * Waits for the authorization process to complete.
1099
+ * @param authResponseOrId - The authorization response or ID to wait for completion
1100
+ * @returns The completed authorization response
1101
+ * @throws {AuthorizationError} When the authorization ID is missing or invalid
1102
+ *
1103
+ * Example:
1104
+ * ```ts
1105
+ * const authResponse = await client.auth.start("user@example.com", "github");
1106
+ * try {
1107
+ * const completedAuth = await client.auth.waitForCompletion(authResponse);
1108
+ * console.log('Authorization completed:', completedAuth);
1109
+ * } catch (error) {
1110
+ * if (error instanceof AuthorizationError) {
1111
+ * console.error('Authorization failed:', error.message);
1112
+ * }
1113
+ * }
1114
+ * ```
1115
+ */
1116
+ async waitForCompletion(e) {
1117
+ let r, n;
1118
+ if (typeof e == "string")
1119
+ r = e, n = { status: "pending" };
1120
+ else {
1121
+ if (!e.id)
1122
+ throw new Ft("Authorization ID is required");
1123
+ r = e.id, n = e;
1124
+ }
1125
+ for (; n.status !== "completed"; )
1126
+ n = await this.status({
1127
+ id: r,
1128
+ wait: Ot
1129
+ });
1130
+ return n;
1131
+ }
1132
+ }
1133
+ class Qe extends b {
1134
+ /**
1135
+ * Talk to different LLM Chat APIs via OpenAI's API
1136
+ */
1137
+ create(e, r) {
1138
+ return this._client.post("/v1/chat/completions", { body: e, ...r });
1139
+ }
1140
+ }
1141
+ class oe extends b {
1142
+ constructor() {
1143
+ super(...arguments), this.completions = new Qe(this._client);
1144
+ }
1145
+ }
1146
+ oe.Completions = Qe;
1147
+ class Ge extends b {
1148
+ /**
1149
+ * Engine Health
1150
+ */
1151
+ check(e) {
1152
+ return this._client.get("/v1/health", e);
1153
+ }
1154
+ }
1155
+ class ie extends b {
1156
+ list(e = {}, r) {
1157
+ return S(e) ? this.list({}, e) : this._client.getAPIList("/v1/formatted_tools", ae, {
1158
+ query: e,
1159
+ ...r
1160
+ });
1161
+ }
1162
+ get(e, r = {}, n) {
1163
+ return S(r) ? this.get(e, {}, r) : this._client.get(`/v1/formatted_tools/${e}`, { query: r, ...n });
1164
+ }
1165
+ }
1166
+ class ae extends O {
1167
+ }
1168
+ ie.FormattedListResponsesOffsetPage = ae;
1169
+ class Je extends b {
1170
+ list(e = {}, r) {
1171
+ return S(e) ? this.list({}, e) : this._client.getAPIList("/v1/scheduled_tools", $t, { query: e, ...r });
1172
+ }
1173
+ /**
1174
+ * Returns the details for a specific scheduled tool execution
1175
+ */
1176
+ get(e, r) {
1177
+ return this._client.get(`/v1/scheduled_tools/${e}`, r);
1178
+ }
1179
+ }
1180
+ class C extends b {
1181
+ constructor() {
1182
+ super(...arguments), this.scheduled = new Je(this._client), this.formatted = new ie(this._client);
1183
+ }
1184
+ list(e = {}, r) {
1185
+ return S(e) ? this.list({}, e) : this._client.getAPIList("/v1/tools", z, { query: e, ...r });
1186
+ }
1187
+ /**
1188
+ * Authorizes a user for a specific tool by name
1189
+ */
1190
+ authorize(e, r) {
1191
+ return this._client.post("/v1/tools/authorize", { body: e, ...r });
1192
+ }
1193
+ /**
1194
+ * Executes a tool by name and arguments
1195
+ */
1196
+ execute(e, r) {
1197
+ return this._client.post("/v1/tools/execute", { body: e, ...r });
1198
+ }
1199
+ get(e, r = {}, n) {
1200
+ return S(r) ? this.get(e, {}, r) : this._client.get(`/v1/tools/${e}`, { query: r, ...n });
1201
+ }
1202
+ }
1203
+ class z extends O {
1204
+ }
1205
+ class $t extends O {
1206
+ }
1207
+ C.ToolDefinitionsOffsetPage = z;
1208
+ C.Scheduled = Je;
1209
+ C.Formatted = ie;
1210
+ C.FormattedListResponsesOffsetPage = ae;
1211
+ class ce extends b {
1212
+ /**
1213
+ * Create a worker
1214
+ */
1215
+ create(e, r) {
1216
+ return this._client.post("/v1/workers", { body: e, ...r });
1217
+ }
1218
+ /**
1219
+ * Update a worker
1220
+ */
1221
+ update(e, r, n) {
1222
+ return this._client.patch(`/v1/workers/${e}`, { body: r, ...n });
1223
+ }
1224
+ list(e = {}, r) {
1225
+ return S(e) ? this.list({}, e) : this._client.getAPIList("/v1/workers", ue, { query: e, ...r });
1226
+ }
1227
+ /**
1228
+ * Delete a worker
1229
+ */
1230
+ delete(e, r) {
1231
+ return this._client.delete(`/v1/workers/${e}`, {
1232
+ ...r,
1233
+ headers: { Accept: "*/*", ...r?.headers }
1234
+ });
1235
+ }
1236
+ /**
1237
+ * Get a worker by ID
1238
+ */
1239
+ get(e, r) {
1240
+ return this._client.get(`/v1/workers/${e}`, r);
1241
+ }
1242
+ /**
1243
+ * Get the health of a worker
1244
+ */
1245
+ health(e, r) {
1246
+ return this._client.get(`/v1/workers/${e}/health`, r);
1247
+ }
1248
+ tools(e, r = {}, n) {
1249
+ return S(r) ? this.tools(e, {}, r) : this._client.getAPIList(`/v1/workers/${e}/tools`, z, {
1250
+ query: r,
1251
+ ...n
1252
+ });
1253
+ }
1254
+ }
1255
+ class ue extends O {
1256
+ }
1257
+ ce.WorkerResponsesOffsetPage = ue;
1258
+ var Ye, Ze;
1259
+ class d extends xt {
1260
+ /**
1261
+ * API Client for interfacing with the Arcade API.
1262
+ *
1263
+ * @param {string | undefined} [opts.apiKey=process.env['ARCADE_API_KEY'] ?? undefined]
1264
+ * @param {string} [opts.baseURL=process.env['ARCADE_BASE_URL'] ?? https://api.arcade.dev] - Override the default base URL for the API.
1265
+ * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
1266
+ * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
1267
+ * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
1268
+ * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
1269
+ * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
1270
+ * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
1271
+ */
1272
+ constructor({ baseURL: e = _e("ARCADE_BASE_URL"), apiKey: r = _e("ARCADE_API_KEY"), ...n } = {}) {
1273
+ if (r === void 0)
1274
+ throw new P("The ARCADE_API_KEY environment variable is missing or empty; either provide it, or instantiate the Arcade client with an apiKey option, like new Arcade({ apiKey: 'My API Key' }).");
1275
+ const s = {
1276
+ apiKey: r,
1277
+ ...n,
1278
+ baseURL: e || "https://api.arcade.dev"
1279
+ };
1280
+ super({
1281
+ baseURL: s.baseURL,
1282
+ baseURLOverridden: e ? e !== "https://api.arcade.dev" : !1,
1283
+ timeout: s.timeout ?? 6e4,
1284
+ httpAgent: s.httpAgent,
1285
+ maxRetries: s.maxRetries,
1286
+ fetch: s.fetch
1287
+ }), Ye.add(this), this.admin = new v(this), this.auth = new Ve(this), this.health = new Ge(this), this.chat = new oe(this), this.tools = new C(this), this.workers = new ce(this), this._options = s, this.idempotencyHeader = "Idempotency-Key", this.apiKey = r;
1288
+ }
1289
+ defaultQuery() {
1290
+ return this._options.defaultQuery;
1291
+ }
1292
+ defaultHeaders(e) {
1293
+ return {
1294
+ ...super.defaultHeaders(e),
1295
+ ...this._options.defaultHeaders
1296
+ };
1297
+ }
1298
+ authHeaders(e) {
1299
+ return { Authorization: this.apiKey };
1300
+ }
1301
+ stringifyQuery(e) {
1302
+ return dt(e, { arrayFormat: "comma" });
1303
+ }
1304
+ }
1305
+ Ze = d, Ye = /* @__PURE__ */ new WeakSet();
1306
+ d.Arcade = Ze;
1307
+ d.DEFAULT_TIMEOUT = 6e4;
1308
+ d.ArcadeError = P;
1309
+ d.APIError = w;
1310
+ d.APIConnectionError = q;
1311
+ d.APIConnectionTimeoutError = Ie;
1312
+ d.APIUserAbortError = te;
1313
+ d.NotFoundError = Fe;
1314
+ d.ConflictError = $e;
1315
+ d.RateLimitError = Ue;
1316
+ d.BadRequestError = De;
1317
+ d.AuthenticationError = Le;
1318
+ d.InternalServerError = Be;
1319
+ d.PermissionDeniedError = Oe;
1320
+ d.UnprocessableEntityError = je;
1321
+ d.toFile = yt;
1322
+ d.fileFromPath = Ee;
1323
+ d.Admin = v;
1324
+ d.Auth = Ve;
1325
+ d.Health = Ge;
1326
+ d.Chat = oe;
1327
+ d.Tools = C;
1328
+ d.ToolDefinitionsOffsetPage = z;
1329
+ d.Workers = ce;
1330
+ d.WorkerResponsesOffsetPage = ue;
1331
+ const jt = /[._\-\s]+/, Ut = /([a-z])([A-Z])/g, Bt = /\s+/;
1332
+ class Kt {
1333
+ #e;
1334
+ constructor(e) {
1335
+ const { accessToken: r, apiKey: n, arcadeClientId: s, baseURL: o } = e, i = n ?? pe("ARCADE_API_KEY"), l = !!i, c = {};
1336
+ s && (c["Arcade-Client-Id"] = s), !l && r && (c.Authorization = `Bearer ${r}`);
1337
+ const u = {
1338
+ baseURL: o ?? pe("ARCADE_BASE_URL"),
1339
+ defaultHeaders: c,
1340
+ apiKey: i ?? ""
1341
+ };
1342
+ this.#e = new d(u);
1343
+ }
1344
+ static create(e) {
1345
+ return new d(e);
1346
+ }
1347
+ async getAllTools(e = {}) {
1348
+ const { limit: r = 1e3, offset: n = 0, toolkit: s } = e;
1349
+ return (await this.#e.tools.list({
1350
+ limit: r,
1351
+ offset: n,
1352
+ toolkit: s
1353
+ })).items;
1354
+ }
1355
+ async groupToolsBy(e) {
1356
+ const r = await this.getAllTools(), n = /* @__PURE__ */ new Map();
1357
+ for (const s of r) {
1358
+ const o = s[e];
1359
+ typeof o == "string" && n.set(o, s);
1360
+ }
1361
+ return n;
1362
+ }
1363
+ async getToolkits() {
1364
+ const e = await this.getAllTools(), r = /* @__PURE__ */ new Map();
1365
+ for (const n of e) {
1366
+ const s = n.toolkit.name;
1367
+ let o = r.get(s);
1368
+ o || (o = {
1369
+ ...n.toolkit,
1370
+ tools: [],
1371
+ requirements: {
1372
+ met: !0,
1373
+ secrets: [],
1374
+ authorization: [],
1375
+ scopes: {}
1376
+ }
1377
+ }, r.set(s, o)), o.tools.push(n), n.requirements && this.applyToolRequirements(o, n.requirements);
1378
+ }
1379
+ return r;
1380
+ }
1381
+ async getToolsForToolkit(e) {
1382
+ return (await this.#e.tools.list({
1383
+ toolkit: e,
1384
+ limit: 1e3
1385
+ })).items;
1386
+ }
1387
+ applyToolRequirements(e, r) {
1388
+ if (!r)
1389
+ return;
1390
+ e.requirements.secrets = this.mergeSecrets(
1391
+ r.secrets ?? [],
1392
+ e.requirements.secrets ?? []
1393
+ ), e.requirements.authorization = this.mergeAuthorizations(
1394
+ r.authorization,
1395
+ e.requirements.authorization ?? []
1396
+ );
1397
+ const n = r.authorization?.provider_id, s = r.authorization?.oauth2?.scopes ?? [];
1398
+ n && s.length && (e.requirements.scopes = this.mergeScopes(
1399
+ n,
1400
+ s,
1401
+ e.requirements.scopes ?? {}
1402
+ )), e.requirements.met = !!(e.requirements.met && (r.met ?? !0));
1403
+ }
1404
+ mergeSecrets(e = [], r = []) {
1405
+ if (e.length === 0)
1406
+ return r;
1407
+ const n = /* @__PURE__ */ new Map();
1408
+ for (const s of r)
1409
+ n.set(s.key, { ...s });
1410
+ for (const s of e) {
1411
+ const o = n.get(s.key);
1412
+ if (!o) {
1413
+ n.set(s.key, { ...s });
1414
+ continue;
1415
+ }
1416
+ const i = !!(o.met || s.met), l = s.status_reason ?? o.status_reason;
1417
+ n.set(s.key, { key: s.key, met: i, status_reason: l });
1418
+ }
1419
+ return Array.from(n.values());
1420
+ }
1421
+ mergeAuthorizations(e, r = []) {
1422
+ if (!e?.provider_id)
1423
+ return r;
1424
+ const n = new Map(r.map((i) => [i.provider_id, { ...i }])), s = n.get(e.provider_id);
1425
+ if (!s)
1426
+ return n.set(e.provider_id, { ...e }), Array.from(n.values());
1427
+ const o = new Set(s.oauth2?.scopes ?? []);
1428
+ for (const i of e.oauth2?.scopes ?? [])
1429
+ o.add(i);
1430
+ return n.set(e.provider_id, {
1431
+ ...s,
1432
+ oauth2: {
1433
+ ...s.oauth2 ?? {},
1434
+ scopes: Array.from(o)
1435
+ }
1436
+ }), Array.from(n.values());
1437
+ }
1438
+ mergeScopes(e, r = [], n = {}) {
1439
+ if (!e || r.length === 0)
1440
+ return n;
1441
+ const s = new Set(n[e] ?? []);
1442
+ for (const o of r)
1443
+ s.add(o);
1444
+ return { ...n, [e]: Array.from(s) };
1445
+ }
1446
+ /**
1447
+ * Pre-compute requirements summary for optimal UI performance.
1448
+ * This eliminates the need for runtime transformation in UI components.
1449
+ */
1450
+ computeRequirementsSummary(e) {
1451
+ const r = e?.secrets?.length ? {
1452
+ configured: e.secrets.filter((s) => s.met === !0).map((s) => s.key),
1453
+ pending: e.secrets.filter((s) => s.met === !1).map((s) => s.key)
1454
+ } : void 0, n = e?.authorization?.length ? {
1455
+ providers: e.authorization.filter((s) => s.provider_id || s.id).map((s) => ({
1456
+ id: s.provider_id || s.id || "",
1457
+ status: s.status,
1458
+ scopes: s.oauth2?.scopes || []
1459
+ }))
1460
+ } : void 0;
1461
+ return { secrets: r, oauth: n };
1462
+ }
1463
+ /**
1464
+ * Process raw toolkit data into an optimized collection with pre-computed search indices.
1465
+ *
1466
+ * @returns ToolkitCollection with:
1467
+ * - Pre-computed searchable text for fast filtering
1468
+ * - Pre-computed requirement badges (no runtime processing needed)
1469
+ * - Search indices for O(1) lookups
1470
+ * - Toolkit/tool mapping for quick relationships
1471
+ */
1472
+ async getProcessedToolkitCollection() {
1473
+ const e = await this.getToolkits(), r = [], n = [], s = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), i = {
1474
+ toolkitsByName: /* @__PURE__ */ new Map(),
1475
+ toolsByName: /* @__PURE__ */ new Map()
1476
+ };
1477
+ for (const [l, c] of e.entries()) {
1478
+ const u = this.normalizeText([
1479
+ c.name,
1480
+ c.description ?? "",
1481
+ c.version ?? ""
1482
+ ]), p = this.computeRequirementsSummary(
1483
+ c.requirements
1484
+ ), a = {
1485
+ ...c,
1486
+ searchableText: u,
1487
+ requirementsSummary: p,
1488
+ metadata: tt[c.name]
1489
+ };
1490
+ r.push(a), s.set(l, a), i.toolkitsByName.set(l.toLowerCase(), a);
1491
+ for (const h of c.tools) {
1492
+ const m = this.normalizeText([
1493
+ h.name,
1494
+ h.fully_qualified_name,
1495
+ h.description ?? "",
1496
+ c.name,
1497
+ c.description ?? ""
1498
+ ]), x = {
1499
+ ...h,
1500
+ searchableText: m
1501
+ };
1502
+ n.push(x), o.set(h.fully_qualified_name, l), i.toolsByName.set(
1503
+ h.fully_qualified_name.toLowerCase(),
1504
+ x
1505
+ );
1506
+ }
1507
+ }
1508
+ return {
1509
+ toolkits: r,
1510
+ tools: n,
1511
+ toolkitMap: s,
1512
+ toolToToolkitMap: o,
1513
+ searchIndex: i
1514
+ };
1515
+ }
1516
+ /**
1517
+ * Helper function to create normalized searchable text from multiple strings.
1518
+ * Separates compound terms (like Gmail.List_emails) into individual searchable components.
1519
+ * Handles camelCase, snake_case, kebab-case, and dot.notation.
1520
+ */
1521
+ normalizeText(e) {
1522
+ const r = /* @__PURE__ */ new Set();
1523
+ for (const n of e) {
1524
+ if (!n)
1525
+ continue;
1526
+ const s = n.toLowerCase();
1527
+ r.add(s);
1528
+ const o = n.split(jt);
1529
+ for (const i of o) {
1530
+ if (i.length <= 1)
1531
+ continue;
1532
+ const c = i.replace(Ut, "$1 $2").split(Bt);
1533
+ for (const u of c)
1534
+ u.length > 1 && r.add(u.toLowerCase());
1535
+ }
1536
+ }
1537
+ return Array.from(r).join(" ");
1538
+ }
1539
+ }
1540
+ export {
1541
+ Kt as A,
1542
+ d as a
1543
+ };