@startale/app-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +116 -0
  3. package/dist/app-sdk.js +36226 -0
  4. package/dist/app-sdk.js.map +1 -0
  5. package/dist/app-sdk.min.js +15 -0
  6. package/dist/app-sdk.min.js.map +1 -0
  7. package/dist/browser-entry.d.ts +15 -0
  8. package/dist/browser-entry.d.ts.map +1 -0
  9. package/dist/browser-entry.js +19 -0
  10. package/dist/browser-entry.js.map +1 -0
  11. package/dist/core/communicator/Communicator.d.ts +47 -0
  12. package/dist/core/communicator/Communicator.d.ts.map +1 -0
  13. package/dist/core/communicator/Communicator.js +107 -0
  14. package/dist/core/communicator/Communicator.js.map +1 -0
  15. package/dist/core/constants.d.ts +5 -0
  16. package/dist/core/constants.d.ts.map +1 -0
  17. package/dist/core/constants.js +6 -0
  18. package/dist/core/constants.js.map +1 -0
  19. package/dist/core/error/constants.d.ts +96 -0
  20. package/dist/core/error/constants.d.ts.map +1 -0
  21. package/dist/core/error/constants.js +94 -0
  22. package/dist/core/error/constants.js.map +1 -0
  23. package/dist/core/error/errors.d.ts +74 -0
  24. package/dist/core/error/errors.d.ts.map +1 -0
  25. package/dist/core/error/errors.js +138 -0
  26. package/dist/core/error/errors.js.map +1 -0
  27. package/dist/core/error/serialize.d.ts +13 -0
  28. package/dist/core/error/serialize.d.ts.map +1 -0
  29. package/dist/core/error/serialize.js +43 -0
  30. package/dist/core/error/serialize.js.map +1 -0
  31. package/dist/core/error/utils.d.ts +31 -0
  32. package/dist/core/error/utils.d.ts.map +1 -0
  33. package/dist/core/error/utils.js +109 -0
  34. package/dist/core/error/utils.js.map +1 -0
  35. package/dist/core/message/ConfigMessage.d.ts +6 -0
  36. package/dist/core/message/ConfigMessage.d.ts.map +1 -0
  37. package/dist/core/message/ConfigMessage.js +2 -0
  38. package/dist/core/message/ConfigMessage.js.map +1 -0
  39. package/dist/core/message/Message.d.ts +8 -0
  40. package/dist/core/message/Message.d.ts.map +1 -0
  41. package/dist/core/message/Message.js +2 -0
  42. package/dist/core/message/Message.js.map +1 -0
  43. package/dist/core/message/RPCMessage.d.ts +31 -0
  44. package/dist/core/message/RPCMessage.d.ts.map +1 -0
  45. package/dist/core/message/RPCMessage.js +2 -0
  46. package/dist/core/message/RPCMessage.js.map +1 -0
  47. package/dist/core/message/RPCRequest.d.ts +6 -0
  48. package/dist/core/message/RPCRequest.d.ts.map +1 -0
  49. package/dist/core/message/RPCRequest.js +2 -0
  50. package/dist/core/message/RPCRequest.js.map +1 -0
  51. package/dist/core/message/RPCResponse.d.ts +23 -0
  52. package/dist/core/message/RPCResponse.d.ts.map +1 -0
  53. package/dist/core/message/RPCResponse.js +2 -0
  54. package/dist/core/message/RPCResponse.js.map +1 -0
  55. package/dist/core/provider/interface.d.ts +94 -0
  56. package/dist/core/provider/interface.d.ts.map +1 -0
  57. package/dist/core/provider/interface.js +4 -0
  58. package/dist/core/provider/interface.js.map +1 -0
  59. package/dist/core/rpc/coinbase_fetchSpendPermissions.d.ts +50 -0
  60. package/dist/core/rpc/coinbase_fetchSpendPermissions.d.ts.map +1 -0
  61. package/dist/core/rpc/coinbase_fetchSpendPermissions.js +2 -0
  62. package/dist/core/rpc/coinbase_fetchSpendPermissions.js.map +1 -0
  63. package/dist/core/rpc/wallet_addSubAccount.d.ts +37 -0
  64. package/dist/core/rpc/wallet_addSubAccount.d.ts.map +1 -0
  65. package/dist/core/rpc/wallet_addSubAccount.js +2 -0
  66. package/dist/core/rpc/wallet_addSubAccount.js.map +1 -0
  67. package/dist/core/rpc/wallet_connect.d.ts +64 -0
  68. package/dist/core/rpc/wallet_connect.d.ts.map +1 -0
  69. package/dist/core/rpc/wallet_connect.js +2 -0
  70. package/dist/core/rpc/wallet_connect.js.map +1 -0
  71. package/dist/core/rpc/wallet_getSubAccount.d.ts +14 -0
  72. package/dist/core/rpc/wallet_getSubAccount.d.ts.map +1 -0
  73. package/dist/core/rpc/wallet_getSubAccount.js +2 -0
  74. package/dist/core/rpc/wallet_getSubAccount.js.map +1 -0
  75. package/dist/core/rpc/wallet_prepareCalls.d.ts +28 -0
  76. package/dist/core/rpc/wallet_prepareCalls.d.ts.map +1 -0
  77. package/dist/core/rpc/wallet_prepareCalls.js +2 -0
  78. package/dist/core/rpc/wallet_prepareCalls.js.map +1 -0
  79. package/dist/core/rpc/wallet_sendPreparedCalls.d.ts +47 -0
  80. package/dist/core/rpc/wallet_sendPreparedCalls.d.ts.map +1 -0
  81. package/dist/core/rpc/wallet_sendPreparedCalls.js +2 -0
  82. package/dist/core/rpc/wallet_sendPreparedCalls.js.map +1 -0
  83. package/dist/core/telemetry/events/communicator.d.ts +4 -0
  84. package/dist/core/telemetry/events/communicator.d.ts.map +1 -0
  85. package/dist/core/telemetry/events/communicator.js +20 -0
  86. package/dist/core/telemetry/events/communicator.js.map +1 -0
  87. package/dist/core/telemetry/events/dialog.d.ts +15 -0
  88. package/dist/core/telemetry/events/dialog.d.ts.map +1 -0
  89. package/dist/core/telemetry/events/dialog.js +24 -0
  90. package/dist/core/telemetry/events/dialog.js.map +1 -0
  91. package/dist/core/telemetry/events/payment.d.ts +31 -0
  92. package/dist/core/telemetry/events/payment.d.ts.map +1 -0
  93. package/dist/core/telemetry/events/payment.js +68 -0
  94. package/dist/core/telemetry/events/payment.js.map +1 -0
  95. package/dist/core/telemetry/events/provider.d.ts +14 -0
  96. package/dist/core/telemetry/events/provider.d.ts.map +1 -0
  97. package/dist/core/telemetry/events/provider.js +30 -0
  98. package/dist/core/telemetry/events/provider.js.map +1 -0
  99. package/dist/core/telemetry/events/scw-signer.d.ts +27 -0
  100. package/dist/core/telemetry/events/scw-signer.d.ts.map +1 -0
  101. package/dist/core/telemetry/events/scw-signer.js +65 -0
  102. package/dist/core/telemetry/events/scw-signer.js.map +1 -0
  103. package/dist/core/telemetry/events/scw-sub-account.d.ts +40 -0
  104. package/dist/core/telemetry/events/scw-sub-account.d.ts.map +1 -0
  105. package/dist/core/telemetry/events/scw-sub-account.js +96 -0
  106. package/dist/core/telemetry/events/scw-sub-account.js.map +1 -0
  107. package/dist/core/telemetry/events/spend-permission.d.ts +6 -0
  108. package/dist/core/telemetry/events/spend-permission.d.ts.map +1 -0
  109. package/dist/core/telemetry/events/spend-permission.js +21 -0
  110. package/dist/core/telemetry/events/spend-permission.js.map +1 -0
  111. package/dist/core/telemetry/initCCA.d.ts +2 -0
  112. package/dist/core/telemetry/initCCA.d.ts.map +1 -0
  113. package/dist/core/telemetry/initCCA.js +43 -0
  114. package/dist/core/telemetry/initCCA.js.map +1 -0
  115. package/dist/core/telemetry/logEvent.d.ts +72 -0
  116. package/dist/core/telemetry/logEvent.d.ts.map +1 -0
  117. package/dist/core/telemetry/logEvent.js +62 -0
  118. package/dist/core/telemetry/logEvent.js.map +1 -0
  119. package/dist/core/telemetry/telemetry-content.d.ts +2 -0
  120. package/dist/core/telemetry/telemetry-content.d.ts.map +1 -0
  121. package/dist/core/telemetry/telemetry-content.js +5526 -0
  122. package/dist/core/telemetry/telemetry-content.js.map +1 -0
  123. package/dist/core/telemetry/utils.d.ts +2 -0
  124. package/dist/core/telemetry/utils.d.ts.map +1 -0
  125. package/dist/core/telemetry/utils.js +7 -0
  126. package/dist/core/telemetry/utils.js.map +1 -0
  127. package/dist/core/type/index.d.ts +21 -0
  128. package/dist/core/type/index.d.ts.map +1 -0
  129. package/dist/core/type/index.js +10 -0
  130. package/dist/core/type/index.js.map +1 -0
  131. package/dist/core/type/util.d.ts +28 -0
  132. package/dist/core/type/util.d.ts.map +1 -0
  133. package/dist/core/type/util.js +158 -0
  134. package/dist/core/type/util.js.map +1 -0
  135. package/dist/core/username/getDisplayableUsername.d.ts +3 -0
  136. package/dist/core/username/getDisplayableUsername.d.ts.map +1 -0
  137. package/dist/core/username/getDisplayableUsername.js +7 -0
  138. package/dist/core/username/getDisplayableUsername.js.map +1 -0
  139. package/dist/index.d.ts +6 -0
  140. package/dist/index.d.ts.map +1 -0
  141. package/dist/index.js +5 -0
  142. package/dist/index.js.map +1 -0
  143. package/dist/interface/builder/core/BaseAccountProvider.d.ts +11 -0
  144. package/dist/interface/builder/core/BaseAccountProvider.d.ts.map +1 -0
  145. package/dist/interface/builder/core/BaseAccountProvider.js +141 -0
  146. package/dist/interface/builder/core/BaseAccountProvider.js.map +1 -0
  147. package/dist/interface/builder/core/createBaseAccountSDK.d.ts +27 -0
  148. package/dist/interface/builder/core/createBaseAccountSDK.d.ts.map +1 -0
  149. package/dist/interface/builder/core/createBaseAccountSDK.js +149 -0
  150. package/dist/interface/builder/core/createBaseAccountSDK.js.map +1 -0
  151. package/dist/interface/builder/core/getInjectedProvider.d.ts +13 -0
  152. package/dist/interface/builder/core/getInjectedProvider.d.ts.map +1 -0
  153. package/dist/interface/builder/core/getInjectedProvider.js +10 -0
  154. package/dist/interface/builder/core/getInjectedProvider.js.map +1 -0
  155. package/dist/interface/payment/base.d.ts +32 -0
  156. package/dist/interface/payment/base.d.ts.map +1 -0
  157. package/dist/interface/payment/base.js +16 -0
  158. package/dist/interface/payment/base.js.map +1 -0
  159. package/dist/interface/payment/constants.d.ts +56 -0
  160. package/dist/interface/payment/constants.d.ts.map +1 -0
  161. package/dist/interface/payment/constants.js +45 -0
  162. package/dist/interface/payment/constants.js.map +1 -0
  163. package/dist/interface/payment/getPaymentStatus.d.ts +28 -0
  164. package/dist/interface/payment/getPaymentStatus.d.ts.map +1 -0
  165. package/dist/interface/payment/getPaymentStatus.js +243 -0
  166. package/dist/interface/payment/getPaymentStatus.js.map +1 -0
  167. package/dist/interface/payment/index.d.ts +9 -0
  168. package/dist/interface/payment/index.d.ts.map +1 -0
  169. package/dist/interface/payment/index.js +9 -0
  170. package/dist/interface/payment/index.js.map +1 -0
  171. package/dist/interface/payment/pay.d.ts +29 -0
  172. package/dist/interface/payment/pay.d.ts.map +1 -0
  173. package/dist/interface/payment/pay.js +90 -0
  174. package/dist/interface/payment/pay.js.map +1 -0
  175. package/dist/interface/payment/types.d.ts +123 -0
  176. package/dist/interface/payment/types.d.ts.map +1 -0
  177. package/dist/interface/payment/types.js +5 -0
  178. package/dist/interface/payment/types.js.map +1 -0
  179. package/dist/interface/payment/utils/sdkManager.d.ts +61 -0
  180. package/dist/interface/payment/utils/sdkManager.d.ts.map +1 -0
  181. package/dist/interface/payment/utils/sdkManager.js +84 -0
  182. package/dist/interface/payment/utils/sdkManager.js.map +1 -0
  183. package/dist/interface/payment/utils/translatePayment.d.ts +45 -0
  184. package/dist/interface/payment/utils/translatePayment.d.ts.map +1 -0
  185. package/dist/interface/payment/utils/translatePayment.js +70 -0
  186. package/dist/interface/payment/utils/translatePayment.js.map +1 -0
  187. package/dist/interface/payment/utils/validation.d.ts +16 -0
  188. package/dist/interface/payment/utils/validation.d.ts.map +1 -0
  189. package/dist/interface/payment/utils/validation.js +47 -0
  190. package/dist/interface/payment/utils/validation.js.map +1 -0
  191. package/dist/interface/public-utilities/spend-permission/index.d.ts +8 -0
  192. package/dist/interface/public-utilities/spend-permission/index.d.ts.map +1 -0
  193. package/dist/interface/public-utilities/spend-permission/index.js +8 -0
  194. package/dist/interface/public-utilities/spend-permission/index.js.map +1 -0
  195. package/dist/interface/public-utilities/spend-permission/methods/fetchPermissions.d.ts +14 -0
  196. package/dist/interface/public-utilities/spend-permission/methods/fetchPermissions.d.ts.map +1 -0
  197. package/dist/interface/public-utilities/spend-permission/methods/fetchPermissions.js +52 -0
  198. package/dist/interface/public-utilities/spend-permission/methods/fetchPermissions.js.map +1 -0
  199. package/dist/interface/public-utilities/spend-permission/methods/getHash.d.ts +9 -0
  200. package/dist/interface/public-utilities/spend-permission/methods/getHash.d.ts.map +1 -0
  201. package/dist/interface/public-utilities/spend-permission/methods/getHash.js +54 -0
  202. package/dist/interface/public-utilities/spend-permission/methods/getHash.js.map +1 -0
  203. package/dist/interface/public-utilities/spend-permission/methods/getPermissionStatus.d.ts +8 -0
  204. package/dist/interface/public-utilities/spend-permission/methods/getPermissionStatus.d.ts.map +1 -0
  205. package/dist/interface/public-utilities/spend-permission/methods/getPermissionStatus.js +85 -0
  206. package/dist/interface/public-utilities/spend-permission/methods/getPermissionStatus.js.map +1 -0
  207. package/dist/interface/public-utilities/spend-permission/methods/prepareRevokeCallData.d.ts +10 -0
  208. package/dist/interface/public-utilities/spend-permission/methods/prepareRevokeCallData.d.ts.map +1 -0
  209. package/dist/interface/public-utilities/spend-permission/methods/prepareRevokeCallData.js +51 -0
  210. package/dist/interface/public-utilities/spend-permission/methods/prepareRevokeCallData.js.map +1 -0
  211. package/dist/interface/public-utilities/spend-permission/methods/prepareSpendCallData.d.ts +11 -0
  212. package/dist/interface/public-utilities/spend-permission/methods/prepareSpendCallData.d.ts.map +1 -0
  213. package/dist/interface/public-utilities/spend-permission/methods/prepareSpendCallData.js +104 -0
  214. package/dist/interface/public-utilities/spend-permission/methods/prepareSpendCallData.js.map +1 -0
  215. package/dist/interface/public-utilities/spend-permission/methods/requestRevoke.d.ts +11 -0
  216. package/dist/interface/public-utilities/spend-permission/methods/requestRevoke.d.ts.map +1 -0
  217. package/dist/interface/public-utilities/spend-permission/methods/requestRevoke.js +64 -0
  218. package/dist/interface/public-utilities/spend-permission/methods/requestRevoke.js.map +1 -0
  219. package/dist/interface/public-utilities/spend-permission/methods/requestSpendPermission.d.ts +20 -0
  220. package/dist/interface/public-utilities/spend-permission/methods/requestSpendPermission.d.ts.map +1 -0
  221. package/dist/interface/public-utilities/spend-permission/methods/requestSpendPermission.js +67 -0
  222. package/dist/interface/public-utilities/spend-permission/methods/requestSpendPermission.js.map +1 -0
  223. package/dist/interface/public-utilities/spend-permission/utils.d.ts +81 -0
  224. package/dist/interface/public-utilities/spend-permission/utils.d.ts.map +1 -0
  225. package/dist/interface/public-utilities/spend-permission/utils.js +130 -0
  226. package/dist/interface/public-utilities/spend-permission/utils.js.map +1 -0
  227. package/dist/interface/public-utilities/spend-permission/withTelemetry.d.ts +2 -0
  228. package/dist/interface/public-utilities/spend-permission/withTelemetry.d.ts.map +1 -0
  229. package/dist/interface/public-utilities/spend-permission/withTelemetry.js +30 -0
  230. package/dist/interface/public-utilities/spend-permission/withTelemetry.js.map +1 -0
  231. package/dist/kms/crypto-key/index.d.ts +18 -0
  232. package/dist/kms/crypto-key/index.d.ts.map +1 -0
  233. package/dist/kms/crypto-key/index.js +97 -0
  234. package/dist/kms/crypto-key/index.js.map +1 -0
  235. package/dist/kms/crypto-key/storage.d.ts +7 -0
  236. package/dist/kms/crypto-key/storage.d.ts.map +1 -0
  237. package/dist/kms/crypto-key/storage.js +20 -0
  238. package/dist/kms/crypto-key/storage.js.map +1 -0
  239. package/dist/sign/app-sdk/SCWKeyManager.d.ts +15 -0
  240. package/dist/sign/app-sdk/SCWKeyManager.d.ts.map +1 -0
  241. package/dist/sign/app-sdk/SCWKeyManager.js +82 -0
  242. package/dist/sign/app-sdk/SCWKeyManager.js.map +1 -0
  243. package/dist/sign/app-sdk/Signer.d.ts +38 -0
  244. package/dist/sign/app-sdk/Signer.d.ts.map +1 -0
  245. package/dist/sign/app-sdk/Signer.js +659 -0
  246. package/dist/sign/app-sdk/Signer.js.map +1 -0
  247. package/dist/sign/app-sdk/utils/constants.d.ts +1945 -0
  248. package/dist/sign/app-sdk/utils/constants.d.ts.map +1 -0
  249. package/dist/sign/app-sdk/utils/constants.js +1321 -0
  250. package/dist/sign/app-sdk/utils/constants.js.map +1 -0
  251. package/dist/sign/app-sdk/utils/createSmartAccount.d.ts +63 -0
  252. package/dist/sign/app-sdk/utils/createSmartAccount.d.ts.map +1 -0
  253. package/dist/sign/app-sdk/utils/createSmartAccount.js +291 -0
  254. package/dist/sign/app-sdk/utils/createSmartAccount.js.map +1 -0
  255. package/dist/sign/app-sdk/utils/createSubAccountSigner.d.ts +23 -0
  256. package/dist/sign/app-sdk/utils/createSubAccountSigner.d.ts.map +1 -0
  257. package/dist/sign/app-sdk/utils/createSubAccountSigner.js +233 -0
  258. package/dist/sign/app-sdk/utils/createSubAccountSigner.js.map +1 -0
  259. package/dist/sign/app-sdk/utils/findOwnerIndex.d.ts +32 -0
  260. package/dist/sign/app-sdk/utils/findOwnerIndex.d.ts.map +1 -0
  261. package/dist/sign/app-sdk/utils/findOwnerIndex.js +56 -0
  262. package/dist/sign/app-sdk/utils/findOwnerIndex.js.map +1 -0
  263. package/dist/sign/app-sdk/utils/handleAddSubAccountOwner.d.ts +8 -0
  264. package/dist/sign/app-sdk/utils/handleAddSubAccountOwner.d.ts.map +1 -0
  265. package/dist/sign/app-sdk/utils/handleAddSubAccountOwner.js +78 -0
  266. package/dist/sign/app-sdk/utils/handleAddSubAccountOwner.js.map +1 -0
  267. package/dist/sign/app-sdk/utils/handleInsufficientBalance.d.ts +18 -0
  268. package/dist/sign/app-sdk/utils/handleInsufficientBalance.d.ts.map +1 -0
  269. package/dist/sign/app-sdk/utils/handleInsufficientBalance.js +27 -0
  270. package/dist/sign/app-sdk/utils/handleInsufficientBalance.js.map +1 -0
  271. package/dist/sign/app-sdk/utils/presentAddOwnerDialog.d.ts +2 -0
  272. package/dist/sign/app-sdk/utils/presentAddOwnerDialog.d.ts.map +1 -0
  273. package/dist/sign/app-sdk/utils/presentAddOwnerDialog.js +46 -0
  274. package/dist/sign/app-sdk/utils/presentAddOwnerDialog.js.map +1 -0
  275. package/dist/sign/app-sdk/utils/routeThroughGlobalAccount.d.ts +33 -0
  276. package/dist/sign/app-sdk/utils/routeThroughGlobalAccount.d.ts.map +1 -0
  277. package/dist/sign/app-sdk/utils/routeThroughGlobalAccount.js +76 -0
  278. package/dist/sign/app-sdk/utils/routeThroughGlobalAccount.js.map +1 -0
  279. package/dist/sign/app-sdk/utils.d.ts +220 -0
  280. package/dist/sign/app-sdk/utils.d.ts.map +1 -0
  281. package/dist/sign/app-sdk/utils.js +439 -0
  282. package/dist/sign/app-sdk/utils.js.map +1 -0
  283. package/dist/store/chain-clients/store.d.ts +10 -0
  284. package/dist/store/chain-clients/store.d.ts.map +1 -0
  285. package/dist/store/chain-clients/store.js +3 -0
  286. package/dist/store/chain-clients/store.js.map +1 -0
  287. package/dist/store/chain-clients/utils.d.ts +13 -0
  288. package/dist/store/chain-clients/utils.d.ts.map +1 -0
  289. package/dist/store/chain-clients/utils.js +77 -0
  290. package/dist/store/chain-clients/utils.js.map +1 -0
  291. package/dist/store/correlation-ids/store.d.ts +7 -0
  292. package/dist/store/correlation-ids/store.d.ts.map +1 -0
  293. package/dist/store/correlation-ids/store.js +32 -0
  294. package/dist/store/correlation-ids/store.js.map +1 -0
  295. package/dist/store/store.d.ts +186 -0
  296. package/dist/store/store.d.ts.map +1 -0
  297. package/dist/store/store.js +167 -0
  298. package/dist/store/store.js.map +1 -0
  299. package/dist/ui/Dialog/Dialog-css.d.ts +3 -0
  300. package/dist/ui/Dialog/Dialog-css.d.ts.map +1 -0
  301. package/dist/ui/Dialog/Dialog-css.js +2 -0
  302. package/dist/ui/Dialog/Dialog-css.js.map +1 -0
  303. package/dist/ui/Dialog/Dialog.d.ts +28 -0
  304. package/dist/ui/Dialog/Dialog.d.ts.map +1 -0
  305. package/dist/ui/Dialog/Dialog.js +150 -0
  306. package/dist/ui/Dialog/Dialog.js.map +1 -0
  307. package/dist/ui/Dialog/index.d.ts +3 -0
  308. package/dist/ui/Dialog/index.d.ts.map +1 -0
  309. package/dist/ui/Dialog/index.js +15 -0
  310. package/dist/ui/Dialog/index.js.map +1 -0
  311. package/dist/ui/assets/BaseLogo.d.ts +4 -0
  312. package/dist/ui/assets/BaseLogo.d.ts.map +1 -0
  313. package/dist/ui/assets/BaseLogo.js +7 -0
  314. package/dist/ui/assets/BaseLogo.js.map +1 -0
  315. package/dist/ui/assets/BasePayLogo.d.ts +3 -0
  316. package/dist/ui/assets/BasePayLogo.d.ts.map +1 -0
  317. package/dist/ui/assets/BasePayLogo.js +4 -0
  318. package/dist/ui/assets/BasePayLogo.js.map +1 -0
  319. package/dist/ui/assets/colors.d.ts +18 -0
  320. package/dist/ui/assets/colors.d.ts.map +1 -0
  321. package/dist/ui/assets/colors.js +19 -0
  322. package/dist/ui/assets/colors.js.map +1 -0
  323. package/dist/ui/assets/fontFaceCSS.d.ts +2 -0
  324. package/dist/ui/assets/fontFaceCSS.d.ts.map +1 -0
  325. package/dist/ui/assets/fontFaceCSS.js +11 -0
  326. package/dist/ui/assets/fontFaceCSS.js.map +1 -0
  327. package/dist/ui/assets/index.d.ts +6 -0
  328. package/dist/ui/assets/index.d.ts.map +1 -0
  329. package/dist/ui/assets/index.js +6 -0
  330. package/dist/ui/assets/index.js.map +1 -0
  331. package/dist/ui/assets/injectFontStyle.d.ts +2 -0
  332. package/dist/ui/assets/injectFontStyle.d.ts.map +1 -0
  333. package/dist/ui/assets/injectFontStyle.js +12 -0
  334. package/dist/ui/assets/injectFontStyle.js.map +1 -0
  335. package/dist/util/assertPresence.d.ts +3 -0
  336. package/dist/util/assertPresence.d.ts.map +1 -0
  337. package/dist/util/assertPresence.js +18 -0
  338. package/dist/util/assertPresence.js.map +1 -0
  339. package/dist/util/assertSubAccount.d.ts +3 -0
  340. package/dist/util/assertSubAccount.d.ts.map +1 -0
  341. package/dist/util/assertSubAccount.js +26 -0
  342. package/dist/util/assertSubAccount.js.map +1 -0
  343. package/dist/util/checkCrossOriginOpenerPolicy.d.ts +2 -0
  344. package/dist/util/checkCrossOriginOpenerPolicy.d.ts.map +1 -0
  345. package/dist/util/checkCrossOriginOpenerPolicy.js +56 -0
  346. package/dist/util/checkCrossOriginOpenerPolicy.js.map +1 -0
  347. package/dist/util/cipher.d.ts +12 -0
  348. package/dist/util/cipher.d.ts.map +1 -0
  349. package/dist/util/cipher.js +65 -0
  350. package/dist/util/cipher.js.map +1 -0
  351. package/dist/util/encoding.d.ts +20 -0
  352. package/dist/util/encoding.d.ts.map +1 -0
  353. package/dist/util/encoding.js +48 -0
  354. package/dist/util/encoding.js.map +1 -0
  355. package/dist/util/get.d.ts +2 -0
  356. package/dist/util/get.d.ts.map +1 -0
  357. package/dist/util/get.js +14 -0
  358. package/dist/util/get.js.map +1 -0
  359. package/dist/util/provider.d.ts +10 -0
  360. package/dist/util/provider.d.ts.map +1 -0
  361. package/dist/util/provider.js +56 -0
  362. package/dist/util/provider.js.map +1 -0
  363. package/dist/util/validatePreferences.d.ts +13 -0
  364. package/dist/util/validatePreferences.d.ts.map +1 -0
  365. package/dist/util/validatePreferences.js +30 -0
  366. package/dist/util/validatePreferences.js.map +1 -0
  367. package/dist/util/web.d.ts +3 -0
  368. package/dist/util/web.d.ts.map +1 -0
  369. package/dist/util/web.js +100 -0
  370. package/dist/util/web.js.map +1 -0
  371. package/dist/vendor-js/CCA/ca.d.ts +2 -0
  372. package/dist/vendor-js/CCA/ca.d.ts.map +1 -0
  373. package/dist/vendor-js/CCA/ca.js +4608 -0
  374. package/dist/vendor-js/CCA/ca.js.map +1 -0
  375. package/package.json +109 -0
@@ -0,0 +1,4608 @@
1
+ !(function (e, t) {
2
+ 'object' == typeof exports && 'object' == typeof module
3
+ ? (module.exports = t())
4
+ : 'function' == typeof define && define.amd
5
+ ? define([], t)
6
+ : 'object' == typeof exports
7
+ ? (exports.ClientAnalytics = t())
8
+ : (e.ClientAnalytics = t());
9
+ })(this, function () {
10
+ return (() => {
11
+ var e = {
12
+ 792: (e) => {
13
+ var t = {
14
+ utf8: {
15
+ stringToBytes: function (e) {
16
+ return t.bin.stringToBytes(unescape(encodeURIComponent(e)));
17
+ },
18
+ bytesToString: function (e) {
19
+ return decodeURIComponent(escape(t.bin.bytesToString(e)));
20
+ },
21
+ },
22
+ bin: {
23
+ stringToBytes: function (e) {
24
+ for (var t = [], n = 0; n < e.length; n++)
25
+ t.push(255 & e.charCodeAt(n));
26
+ return t;
27
+ },
28
+ bytesToString: function (e) {
29
+ for (var t = [], n = 0; n < e.length; n++)
30
+ t.push(String.fromCharCode(e[n]));
31
+ return t.join('');
32
+ },
33
+ },
34
+ };
35
+ e.exports = t;
36
+ },
37
+ 562: (e) => {
38
+ var t, n;
39
+ (t =
40
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'),
41
+ (n = {
42
+ rotl: function (e, t) {
43
+ return (e << t) | (e >>> (32 - t));
44
+ },
45
+ rotr: function (e, t) {
46
+ return (e << (32 - t)) | (e >>> t);
47
+ },
48
+ endian: function (e) {
49
+ if (e.constructor == Number)
50
+ return ((16711935 & n.rotl(e, 8)) |
51
+ (4278255360 & n.rotl(e, 24)));
52
+ for (var t = 0; t < e.length; t++)
53
+ e[t] = n.endian(e[t]);
54
+ return e;
55
+ },
56
+ randomBytes: function (e) {
57
+ for (var t = []; e > 0; e--)
58
+ t.push(Math.floor(256 * Math.random()));
59
+ return t;
60
+ },
61
+ bytesToWords: function (e) {
62
+ for (var t = [], n = 0, r = 0; n < e.length; n++, r += 8)
63
+ t[r >>> 5] |= e[n] << (24 - (r % 32));
64
+ return t;
65
+ },
66
+ wordsToBytes: function (e) {
67
+ for (var t = [], n = 0; n < 32 * e.length; n += 8)
68
+ t.push((e[n >>> 5] >>> (24 - (n % 32))) & 255);
69
+ return t;
70
+ },
71
+ bytesToHex: function (e) {
72
+ for (var t = [], n = 0; n < e.length; n++)
73
+ t.push((e[n] >>> 4).toString(16)),
74
+ t.push((15 & e[n]).toString(16));
75
+ return t.join('');
76
+ },
77
+ hexToBytes: function (e) {
78
+ for (var t = [], n = 0; n < e.length; n += 2)
79
+ t.push(parseInt(e.substr(n, 2), 16));
80
+ return t;
81
+ },
82
+ bytesToBase64: function (e) {
83
+ for (var n = [], r = 0; r < e.length; r += 3)
84
+ for (var i = (e[r] << 16) | (e[r + 1] << 8) | e[r + 2], a = 0; a < 4; a++)
85
+ 8 * r + 6 * a <= 8 * e.length
86
+ ? n.push(t.charAt((i >>> (6 * (3 - a))) & 63))
87
+ : n.push('=');
88
+ return n.join('');
89
+ },
90
+ base64ToBytes: function (e) {
91
+ e = e.replace(/[^A-Z0-9+\/]/gi, '');
92
+ for (var n = [], r = 0, i = 0; r < e.length; i = ++r % 4)
93
+ 0 != i &&
94
+ n.push(((t.indexOf(e.charAt(r - 1)) &
95
+ (Math.pow(2, -2 * i + 8) - 1)) <<
96
+ (2 * i)) |
97
+ (t.indexOf(e.charAt(r)) >>> (6 - 2 * i)));
98
+ return n;
99
+ },
100
+ }),
101
+ (e.exports = n);
102
+ },
103
+ 335: (e) => {
104
+ function t(e) {
105
+ return (!!e.constructor &&
106
+ 'function' == typeof e.constructor.isBuffer &&
107
+ e.constructor.isBuffer(e));
108
+ }
109
+ e.exports = function (e) {
110
+ return (null != e &&
111
+ (t(e) ||
112
+ (function (e) {
113
+ return ('function' == typeof e.readFloatLE &&
114
+ 'function' == typeof e.slice &&
115
+ t(e.slice(0, 0)));
116
+ })(e) ||
117
+ !!e._isBuffer));
118
+ };
119
+ },
120
+ 762: (e, t, n) => {
121
+ var r, i, a, o, s;
122
+ (r = n(562)),
123
+ (i = n(792).utf8),
124
+ (a = n(335)),
125
+ (o = n(792).bin),
126
+ ((s = function (e, t) {
127
+ e.constructor == String
128
+ ? (e =
129
+ t && 'binary' === t.encoding
130
+ ? o.stringToBytes(e)
131
+ : i.stringToBytes(e))
132
+ : a(e)
133
+ ? (e = Array.prototype.slice.call(e, 0))
134
+ : Array.isArray(e) ||
135
+ e.constructor === Uint8Array ||
136
+ (e = e.toString());
137
+ for (var n = r.bytesToWords(e), c = 8 * e.length, u = 1732584193, l = -271733879, d = -1732584194, p = 271733878, m = 0; m < n.length; m++)
138
+ n[m] =
139
+ (16711935 & ((n[m] << 8) | (n[m] >>> 24))) |
140
+ (4278255360 & ((n[m] << 24) | (n[m] >>> 8)));
141
+ (n[c >>> 5] |= 128 << (c % 32)),
142
+ (n[14 + (((c + 64) >>> 9) << 4)] = c);
143
+ var f = s._ff, v = s._gg, g = s._hh, b = s._ii;
144
+ for (m = 0; m < n.length; m += 16) {
145
+ var h = u, w = l, y = d, T = p;
146
+ (u = f(u, l, d, p, n[m + 0], 7, -680876936)),
147
+ (p = f(p, u, l, d, n[m + 1], 12, -389564586)),
148
+ (d = f(d, p, u, l, n[m + 2], 17, 606105819)),
149
+ (l = f(l, d, p, u, n[m + 3], 22, -1044525330)),
150
+ (u = f(u, l, d, p, n[m + 4], 7, -176418897)),
151
+ (p = f(p, u, l, d, n[m + 5], 12, 1200080426)),
152
+ (d = f(d, p, u, l, n[m + 6], 17, -1473231341)),
153
+ (l = f(l, d, p, u, n[m + 7], 22, -45705983)),
154
+ (u = f(u, l, d, p, n[m + 8], 7, 1770035416)),
155
+ (p = f(p, u, l, d, n[m + 9], 12, -1958414417)),
156
+ (d = f(d, p, u, l, n[m + 10], 17, -42063)),
157
+ (l = f(l, d, p, u, n[m + 11], 22, -1990404162)),
158
+ (u = f(u, l, d, p, n[m + 12], 7, 1804603682)),
159
+ (p = f(p, u, l, d, n[m + 13], 12, -40341101)),
160
+ (d = f(d, p, u, l, n[m + 14], 17, -1502002290)),
161
+ (u = v(u, (l = f(l, d, p, u, n[m + 15], 22, 1236535329)), d, p, n[m + 1], 5, -165796510)),
162
+ (p = v(p, u, l, d, n[m + 6], 9, -1069501632)),
163
+ (d = v(d, p, u, l, n[m + 11], 14, 643717713)),
164
+ (l = v(l, d, p, u, n[m + 0], 20, -373897302)),
165
+ (u = v(u, l, d, p, n[m + 5], 5, -701558691)),
166
+ (p = v(p, u, l, d, n[m + 10], 9, 38016083)),
167
+ (d = v(d, p, u, l, n[m + 15], 14, -660478335)),
168
+ (l = v(l, d, p, u, n[m + 4], 20, -405537848)),
169
+ (u = v(u, l, d, p, n[m + 9], 5, 568446438)),
170
+ (p = v(p, u, l, d, n[m + 14], 9, -1019803690)),
171
+ (d = v(d, p, u, l, n[m + 3], 14, -187363961)),
172
+ (l = v(l, d, p, u, n[m + 8], 20, 1163531501)),
173
+ (u = v(u, l, d, p, n[m + 13], 5, -1444681467)),
174
+ (p = v(p, u, l, d, n[m + 2], 9, -51403784)),
175
+ (d = v(d, p, u, l, n[m + 7], 14, 1735328473)),
176
+ (u = g(u, (l = v(l, d, p, u, n[m + 12], 20, -1926607734)), d, p, n[m + 5], 4, -378558)),
177
+ (p = g(p, u, l, d, n[m + 8], 11, -2022574463)),
178
+ (d = g(d, p, u, l, n[m + 11], 16, 1839030562)),
179
+ (l = g(l, d, p, u, n[m + 14], 23, -35309556)),
180
+ (u = g(u, l, d, p, n[m + 1], 4, -1530992060)),
181
+ (p = g(p, u, l, d, n[m + 4], 11, 1272893353)),
182
+ (d = g(d, p, u, l, n[m + 7], 16, -155497632)),
183
+ (l = g(l, d, p, u, n[m + 10], 23, -1094730640)),
184
+ (u = g(u, l, d, p, n[m + 13], 4, 681279174)),
185
+ (p = g(p, u, l, d, n[m + 0], 11, -358537222)),
186
+ (d = g(d, p, u, l, n[m + 3], 16, -722521979)),
187
+ (l = g(l, d, p, u, n[m + 6], 23, 76029189)),
188
+ (u = g(u, l, d, p, n[m + 9], 4, -640364487)),
189
+ (p = g(p, u, l, d, n[m + 12], 11, -421815835)),
190
+ (d = g(d, p, u, l, n[m + 15], 16, 530742520)),
191
+ (u = b(u, (l = g(l, d, p, u, n[m + 2], 23, -995338651)), d, p, n[m + 0], 6, -198630844)),
192
+ (p = b(p, u, l, d, n[m + 7], 10, 1126891415)),
193
+ (d = b(d, p, u, l, n[m + 14], 15, -1416354905)),
194
+ (l = b(l, d, p, u, n[m + 5], 21, -57434055)),
195
+ (u = b(u, l, d, p, n[m + 12], 6, 1700485571)),
196
+ (p = b(p, u, l, d, n[m + 3], 10, -1894986606)),
197
+ (d = b(d, p, u, l, n[m + 10], 15, -1051523)),
198
+ (l = b(l, d, p, u, n[m + 1], 21, -2054922799)),
199
+ (u = b(u, l, d, p, n[m + 8], 6, 1873313359)),
200
+ (p = b(p, u, l, d, n[m + 15], 10, -30611744)),
201
+ (d = b(d, p, u, l, n[m + 6], 15, -1560198380)),
202
+ (l = b(l, d, p, u, n[m + 13], 21, 1309151649)),
203
+ (u = b(u, l, d, p, n[m + 4], 6, -145523070)),
204
+ (p = b(p, u, l, d, n[m + 11], 10, -1120210379)),
205
+ (d = b(d, p, u, l, n[m + 2], 15, 718787259)),
206
+ (l = b(l, d, p, u, n[m + 9], 21, -343485551)),
207
+ (u = (u + h) >>> 0),
208
+ (l = (l + w) >>> 0),
209
+ (d = (d + y) >>> 0),
210
+ (p = (p + T) >>> 0);
211
+ }
212
+ return r.endian([u, l, d, p]);
213
+ })._ff = function (e, t, n, r, i, a, o) {
214
+ var s = e + ((t & n) | (~t & r)) + (i >>> 0) + o;
215
+ return ((s << a) | (s >>> (32 - a))) + t;
216
+ }),
217
+ (s._gg = function (e, t, n, r, i, a, o) {
218
+ var s = e + ((t & r) | (n & ~r)) + (i >>> 0) + o;
219
+ return ((s << a) | (s >>> (32 - a))) + t;
220
+ }),
221
+ (s._hh = function (e, t, n, r, i, a, o) {
222
+ var s = e + (t ^ n ^ r) + (i >>> 0) + o;
223
+ return ((s << a) | (s >>> (32 - a))) + t;
224
+ }),
225
+ (s._ii = function (e, t, n, r, i, a, o) {
226
+ var s = e + (n ^ (t | ~r)) + (i >>> 0) + o;
227
+ return ((s << a) | (s >>> (32 - a))) + t;
228
+ }),
229
+ (s._blocksize = 16),
230
+ (s._digestsize = 16),
231
+ (e.exports = function (e, t) {
232
+ if (null == e)
233
+ throw new Error('Illegal argument ' + e);
234
+ var n = r.wordsToBytes(s(e, t));
235
+ return t && t.asBytes
236
+ ? n
237
+ : t && t.asString
238
+ ? o.bytesToString(n)
239
+ : r.bytesToHex(n);
240
+ });
241
+ },
242
+ 2: (e, t, n) => {
243
+ 'use strict';
244
+ n.r(t),
245
+ n.d(t, {
246
+ Perfume: () => ze,
247
+ incrementUjNavigation: () => Le,
248
+ markStep: () => Re,
249
+ markStepOnce: () => qe,
250
+ });
251
+ var r, i, a = {
252
+ isResourceTiming: !1,
253
+ isElementTiming: !1,
254
+ maxTime: 3e4,
255
+ reportOptions: {},
256
+ enableNavigationTracking: !0,
257
+ }, o = window, s = o.console, c = o.navigator, u = o.performance, l = function () {
258
+ return c.deviceMemory;
259
+ }, d = function () {
260
+ return c.hardwareConcurrency;
261
+ }, p = 'mark.', m = function () {
262
+ return u && !!u.getEntriesByType && !!u.now && !!u.mark;
263
+ }, f = '4g', v = !1, g = {}, b = { value: 0 }, h = {
264
+ value: {
265
+ beacon: 0,
266
+ css: 0,
267
+ fetch: 0,
268
+ img: 0,
269
+ other: 0,
270
+ script: 0,
271
+ total: 0,
272
+ xmlhttprequest: 0,
273
+ },
274
+ }, w = { value: 0 }, y = { value: 0 }, T = {}, k = { isHidden: !1, didChange: !1 }, _ = function () {
275
+ ;
276
+ (k.isHidden = !1),
277
+ document.hidden &&
278
+ ((k.isHidden = document.hidden), (k.didChange = !0));
279
+ }, S = function (e, t) {
280
+ try {
281
+ var n = new PerformanceObserver(function (e) {
282
+ t(e.getEntries());
283
+ });
284
+ return n.observe({ type: e, buffered: !0 }), n;
285
+ }
286
+ catch (e) {
287
+ s.warn('Perfume.js:', e);
288
+ }
289
+ return null;
290
+ }, E = function () {
291
+ return !!(d() && d() <= 4) || !!(l() && l() <= 4);
292
+ }, x = function (e, t) {
293
+ switch (e) {
294
+ case 'slow-2g':
295
+ case '2g':
296
+ case '3g':
297
+ return !0;
298
+ default:
299
+ return E() || t;
300
+ }
301
+ }, O = function (e) {
302
+ return parseFloat(e.toFixed(4));
303
+ }, j = function (e) {
304
+ return 'number' != typeof e
305
+ ? null
306
+ : O(e / Math.pow(1024, 2));
307
+ }, N = function (e, t, n, r, i) {
308
+ var s, u = function () {
309
+ a.analyticsTracker &&
310
+ ((k.isHidden && !['CLS', 'INP'].includes(e)) ||
311
+ a.analyticsTracker({
312
+ attribution: r,
313
+ metricName: e,
314
+ data: t,
315
+ navigatorInformation: c
316
+ ? {
317
+ deviceMemory: l() || 0,
318
+ hardwareConcurrency: d() || 0,
319
+ serviceWorkerStatus: 'serviceWorker' in c
320
+ ? c.serviceWorker.controller
321
+ ? 'controlled'
322
+ : 'supported'
323
+ : 'unsupported',
324
+ isLowEndDevice: E(),
325
+ isLowEndExperience: x(f, v),
326
+ }
327
+ : {},
328
+ rating: n,
329
+ navigationType: i,
330
+ }));
331
+ };
332
+ ['CLS', 'INP'].includes(e)
333
+ ? u()
334
+ : ((s = u),
335
+ 'requestIdleCallback' in o
336
+ ? o.requestIdleCallback(s, { timeout: 3e3 })
337
+ : s());
338
+ }, I = function (e) {
339
+ e.forEach(function (e) {
340
+ if (!('self' !== e.name || e.startTime < b.value)) {
341
+ var t = e.duration - 50;
342
+ t > 0 && ((w.value += t), (y.value += t));
343
+ }
344
+ });
345
+ };
346
+ !(function (e) {
347
+ ;
348
+ (e.instant = 'instant'),
349
+ (e.quick = 'quick'),
350
+ (e.moderate = 'moderate'),
351
+ (e.slow = 'slow'),
352
+ (e.unavoidable = 'unavoidable');
353
+ })(r || (r = {}));
354
+ var P, M, B, C, D, A = (((i = {})[r.instant] = {
355
+ vitalsThresholds: [100, 200],
356
+ maxOutlierThreshold: 1e4,
357
+ }),
358
+ (i[r.quick] = {
359
+ vitalsThresholds: [200, 500],
360
+ maxOutlierThreshold: 1e4,
361
+ }),
362
+ (i[r.moderate] = {
363
+ vitalsThresholds: [500, 1e3],
364
+ maxOutlierThreshold: 1e4,
365
+ }),
366
+ (i[r.slow] = {
367
+ vitalsThresholds: [1e3, 2e3],
368
+ maxOutlierThreshold: 1e4,
369
+ }),
370
+ (i[r.unavoidable] = {
371
+ vitalsThresholds: [2e3, 5e3],
372
+ maxOutlierThreshold: 2e4,
373
+ }),
374
+ i), L = { RT: [100, 200], TBT: [200, 600], NTBT: [200, 600] }, U = function (e, t) {
375
+ return L[e]
376
+ ? t <= L[e][0]
377
+ ? 'good'
378
+ : t <= L[e][1]
379
+ ? 'needsImprovement'
380
+ : 'poor'
381
+ : null;
382
+ }, R = function (e, t, n) {
383
+ Object.keys(t).forEach(function (e) {
384
+ 'number' == typeof t[e] && (t[e] = O(t[e]));
385
+ }),
386
+ N(e, t, null, n || {});
387
+ }, q = function (e) {
388
+ var t = e.attribution, n = e.name, r = e.rating, i = e.value, o = e.navigationType;
389
+ 'FCP' === n && (b.value = i),
390
+ ['FCP', 'LCP'].includes(n) &&
391
+ !T[0] &&
392
+ (T[0] = S('longtask', I)),
393
+ 'FID' === n &&
394
+ setTimeout(function () {
395
+ k.didChange ||
396
+ (q({
397
+ attribution: t,
398
+ name: 'TBT',
399
+ rating: U('TBT', w.value),
400
+ value: w.value,
401
+ navigationType: o,
402
+ }),
403
+ R('dataConsumption', h.value));
404
+ }, 1e4);
405
+ var s = O(i);
406
+ s <= a.maxTime && s >= 0 && N(n, s, r, t, o);
407
+ }, F = function () {
408
+ return (window.performance &&
409
+ performance.getEntriesByType &&
410
+ performance.getEntriesByType('navigation')[0]);
411
+ }, z = function (e) {
412
+ if ('loading' === document.readyState)
413
+ return 'loading';
414
+ var t = F();
415
+ if (t) {
416
+ if (e < t.domInteractive)
417
+ return 'loading';
418
+ if (0 === t.domContentLoadedEventStart ||
419
+ e < t.domContentLoadedEventStart)
420
+ return 'dom-interactive';
421
+ if (0 === t.domComplete || e < t.domComplete)
422
+ return 'dom-content-loaded';
423
+ }
424
+ return 'complete';
425
+ }, K = function (e) {
426
+ var t = e.nodeName;
427
+ return 1 === e.nodeType
428
+ ? t.toLowerCase()
429
+ : t.toUpperCase().replace(/^#/, '');
430
+ }, $ = function (e, t) {
431
+ var n = '';
432
+ try {
433
+ for (; e && 9 !== e.nodeType;) {
434
+ var r = e, i = r.id
435
+ ? '#' + r.id
436
+ : K(r) +
437
+ (r.className && r.className.length
438
+ ? '.' + r.className.replace(/\s+/g, '.')
439
+ : '');
440
+ if (n.length + i.length > (t || 100) - 1)
441
+ return n || i;
442
+ if (((n = n ? i + '>' + n : i), r.id))
443
+ break;
444
+ e = r.parentNode;
445
+ }
446
+ }
447
+ catch (e) { }
448
+ return n;
449
+ }, Q = -1, W = function () {
450
+ return Q;
451
+ }, H = function (e) {
452
+ addEventListener('pageshow', function (t) {
453
+ t.persisted && ((Q = t.timeStamp), e(t));
454
+ }, !0);
455
+ }, V = function () {
456
+ var e = F();
457
+ return (e && e.activationStart) || 0;
458
+ }, J = function (e, t) {
459
+ var n = F(), r = 'navigate';
460
+ return (W() >= 0
461
+ ? (r = 'back-forward-cache')
462
+ : n &&
463
+ (r =
464
+ document.prerendering || V() > 0
465
+ ? 'prerender'
466
+ : document.wasDiscarded
467
+ ? 'restore'
468
+ : n.type.replace(/_/g, '-')),
469
+ {
470
+ name: e,
471
+ value: void 0 === t ? -1 : t,
472
+ rating: 'good',
473
+ delta: 0,
474
+ entries: [],
475
+ id: 'v3-'
476
+ .concat(Date.now(), '-')
477
+ .concat(Math.floor(8999999999999 * Math.random()) +
478
+ 1e12),
479
+ navigationType: r,
480
+ });
481
+ }, X = function (e, t, n) {
482
+ try {
483
+ if (PerformanceObserver.supportedEntryTypes.includes(e)) {
484
+ var r = new PerformanceObserver(function (e) {
485
+ Promise.resolve().then(function () {
486
+ t(e.getEntries());
487
+ });
488
+ });
489
+ return (r.observe(Object.assign({ type: e, buffered: !0 }, n || {})),
490
+ r);
491
+ }
492
+ }
493
+ catch (e) { }
494
+ }, G = function (e, t) {
495
+ var n = function n(r) {
496
+ ;
497
+ ('pagehide' !== r.type &&
498
+ 'hidden' !== document.visibilityState) ||
499
+ (e(r),
500
+ t &&
501
+ (removeEventListener('visibilitychange', n, !0),
502
+ removeEventListener('pagehide', n, !0)));
503
+ };
504
+ addEventListener('visibilitychange', n, !0),
505
+ addEventListener('pagehide', n, !0);
506
+ }, Z = function (e, t, n, r) {
507
+ var i, a;
508
+ return function (o) {
509
+ t.value >= 0 &&
510
+ (o || r) &&
511
+ ((a = t.value - (i || 0)) || void 0 === i) &&
512
+ ((i = t.value),
513
+ (t.delta = a),
514
+ (t.rating = (function (e, t) {
515
+ return e > t[1]
516
+ ? 'poor'
517
+ : e > t[0]
518
+ ? 'needs-improvement'
519
+ : 'good';
520
+ })(t.value, n)),
521
+ e(t));
522
+ };
523
+ }, Y = function (e) {
524
+ requestAnimationFrame(function () {
525
+ return requestAnimationFrame(function () {
526
+ return e();
527
+ });
528
+ });
529
+ }, ee = function (e) {
530
+ document.prerendering
531
+ ? addEventListener('prerenderingchange', function () {
532
+ return e();
533
+ }, !0)
534
+ : e();
535
+ }, te = -1, ne = function () {
536
+ return 'hidden' !== document.visibilityState ||
537
+ document.prerendering
538
+ ? 1 / 0
539
+ : 0;
540
+ }, re = function (e) {
541
+ 'hidden' === document.visibilityState &&
542
+ te > -1 &&
543
+ ((te = 'visibilitychange' === e.type ? e.timeStamp : 0),
544
+ ae());
545
+ }, ie = function () {
546
+ addEventListener('visibilitychange', re, !0),
547
+ addEventListener('prerenderingchange', re, !0);
548
+ }, ae = function () {
549
+ removeEventListener('visibilitychange', re, !0),
550
+ removeEventListener('prerenderingchange', re, !0);
551
+ }, oe = function () {
552
+ return (te < 0 &&
553
+ ((te = ne()),
554
+ ie(),
555
+ H(function () {
556
+ setTimeout(function () {
557
+ ;
558
+ (te = ne()), ie();
559
+ }, 0);
560
+ })),
561
+ {
562
+ get firstHiddenTime() {
563
+ return te;
564
+ },
565
+ });
566
+ }, se = function (e, t) {
567
+ ;
568
+ (t = t || {}),
569
+ ee(function () {
570
+ var n, r = [1800, 3e3], i = oe(), a = J('FCP'), o = X('paint', function (e) {
571
+ e.forEach(function (e) {
572
+ 'first-contentful-paint' === e.name &&
573
+ (o.disconnect(),
574
+ e.startTime < i.firstHiddenTime &&
575
+ ((a.value = Math.max(e.startTime - V(), 0)),
576
+ a.entries.push(e),
577
+ n(!0)));
578
+ });
579
+ });
580
+ o &&
581
+ ((n = Z(e, a, r, t.reportAllChanges)),
582
+ H(function (i) {
583
+ ;
584
+ (a = J('FCP')),
585
+ (n = Z(e, a, r, t.reportAllChanges)),
586
+ Y(function () {
587
+ ;
588
+ (a.value =
589
+ performance.now() - i.timeStamp),
590
+ n(!0);
591
+ });
592
+ }));
593
+ });
594
+ }, ce = { passive: !0, capture: !0 }, ue = new Date(), le = function (e, t) {
595
+ P ||
596
+ ((P = t),
597
+ (M = e),
598
+ (B = new Date()),
599
+ me(removeEventListener),
600
+ de());
601
+ }, de = function () {
602
+ if (M >= 0 && M < B - ue) {
603
+ var e = {
604
+ entryType: 'first-input',
605
+ name: P.type,
606
+ target: P.target,
607
+ cancelable: P.cancelable,
608
+ startTime: P.timeStamp,
609
+ processingStart: P.timeStamp + M,
610
+ };
611
+ C.forEach(function (t) {
612
+ t(e);
613
+ }),
614
+ (C = []);
615
+ }
616
+ }, pe = function (e) {
617
+ if (e.cancelable) {
618
+ var t = (e.timeStamp > 1e12
619
+ ? new Date()
620
+ : performance.now()) - e.timeStamp;
621
+ 'pointerdown' == e.type
622
+ ? (function (e, t) {
623
+ var n = function () {
624
+ le(e, t), i();
625
+ }, r = function () {
626
+ i();
627
+ }, i = function () {
628
+ removeEventListener('pointerup', n, ce),
629
+ removeEventListener('pointercancel', r, ce);
630
+ };
631
+ addEventListener('pointerup', n, ce),
632
+ addEventListener('pointercancel', r, ce);
633
+ })(t, e)
634
+ : le(t, e);
635
+ }
636
+ }, me = function (e) {
637
+ ;
638
+ [
639
+ 'mousedown',
640
+ 'keydown',
641
+ 'touchstart',
642
+ 'pointerdown',
643
+ ].forEach(function (t) {
644
+ return e(t, pe, ce);
645
+ });
646
+ }, fe = 0, ve = 1 / 0, ge = 0, be = function (e) {
647
+ e.forEach(function (e) {
648
+ e.interactionId &&
649
+ ((ve = Math.min(ve, e.interactionId)),
650
+ (ge = Math.max(ge, e.interactionId)),
651
+ (fe = ge ? (ge - ve) / 7 + 1 : 0));
652
+ });
653
+ }, he = function () {
654
+ return D ? fe : performance.interactionCount || 0;
655
+ }, we = 0, ye = function () {
656
+ return he() - we;
657
+ }, Te = [], ke = {}, _e = function (e) {
658
+ var t = Te[Te.length - 1], n = ke[e.interactionId];
659
+ if (n || Te.length < 10 || e.duration > t.latency) {
660
+ if (n)
661
+ n.entries.push(e),
662
+ (n.latency = Math.max(n.latency, e.duration));
663
+ else {
664
+ var r = {
665
+ id: e.interactionId,
666
+ latency: e.duration,
667
+ entries: [e],
668
+ };
669
+ (ke[r.id] = r), Te.push(r);
670
+ }
671
+ Te.sort(function (e, t) {
672
+ return t.latency - e.latency;
673
+ }),
674
+ Te.splice(10).forEach(function (e) {
675
+ delete ke[e.id];
676
+ });
677
+ }
678
+ }, Se = {}, Ee = function e(t) {
679
+ document.prerendering
680
+ ? ee(function () {
681
+ return e(t);
682
+ })
683
+ : 'complete' !== document.readyState
684
+ ? addEventListener('load', function () {
685
+ return e(t);
686
+ }, !0)
687
+ : setTimeout(t, 0);
688
+ }, xe = function (e, t) {
689
+ t = t || {};
690
+ var n = [800, 1800], r = J('TTFB'), i = Z(e, r, n, t.reportAllChanges);
691
+ Ee(function () {
692
+ var a = F();
693
+ if (a) {
694
+ var o = a.responseStart;
695
+ if (o <= 0 || o > performance.now())
696
+ return;
697
+ (r.value = Math.max(o - V(), 0)),
698
+ (r.entries = [a]),
699
+ i(!0),
700
+ H(function () {
701
+ ;
702
+ (r = J('TTFB', 0)),
703
+ (i = Z(e, r, n, t.reportAllChanges))(!0);
704
+ });
705
+ }
706
+ });
707
+ }, Oe = function (e) {
708
+ e.forEach(function (e) {
709
+ e.identifier &&
710
+ q({
711
+ attribution: { identifier: e.identifier },
712
+ name: 'ET',
713
+ rating: null,
714
+ value: e.startTime,
715
+ });
716
+ });
717
+ }, je = function (e) {
718
+ e.forEach(function (e) {
719
+ if ((a.isResourceTiming && R('resourceTiming', e),
720
+ e.decodedBodySize && e.initiatorType)) {
721
+ var t = e.decodedBodySize / 1e3;
722
+ (h.value[e.initiatorType] += t),
723
+ (h.value.total += t);
724
+ }
725
+ });
726
+ }, Ne = function () {
727
+ !(function (e, t) {
728
+ xe(function (e) {
729
+ !(function (e) {
730
+ if (e.entries.length) {
731
+ var t = e.entries[0], n = t.activationStart || 0, r = Math.max(t.domainLookupStart - n, 0), i = Math.max(t.connectStart - n, 0), a = Math.max(t.requestStart - n, 0);
732
+ e.attribution = {
733
+ waitingTime: r,
734
+ dnsTime: i - r,
735
+ connectionTime: a - i,
736
+ requestTime: e.value - a,
737
+ navigationEntry: t,
738
+ };
739
+ }
740
+ else
741
+ e.attribution = {
742
+ waitingTime: 0,
743
+ dnsTime: 0,
744
+ connectionTime: 0,
745
+ requestTime: 0,
746
+ };
747
+ })(e),
748
+ (function (e) {
749
+ e.value > 0 && q(e);
750
+ })(e);
751
+ }, t);
752
+ })(0, a.reportOptions.ttfb),
753
+ (function (e, t) {
754
+ !(function (e, t) {
755
+ ;
756
+ (t = t || {}),
757
+ ee(function () {
758
+ var e, n = [0.1, 0.25], r = J('CLS'), i = -1, a = 0, o = [], s = function (e) {
759
+ i > -1 &&
760
+ (function (e) {
761
+ !(function (e) {
762
+ if (e.entries.length) {
763
+ var t = e.entries.reduce(function (e, t) {
764
+ return e &&
765
+ e.value > t.value
766
+ ? e
767
+ : t;
768
+ });
769
+ if (t &&
770
+ t.sources &&
771
+ t.sources.length) {
772
+ var n = (r =
773
+ t.sources).find(function (e) {
774
+ return (e.node &&
775
+ 1 ===
776
+ e.node
777
+ .nodeType);
778
+ }) || r[0];
779
+ if (n)
780
+ return void (e.attribution =
781
+ {
782
+ largestShiftTarget: $(n.node),
783
+ largestShiftTime: t.startTime,
784
+ largestShiftValue: t.value,
785
+ largestShiftSource: n,
786
+ largestShiftEntry: t,
787
+ loadState: z(t.startTime),
788
+ });
789
+ }
790
+ }
791
+ var r;
792
+ e.attribution = {};
793
+ })(e),
794
+ (function (e) {
795
+ q(e);
796
+ })(e);
797
+ })(e);
798
+ }, c = function (t) {
799
+ t.forEach(function (t) {
800
+ if (!t.hadRecentInput) {
801
+ var n = o[0], i = o[o.length - 1];
802
+ a &&
803
+ t.startTime - i.startTime <
804
+ 1e3 &&
805
+ t.startTime - n.startTime < 5e3
806
+ ? ((a += t.value), o.push(t))
807
+ : ((a = t.value), (o = [t])),
808
+ a > r.value &&
809
+ ((r.value = a),
810
+ (r.entries = o),
811
+ e());
812
+ }
813
+ });
814
+ }, u = X('layout-shift', c);
815
+ u &&
816
+ ((e = Z(s, r, n, t.reportAllChanges)),
817
+ se(function (t) {
818
+ ;
819
+ (i = t.value),
820
+ r.value < 0 && ((r.value = 0), e());
821
+ }),
822
+ G(function () {
823
+ c(u.takeRecords()), e(!0);
824
+ }),
825
+ H(function () {
826
+ ;
827
+ (a = 0),
828
+ (i = -1),
829
+ (r = J('CLS', 0)),
830
+ (e = Z(s, r, n, t.reportAllChanges)),
831
+ Y(function () {
832
+ return e();
833
+ });
834
+ }));
835
+ });
836
+ })(0, t);
837
+ })(0, a.reportOptions.cls),
838
+ (function (e, t) {
839
+ se(function (e) {
840
+ !(function (e) {
841
+ if (e.entries.length) {
842
+ var t = F(), n = e.entries[e.entries.length - 1];
843
+ if (t) {
844
+ var r = t.activationStart || 0, i = Math.max(0, t.responseStart - r);
845
+ return void (e.attribution = {
846
+ timeToFirstByte: i,
847
+ firstByteToFCP: e.value - i,
848
+ loadState: z(e.entries[0].startTime),
849
+ navigationEntry: t,
850
+ fcpEntry: n,
851
+ });
852
+ }
853
+ }
854
+ e.attribution = {
855
+ timeToFirstByte: 0,
856
+ firstByteToFCP: e.value,
857
+ loadState: z(W()),
858
+ };
859
+ })(e),
860
+ (function (e) {
861
+ q(e);
862
+ })(e);
863
+ }, t);
864
+ })(0, a.reportOptions.fcp),
865
+ (function (e, t) {
866
+ !(function (e, t) {
867
+ ;
868
+ (t = t || {}),
869
+ ee(function () {
870
+ var n, r = [100, 300], i = oe(), a = J('FID'), o = function (e) {
871
+ e.startTime < i.firstHiddenTime &&
872
+ ((a.value =
873
+ e.processingStart -
874
+ e.startTime),
875
+ a.entries.push(e),
876
+ n(!0));
877
+ }, s = function (e) {
878
+ e.forEach(o);
879
+ }, c = X('first-input', s);
880
+ (n = Z(e, a, r, t.reportAllChanges)),
881
+ c &&
882
+ G(function () {
883
+ s(c.takeRecords()), c.disconnect();
884
+ }, !0),
885
+ c &&
886
+ H(function () {
887
+ var i;
888
+ (a = J('FID')),
889
+ (n = Z(e, a, r, t.reportAllChanges)),
890
+ (C = []),
891
+ (M = -1),
892
+ (P = null),
893
+ me(addEventListener),
894
+ (i = o),
895
+ C.push(i),
896
+ de();
897
+ });
898
+ });
899
+ })(function (e) {
900
+ !(function (e) {
901
+ var t = e.entries[0];
902
+ e.attribution = {
903
+ eventTarget: $(t.target),
904
+ eventType: t.name,
905
+ eventTime: t.startTime,
906
+ eventEntry: t,
907
+ loadState: z(t.startTime),
908
+ };
909
+ })(e),
910
+ (function (e) {
911
+ q(e);
912
+ })(e);
913
+ }, t);
914
+ })(0, a.reportOptions.fid),
915
+ (function (e, t) {
916
+ !(function (e, t) {
917
+ ;
918
+ (t = t || {}),
919
+ ee(function () {
920
+ var n, r = [2500, 4e3], i = oe(), a = J('LCP'), o = function (e) {
921
+ var t = e[e.length - 1];
922
+ if (t) {
923
+ var r = Math.max(t.startTime - V(), 0);
924
+ r < i.firstHiddenTime &&
925
+ ((a.value = r),
926
+ (a.entries = [t]),
927
+ n());
928
+ }
929
+ }, s = X('largest-contentful-paint', o);
930
+ if (s) {
931
+ n = Z(e, a, r, t.reportAllChanges);
932
+ var c = function () {
933
+ Se[a.id] ||
934
+ (o(s.takeRecords()),
935
+ s.disconnect(),
936
+ (Se[a.id] = !0),
937
+ n(!0));
938
+ };
939
+ ['keydown', 'click'].forEach(function (e) {
940
+ addEventListener(e, c, {
941
+ once: !0,
942
+ capture: !0,
943
+ });
944
+ }),
945
+ G(c, !0),
946
+ H(function (i) {
947
+ ;
948
+ (a = J('LCP')),
949
+ (n = Z(e, a, r, t.reportAllChanges)),
950
+ Y(function () {
951
+ ;
952
+ (a.value =
953
+ performance.now() -
954
+ i.timeStamp),
955
+ (Se[a.id] = !0),
956
+ n(!0);
957
+ });
958
+ });
959
+ }
960
+ });
961
+ })(function (e) {
962
+ !(function (e) {
963
+ if (e.entries.length) {
964
+ var t = F();
965
+ if (t) {
966
+ var n = t.activationStart || 0, r = e.entries[e.entries.length - 1], i = r.url &&
967
+ performance
968
+ .getEntriesByType('resource')
969
+ .filter(function (e) {
970
+ return e.name === r.url;
971
+ })[0], a = Math.max(0, t.responseStart - n), o = Math.max(a, i
972
+ ? (i.requestStart ||
973
+ i.startTime) - n
974
+ : 0), s = Math.max(o, i ? i.responseEnd - n : 0), c = Math.max(s, r ? r.startTime - n : 0), u = {
975
+ element: $(r.element),
976
+ timeToFirstByte: a,
977
+ resourceLoadDelay: o - a,
978
+ resourceLoadTime: s - o,
979
+ elementRenderDelay: c - s,
980
+ navigationEntry: t,
981
+ lcpEntry: r,
982
+ };
983
+ return (r.url && (u.url = r.url),
984
+ i && (u.lcpResourceEntry = i),
985
+ void (e.attribution = u));
986
+ }
987
+ }
988
+ e.attribution = {
989
+ timeToFirstByte: 0,
990
+ resourceLoadDelay: 0,
991
+ resourceLoadTime: 0,
992
+ elementRenderDelay: e.value,
993
+ };
994
+ })(e),
995
+ (function (e) {
996
+ q(e);
997
+ })(e);
998
+ }, t);
999
+ })(0, a.reportOptions.lcp),
1000
+ (function (e, t) {
1001
+ !(function (e, t) {
1002
+ ;
1003
+ (t = t || {}),
1004
+ ee(function () {
1005
+ var n = [200, 500];
1006
+ 'interactionCount' in performance ||
1007
+ D ||
1008
+ (D = X('event', be, {
1009
+ type: 'event',
1010
+ buffered: !0,
1011
+ durationThreshold: 0,
1012
+ }));
1013
+ var r, i = J('INP'), a = function (e) {
1014
+ e.forEach(function (e) {
1015
+ e.interactionId && _e(e),
1016
+ 'first-input' === e.entryType &&
1017
+ !Te.some(function (t) {
1018
+ return t.entries.some(function (t) {
1019
+ return (e.duration ===
1020
+ t.duration &&
1021
+ e.startTime ===
1022
+ t.startTime);
1023
+ });
1024
+ }) &&
1025
+ _e(e);
1026
+ });
1027
+ var t, n = ((t = Math.min(Te.length - 1, Math.floor(ye() / 50))),
1028
+ Te[t]);
1029
+ n &&
1030
+ n.latency !== i.value &&
1031
+ ((i.value = n.latency),
1032
+ (i.entries = n.entries),
1033
+ r());
1034
+ }, o = X('event', a, {
1035
+ durationThreshold: t.durationThreshold || 40,
1036
+ });
1037
+ (r = Z(e, i, n, t.reportAllChanges)),
1038
+ o &&
1039
+ (o.observe({
1040
+ type: 'first-input',
1041
+ buffered: !0,
1042
+ }),
1043
+ G(function () {
1044
+ a(o.takeRecords()),
1045
+ i.value < 0 &&
1046
+ ye() > 0 &&
1047
+ ((i.value = 0),
1048
+ (i.entries = [])),
1049
+ r(!0);
1050
+ }),
1051
+ H(function () {
1052
+ ;
1053
+ (Te = []),
1054
+ (we = he()),
1055
+ (i = J('INP')),
1056
+ (r = Z(e, i, n, t.reportAllChanges));
1057
+ }));
1058
+ });
1059
+ })(function (t) {
1060
+ !(function (e) {
1061
+ if (e.entries.length) {
1062
+ var t = e.entries.sort(function (e, t) {
1063
+ return (t.duration - e.duration ||
1064
+ t.processingEnd -
1065
+ t.processingStart -
1066
+ (e.processingEnd -
1067
+ e.processingStart));
1068
+ })[0];
1069
+ e.attribution = {
1070
+ eventTarget: $(t.target),
1071
+ eventType: t.name,
1072
+ eventTime: t.startTime,
1073
+ eventEntry: t,
1074
+ loadState: z(t.startTime),
1075
+ };
1076
+ }
1077
+ else
1078
+ e.attribution = {};
1079
+ })(t),
1080
+ e(t);
1081
+ }, t);
1082
+ })(function (e) {
1083
+ return q(e);
1084
+ }, a.reportOptions.inp),
1085
+ a.isResourceTiming && S('resource', je),
1086
+ a.isElementTiming && S('element', Oe);
1087
+ }, Ie = function (e) {
1088
+ var t = 'usageDetails' in e ? e.usageDetails : {};
1089
+ R('storageEstimate', {
1090
+ quota: j(e.quota),
1091
+ usage: j(e.usage),
1092
+ caches: j(t.caches),
1093
+ indexedDB: j(t.indexedDB),
1094
+ serviceWorker: j(t.serviceWorkerRegistrations),
1095
+ });
1096
+ }, Pe = {
1097
+ finalMarkToStepsMap: {},
1098
+ startMarkToStepsMap: {},
1099
+ active: {},
1100
+ navigationSteps: {},
1101
+ }, Me = function (e) {
1102
+ delete Pe.active[e];
1103
+ }, Be = function () {
1104
+ return Pe.navigationSteps;
1105
+ }, Ce = function (e) {
1106
+ var t;
1107
+ return null !== (t = Be()[e]) && void 0 !== t ? t : {};
1108
+ }, De = function (e, t, n) {
1109
+ var r = 'step.' + e, i = u.getEntriesByName(p + t).length > 0;
1110
+ if (u.getEntriesByName(p + n).length > 0 && a.steps) {
1111
+ var o = A[a.steps[e].threshold], s = o.maxOutlierThreshold, c = o.vitalsThresholds;
1112
+ if (i) {
1113
+ var l = u.measure(r, p + t, p + n), d = l.duration;
1114
+ if (d <= s) {
1115
+ var m = (function (e, t) {
1116
+ return e <= t[0]
1117
+ ? 'good'
1118
+ : e <= t[1]
1119
+ ? 'needsImprovement'
1120
+ : 'poor';
1121
+ })(d, c);
1122
+ d >= 0 &&
1123
+ (N('userJourneyStep', d, m, { stepName: e }, void 0),
1124
+ u.measure('step.'.concat(e, '_vitals_').concat(m), {
1125
+ start: l.startTime + l.duration,
1126
+ end: l.startTime + l.duration,
1127
+ detail: {
1128
+ type: 'stepVital',
1129
+ duration: d,
1130
+ },
1131
+ }));
1132
+ }
1133
+ }
1134
+ }
1135
+ }, Ae = function () {
1136
+ var e = Be(), t = Pe.startMarkToStepsMap, n = Object.keys(e).length;
1137
+ if (0 === n)
1138
+ return {};
1139
+ var r = {}, i = n - 1, a = Ce(i);
1140
+ if ((Object.keys(a).forEach(function (e) {
1141
+ var n, i = null !== (n = t[e]) && void 0 !== n ? n : [];
1142
+ Object.keys(i).forEach(function (e) {
1143
+ r[e] = !0;
1144
+ });
1145
+ }),
1146
+ n > 1)) {
1147
+ var o = Ce(i - 1);
1148
+ Object.keys(o).forEach(function (e) {
1149
+ var n, i = null !== (n = t[e]) && void 0 !== n ? n : [];
1150
+ Object.keys(i).forEach(function (e) {
1151
+ r[e] = !0;
1152
+ });
1153
+ });
1154
+ }
1155
+ return r;
1156
+ }, Le = function () {
1157
+ var e, t = Object.keys(Pe.navigationSteps).length;
1158
+ Pe.navigationSteps[t] = {};
1159
+ var n = Ae();
1160
+ null === (e = a.onMarkStep) ||
1161
+ void 0 === e ||
1162
+ e.call(a, '', Object.keys(n));
1163
+ }, Ue = function (e) {
1164
+ var t, n, r, i, o, s, c;
1165
+ if (Pe.finalMarkToStepsMap[e]) {
1166
+ !(function (e) {
1167
+ var t = Pe.navigationSteps, n = Pe.finalMarkToStepsMap, r = Object.keys(t).length;
1168
+ if (0 !== r) {
1169
+ var i = r - 1, a = Ce(i);
1170
+ if (a && n[e]) {
1171
+ var o = n[e];
1172
+ o &&
1173
+ Object.keys(o).forEach(function (e) {
1174
+ if (a[e]) {
1175
+ var n = Ce(i) || {};
1176
+ (n[e] = !1), (t[i] = n);
1177
+ }
1178
+ if (r > 1) {
1179
+ var o = i - 1, s = Ce(o);
1180
+ s[e] && ((s[e] = !1), (t[o] = s));
1181
+ }
1182
+ });
1183
+ }
1184
+ }
1185
+ })(e);
1186
+ var u = Pe.finalMarkToStepsMap[e];
1187
+ Object.keys(u).forEach(function (t) {
1188
+ var n = u[t];
1189
+ n.forEach(Me),
1190
+ Promise.all(n.map(function (n) {
1191
+ return (function (e, t, n, r) {
1192
+ return new (n || (n = Promise))(function (e, t) {
1193
+ function i(e) {
1194
+ try {
1195
+ o(r.next(e));
1196
+ }
1197
+ catch (e) {
1198
+ t(e);
1199
+ }
1200
+ }
1201
+ function a(e) {
1202
+ try {
1203
+ o(r.throw(e));
1204
+ }
1205
+ catch (e) {
1206
+ t(e);
1207
+ }
1208
+ }
1209
+ function o(t) {
1210
+ var r;
1211
+ t.done
1212
+ ? e(t.value)
1213
+ : ((r = t.value),
1214
+ r instanceof n
1215
+ ? r
1216
+ : new n(function (e) {
1217
+ e(r);
1218
+ })).then(i, a);
1219
+ }
1220
+ o((r = r.apply(undefined, [])).next());
1221
+ });
1222
+ })(0, 0, void 0, function () {
1223
+ return (function (e, t) {
1224
+ var n, r, i, a, o = {
1225
+ label: 0,
1226
+ sent: function () {
1227
+ if (1 & i[0])
1228
+ throw i[1];
1229
+ return i[1];
1230
+ },
1231
+ trys: [],
1232
+ ops: [],
1233
+ };
1234
+ return ((a = {
1235
+ next: s(0),
1236
+ throw: s(1),
1237
+ return: s(2),
1238
+ }),
1239
+ 'function' == typeof Symbol &&
1240
+ (a[Symbol.iterator] =
1241
+ function () {
1242
+ return this;
1243
+ }),
1244
+ a);
1245
+ function s(a) {
1246
+ return function (s) {
1247
+ return (function (a) {
1248
+ if (n)
1249
+ throw new TypeError('Generator is already executing.');
1250
+ for (; o;)
1251
+ try {
1252
+ if (((n = 1),
1253
+ r &&
1254
+ (i =
1255
+ 2 & a[0]
1256
+ ? r.return
1257
+ : a[0]
1258
+ ? r.throw ||
1259
+ ((i =
1260
+ r.return) &&
1261
+ i.call(r),
1262
+ 0)
1263
+ : r.next) &&
1264
+ !(i = i.call(r, a[1])).done))
1265
+ return i;
1266
+ switch (((r = 0),
1267
+ i &&
1268
+ (a = [
1269
+ 2 & a[0],
1270
+ i.value,
1271
+ ]),
1272
+ a[0])) {
1273
+ case 0:
1274
+ case 1:
1275
+ i = a;
1276
+ break;
1277
+ case 4:
1278
+ return (o.label++,
1279
+ {
1280
+ value: a[1],
1281
+ done: !1,
1282
+ });
1283
+ case 5:
1284
+ o.label++,
1285
+ (r = a[1]),
1286
+ (a = [0]);
1287
+ continue;
1288
+ case 7:
1289
+ ;
1290
+ (a =
1291
+ o.ops.pop()),
1292
+ o.trys.pop();
1293
+ continue;
1294
+ default:
1295
+ if (!((i =
1296
+ (i =
1297
+ o.trys)
1298
+ .length >
1299
+ 0 &&
1300
+ i[i.length -
1301
+ 1]) ||
1302
+ (6 !==
1303
+ a[0] &&
1304
+ 2 !==
1305
+ a[0]))) {
1306
+ o = 0;
1307
+ continue;
1308
+ }
1309
+ if (3 === a[0] &&
1310
+ (!i ||
1311
+ (a[1] >
1312
+ i[0] &&
1313
+ a[1] <
1314
+ i[3]))) {
1315
+ o.label = a[1];
1316
+ break;
1317
+ }
1318
+ if (6 === a[0] &&
1319
+ o.label < i[1]) {
1320
+ ;
1321
+ (o.label =
1322
+ i[1]),
1323
+ (i = a);
1324
+ break;
1325
+ }
1326
+ if (i &&
1327
+ o.label < i[2]) {
1328
+ ;
1329
+ (o.label =
1330
+ i[2]),
1331
+ o.ops.push(a);
1332
+ break;
1333
+ }
1334
+ i[2] &&
1335
+ o.ops.pop(),
1336
+ o.trys.pop();
1337
+ continue;
1338
+ }
1339
+ a = t.call(e, o);
1340
+ }
1341
+ catch (e) {
1342
+ ;
1343
+ (a = [6, e]), (r = 0);
1344
+ }
1345
+ finally {
1346
+ n = i = 0;
1347
+ }
1348
+ if (5 & a[0])
1349
+ throw a[1];
1350
+ return {
1351
+ value: a[0]
1352
+ ? a[1]
1353
+ : void 0,
1354
+ done: !0,
1355
+ };
1356
+ })([a, s]);
1357
+ };
1358
+ }
1359
+ })(this, function (r) {
1360
+ switch (r.label) {
1361
+ case 0:
1362
+ return [4, De(n, t, e)];
1363
+ case 1:
1364
+ return r.sent(), [2];
1365
+ }
1366
+ });
1367
+ });
1368
+ })).catch(function () { });
1369
+ });
1370
+ }
1371
+ else
1372
+ (r = e),
1373
+ (i = Pe.navigationSteps),
1374
+ (o = Object.keys(i).length),
1375
+ ((c = Ce((s = (o > 0 ? o : 1) - 1)) || [])[r] = !0),
1376
+ (i[s] = c),
1377
+ (function (e) {
1378
+ var t, n = null !== (t = Pe.startMarkToStepsMap[e]) &&
1379
+ void 0 !== t
1380
+ ? t
1381
+ : [];
1382
+ Object.keys(n).forEach(function (e) {
1383
+ Pe.active[e] || (Pe.active[e] = !0);
1384
+ });
1385
+ })(e);
1386
+ if (a.enableNavigationTracking) {
1387
+ var l = Ae();
1388
+ null === (t = a.onMarkStep) ||
1389
+ void 0 === t ||
1390
+ t.call(a, e, Object.keys(l));
1391
+ }
1392
+ else
1393
+ null === (n = a.onMarkStep) ||
1394
+ void 0 === n ||
1395
+ n.call(a, e, Object.keys(Pe.active));
1396
+ }, Re = function (e) {
1397
+ u.mark(p + e), Ue(e);
1398
+ }, qe = function (e) {
1399
+ 0 === u.getEntriesByName(p + e).length &&
1400
+ (u.mark(p + e), Ue(e));
1401
+ }, Fe = 0, ze = (function () {
1402
+ function e(e) {
1403
+ if ((void 0 === e && (e = {}),
1404
+ (this.v = '9.0.0-rc.3'),
1405
+ (a.analyticsTracker = e.analyticsTracker),
1406
+ (a.isResourceTiming = !!e.resourceTiming),
1407
+ (a.isElementTiming = !!e.elementTiming),
1408
+ (a.maxTime = e.maxMeasureTime || a.maxTime),
1409
+ (a.reportOptions =
1410
+ e.reportOptions || a.reportOptions),
1411
+ (a.steps = e.steps),
1412
+ (a.onMarkStep = e.onMarkStep),
1413
+ (a.enableNavigationTracking =
1414
+ e.enableNavigationTracking),
1415
+ m())) {
1416
+ 'PerformanceObserver' in o && Ne(),
1417
+ void 0 !== document.hidden &&
1418
+ document.addEventListener('visibilitychange', _);
1419
+ var t = (function () {
1420
+ if (!m())
1421
+ return {};
1422
+ var e = u.getEntriesByType('navigation')[0];
1423
+ if (!e)
1424
+ return {};
1425
+ var t = e.responseStart, n = e.responseEnd;
1426
+ return {
1427
+ fetchTime: n - e.fetchStart,
1428
+ workerTime: e.workerStart > 0 ? n - e.workerStart : 0,
1429
+ totalTime: n - e.requestStart,
1430
+ downloadTime: n - t,
1431
+ timeToFirstByte: t - e.requestStart,
1432
+ headerSize: e.transferSize - e.encodedBodySize || 0,
1433
+ dnsLookupTime: e.domainLookupEnd - e.domainLookupStart,
1434
+ redirectTime: e.redirectEnd - e.redirectStart,
1435
+ };
1436
+ })();
1437
+ R('navigationTiming', t),
1438
+ t.redirectTime &&
1439
+ q({
1440
+ attribution: {},
1441
+ name: 'RT',
1442
+ rating: U('RT', t.redirectTime),
1443
+ value: t.redirectTime,
1444
+ }),
1445
+ R('networkInformation', (function () {
1446
+ if ('connection' in c) {
1447
+ var e = c.connection;
1448
+ return 'object' != typeof e
1449
+ ? {}
1450
+ : ((f = e.effectiveType),
1451
+ (v = !!e.saveData),
1452
+ {
1453
+ downlink: e.downlink,
1454
+ effectiveType: e.effectiveType,
1455
+ rtt: e.rtt,
1456
+ saveData: !!e.saveData,
1457
+ });
1458
+ }
1459
+ return {};
1460
+ })()),
1461
+ c &&
1462
+ c.storage &&
1463
+ 'function' == typeof c.storage.estimate &&
1464
+ c.storage.estimate().then(Ie),
1465
+ a.steps &&
1466
+ a.steps &&
1467
+ ((Pe.startMarkToStepsMap = {}),
1468
+ (Pe.finalMarkToStepsMap = {}),
1469
+ (Pe.active = {}),
1470
+ (Pe.navigationSteps = {}),
1471
+ Object.entries(a.steps).forEach(function (e) {
1472
+ var t, n, r = e[0], i = e[1].marks, a = i[0], o = i[1], s = null !==
1473
+ (n = Pe.startMarkToStepsMap[a]) &&
1474
+ void 0 !== n
1475
+ ? n
1476
+ : {};
1477
+ if (((s[r] = !0),
1478
+ (Pe.startMarkToStepsMap[a] = s),
1479
+ Pe.finalMarkToStepsMap[o])) {
1480
+ var c = Pe.finalMarkToStepsMap[o][a] || [];
1481
+ c.push(r),
1482
+ (Pe.finalMarkToStepsMap[o][a] = c);
1483
+ }
1484
+ else
1485
+ Pe.finalMarkToStepsMap[o] =
1486
+ (((t = {})[a] = [r]), t);
1487
+ }));
1488
+ }
1489
+ }
1490
+ return ((e.prototype.start = function (e) {
1491
+ m() &&
1492
+ !g[e] &&
1493
+ ((g[e] = !0), u.mark('mark_'.concat(e, '_start')));
1494
+ }),
1495
+ (e.prototype.end = function (e, t, n) {
1496
+ if ((void 0 === t && (t = {}),
1497
+ void 0 === n && (n = !0),
1498
+ m() && g[e])) {
1499
+ u.mark('mark_'.concat(e, '_end')), delete g[e];
1500
+ var r = (function (e) {
1501
+ u.measure(e, 'mark_'.concat(e, '_start'), 'mark_'.concat(e, '_end'));
1502
+ var t = u.getEntriesByName(e).pop();
1503
+ return t && 'measure' === t.entryType
1504
+ ? t.duration
1505
+ : -1;
1506
+ })(e);
1507
+ n && R(e, O(r), t);
1508
+ }
1509
+ }),
1510
+ (e.prototype.endPaint = function (e, t) {
1511
+ var n = this;
1512
+ setTimeout(function () {
1513
+ n.end(e, t);
1514
+ });
1515
+ }),
1516
+ (e.prototype.clear = function (e) {
1517
+ delete g[e],
1518
+ u.clearMarks &&
1519
+ (u.clearMarks('mark_'.concat(e, '_start')),
1520
+ u.clearMarks('mark_'.concat(e, '_end')));
1521
+ }),
1522
+ (e.prototype.markNTBT = function () {
1523
+ var e = this;
1524
+ this.start('ntbt'),
1525
+ (y.value = 0),
1526
+ clearTimeout(Fe),
1527
+ (Fe = setTimeout(function () {
1528
+ e.end('ntbt', {}, !1),
1529
+ q({
1530
+ attribution: {},
1531
+ name: 'NTBT',
1532
+ rating: U('NTBT', y.value),
1533
+ value: y.value,
1534
+ }),
1535
+ (y.value = 0);
1536
+ }, 2e3));
1537
+ }),
1538
+ e);
1539
+ })();
1540
+ },
1541
+ 426: (e, t) => {
1542
+ 'use strict';
1543
+ Symbol.for('react.element'),
1544
+ Symbol.for('react.portal'),
1545
+ Symbol.for('react.fragment'),
1546
+ Symbol.for('react.strict_mode'),
1547
+ Symbol.for('react.profiler'),
1548
+ Symbol.for('react.provider'),
1549
+ Symbol.for('react.context'),
1550
+ Symbol.for('react.forward_ref'),
1551
+ Symbol.for('react.suspense'),
1552
+ Symbol.for('react.memo'),
1553
+ Symbol.for('react.lazy'),
1554
+ Symbol.iterator;
1555
+ var n = {
1556
+ isMounted: function () {
1557
+ return !1;
1558
+ },
1559
+ enqueueForceUpdate: function () { },
1560
+ enqueueReplaceState: function () { },
1561
+ enqueueSetState: function () { },
1562
+ }, r = Object.assign, i = {};
1563
+ function a(e, t, r) {
1564
+ ;
1565
+ (this.props = e),
1566
+ (this.context = t),
1567
+ (this.refs = i),
1568
+ (this.updater = r || n);
1569
+ }
1570
+ function o() { }
1571
+ function s(e, t, r) {
1572
+ ;
1573
+ (this.props = e),
1574
+ (this.context = t),
1575
+ (this.refs = i),
1576
+ (this.updater = r || n);
1577
+ }
1578
+ ;
1579
+ (a.prototype.isReactComponent = {}),
1580
+ (a.prototype.setState = function (e, t) {
1581
+ if ('object' != typeof e &&
1582
+ 'function' != typeof e &&
1583
+ null != e)
1584
+ throw Error('setState(...): takes an object of state variables to update or a function which returns an object of state variables.');
1585
+ this.updater.enqueueSetState(this, e, t, 'setState');
1586
+ }),
1587
+ (a.prototype.forceUpdate = function (e) {
1588
+ this.updater.enqueueForceUpdate(this, e, 'forceUpdate');
1589
+ }),
1590
+ (o.prototype = a.prototype);
1591
+ var c = (s.prototype = new o());
1592
+ (c.constructor = s),
1593
+ r(c, a.prototype),
1594
+ (c.isPureReactComponent = !0);
1595
+ Array.isArray, Object.prototype.hasOwnProperty;
1596
+ var u = { current: null };
1597
+ (t.useCallback = function (e, t) {
1598
+ return u.current.useCallback(e, t);
1599
+ }),
1600
+ (t.useEffect = function (e, t) {
1601
+ return u.current.useEffect(e, t);
1602
+ }),
1603
+ (t.useRef = function (e) {
1604
+ return u.current.useRef(e);
1605
+ });
1606
+ },
1607
+ 784: (e, t, n) => {
1608
+ 'use strict';
1609
+ e.exports = n(426);
1610
+ },
1611
+ 353: function (e, t, n) {
1612
+ var r;
1613
+ !(function (i, a) {
1614
+ 'use strict';
1615
+ var o = 'function', s = 'undefined', c = 'object', u = 'string', l = 'major', d = 'model', p = 'name', m = 'type', f = 'vendor', v = 'version', g = 'architecture', b = 'console', h = 'mobile', w = 'tablet', y = 'smarttv', T = 'wearable', k = 'embedded', _ = 'Amazon', S = 'Apple', E = 'ASUS', x = 'BlackBerry', O = 'Browser', j = 'Chrome', N = 'Firefox', I = 'Google', P = 'Huawei', M = 'LG', B = 'Microsoft', C = 'Motorola', D = 'Opera', A = 'Samsung', L = 'Sharp', U = 'Sony', R = 'Xiaomi', q = 'Zebra', F = 'Facebook', z = 'Chromium OS', K = 'Mac OS', $ = function (e) {
1616
+ for (var t = {}, n = 0; n < e.length; n++)
1617
+ t[e[n].toUpperCase()] = e[n];
1618
+ return t;
1619
+ }, Q = function (e, t) {
1620
+ return typeof e === u && -1 !== W(t).indexOf(W(e));
1621
+ }, W = function (e) {
1622
+ return e.toLowerCase();
1623
+ }, H = function (e, t) {
1624
+ if (typeof e === u)
1625
+ return ((e = e.replace(/^\s\s*/, '')),
1626
+ typeof t === s ? e : e.substring(0, 350));
1627
+ }, V = function (e, t) {
1628
+ for (var n, r, i, s, u, l, d = 0; d < t.length && !u;) {
1629
+ var p = t[d], m = t[d + 1];
1630
+ for (n = r = 0; n < p.length && !u && p[n];)
1631
+ if ((u = p[n++].exec(e)))
1632
+ for (i = 0; i < m.length; i++)
1633
+ (l = u[++r]),
1634
+ typeof (s = m[i]) === c && s.length > 0
1635
+ ? 2 === s.length
1636
+ ? typeof s[1] == o
1637
+ ? (this[s[0]] = s[1].call(this, l))
1638
+ : (this[s[0]] = s[1])
1639
+ : 3 === s.length
1640
+ ? typeof s[1] !== o ||
1641
+ (s[1].exec && s[1].test)
1642
+ ? (this[s[0]] = l
1643
+ ? l.replace(s[1], s[2])
1644
+ : a)
1645
+ : (this[s[0]] = l
1646
+ ? s[1].call(this, l, s[2])
1647
+ : a)
1648
+ : 4 === s.length &&
1649
+ (this[s[0]] = l
1650
+ ? s[3].call(this, l.replace(s[1], s[2]))
1651
+ : a)
1652
+ : (this[s] = l || a);
1653
+ d += 2;
1654
+ }
1655
+ }, J = function (e, t) {
1656
+ for (var n in t)
1657
+ if (typeof t[n] === c && t[n].length > 0) {
1658
+ for (var r = 0; r < t[n].length; r++)
1659
+ if (Q(t[n][r], e))
1660
+ return '?' === n ? a : n;
1661
+ }
1662
+ else if (Q(t[n], e))
1663
+ return '?' === n ? a : n;
1664
+ return e;
1665
+ }, X = {
1666
+ ME: '4.90',
1667
+ 'NT 3.11': 'NT3.51',
1668
+ 'NT 4.0': 'NT4.0',
1669
+ 2e3: 'NT 5.0',
1670
+ XP: ['NT 5.1', 'NT 5.2'],
1671
+ Vista: 'NT 6.0',
1672
+ 7: 'NT 6.1',
1673
+ 8: 'NT 6.2',
1674
+ 8.1: 'NT 6.3',
1675
+ 10: ['NT 6.4', 'NT 10.0'],
1676
+ RT: 'ARM',
1677
+ }, G = {
1678
+ browser: [
1679
+ [/\b(?:crmo|crios)\/([\w\.]+)/i],
1680
+ [v, [p, 'Chrome']],
1681
+ [/edg(?:e|ios|a)?\/([\w\.]+)/i],
1682
+ [v, [p, 'Edge']],
1683
+ [
1684
+ /(opera mini)\/([-\w\.]+)/i,
1685
+ /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
1686
+ /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i,
1687
+ ],
1688
+ [p, v],
1689
+ [/opios[\/ ]+([\w\.]+)/i],
1690
+ [v, [p, D + ' Mini']],
1691
+ [/\bopr\/([\w\.]+)/i],
1692
+ [v, [p, D]],
1693
+ [
1694
+ /(kindle)\/([\w\.]+)/i,
1695
+ /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,
1696
+ /(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,
1697
+ /(ba?idubrowser)[\/ ]?([\w\.]+)/i,
1698
+ /(?:ms|\()(ie) ([\w\.]+)/i,
1699
+ /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,
1700
+ /(heytap|ovi)browser\/([\d\.]+)/i,
1701
+ /(weibo)__([\d\.]+)/i,
1702
+ ],
1703
+ [p, v],
1704
+ [
1705
+ /(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i,
1706
+ ],
1707
+ [v, [p, 'UC' + O]],
1708
+ [
1709
+ /microm.+\bqbcore\/([\w\.]+)/i,
1710
+ /\bqbcore\/([\w\.]+).+microm/i,
1711
+ ],
1712
+ [v, [p, 'WeChat(Win) Desktop']],
1713
+ [/micromessenger\/([\w\.]+)/i],
1714
+ [v, [p, 'WeChat']],
1715
+ [/konqueror\/([\w\.]+)/i],
1716
+ [v, [p, 'Konqueror']],
1717
+ [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],
1718
+ [v, [p, 'IE']],
1719
+ [/ya(?:search)?browser\/([\w\.]+)/i],
1720
+ [v, [p, 'Yandex']],
1721
+ [/(avast|avg)\/([\w\.]+)/i],
1722
+ [[p, /(.+)/, '$1 Secure ' + O], v],
1723
+ [/\bfocus\/([\w\.]+)/i],
1724
+ [v, [p, N + ' Focus']],
1725
+ [/\bopt\/([\w\.]+)/i],
1726
+ [v, [p, D + ' Touch']],
1727
+ [/coc_coc\w+\/([\w\.]+)/i],
1728
+ [v, [p, 'Coc Coc']],
1729
+ [/dolfin\/([\w\.]+)/i],
1730
+ [v, [p, 'Dolphin']],
1731
+ [/coast\/([\w\.]+)/i],
1732
+ [v, [p, D + ' Coast']],
1733
+ [/miuibrowser\/([\w\.]+)/i],
1734
+ [v, [p, 'MIUI ' + O]],
1735
+ [/fxios\/([-\w\.]+)/i],
1736
+ [v, [p, N]],
1737
+ [/\bqihu|(qi?ho?o?|360)browser/i],
1738
+ [[p, '360 ' + O]],
1739
+ [
1740
+ /(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i,
1741
+ ],
1742
+ [[p, /(.+)/, '$1 ' + O], v],
1743
+ [/(comodo_dragon)\/([\w\.]+)/i],
1744
+ [[p, /_/g, ' '], v],
1745
+ [
1746
+ /(electron)\/([\w\.]+) safari/i,
1747
+ /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
1748
+ /m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i,
1749
+ ],
1750
+ [p, v],
1751
+ [
1752
+ /(metasr)[\/ ]?([\w\.]+)/i,
1753
+ /(lbbrowser)/i,
1754
+ /\[(linkedin)app\]/i,
1755
+ ],
1756
+ [p],
1757
+ [
1758
+ /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i,
1759
+ ],
1760
+ [[p, F], v],
1761
+ [
1762
+ /(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
1763
+ /(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
1764
+ /safari (line)\/([\w\.]+)/i,
1765
+ /\b(line)\/([\w\.]+)\/iab/i,
1766
+ /(chromium|instagram)[\/ ]([-\w\.]+)/i,
1767
+ ],
1768
+ [p, v],
1769
+ [/\bgsa\/([\w\.]+) .*safari\//i],
1770
+ [v, [p, 'GSA']],
1771
+ [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],
1772
+ [v, [p, 'TikTok']],
1773
+ [/headlesschrome(?:\/([\w\.]+)| )/i],
1774
+ [v, [p, j + ' Headless']],
1775
+ [/ wv\).+(chrome)\/([\w\.]+)/i],
1776
+ [[p, j + ' WebView'], v],
1777
+ [
1778
+ /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i,
1779
+ ],
1780
+ [v, [p, 'Android ' + O]],
1781
+ [
1782
+ /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i,
1783
+ ],
1784
+ [p, v],
1785
+ [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],
1786
+ [v, [p, 'Mobile Safari']],
1787
+ [
1788
+ /version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i,
1789
+ ],
1790
+ [v, p],
1791
+ [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],
1792
+ [
1793
+ p,
1794
+ [
1795
+ v,
1796
+ J,
1797
+ {
1798
+ '1.0': '/8',
1799
+ 1.2: '/1',
1800
+ 1.3: '/3',
1801
+ '2.0': '/412',
1802
+ '2.0.2': '/416',
1803
+ '2.0.3': '/417',
1804
+ '2.0.4': '/419',
1805
+ '?': '/',
1806
+ },
1807
+ ],
1808
+ ],
1809
+ [/(webkit|khtml)\/([\w\.]+)/i],
1810
+ [p, v],
1811
+ [/(navigator|netscape\d?)\/([-\w\.]+)/i],
1812
+ [[p, 'Netscape'], v],
1813
+ [/mobile vr; rv:([\w\.]+)\).+firefox/i],
1814
+ [v, [p, N + ' Reality']],
1815
+ [
1816
+ /ekiohf.+(flow)\/([\w\.]+)/i,
1817
+ /(swiftfox)/i,
1818
+ /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,
1819
+ /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,
1820
+ /(firefox)\/([\w\.]+)/i,
1821
+ /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
1822
+ /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
1823
+ /(links) \(([\w\.]+)/i,
1824
+ /panasonic;(viera)/i,
1825
+ ],
1826
+ [p, v],
1827
+ [/(cobalt)\/([\w\.]+)/i],
1828
+ [p, [v, /master.|lts./, '']],
1829
+ ],
1830
+ cpu: [
1831
+ [/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],
1832
+ [[g, 'amd64']],
1833
+ [/(ia32(?=;))/i],
1834
+ [[g, W]],
1835
+ [/((?:i[346]|x)86)[;\)]/i],
1836
+ [[g, 'ia32']],
1837
+ [/\b(aarch64|arm(v?8e?l?|_?64))\b/i],
1838
+ [[g, 'arm64']],
1839
+ [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],
1840
+ [[g, 'armhf']],
1841
+ [/windows (ce|mobile); ppc;/i],
1842
+ [[g, 'arm']],
1843
+ [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],
1844
+ [[g, /ower/, '', W]],
1845
+ [/(sun4\w)[;\)]/i],
1846
+ [[g, 'sparc']],
1847
+ [
1848
+ /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i,
1849
+ ],
1850
+ [[g, W]],
1851
+ ],
1852
+ device: [
1853
+ [
1854
+ /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i,
1855
+ ],
1856
+ [d, [f, A], [m, w]],
1857
+ [
1858
+ /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
1859
+ /samsung[- ]([-\w]+)/i,
1860
+ /sec-(sgh\w+)/i,
1861
+ ],
1862
+ [d, [f, A], [m, h]],
1863
+ [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],
1864
+ [d, [f, S], [m, h]],
1865
+ [
1866
+ /\((ipad);[-\w\),; ]+apple/i,
1867
+ /applecoremedia\/[\w\.]+ \((ipad)/i,
1868
+ /\b(ipad)\d\d?,\d\d?[;\]].+ios/i,
1869
+ ],
1870
+ [d, [f, S], [m, w]],
1871
+ [/(macintosh);/i],
1872
+ [d, [f, S]],
1873
+ [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],
1874
+ [d, [f, L], [m, h]],
1875
+ [
1876
+ /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i,
1877
+ ],
1878
+ [d, [f, P], [m, w]],
1879
+ [
1880
+ /(?:huawei|honor)([-\w ]+)[;\)]/i,
1881
+ /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i,
1882
+ ],
1883
+ [d, [f, P], [m, h]],
1884
+ [
1885
+ /\b(poco[\w ]+)(?: bui|\))/i,
1886
+ /\b; (\w+) build\/hm\1/i,
1887
+ /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
1888
+ /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
1889
+ /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i,
1890
+ ],
1891
+ [
1892
+ [d, /_/g, ' '],
1893
+ [f, R],
1894
+ [m, h],
1895
+ ],
1896
+ [/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],
1897
+ [
1898
+ [d, /_/g, ' '],
1899
+ [f, R],
1900
+ [m, w],
1901
+ ],
1902
+ [
1903
+ /; (\w+) bui.+ oppo/i,
1904
+ /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i,
1905
+ ],
1906
+ [d, [f, 'OPPO'], [m, h]],
1907
+ [
1908
+ /vivo (\w+)(?: bui|\))/i,
1909
+ /\b(v[12]\d{3}\w?[at])(?: bui|;)/i,
1910
+ ],
1911
+ [d, [f, 'Vivo'], [m, h]],
1912
+ [/\b(rmx[12]\d{3})(?: bui|;|\))/i],
1913
+ [d, [f, 'Realme'], [m, h]],
1914
+ [
1915
+ /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
1916
+ /\bmot(?:orola)?[- ](\w*)/i,
1917
+ /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i,
1918
+ ],
1919
+ [d, [f, C], [m, h]],
1920
+ [/\b(mz60\d|xoom[2 ]{0,2}) build\//i],
1921
+ [d, [f, C], [m, w]],
1922
+ [
1923
+ /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i,
1924
+ ],
1925
+ [d, [f, M], [m, w]],
1926
+ [
1927
+ /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
1928
+ /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
1929
+ /\blg-?([\d\w]+) bui/i,
1930
+ ],
1931
+ [d, [f, M], [m, h]],
1932
+ [
1933
+ /(ideatab[-\w ]+)/i,
1934
+ /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i,
1935
+ ],
1936
+ [d, [f, 'Lenovo'], [m, w]],
1937
+ [
1938
+ /(?:maemo|nokia).*(n900|lumia \d+)/i,
1939
+ /nokia[-_ ]?([-\w\.]*)/i,
1940
+ ],
1941
+ [
1942
+ [d, /_/g, ' '],
1943
+ [f, 'Nokia'],
1944
+ [m, h],
1945
+ ],
1946
+ [/(pixel c)\b/i],
1947
+ [d, [f, I], [m, w]],
1948
+ [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],
1949
+ [d, [f, I], [m, h]],
1950
+ [
1951
+ /droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i,
1952
+ ],
1953
+ [d, [f, U], [m, h]],
1954
+ [
1955
+ /sony tablet [ps]/i,
1956
+ /\b(?:sony)?sgp\w+(?: bui|\))/i,
1957
+ ],
1958
+ [
1959
+ [d, 'Xperia Tablet'],
1960
+ [f, U],
1961
+ [m, w],
1962
+ ],
1963
+ [
1964
+ / (kb2005|in20[12]5|be20[12][59])\b/i,
1965
+ /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i,
1966
+ ],
1967
+ [d, [f, 'OnePlus'], [m, h]],
1968
+ [
1969
+ /(alexa)webm/i,
1970
+ /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,
1971
+ /(kf[a-z]+)( bui|\)).+silk\//i,
1972
+ ],
1973
+ [d, [f, _], [m, w]],
1974
+ [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],
1975
+ [
1976
+ [d, /(.+)/g, 'Fire Phone $1'],
1977
+ [f, _],
1978
+ [m, h],
1979
+ ],
1980
+ [/(playbook);[-\w\),; ]+(rim)/i],
1981
+ [d, f, [m, w]],
1982
+ [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i],
1983
+ [d, [f, x], [m, h]],
1984
+ [
1985
+ /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i,
1986
+ ],
1987
+ [d, [f, E], [m, w]],
1988
+ [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],
1989
+ [d, [f, E], [m, h]],
1990
+ [/(nexus 9)/i],
1991
+ [d, [f, 'HTC'], [m, w]],
1992
+ [
1993
+ /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
1994
+ /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
1995
+ /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i,
1996
+ ],
1997
+ [f, [d, /_/g, ' '], [m, h]],
1998
+ [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],
1999
+ [d, [f, 'Acer'], [m, w]],
2000
+ [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i],
2001
+ [d, [f, 'Meizu'], [m, h]],
2002
+ [
2003
+ /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,
2004
+ /(hp) ([\w ]+\w)/i,
2005
+ /(asus)-?(\w+)/i,
2006
+ /(microsoft); (lumia[\w ]+)/i,
2007
+ /(lenovo)[-_ ]?([-\w]+)/i,
2008
+ /(jolla)/i,
2009
+ /(oppo) ?([\w ]+) bui/i,
2010
+ ],
2011
+ [f, d, [m, h]],
2012
+ [
2013
+ /(kobo)\s(ereader|touch)/i,
2014
+ /(archos) (gamepad2?)/i,
2015
+ /(hp).+(touchpad(?!.+tablet)|tablet)/i,
2016
+ /(kindle)\/([\w\.]+)/i,
2017
+ /(nook)[\w ]+build\/(\w+)/i,
2018
+ /(dell) (strea[kpr\d ]*[\dko])/i,
2019
+ /(le[- ]+pan)[- ]+(\w{1,9}) bui/i,
2020
+ /(trinity)[- ]*(t\d{3}) bui/i,
2021
+ /(gigaset)[- ]+(q\w{1,9}) bui/i,
2022
+ /(vodafone) ([\w ]+)(?:\)| bui)/i,
2023
+ ],
2024
+ [f, d, [m, w]],
2025
+ [/(surface duo)/i],
2026
+ [d, [f, B], [m, w]],
2027
+ [/droid [\d\.]+; (fp\du?)(?: b|\))/i],
2028
+ [d, [f, 'Fairphone'], [m, h]],
2029
+ [/(u304aa)/i],
2030
+ [d, [f, 'AT&T'], [m, h]],
2031
+ [/\bsie-(\w*)/i],
2032
+ [d, [f, 'Siemens'], [m, h]],
2033
+ [/\b(rct\w+) b/i],
2034
+ [d, [f, 'RCA'], [m, w]],
2035
+ [/\b(venue[\d ]{2,7}) b/i],
2036
+ [d, [f, 'Dell'], [m, w]],
2037
+ [/\b(q(?:mv|ta)\w+) b/i],
2038
+ [d, [f, 'Verizon'], [m, w]],
2039
+ [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],
2040
+ [d, [f, 'Barnes & Noble'], [m, w]],
2041
+ [/\b(tm\d{3}\w+) b/i],
2042
+ [d, [f, 'NuVision'], [m, w]],
2043
+ [/\b(k88) b/i],
2044
+ [d, [f, 'ZTE'], [m, w]],
2045
+ [/\b(nx\d{3}j) b/i],
2046
+ [d, [f, 'ZTE'], [m, h]],
2047
+ [/\b(gen\d{3}) b.+49h/i],
2048
+ [d, [f, 'Swiss'], [m, h]],
2049
+ [/\b(zur\d{3}) b/i],
2050
+ [d, [f, 'Swiss'], [m, w]],
2051
+ [/\b((zeki)?tb.*\b) b/i],
2052
+ [d, [f, 'Zeki'], [m, w]],
2053
+ [
2054
+ /\b([yr]\d{2}) b/i,
2055
+ /\b(dragon[- ]+touch |dt)(\w{5}) b/i,
2056
+ ],
2057
+ [[f, 'Dragon Touch'], d, [m, w]],
2058
+ [/\b(ns-?\w{0,9}) b/i],
2059
+ [d, [f, 'Insignia'], [m, w]],
2060
+ [/\b((nxa|next)-?\w{0,9}) b/i],
2061
+ [d, [f, 'NextBook'], [m, w]],
2062
+ [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],
2063
+ [[f, 'Voice'], d, [m, h]],
2064
+ [/\b(lvtel\-)?(v1[12]) b/i],
2065
+ [[f, 'LvTel'], d, [m, h]],
2066
+ [/\b(ph-1) /i],
2067
+ [d, [f, 'Essential'], [m, h]],
2068
+ [/\b(v(100md|700na|7011|917g).*\b) b/i],
2069
+ [d, [f, 'Envizen'], [m, w]],
2070
+ [/\b(trio[-\w\. ]+) b/i],
2071
+ [d, [f, 'MachSpeed'], [m, w]],
2072
+ [/\btu_(1491) b/i],
2073
+ [d, [f, 'Rotor'], [m, w]],
2074
+ [/(shield[\w ]+) b/i],
2075
+ [d, [f, 'Nvidia'], [m, w]],
2076
+ [/(sprint) (\w+)/i],
2077
+ [f, d, [m, h]],
2078
+ [/(kin\.[onetw]{3})/i],
2079
+ [
2080
+ [d, /\./g, ' '],
2081
+ [f, B],
2082
+ [m, h],
2083
+ ],
2084
+ [
2085
+ /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i,
2086
+ ],
2087
+ [d, [f, q], [m, w]],
2088
+ [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],
2089
+ [d, [f, q], [m, h]],
2090
+ [/smart-tv.+(samsung)/i],
2091
+ [f, [m, y]],
2092
+ [/hbbtv.+maple;(\d+)/i],
2093
+ [
2094
+ [d, /^/, 'SmartTV'],
2095
+ [f, A],
2096
+ [m, y],
2097
+ ],
2098
+ [
2099
+ /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i,
2100
+ ],
2101
+ [
2102
+ [f, M],
2103
+ [m, y],
2104
+ ],
2105
+ [/(apple) ?tv/i],
2106
+ [f, [d, S + ' TV'], [m, y]],
2107
+ [/crkey/i],
2108
+ [
2109
+ [d, j + 'cast'],
2110
+ [f, I],
2111
+ [m, y],
2112
+ ],
2113
+ [/droid.+aft(\w)( bui|\))/i],
2114
+ [d, [f, _], [m, y]],
2115
+ [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i],
2116
+ [d, [f, L], [m, y]],
2117
+ [/(bravia[\w ]+)( bui|\))/i],
2118
+ [d, [f, U], [m, y]],
2119
+ [/(mitv-\w{5}) bui/i],
2120
+ [d, [f, R], [m, y]],
2121
+ [/Hbbtv.*(technisat) (.*);/i],
2122
+ [f, d, [m, y]],
2123
+ [
2124
+ /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
2125
+ /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i,
2126
+ ],
2127
+ [
2128
+ [f, H],
2129
+ [d, H],
2130
+ [m, y],
2131
+ ],
2132
+ [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],
2133
+ [[m, y]],
2134
+ [/(ouya)/i, /(nintendo) ([wids3utch]+)/i],
2135
+ [f, d, [m, b]],
2136
+ [/droid.+; (shield) bui/i],
2137
+ [d, [f, 'Nvidia'], [m, b]],
2138
+ [/(playstation [345portablevi]+)/i],
2139
+ [d, [f, U], [m, b]],
2140
+ [/\b(xbox(?: one)?(?!; xbox))[\); ]/i],
2141
+ [d, [f, B], [m, b]],
2142
+ [/((pebble))app/i],
2143
+ [f, d, [m, T]],
2144
+ [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],
2145
+ [d, [f, S], [m, T]],
2146
+ [/droid.+; (glass) \d/i],
2147
+ [d, [f, I], [m, T]],
2148
+ [/droid.+; (wt63?0{2,3})\)/i],
2149
+ [d, [f, q], [m, T]],
2150
+ [/(quest( 2| pro)?)/i],
2151
+ [d, [f, F], [m, T]],
2152
+ [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],
2153
+ [f, [m, k]],
2154
+ [/(aeobc)\b/i],
2155
+ [d, [f, _], [m, k]],
2156
+ [
2157
+ /droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i,
2158
+ ],
2159
+ [d, [m, h]],
2160
+ [
2161
+ /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i,
2162
+ ],
2163
+ [d, [m, w]],
2164
+ [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],
2165
+ [[m, w]],
2166
+ [
2167
+ /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i,
2168
+ ],
2169
+ [[m, h]],
2170
+ [/(android[-\w\. ]{0,9});.+buil/i],
2171
+ [d, [f, 'Generic']],
2172
+ ],
2173
+ engine: [
2174
+ [/windows.+ edge\/([\w\.]+)/i],
2175
+ [v, [p, 'EdgeHTML']],
2176
+ [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],
2177
+ [v, [p, 'Blink']],
2178
+ [
2179
+ /(presto)\/([\w\.]+)/i,
2180
+ /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,
2181
+ /ekioh(flow)\/([\w\.]+)/i,
2182
+ /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
2183
+ /(icab)[\/ ]([23]\.[\d\.]+)/i,
2184
+ /\b(libweb)/i,
2185
+ ],
2186
+ [p, v],
2187
+ [/rv\:([\w\.]{1,9})\b.+(gecko)/i],
2188
+ [v, p],
2189
+ ],
2190
+ os: [
2191
+ [/microsoft (windows) (vista|xp)/i],
2192
+ [p, v],
2193
+ [
2194
+ /(windows) nt 6\.2; (arm)/i,
2195
+ /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,
2196
+ /(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
2197
+ ],
2198
+ [p, [v, J, X]],
2199
+ [/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],
2200
+ [
2201
+ [p, 'Windows'],
2202
+ [v, J, X],
2203
+ ],
2204
+ [
2205
+ /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
2206
+ /ios;fbsv\/([\d\.]+)/i,
2207
+ /cfnetwork\/.+darwin/i,
2208
+ ],
2209
+ [
2210
+ [v, /_/g, '.'],
2211
+ [p, 'iOS'],
2212
+ ],
2213
+ [
2214
+ /(mac os x) ?([\w\. ]*)/i,
2215
+ /(macintosh|mac_powerpc\b)(?!.+haiku)/i,
2216
+ ],
2217
+ [
2218
+ [p, K],
2219
+ [v, /_/g, '.'],
2220
+ ],
2221
+ [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],
2222
+ [v, p],
2223
+ [
2224
+ /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
2225
+ /(blackberry)\w*\/([\w\.]*)/i,
2226
+ /(tizen|kaios)[\/ ]([\w\.]+)/i,
2227
+ /\((series40);/i,
2228
+ ],
2229
+ [p, v],
2230
+ [/\(bb(10);/i],
2231
+ [v, [p, x]],
2232
+ [
2233
+ /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i,
2234
+ ],
2235
+ [v, [p, 'Symbian']],
2236
+ [
2237
+ /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i,
2238
+ ],
2239
+ [v, [p, N + ' OS']],
2240
+ [
2241
+ /web0s;.+rt(tv)/i,
2242
+ /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,
2243
+ ],
2244
+ [v, [p, 'webOS']],
2245
+ [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],
2246
+ [v, [p, 'watchOS']],
2247
+ [/crkey\/([\d\.]+)/i],
2248
+ [v, [p, j + 'cast']],
2249
+ [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],
2250
+ [[p, z], v],
2251
+ [
2252
+ /panasonic;(viera)/i,
2253
+ /(netrange)mmh/i,
2254
+ /(nettv)\/(\d+\.[\w\.]+)/i,
2255
+ /(nintendo|playstation) ([wids345portablevuch]+)/i,
2256
+ /(xbox); +xbox ([^\);]+)/i,
2257
+ /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
2258
+ /(mint)[\/\(\) ]?(\w*)/i,
2259
+ /(mageia|vectorlinux)[; ]/i,
2260
+ /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
2261
+ /(hurd|linux) ?([\w\.]*)/i,
2262
+ /(gnu) ?([\w\.]*)/i,
2263
+ /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
2264
+ /(haiku) (\w+)/i,
2265
+ ],
2266
+ [p, v],
2267
+ [/(sunos) ?([\w\.\d]*)/i],
2268
+ [[p, 'Solaris'], v],
2269
+ [
2270
+ /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
2271
+ /(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
2272
+ /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
2273
+ /(unix) ?([\w\.]*)/i,
2274
+ ],
2275
+ [p, v],
2276
+ ],
2277
+ }, Z = function (e, t) {
2278
+ if ((typeof e === c && ((t = e), (e = a)),
2279
+ !(this instanceof Z)))
2280
+ return new Z(e, t).getResult();
2281
+ var n = typeof i !== s && i.navigator ? i.navigator : a, r = e || (n && n.userAgent ? n.userAgent : ''), b = n && n.userAgentData ? n.userAgentData : a, y = t
2282
+ ? (function (e, t) {
2283
+ var n = {};
2284
+ for (var r in e)
2285
+ t[r] && t[r].length % 2 == 0
2286
+ ? (n[r] = t[r].concat(e[r]))
2287
+ : (n[r] = e[r]);
2288
+ return n;
2289
+ })(G, t)
2290
+ : G, T = n && n.userAgent == r;
2291
+ return ((this.getBrowser = function () {
2292
+ var e, t = {};
2293
+ return ((t[p] = a),
2294
+ (t[v] = a),
2295
+ V.call(t, r, y.browser),
2296
+ (t[l] =
2297
+ typeof (e = t[v]) === u
2298
+ ? e.replace(/[^\d\.]/g, '').split('.')[0]
2299
+ : a),
2300
+ T &&
2301
+ n &&
2302
+ n.brave &&
2303
+ typeof n.brave.isBrave == o &&
2304
+ (t[p] = 'Brave'),
2305
+ t);
2306
+ }),
2307
+ (this.getCPU = function () {
2308
+ var e = {};
2309
+ return (e[g] = a), V.call(e, r, y.cpu), e;
2310
+ }),
2311
+ (this.getDevice = function () {
2312
+ var e = {};
2313
+ return ((e[f] = a),
2314
+ (e[d] = a),
2315
+ (e[m] = a),
2316
+ V.call(e, r, y.device),
2317
+ T && !e[m] && b && b.mobile && (e[m] = h),
2318
+ T &&
2319
+ 'Macintosh' == e[d] &&
2320
+ n &&
2321
+ typeof n.standalone !== s &&
2322
+ n.maxTouchPoints &&
2323
+ n.maxTouchPoints > 2 &&
2324
+ ((e[d] = 'iPad'), (e[m] = w)),
2325
+ e);
2326
+ }),
2327
+ (this.getEngine = function () {
2328
+ var e = {};
2329
+ return ((e[p] = a),
2330
+ (e[v] = a),
2331
+ V.call(e, r, y.engine),
2332
+ e);
2333
+ }),
2334
+ (this.getOS = function () {
2335
+ var e = {};
2336
+ return ((e[p] = a),
2337
+ (e[v] = a),
2338
+ V.call(e, r, y.os),
2339
+ T &&
2340
+ !e[p] &&
2341
+ b &&
2342
+ 'Unknown' != b.platform &&
2343
+ (e[p] = b.platform
2344
+ .replace(/chrome os/i, z)
2345
+ .replace(/macos/i, K)),
2346
+ e);
2347
+ }),
2348
+ (this.getResult = function () {
2349
+ return {
2350
+ ua: this.getUA(),
2351
+ browser: this.getBrowser(),
2352
+ engine: this.getEngine(),
2353
+ os: this.getOS(),
2354
+ device: this.getDevice(),
2355
+ cpu: this.getCPU(),
2356
+ };
2357
+ }),
2358
+ (this.getUA = function () {
2359
+ return r;
2360
+ }),
2361
+ (this.setUA = function (e) {
2362
+ return ((r =
2363
+ typeof e === u && e.length > 350
2364
+ ? H(e, 350)
2365
+ : e),
2366
+ this);
2367
+ }),
2368
+ this.setUA(r),
2369
+ this);
2370
+ };
2371
+ (Z.VERSION = '1.0.35'),
2372
+ (Z.BROWSER = $([p, v, l])),
2373
+ (Z.CPU = $([g])),
2374
+ (Z.DEVICE = $([d, f, m, b, h, y, w, T, k])),
2375
+ (Z.ENGINE = Z.OS = $([p, v])),
2376
+ typeof t !== s
2377
+ ? (e.exports && (t = e.exports = Z), (t.UAParser = Z))
2378
+ : n.amdO
2379
+ ? (r = function () {
2380
+ return Z;
2381
+ }.call(t, n, t, e)) === a || (e.exports = r)
2382
+ : typeof i !== s && (i.UAParser = Z);
2383
+ var Y = typeof i !== s && (i.jQuery || i.Zepto);
2384
+ if (Y && !Y.ua) {
2385
+ var ee = new Z();
2386
+ (Y.ua = ee.getResult()),
2387
+ (Y.ua.get = function () {
2388
+ return ee.getUA();
2389
+ }),
2390
+ (Y.ua.set = function (e) {
2391
+ ee.setUA(e);
2392
+ var t = ee.getResult();
2393
+ for (var n in t)
2394
+ Y.ua[n] = t[n];
2395
+ });
2396
+ }
2397
+ })('object' == typeof window ? window : this);
2398
+ },
2399
+ }, t = {};
2400
+ function n(r) {
2401
+ var i = t[r];
2402
+ if (void 0 !== i)
2403
+ return i.exports;
2404
+ var a = (t[r] = { exports: {} });
2405
+ return e[r].call(a.exports, a, a.exports, n), a.exports;
2406
+ }
2407
+ ;
2408
+ (n.amdO = {}),
2409
+ (n.n = (e) => {
2410
+ var t = e && e.__esModule ? () => e.default : () => e;
2411
+ return n.d(t, { a: t }), t;
2412
+ }),
2413
+ (n.d = (e, t) => {
2414
+ for (var r in t)
2415
+ n.o(t, r) &&
2416
+ !n.o(e, r) &&
2417
+ Object.defineProperty(e, r, { enumerable: !0, get: t[r] });
2418
+ }),
2419
+ (n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)),
2420
+ (n.r = (e) => {
2421
+ 'undefined' != typeof Symbol &&
2422
+ Symbol.toStringTag &&
2423
+ Object.defineProperty(e, Symbol.toStringTag, {
2424
+ value: 'Module',
2425
+ }),
2426
+ Object.defineProperty(e, '__esModule', { value: !0 });
2427
+ });
2428
+ var r = {};
2429
+ return ((() => {
2430
+ 'use strict';
2431
+ n.r(r),
2432
+ n.d(r, {
2433
+ ActionType: () => f,
2434
+ AmplitudePlatformName: () => g,
2435
+ AnalyticsEventImportance: () => l,
2436
+ AnalyticsQueries: () => e,
2437
+ AuthStatus: () => b,
2438
+ ComponentType: () => m,
2439
+ IThresholdTier: () => Jt,
2440
+ MetricType: () => d,
2441
+ PlatformName: () => v,
2442
+ SessionActions: () => h,
2443
+ SessionAutomatedEvents: () => w,
2444
+ SessionRank: () => y,
2445
+ SubjectType: () => p,
2446
+ UserTypeCommerce: () => c,
2447
+ UserTypeInsto: () => i,
2448
+ UserTypeRetail: () => t,
2449
+ UserTypeRetailBusinessBanking: () => s,
2450
+ UserTypeRetailEmployeeInternal: () => a,
2451
+ UserTypeRetailEmployeePersonal: () => o,
2452
+ UserTypeWallet: () => u,
2453
+ automatedEvents: () => xn,
2454
+ automatedMappingConfig: () => In,
2455
+ clearMarkEntry: () => Vn,
2456
+ clearPerformanceMarkEntries: () => Xn,
2457
+ config: () => A,
2458
+ createEventConfig: () => On,
2459
+ createNewSpan: () => Ln,
2460
+ createNewTrace: () => Un,
2461
+ device: () => W,
2462
+ endPerfMark: () => Jn,
2463
+ exposeExperiment: () => wn,
2464
+ flushQueue: () => or,
2465
+ generateUUID: () => V,
2466
+ getAnalyticsHeaders: () => sr,
2467
+ getReferrerData: () => le,
2468
+ getTracingHeaders: () => An,
2469
+ getTracingId: () => Dn,
2470
+ getUrlHostname: () => pe,
2471
+ getUrlParams: () => me,
2472
+ getUrlPathname: () => fe,
2473
+ getUserContext: () => ar,
2474
+ identify: () => Tn,
2475
+ identifyFlow: () => xe,
2476
+ identity: () => H,
2477
+ identityFlow: () => Se,
2478
+ incrementUjNavigation: () => an,
2479
+ init: () => yn,
2480
+ initNextJsTrackPageview: () => _n,
2481
+ initTrackPageview: () => kn,
2482
+ isEventKeyFormatValid: () => we,
2483
+ isSessionEnded: () => pt,
2484
+ location: () => re,
2485
+ logEvent: () => $t,
2486
+ logMetric: () => Ht,
2487
+ logPageView: () => on,
2488
+ logTrace: () => Rn,
2489
+ markNTBT: () => tn,
2490
+ markStep: () => nn,
2491
+ markStepOnce: () => rn,
2492
+ onVisibilityChange: () => ln,
2493
+ optIn: () => En,
2494
+ optOut: () => Sn,
2495
+ perfMark: () => Wn,
2496
+ persistentData: () => oe,
2497
+ postMessage: () => K,
2498
+ recordSessionDuration: () => pn,
2499
+ removeFromIdentifyFlow: () => Ee,
2500
+ savePersistentData: () => st,
2501
+ sendScheduledEvents: () => Bt,
2502
+ setBreadcrumbs: () => ie,
2503
+ setConfig: () => U,
2504
+ setLocation: () => ae,
2505
+ setPagePath: () => ve,
2506
+ setPageview: () => Kt,
2507
+ setPersistentData: () => se,
2508
+ setSessionStart: () => dt,
2509
+ setTime: () => Ue,
2510
+ startPerfMark: () => Hn,
2511
+ timeStone: () => Le,
2512
+ useEventLogger: () => Yn,
2513
+ useLogEventOnMount: () => tr,
2514
+ usePerformanceMarks: () => rr,
2515
+ });
2516
+ let e = (function (e) {
2517
+ return ((e.fbclid = 'fbclid'),
2518
+ (e.gclid = 'gclid'),
2519
+ (e.msclkid = 'msclkid'),
2520
+ (e.ptclid = 'ptclid'),
2521
+ (e.ttclid = 'ttclid'),
2522
+ (e.utm_source = 'utm_source'),
2523
+ (e.utm_medium = 'utm_medium'),
2524
+ (e.utm_campaign = 'utm_campaign'),
2525
+ (e.utm_term = 'utm_term'),
2526
+ (e.utm_content = 'utm_content'),
2527
+ e);
2528
+ })({});
2529
+ const t = 0, i = 1, a = 2, o = 3, s = 4, c = 5, u = 6;
2530
+ let l = (function (e) {
2531
+ return (e.low = 'low'), (e.high = 'high'), e;
2532
+ })({}), d = (function (e) {
2533
+ return ((e.count = 'count'),
2534
+ (e.rate = 'rate'),
2535
+ (e.gauge = 'gauge'),
2536
+ (e.distribution = 'distribution'),
2537
+ (e.histogram = 'histogram'),
2538
+ e);
2539
+ })({}), p = (function (e) {
2540
+ return ((e.commerce_merchant = 'commerce_merchant'),
2541
+ (e.device = 'device'),
2542
+ (e.edp_fingerprint_id = 'edp_fingerprint_id'),
2543
+ (e.nft_user = 'nft_user'),
2544
+ (e.user = 'user'),
2545
+ (e.wallet_user = 'wallet_user'),
2546
+ (e.uuid = 'user_uuid'),
2547
+ e);
2548
+ })({}), m = (function (e) {
2549
+ return ((e.unknown = 'unknown'),
2550
+ (e.banner = 'banner'),
2551
+ (e.button = 'button'),
2552
+ (e.card = 'card'),
2553
+ (e.chart = 'chart'),
2554
+ (e.content_script = 'content_script'),
2555
+ (e.dropdown = 'dropdown'),
2556
+ (e.link = 'link'),
2557
+ (e.page = 'page'),
2558
+ (e.modal = 'modal'),
2559
+ (e.table = 'table'),
2560
+ (e.search_bar = 'search_bar'),
2561
+ (e.service_worker = 'service_worker'),
2562
+ (e.text = 'text'),
2563
+ (e.text_input = 'text_input'),
2564
+ (e.tray = 'tray'),
2565
+ (e.checkbox = 'checkbox'),
2566
+ (e.icon = 'icon'),
2567
+ e);
2568
+ })({}), f = (function (e) {
2569
+ return ((e.unknown = 'unknown'),
2570
+ (e.blur = 'blur'),
2571
+ (e.click = 'click'),
2572
+ (e.change = 'change'),
2573
+ (e.dismiss = 'dismiss'),
2574
+ (e.focus = 'focus'),
2575
+ (e.hover = 'hover'),
2576
+ (e.select = 'select'),
2577
+ (e.measurement = 'measurement'),
2578
+ (e.move = 'move'),
2579
+ (e.process = 'process'),
2580
+ (e.render = 'render'),
2581
+ (e.scroll = 'scroll'),
2582
+ (e.view = 'view'),
2583
+ (e.search = 'search'),
2584
+ (e.keyPress = 'keyPress'),
2585
+ e);
2586
+ })({}), v = (function (e) {
2587
+ return ((e.unknown = 'unknown'),
2588
+ (e.web = 'web'),
2589
+ (e.android = 'android'),
2590
+ (e.ios = 'ios'),
2591
+ (e.mobile_web = 'mobile_web'),
2592
+ (e.tablet_web = 'tablet_web'),
2593
+ (e.server = 'server'),
2594
+ (e.windows = 'windows'),
2595
+ (e.macos = 'macos'),
2596
+ (e.extension = 'extension'),
2597
+ e);
2598
+ })({}), g = (function (e) {
2599
+ return ((e.web = 'Web'),
2600
+ (e.ios = 'iOS'),
2601
+ (e.android = 'Android'),
2602
+ e);
2603
+ })({}), b = (function (e) {
2604
+ return ((e[(e.notLoggedIn = 0)] = 'notLoggedIn'),
2605
+ (e[(e.loggedIn = 1)] = 'loggedIn'),
2606
+ e);
2607
+ })({}), h = (function (e) {
2608
+ return ((e.ac = 'ac'),
2609
+ (e.af = 'af'),
2610
+ (e.ah = 'ah'),
2611
+ (e.al = 'al'),
2612
+ (e.am = 'am'),
2613
+ (e.ar = 'ar'),
2614
+ (e.as = 'as'),
2615
+ e);
2616
+ })({}), w = (function (e) {
2617
+ return (e.pv = 'pv'), e;
2618
+ })({}), y = (function (e) {
2619
+ return ((e.xs = 'xs'),
2620
+ (e.s = 's'),
2621
+ (e.m = 'm'),
2622
+ (e.l = 'l'),
2623
+ (e.xl = 'xl'),
2624
+ (e.xxl = 'xxl'),
2625
+ e);
2626
+ })({});
2627
+ const T = 'https://analytics-service-dev.cbhq.net', k = 3e5, _ = 5e3, S = 'analytics-db', E = 'experiment-exposure-db', x = 'Analytics SDK:', O = Object.values(e), j = 'pageview', N = 'session_duration', I = {
2628
+ navigationTiming: { eventName: 'perf_navigation_timing' },
2629
+ redirectTime: { eventName: 'perf_redirect_time' },
2630
+ RT: { eventName: 'perf_redirect_time' },
2631
+ TTFB: { eventName: 'perf_time_to_first_byte' },
2632
+ networkInformation: { eventName: 'perf_network_information' },
2633
+ storageEstimate: { eventName: 'perf_storage_estimate' },
2634
+ FCP: { eventName: 'perf_first_contentful_paint' },
2635
+ FID: { eventName: 'perf_first_input_delay' },
2636
+ LCP: { eventName: 'perf_largest_contentful_paint' },
2637
+ CLS: { eventName: 'perf_cumulative_layout_shift' },
2638
+ TBT: { eventName: 'perf_total_blocking_time' },
2639
+ NTBT: { eventName: 'perf_navigation_total_blocking_time' },
2640
+ INP: { eventName: 'perf_interact_to_next_paint' },
2641
+ ET: { eventName: 'perf_element_timing' },
2642
+ userJourneyStep: { eventName: 'perf_user_journey_step' },
2643
+ }, P = '1', M = 'web';
2644
+ function B() {
2645
+ return ((B = Object.assign
2646
+ ? Object.assign.bind()
2647
+ : function (e) {
2648
+ for (var t = 1; t < arguments.length; t++) {
2649
+ var n = arguments[t];
2650
+ for (var r in n)
2651
+ Object.prototype.hasOwnProperty.call(n, r) &&
2652
+ (e[r] = n[r]);
2653
+ }
2654
+ return e;
2655
+ }),
2656
+ B.apply(this, arguments));
2657
+ }
2658
+ const C = /^(https?:\/\/)/;
2659
+ function D(e) {
2660
+ return {
2661
+ eventsEndpoint: e + '/amp',
2662
+ metricsEndPoint: e + '/metrics',
2663
+ exposureEndpoint: e + '/track-exposures',
2664
+ tracesEndpoint: e + '/traces',
2665
+ };
2666
+ }
2667
+ const A = B({
2668
+ authCookie: 'logged_in',
2669
+ amplitudeApiKey: '',
2670
+ batchEventsPeriod: _,
2671
+ batchEventsThreshold: 30,
2672
+ batchMetricsPeriod: _,
2673
+ batchMetricsThreshold: 30,
2674
+ batchTracesPeriod: _,
2675
+ batchTracesThreshold: 30,
2676
+ headers: {},
2677
+ interactionManager: null,
2678
+ isAlwaysAuthed: !1,
2679
+ isProd: !1,
2680
+ isInternalApplication: !1,
2681
+ onError: (e, t) => {
2682
+ console.error(x, e, t);
2683
+ },
2684
+ platform: v.unknown,
2685
+ projectName: '',
2686
+ ricTimeoutScheduleEvent: 1e3,
2687
+ ricTimeoutSetDevice: 500,
2688
+ showDebugLogging: !1,
2689
+ trackUserId: !1,
2690
+ version: null,
2691
+ apiEndpoint: T,
2692
+ }, D(T), { steps: {} }), L = [].reduce((e, t) => (n) => e(t(n)), (e) => {
2693
+ if (!e.isProd)
2694
+ return e.isInternalApplication
2695
+ ? ((e.apiEndpoint =
2696
+ 'https://analytics-service-internal-dev.cbhq.net'),
2697
+ B({}, e, D(e.apiEndpoint)))
2698
+ : e;
2699
+ const t = ((e) => e.apiEndpoint
2700
+ ? C.test(e.apiEndpoint)
2701
+ ? e.apiEndpoint
2702
+ : `https://${e.apiEndpoint}`
2703
+ : e.isInternalApplication
2704
+ ? 'https://analytics-service-internal.cbhq.net'
2705
+ : 'https://as.coinbase.com')(e);
2706
+ return B({}, e, { apiEndpoint: t }, D(t));
2707
+ }), U = (e) => {
2708
+ const { batchEventsThreshold: t, batchMetricsThreshold: n, batchTracesThreshold: r, } = e, i = [t, n, r];
2709
+ for (const e of i)
2710
+ if ((e || 0) > 30) {
2711
+ console.warn('You are setting the threshhold for the batch limit to be greater than 30. This may cause request overload.');
2712
+ break;
2713
+ }
2714
+ Object.assign(A, L(e));
2715
+ }, R = [v.web, v.mobile_web, v.tablet_web];
2716
+ function q() {
2717
+ return 'android' === A.platform;
2718
+ }
2719
+ function F() {
2720
+ return 'ios' === A.platform;
2721
+ }
2722
+ function z() {
2723
+ return R.includes(A.platform);
2724
+ }
2725
+ function K(e) {
2726
+ if (z() &&
2727
+ navigator &&
2728
+ 'serviceWorker' in navigator &&
2729
+ navigator.serviceWorker.controller)
2730
+ try {
2731
+ navigator.serviceWorker.controller.postMessage(e);
2732
+ }
2733
+ catch (e) {
2734
+ e instanceof Error && A.onError(e);
2735
+ }
2736
+ }
2737
+ var $ = n(353), Q = n.n($);
2738
+ const W = {
2739
+ amplitudeOSName: null,
2740
+ amplitudeOSVersion: null,
2741
+ amplitudeDeviceModel: null,
2742
+ amplitudePlatform: null,
2743
+ browserName: null,
2744
+ browserMajor: null,
2745
+ osName: null,
2746
+ userAgent: null,
2747
+ width: null,
2748
+ height: null,
2749
+ }, H = {
2750
+ countryCode: null,
2751
+ deviceId: null,
2752
+ device_os: null,
2753
+ isOptOut: !1,
2754
+ languageCode: null,
2755
+ locale: null,
2756
+ jwt: null,
2757
+ session_lcc_id: null,
2758
+ userAgent: null,
2759
+ userId: null,
2760
+ }, V = (e) => e
2761
+ ? (e ^ ((16 * Math.random()) >> (e / 4))).toString(16)
2762
+ : '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, V), J = () => A.isAlwaysAuthed || !!H.userId, X = () => {
2763
+ const e = {};
2764
+ return H.countryCode && (e.country_code = H.countryCode), e;
2765
+ }, G = () => {
2766
+ const { platform: e } = A;
2767
+ if (e === v.web)
2768
+ switch (!0) {
2769
+ case window.matchMedia('(max-width: 560px)').matches:
2770
+ return v.mobile_web;
2771
+ case window.matchMedia('(max-width: 1024px, min-width: 561px)').matches:
2772
+ return v.tablet_web;
2773
+ }
2774
+ return e;
2775
+ }, Z = () => {
2776
+ var e, t, n, r, i;
2777
+ z()
2778
+ ? ('requestIdleCallback' in window
2779
+ ? window.requestIdleCallback(ne, {
2780
+ timeout: A.ricTimeoutSetDevice,
2781
+ })
2782
+ : ne(),
2783
+ (W.amplitudePlatform = g.web),
2784
+ (W.userAgent =
2785
+ (null == (e = window) || null == (e = e.navigator)
2786
+ ? void 0
2787
+ : e.userAgent) || null),
2788
+ ee({
2789
+ height: null !=
2790
+ (t =
2791
+ null == (n = window) ? void 0 : n.innerHeight)
2792
+ ? t
2793
+ : null,
2794
+ width: null !=
2795
+ (r = null == (i = window) ? void 0 : i.innerWidth)
2796
+ ? r
2797
+ : null,
2798
+ }))
2799
+ : F()
2800
+ ? ((W.amplitudePlatform = g.ios),
2801
+ (W.userAgent = H.userAgent),
2802
+ W.userAgent && ne())
2803
+ : q() &&
2804
+ ((W.userAgent = H.userAgent),
2805
+ (W.amplitudePlatform = g.android),
2806
+ W.userAgent && ne());
2807
+ }, Y = (e) => {
2808
+ Object.assign(H, e),
2809
+ z() &&
2810
+ K({
2811
+ identity: {
2812
+ isAuthed: !!H.userId,
2813
+ locale: H.locale || null,
2814
+ },
2815
+ });
2816
+ }, ee = (e) => {
2817
+ ;
2818
+ (W.height = e.height), (W.width = e.width);
2819
+ }, te = () => {
2820
+ U({ platform: G() }),
2821
+ z() && K({ config: { platform: A.platform } });
2822
+ }, ne = () => {
2823
+ var e;
2824
+ performance.mark && performance.mark('ua_parser_start');
2825
+ const t = new (Q())(null != (e = W.userAgent) ? e : '').getResult();
2826
+ (W.browserName = t.browser.name || null),
2827
+ (W.browserMajor = t.browser.major || null),
2828
+ (W.osName = t.os.name || null),
2829
+ (W.amplitudeOSName = W.browserName),
2830
+ (W.amplitudeOSVersion = W.browserMajor),
2831
+ (W.amplitudeDeviceModel = W.osName),
2832
+ K({
2833
+ device: {
2834
+ browserName: W.browserName,
2835
+ osName: W.osName,
2836
+ },
2837
+ }),
2838
+ performance.mark &&
2839
+ (performance.mark('ua_parser_end'),
2840
+ performance.measure('ua_parser', 'ua_parser_start', 'ua_parser_end'));
2841
+ }, re = {
2842
+ breadcrumbs: [],
2843
+ initialUAAData: {},
2844
+ pageKey: '',
2845
+ pageKeyRegex: {},
2846
+ pagePath: '',
2847
+ prevPageKey: '',
2848
+ prevPagePath: '',
2849
+ };
2850
+ function ie(e) {
2851
+ Object.assign(re, { breadcrumbs: e });
2852
+ }
2853
+ function ae(e) {
2854
+ Object.assign(re, e);
2855
+ }
2856
+ const oe = {
2857
+ eventId: 0,
2858
+ sequenceNumber: 0,
2859
+ sessionId: 0,
2860
+ lastEventTime: 0,
2861
+ sessionStart: 0,
2862
+ sessionUUID: null,
2863
+ userId: null,
2864
+ ac: 0,
2865
+ af: 0,
2866
+ ah: 0,
2867
+ al: 0,
2868
+ am: 0,
2869
+ ar: 0,
2870
+ as: 0,
2871
+ pv: 0,
2872
+ };
2873
+ function se(e) {
2874
+ Object.assign(oe, e);
2875
+ }
2876
+ function ce() {
2877
+ var e, t;
2878
+ return null != (e = null == (t = document) ? void 0 : t.referrer)
2879
+ ? e
2880
+ : '';
2881
+ }
2882
+ function ue() {
2883
+ return ((ue = Object.assign
2884
+ ? Object.assign.bind()
2885
+ : function (e) {
2886
+ for (var t = 1; t < arguments.length; t++) {
2887
+ var n = arguments[t];
2888
+ for (var r in n)
2889
+ Object.prototype.hasOwnProperty.call(n, r) &&
2890
+ (e[r] = n[r]);
2891
+ }
2892
+ return e;
2893
+ }),
2894
+ ue.apply(this, arguments));
2895
+ }
2896
+ const le = () => {
2897
+ const e = ce();
2898
+ if (!e)
2899
+ return {};
2900
+ const t = new URL(e);
2901
+ return t.hostname === pe()
2902
+ ? {}
2903
+ : { referrer: e, referring_domain: t.hostname };
2904
+ }, de = () => {
2905
+ const e = new URLSearchParams(me()), t = {};
2906
+ return (O.forEach((n) => {
2907
+ e.has(n) && (t[n] = (e.get(n) || '').toLowerCase());
2908
+ }),
2909
+ t);
2910
+ }, pe = () => {
2911
+ var e;
2912
+ return ((null == (e = window) || null == (e = e.location)
2913
+ ? void 0
2914
+ : e.hostname) || '');
2915
+ }, me = () => {
2916
+ var e;
2917
+ return ((null == (e = window) || null == (e = e.location)
2918
+ ? void 0
2919
+ : e.search) || '');
2920
+ }, fe = () => {
2921
+ var e;
2922
+ return ((null == (e = window) || null == (e = e.location)
2923
+ ? void 0
2924
+ : e.pathname) || '');
2925
+ }, ve = () => {
2926
+ const e = A.overrideWindowLocation ? re.pagePath : fe() + me();
2927
+ e &&
2928
+ e !== re.pagePath &&
2929
+ (e !== re.pagePath && ge(),
2930
+ (re.pagePath = e),
2931
+ re.pageKeyRegex &&
2932
+ Object.keys(re.pageKeyRegex).some((e) => {
2933
+ if (re.pageKeyRegex[e].test(re.pagePath))
2934
+ return (re.pageKey = e), !0;
2935
+ }));
2936
+ }, ge = () => {
2937
+ if (z()) {
2938
+ const e = ce();
2939
+ if (!re.prevPagePath && e) {
2940
+ const t = new URL(e);
2941
+ if (t.hostname === pe())
2942
+ return void (re.prevPagePath = t.pathname);
2943
+ }
2944
+ }
2945
+ ;
2946
+ (re.prevPagePath = re.pagePath),
2947
+ (re.prevPageKey = re.pageKey);
2948
+ }, be = (e) => {
2949
+ z() &&
2950
+ Object.assign(e, z()
2951
+ ? (Object.keys(re.initialUAAData).length > 0 ||
2952
+ (new URLSearchParams(me()),
2953
+ (re.initialUAAData = ue({}, (() => {
2954
+ const e = {};
2955
+ return (O.forEach((t) => {
2956
+ oe[t] && (e[t] = oe[t]);
2957
+ }),
2958
+ e);
2959
+ })(), de(), le()))),
2960
+ re.initialUAAData)
2961
+ : re.initialUAAData);
2962
+ }, he = /^[a-zd]+(_[a-zd]+)*$/;
2963
+ function we(e) {
2964
+ return he.test(e);
2965
+ }
2966
+ function ye() {
2967
+ return ((ye = Object.assign
2968
+ ? Object.assign.bind()
2969
+ : function (e) {
2970
+ for (var t = 1; t < arguments.length; t++) {
2971
+ var n = arguments[t];
2972
+ for (var r in n)
2973
+ Object.prototype.hasOwnProperty.call(n, r) &&
2974
+ (e[r] = n[r]);
2975
+ }
2976
+ return e;
2977
+ }),
2978
+ ye.apply(this, arguments));
2979
+ }
2980
+ const Te = [
2981
+ 'action',
2982
+ 'component_type',
2983
+ 'component_name',
2984
+ 'context',
2985
+ 'logging_id',
2986
+ ], ke = ['num_non_hardware_accounts', 'ujs'], _e = 'ujs_', Se = {};
2987
+ function Ee(e) {
2988
+ e.forEach((e) => {
2989
+ ke.includes(e) && delete Se[e];
2990
+ });
2991
+ }
2992
+ function xe(e) {
2993
+ var t;
2994
+ const n = Object.entries(e).reduce((e, t) => {
2995
+ const [n, r] = t;
2996
+ return !Te.includes(n) && ke.includes(n)
2997
+ ? we(n)
2998
+ ? ye({}, e, { [n]: r })
2999
+ : (A.onError(new Error('IdentityFlow property names must have snake case format'), { [n]: r }),
3000
+ e)
3001
+ : e;
3002
+ }, {});
3003
+ null != (t = n.ujs) &&
3004
+ t.length &&
3005
+ (n.ujs = n.ujs.map((e) => `${_e}${e}`)),
3006
+ Object.assign(Se, n);
3007
+ }
3008
+ function Oe() {
3009
+ return (A.platform !== v.unknown ||
3010
+ (A.onError(new Error('SDK platform not initialized')), !1));
3011
+ }
3012
+ const je = {
3013
+ eventsQueue: [],
3014
+ eventsScheduled: !1,
3015
+ metricsQueue: [],
3016
+ metricsScheduled: !1,
3017
+ tracesQueue: [],
3018
+ tracesScheduled: !1,
3019
+ };
3020
+ function Ne(e) {
3021
+ Object.assign(je, e);
3022
+ }
3023
+ const Ie = {
3024
+ ac: 0,
3025
+ af: 0,
3026
+ ah: 0,
3027
+ al: 0,
3028
+ am: 0,
3029
+ ar: 0,
3030
+ as: 0,
3031
+ pv: 0,
3032
+ sqs: 0,
3033
+ }, Pe = { ac: 20, af: 5, ah: 1, al: 1, am: 0, ar: 10, as: 20 }, Me = { pv: 25 }, Be = { xs: 0, s: 1, m: 1, l: 2, xl: 2, xxl: 2 }, Ce = (e) => e < 15
3034
+ ? y.xs
3035
+ : e < 60
3036
+ ? y.s
3037
+ : e < 240
3038
+ ? y.m
3039
+ : e < 960
3040
+ ? y.l
3041
+ : e < 3840
3042
+ ? y.xl
3043
+ : y.xxl, De = (e) => {
3044
+ Object.assign(Ie, e);
3045
+ };
3046
+ function Ae() {
3047
+ return new Date().getTime();
3048
+ }
3049
+ const Le = {
3050
+ timeStart: Ae(),
3051
+ timeOnPagePath: 0,
3052
+ timeOnPageKey: 0,
3053
+ prevTimeOnPagePath: 0,
3054
+ prevTimeOnPageKey: 0,
3055
+ sessionDuration: 0,
3056
+ sessionEnd: 0,
3057
+ sessionStart: 0,
3058
+ prevSessionDuration: 0,
3059
+ };
3060
+ function Ue(e) {
3061
+ Object.assign(Le, e);
3062
+ }
3063
+ const Re = (e, t) => t.some((t) => e instanceof t);
3064
+ let qe, Fe;
3065
+ const ze = new WeakMap(), Ke = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), We = new WeakMap();
3066
+ let He = {
3067
+ get(e, t, n) {
3068
+ if (e instanceof IDBTransaction) {
3069
+ if ('done' === t)
3070
+ return Ke.get(e);
3071
+ if ('objectStoreNames' === t)
3072
+ return e.objectStoreNames || $e.get(e);
3073
+ if ('store' === t)
3074
+ return n.objectStoreNames[1]
3075
+ ? void 0
3076
+ : n.objectStore(n.objectStoreNames[0]);
3077
+ }
3078
+ return Je(e[t]);
3079
+ },
3080
+ set: (e, t, n) => ((e[t] = n), !0),
3081
+ has: (e, t) => (e instanceof IDBTransaction &&
3082
+ ('done' === t || 'store' === t)) ||
3083
+ t in e,
3084
+ };
3085
+ function Ve(e) {
3086
+ return 'function' == typeof e
3087
+ ? (t = e) !== IDBDatabase.prototype.transaction ||
3088
+ 'objectStoreNames' in IDBTransaction.prototype
3089
+ ? (Fe ||
3090
+ (Fe = [
3091
+ IDBCursor.prototype.advance,
3092
+ IDBCursor.prototype.continue,
3093
+ IDBCursor.prototype.continuePrimaryKey,
3094
+ ])).includes(t)
3095
+ ? function (...e) {
3096
+ return t.apply(Xe(this), e), Je(ze.get(this));
3097
+ }
3098
+ : function (...e) {
3099
+ return Je(t.apply(Xe(this), e));
3100
+ }
3101
+ : function (e, ...n) {
3102
+ const r = t.call(Xe(this), e, ...n);
3103
+ return $e.set(r, e.sort ? e.sort() : [e]), Je(r);
3104
+ }
3105
+ : (e instanceof IDBTransaction &&
3106
+ (function (e) {
3107
+ if (Ke.has(e))
3108
+ return;
3109
+ const t = new Promise((t, n) => {
3110
+ const r = () => {
3111
+ e.removeEventListener('complete', i),
3112
+ e.removeEventListener('error', a),
3113
+ e.removeEventListener('abort', a);
3114
+ }, i = () => {
3115
+ t(), r();
3116
+ }, a = () => {
3117
+ n(e.error ||
3118
+ new DOMException('AbortError', 'AbortError')),
3119
+ r();
3120
+ };
3121
+ e.addEventListener('complete', i),
3122
+ e.addEventListener('error', a),
3123
+ e.addEventListener('abort', a);
3124
+ });
3125
+ Ke.set(e, t);
3126
+ })(e),
3127
+ Re(e, qe ||
3128
+ (qe = [
3129
+ IDBDatabase,
3130
+ IDBObjectStore,
3131
+ IDBIndex,
3132
+ IDBCursor,
3133
+ IDBTransaction,
3134
+ ]))
3135
+ ? new Proxy(e, He)
3136
+ : e);
3137
+ var t;
3138
+ }
3139
+ function Je(e) {
3140
+ if (e instanceof IDBRequest)
3141
+ return (function (e) {
3142
+ const t = new Promise((t, n) => {
3143
+ const r = () => {
3144
+ e.removeEventListener('success', i),
3145
+ e.removeEventListener('error', a);
3146
+ }, i = () => {
3147
+ t(Je(e.result)), r();
3148
+ }, a = () => {
3149
+ n(e.error), r();
3150
+ };
3151
+ e.addEventListener('success', i),
3152
+ e.addEventListener('error', a);
3153
+ });
3154
+ return (t
3155
+ .then((t) => {
3156
+ t instanceof IDBCursor && ze.set(t, e);
3157
+ })
3158
+ .catch(() => { }),
3159
+ We.set(t, e),
3160
+ t);
3161
+ })(e);
3162
+ if (Qe.has(e))
3163
+ return Qe.get(e);
3164
+ const t = Ve(e);
3165
+ return t !== e && (Qe.set(e, t), We.set(t, e)), t;
3166
+ }
3167
+ const Xe = (e) => We.get(e), Ge = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'], Ze = ['put', 'add', 'delete', 'clear'], Ye = new Map();
3168
+ function et(e, t) {
3169
+ if (!(e instanceof IDBDatabase) ||
3170
+ t in e ||
3171
+ 'string' != typeof t)
3172
+ return;
3173
+ if (Ye.get(t))
3174
+ return Ye.get(t);
3175
+ const n = t.replace(/FromIndex$/, ''), r = t !== n, i = Ze.includes(n);
3176
+ if (!(n in (r ? IDBIndex : IDBObjectStore).prototype) ||
3177
+ (!i && !Ge.includes(n)))
3178
+ return;
3179
+ const a = async function (e, ...t) {
3180
+ const a = this.transaction(e, i ? 'readwrite' : 'readonly');
3181
+ let o = a.store;
3182
+ return (r && (o = o.index(t.shift())),
3183
+ (await Promise.all([o[n](...t), i && a.done]))[0]);
3184
+ };
3185
+ return Ye.set(t, a), a;
3186
+ }
3187
+ var tt;
3188
+ (tt = He),
3189
+ (He = Object.assign(Object.assign({}, tt), { get: (e, t, n) => et(e, t) || tt.get(e, t, n), has: (e, t) => !!et(e, t) || tt.has(e, t) }));
3190
+ const nt = { isReady: !1, idbKeyval: null };
3191
+ function rt(e) {
3192
+ Object.assign(nt, e);
3193
+ }
3194
+ const it = {}, at = async (e) => {
3195
+ if (!nt.idbKeyval)
3196
+ return Promise.resolve(null);
3197
+ try {
3198
+ return await nt.idbKeyval.get(e);
3199
+ }
3200
+ catch (e) {
3201
+ return (A.onError(new Error('IndexedDB:Get:InternalError')),
3202
+ Promise.resolve(null));
3203
+ }
3204
+ }, ot = async (e, t) => {
3205
+ if (nt.idbKeyval)
3206
+ try {
3207
+ await nt.idbKeyval.set(e, t);
3208
+ }
3209
+ catch (e) {
3210
+ A.onError(new Error('IndexedDB:Set:InternalError'));
3211
+ }
3212
+ }, st = () => {
3213
+ 'server' !== A.platform &&
3214
+ (se({
3215
+ sessionStart: Le.sessionStart,
3216
+ ac: Ie.ac,
3217
+ af: Ie.af,
3218
+ ah: Ie.ah,
3219
+ al: Ie.al,
3220
+ am: Ie.am,
3221
+ ar: Ie.ar,
3222
+ as: Ie.as,
3223
+ pv: Ie.pv,
3224
+ }),
3225
+ H.userId && se({ userId: H.userId }),
3226
+ ot(S, oe));
3227
+ }, ct = 'rgb(5,177,105)', ut = (e) => {
3228
+ const { metricName: t, data: n } = e, r = e.importance || l.low;
3229
+ if (!A.showDebugLogging || !console)
3230
+ return;
3231
+ const i = `%c ${x}`, a = `color:${ct};font-size:11px;`, o = `Importance: ${r}`;
3232
+ console.group(i, a, t, o),
3233
+ n.forEach((e) => {
3234
+ e.event_type
3235
+ ? console.log(e.event_type, e)
3236
+ : console.log(e);
3237
+ }),
3238
+ console.groupEnd();
3239
+ }, lt = (e) => {
3240
+ const { metricName: t, data: n } = e, r = e.importance || l.low;
3241
+ if (!A.showDebugLogging || !console)
3242
+ return;
3243
+ const i = `color:${ct};font-size:11px;`, a = `%c ${x}`, o = `Importance: ${r}`;
3244
+ console.log(a, i, t, n, o);
3245
+ }, dt = () => {
3246
+ const e = Ae();
3247
+ (oe.sessionId &&
3248
+ oe.lastEventTime &&
3249
+ oe.sessionUUID &&
3250
+ !pt(e)) ||
3251
+ ((oe.sessionId = e),
3252
+ (oe.sessionUUID = V()),
3253
+ Ue({ sessionStart: e }),
3254
+ lt({
3255
+ metricName: 'Started new session:',
3256
+ data: { persistentData: oe, timeStone: Le },
3257
+ })),
3258
+ (oe.lastEventTime = e);
3259
+ }, pt = (e) => e - oe.lastEventTime > 18e5;
3260
+ function mt() {
3261
+ return ((mt = Object.assign
3262
+ ? Object.assign.bind()
3263
+ : function (e) {
3264
+ for (var t = 1; t < arguments.length; t++) {
3265
+ var n = arguments[t];
3266
+ for (var r in n)
3267
+ Object.prototype.hasOwnProperty.call(n, r) &&
3268
+ (e[r] = n[r]);
3269
+ }
3270
+ return e;
3271
+ }),
3272
+ mt.apply(this, arguments));
3273
+ }
3274
+ const ft = (e) => {
3275
+ var t;
3276
+ ((e) => {
3277
+ switch (e.action) {
3278
+ case f.click:
3279
+ Ie.ac += 1;
3280
+ break;
3281
+ case f.focus:
3282
+ Ie.af += 1;
3283
+ break;
3284
+ case f.hover:
3285
+ Ie.ah += 1;
3286
+ break;
3287
+ case f.move:
3288
+ Ie.am += 1;
3289
+ break;
3290
+ case f.scroll:
3291
+ Ie.al += 1;
3292
+ break;
3293
+ case f.search:
3294
+ Ie.ar += 1;
3295
+ break;
3296
+ case f.select:
3297
+ Ie.as += 1;
3298
+ }
3299
+ })((t = e)),
3300
+ t.event_type !== j
3301
+ ? t.event_type === N &&
3302
+ (((e) => {
3303
+ if (!e.session_rank)
3304
+ return;
3305
+ const t = e.session_rank;
3306
+ Object.values(h).forEach((e) => {
3307
+ Ie.sqs += Ie[e] * Pe[e];
3308
+ }),
3309
+ Object.values(w).forEach((e) => {
3310
+ Ie.sqs += Ie[e] * Me[e];
3311
+ }),
3312
+ (Ie.sqs *= Be[t]);
3313
+ })(t),
3314
+ Object.assign(t, Ie),
3315
+ De({
3316
+ ac: 0,
3317
+ af: 0,
3318
+ ah: 0,
3319
+ al: 0,
3320
+ am: 0,
3321
+ ar: 0,
3322
+ as: 0,
3323
+ pv: 0,
3324
+ sqs: 0,
3325
+ }))
3326
+ : (Ie.pv += 1);
3327
+ const n = e.event_type;
3328
+ delete e.event_type;
3329
+ const r = e.deviceId ? e.deviceId : null, i = e.timestamp;
3330
+ return (delete e.timestamp,
3331
+ se({ eventId: oe.eventId + 1 }),
3332
+ se({ sequenceNumber: oe.sequenceNumber + 1 }),
3333
+ dt(),
3334
+ st(),
3335
+ {
3336
+ device_id: H.deviceId || r || null,
3337
+ user_id: H.userId,
3338
+ timestamp: i,
3339
+ event_id: oe.eventId,
3340
+ session_id: oe.sessionId || -1,
3341
+ event_type: n,
3342
+ version_name: A.version || null,
3343
+ platform: W.amplitudePlatform,
3344
+ os_name: W.amplitudeOSName,
3345
+ os_version: W.amplitudeOSVersion,
3346
+ device_model: W.amplitudeDeviceModel,
3347
+ language: H.languageCode,
3348
+ event_properties: mt({}, e, {
3349
+ session_uuid: oe.sessionUUID,
3350
+ height: W.height,
3351
+ width: W.width,
3352
+ }),
3353
+ user_properties: X(),
3354
+ uuid: V(),
3355
+ library: {
3356
+ name: '@cbhq/client-analytics',
3357
+ version: '10.6.0',
3358
+ },
3359
+ sequence_number: oe.sequenceNumber,
3360
+ user_agent: W.userAgent || H.userAgent,
3361
+ });
3362
+ }, vt = (e) => e.map((e) => ft(e));
3363
+ function gt() {
3364
+ return ((gt = Object.assign
3365
+ ? Object.assign.bind()
3366
+ : function (e) {
3367
+ for (var t = 1; t < arguments.length; t++) {
3368
+ var n = arguments[t];
3369
+ for (var r in n)
3370
+ Object.prototype.hasOwnProperty.call(n, r) &&
3371
+ (e[r] = n[r]);
3372
+ }
3373
+ return e;
3374
+ }),
3375
+ gt.apply(this, arguments));
3376
+ }
3377
+ const bt = (e) => e.map((e) => ((e) => {
3378
+ const t = e.tags || {}, n = gt({
3379
+ authed: J() ? 'true' : 'false',
3380
+ platform: A.platform,
3381
+ }, t, {
3382
+ project_name: A.projectName,
3383
+ version_name: A.version || null,
3384
+ });
3385
+ return {
3386
+ metric_name: e.metricName,
3387
+ page_path: e.pagePath || null,
3388
+ value: e.value,
3389
+ tags: n,
3390
+ type: e.metricType,
3391
+ };
3392
+ })(e)), ht = (e) => 0 !== je.metricsQueue.length &&
3393
+ (je.metricsQueue.length >= A.batchMetricsThreshold ||
3394
+ (je.metricsScheduled ||
3395
+ ((je.metricsScheduled = !0),
3396
+ setTimeout(() => {
3397
+ ;
3398
+ (je.metricsScheduled = !1),
3399
+ e(bt(je.metricsQueue)),
3400
+ (je.metricsQueue = []);
3401
+ }, A.batchMetricsPeriod)),
3402
+ !1)), wt = (e) => 0 !== je.tracesQueue.length &&
3403
+ (je.tracesQueue.length >= A.batchTracesThreshold ||
3404
+ (je.tracesScheduled ||
3405
+ ((je.tracesScheduled = !0),
3406
+ setTimeout(() => {
3407
+ ;
3408
+ (je.tracesScheduled = !1),
3409
+ e(je.tracesQueue),
3410
+ (je.tracesQueue = []);
3411
+ }, A.batchTracesPeriod)),
3412
+ !1)), yt = (e) => {
3413
+ var t;
3414
+ z() && null != (t = window) && t.requestIdleCallback
3415
+ ? window.requestIdleCallback(e, {
3416
+ timeout: A.ricTimeoutScheduleEvent,
3417
+ })
3418
+ : (q() || F()) && A.interactionManager
3419
+ ? A.interactionManager.runAfterInteractions(e)
3420
+ : e();
3421
+ };
3422
+ function Tt() {
3423
+ return ((Tt = Object.assign
3424
+ ? Object.assign.bind()
3425
+ : function (e) {
3426
+ for (var t = 1; t < arguments.length; t++) {
3427
+ var n = arguments[t];
3428
+ for (var r in n)
3429
+ Object.prototype.hasOwnProperty.call(n, r) &&
3430
+ (e[r] = n[r]);
3431
+ }
3432
+ return e;
3433
+ }),
3434
+ Tt.apply(this, arguments));
3435
+ }
3436
+ const kt = 'application/x-www-form-urlencoded; charset=UTF-8', _t = (e) => {
3437
+ const { data: t, importance: n, isJSON: r, onError: i, url: a, } = e, o = r ? 'application/json' : kt, s = n || l.low, c = r
3438
+ ? JSON.stringify(t)
3439
+ : new URLSearchParams(t).toString();
3440
+ function u() {
3441
+ const e = new XMLHttpRequest();
3442
+ e.open('POST', a, !0),
3443
+ Object.keys(A.headers || {}).forEach((t) => {
3444
+ e.setRequestHeader(t, A.headers[t]);
3445
+ }),
3446
+ e.setRequestHeader('Content-Type', kt),
3447
+ H.jwt &&
3448
+ e.setRequestHeader('authorization', `Bearer ${H.jwt}`),
3449
+ e.send(c);
3450
+ }
3451
+ if (!z() ||
3452
+ r ||
3453
+ !('sendBeacon' in navigator) ||
3454
+ s !== l.low ||
3455
+ (A.headers && 0 !== Object.keys(A.headers).length))
3456
+ if (z() && !r)
3457
+ u();
3458
+ else {
3459
+ const e = Tt({}, A.headers, { 'Content-Type': o });
3460
+ H.jwt && (e.Authorization = `Bearer ${H.jwt}`),
3461
+ fetch(a, {
3462
+ method: 'POST',
3463
+ mode: 'no-cors',
3464
+ headers: e,
3465
+ body: c,
3466
+ }).catch((e) => {
3467
+ i(e, { context: 'AnalyticsSDKApiError' });
3468
+ });
3469
+ }
3470
+ else {
3471
+ const e = new Blob([c], { type: kt });
3472
+ try {
3473
+ navigator.sendBeacon.bind(navigator)(a, e) || u();
3474
+ }
3475
+ catch (e) {
3476
+ console.error(e), u();
3477
+ }
3478
+ }
3479
+ };
3480
+ var St = n(762), Et = n.n(St);
3481
+ const xt = (e, t, n) => {
3482
+ const r = e || '';
3483
+ return Et()('2' + r + t + n);
3484
+ };
3485
+ function Ot() {
3486
+ return ((Ot = Object.assign
3487
+ ? Object.assign.bind()
3488
+ : function (e) {
3489
+ for (var t = 1; t < arguments.length; t++) {
3490
+ var n = arguments[t];
3491
+ for (var r in n)
3492
+ Object.prototype.hasOwnProperty.call(n, r) &&
3493
+ (e[r] = n[r]);
3494
+ }
3495
+ return e;
3496
+ }),
3497
+ Ot.apply(this, arguments));
3498
+ }
3499
+ class jt extends Error {
3500
+ constructor(e) {
3501
+ super(e),
3502
+ (this.name = 'CircularJsonReference'),
3503
+ (this.message = e),
3504
+ 'function' == typeof Error.captureStackTrace
3505
+ ? Error.captureStackTrace(this, this.constructor)
3506
+ : (this.stack = new Error(e).stack);
3507
+ }
3508
+ }
3509
+ class Nt extends jt {
3510
+ constructor(...e) {
3511
+ super(...e), (this.name = 'DomReferenceInAnalyticsEvent');
3512
+ }
3513
+ }
3514
+ function It() {
3515
+ return ((It = Object.assign
3516
+ ? Object.assign.bind()
3517
+ : function (e) {
3518
+ for (var t = 1; t < arguments.length; t++) {
3519
+ var n = arguments[t];
3520
+ for (var r in n)
3521
+ Object.prototype.hasOwnProperty.call(n, r) &&
3522
+ (e[r] = n[r]);
3523
+ }
3524
+ return e;
3525
+ }),
3526
+ It.apply(this, arguments));
3527
+ }
3528
+ const Pt = (e, t = l.low) => {
3529
+ var n;
3530
+ e && je.eventsQueue.push(e),
3531
+ nt.isReady &&
3532
+ (!A.trackUserId || H.userId
3533
+ ? (t === l.high ||
3534
+ ((n = Mt),
3535
+ 0 !== je.eventsQueue.length &&
3536
+ (je.eventsQueue.length >=
3537
+ A.batchEventsThreshold ||
3538
+ (je.eventsScheduled ||
3539
+ ((je.eventsScheduled = !0),
3540
+ setTimeout(() => {
3541
+ ;
3542
+ (je.eventsScheduled = !1),
3543
+ n(vt(je.eventsQueue)),
3544
+ (je.eventsQueue = []);
3545
+ }, A.batchEventsPeriod)),
3546
+ 0)))) &&
3547
+ Bt()
3548
+ : je.eventsQueue.length > 10 &&
3549
+ ((A.trackUserId = !1),
3550
+ A.onError(new Error('userId not set in Logged-in'))));
3551
+ }, Mt = (e, t = l.low) => {
3552
+ if (H.isOptOut || 0 === e.length)
3553
+ return;
3554
+ let n;
3555
+ try {
3556
+ n = JSON.stringify(e);
3557
+ }
3558
+ catch (t) {
3559
+ const r = e.map((e) => e.event_type).join(', '), [i, a] = ((e) => {
3560
+ try {
3561
+ const n = [];
3562
+ for (const r of e) {
3563
+ const e = Ot({}, r);
3564
+ r.event_properties &&
3565
+ (e.event_properties = Ot({}, e.event_properties, {
3566
+ currentTarget: null,
3567
+ target: null,
3568
+ relatedTarget: null,
3569
+ _dispatchInstances: null,
3570
+ _targetInst: null,
3571
+ view: ((t = r.event_properties.view),
3572
+ [
3573
+ 'string',
3574
+ 'number',
3575
+ 'boolean',
3576
+ ].includes(typeof t)
3577
+ ? r.event_properties.view
3578
+ : null),
3579
+ })),
3580
+ n.push(e);
3581
+ }
3582
+ return [!0, JSON.stringify(n)];
3583
+ }
3584
+ catch (e) {
3585
+ return [!1, ''];
3586
+ }
3587
+ var t;
3588
+ })(e);
3589
+ if (!i)
3590
+ return void A.onError(new jt(t instanceof Error ? t.message : 'unknown'), { listEventType: r });
3591
+ (n = a),
3592
+ A.onError(new Nt('Found DOM element reference'), {
3593
+ listEventType: r,
3594
+ stringifiedEventData: n,
3595
+ });
3596
+ }
3597
+ const r = Ae().toString(), i = It({}, { e: n, v: '2', upload_time: r }, {
3598
+ client: A.amplitudeApiKey,
3599
+ checksum: xt(A.amplitudeApiKey, n, r),
3600
+ });
3601
+ _t({
3602
+ url: A.eventsEndpoint,
3603
+ data: i,
3604
+ importance: t,
3605
+ onError: A.onError,
3606
+ }),
3607
+ ut({ metricName: 'Batch Events', data: e, importance: t });
3608
+ }, Bt = () => {
3609
+ Mt(vt(je.eventsQueue)), Ne({ eventsQueue: [] });
3610
+ };
3611
+ function Ct() {
3612
+ return ((Ct = Object.assign
3613
+ ? Object.assign.bind()
3614
+ : function (e) {
3615
+ for (var t = 1; t < arguments.length; t++) {
3616
+ var n = arguments[t];
3617
+ for (var r in n)
3618
+ Object.prototype.hasOwnProperty.call(n, r) &&
3619
+ (e[r] = n[r]);
3620
+ }
3621
+ return e;
3622
+ }),
3623
+ Ct.apply(this, arguments));
3624
+ }
3625
+ const Dt = Object.values(f), At = Object.values(m), Lt = (e) => (Dt.includes(e) ? e : f.unknown), Ut = (e) => (At.includes(e) ? e : m.unknown), Rt = (e, t, n) => {
3626
+ const r = {
3627
+ auth: J() ? b.loggedIn : b.notLoggedIn,
3628
+ action: Lt(e),
3629
+ component_type: Ut(t),
3630
+ logging_id: n,
3631
+ platform: A.platform,
3632
+ project_name: A.projectName,
3633
+ };
3634
+ return ('number' == typeof H.userTypeEnum &&
3635
+ (r.user_type_enum = H.userTypeEnum),
3636
+ r);
3637
+ }, qt = (e) => {
3638
+ const t = Ae();
3639
+ if (!e)
3640
+ return (A.onError(new Error('missing logData')),
3641
+ Ct({}, Rt(f.unknown, m.unknown), {
3642
+ locale: H.locale,
3643
+ session_lcc_id: H.session_lcc_id,
3644
+ timestamp: t,
3645
+ time_start: Le.timeStart,
3646
+ }));
3647
+ const n = Ct({}, e, Rt(e.action, e.componentType, e.loggingId), {
3648
+ locale: H.locale,
3649
+ session_lcc_id: H.session_lcc_id,
3650
+ timestamp: t,
3651
+ time_start: Le.timeStart,
3652
+ });
3653
+ return delete n.componentType, delete n.loggingId, n;
3654
+ }, Ft = { blacklistRegex: [], isEnabled: !1 };
3655
+ function zt() {
3656
+ return {
3657
+ page_key: re.pageKey,
3658
+ page_path: re.pagePath,
3659
+ prev_page_key: re.prevPageKey,
3660
+ prev_page_path: re.prevPagePath,
3661
+ };
3662
+ }
3663
+ function Kt(e) {
3664
+ Object.assign(Ft, e);
3665
+ }
3666
+ function $t(e, t, n = l.low) {
3667
+ if (H.isOptOut)
3668
+ return;
3669
+ if (!Oe())
3670
+ return;
3671
+ const r = qt(t);
3672
+ !(function (e) {
3673
+ Ft.isEnabled && (ve(), Object.assign(e, zt()));
3674
+ })(r),
3675
+ be(r),
3676
+ (function (e) {
3677
+ Object.keys(Se).length > 0 && Object.assign(e, Se);
3678
+ })(r),
3679
+ (r.has_double_fired = !1),
3680
+ (r.event_type = e),
3681
+ n === l.high
3682
+ ? Pt(r, n)
3683
+ : yt(() => {
3684
+ Pt(r);
3685
+ });
3686
+ }
3687
+ function Qt(e, t = !1) {
3688
+ t
3689
+ ? _t({
3690
+ url: A.metricsEndPoint,
3691
+ data: { metrics: e },
3692
+ isJSON: !0,
3693
+ onError: A.onError,
3694
+ })
3695
+ : yt(() => {
3696
+ _t({
3697
+ url: A.metricsEndPoint,
3698
+ data: { metrics: e },
3699
+ isJSON: !0,
3700
+ onError: A.onError,
3701
+ });
3702
+ }),
3703
+ ut({ metricName: 'Batch Metrics', data: e });
3704
+ }
3705
+ function Wt() {
3706
+ return ((Wt = Object.assign
3707
+ ? Object.assign.bind()
3708
+ : function (e) {
3709
+ for (var t = 1; t < arguments.length; t++) {
3710
+ var n = arguments[t];
3711
+ for (var r in n)
3712
+ Object.prototype.hasOwnProperty.call(n, r) &&
3713
+ (e[r] = n[r]);
3714
+ }
3715
+ return e;
3716
+ }),
3717
+ Wt.apply(this, arguments));
3718
+ }
3719
+ function Ht(e) {
3720
+ if (!Oe())
3721
+ return;
3722
+ v.server !== A.platform &&
3723
+ !e.pagePath &&
3724
+ re.pagePath &&
3725
+ (e.pagePath = re.pagePath);
3726
+ const t = Object.keys(Se).length ? Wt({}, e.tags, Se) : e.tags;
3727
+ t && Object.assign(e, { tags: t }),
3728
+ je.metricsQueue.push(e),
3729
+ ht(Qt) && (Qt(bt(je.metricsQueue)), (je.metricsQueue = []));
3730
+ }
3731
+ function Vt() {
3732
+ return ((Vt = Object.assign
3733
+ ? Object.assign.bind()
3734
+ : function (e) {
3735
+ for (var t = 1; t < arguments.length; t++) {
3736
+ var n = arguments[t];
3737
+ for (var r in n)
3738
+ Object.prototype.hasOwnProperty.call(n, r) &&
3739
+ (e[r] = n[r]);
3740
+ }
3741
+ return e;
3742
+ }),
3743
+ Vt.apply(this, arguments));
3744
+ }
3745
+ let Jt = (function (e) {
3746
+ return ((e.instant = 'instant'),
3747
+ (e.quick = 'quick'),
3748
+ (e.moderate = 'moderate'),
3749
+ (e.slow = 'slow'),
3750
+ (e.unavoidable = 'unavoidable'),
3751
+ e);
3752
+ })({});
3753
+ function Xt(e) {
3754
+ return e.toLowerCase();
3755
+ }
3756
+ let Gt = {};
3757
+ const Zt = (e, t) => {
3758
+ null != A && A.onMarkStep && A.onMarkStep(e, t), xe({ ujs: t });
3759
+ };
3760
+ let Yt;
3761
+ const en = {
3762
+ Perfume: () => { },
3763
+ markStep: (e) => { },
3764
+ markStepOnce: (e) => { },
3765
+ incrementUjNavigation: () => { },
3766
+ }, tn = () => {
3767
+ z() && Yt && Yt.markNTBT && Yt.markNTBT();
3768
+ }, nn = (e) => {
3769
+ z() && Yt && en.markStep && en.markStep(e);
3770
+ }, rn = (e) => {
3771
+ z() && Yt && en.markStepOnce && en.markStepOnce(e);
3772
+ }, an = () => {
3773
+ z() &&
3774
+ Yt &&
3775
+ en.incrementUjNavigation &&
3776
+ en.incrementUjNavigation();
3777
+ };
3778
+ function on(e = { callMarkNTBT: !0 }) {
3779
+ 'unknown' !== A.platform &&
3780
+ (Ft.blacklistRegex.some((e) => e.test(fe())) ||
3781
+ ($t(j, { action: f.render, componentType: m.page }),
3782
+ e.callMarkNTBT && tn()));
3783
+ }
3784
+ let sn = !1, cn = !1;
3785
+ const un = (e) => {
3786
+ sn = !e.persisted;
3787
+ }, ln = (e, t = 'hidden', n = !1) => {
3788
+ cn ||
3789
+ (addEventListener('pagehide', un),
3790
+ addEventListener('beforeunload', () => { }),
3791
+ (cn = !0)),
3792
+ addEventListener('visibilitychange', ({ timeStamp: n }) => {
3793
+ document.visibilityState === t &&
3794
+ e({ timeStamp: n, isUnloading: sn });
3795
+ }, { capture: !0, once: n });
3796
+ }, dn = 36e3;
3797
+ function pn() {
3798
+ const e = pt(Ae());
3799
+ if ((e &&
3800
+ (O.forEach((e) => {
3801
+ oe[e] && delete oe[e];
3802
+ }),
3803
+ st()),
3804
+ !oe.lastEventTime || !Le.sessionStart || !e))
3805
+ return;
3806
+ const t = Math.round((oe.lastEventTime - Le.sessionStart) / 1e3);
3807
+ if (t < 1 || t > dn)
3808
+ return;
3809
+ const n = Ce(t);
3810
+ $t(N, {
3811
+ action: f.measurement,
3812
+ componentType: m.page,
3813
+ session_duration: t,
3814
+ session_end: oe.lastEventTime,
3815
+ session_start: Le.sessionStart,
3816
+ session_rank: n,
3817
+ });
3818
+ }
3819
+ function mn() {
3820
+ return ((mn = Object.assign
3821
+ ? Object.assign.bind()
3822
+ : function (e) {
3823
+ for (var t = 1; t < arguments.length; t++) {
3824
+ var n = arguments[t];
3825
+ for (var r in n)
3826
+ Object.prototype.hasOwnProperty.call(n, r) &&
3827
+ (e[r] = n[r]);
3828
+ }
3829
+ return e;
3830
+ }),
3831
+ mn.apply(this, arguments));
3832
+ }
3833
+ const fn = [], vn = [], gn = () => {
3834
+ const e = fn.shift();
3835
+ e && e();
3836
+ }, bn = () => {
3837
+ const e = vn.shift();
3838
+ e && e();
3839
+ };
3840
+ let hn = {};
3841
+ function wn(e) {
3842
+ const t = (function (e) {
3843
+ return {
3844
+ test_name: e.testName,
3845
+ group_name: e.group,
3846
+ subject_id: e.subjectId,
3847
+ exposed_at: Ae(),
3848
+ subject_type: e.subjectType,
3849
+ platform: A.platform,
3850
+ };
3851
+ })(e);
3852
+ (hn[e.testName] = hn[e.testName] || 0),
3853
+ hn[e.testName] + k > Ae()
3854
+ ? lt({
3855
+ metricName: `Event: exposeExperiment ${e.testName} not sent`,
3856
+ data: t,
3857
+ })
3858
+ : ((hn[e.testName] = Ae()),
3859
+ ot(E, hn),
3860
+ lt({
3861
+ metricName: `Event: exposeExperiment ${e.testName} sent`,
3862
+ data: t,
3863
+ }),
3864
+ _t({
3865
+ url: A.exposureEndpoint,
3866
+ data: [t],
3867
+ onError: (t, n) => {
3868
+ ;
3869
+ (hn[e.testName] = 0), ot(E, hn), A.onError(t, n);
3870
+ },
3871
+ isJSON: !0,
3872
+ importance: l.high,
3873
+ }));
3874
+ }
3875
+ const yn = (e) => {
3876
+ var t, r, i;
3877
+ U(e),
3878
+ z() &&
3879
+ (H.languageCode =
3880
+ (null == (t = navigator)
3881
+ ? void 0
3882
+ : t.languages[0]) ||
3883
+ (null == (r = navigator) ? void 0 : r.language) ||
3884
+ ''),
3885
+ te(),
3886
+ (() => {
3887
+ var e;
3888
+ if (z() && null != (e = window) && e.indexedDB) {
3889
+ const e = (function (e, t, { blocked: n, upgrade: r, blocking: i, terminated: a, } = {}) {
3890
+ const o = indexedDB.open(e, t), s = Je(o);
3891
+ return (r &&
3892
+ o.addEventListener('upgradeneeded', (e) => {
3893
+ r(Je(o.result), e.oldVersion, e.newVersion, Je(o.transaction), e);
3894
+ }),
3895
+ n &&
3896
+ o.addEventListener('blocked', (e) => n(e.oldVersion, e.newVersion, e)),
3897
+ s
3898
+ .then((e) => {
3899
+ a &&
3900
+ e.addEventListener('close', () => a()),
3901
+ i &&
3902
+ e.addEventListener('versionchange', (e) => i(e.oldVersion, e.newVersion, e));
3903
+ })
3904
+ .catch(() => { }),
3905
+ s);
3906
+ })('keyval-store', 1, {
3907
+ upgrade(e) {
3908
+ e.createObjectStore('keyval');
3909
+ },
3910
+ });
3911
+ rt({
3912
+ idbKeyval: {
3913
+ get: async (t) => (await e).get('keyval', t),
3914
+ set: async (t, n) => (await e).put('keyval', n, t),
3915
+ delete: async (t) => (await e).delete('keyval', t),
3916
+ keys: async () => (await e).getAllKeys('keyval'),
3917
+ },
3918
+ });
3919
+ }
3920
+ else
3921
+ rt({
3922
+ idbKeyval: {
3923
+ get: async (e) => new Promise((t) => {
3924
+ t(it[e]);
3925
+ }),
3926
+ set: async (e, t) => new Promise((n) => {
3927
+ ;
3928
+ (it[e] = t), n(e);
3929
+ }),
3930
+ delete: async (e) => new Promise(() => {
3931
+ delete it[e];
3932
+ }),
3933
+ keys: async () => new Promise((e) => {
3934
+ e(Object.keys(it));
3935
+ }),
3936
+ },
3937
+ });
3938
+ })(),
3939
+ lt({
3940
+ metricName: 'Initialized Analytics:',
3941
+ data: { deviceId: H.deviceId },
3942
+ }),
3943
+ fn.push(() => {
3944
+ Pt();
3945
+ }),
3946
+ (async () => {
3947
+ const e = await at(S);
3948
+ rt({ isReady: !0 }),
3949
+ gn(),
3950
+ e &&
3951
+ (bn(),
3952
+ se({
3953
+ eventId: e.eventId || oe.eventId,
3954
+ sequenceNumber: e.sequenceNumber || oe.sequenceNumber,
3955
+ sessionId: e.sessionId || oe.sessionId,
3956
+ lastEventTime: e.lastEventTime || oe.lastEventTime,
3957
+ sessionUUID: e.sessionUUID || oe.sessionUUID,
3958
+ }),
3959
+ (function (e) {
3960
+ se(mn({}, (function (e) {
3961
+ const t = {};
3962
+ return (O.forEach((n) => {
3963
+ e[n] && (t[n] = e[n]);
3964
+ }),
3965
+ t);
3966
+ })(e), de()));
3967
+ })(e),
3968
+ Ue({
3969
+ sessionStart: e.sessionStart || oe.sessionStart,
3970
+ }),
3971
+ De({
3972
+ ac: e.ac || Ie.ac,
3973
+ af: e.af || Ie.af,
3974
+ ah: e.ah || Ie.ah,
3975
+ al: e.al || Ie.al,
3976
+ am: e.am || Ie.am,
3977
+ ar: e.ar || Ie.ar,
3978
+ as: e.as || Ie.as,
3979
+ pv: e.pv || Ie.pv,
3980
+ }),
3981
+ A.trackUserId &&
3982
+ Y({ userId: e.userId || H.userId }),
3983
+ pn(),
3984
+ lt({
3985
+ metricName: 'Initialized Analytics IndexedDB:',
3986
+ data: e,
3987
+ }));
3988
+ })(),
3989
+ (async function () {
3990
+ at(E)
3991
+ .then((e) => {
3992
+ hn = null != e ? e : {};
3993
+ })
3994
+ .catch((e) => {
3995
+ e instanceof Error && A.onError(e);
3996
+ });
3997
+ })(),
3998
+ Z(),
3999
+ z() &&
4000
+ (ln(() => {
4001
+ se({ lastEventTime: Ae() }), st(), Bt();
4002
+ }, 'hidden'),
4003
+ ln(() => {
4004
+ pn();
4005
+ }, 'visible')),
4006
+ z() &&
4007
+ ((i = () => {
4008
+ var e, t, n, r;
4009
+ te(),
4010
+ ee({
4011
+ width: null !=
4012
+ (e =
4013
+ null == (t = window)
4014
+ ? void 0
4015
+ : t.innerWidth)
4016
+ ? e
4017
+ : null,
4018
+ height: null !=
4019
+ (n =
4020
+ null == (r = window)
4021
+ ? void 0
4022
+ : r.innerHeight)
4023
+ ? n
4024
+ : null,
4025
+ });
4026
+ }),
4027
+ addEventListener('resize', () => {
4028
+ requestAnimationFrame(() => {
4029
+ i();
4030
+ });
4031
+ })),
4032
+ (() => {
4033
+ if (z())
4034
+ try {
4035
+ const e = n(2);
4036
+ (en.markStep = e.markStep),
4037
+ (en.markStepOnce = e.markStepOnce),
4038
+ (en.incrementUjNavigation =
4039
+ e.incrementUjNavigation),
4040
+ (Yt = new e.Perfume({
4041
+ analyticsTracker: (e) => {
4042
+ const { data: t, attribution: n, metricName: r, navigatorInformation: i, rating: a, } = e, o = I[r], s = (null == n
4043
+ ? void 0
4044
+ : n.category) || null;
4045
+ if (!o && !s)
4046
+ return;
4047
+ const c = (null == i
4048
+ ? void 0
4049
+ : i.deviceMemory) || 0, u = (null == i
4050
+ ? void 0
4051
+ : i.hardwareConcurrency) || 0, l = (null == i
4052
+ ? void 0
4053
+ : i.isLowEndDevice) || !1, p = (null == i
4054
+ ? void 0
4055
+ : i.isLowEndExperience) || !1, v = (null == i
4056
+ ? void 0
4057
+ : i.serviceWorkerStatus) ||
4058
+ 'unsupported', g = Vt({
4059
+ deviceMemory: c,
4060
+ hardwareConcurrency: u,
4061
+ isLowEndDevice: l,
4062
+ isLowEndExperience: p,
4063
+ serviceWorkerStatus: v,
4064
+ }, Gt), b = {
4065
+ is_low_end_device: l,
4066
+ is_low_end_experience: p,
4067
+ page_key: re.pageKey || '',
4068
+ save_data: t.saveData || !1,
4069
+ service_worker: v,
4070
+ is_perf_metric: !0,
4071
+ };
4072
+ if ('navigationTiming' === r)
4073
+ t &&
4074
+ 'number' ==
4075
+ typeof t.redirectTime &&
4076
+ Ht({
4077
+ metricName: I.redirectTime.eventName,
4078
+ metricType: d.histogram,
4079
+ tags: b,
4080
+ value: t.redirectTime || 0,
4081
+ });
4082
+ else if ('TTFB' === r)
4083
+ $t(o.eventName, Vt({
4084
+ action: f.measurement,
4085
+ componentType: m.page,
4086
+ duration: t || null,
4087
+ vitalsScore: a || null,
4088
+ }, g)),
4089
+ Ht({
4090
+ metricName: I.TTFB.eventName,
4091
+ metricType: d.histogram,
4092
+ tags: Vt({}, b),
4093
+ value: t,
4094
+ }),
4095
+ a &&
4096
+ Ht({
4097
+ metricName: `perf_web_vitals_ttfb_${a}`,
4098
+ metricType: d.count,
4099
+ tags: b,
4100
+ value: 1,
4101
+ });
4102
+ else if ('networkInformation' === r)
4103
+ null != t &&
4104
+ t.effectiveType &&
4105
+ ((Gt = t),
4106
+ $t(o.eventName, {
4107
+ action: f.measurement,
4108
+ componentType: m.page,
4109
+ networkInformationDownlink: t.downlink,
4110
+ networkInformationEffectiveType: t.effectiveType,
4111
+ networkInformationRtt: t.rtt,
4112
+ networkInformationSaveData: t.saveData,
4113
+ navigatorDeviceMemory: c,
4114
+ navigatorHardwareConcurrency: u,
4115
+ }));
4116
+ else if ('storageEstimate' === r)
4117
+ $t(o.eventName, Vt({
4118
+ action: f.measurement,
4119
+ componentType: m.page,
4120
+ }, t, g)),
4121
+ Ht({
4122
+ metricName: 'perf_storage_estimate_caches',
4123
+ metricType: d.histogram,
4124
+ tags: b,
4125
+ value: t.caches,
4126
+ }),
4127
+ Ht({
4128
+ metricName: 'perf_storage_estimate_indexed_db',
4129
+ metricType: d.histogram,
4130
+ tags: b,
4131
+ value: t.indexedDB,
4132
+ });
4133
+ else if ('CLS' === r)
4134
+ $t(o.eventName, Vt({
4135
+ action: f.measurement,
4136
+ componentType: m.page,
4137
+ score: 100 * t || null,
4138
+ vitalsScore: a || null,
4139
+ }, g)),
4140
+ a &&
4141
+ Ht({
4142
+ metricName: `perf_web_vitals_cls_${a}`,
4143
+ metricType: d.count,
4144
+ tags: b,
4145
+ value: 1,
4146
+ });
4147
+ else if ('FID' === r) {
4148
+ const e = (null == n
4149
+ ? void 0
4150
+ : n.performanceEntry) ||
4151
+ null, r = parseInt((null == e
4152
+ ? void 0
4153
+ : e.processingStart) || '');
4154
+ $t(o.eventName, Vt({
4155
+ action: f.measurement,
4156
+ componentType: m.page,
4157
+ duration: t || null,
4158
+ processingStart: null != e &&
4159
+ e.processingStart
4160
+ ? r
4161
+ : null,
4162
+ startTime: null != e && e.startTime
4163
+ ? parseInt(e.startTime)
4164
+ : null,
4165
+ vitalsScore: a || null,
4166
+ }, g)),
4167
+ a &&
4168
+ Ht({
4169
+ metricName: `perf_web_vitals_fidVitals_${a}`,
4170
+ metricType: d.count,
4171
+ tags: b,
4172
+ value: 1,
4173
+ });
4174
+ }
4175
+ else
4176
+ 'userJourneyStep' === r
4177
+ ? ($t('perf_user_journey_step', Vt({
4178
+ action: f.measurement,
4179
+ componentType: m.page,
4180
+ duration: t || null,
4181
+ rating: null != a
4182
+ ? a
4183
+ : null,
4184
+ step_name: (null == n
4185
+ ? void 0
4186
+ : n.stepName) ||
4187
+ '',
4188
+ }, g)),
4189
+ Ht({
4190
+ metricName: `user_journey_step.${A.projectName}.${A.platform}.${(null == n ? void 0 : n.stepName) || ''}_vitals_${a}`,
4191
+ metricType: d.count,
4192
+ tags: b,
4193
+ value: 1,
4194
+ }),
4195
+ Ht({
4196
+ metricName: `user_journey_step.${A.projectName}.${A.platform}.${(null == n ? void 0 : n.stepName) || ''}`,
4197
+ metricType: d.distribution,
4198
+ tags: b,
4199
+ value: t || null,
4200
+ }))
4201
+ : I[r] &&
4202
+ t &&
4203
+ ($t(o.eventName, Vt({
4204
+ action: f.measurement,
4205
+ componentType: m.page,
4206
+ duration: t || null,
4207
+ vitalsScore: a || null,
4208
+ }, g)),
4209
+ a &&
4210
+ (Ht({
4211
+ metricName: `perf_web_vitals_${Xt(r)}_${a}`,
4212
+ metricType: d.count,
4213
+ tags: b,
4214
+ value: 1,
4215
+ }),
4216
+ 'LCP' === r &&
4217
+ Ht({
4218
+ metricName: `perf_web_vitals_${Xt(r)}`,
4219
+ metricType: d.distribution,
4220
+ tags: b,
4221
+ value: t,
4222
+ })));
4223
+ },
4224
+ maxMeasureTime: 3e4,
4225
+ steps: A.steps,
4226
+ onMarkStep: Zt,
4227
+ }));
4228
+ }
4229
+ catch (e) {
4230
+ e instanceof Error && A.onError(e);
4231
+ }
4232
+ })();
4233
+ }, Tn = (e) => {
4234
+ Y(e),
4235
+ e.userAgent && Z(),
4236
+ lt({
4237
+ metricName: 'Identify:',
4238
+ data: {
4239
+ countryCode: H.countryCode,
4240
+ deviceId: H.deviceId,
4241
+ userId: H.userId,
4242
+ },
4243
+ });
4244
+ }, kn = ({ blacklistRegex: e, pageKeyRegex: t, browserHistory: n, }) => {
4245
+ Kt({ blacklistRegex: e || [], isEnabled: !0 }),
4246
+ ae({ pageKeyRegex: t }),
4247
+ on({ callMarkNTBT: !1 }),
4248
+ n.listen(() => {
4249
+ on();
4250
+ });
4251
+ }, _n = ({ blacklistRegex: e, pageKeyRegex: t, nextJsRouter: n, }) => {
4252
+ Kt({ blacklistRegex: e || [], isEnabled: !0 }),
4253
+ ae({ pageKeyRegex: t }),
4254
+ on({ callMarkNTBT: !1 }),
4255
+ n.events.on('routeChangeComplete', () => {
4256
+ on();
4257
+ });
4258
+ }, Sn = () => {
4259
+ Y({ isOptOut: !0 }), ot(S, {});
4260
+ }, En = () => {
4261
+ Y({ isOptOut: !1 });
4262
+ }, xn = {
4263
+ Button: {
4264
+ label: 'cb_button',
4265
+ uuid: 'e921a074-40e6-4371-8700-134d5cd633e6',
4266
+ componentType: m.button,
4267
+ },
4268
+ };
4269
+ function On(e, t, n) {
4270
+ return { componentName: e, actions: t, data: n };
4271
+ }
4272
+ function jn() {
4273
+ return ((jn = Object.assign
4274
+ ? Object.assign.bind()
4275
+ : function (e) {
4276
+ for (var t = 1; t < arguments.length; t++) {
4277
+ var n = arguments[t];
4278
+ for (var r in n)
4279
+ Object.prototype.hasOwnProperty.call(n, r) &&
4280
+ (e[r] = n[r]);
4281
+ }
4282
+ return e;
4283
+ }),
4284
+ jn.apply(this, arguments));
4285
+ }
4286
+ function Nn(e, t, n) {
4287
+ const { componentName: r, data: i } = n;
4288
+ $t(e.label, jn({
4289
+ componentType: e.componentType,
4290
+ action: t,
4291
+ loggingId: e.uuid,
4292
+ component_name: r,
4293
+ }, i));
4294
+ }
4295
+ const In = {
4296
+ actionMapping: { onPress: f.click, onHover: f.hover },
4297
+ handlers: {
4298
+ Button: {
4299
+ [f.click]: (e) => Nn(xn.Button, f.click, e),
4300
+ [f.hover]: (e) => Nn(xn.Button, f.hover, e),
4301
+ },
4302
+ },
4303
+ };
4304
+ function Pn(e, t = !1) {
4305
+ t
4306
+ ? _t({
4307
+ url: A.tracesEndpoint,
4308
+ data: { traces: e },
4309
+ isJSON: !0,
4310
+ onError: A.onError,
4311
+ })
4312
+ : yt(() => {
4313
+ _t({
4314
+ url: A.tracesEndpoint,
4315
+ data: { traces: e },
4316
+ isJSON: !0,
4317
+ onError: A.onError,
4318
+ });
4319
+ }),
4320
+ ut({ metricName: 'Batch Traces', data: e });
4321
+ }
4322
+ function Mn() {
4323
+ return ((Mn = Object.assign
4324
+ ? Object.assign.bind()
4325
+ : function (e) {
4326
+ for (var t = 1; t < arguments.length; t++) {
4327
+ var n = arguments[t];
4328
+ for (var r in n)
4329
+ Object.prototype.hasOwnProperty.call(n, r) &&
4330
+ (e[r] = n[r]);
4331
+ }
4332
+ return e;
4333
+ }),
4334
+ Mn.apply(this, arguments));
4335
+ }
4336
+ const Bn = 1e6;
4337
+ function Cn(e) {
4338
+ return e * Bn;
4339
+ }
4340
+ function Dn(e = (function () {
4341
+ var e;
4342
+ return null == (e = window) ? void 0 : e.crypto;
4343
+ })()) {
4344
+ const t = new Uint32Array(2);
4345
+ return (null == e || e.getRandomValues(t),
4346
+ ((BigInt(t[0]) << BigInt(32)) + BigInt(t[1])).toString());
4347
+ }
4348
+ function An(e, t) {
4349
+ return {
4350
+ 'x-datadog-origin': 'rum',
4351
+ 'x-datadog-parent-id': t,
4352
+ 'x-datadog-sampling-priority': '1',
4353
+ 'x-datadog-trace-id': e,
4354
+ };
4355
+ }
4356
+ function Ln(e) {
4357
+ var t;
4358
+ const { name: n, traceId: r, spanId: i, start: a, duration: o, resource: s, meta: c, } = e;
4359
+ return {
4360
+ duration: o ? Cn(o) : 0,
4361
+ name: n,
4362
+ resource: s,
4363
+ service: A.projectName,
4364
+ span_id: null != i ? i : Dn(),
4365
+ start: a ? Cn(a) : 0,
4366
+ trace_id: null != r ? r : Dn(),
4367
+ parent_id: P,
4368
+ type: M,
4369
+ meta: Mn({ platform: A.platform }, re.pageKey ? { page_key: re.pageKey } : {}, null != (t = Se.ujs) && t.length
4370
+ ? { last_ujs: Se.ujs[Se.ujs.length - 1] }
4371
+ : {}, null != c ? c : {}),
4372
+ };
4373
+ }
4374
+ function Un(e) {
4375
+ return [Ln(e)];
4376
+ }
4377
+ function Rn(e, t) {
4378
+ Oe() &&
4379
+ (function (e) {
4380
+ return e.length > 0;
4381
+ })(e) &&
4382
+ (t &&
4383
+ (function (e, t) {
4384
+ e.forEach((e) => (function (e, t) {
4385
+ const n = Mn({}, e.meta, t.meta), r = {
4386
+ start: t.start ? Cn(t.start) : e.start,
4387
+ duration: t.duration
4388
+ ? Cn(t.duration)
4389
+ : e.duration,
4390
+ };
4391
+ Object.assign(e, t, Mn({ meta: n }, r));
4392
+ })(e, t));
4393
+ })(e, t),
4394
+ je.tracesQueue.push(e),
4395
+ wt(Pn) && (Pn(je.tracesQueue), (je.tracesQueue = [])));
4396
+ }
4397
+ function qn(e) {
4398
+ var t = (function (e, t) {
4399
+ if ('object' != typeof e || null === e)
4400
+ return e;
4401
+ var n = e[Symbol.toPrimitive];
4402
+ if (void 0 !== n) {
4403
+ var r = n.call(e, 'string');
4404
+ if ('object' != typeof r)
4405
+ return r;
4406
+ throw new TypeError('@@toPrimitive must return a primitive value.');
4407
+ }
4408
+ return String(e);
4409
+ })(e);
4410
+ return 'symbol' == typeof t ? t : String(t);
4411
+ }
4412
+ function Fn() {
4413
+ return ((Fn = Object.assign
4414
+ ? Object.assign.bind()
4415
+ : function (e) {
4416
+ for (var t = 1; t < arguments.length; t++) {
4417
+ var n = arguments[t];
4418
+ for (var r in n)
4419
+ Object.prototype.hasOwnProperty.call(n, r) &&
4420
+ (e[r] = n[r]);
4421
+ }
4422
+ return e;
4423
+ }),
4424
+ Fn.apply(this, arguments));
4425
+ }
4426
+ function zn() {
4427
+ return (void 0 !== typeof window &&
4428
+ 'performance' in window &&
4429
+ 'mark' in performance &&
4430
+ 'getEntriesByName' in performance);
4431
+ }
4432
+ function Kn(e, t) {
4433
+ return `perf_${e}${null != t && t.label ? `_${t.label}` : ''}`;
4434
+ }
4435
+ function $n(e, t, n) {
4436
+ return `${Kn(e, n)}__${t}`;
4437
+ }
4438
+ let Qn = {};
4439
+ function Wn(e, t, n) {
4440
+ if (!zn())
4441
+ return;
4442
+ const r = $n(e, t, n);
4443
+ if ((performance.mark(r), 'end' === t)) {
4444
+ const t = Kn(e, n);
4445
+ !(function (e, t, n) {
4446
+ try {
4447
+ performance.measure(e, t, n);
4448
+ }
4449
+ catch (e) {
4450
+ A.onError(e);
4451
+ }
4452
+ })(t, $n(e, 'start', n), r);
4453
+ const i = performance.getEntriesByName(t).pop();
4454
+ i &&
4455
+ Ht(Fn({
4456
+ metricName: e,
4457
+ metricType: d.distribution,
4458
+ value: i.duration,
4459
+ }, null != n && n.tags ? { tags: n.tags } : {}));
4460
+ }
4461
+ }
4462
+ function Hn(e, t) {
4463
+ if (!zn())
4464
+ return;
4465
+ const n = $n(e, 'start', t);
4466
+ Qn[n] || (Wn(e, 'start', t), (Qn[n] = !0));
4467
+ }
4468
+ function Vn(e, t) {
4469
+ const n = $n(e, 'start', t), r = (function (e, t) {
4470
+ if (null == e)
4471
+ return {};
4472
+ var n, r, i = {}, a = Object.keys(e);
4473
+ for (r = 0; r < a.length; r++)
4474
+ (n = a[r]), t.indexOf(n) >= 0 || (i[n] = e[n]);
4475
+ return i;
4476
+ })(Qn, [n].map(qn));
4477
+ Qn = r;
4478
+ }
4479
+ function Jn(e, t) {
4480
+ if (!zn())
4481
+ return;
4482
+ const n = $n(e, 'start', t);
4483
+ Qn[n] && (Wn(e, 'end', t), Vn(e, t));
4484
+ }
4485
+ function Xn() {
4486
+ zn() && (performance.clearMarks(), (Qn = {}));
4487
+ }
4488
+ var Gn = n(784);
4489
+ function Zn() {
4490
+ return ((Zn = Object.assign
4491
+ ? Object.assign.bind()
4492
+ : function (e) {
4493
+ for (var t = 1; t < arguments.length; t++) {
4494
+ var n = arguments[t];
4495
+ for (var r in n)
4496
+ Object.prototype.hasOwnProperty.call(n, r) &&
4497
+ (e[r] = n[r]);
4498
+ }
4499
+ return e;
4500
+ }),
4501
+ Zn.apply(this, arguments));
4502
+ }
4503
+ function Yn(e, t, n = l.low) {
4504
+ const r = (0, Gn.useRef)(t);
4505
+ return ((0, Gn.useEffect)(() => {
4506
+ r.current = t;
4507
+ }, [t]),
4508
+ (0, Gn.useCallback)((t) => {
4509
+ $t(e, Zn({}, r.current, t), n);
4510
+ }, [e, n]));
4511
+ }
4512
+ function er() {
4513
+ return ((er = Object.assign
4514
+ ? Object.assign.bind()
4515
+ : function (e) {
4516
+ for (var t = 1; t < arguments.length; t++) {
4517
+ var n = arguments[t];
4518
+ for (var r in n)
4519
+ Object.prototype.hasOwnProperty.call(n, r) &&
4520
+ (e[r] = n[r]);
4521
+ }
4522
+ return e;
4523
+ }),
4524
+ er.apply(this, arguments));
4525
+ }
4526
+ function tr(e, t, n = l.low) {
4527
+ ;
4528
+ (0, Gn.useEffect)(() => {
4529
+ const r = er({}, t, { action: f.render });
4530
+ $t(e, r, n);
4531
+ }, []);
4532
+ }
4533
+ function nr() {
4534
+ return ((nr = Object.assign
4535
+ ? Object.assign.bind()
4536
+ : function (e) {
4537
+ for (var t = 1; t < arguments.length; t++) {
4538
+ var n = arguments[t];
4539
+ for (var r in n)
4540
+ Object.prototype.hasOwnProperty.call(n, r) &&
4541
+ (e[r] = n[r]);
4542
+ }
4543
+ return e;
4544
+ }),
4545
+ nr.apply(this, arguments));
4546
+ }
4547
+ const rr = function (e, t) {
4548
+ return {
4549
+ markStartPerf: (0, Gn.useCallback)(() => Hn(e, t), [e, t]),
4550
+ markEndPerf: (0, Gn.useCallback)((n) => Jn(e, nr({}, t, n)), [e, t]),
4551
+ };
4552
+ };
4553
+ function ir() {
4554
+ return ((ir = Object.assign
4555
+ ? Object.assign.bind()
4556
+ : function (e) {
4557
+ for (var t = 1; t < arguments.length; t++) {
4558
+ var n = arguments[t];
4559
+ for (var r in n)
4560
+ Object.prototype.hasOwnProperty.call(n, r) &&
4561
+ (e[r] = n[r]);
4562
+ }
4563
+ return e;
4564
+ }),
4565
+ ir.apply(this, arguments));
4566
+ }
4567
+ function ar() {
4568
+ return Object.entries(ir({}, Se, zt(), {
4569
+ sessionUUID: oe.sessionUUID,
4570
+ userId: oe.userId,
4571
+ })).reduce((e, t) => {
4572
+ return null != (n = t[1]) && '' !== n
4573
+ ? ir({}, e, { [t[0]]: t[1] })
4574
+ : e;
4575
+ var n;
4576
+ }, {});
4577
+ }
4578
+ async function or() {
4579
+ return new Promise((e) => {
4580
+ Mt(vt(je.eventsQueue)),
4581
+ Qt(bt(je.metricsQueue), !0),
4582
+ Pn(je.tracesQueue, !0),
4583
+ Ne({ eventsQueue: [], metricsQueue: [], tracesQueue: [] }),
4584
+ e();
4585
+ });
4586
+ }
4587
+ function sr() {
4588
+ return {
4589
+ 'X-CB-Device-ID': H.deviceId || 'unknown',
4590
+ 'X-CB-Is-Logged-In': H.userId ? 'true' : 'false',
4591
+ 'X-CB-Pagekey': re.pageKey || 'unknown',
4592
+ 'X-CB-UJS': ((e = Se.ujs),
4593
+ void 0 === e || 0 === e.length ? '' : e.join(',')),
4594
+ 'X-CB-Platform': A.platform || 'unknown',
4595
+ 'X-CB-Project-Name': A.projectName || 'unknown',
4596
+ 'X-CB-Session-UUID': oe.sessionUUID || 'unknown',
4597
+ 'X-CB-Version-Name': A.version
4598
+ ? String(A.version)
4599
+ : 'unknown',
4600
+ };
4601
+ var e;
4602
+ }
4603
+ })(),
4604
+ r);
4605
+ })();
4606
+ });
4607
+ export {};
4608
+ //# sourceMappingURL=ca.js.map