@thoughtspot/visual-embed-sdk 1.40.1-alpha.3 → 1.40.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 (413) hide show
  1. package/cjs/package.json +2 -2
  2. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  3. package/cjs/src/embed/ts-embed.js +13 -2
  4. package/cjs/src/embed/ts-embed.js.map +1 -1
  5. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  6. package/cjs/src/embed/ts-embed.spec.js +124 -2
  7. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  8. package/cjs/src/errors.d.ts +11 -0
  9. package/cjs/src/errors.d.ts.map +1 -1
  10. package/cjs/src/errors.js +12 -1
  11. package/cjs/src/errors.js.map +1 -1
  12. package/cjs/src/index.d.ts +2 -2
  13. package/cjs/src/index.d.ts.map +1 -1
  14. package/cjs/src/index.js +3 -1
  15. package/cjs/src/index.js.map +1 -1
  16. package/cjs/src/react/index.d.ts +1 -1
  17. package/cjs/src/react/index.d.ts.map +1 -1
  18. package/cjs/src/react/index.js +2 -1
  19. package/cjs/src/react/index.js.map +1 -1
  20. package/cjs/src/types.d.ts +94 -3
  21. package/cjs/src/types.d.ts.map +1 -1
  22. package/cjs/src/types.js +22 -11
  23. package/cjs/src/types.js.map +1 -1
  24. package/cjs/src/utils/custom-actions.d.ts +12 -0
  25. package/cjs/src/utils/custom-actions.d.ts.map +1 -0
  26. package/cjs/src/utils/custom-actions.js +191 -0
  27. package/cjs/src/utils/custom-actions.js.map +1 -0
  28. package/cjs/src/utils/custom-actions.spec.d.ts +2 -0
  29. package/cjs/src/utils/custom-actions.spec.d.ts.map +1 -0
  30. package/cjs/src/utils/custom-actions.spec.js +437 -0
  31. package/cjs/src/utils/custom-actions.spec.js.map +1 -0
  32. package/cjs/src/utils.d.ts +7 -0
  33. package/cjs/src/utils.d.ts.map +1 -1
  34. package/cjs/src/utils.js +11 -1
  35. package/cjs/src/utils.js.map +1 -1
  36. package/cjs/src/utils.spec.js +28 -0
  37. package/cjs/src/utils.spec.js.map +1 -1
  38. package/dist/{index-B0uCTBbm.js → index-Dx5UP5Ip.js} +1 -1
  39. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  40. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  41. package/dist/src/errors.d.ts +11 -0
  42. package/dist/src/errors.d.ts.map +1 -1
  43. package/dist/src/index.d.ts +2 -2
  44. package/dist/src/index.d.ts.map +1 -1
  45. package/dist/src/react/index.d.ts +1 -1
  46. package/dist/src/react/index.d.ts.map +1 -1
  47. package/dist/src/types.d.ts +94 -3
  48. package/dist/src/types.d.ts.map +1 -1
  49. package/dist/src/utils/custom-actions.d.ts +12 -0
  50. package/dist/src/utils/custom-actions.d.ts.map +1 -0
  51. package/dist/src/utils/custom-actions.spec.d.ts +2 -0
  52. package/dist/src/utils/custom-actions.spec.d.ts.map +1 -0
  53. package/dist/src/utils.d.ts +7 -0
  54. package/dist/src/utils.d.ts.map +1 -1
  55. package/dist/tsembed-react.es.js +1684 -201
  56. package/dist/tsembed-react.js +1683 -200
  57. package/dist/tsembed.es.js +1636 -153
  58. package/dist/tsembed.js +1635 -152
  59. package/dist/visual-embed-sdk-react-full.d.ts +95 -4
  60. package/dist/visual-embed-sdk-react.d.ts +95 -4
  61. package/dist/visual-embed-sdk.d.ts +95 -4
  62. package/lib/package.json +2 -2
  63. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  64. package/lib/src/embed/ts-embed.js +13 -2
  65. package/lib/src/embed/ts-embed.js.map +1 -1
  66. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  67. package/lib/src/embed/ts-embed.spec.js +125 -3
  68. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  69. package/lib/src/errors.d.ts +11 -0
  70. package/lib/src/errors.d.ts.map +1 -1
  71. package/lib/src/errors.js +11 -0
  72. package/lib/src/errors.js.map +1 -1
  73. package/lib/src/index.d.ts +2 -2
  74. package/lib/src/index.d.ts.map +1 -1
  75. package/lib/src/index.js +2 -2
  76. package/lib/src/index.js.map +1 -1
  77. package/lib/src/react/index.d.ts +1 -1
  78. package/lib/src/react/index.d.ts.map +1 -1
  79. package/lib/src/react/index.js +1 -1
  80. package/lib/src/react/index.js.map +1 -1
  81. package/lib/src/types.d.ts +94 -3
  82. package/lib/src/types.d.ts.map +1 -1
  83. package/lib/src/types.js +21 -10
  84. package/lib/src/types.js.map +1 -1
  85. package/lib/src/utils/custom-actions.d.ts +12 -0
  86. package/lib/src/utils/custom-actions.d.ts.map +1 -0
  87. package/lib/src/utils/custom-actions.js +186 -0
  88. package/lib/src/utils/custom-actions.js.map +1 -0
  89. package/lib/src/utils/custom-actions.spec.d.ts +2 -0
  90. package/lib/src/utils/custom-actions.spec.d.ts.map +1 -0
  91. package/lib/src/utils/custom-actions.spec.js +435 -0
  92. package/lib/src/utils/custom-actions.spec.js.map +1 -0
  93. package/lib/src/utils.d.ts +7 -0
  94. package/lib/src/utils.d.ts.map +1 -1
  95. package/lib/src/utils.js +9 -0
  96. package/lib/src/utils.js.map +1 -1
  97. package/lib/src/utils.spec.js +29 -1
  98. package/lib/src/utils.spec.js.map +1 -1
  99. package/lib/src/visual-embed-sdk.d.ts +96 -5
  100. package/package.json +2 -2
  101. package/src/embed/ts-embed.spec.ts +137 -3
  102. package/src/embed/ts-embed.ts +13 -1
  103. package/src/errors.ts +12 -0
  104. package/src/index.ts +4 -0
  105. package/src/react/index.tsx +1 -0
  106. package/src/types.ts +110 -15
  107. package/src/utils/custom-actions.spec.ts +471 -0
  108. package/src/utils/custom-actions.ts +228 -0
  109. package/src/utils.spec.ts +34 -0
  110. package/src/utils.ts +10 -0
  111. package/dist/es/index-BwesxE_h.js +0 -7369
  112. package/dist/es/index.js +0 -17539
  113. package/dist/es/react/index.js +0 -24039
  114. package/dist/es/react/src/auth.d.ts +0 -171
  115. package/dist/es/react/src/auth.d.ts.map +0 -1
  116. package/dist/es/react/src/auth.spec.d.ts +0 -15
  117. package/dist/es/react/src/auth.spec.d.ts.map +0 -1
  118. package/dist/es/react/src/authToken.d.ts +0 -17
  119. package/dist/es/react/src/authToken.d.ts.map +0 -1
  120. package/dist/es/react/src/authToken.spec.d.ts +0 -2
  121. package/dist/es/react/src/authToken.spec.d.ts.map +0 -1
  122. package/dist/es/react/src/config.d.ts +0 -21
  123. package/dist/es/react/src/config.d.ts.map +0 -1
  124. package/dist/es/react/src/config.spec.d.ts +0 -5
  125. package/dist/es/react/src/config.spec.d.ts.map +0 -1
  126. package/dist/es/react/src/css-variables.d.ts +0 -384
  127. package/dist/es/react/src/css-variables.d.ts.map +0 -1
  128. package/dist/es/react/src/embed/app.d.ts +0 -478
  129. package/dist/es/react/src/embed/app.d.ts.map +0 -1
  130. package/dist/es/react/src/embed/app.spec.d.ts +0 -2
  131. package/dist/es/react/src/embed/app.spec.d.ts.map +0 -1
  132. package/dist/es/react/src/embed/base.d.ts +0 -136
  133. package/dist/es/react/src/embed/base.d.ts.map +0 -1
  134. package/dist/es/react/src/embed/base.spec.d.ts +0 -2
  135. package/dist/es/react/src/embed/base.spec.d.ts.map +0 -1
  136. package/dist/es/react/src/embed/bodyless-conversation.d.ts +0 -26
  137. package/dist/es/react/src/embed/bodyless-conversation.d.ts.map +0 -1
  138. package/dist/es/react/src/embed/bodyless-conversation.spec.d.ts +0 -2
  139. package/dist/es/react/src/embed/bodyless-conversation.spec.d.ts.map +0 -1
  140. package/dist/es/react/src/embed/conversation.d.ts +0 -43
  141. package/dist/es/react/src/embed/conversation.d.ts.map +0 -1
  142. package/dist/es/react/src/embed/conversation.spec.d.ts +0 -2
  143. package/dist/es/react/src/embed/conversation.spec.d.ts.map +0 -1
  144. package/dist/es/react/src/embed/embed.spec.d.ts +0 -2
  145. package/dist/es/react/src/embed/embed.spec.d.ts.map +0 -1
  146. package/dist/es/react/src/embed/embedConfig.d.ts +0 -17
  147. package/dist/es/react/src/embed/embedConfig.d.ts.map +0 -1
  148. package/dist/es/react/src/embed/events.spec.d.ts +0 -2
  149. package/dist/es/react/src/embed/events.spec.d.ts.map +0 -1
  150. package/dist/es/react/src/embed/liveboard.d.ts +0 -379
  151. package/dist/es/react/src/embed/liveboard.d.ts.map +0 -1
  152. package/dist/es/react/src/embed/liveboard.spec.d.ts +0 -2
  153. package/dist/es/react/src/embed/liveboard.spec.d.ts.map +0 -1
  154. package/dist/es/react/src/embed/pinboard.spec.d.ts +0 -2
  155. package/dist/es/react/src/embed/pinboard.spec.d.ts.map +0 -1
  156. package/dist/es/react/src/embed/sage.d.ts +0 -148
  157. package/dist/es/react/src/embed/sage.d.ts.map +0 -1
  158. package/dist/es/react/src/embed/sage.spec.d.ts +0 -2
  159. package/dist/es/react/src/embed/sage.spec.d.ts.map +0 -1
  160. package/dist/es/react/src/embed/search-bar.d.ts +0 -93
  161. package/dist/es/react/src/embed/search-bar.d.ts.map +0 -1
  162. package/dist/es/react/src/embed/search.d.ts +0 -282
  163. package/dist/es/react/src/embed/search.d.ts.map +0 -1
  164. package/dist/es/react/src/embed/search.spec.d.ts +0 -2
  165. package/dist/es/react/src/embed/search.spec.d.ts.map +0 -1
  166. package/dist/es/react/src/embed/ts-embed-trigger.spec.d.ts +0 -2
  167. package/dist/es/react/src/embed/ts-embed-trigger.spec.d.ts.map +0 -1
  168. package/dist/es/react/src/embed/ts-embed.d.ts +0 -374
  169. package/dist/es/react/src/embed/ts-embed.d.ts.map +0 -1
  170. package/dist/es/react/src/embed/ts-embed.spec.d.ts +0 -2
  171. package/dist/es/react/src/embed/ts-embed.spec.d.ts.map +0 -1
  172. package/dist/es/react/src/errors.d.ts +0 -19
  173. package/dist/es/react/src/errors.d.ts.map +0 -1
  174. package/dist/es/react/src/index.d.ts +0 -29
  175. package/dist/es/react/src/index.d.ts.map +0 -1
  176. package/dist/es/react/src/mixpanel-service.d.ts +0 -35
  177. package/dist/es/react/src/mixpanel-service.d.ts.map +0 -1
  178. package/dist/es/react/src/mixpanel-service.spec.d.ts +0 -2
  179. package/dist/es/react/src/mixpanel-service.spec.d.ts.map +0 -1
  180. package/dist/es/react/src/react/all-types-export.d.ts +0 -3
  181. package/dist/es/react/src/react/all-types-export.d.ts.map +0 -1
  182. package/dist/es/react/src/react/all-types-export.spec.d.ts +0 -2
  183. package/dist/es/react/src/react/all-types-export.spec.d.ts.map +0 -1
  184. package/dist/es/react/src/react/index.d.ts +0 -254
  185. package/dist/es/react/src/react/index.d.ts.map +0 -1
  186. package/dist/es/react/src/react/index.spec.d.ts +0 -3
  187. package/dist/es/react/src/react/index.spec.d.ts.map +0 -1
  188. package/dist/es/react/src/react/util.d.ts +0 -19
  189. package/dist/es/react/src/react/util.d.ts.map +0 -1
  190. package/dist/es/react/src/test/test-utils.d.ts +0 -61
  191. package/dist/es/react/src/test/test-utils.d.ts.map +0 -1
  192. package/dist/es/react/src/tokenizedFetch.d.ts +0 -18
  193. package/dist/es/react/src/tokenizedFetch.d.ts.map +0 -1
  194. package/dist/es/react/src/types.d.ts +0 -4363
  195. package/dist/es/react/src/types.d.ts.map +0 -1
  196. package/dist/es/react/src/utils/authService/authService.d.ts +0 -45
  197. package/dist/es/react/src/utils/authService/authService.d.ts.map +0 -1
  198. package/dist/es/react/src/utils/authService/authService.spec.d.ts +0 -2
  199. package/dist/es/react/src/utils/authService/authService.spec.d.ts.map +0 -1
  200. package/dist/es/react/src/utils/authService/index.d.ts +0 -3
  201. package/dist/es/react/src/utils/authService/index.d.ts.map +0 -1
  202. package/dist/es/react/src/utils/authService/tokenizedAuthService.d.ts +0 -22
  203. package/dist/es/react/src/utils/authService/tokenizedAuthService.d.ts.map +0 -1
  204. package/dist/es/react/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
  205. package/dist/es/react/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
  206. package/dist/es/react/src/utils/global-styles.d.ts +0 -2
  207. package/dist/es/react/src/utils/global-styles.d.ts.map +0 -1
  208. package/dist/es/react/src/utils/global-styles.spec.d.ts +0 -2
  209. package/dist/es/react/src/utils/global-styles.spec.d.ts.map +0 -1
  210. package/dist/es/react/src/utils/graphql/answerService/answer-queries.d.ts +0 -10
  211. package/dist/es/react/src/utils/graphql/answerService/answer-queries.d.ts.map +0 -1
  212. package/dist/es/react/src/utils/graphql/answerService/answerService.d.ts +0 -180
  213. package/dist/es/react/src/utils/graphql/answerService/answerService.d.ts.map +0 -1
  214. package/dist/es/react/src/utils/graphql/answerService/answerService.spec.d.ts +0 -2
  215. package/dist/es/react/src/utils/graphql/answerService/answerService.spec.d.ts.map +0 -1
  216. package/dist/es/react/src/utils/graphql/graphql-request.d.ts +0 -15
  217. package/dist/es/react/src/utils/graphql/graphql-request.d.ts.map +0 -1
  218. package/dist/es/react/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  219. package/dist/es/react/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  220. package/dist/es/react/src/utils/graphql/nlsService/conversation-queries.d.ts +0 -3
  221. package/dist/es/react/src/utils/graphql/nlsService/conversation-queries.d.ts.map +0 -1
  222. package/dist/es/react/src/utils/graphql/nlsService/conversation-service.d.ts +0 -12
  223. package/dist/es/react/src/utils/graphql/nlsService/conversation-service.d.ts.map +0 -1
  224. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-queries.d.ts +0 -2
  225. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-queries.d.ts.map +0 -1
  226. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-service.d.ts +0 -17
  227. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-service.d.ts.map +0 -1
  228. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts +0 -2
  229. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts.map +0 -1
  230. package/dist/es/react/src/utils/graphql/preview-service.d.ts +0 -9
  231. package/dist/es/react/src/utils/graphql/preview-service.d.ts.map +0 -1
  232. package/dist/es/react/src/utils/graphql/preview-service.spec.d.ts +0 -2
  233. package/dist/es/react/src/utils/graphql/preview-service.spec.d.ts.map +0 -1
  234. package/dist/es/react/src/utils/graphql/sourceService.d.ts +0 -8
  235. package/dist/es/react/src/utils/graphql/sourceService.d.ts.map +0 -1
  236. package/dist/es/react/src/utils/graphql/sourceService.spec.d.ts +0 -2
  237. package/dist/es/react/src/utils/graphql/sourceService.spec.d.ts.map +0 -1
  238. package/dist/es/react/src/utils/liveboardService/liveboardService.d.ts +0 -16
  239. package/dist/es/react/src/utils/liveboardService/liveboardService.d.ts.map +0 -1
  240. package/dist/es/react/src/utils/liveboardService/liveboardService.spec.d.ts +0 -2
  241. package/dist/es/react/src/utils/liveboardService/liveboardService.spec.d.ts.map +0 -1
  242. package/dist/es/react/src/utils/logger.d.ts +0 -18
  243. package/dist/es/react/src/utils/logger.d.ts.map +0 -1
  244. package/dist/es/react/src/utils/logger.spec.d.ts +0 -25
  245. package/dist/es/react/src/utils/logger.spec.d.ts.map +0 -1
  246. package/dist/es/react/src/utils/processData.d.ts +0 -22
  247. package/dist/es/react/src/utils/processData.d.ts.map +0 -1
  248. package/dist/es/react/src/utils/processData.spec.d.ts +0 -2
  249. package/dist/es/react/src/utils/processData.spec.d.ts.map +0 -1
  250. package/dist/es/react/src/utils/processTrigger.d.ts +0 -16
  251. package/dist/es/react/src/utils/processTrigger.d.ts.map +0 -1
  252. package/dist/es/react/src/utils/processTrigger.spec.d.ts +0 -2
  253. package/dist/es/react/src/utils/processTrigger.spec.d.ts.map +0 -1
  254. package/dist/es/react/src/utils/reporting.d.ts +0 -16
  255. package/dist/es/react/src/utils/reporting.d.ts.map +0 -1
  256. package/dist/es/react/src/utils/reporting.spec.d.ts +0 -2
  257. package/dist/es/react/src/utils/reporting.spec.d.ts.map +0 -1
  258. package/dist/es/react/src/utils/sessionInfoService.d.ts +0 -66
  259. package/dist/es/react/src/utils/sessionInfoService.d.ts.map +0 -1
  260. package/dist/es/react/src/utils.d.ts +0 -104
  261. package/dist/es/react/src/utils.d.ts.map +0 -1
  262. package/dist/es/react/src/utils.spec.d.ts +0 -2
  263. package/dist/es/react/src/utils.spec.d.ts.map +0 -1
  264. package/dist/es/src/auth.d.ts +0 -171
  265. package/dist/es/src/auth.d.ts.map +0 -1
  266. package/dist/es/src/auth.spec.d.ts +0 -15
  267. package/dist/es/src/auth.spec.d.ts.map +0 -1
  268. package/dist/es/src/authToken.d.ts +0 -17
  269. package/dist/es/src/authToken.d.ts.map +0 -1
  270. package/dist/es/src/authToken.spec.d.ts +0 -2
  271. package/dist/es/src/authToken.spec.d.ts.map +0 -1
  272. package/dist/es/src/config.d.ts +0 -21
  273. package/dist/es/src/config.d.ts.map +0 -1
  274. package/dist/es/src/config.spec.d.ts +0 -5
  275. package/dist/es/src/config.spec.d.ts.map +0 -1
  276. package/dist/es/src/css-variables.d.ts +0 -384
  277. package/dist/es/src/css-variables.d.ts.map +0 -1
  278. package/dist/es/src/embed/app.d.ts +0 -478
  279. package/dist/es/src/embed/app.d.ts.map +0 -1
  280. package/dist/es/src/embed/app.spec.d.ts +0 -2
  281. package/dist/es/src/embed/app.spec.d.ts.map +0 -1
  282. package/dist/es/src/embed/base.d.ts +0 -136
  283. package/dist/es/src/embed/base.d.ts.map +0 -1
  284. package/dist/es/src/embed/base.spec.d.ts +0 -2
  285. package/dist/es/src/embed/base.spec.d.ts.map +0 -1
  286. package/dist/es/src/embed/bodyless-conversation.d.ts +0 -26
  287. package/dist/es/src/embed/bodyless-conversation.d.ts.map +0 -1
  288. package/dist/es/src/embed/bodyless-conversation.spec.d.ts +0 -2
  289. package/dist/es/src/embed/bodyless-conversation.spec.d.ts.map +0 -1
  290. package/dist/es/src/embed/conversation.d.ts +0 -43
  291. package/dist/es/src/embed/conversation.d.ts.map +0 -1
  292. package/dist/es/src/embed/conversation.spec.d.ts +0 -2
  293. package/dist/es/src/embed/conversation.spec.d.ts.map +0 -1
  294. package/dist/es/src/embed/embed.spec.d.ts +0 -2
  295. package/dist/es/src/embed/embed.spec.d.ts.map +0 -1
  296. package/dist/es/src/embed/embedConfig.d.ts +0 -17
  297. package/dist/es/src/embed/embedConfig.d.ts.map +0 -1
  298. package/dist/es/src/embed/events.spec.d.ts +0 -2
  299. package/dist/es/src/embed/events.spec.d.ts.map +0 -1
  300. package/dist/es/src/embed/liveboard.d.ts +0 -379
  301. package/dist/es/src/embed/liveboard.d.ts.map +0 -1
  302. package/dist/es/src/embed/liveboard.spec.d.ts +0 -2
  303. package/dist/es/src/embed/liveboard.spec.d.ts.map +0 -1
  304. package/dist/es/src/embed/pinboard.spec.d.ts +0 -2
  305. package/dist/es/src/embed/pinboard.spec.d.ts.map +0 -1
  306. package/dist/es/src/embed/sage.d.ts +0 -148
  307. package/dist/es/src/embed/sage.d.ts.map +0 -1
  308. package/dist/es/src/embed/sage.spec.d.ts +0 -2
  309. package/dist/es/src/embed/sage.spec.d.ts.map +0 -1
  310. package/dist/es/src/embed/search-bar.d.ts +0 -93
  311. package/dist/es/src/embed/search-bar.d.ts.map +0 -1
  312. package/dist/es/src/embed/search.d.ts +0 -282
  313. package/dist/es/src/embed/search.d.ts.map +0 -1
  314. package/dist/es/src/embed/search.spec.d.ts +0 -2
  315. package/dist/es/src/embed/search.spec.d.ts.map +0 -1
  316. package/dist/es/src/embed/ts-embed-trigger.spec.d.ts +0 -2
  317. package/dist/es/src/embed/ts-embed-trigger.spec.d.ts.map +0 -1
  318. package/dist/es/src/embed/ts-embed.d.ts +0 -374
  319. package/dist/es/src/embed/ts-embed.d.ts.map +0 -1
  320. package/dist/es/src/embed/ts-embed.spec.d.ts +0 -2
  321. package/dist/es/src/embed/ts-embed.spec.d.ts.map +0 -1
  322. package/dist/es/src/errors.d.ts +0 -19
  323. package/dist/es/src/errors.d.ts.map +0 -1
  324. package/dist/es/src/index.d.ts +0 -29
  325. package/dist/es/src/index.d.ts.map +0 -1
  326. package/dist/es/src/mixpanel-service.d.ts +0 -35
  327. package/dist/es/src/mixpanel-service.d.ts.map +0 -1
  328. package/dist/es/src/mixpanel-service.spec.d.ts +0 -2
  329. package/dist/es/src/mixpanel-service.spec.d.ts.map +0 -1
  330. package/dist/es/src/react/all-types-export.d.ts +0 -3
  331. package/dist/es/src/react/all-types-export.d.ts.map +0 -1
  332. package/dist/es/src/react/all-types-export.spec.d.ts +0 -2
  333. package/dist/es/src/react/all-types-export.spec.d.ts.map +0 -1
  334. package/dist/es/src/react/index.d.ts +0 -254
  335. package/dist/es/src/react/index.d.ts.map +0 -1
  336. package/dist/es/src/react/index.spec.d.ts +0 -3
  337. package/dist/es/src/react/index.spec.d.ts.map +0 -1
  338. package/dist/es/src/react/util.d.ts +0 -19
  339. package/dist/es/src/react/util.d.ts.map +0 -1
  340. package/dist/es/src/test/test-utils.d.ts +0 -61
  341. package/dist/es/src/test/test-utils.d.ts.map +0 -1
  342. package/dist/es/src/tokenizedFetch.d.ts +0 -18
  343. package/dist/es/src/tokenizedFetch.d.ts.map +0 -1
  344. package/dist/es/src/types.d.ts +0 -4363
  345. package/dist/es/src/types.d.ts.map +0 -1
  346. package/dist/es/src/utils/authService/authService.d.ts +0 -45
  347. package/dist/es/src/utils/authService/authService.d.ts.map +0 -1
  348. package/dist/es/src/utils/authService/authService.spec.d.ts +0 -2
  349. package/dist/es/src/utils/authService/authService.spec.d.ts.map +0 -1
  350. package/dist/es/src/utils/authService/index.d.ts +0 -3
  351. package/dist/es/src/utils/authService/index.d.ts.map +0 -1
  352. package/dist/es/src/utils/authService/tokenizedAuthService.d.ts +0 -22
  353. package/dist/es/src/utils/authService/tokenizedAuthService.d.ts.map +0 -1
  354. package/dist/es/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
  355. package/dist/es/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
  356. package/dist/es/src/utils/global-styles.d.ts +0 -2
  357. package/dist/es/src/utils/global-styles.d.ts.map +0 -1
  358. package/dist/es/src/utils/global-styles.spec.d.ts +0 -2
  359. package/dist/es/src/utils/global-styles.spec.d.ts.map +0 -1
  360. package/dist/es/src/utils/graphql/answerService/answer-queries.d.ts +0 -10
  361. package/dist/es/src/utils/graphql/answerService/answer-queries.d.ts.map +0 -1
  362. package/dist/es/src/utils/graphql/answerService/answerService.d.ts +0 -180
  363. package/dist/es/src/utils/graphql/answerService/answerService.d.ts.map +0 -1
  364. package/dist/es/src/utils/graphql/answerService/answerService.spec.d.ts +0 -2
  365. package/dist/es/src/utils/graphql/answerService/answerService.spec.d.ts.map +0 -1
  366. package/dist/es/src/utils/graphql/graphql-request.d.ts +0 -15
  367. package/dist/es/src/utils/graphql/graphql-request.d.ts.map +0 -1
  368. package/dist/es/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  369. package/dist/es/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  370. package/dist/es/src/utils/graphql/nlsService/conversation-queries.d.ts +0 -3
  371. package/dist/es/src/utils/graphql/nlsService/conversation-queries.d.ts.map +0 -1
  372. package/dist/es/src/utils/graphql/nlsService/conversation-service.d.ts +0 -12
  373. package/dist/es/src/utils/graphql/nlsService/conversation-service.d.ts.map +0 -1
  374. package/dist/es/src/utils/graphql/nlsService/nls-answer-queries.d.ts +0 -2
  375. package/dist/es/src/utils/graphql/nlsService/nls-answer-queries.d.ts.map +0 -1
  376. package/dist/es/src/utils/graphql/nlsService/nls-answer-service.d.ts +0 -17
  377. package/dist/es/src/utils/graphql/nlsService/nls-answer-service.d.ts.map +0 -1
  378. package/dist/es/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts +0 -2
  379. package/dist/es/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts.map +0 -1
  380. package/dist/es/src/utils/graphql/preview-service.d.ts +0 -9
  381. package/dist/es/src/utils/graphql/preview-service.d.ts.map +0 -1
  382. package/dist/es/src/utils/graphql/preview-service.spec.d.ts +0 -2
  383. package/dist/es/src/utils/graphql/preview-service.spec.d.ts.map +0 -1
  384. package/dist/es/src/utils/graphql/sourceService.d.ts +0 -8
  385. package/dist/es/src/utils/graphql/sourceService.d.ts.map +0 -1
  386. package/dist/es/src/utils/graphql/sourceService.spec.d.ts +0 -2
  387. package/dist/es/src/utils/graphql/sourceService.spec.d.ts.map +0 -1
  388. package/dist/es/src/utils/liveboardService/liveboardService.d.ts +0 -16
  389. package/dist/es/src/utils/liveboardService/liveboardService.d.ts.map +0 -1
  390. package/dist/es/src/utils/liveboardService/liveboardService.spec.d.ts +0 -2
  391. package/dist/es/src/utils/liveboardService/liveboardService.spec.d.ts.map +0 -1
  392. package/dist/es/src/utils/logger.d.ts +0 -18
  393. package/dist/es/src/utils/logger.d.ts.map +0 -1
  394. package/dist/es/src/utils/logger.spec.d.ts +0 -25
  395. package/dist/es/src/utils/logger.spec.d.ts.map +0 -1
  396. package/dist/es/src/utils/processData.d.ts +0 -22
  397. package/dist/es/src/utils/processData.d.ts.map +0 -1
  398. package/dist/es/src/utils/processData.spec.d.ts +0 -2
  399. package/dist/es/src/utils/processData.spec.d.ts.map +0 -1
  400. package/dist/es/src/utils/processTrigger.d.ts +0 -16
  401. package/dist/es/src/utils/processTrigger.d.ts.map +0 -1
  402. package/dist/es/src/utils/processTrigger.spec.d.ts +0 -2
  403. package/dist/es/src/utils/processTrigger.spec.d.ts.map +0 -1
  404. package/dist/es/src/utils/reporting.d.ts +0 -16
  405. package/dist/es/src/utils/reporting.d.ts.map +0 -1
  406. package/dist/es/src/utils/reporting.spec.d.ts +0 -2
  407. package/dist/es/src/utils/reporting.spec.d.ts.map +0 -1
  408. package/dist/es/src/utils/sessionInfoService.d.ts +0 -66
  409. package/dist/es/src/utils/sessionInfoService.d.ts.map +0 -1
  410. package/dist/es/src/utils.d.ts +0 -104
  411. package/dist/es/src/utils.d.ts.map +0 -1
  412. package/dist/es/src/utils.spec.d.ts +0 -2
  413. package/dist/es/src/utils.spec.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.40.1-alpha.3 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.40.2 */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -373,6 +373,15 @@ function storeValueInWindow(key, value, options = {}) {
373
373
  * @returns The stored value or `undefined` if the key is not found.
374
374
  */
375
375
  const getValueFromWindow = (key) => { var _a; return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key]; };
376
+ /**
377
+ * Check if an array includes a string value
378
+ * @param arr - The array to check
379
+ * @param key - The string to search for
380
+ * @returns boolean indicating if the string is found in the array
381
+ */
382
+ const arrayIncludesString = (arr, key) => {
383
+ return arr.some(item => typeof item === 'string' && item === key);
384
+ };
376
385
  /**
377
386
  * Check if the document is currently in fullscreen mode
378
387
  */
@@ -468,7 +477,6 @@ const calculateVisibleElementData = (element) => {
468
477
  * the embedded app
469
478
  * @group Authentication / Init
470
479
  */
471
- // eslint-disable-next-line no-shadow
472
480
  var AuthType;
473
481
  (function (AuthType) {
474
482
  /**
@@ -682,7 +690,6 @@ var HomeLeftNavItem;
682
690
  /**
683
691
  * A map of the supported runtime filter operations
684
692
  */
685
- // eslint-disable-next-line no-shadow
686
693
  var RuntimeFilterOp;
687
694
  (function (RuntimeFilterOp) {
688
695
  /**
@@ -753,7 +760,6 @@ var RuntimeFilterOp;
753
760
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
754
761
  * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
755
762
  */
756
- // eslint-disable-next-line no-shadow
757
763
  var HomepageModule;
758
764
  (function (HomepageModule) {
759
765
  /**
@@ -786,7 +792,6 @@ var HomepageModule;
786
792
  * **Note**: This option is applicable to full app embedding only.
787
793
  * @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
788
794
  */
789
- // eslint-disable-next-line no-shadow
790
795
  var ListPageColumns;
791
796
  (function (ListPageColumns) {
792
797
  /**
@@ -849,7 +854,6 @@ var ListPageColumns;
849
854
  * ```
850
855
  * @group Events
851
856
  */
852
- // eslint-disable-next-line no-shadow
853
857
  var EmbedEvent;
854
858
  (function (EmbedEvent) {
855
859
  /**
@@ -2029,7 +2033,6 @@ var EmbedEvent;
2029
2033
  * ```
2030
2034
  * @group Events
2031
2035
  */
2032
- // eslint-disable-next-line no-shadow
2033
2036
  var HostEvent;
2034
2037
  (function (HostEvent) {
2035
2038
  /**
@@ -3244,7 +3247,6 @@ var HostEvent;
3244
3247
  * The different visual modes that the data sources panel within
3245
3248
  * search could appear in, such as hidden, collapsed, or expanded.
3246
3249
  */
3247
- // eslint-disable-next-line no-shadow
3248
3250
  var DataSourceVisualMode;
3249
3251
  (function (DataSourceVisualMode) {
3250
3252
  /**
@@ -3264,7 +3266,6 @@ var DataSourceVisualMode;
3264
3266
  * The query params passed down to the embedded ThoughtSpot app
3265
3267
  * containing configuration and/or visual information.
3266
3268
  */
3267
- // eslint-disable-next-line no-shadow
3268
3269
  var Param;
3269
3270
  (function (Param) {
3270
3271
  Param["EmbedApp"] = "embedApp";
@@ -3415,7 +3416,6 @@ var Param;
3415
3416
  * ```
3416
3417
  * See also link:https://developers.thoughtspot.com/docs/actions[Action IDs in the SDK]
3417
3418
  */
3418
- // eslint-disable-next-line no-shadow
3419
3419
  var Action;
3420
3420
  (function (Action) {
3421
3421
  /**
@@ -3960,7 +3960,7 @@ var Action;
3960
3960
  * The Favorites icon (*) for Answers,
3961
3961
  * Liveboard, and data objects like Worksheet, Model,
3962
3962
  * Tables and Views.
3963
- * Allows adding an object to the users favorites list.
3963
+ * Allows adding an object to the user's favorites list.
3964
3964
  * @example
3965
3965
  * ```js
3966
3966
  * disabledActions: [Action.AddToFavorites]
@@ -4687,6 +4687,26 @@ var ContextMenuTriggerOptions;
4687
4687
  ContextMenuTriggerOptions["RIGHT_CLICK"] = "right-click";
4688
4688
  ContextMenuTriggerOptions["BOTH_CLICKS"] = "both-clicks";
4689
4689
  })(ContextMenuTriggerOptions || (ContextMenuTriggerOptions = {}));
4690
+ /**
4691
+ * Enum options to show custom actions at different
4692
+ * positions in the application.
4693
+ */
4694
+ var CustomActionsPosition;
4695
+ (function (CustomActionsPosition) {
4696
+ CustomActionsPosition["PRIMARY"] = "PRIMARY";
4697
+ CustomActionsPosition["MENU"] = "MENU";
4698
+ CustomActionsPosition["CONTEXTMENU"] = "CONTEXTMENU";
4699
+ })(CustomActionsPosition || (CustomActionsPosition = {}));
4700
+ /**
4701
+ * Enum options to mention the target of the custom action.
4702
+ */
4703
+ var CustomActionTarget;
4704
+ (function (CustomActionTarget) {
4705
+ CustomActionTarget["LIVEBOARD"] = "LIVEBOARD";
4706
+ CustomActionTarget["VIZ"] = "VIZ";
4707
+ CustomActionTarget["ANSWER"] = "ANSWER";
4708
+ CustomActionTarget["SPOTTER"] = "SPOTTER";
4709
+ })(CustomActionTarget || (CustomActionTarget = {}));
4690
4710
  /**
4691
4711
  * Enum options to show or suppress Visual Embed SDK and
4692
4712
  * ThoughtSpot application logs in the console output.
@@ -5843,8 +5863,8 @@ function cacheHas(cache, key) {
5843
5863
  var _cacheHas = cacheHas;
5844
5864
 
5845
5865
  /** Used to compose bitmasks for value comparisons. */
5846
- var COMPARE_PARTIAL_FLAG$3 = 1,
5847
- COMPARE_UNORDERED_FLAG$1 = 2;
5866
+ var COMPARE_PARTIAL_FLAG$5 = 1,
5867
+ COMPARE_UNORDERED_FLAG$3 = 2;
5848
5868
 
5849
5869
  /**
5850
5870
  * A specialized version of `baseIsEqualDeep` for arrays with support for
@@ -5860,7 +5880,7 @@ var COMPARE_PARTIAL_FLAG$3 = 1,
5860
5880
  * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
5861
5881
  */
5862
5882
  function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
5863
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
5883
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5,
5864
5884
  arrLength = array.length,
5865
5885
  othLength = other.length;
5866
5886
 
@@ -5875,7 +5895,7 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
5875
5895
  }
5876
5896
  var index = -1,
5877
5897
  result = true,
5878
- seen = (bitmask & COMPARE_UNORDERED_FLAG$1) ? new _SetCache : undefined;
5898
+ seen = (bitmask & COMPARE_UNORDERED_FLAG$3) ? new _SetCache : undefined;
5879
5899
 
5880
5900
  stack.set(array, other);
5881
5901
  stack.set(other, array);
@@ -5967,8 +5987,8 @@ function setToArray(set) {
5967
5987
  var _setToArray = setToArray;
5968
5988
 
5969
5989
  /** Used to compose bitmasks for value comparisons. */
5970
- var COMPARE_PARTIAL_FLAG$2 = 1,
5971
- COMPARE_UNORDERED_FLAG = 2;
5990
+ var COMPARE_PARTIAL_FLAG$4 = 1,
5991
+ COMPARE_UNORDERED_FLAG$2 = 2;
5972
5992
 
5973
5993
  /** `Object#toString` result references. */
5974
5994
  var boolTag$1 = '[object Boolean]',
@@ -5979,14 +5999,14 @@ var boolTag$1 = '[object Boolean]',
5979
5999
  regexpTag$1 = '[object RegExp]',
5980
6000
  setTag$3 = '[object Set]',
5981
6001
  stringTag$1 = '[object String]',
5982
- symbolTag = '[object Symbol]';
6002
+ symbolTag$1 = '[object Symbol]';
5983
6003
 
5984
6004
  var arrayBufferTag$1 = '[object ArrayBuffer]',
5985
6005
  dataViewTag$2 = '[object DataView]';
5986
6006
 
5987
6007
  /** Used to convert symbols to primitives and strings. */
5988
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
5989
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
6008
+ var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined,
6009
+ symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
5990
6010
 
5991
6011
  /**
5992
6012
  * A specialized version of `baseIsEqualDeep` for comparing objects of
@@ -6043,7 +6063,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
6043
6063
  var convert = _mapToArray;
6044
6064
 
6045
6065
  case setTag$3:
6046
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
6066
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
6047
6067
  convert || (convert = _setToArray);
6048
6068
 
6049
6069
  if (object.size != other.size && !isPartial) {
@@ -6054,7 +6074,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
6054
6074
  if (stacked) {
6055
6075
  return stacked == other;
6056
6076
  }
6057
- bitmask |= COMPARE_UNORDERED_FLAG;
6077
+ bitmask |= COMPARE_UNORDERED_FLAG$2;
6058
6078
 
6059
6079
  // Recursively compare objects (susceptible to call stack limits).
6060
6080
  stack.set(object, other);
@@ -6062,7 +6082,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
6062
6082
  stack['delete'](object);
6063
6083
  return result;
6064
6084
 
6065
- case symbolTag:
6085
+ case symbolTag$1:
6066
6086
  if (symbolValueOf) {
6067
6087
  return symbolValueOf.call(object) == symbolValueOf.call(other);
6068
6088
  }
@@ -6753,7 +6773,7 @@ function getAllKeys(object) {
6753
6773
  var _getAllKeys = getAllKeys;
6754
6774
 
6755
6775
  /** Used to compose bitmasks for value comparisons. */
6756
- var COMPARE_PARTIAL_FLAG$1 = 1;
6776
+ var COMPARE_PARTIAL_FLAG$3 = 1;
6757
6777
 
6758
6778
  /** Used for built-in method references. */
6759
6779
  var objectProto$2 = Object.prototype;
@@ -6775,7 +6795,7 @@ var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
6775
6795
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
6776
6796
  */
6777
6797
  function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
6778
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
6798
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
6779
6799
  objProps = _getAllKeys(object),
6780
6800
  objLength = objProps.length,
6781
6801
  othProps = _getAllKeys(other),
@@ -6913,7 +6933,7 @@ if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||
6913
6933
  var _getTag = getTag;
6914
6934
 
6915
6935
  /** Used to compose bitmasks for value comparisons. */
6916
- var COMPARE_PARTIAL_FLAG = 1;
6936
+ var COMPARE_PARTIAL_FLAG$2 = 1;
6917
6937
 
6918
6938
  /** `Object#toString` result references. */
6919
6939
  var argsTag = '[object Arguments]',
@@ -6966,7 +6986,7 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
6966
6986
  ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
6967
6987
  : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
6968
6988
  }
6969
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
6989
+ if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
6970
6990
  var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, '__wrapped__'),
6971
6991
  othIsWrapped = othIsObj && hasOwnProperty$2.call(other, '__wrapped__');
6972
6992
 
@@ -7136,6 +7156,17 @@ const ERROR_MESSAGE = {
7136
7156
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
7137
7157
  RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
7138
7158
  SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7159
+ };
7160
+ const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7161
+ INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
7162
+ MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
7163
+ UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
7164
+ INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
7165
+ MULTIPLE_PRIMARY_ACTIONS: (targetType, existingName, newName) => `Multiple primary actions found for ${targetType.toLowerCase()}-level custom actions: '${existingName}' and '${newName}'. Only the first action will be shown.`,
7166
+ INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
7167
+ INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
7168
+ INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
7169
+ DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
7139
7170
  };
7140
7171
 
7141
7172
  const EndPoints = {
@@ -7984,145 +8015,1587 @@ class AnswerService {
7984
8015
  if (columnsToAdd.length) {
7985
8016
  await unaggAnswerSession.addColumns(columnsToAdd);
7986
8017
  }
7987
- const columnsToRemove = [...currentColumns].filter((col) => !ouputColumnGuids.has(col));
7988
- if (columnsToRemove.length) {
7989
- await unaggAnswerSession.removeColumns(columnsToRemove);
8018
+ const columnsToRemove = [...currentColumns].filter((col) => !ouputColumnGuids.has(col));
8019
+ if (columnsToRemove.length) {
8020
+ await unaggAnswerSession.removeColumns(columnsToRemove);
8021
+ }
8022
+ return unaggAnswerSession;
8023
+ }
8024
+ /**
8025
+ * Execute a custom graphql query in the context of the answer.
8026
+ * @param query graphql query
8027
+ * @param variables graphql variables
8028
+ * @returns
8029
+ */
8030
+ async executeQuery(query, variables) {
8031
+ const data = await graphqlQuery({
8032
+ query,
8033
+ variables: {
8034
+ session: this.session,
8035
+ ...variables,
8036
+ },
8037
+ thoughtSpotHost: this.thoughtSpotHost,
8038
+ isCompositeQuery: false,
8039
+ });
8040
+ this.session = deepMerge(this.session, (data === null || data === void 0 ? void 0 : data.id) || {});
8041
+ return data;
8042
+ }
8043
+ /**
8044
+ * Get the internal session details for the answer.
8045
+ * @returns
8046
+ */
8047
+ getSession() {
8048
+ return this.session;
8049
+ }
8050
+ async getAnswer() {
8051
+ if (this.answer) {
8052
+ return this.answer;
8053
+ }
8054
+ this.answer = this.executeQuery(getAnswer, {}).then((data) => data === null || data === void 0 ? void 0 : data.answer);
8055
+ return this.answer;
8056
+ }
8057
+ async getTML() {
8058
+ const { object } = await this.executeQuery(getAnswerTML, {});
8059
+ const edoc = object[0].edoc;
8060
+ const YAML = await import('./index-Dx5UP5Ip.js');
8061
+ const parsedDoc = YAML.parse(edoc);
8062
+ return {
8063
+ answer: {
8064
+ ...parsedDoc.answer,
8065
+ ...this.tmlOverride,
8066
+ },
8067
+ };
8068
+ }
8069
+ async addDisplayedVizToLiveboard(liveboardId) {
8070
+ const { displayMode, visualizations } = await this.getAnswer();
8071
+ const viz = getDisplayedViz(visualizations, displayMode);
8072
+ return this.executeQuery(addVizToLiveboard, {
8073
+ liveboardId,
8074
+ vizId: viz.id,
8075
+ });
8076
+ }
8077
+ setTMLOverride(override) {
8078
+ this.tmlOverride = override;
8079
+ }
8080
+ }
8081
+ /**
8082
+ *
8083
+ * @param sourceDetail
8084
+ * @param colNames
8085
+ */
8086
+ function getGuidsFromColumnNames(sourceDetail, colNames) {
8087
+ const cols = sourceDetail.columns.reduce((colSet, col) => {
8088
+ colSet[col.name.toLowerCase()] = col;
8089
+ return colSet;
8090
+ }, {});
8091
+ return new Set(colNames.map((colName) => {
8092
+ const col = cols[colName.toLowerCase()];
8093
+ return col.id;
8094
+ }));
8095
+ }
8096
+ /**
8097
+ *
8098
+ * @param selectedPoints
8099
+ */
8100
+ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
8101
+ const underlyingDataPoint = [];
8102
+ /**
8103
+ *
8104
+ * @param colVal
8105
+ */
8106
+ function addPointFromColVal(colVal) {
8107
+ var _a;
8108
+ const dataType = colVal.column.dataType;
8109
+ colVal.column.id;
8110
+ let dataValue;
8111
+ if (dataType === 'DATE') {
8112
+ if (Number.isFinite(colVal.value)) {
8113
+ dataValue = [{
8114
+ epochRange: {
8115
+ startEpoch: colVal.value,
8116
+ },
8117
+ }];
8118
+ // Case for custom calendar.
8119
+ }
8120
+ else if ((_a = colVal.value) === null || _a === void 0 ? void 0 : _a.v) {
8121
+ dataValue = [{
8122
+ epochRange: {
8123
+ startEpoch: colVal.value.v.s,
8124
+ endEpoch: colVal.value.v.e,
8125
+ },
8126
+ }];
8127
+ }
8128
+ }
8129
+ else {
8130
+ dataValue = [{ value: colVal.value }];
8131
+ }
8132
+ underlyingDataPoint.push({
8133
+ columnId: colVal.column.id,
8134
+ dataValue,
8135
+ });
8136
+ }
8137
+ selectedPoints.forEach((p) => {
8138
+ p.selectedAttributes.forEach(addPointFromColVal);
8139
+ });
8140
+ return underlyingDataPoint;
8141
+ }
8142
+ /**
8143
+ *
8144
+ * @param visualizations
8145
+ * @param displayMode
8146
+ */
8147
+ function getDisplayedViz(visualizations, displayMode) {
8148
+ if (displayMode === 'CHART_MODE') {
8149
+ return visualizations.find(
8150
+ // eslint-disable-next-line no-underscore-dangle
8151
+ (viz) => viz.__typename === 'ChartViz');
8152
+ }
8153
+ return visualizations.find(
8154
+ // eslint-disable-next-line no-underscore-dangle
8155
+ (viz) => viz.__typename === 'TableViz');
8156
+ }
8157
+
8158
+ /** Built-in value references. */
8159
+ var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined;
8160
+
8161
+ /**
8162
+ * Checks if `value` is a flattenable `arguments` object or array.
8163
+ *
8164
+ * @private
8165
+ * @param {*} value The value to check.
8166
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
8167
+ */
8168
+ function isFlattenable(value) {
8169
+ return isArray_1(value) || isArguments_1(value) ||
8170
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
8171
+ }
8172
+
8173
+ var _isFlattenable = isFlattenable;
8174
+
8175
+ /**
8176
+ * The base implementation of `_.flatten` with support for restricting flattening.
8177
+ *
8178
+ * @private
8179
+ * @param {Array} array The array to flatten.
8180
+ * @param {number} depth The maximum recursion depth.
8181
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
8182
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
8183
+ * @param {Array} [result=[]] The initial result value.
8184
+ * @returns {Array} Returns the new flattened array.
8185
+ */
8186
+ function baseFlatten(array, depth, predicate, isStrict, result) {
8187
+ var index = -1,
8188
+ length = array.length;
8189
+
8190
+ predicate || (predicate = _isFlattenable);
8191
+ result || (result = []);
8192
+
8193
+ while (++index < length) {
8194
+ var value = array[index];
8195
+ if (depth > 0 && predicate(value)) {
8196
+ if (depth > 1) {
8197
+ // Recursively flatten arrays (susceptible to call stack limits).
8198
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
8199
+ } else {
8200
+ _arrayPush(result, value);
8201
+ }
8202
+ } else if (!isStrict) {
8203
+ result[result.length] = value;
8204
+ }
8205
+ }
8206
+ return result;
8207
+ }
8208
+
8209
+ var _baseFlatten = baseFlatten;
8210
+
8211
+ /**
8212
+ * A specialized version of `_.map` for arrays without support for iteratee
8213
+ * shorthands.
8214
+ *
8215
+ * @private
8216
+ * @param {Array} [array] The array to iterate over.
8217
+ * @param {Function} iteratee The function invoked per iteration.
8218
+ * @returns {Array} Returns the new mapped array.
8219
+ */
8220
+ function arrayMap(array, iteratee) {
8221
+ var index = -1,
8222
+ length = array == null ? 0 : array.length,
8223
+ result = Array(length);
8224
+
8225
+ while (++index < length) {
8226
+ result[index] = iteratee(array[index], index, array);
8227
+ }
8228
+ return result;
8229
+ }
8230
+
8231
+ var _arrayMap = arrayMap;
8232
+
8233
+ /** `Object#toString` result references. */
8234
+ var symbolTag = '[object Symbol]';
8235
+
8236
+ /**
8237
+ * Checks if `value` is classified as a `Symbol` primitive or object.
8238
+ *
8239
+ * @static
8240
+ * @memberOf _
8241
+ * @since 4.0.0
8242
+ * @category Lang
8243
+ * @param {*} value The value to check.
8244
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
8245
+ * @example
8246
+ *
8247
+ * _.isSymbol(Symbol.iterator);
8248
+ * // => true
8249
+ *
8250
+ * _.isSymbol('abc');
8251
+ * // => false
8252
+ */
8253
+ function isSymbol(value) {
8254
+ return typeof value == 'symbol' ||
8255
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
8256
+ }
8257
+
8258
+ var isSymbol_1 = isSymbol;
8259
+
8260
+ /** Used to match property names within property paths. */
8261
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
8262
+ reIsPlainProp = /^\w*$/;
8263
+
8264
+ /**
8265
+ * Checks if `value` is a property name and not a property path.
8266
+ *
8267
+ * @private
8268
+ * @param {*} value The value to check.
8269
+ * @param {Object} [object] The object to query keys on.
8270
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
8271
+ */
8272
+ function isKey(value, object) {
8273
+ if (isArray_1(value)) {
8274
+ return false;
8275
+ }
8276
+ var type = typeof value;
8277
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
8278
+ value == null || isSymbol_1(value)) {
8279
+ return true;
8280
+ }
8281
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
8282
+ (object != null && value in Object(object));
8283
+ }
8284
+
8285
+ var _isKey = isKey;
8286
+
8287
+ /** Error message constants. */
8288
+ var FUNC_ERROR_TEXT = 'Expected a function';
8289
+
8290
+ /**
8291
+ * Creates a function that memoizes the result of `func`. If `resolver` is
8292
+ * provided, it determines the cache key for storing the result based on the
8293
+ * arguments provided to the memoized function. By default, the first argument
8294
+ * provided to the memoized function is used as the map cache key. The `func`
8295
+ * is invoked with the `this` binding of the memoized function.
8296
+ *
8297
+ * **Note:** The cache is exposed as the `cache` property on the memoized
8298
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
8299
+ * constructor with one whose instances implement the
8300
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
8301
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
8302
+ *
8303
+ * @static
8304
+ * @memberOf _
8305
+ * @since 0.1.0
8306
+ * @category Function
8307
+ * @param {Function} func The function to have its output memoized.
8308
+ * @param {Function} [resolver] The function to resolve the cache key.
8309
+ * @returns {Function} Returns the new memoized function.
8310
+ * @example
8311
+ *
8312
+ * var object = { 'a': 1, 'b': 2 };
8313
+ * var other = { 'c': 3, 'd': 4 };
8314
+ *
8315
+ * var values = _.memoize(_.values);
8316
+ * values(object);
8317
+ * // => [1, 2]
8318
+ *
8319
+ * values(other);
8320
+ * // => [3, 4]
8321
+ *
8322
+ * object.a = 2;
8323
+ * values(object);
8324
+ * // => [1, 2]
8325
+ *
8326
+ * // Modify the result cache.
8327
+ * values.cache.set(object, ['a', 'b']);
8328
+ * values(object);
8329
+ * // => ['a', 'b']
8330
+ *
8331
+ * // Replace `_.memoize.Cache`.
8332
+ * _.memoize.Cache = WeakMap;
8333
+ */
8334
+ function memoize(func, resolver) {
8335
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
8336
+ throw new TypeError(FUNC_ERROR_TEXT);
8337
+ }
8338
+ var memoized = function() {
8339
+ var args = arguments,
8340
+ key = resolver ? resolver.apply(this, args) : args[0],
8341
+ cache = memoized.cache;
8342
+
8343
+ if (cache.has(key)) {
8344
+ return cache.get(key);
8345
+ }
8346
+ var result = func.apply(this, args);
8347
+ memoized.cache = cache.set(key, result) || cache;
8348
+ return result;
8349
+ };
8350
+ memoized.cache = new (memoize.Cache || _MapCache);
8351
+ return memoized;
8352
+ }
8353
+
8354
+ // Expose `MapCache`.
8355
+ memoize.Cache = _MapCache;
8356
+
8357
+ var memoize_1 = memoize;
8358
+
8359
+ /** Used as the maximum memoize cache size. */
8360
+ var MAX_MEMOIZE_SIZE = 500;
8361
+
8362
+ /**
8363
+ * A specialized version of `_.memoize` which clears the memoized function's
8364
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
8365
+ *
8366
+ * @private
8367
+ * @param {Function} func The function to have its output memoized.
8368
+ * @returns {Function} Returns the new memoized function.
8369
+ */
8370
+ function memoizeCapped(func) {
8371
+ var result = memoize_1(func, function(key) {
8372
+ if (cache.size === MAX_MEMOIZE_SIZE) {
8373
+ cache.clear();
8374
+ }
8375
+ return key;
8376
+ });
8377
+
8378
+ var cache = result.cache;
8379
+ return result;
8380
+ }
8381
+
8382
+ var _memoizeCapped = memoizeCapped;
8383
+
8384
+ /** Used to match property names within property paths. */
8385
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
8386
+
8387
+ /** Used to match backslashes in property paths. */
8388
+ var reEscapeChar = /\\(\\)?/g;
8389
+
8390
+ /**
8391
+ * Converts `string` to a property path array.
8392
+ *
8393
+ * @private
8394
+ * @param {string} string The string to convert.
8395
+ * @returns {Array} Returns the property path array.
8396
+ */
8397
+ var stringToPath = _memoizeCapped(function(string) {
8398
+ var result = [];
8399
+ if (string.charCodeAt(0) === 46 /* . */) {
8400
+ result.push('');
8401
+ }
8402
+ string.replace(rePropName, function(match, number, quote, subString) {
8403
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
8404
+ });
8405
+ return result;
8406
+ });
8407
+
8408
+ var _stringToPath = stringToPath;
8409
+
8410
+ /** Used as references for various `Number` constants. */
8411
+ var INFINITY$1 = 1 / 0;
8412
+
8413
+ /** Used to convert symbols to primitives and strings. */
8414
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
8415
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
8416
+
8417
+ /**
8418
+ * The base implementation of `_.toString` which doesn't convert nullish
8419
+ * values to empty strings.
8420
+ *
8421
+ * @private
8422
+ * @param {*} value The value to process.
8423
+ * @returns {string} Returns the string.
8424
+ */
8425
+ function baseToString(value) {
8426
+ // Exit early for strings to avoid a performance hit in some environments.
8427
+ if (typeof value == 'string') {
8428
+ return value;
8429
+ }
8430
+ if (isArray_1(value)) {
8431
+ // Recursively convert values (susceptible to call stack limits).
8432
+ return _arrayMap(value, baseToString) + '';
8433
+ }
8434
+ if (isSymbol_1(value)) {
8435
+ return symbolToString ? symbolToString.call(value) : '';
8436
+ }
8437
+ var result = (value + '');
8438
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
8439
+ }
8440
+
8441
+ var _baseToString = baseToString;
8442
+
8443
+ /**
8444
+ * Converts `value` to a string. An empty string is returned for `null`
8445
+ * and `undefined` values. The sign of `-0` is preserved.
8446
+ *
8447
+ * @static
8448
+ * @memberOf _
8449
+ * @since 4.0.0
8450
+ * @category Lang
8451
+ * @param {*} value The value to convert.
8452
+ * @returns {string} Returns the converted string.
8453
+ * @example
8454
+ *
8455
+ * _.toString(null);
8456
+ * // => ''
8457
+ *
8458
+ * _.toString(-0);
8459
+ * // => '-0'
8460
+ *
8461
+ * _.toString([1, 2, 3]);
8462
+ * // => '1,2,3'
8463
+ */
8464
+ function toString$1(value) {
8465
+ return value == null ? '' : _baseToString(value);
8466
+ }
8467
+
8468
+ var toString_1 = toString$1;
8469
+
8470
+ /**
8471
+ * Casts `value` to a path array if it's not one.
8472
+ *
8473
+ * @private
8474
+ * @param {*} value The value to inspect.
8475
+ * @param {Object} [object] The object to query keys on.
8476
+ * @returns {Array} Returns the cast property path array.
8477
+ */
8478
+ function castPath(value, object) {
8479
+ if (isArray_1(value)) {
8480
+ return value;
8481
+ }
8482
+ return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
8483
+ }
8484
+
8485
+ var _castPath = castPath;
8486
+
8487
+ /** Used as references for various `Number` constants. */
8488
+ var INFINITY = 1 / 0;
8489
+
8490
+ /**
8491
+ * Converts `value` to a string key if it's not a string or symbol.
8492
+ *
8493
+ * @private
8494
+ * @param {*} value The value to inspect.
8495
+ * @returns {string|symbol} Returns the key.
8496
+ */
8497
+ function toKey(value) {
8498
+ if (typeof value == 'string' || isSymbol_1(value)) {
8499
+ return value;
8500
+ }
8501
+ var result = (value + '');
8502
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
8503
+ }
8504
+
8505
+ var _toKey = toKey;
8506
+
8507
+ /**
8508
+ * The base implementation of `_.get` without support for default values.
8509
+ *
8510
+ * @private
8511
+ * @param {Object} object The object to query.
8512
+ * @param {Array|string} path The path of the property to get.
8513
+ * @returns {*} Returns the resolved value.
8514
+ */
8515
+ function baseGet(object, path) {
8516
+ path = _castPath(path, object);
8517
+
8518
+ var index = 0,
8519
+ length = path.length;
8520
+
8521
+ while (object != null && index < length) {
8522
+ object = object[_toKey(path[index++])];
8523
+ }
8524
+ return (index && index == length) ? object : undefined;
8525
+ }
8526
+
8527
+ var _baseGet = baseGet;
8528
+
8529
+ /** Used to compose bitmasks for value comparisons. */
8530
+ var COMPARE_PARTIAL_FLAG$1 = 1,
8531
+ COMPARE_UNORDERED_FLAG$1 = 2;
8532
+
8533
+ /**
8534
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
8535
+ *
8536
+ * @private
8537
+ * @param {Object} object The object to inspect.
8538
+ * @param {Object} source The object of property values to match.
8539
+ * @param {Array} matchData The property names, values, and compare flags to match.
8540
+ * @param {Function} [customizer] The function to customize comparisons.
8541
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
8542
+ */
8543
+ function baseIsMatch(object, source, matchData, customizer) {
8544
+ var index = matchData.length,
8545
+ length = index,
8546
+ noCustomizer = !customizer;
8547
+
8548
+ if (object == null) {
8549
+ return !length;
8550
+ }
8551
+ object = Object(object);
8552
+ while (index--) {
8553
+ var data = matchData[index];
8554
+ if ((noCustomizer && data[2])
8555
+ ? data[1] !== object[data[0]]
8556
+ : !(data[0] in object)
8557
+ ) {
8558
+ return false;
8559
+ }
8560
+ }
8561
+ while (++index < length) {
8562
+ data = matchData[index];
8563
+ var key = data[0],
8564
+ objValue = object[key],
8565
+ srcValue = data[1];
8566
+
8567
+ if (noCustomizer && data[2]) {
8568
+ if (objValue === undefined && !(key in object)) {
8569
+ return false;
8570
+ }
8571
+ } else {
8572
+ var stack = new _Stack;
8573
+ if (customizer) {
8574
+ var result = customizer(objValue, srcValue, key, object, source, stack);
8575
+ }
8576
+ if (!(result === undefined
8577
+ ? _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack)
8578
+ : result
8579
+ )) {
8580
+ return false;
8581
+ }
8582
+ }
8583
+ }
8584
+ return true;
8585
+ }
8586
+
8587
+ var _baseIsMatch = baseIsMatch;
8588
+
8589
+ /**
8590
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
8591
+ *
8592
+ * @private
8593
+ * @param {*} value The value to check.
8594
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
8595
+ * equality comparisons, else `false`.
8596
+ */
8597
+ function isStrictComparable(value) {
8598
+ return value === value && !isObject_1(value);
8599
+ }
8600
+
8601
+ var _isStrictComparable = isStrictComparable;
8602
+
8603
+ /**
8604
+ * Gets the property names, values, and compare flags of `object`.
8605
+ *
8606
+ * @private
8607
+ * @param {Object} object The object to query.
8608
+ * @returns {Array} Returns the match data of `object`.
8609
+ */
8610
+ function getMatchData(object) {
8611
+ var result = keys_1(object),
8612
+ length = result.length;
8613
+
8614
+ while (length--) {
8615
+ var key = result[length],
8616
+ value = object[key];
8617
+
8618
+ result[length] = [key, value, _isStrictComparable(value)];
8619
+ }
8620
+ return result;
8621
+ }
8622
+
8623
+ var _getMatchData = getMatchData;
8624
+
8625
+ /**
8626
+ * A specialized version of `matchesProperty` for source values suitable
8627
+ * for strict equality comparisons, i.e. `===`.
8628
+ *
8629
+ * @private
8630
+ * @param {string} key The key of the property to get.
8631
+ * @param {*} srcValue The value to match.
8632
+ * @returns {Function} Returns the new spec function.
8633
+ */
8634
+ function matchesStrictComparable(key, srcValue) {
8635
+ return function(object) {
8636
+ if (object == null) {
8637
+ return false;
8638
+ }
8639
+ return object[key] === srcValue &&
8640
+ (srcValue !== undefined || (key in Object(object)));
8641
+ };
8642
+ }
8643
+
8644
+ var _matchesStrictComparable = matchesStrictComparable;
8645
+
8646
+ /**
8647
+ * The base implementation of `_.matches` which doesn't clone `source`.
8648
+ *
8649
+ * @private
8650
+ * @param {Object} source The object of property values to match.
8651
+ * @returns {Function} Returns the new spec function.
8652
+ */
8653
+ function baseMatches(source) {
8654
+ var matchData = _getMatchData(source);
8655
+ if (matchData.length == 1 && matchData[0][2]) {
8656
+ return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
8657
+ }
8658
+ return function(object) {
8659
+ return object === source || _baseIsMatch(object, source, matchData);
8660
+ };
8661
+ }
8662
+
8663
+ var _baseMatches = baseMatches;
8664
+
8665
+ /**
8666
+ * Gets the value at `path` of `object`. If the resolved value is
8667
+ * `undefined`, the `defaultValue` is returned in its place.
8668
+ *
8669
+ * @static
8670
+ * @memberOf _
8671
+ * @since 3.7.0
8672
+ * @category Object
8673
+ * @param {Object} object The object to query.
8674
+ * @param {Array|string} path The path of the property to get.
8675
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
8676
+ * @returns {*} Returns the resolved value.
8677
+ * @example
8678
+ *
8679
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
8680
+ *
8681
+ * _.get(object, 'a[0].b.c');
8682
+ * // => 3
8683
+ *
8684
+ * _.get(object, ['a', '0', 'b', 'c']);
8685
+ * // => 3
8686
+ *
8687
+ * _.get(object, 'a.b.c', 'default');
8688
+ * // => 'default'
8689
+ */
8690
+ function get(object, path, defaultValue) {
8691
+ var result = object == null ? undefined : _baseGet(object, path);
8692
+ return result === undefined ? defaultValue : result;
8693
+ }
8694
+
8695
+ var get_1 = get;
8696
+
8697
+ /**
8698
+ * The base implementation of `_.hasIn` without support for deep paths.
8699
+ *
8700
+ * @private
8701
+ * @param {Object} [object] The object to query.
8702
+ * @param {Array|string} key The key to check.
8703
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
8704
+ */
8705
+ function baseHasIn(object, key) {
8706
+ return object != null && key in Object(object);
8707
+ }
8708
+
8709
+ var _baseHasIn = baseHasIn;
8710
+
8711
+ /**
8712
+ * Checks if `path` exists on `object`.
8713
+ *
8714
+ * @private
8715
+ * @param {Object} object The object to query.
8716
+ * @param {Array|string} path The path to check.
8717
+ * @param {Function} hasFunc The function to check properties.
8718
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
8719
+ */
8720
+ function hasPath(object, path, hasFunc) {
8721
+ path = _castPath(path, object);
8722
+
8723
+ var index = -1,
8724
+ length = path.length,
8725
+ result = false;
8726
+
8727
+ while (++index < length) {
8728
+ var key = _toKey(path[index]);
8729
+ if (!(result = object != null && hasFunc(object, key))) {
8730
+ break;
8731
+ }
8732
+ object = object[key];
8733
+ }
8734
+ if (result || ++index != length) {
8735
+ return result;
8736
+ }
8737
+ length = object == null ? 0 : object.length;
8738
+ return !!length && isLength_1(length) && _isIndex(key, length) &&
8739
+ (isArray_1(object) || isArguments_1(object));
8740
+ }
8741
+
8742
+ var _hasPath = hasPath;
8743
+
8744
+ /**
8745
+ * Checks if `path` is a direct or inherited property of `object`.
8746
+ *
8747
+ * @static
8748
+ * @memberOf _
8749
+ * @since 4.0.0
8750
+ * @category Object
8751
+ * @param {Object} object The object to query.
8752
+ * @param {Array|string} path The path to check.
8753
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
8754
+ * @example
8755
+ *
8756
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
8757
+ *
8758
+ * _.hasIn(object, 'a');
8759
+ * // => true
8760
+ *
8761
+ * _.hasIn(object, 'a.b');
8762
+ * // => true
8763
+ *
8764
+ * _.hasIn(object, ['a', 'b']);
8765
+ * // => true
8766
+ *
8767
+ * _.hasIn(object, 'b');
8768
+ * // => false
8769
+ */
8770
+ function hasIn(object, path) {
8771
+ return object != null && _hasPath(object, path, _baseHasIn);
8772
+ }
8773
+
8774
+ var hasIn_1 = hasIn;
8775
+
8776
+ /** Used to compose bitmasks for value comparisons. */
8777
+ var COMPARE_PARTIAL_FLAG = 1,
8778
+ COMPARE_UNORDERED_FLAG = 2;
8779
+
8780
+ /**
8781
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
8782
+ *
8783
+ * @private
8784
+ * @param {string} path The path of the property to get.
8785
+ * @param {*} srcValue The value to match.
8786
+ * @returns {Function} Returns the new spec function.
8787
+ */
8788
+ function baseMatchesProperty(path, srcValue) {
8789
+ if (_isKey(path) && _isStrictComparable(srcValue)) {
8790
+ return _matchesStrictComparable(_toKey(path), srcValue);
8791
+ }
8792
+ return function(object) {
8793
+ var objValue = get_1(object, path);
8794
+ return (objValue === undefined && objValue === srcValue)
8795
+ ? hasIn_1(object, path)
8796
+ : _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
8797
+ };
8798
+ }
8799
+
8800
+ var _baseMatchesProperty = baseMatchesProperty;
8801
+
8802
+ /**
8803
+ * This method returns the first argument it receives.
8804
+ *
8805
+ * @static
8806
+ * @since 0.1.0
8807
+ * @memberOf _
8808
+ * @category Util
8809
+ * @param {*} value Any value.
8810
+ * @returns {*} Returns `value`.
8811
+ * @example
8812
+ *
8813
+ * var object = { 'a': 1 };
8814
+ *
8815
+ * console.log(_.identity(object) === object);
8816
+ * // => true
8817
+ */
8818
+ function identity(value) {
8819
+ return value;
8820
+ }
8821
+
8822
+ var identity_1 = identity;
8823
+
8824
+ /**
8825
+ * The base implementation of `_.property` without support for deep paths.
8826
+ *
8827
+ * @private
8828
+ * @param {string} key The key of the property to get.
8829
+ * @returns {Function} Returns the new accessor function.
8830
+ */
8831
+ function baseProperty(key) {
8832
+ return function(object) {
8833
+ return object == null ? undefined : object[key];
8834
+ };
8835
+ }
8836
+
8837
+ var _baseProperty = baseProperty;
8838
+
8839
+ /**
8840
+ * A specialized version of `baseProperty` which supports deep paths.
8841
+ *
8842
+ * @private
8843
+ * @param {Array|string} path The path of the property to get.
8844
+ * @returns {Function} Returns the new accessor function.
8845
+ */
8846
+ function basePropertyDeep(path) {
8847
+ return function(object) {
8848
+ return _baseGet(object, path);
8849
+ };
8850
+ }
8851
+
8852
+ var _basePropertyDeep = basePropertyDeep;
8853
+
8854
+ /**
8855
+ * Creates a function that returns the value at `path` of a given object.
8856
+ *
8857
+ * @static
8858
+ * @memberOf _
8859
+ * @since 2.4.0
8860
+ * @category Util
8861
+ * @param {Array|string} path The path of the property to get.
8862
+ * @returns {Function} Returns the new accessor function.
8863
+ * @example
8864
+ *
8865
+ * var objects = [
8866
+ * { 'a': { 'b': 2 } },
8867
+ * { 'a': { 'b': 1 } }
8868
+ * ];
8869
+ *
8870
+ * _.map(objects, _.property('a.b'));
8871
+ * // => [2, 1]
8872
+ *
8873
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
8874
+ * // => [1, 2]
8875
+ */
8876
+ function property(path) {
8877
+ return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path);
8878
+ }
8879
+
8880
+ var property_1 = property;
8881
+
8882
+ /**
8883
+ * The base implementation of `_.iteratee`.
8884
+ *
8885
+ * @private
8886
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
8887
+ * @returns {Function} Returns the iteratee.
8888
+ */
8889
+ function baseIteratee(value) {
8890
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
8891
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
8892
+ if (typeof value == 'function') {
8893
+ return value;
8894
+ }
8895
+ if (value == null) {
8896
+ return identity_1;
8897
+ }
8898
+ if (typeof value == 'object') {
8899
+ return isArray_1(value)
8900
+ ? _baseMatchesProperty(value[0], value[1])
8901
+ : _baseMatches(value);
8902
+ }
8903
+ return property_1(value);
8904
+ }
8905
+
8906
+ var _baseIteratee = baseIteratee;
8907
+
8908
+ /**
8909
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
8910
+ *
8911
+ * @private
8912
+ * @param {boolean} [fromRight] Specify iterating from right to left.
8913
+ * @returns {Function} Returns the new base function.
8914
+ */
8915
+ function createBaseFor(fromRight) {
8916
+ return function(object, iteratee, keysFunc) {
8917
+ var index = -1,
8918
+ iterable = Object(object),
8919
+ props = keysFunc(object),
8920
+ length = props.length;
8921
+
8922
+ while (length--) {
8923
+ var key = props[fromRight ? length : ++index];
8924
+ if (iteratee(iterable[key], key, iterable) === false) {
8925
+ break;
8926
+ }
8927
+ }
8928
+ return object;
8929
+ };
8930
+ }
8931
+
8932
+ var _createBaseFor = createBaseFor;
8933
+
8934
+ /**
8935
+ * The base implementation of `baseForOwn` which iterates over `object`
8936
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
8937
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
8938
+ *
8939
+ * @private
8940
+ * @param {Object} object The object to iterate over.
8941
+ * @param {Function} iteratee The function invoked per iteration.
8942
+ * @param {Function} keysFunc The function to get the keys of `object`.
8943
+ * @returns {Object} Returns `object`.
8944
+ */
8945
+ var baseFor = _createBaseFor();
8946
+
8947
+ var _baseFor = baseFor;
8948
+
8949
+ /**
8950
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
8951
+ *
8952
+ * @private
8953
+ * @param {Object} object The object to iterate over.
8954
+ * @param {Function} iteratee The function invoked per iteration.
8955
+ * @returns {Object} Returns `object`.
8956
+ */
8957
+ function baseForOwn(object, iteratee) {
8958
+ return object && _baseFor(object, iteratee, keys_1);
8959
+ }
8960
+
8961
+ var _baseForOwn = baseForOwn;
8962
+
8963
+ /**
8964
+ * Creates a `baseEach` or `baseEachRight` function.
8965
+ *
8966
+ * @private
8967
+ * @param {Function} eachFunc The function to iterate over a collection.
8968
+ * @param {boolean} [fromRight] Specify iterating from right to left.
8969
+ * @returns {Function} Returns the new base function.
8970
+ */
8971
+ function createBaseEach(eachFunc, fromRight) {
8972
+ return function(collection, iteratee) {
8973
+ if (collection == null) {
8974
+ return collection;
8975
+ }
8976
+ if (!isArrayLike_1(collection)) {
8977
+ return eachFunc(collection, iteratee);
8978
+ }
8979
+ var length = collection.length,
8980
+ index = fromRight ? length : -1,
8981
+ iterable = Object(collection);
8982
+
8983
+ while ((fromRight ? index-- : ++index < length)) {
8984
+ if (iteratee(iterable[index], index, iterable) === false) {
8985
+ break;
8986
+ }
8987
+ }
8988
+ return collection;
8989
+ };
8990
+ }
8991
+
8992
+ var _createBaseEach = createBaseEach;
8993
+
8994
+ /**
8995
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
8996
+ *
8997
+ * @private
8998
+ * @param {Array|Object} collection The collection to iterate over.
8999
+ * @param {Function} iteratee The function invoked per iteration.
9000
+ * @returns {Array|Object} Returns `collection`.
9001
+ */
9002
+ var baseEach = _createBaseEach(_baseForOwn);
9003
+
9004
+ var _baseEach = baseEach;
9005
+
9006
+ /**
9007
+ * The base implementation of `_.map` without support for iteratee shorthands.
9008
+ *
9009
+ * @private
9010
+ * @param {Array|Object} collection The collection to iterate over.
9011
+ * @param {Function} iteratee The function invoked per iteration.
9012
+ * @returns {Array} Returns the new mapped array.
9013
+ */
9014
+ function baseMap(collection, iteratee) {
9015
+ var index = -1,
9016
+ result = isArrayLike_1(collection) ? Array(collection.length) : [];
9017
+
9018
+ _baseEach(collection, function(value, key, collection) {
9019
+ result[++index] = iteratee(value, key, collection);
9020
+ });
9021
+ return result;
9022
+ }
9023
+
9024
+ var _baseMap = baseMap;
9025
+
9026
+ /**
9027
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
9028
+ * sort order of `array` and replaces criteria objects with their corresponding
9029
+ * values.
9030
+ *
9031
+ * @private
9032
+ * @param {Array} array The array to sort.
9033
+ * @param {Function} comparer The function to define sort order.
9034
+ * @returns {Array} Returns `array`.
9035
+ */
9036
+ function baseSortBy(array, comparer) {
9037
+ var length = array.length;
9038
+
9039
+ array.sort(comparer);
9040
+ while (length--) {
9041
+ array[length] = array[length].value;
9042
+ }
9043
+ return array;
9044
+ }
9045
+
9046
+ var _baseSortBy = baseSortBy;
9047
+
9048
+ /**
9049
+ * Compares values to sort them in ascending order.
9050
+ *
9051
+ * @private
9052
+ * @param {*} value The value to compare.
9053
+ * @param {*} other The other value to compare.
9054
+ * @returns {number} Returns the sort order indicator for `value`.
9055
+ */
9056
+ function compareAscending(value, other) {
9057
+ if (value !== other) {
9058
+ var valIsDefined = value !== undefined,
9059
+ valIsNull = value === null,
9060
+ valIsReflexive = value === value,
9061
+ valIsSymbol = isSymbol_1(value);
9062
+
9063
+ var othIsDefined = other !== undefined,
9064
+ othIsNull = other === null,
9065
+ othIsReflexive = other === other,
9066
+ othIsSymbol = isSymbol_1(other);
9067
+
9068
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
9069
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
9070
+ (valIsNull && othIsDefined && othIsReflexive) ||
9071
+ (!valIsDefined && othIsReflexive) ||
9072
+ !valIsReflexive) {
9073
+ return 1;
9074
+ }
9075
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
9076
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
9077
+ (othIsNull && valIsDefined && valIsReflexive) ||
9078
+ (!othIsDefined && valIsReflexive) ||
9079
+ !othIsReflexive) {
9080
+ return -1;
9081
+ }
9082
+ }
9083
+ return 0;
9084
+ }
9085
+
9086
+ var _compareAscending = compareAscending;
9087
+
9088
+ /**
9089
+ * Used by `_.orderBy` to compare multiple properties of a value to another
9090
+ * and stable sort them.
9091
+ *
9092
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
9093
+ * specify an order of "desc" for descending or "asc" for ascending sort order
9094
+ * of corresponding values.
9095
+ *
9096
+ * @private
9097
+ * @param {Object} object The object to compare.
9098
+ * @param {Object} other The other object to compare.
9099
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
9100
+ * @returns {number} Returns the sort order indicator for `object`.
9101
+ */
9102
+ function compareMultiple(object, other, orders) {
9103
+ var index = -1,
9104
+ objCriteria = object.criteria,
9105
+ othCriteria = other.criteria,
9106
+ length = objCriteria.length,
9107
+ ordersLength = orders.length;
9108
+
9109
+ while (++index < length) {
9110
+ var result = _compareAscending(objCriteria[index], othCriteria[index]);
9111
+ if (result) {
9112
+ if (index >= ordersLength) {
9113
+ return result;
9114
+ }
9115
+ var order = orders[index];
9116
+ return result * (order == 'desc' ? -1 : 1);
9117
+ }
9118
+ }
9119
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
9120
+ // that causes it, under certain circumstances, to provide the same value for
9121
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
9122
+ // for more details.
9123
+ //
9124
+ // This also ensures a stable sort in V8 and other engines.
9125
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
9126
+ return object.index - other.index;
9127
+ }
9128
+
9129
+ var _compareMultiple = compareMultiple;
9130
+
9131
+ /**
9132
+ * The base implementation of `_.orderBy` without param guards.
9133
+ *
9134
+ * @private
9135
+ * @param {Array|Object} collection The collection to iterate over.
9136
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
9137
+ * @param {string[]} orders The sort orders of `iteratees`.
9138
+ * @returns {Array} Returns the new sorted array.
9139
+ */
9140
+ function baseOrderBy(collection, iteratees, orders) {
9141
+ if (iteratees.length) {
9142
+ iteratees = _arrayMap(iteratees, function(iteratee) {
9143
+ if (isArray_1(iteratee)) {
9144
+ return function(value) {
9145
+ return _baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
9146
+ }
9147
+ }
9148
+ return iteratee;
9149
+ });
9150
+ } else {
9151
+ iteratees = [identity_1];
9152
+ }
9153
+
9154
+ var index = -1;
9155
+ iteratees = _arrayMap(iteratees, _baseUnary(_baseIteratee));
9156
+
9157
+ var result = _baseMap(collection, function(value, key, collection) {
9158
+ var criteria = _arrayMap(iteratees, function(iteratee) {
9159
+ return iteratee(value);
9160
+ });
9161
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
9162
+ });
9163
+
9164
+ return _baseSortBy(result, function(object, other) {
9165
+ return _compareMultiple(object, other, orders);
9166
+ });
9167
+ }
9168
+
9169
+ var _baseOrderBy = baseOrderBy;
9170
+
9171
+ /**
9172
+ * A faster alternative to `Function#apply`, this function invokes `func`
9173
+ * with the `this` binding of `thisArg` and the arguments of `args`.
9174
+ *
9175
+ * @private
9176
+ * @param {Function} func The function to invoke.
9177
+ * @param {*} thisArg The `this` binding of `func`.
9178
+ * @param {Array} args The arguments to invoke `func` with.
9179
+ * @returns {*} Returns the result of `func`.
9180
+ */
9181
+ function apply(func, thisArg, args) {
9182
+ switch (args.length) {
9183
+ case 0: return func.call(thisArg);
9184
+ case 1: return func.call(thisArg, args[0]);
9185
+ case 2: return func.call(thisArg, args[0], args[1]);
9186
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
9187
+ }
9188
+ return func.apply(thisArg, args);
9189
+ }
9190
+
9191
+ var _apply = apply;
9192
+
9193
+ /* Built-in method references for those with the same name as other `lodash` methods. */
9194
+ var nativeMax = Math.max;
9195
+
9196
+ /**
9197
+ * A specialized version of `baseRest` which transforms the rest array.
9198
+ *
9199
+ * @private
9200
+ * @param {Function} func The function to apply a rest parameter to.
9201
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
9202
+ * @param {Function} transform The rest array transform.
9203
+ * @returns {Function} Returns the new function.
9204
+ */
9205
+ function overRest(func, start, transform) {
9206
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
9207
+ return function() {
9208
+ var args = arguments,
9209
+ index = -1,
9210
+ length = nativeMax(args.length - start, 0),
9211
+ array = Array(length);
9212
+
9213
+ while (++index < length) {
9214
+ array[index] = args[start + index];
9215
+ }
9216
+ index = -1;
9217
+ var otherArgs = Array(start + 1);
9218
+ while (++index < start) {
9219
+ otherArgs[index] = args[index];
9220
+ }
9221
+ otherArgs[start] = transform(array);
9222
+ return _apply(func, this, otherArgs);
9223
+ };
9224
+ }
9225
+
9226
+ var _overRest = overRest;
9227
+
9228
+ /**
9229
+ * Creates a function that returns `value`.
9230
+ *
9231
+ * @static
9232
+ * @memberOf _
9233
+ * @since 2.4.0
9234
+ * @category Util
9235
+ * @param {*} value The value to return from the new function.
9236
+ * @returns {Function} Returns the new constant function.
9237
+ * @example
9238
+ *
9239
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
9240
+ *
9241
+ * console.log(objects);
9242
+ * // => [{ 'a': 1 }, { 'a': 1 }]
9243
+ *
9244
+ * console.log(objects[0] === objects[1]);
9245
+ * // => true
9246
+ */
9247
+ function constant(value) {
9248
+ return function() {
9249
+ return value;
9250
+ };
9251
+ }
9252
+
9253
+ var constant_1 = constant;
9254
+
9255
+ var defineProperty = (function() {
9256
+ try {
9257
+ var func = _getNative(Object, 'defineProperty');
9258
+ func({}, '', {});
9259
+ return func;
9260
+ } catch (e) {}
9261
+ }());
9262
+
9263
+ var _defineProperty = defineProperty;
9264
+
9265
+ /**
9266
+ * The base implementation of `setToString` without support for hot loop shorting.
9267
+ *
9268
+ * @private
9269
+ * @param {Function} func The function to modify.
9270
+ * @param {Function} string The `toString` result.
9271
+ * @returns {Function} Returns `func`.
9272
+ */
9273
+ var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
9274
+ return _defineProperty(func, 'toString', {
9275
+ 'configurable': true,
9276
+ 'enumerable': false,
9277
+ 'value': constant_1(string),
9278
+ 'writable': true
9279
+ });
9280
+ };
9281
+
9282
+ var _baseSetToString = baseSetToString;
9283
+
9284
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
9285
+ var HOT_COUNT = 800,
9286
+ HOT_SPAN = 16;
9287
+
9288
+ /* Built-in method references for those with the same name as other `lodash` methods. */
9289
+ var nativeNow = Date.now;
9290
+
9291
+ /**
9292
+ * Creates a function that'll short out and invoke `identity` instead
9293
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
9294
+ * milliseconds.
9295
+ *
9296
+ * @private
9297
+ * @param {Function} func The function to restrict.
9298
+ * @returns {Function} Returns the new shortable function.
9299
+ */
9300
+ function shortOut(func) {
9301
+ var count = 0,
9302
+ lastCalled = 0;
9303
+
9304
+ return function() {
9305
+ var stamp = nativeNow(),
9306
+ remaining = HOT_SPAN - (stamp - lastCalled);
9307
+
9308
+ lastCalled = stamp;
9309
+ if (remaining > 0) {
9310
+ if (++count >= HOT_COUNT) {
9311
+ return arguments[0];
9312
+ }
9313
+ } else {
9314
+ count = 0;
9315
+ }
9316
+ return func.apply(undefined, arguments);
9317
+ };
9318
+ }
9319
+
9320
+ var _shortOut = shortOut;
9321
+
9322
+ /**
9323
+ * Sets the `toString` method of `func` to return `string`.
9324
+ *
9325
+ * @private
9326
+ * @param {Function} func The function to modify.
9327
+ * @param {Function} string The `toString` result.
9328
+ * @returns {Function} Returns `func`.
9329
+ */
9330
+ var setToString = _shortOut(_baseSetToString);
9331
+
9332
+ var _setToString = setToString;
9333
+
9334
+ /**
9335
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
9336
+ *
9337
+ * @private
9338
+ * @param {Function} func The function to apply a rest parameter to.
9339
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
9340
+ * @returns {Function} Returns the new function.
9341
+ */
9342
+ function baseRest(func, start) {
9343
+ return _setToString(_overRest(func, start, identity_1), func + '');
9344
+ }
9345
+
9346
+ var _baseRest = baseRest;
9347
+
9348
+ /**
9349
+ * Checks if the given arguments are from an iteratee call.
9350
+ *
9351
+ * @private
9352
+ * @param {*} value The potential iteratee value argument.
9353
+ * @param {*} index The potential iteratee index or key argument.
9354
+ * @param {*} object The potential iteratee object argument.
9355
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
9356
+ * else `false`.
9357
+ */
9358
+ function isIterateeCall(value, index, object) {
9359
+ if (!isObject_1(object)) {
9360
+ return false;
9361
+ }
9362
+ var type = typeof index;
9363
+ if (type == 'number'
9364
+ ? (isArrayLike_1(object) && _isIndex(index, object.length))
9365
+ : (type == 'string' && index in object)
9366
+ ) {
9367
+ return eq_1(object[index], value);
9368
+ }
9369
+ return false;
9370
+ }
9371
+
9372
+ var _isIterateeCall = isIterateeCall;
9373
+
9374
+ /**
9375
+ * Creates an array of elements, sorted in ascending order by the results of
9376
+ * running each element in a collection thru each iteratee. This method
9377
+ * performs a stable sort, that is, it preserves the original sort order of
9378
+ * equal elements. The iteratees are invoked with one argument: (value).
9379
+ *
9380
+ * @static
9381
+ * @memberOf _
9382
+ * @since 0.1.0
9383
+ * @category Collection
9384
+ * @param {Array|Object} collection The collection to iterate over.
9385
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
9386
+ * The iteratees to sort by.
9387
+ * @returns {Array} Returns the new sorted array.
9388
+ * @example
9389
+ *
9390
+ * var users = [
9391
+ * { 'user': 'fred', 'age': 48 },
9392
+ * { 'user': 'barney', 'age': 36 },
9393
+ * { 'user': 'fred', 'age': 30 },
9394
+ * { 'user': 'barney', 'age': 34 }
9395
+ * ];
9396
+ *
9397
+ * _.sortBy(users, [function(o) { return o.user; }]);
9398
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
9399
+ *
9400
+ * _.sortBy(users, ['user', 'age']);
9401
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
9402
+ */
9403
+ var sortBy = _baseRest(function(collection, iteratees) {
9404
+ if (collection == null) {
9405
+ return [];
9406
+ }
9407
+ var length = iteratees.length;
9408
+ if (length > 1 && _isIterateeCall(collection, iteratees[0], iteratees[1])) {
9409
+ iteratees = [];
9410
+ } else if (length > 2 && _isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
9411
+ iteratees = [iteratees[0]];
9412
+ }
9413
+ return _baseOrderBy(collection, _baseFlatten(iteratees, 1), []);
9414
+ });
9415
+
9416
+ var sortBy_1 = sortBy;
9417
+
9418
+ /**
9419
+ * Configuration for custom action validation rules.
9420
+ * Defines allowed positions, metadata IDs, data model IDs, and fields for each target
9421
+ * type.
9422
+ *
9423
+ */
9424
+ const customActionValidationConfig = {
9425
+ [CustomActionTarget.LIVEBOARD]: {
9426
+ positions: [CustomActionsPosition.PRIMARY, CustomActionsPosition.MENU],
9427
+ allowedMetadataIds: ['liveboardIds'],
9428
+ allowedDataModelIds: [],
9429
+ allowedFields: ['name', 'id', 'position', 'target', 'metadataIds', 'orgIds', 'groupIds'],
9430
+ },
9431
+ [CustomActionTarget.VIZ]: {
9432
+ positions: [CustomActionsPosition.MENU, CustomActionsPosition.PRIMARY, CustomActionsPosition.CONTEXTMENU],
9433
+ allowedMetadataIds: ['liveboardIds', 'vizIds', 'answerIds'],
9434
+ allowedDataModelIds: ['modelIds', 'modelColumnNames'],
9435
+ allowedFields: ['name', 'id', 'position', 'target', 'metadataIds', 'orgIds', 'groupIds', 'dataModelIds'],
9436
+ },
9437
+ [CustomActionTarget.ANSWER]: {
9438
+ positions: [CustomActionsPosition.MENU, CustomActionsPosition.PRIMARY, CustomActionsPosition.CONTEXTMENU],
9439
+ allowedMetadataIds: ['answerIds'],
9440
+ allowedDataModelIds: ['modelIds', 'modelColumnNames'],
9441
+ allowedFields: ['name', 'id', 'position', 'target', 'metadataIds', 'orgIds', 'groupIds', 'dataModelIds'],
9442
+ },
9443
+ [CustomActionTarget.SPOTTER]: {
9444
+ positions: [CustomActionsPosition.MENU, CustomActionsPosition.CONTEXTMENU],
9445
+ allowedMetadataIds: [],
9446
+ allowedDataModelIds: ['modelIds'],
9447
+ allowedFields: ['name', 'id', 'position', 'target', 'orgIds', 'groupIds', 'dataModelIds'],
9448
+ },
9449
+ };
9450
+ /**
9451
+ * Validates a single custom action based on its target type
9452
+ * @param action - The custom action to validate
9453
+ * @param primaryActionsPerTarget - Map to track primary actions per target
9454
+ * @returns CustomActionValidation with isValid flag and reason string
9455
+ *
9456
+ * @hidden
9457
+ */
9458
+ const validateCustomAction = (action, primaryActionsPerTarget) => {
9459
+ const { id: actionId, target: targetType, position, metadataIds, dataModelIds } = action;
9460
+ // Check if target type is supported
9461
+ if (!customActionValidationConfig[targetType]) {
9462
+ const errorMessage = CUSTOM_ACTIONS_ERROR_MESSAGE.UNSUPPORTED_TARGET(actionId, targetType);
9463
+ return { isValid: false, errors: [errorMessage] };
9464
+ }
9465
+ const config = customActionValidationConfig[targetType];
9466
+ const errors = [];
9467
+ // Validate position
9468
+ if (!arrayIncludesString(config.positions, position)) {
9469
+ const supportedPositions = config.positions.join(', ');
9470
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_POSITION(position, targetType, supportedPositions));
9471
+ }
9472
+ // Check for primary action conflicts (this is a warning, not a validation
9473
+ // failure)
9474
+ if (position === CustomActionsPosition.PRIMARY) {
9475
+ const existingPrimaryAction = primaryActionsPerTarget.get(targetType);
9476
+ if (existingPrimaryAction) {
9477
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.MULTIPLE_PRIMARY_ACTIONS(targetType, existingPrimaryAction.name, action.name));
9478
+ }
9479
+ else {
9480
+ primaryActionsPerTarget.set(targetType, action);
7990
9481
  }
7991
- return unaggAnswerSession;
7992
- }
7993
- /**
7994
- * Execute a custom graphql query in the context of the answer.
7995
- * @param query graphql query
7996
- * @param variables graphql variables
7997
- * @returns
7998
- */
7999
- async executeQuery(query, variables) {
8000
- const data = await graphqlQuery({
8001
- query,
8002
- variables: {
8003
- session: this.session,
8004
- ...variables,
8005
- },
8006
- thoughtSpotHost: this.thoughtSpotHost,
8007
- isCompositeQuery: false,
8008
- });
8009
- this.session = deepMerge(this.session, (data === null || data === void 0 ? void 0 : data.id) || {});
8010
- return data;
8011
- }
8012
- /**
8013
- * Get the internal session details for the answer.
8014
- * @returns
8015
- */
8016
- getSession() {
8017
- return this.session;
8018
9482
  }
8019
- async getAnswer() {
8020
- if (this.answer) {
8021
- return this.answer;
9483
+ // Validate metadata IDs
9484
+ if (metadataIds) {
9485
+ const invalidMetadataIds = Object.keys(metadataIds).filter((key) => !arrayIncludesString(config.allowedMetadataIds, key));
9486
+ if (invalidMetadataIds.length > 0) {
9487
+ const supportedMetadataIds = config.allowedMetadataIds.length > 0 ? config.allowedMetadataIds.join(', ') : 'none';
9488
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_METADATA_IDS(targetType, invalidMetadataIds, supportedMetadataIds));
8022
9489
  }
8023
- this.answer = this.executeQuery(getAnswer, {}).then((data) => data === null || data === void 0 ? void 0 : data.answer);
8024
- return this.answer;
8025
- }
8026
- async getTML() {
8027
- const { object } = await this.executeQuery(getAnswerTML, {});
8028
- const edoc = object[0].edoc;
8029
- const YAML = await import('./index-B0uCTBbm.js');
8030
- const parsedDoc = YAML.parse(edoc);
8031
- return {
8032
- answer: {
8033
- ...parsedDoc.answer,
8034
- ...this.tmlOverride,
8035
- },
8036
- };
8037
9490
  }
8038
- async addDisplayedVizToLiveboard(liveboardId) {
8039
- const { displayMode, visualizations } = await this.getAnswer();
8040
- const viz = getDisplayedViz(visualizations, displayMode);
8041
- return this.executeQuery(addVizToLiveboard, {
8042
- liveboardId,
8043
- vizId: viz.id,
8044
- });
9491
+ // Validate data model IDs
9492
+ if (dataModelIds) {
9493
+ const invalidDataModelIds = Object.keys(dataModelIds).filter((key) => !arrayIncludesString(config.allowedDataModelIds, key));
9494
+ if (invalidDataModelIds.length > 0) {
9495
+ const supportedDataModelIds = config.allowedDataModelIds.length > 0 ? config.allowedDataModelIds.join(', ') : 'none';
9496
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_DATA_MODEL_IDS(targetType, invalidDataModelIds, supportedDataModelIds));
9497
+ }
8045
9498
  }
8046
- setTMLOverride(override) {
8047
- this.tmlOverride = override;
9499
+ // Validate allowed fields
9500
+ const actionKeys = Object.keys(action);
9501
+ const invalidFields = actionKeys.filter((key) => !arrayIncludesString(config.allowedFields, key));
9502
+ if (invalidFields.length > 0) {
9503
+ const supportedFields = config.allowedFields.join(', ');
9504
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_FIELDS(targetType, invalidFields, supportedFields));
8048
9505
  }
8049
- }
9506
+ return {
9507
+ isValid: errors.length === 0,
9508
+ errors,
9509
+ };
9510
+ };
8050
9511
  /**
9512
+ * Validates basic action structure and required fields
9513
+ * @param action - The action to validate
9514
+ * @returns Object containing validation result and missing fields
8051
9515
  *
8052
- * @param sourceDetail
8053
- * @param colNames
9516
+ * @hidden
8054
9517
  */
8055
- function getGuidsFromColumnNames(sourceDetail, colNames) {
8056
- const cols = sourceDetail.columns.reduce((colSet, col) => {
8057
- colSet[col.name.toLowerCase()] = col;
8058
- return colSet;
8059
- }, {});
8060
- return new Set(colNames.map((colName) => {
8061
- const col = cols[colName.toLowerCase()];
8062
- return col.id;
8063
- }));
8064
- }
9518
+ const validateActionStructure = (action) => {
9519
+ if (!action || typeof action !== 'object') {
9520
+ return { isValid: false, missingFields: [] };
9521
+ }
9522
+ // Check for all missing required fields
9523
+ const missingFields = ['id', 'name', 'target', 'position'].filter(field => !action[field]);
9524
+ return { isValid: missingFields.length === 0, missingFields };
9525
+ };
8065
9526
  /**
9527
+ * Checks for duplicate IDs among actions
9528
+ * @param actions - Array of actions to check
9529
+ * @returns Object containing filtered actions and duplicate errors
8066
9530
  *
8067
- * @param selectedPoints
9531
+ * @hidden
8068
9532
  */
8069
- function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
8070
- const underlyingDataPoint = [];
8071
- /**
8072
- *
8073
- * @param colVal
8074
- */
8075
- function addPointFromColVal(colVal) {
8076
- var _a;
8077
- const dataType = colVal.column.dataType;
8078
- colVal.column.id;
8079
- let dataValue;
8080
- if (dataType === 'DATE') {
8081
- if (Number.isFinite(colVal.value)) {
8082
- dataValue = [{
8083
- epochRange: {
8084
- startEpoch: colVal.value,
8085
- },
8086
- }];
8087
- // Case for custom calendar.
8088
- }
8089
- else if ((_a = colVal.value) === null || _a === void 0 ? void 0 : _a.v) {
8090
- dataValue = [{
8091
- epochRange: {
8092
- startEpoch: colVal.value.v.s,
8093
- endEpoch: colVal.value.v.e,
8094
- },
8095
- }];
8096
- }
9533
+ const filterDuplicateIds = (actions) => {
9534
+ const idMap = actions.reduce((map, action) => {
9535
+ const list = map.get(action.id) || [];
9536
+ list.push(action);
9537
+ map.set(action.id, list);
9538
+ return map;
9539
+ }, new Map());
9540
+ const { actions: actionsWithUniqueIds, errors } = Array.from(idMap.entries()).reduce((acc, [id, actionsWithSameId]) => {
9541
+ if (actionsWithSameId.length === 1) {
9542
+ acc.actions.push(actionsWithSameId[0]);
8097
9543
  }
8098
9544
  else {
8099
- dataValue = [{ value: colVal.value }];
9545
+ // Keep the first action and add error for duplicates
9546
+ acc.actions.push(actionsWithSameId[0]);
9547
+ const duplicateNames = actionsWithSameId.slice(1).map(action => action.name);
9548
+ acc.errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.DUPLICATE_IDS(id, duplicateNames, actionsWithSameId[0].name));
8100
9549
  }
8101
- underlyingDataPoint.push({
8102
- columnId: colVal.column.id,
8103
- dataValue,
8104
- });
8105
- }
8106
- selectedPoints.forEach((p) => {
8107
- p.selectedAttributes.forEach(addPointFromColVal);
8108
- });
8109
- return underlyingDataPoint;
8110
- }
9550
+ return acc;
9551
+ }, { actions: [], errors: [] });
9552
+ return { actions: actionsWithUniqueIds, errors };
9553
+ };
8111
9554
  /**
8112
- *
8113
- * @param visualizations
8114
- * @param displayMode
9555
+ * Validates and processes custom actions
9556
+ * @param customActions - Array of custom actions to validate
9557
+ * @returns Object containing valid actions and any validation errors
8115
9558
  */
8116
- function getDisplayedViz(visualizations, displayMode) {
8117
- if (displayMode === 'CHART_MODE') {
8118
- return visualizations.find(
8119
- // eslint-disable-next-line no-underscore-dangle
8120
- (viz) => viz.__typename === 'ChartViz');
8121
- }
8122
- return visualizations.find(
8123
- // eslint-disable-next-line no-underscore-dangle
8124
- (viz) => viz.__typename === 'TableViz');
8125
- }
9559
+ const getCustomActions = (customActions) => {
9560
+ const errors = [];
9561
+ const primaryActionsPerTarget = new Map();
9562
+ if (!customActions || !Array.isArray(customActions)) {
9563
+ return { actions: [], errors: [] };
9564
+ }
9565
+ // Step 1: Handle invalid actions first (null, undefined, missing required
9566
+ // fields)
9567
+ const validActions = customActions.filter(action => {
9568
+ const validation = validateActionStructure(action);
9569
+ if (!validation.isValid) {
9570
+ if (!action || typeof action !== 'object') {
9571
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_ACTION_OBJECT);
9572
+ }
9573
+ else {
9574
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.MISSING_REQUIRED_FIELDS(action.id, validation.missingFields));
9575
+ }
9576
+ return false;
9577
+ }
9578
+ return true;
9579
+ });
9580
+ // Step 2: Check for duplicate IDs among valid actions
9581
+ const { actions: actionsWithUniqueIds, errors: duplicateErrors } = filterDuplicateIds(validActions);
9582
+ // Add duplicate errors to the errors array
9583
+ duplicateErrors.forEach(error => errors.push(error));
9584
+ // Step 3: Validate actions with unique IDs
9585
+ const finalValidActions = [];
9586
+ actionsWithUniqueIds.forEach((action) => {
9587
+ const { isValid, errors: validationErrors } = validateCustomAction(action, primaryActionsPerTarget);
9588
+ validationErrors.forEach(error => errors.push(error));
9589
+ if (isValid) {
9590
+ finalValidActions.push(action);
9591
+ }
9592
+ });
9593
+ const sortedActions = sortBy_1(finalValidActions, (a) => a.name.toLocaleLowerCase());
9594
+ return {
9595
+ actions: sortedActions,
9596
+ errors: errors,
9597
+ };
9598
+ };
8126
9599
 
8127
9600
  /**
8128
9601
  * Copyright (c) 2023
@@ -15935,7 +17408,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
15935
17408
  return e;
15936
17409
  }
15937
17410
 
15938
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.40.1-alpha.3";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
17411
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.40.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
15939
17412
 
15940
17413
  /**
15941
17414
  * Reloads the ThoughtSpot iframe.
@@ -16373,8 +17846,7 @@ class TsEmbed {
16373
17846
  // - cached auth may not reflect current user permissions
16374
17847
  const isDisabled = (this.viewConfig.overrideOrgId !== undefined
16375
17848
  || this.embedConfig.disablePreauthCache === true
16376
- // || this.isFullAppEmbedWithVisiblePrimaryNavbar()
16377
- );
17849
+ || this.isFullAppEmbedWithVisiblePrimaryNavbar());
16378
17850
  return !isDisabled;
16379
17851
  }
16380
17852
  /**
@@ -16461,6 +17933,16 @@ class TsEmbed {
16461
17933
  async getDefaultAppInitData() {
16462
17934
  var _a, _b;
16463
17935
  const authToken = await this.getAuthTokenForCookielessInit();
17936
+ const customActionsResult = getCustomActions([
17937
+ ...(this.viewConfig.customActions || []),
17938
+ ...(this.embedConfig.customActions || [])
17939
+ ]);
17940
+ if (customActionsResult.errors.length > 0) {
17941
+ this.handleError({
17942
+ type: 'CUSTOM_ACTION_VALIDATION',
17943
+ message: customActionsResult.errors,
17944
+ });
17945
+ }
16464
17946
  return {
16465
17947
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
16466
17948
  authToken,
@@ -16478,6 +17960,7 @@ class TsEmbed {
16478
17960
  : [],
16479
17961
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
16480
17962
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
17963
+ customActions: customActionsResult.actions,
16481
17964
  };
16482
17965
  }
16483
17966
  async getAppInitData() {
@@ -19729,4 +21212,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
19729
21212
  return result;
19730
21213
  };
19731
21214
 
19732
- export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
21215
+ export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };