shipscreens 0.1.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 (605) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +27 -0
  3. package/bin/shipscreens.js +664 -0
  4. package/cli/assetRefs.js +33 -0
  5. package/cli/auth.js +454 -0
  6. package/cli/buildOutputs.js +146 -0
  7. package/cli/commands/auth.js +65 -0
  8. package/cli/commands/build.js +347 -0
  9. package/cli/commands/copyImport.js +263 -0
  10. package/cli/commands/exportFramefile.js +404 -0
  11. package/cli/commands/init.js +339 -0
  12. package/cli/commands/lock.js +144 -0
  13. package/cli/commands/plan.js +203 -0
  14. package/cli/commands/stage.js +318 -0
  15. package/cli/commands/validate.js +89 -0
  16. package/cli/commands/verify.js +659 -0
  17. package/cli/commands/wizard.js +266 -0
  18. package/cli/dataUrl.js +19 -0
  19. package/cli/fastlaneZip.js +115 -0
  20. package/cli/hash.js +13 -0
  21. package/cli/loadConfig.js +55 -0
  22. package/cli/outputPaths.js +24 -0
  23. package/cli/packageRoot.js +8 -0
  24. package/cli/pathUtils.js +25 -0
  25. package/cli/rendererServer.js +48 -0
  26. package/cli/repoRoot.js +23 -0
  27. package/cli/rootPolicy.js +17 -0
  28. package/cli/schema.js +290 -0
  29. package/cli/snapshotFromConfig.js +116 -0
  30. package/cli/staticServer.js +102 -0
  31. package/cli/templateConfig.js +51 -0
  32. package/cli/viteServer.js +40 -0
  33. package/dist/app/apple-touch-icon.png +0 -0
  34. package/dist/app/assets/AgentCli-8e28laT4.js +17 -0
  35. package/dist/app/assets/AgentCli-8e28laT4.js.map +1 -0
  36. package/dist/app/assets/App-DU0xew0e.js +13 -0
  37. package/dist/app/assets/App-DU0xew0e.js.map +1 -0
  38. package/dist/app/assets/AppReviewAso-OLwc4Rw_.js +4 -0
  39. package/dist/app/assets/AppReviewAso-OLwc4Rw_.js.map +1 -0
  40. package/dist/app/assets/Cancelled-BoeZQa1S.js +2 -0
  41. package/dist/app/assets/Cancelled-BoeZQa1S.js.map +1 -0
  42. package/dist/app/assets/CliPreflightCard-CxYyogdF.js +2 -0
  43. package/dist/app/assets/CliPreflightCard-CxYyogdF.js.map +1 -0
  44. package/dist/app/assets/CopyButton-CGfuSJtU.js +2 -0
  45. package/dist/app/assets/CopyButton-CGfuSJtU.js.map +1 -0
  46. package/dist/app/assets/FastlaneScreenshots-CFT6IiRb.js +52 -0
  47. package/dist/app/assets/FastlaneScreenshots-CFT6IiRb.js.map +1 -0
  48. package/dist/app/assets/FirstExport-B_UDacZm.js +6 -0
  49. package/dist/app/assets/FirstExport-B_UDacZm.js.map +1 -0
  50. package/dist/app/assets/FivePanelFramework-C1z_xUbe.js +60 -0
  51. package/dist/app/assets/FivePanelFramework-C1z_xUbe.js.map +1 -0
  52. package/dist/app/assets/ForgotPassword-ZQ8U3ejz.js +2 -0
  53. package/dist/app/assets/ForgotPassword-ZQ8U3ejz.js.map +1 -0
  54. package/dist/app/assets/Landing-DAIP71DD.js +2 -0
  55. package/dist/app/assets/Landing-DAIP71DD.js.map +1 -0
  56. package/dist/app/assets/LanguageSwitcher-D93nCuuR.js +2 -0
  57. package/dist/app/assets/LanguageSwitcher-D93nCuuR.js.map +1 -0
  58. package/dist/app/assets/Legal-Koe7vi6H.js +2 -0
  59. package/dist/app/assets/Legal-Koe7vi6H.js.map +1 -0
  60. package/dist/app/assets/NotFound-CfY31vMZ.js +2 -0
  61. package/dist/app/assets/NotFound-CfY31vMZ.js.map +1 -0
  62. package/dist/app/assets/Pricing-BQwtFVbj.js +2 -0
  63. package/dist/app/assets/Pricing-BQwtFVbj.js.map +1 -0
  64. package/dist/app/assets/Privacy-CaHf2UM7.js +2 -0
  65. package/dist/app/assets/Privacy-CaHf2UM7.js.map +1 -0
  66. package/dist/app/assets/SignIn-Cyi2_-Mn.js +2 -0
  67. package/dist/app/assets/SignIn-Cyi2_-Mn.js.map +1 -0
  68. package/dist/app/assets/SignUp-C9QH5po_.js +2 -0
  69. package/dist/app/assets/SignUp-C9QH5po_.js.map +1 -0
  70. package/dist/app/assets/SiteHeader-Dj3gDOnR.js +2 -0
  71. package/dist/app/assets/SiteHeader-Dj3gDOnR.js.map +1 -0
  72. package/dist/app/assets/StickyMobileCta-uyWGVhdc.js +2 -0
  73. package/dist/app/assets/StickyMobileCta-uyWGVhdc.js.map +1 -0
  74. package/dist/app/assets/StoreAssetsPipeline-BJlnD3kD.js +4 -0
  75. package/dist/app/assets/StoreAssetsPipeline-BJlnD3kD.js.map +1 -0
  76. package/dist/app/assets/Success-B7k7FvJj.js +2 -0
  77. package/dist/app/assets/Success-B7k7FvJj.js.map +1 -0
  78. package/dist/app/assets/Terms-DgJWOeUD.js +2 -0
  79. package/dist/app/assets/Terms-DgJWOeUD.js.map +1 -0
  80. package/dist/app/assets/ToolsIndex-xMPoFom9.js +6 -0
  81. package/dist/app/assets/ToolsIndex-xMPoFom9.js.map +1 -0
  82. package/dist/app/assets/WorkloadCalculator-Bdt6qPR3.js +5 -0
  83. package/dist/app/assets/WorkloadCalculator-Bdt6qPR3.js.map +1 -0
  84. package/dist/app/assets/calculator-CWfp5Day.js +2 -0
  85. package/dist/app/assets/calculator-CWfp5Day.js.map +1 -0
  86. package/dist/app/assets/check-BWCiUZ-C.js +2 -0
  87. package/dist/app/assets/check-BWCiUZ-C.js.map +1 -0
  88. package/dist/app/assets/chevron-down-DbSAem1L.js +2 -0
  89. package/dist/app/assets/chevron-down-DbSAem1L.js.map +1 -0
  90. package/dist/app/assets/circle-check-CeakjiXC.js +2 -0
  91. package/dist/app/assets/circle-check-CeakjiXC.js.map +1 -0
  92. package/dist/app/assets/clipboard-copy-DgTgnK84.js +2 -0
  93. package/dist/app/assets/clipboard-copy-DgTgnK84.js.map +1 -0
  94. package/dist/app/assets/copy-C9t_FzCZ.js +2 -0
  95. package/dist/app/assets/copy-C9t_FzCZ.js.map +1 -0
  96. package/dist/app/assets/crop-B7IxIx6D.js +2 -0
  97. package/dist/app/assets/crop-B7IxIx6D.js.map +1 -0
  98. package/dist/app/assets/download-65Zuvgwm.js +2 -0
  99. package/dist/app/assets/download-65Zuvgwm.js.map +1 -0
  100. package/dist/app/assets/eye-ouNo8Nv5.js +2 -0
  101. package/dist/app/assets/eye-ouNo8Nv5.js.map +1 -0
  102. package/dist/app/assets/grid-3x3-U1Nk_ppf.js +2 -0
  103. package/dist/app/assets/grid-3x3-U1Nk_ppf.js.map +1 -0
  104. package/dist/app/assets/hero/cli-build-tree-15s.mp4 +0 -0
  105. package/dist/app/assets/hero/cli-build-tree-15s.webm +0 -0
  106. package/dist/app/assets/hero/cli-build-tree-25s.mp4 +0 -0
  107. package/dist/app/assets/hero/cli-build-tree-25s.webm +0 -0
  108. package/dist/app/assets/hero/cli-build-tree-poster.png +0 -0
  109. package/dist/app/assets/hero/demo.gif +0 -0
  110. package/dist/app/assets/hero/demo.mp4 +0 -0
  111. package/dist/app/assets/hero/demo.webm +0 -0
  112. package/dist/app/assets/icons/apple-touch-icon.png +0 -0
  113. package/dist/app/assets/icons/device-base.png +0 -0
  114. package/dist/app/assets/icons/favicon-16x16.png +0 -0
  115. package/dist/app/assets/icons/favicon-32x32.png +0 -0
  116. package/dist/app/assets/icons/favicon.ico +0 -0
  117. package/dist/app/assets/icons/favicon.svg +1 -0
  118. package/dist/app/assets/index-B8Y8Y-Mi.js +180 -0
  119. package/dist/app/assets/index-B8Y8Y-Mi.js.map +1 -0
  120. package/dist/app/assets/index-hyiQFYGv.css +1 -0
  121. package/dist/app/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
  122. package/dist/app/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
  123. package/dist/app/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
  124. package/dist/app/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
  125. package/dist/app/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
  126. package/dist/app/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
  127. package/dist/app/assets/inter-cyrillic-700-normal-CjBOestx.woff2 +0 -0
  128. package/dist/app/assets/inter-cyrillic-700-normal-DrXBdSj3.woff +0 -0
  129. package/dist/app/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
  130. package/dist/app/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
  131. package/dist/app/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
  132. package/dist/app/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
  133. package/dist/app/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
  134. package/dist/app/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
  135. package/dist/app/assets/inter-cyrillic-ext-700-normal-BjwYoWNd.woff2 +0 -0
  136. package/dist/app/assets/inter-cyrillic-ext-700-normal-LO58E6JB.woff +0 -0
  137. package/dist/app/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
  138. package/dist/app/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
  139. package/dist/app/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
  140. package/dist/app/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
  141. package/dist/app/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
  142. package/dist/app/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
  143. package/dist/app/assets/inter-greek-700-normal-BUv2fZ6O.woff +0 -0
  144. package/dist/app/assets/inter-greek-700-normal-C3JjAnD8.woff2 +0 -0
  145. package/dist/app/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
  146. package/dist/app/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
  147. package/dist/app/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
  148. package/dist/app/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
  149. package/dist/app/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
  150. package/dist/app/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
  151. package/dist/app/assets/inter-greek-ext-700-normal-BoQ6DsYi.woff +0 -0
  152. package/dist/app/assets/inter-greek-ext-700-normal-qfdV9bQt.woff2 +0 -0
  153. package/dist/app/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
  154. package/dist/app/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
  155. package/dist/app/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
  156. package/dist/app/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
  157. package/dist/app/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
  158. package/dist/app/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
  159. package/dist/app/assets/inter-latin-700-normal-BLAVimhd.woff +0 -0
  160. package/dist/app/assets/inter-latin-700-normal-Yt3aPRUw.woff2 +0 -0
  161. package/dist/app/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
  162. package/dist/app/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
  163. package/dist/app/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
  164. package/dist/app/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
  165. package/dist/app/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
  166. package/dist/app/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
  167. package/dist/app/assets/inter-latin-ext-700-normal-Ca8adRJv.woff2 +0 -0
  168. package/dist/app/assets/inter-latin-ext-700-normal-TidjK2hL.woff +0 -0
  169. package/dist/app/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
  170. package/dist/app/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
  171. package/dist/app/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
  172. package/dist/app/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
  173. package/dist/app/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
  174. package/dist/app/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
  175. package/dist/app/assets/inter-vietnamese-700-normal-BZaoP0fm.woff +0 -0
  176. package/dist/app/assets/inter-vietnamese-700-normal-DlLaEgI2.woff2 +0 -0
  177. package/dist/app/assets/layout-grid-X9Sgull2.js +2 -0
  178. package/dist/app/assets/layout-grid-X9Sgull2.js.map +1 -0
  179. package/dist/app/assets/merriweather-cyrillic-400-normal-AvfsDsMQ.woff2 +0 -0
  180. package/dist/app/assets/merriweather-cyrillic-400-normal-DAcQ8g-H.woff +0 -0
  181. package/dist/app/assets/merriweather-cyrillic-700-normal-CHCcU-4a.woff +0 -0
  182. package/dist/app/assets/merriweather-cyrillic-700-normal-wbY04GlL.woff2 +0 -0
  183. package/dist/app/assets/merriweather-cyrillic-ext-400-normal-D9NYhYTq.woff2 +0 -0
  184. package/dist/app/assets/merriweather-cyrillic-ext-400-normal-Di6yW_eE.woff +0 -0
  185. package/dist/app/assets/merriweather-cyrillic-ext-700-normal-Bk1p9YoV.woff2 +0 -0
  186. package/dist/app/assets/merriweather-cyrillic-ext-700-normal-DoooT6Vg.woff +0 -0
  187. package/dist/app/assets/merriweather-latin-400-normal-CvqO63Ah.woff +0 -0
  188. package/dist/app/assets/merriweather-latin-400-normal-G4kZaoXi.woff2 +0 -0
  189. package/dist/app/assets/merriweather-latin-700-normal-D4-nzrAh.woff +0 -0
  190. package/dist/app/assets/merriweather-latin-700-normal-DoUP8Ce-.woff2 +0 -0
  191. package/dist/app/assets/merriweather-latin-ext-400-normal-CLqijLtt.woff +0 -0
  192. package/dist/app/assets/merriweather-latin-ext-400-normal-CWVzVQq3.woff2 +0 -0
  193. package/dist/app/assets/merriweather-latin-ext-700-normal-CaBzXGOk.woff +0 -0
  194. package/dist/app/assets/merriweather-latin-ext-700-normal-jHnxg2Kc.woff2 +0 -0
  195. package/dist/app/assets/merriweather-vietnamese-400-normal-Dh8WVvgZ.woff +0 -0
  196. package/dist/app/assets/merriweather-vietnamese-400-normal-hNacsVs_.woff2 +0 -0
  197. package/dist/app/assets/merriweather-vietnamese-700-normal-Bp6kWjW5.woff2 +0 -0
  198. package/dist/app/assets/merriweather-vietnamese-700-normal-C7_HxHBa.woff +0 -0
  199. package/dist/app/assets/montserrat-cyrillic-400-normal-BPq32Q8K.woff2 +0 -0
  200. package/dist/app/assets/montserrat-cyrillic-400-normal-jEs4Tk-Z.woff +0 -0
  201. package/dist/app/assets/montserrat-cyrillic-700-normal-BvLYcGP1.woff +0 -0
  202. package/dist/app/assets/montserrat-cyrillic-700-normal-D-Pqjtdp.woff2 +0 -0
  203. package/dist/app/assets/montserrat-cyrillic-ext-400-normal-DRPPeomZ.woff +0 -0
  204. package/dist/app/assets/montserrat-cyrillic-ext-400-normal-Xqov12YL.woff2 +0 -0
  205. package/dist/app/assets/montserrat-cyrillic-ext-700-normal-D-Mk2xRJ.woff +0 -0
  206. package/dist/app/assets/montserrat-cyrillic-ext-700-normal-MyDreaeu.woff2 +0 -0
  207. package/dist/app/assets/montserrat-latin-400-normal-BLhwKU8k.woff2 +0 -0
  208. package/dist/app/assets/montserrat-latin-400-normal-xItZbAXg.woff +0 -0
  209. package/dist/app/assets/montserrat-latin-700-normal-BWkrl476.woff +0 -0
  210. package/dist/app/assets/montserrat-latin-700-normal-BdjcYUrC.woff2 +0 -0
  211. package/dist/app/assets/montserrat-latin-ext-400-normal-B8bwfy6Y.woff2 +0 -0
  212. package/dist/app/assets/montserrat-latin-ext-400-normal-BffdBkAA.woff +0 -0
  213. package/dist/app/assets/montserrat-latin-ext-700-normal-BOP2Nhf0.woff2 +0 -0
  214. package/dist/app/assets/montserrat-latin-ext-700-normal-DdDFr05Z.woff +0 -0
  215. package/dist/app/assets/montserrat-vietnamese-400-normal-BeEscFYY.woff +0 -0
  216. package/dist/app/assets/montserrat-vietnamese-400-normal-D4oHqQTd.woff2 +0 -0
  217. package/dist/app/assets/montserrat-vietnamese-700-normal-C0x1De3p.woff2 +0 -0
  218. package/dist/app/assets/montserrat-vietnamese-700-normal-DnwGT2D9.woff +0 -0
  219. package/dist/app/assets/playfair-display-cyrillic-400-normal-CjW2EstV.woff2 +0 -0
  220. package/dist/app/assets/playfair-display-cyrillic-400-normal-ZiRag6zj.woff +0 -0
  221. package/dist/app/assets/playfair-display-cyrillic-700-normal-Dk1mTcxf.woff +0 -0
  222. package/dist/app/assets/playfair-display-cyrillic-700-normal-Dw3uKy19.woff2 +0 -0
  223. package/dist/app/assets/playfair-display-latin-400-normal-CFtfchNt.woff2 +0 -0
  224. package/dist/app/assets/playfair-display-latin-400-normal-DHYHbkg3.woff +0 -0
  225. package/dist/app/assets/playfair-display-latin-700-normal-Bc_1Q1cG.woff +0 -0
  226. package/dist/app/assets/playfair-display-latin-700-normal-CuDiGg7c.woff2 +0 -0
  227. package/dist/app/assets/playfair-display-latin-ext-400-normal-BxlSGspa.woff2 +0 -0
  228. package/dist/app/assets/playfair-display-latin-ext-400-normal-qdZwdvNS.woff +0 -0
  229. package/dist/app/assets/playfair-display-latin-ext-700-normal-C58ejOkc.woff2 +0 -0
  230. package/dist/app/assets/playfair-display-latin-ext-700-normal-D5HUU8GT.woff +0 -0
  231. package/dist/app/assets/playfair-display-vietnamese-400-normal-BV2APVTb.woff2 +0 -0
  232. package/dist/app/assets/playfair-display-vietnamese-400-normal-BbvUAu4N.woff +0 -0
  233. package/dist/app/assets/playfair-display-vietnamese-700-normal-CaKJSIny.woff2 +0 -0
  234. package/dist/app/assets/playfair-display-vietnamese-700-normal-Cr1rw0mr.woff +0 -0
  235. package/dist/app/assets/proof/output-01.png +0 -0
  236. package/dist/app/assets/proof/output-02.png +0 -0
  237. package/dist/app/assets/proof/output-03.png +0 -0
  238. package/dist/app/assets/proof/output-04.png +0 -0
  239. package/dist/app/assets/roboto-cyrillic-400-normal-DAIM1_dR.woff2 +0 -0
  240. package/dist/app/assets/roboto-cyrillic-400-normal-DZJji7Rx.woff +0 -0
  241. package/dist/app/assets/roboto-cyrillic-500-normal-BI4HuXre.woff +0 -0
  242. package/dist/app/assets/roboto-cyrillic-500-normal-hCeO1jFL.woff2 +0 -0
  243. package/dist/app/assets/roboto-cyrillic-700-normal-BiSG5NnW.woff2 +0 -0
  244. package/dist/app/assets/roboto-cyrillic-700-normal-KqaQ5bNp.woff +0 -0
  245. package/dist/app/assets/roboto-cyrillic-ext-400-normal-DtZHuW6i.woff +0 -0
  246. package/dist/app/assets/roboto-cyrillic-ext-400-normal-DzMWdK87.woff2 +0 -0
  247. package/dist/app/assets/roboto-cyrillic-ext-500-normal-B7rQpwPu.woff2 +0 -0
  248. package/dist/app/assets/roboto-cyrillic-ext-500-normal-C927yMrb.woff +0 -0
  249. package/dist/app/assets/roboto-cyrillic-ext-700-normal-BuQgZIrO.woff +0 -0
  250. package/dist/app/assets/roboto-cyrillic-ext-700-normal-UFn0vR9r.woff2 +0 -0
  251. package/dist/app/assets/roboto-greek-400-normal-CcizSnRP.woff +0 -0
  252. package/dist/app/assets/roboto-greek-400-normal-jFM2czAU.woff2 +0 -0
  253. package/dist/app/assets/roboto-greek-500-normal-BJMS0heP.woff2 +0 -0
  254. package/dist/app/assets/roboto-greek-500-normal-BLLWU9W-.woff +0 -0
  255. package/dist/app/assets/roboto-greek-700-normal-BcGn9doz.woff2 +0 -0
  256. package/dist/app/assets/roboto-greek-700-normal-D3kmAf0K.woff +0 -0
  257. package/dist/app/assets/roboto-latin-400-normal-068yxgMN.woff +0 -0
  258. package/dist/app/assets/roboto-latin-400-normal-CNwBRw8h.woff2 +0 -0
  259. package/dist/app/assets/roboto-latin-500-normal-CC5nhZkh.woff +0 -0
  260. package/dist/app/assets/roboto-latin-500-normal-CkrA1NAy.woff2 +0 -0
  261. package/dist/app/assets/roboto-latin-700-normal-CXeAXeti.woff2 +0 -0
  262. package/dist/app/assets/roboto-latin-700-normal-DUekQERp.woff +0 -0
  263. package/dist/app/assets/roboto-latin-ext-400-normal-ZYmyxeOy.woff2 +0 -0
  264. package/dist/app/assets/roboto-latin-ext-400-normal-eTRLN0Nt.woff +0 -0
  265. package/dist/app/assets/roboto-latin-ext-500-normal-C_ARlJGk.woff2 +0 -0
  266. package/dist/app/assets/roboto-latin-ext-500-normal-FFcS8vBN.woff +0 -0
  267. package/dist/app/assets/roboto-latin-ext-700-normal-70GS1MYH.woff2 +0 -0
  268. package/dist/app/assets/roboto-latin-ext-700-normal-BS1OuQqR.woff +0 -0
  269. package/dist/app/assets/roboto-math-400-normal-B3wgz80t.woff2 +0 -0
  270. package/dist/app/assets/roboto-math-400-normal-rzxYvyVt.woff +0 -0
  271. package/dist/app/assets/roboto-math-500-normal-CFNaIMFC.woff2 +0 -0
  272. package/dist/app/assets/roboto-math-500-normal-DaFX-ZC8.woff +0 -0
  273. package/dist/app/assets/roboto-math-700-normal-VUAI6Bz2.woff2 +0 -0
  274. package/dist/app/assets/roboto-math-700-normal-pYD1nhov.woff +0 -0
  275. package/dist/app/assets/roboto-symbols-400-normal-Tzuungub.woff +0 -0
  276. package/dist/app/assets/roboto-symbols-400-normal-fF1SLJBj.woff2 +0 -0
  277. package/dist/app/assets/roboto-symbols-500-normal-BXFTxrNR.woff2 +0 -0
  278. package/dist/app/assets/roboto-symbols-500-normal-CAhAe-ik.woff +0 -0
  279. package/dist/app/assets/roboto-symbols-700-normal-CuuvBBxy.woff +0 -0
  280. package/dist/app/assets/roboto-symbols-700-normal-rJi6RjIy.woff2 +0 -0
  281. package/dist/app/assets/roboto-vietnamese-400-normal-CDDxGrUb.woff2 +0 -0
  282. package/dist/app/assets/roboto-vietnamese-400-normal-DmXaN3yE.woff +0 -0
  283. package/dist/app/assets/roboto-vietnamese-500-normal-DW96CsrR.woff +0 -0
  284. package/dist/app/assets/roboto-vietnamese-500-normal-HYpufUYk.woff2 +0 -0
  285. package/dist/app/assets/roboto-vietnamese-700-normal-Dz0HwF-w.woff +0 -0
  286. package/dist/app/assets/roboto-vietnamese-700-normal-iKxYNAzq.woff2 +0 -0
  287. package/dist/app/assets/rocket-BjOXauLe.js +2 -0
  288. package/dist/app/assets/rocket-BjOXauLe.js.map +1 -0
  289. package/dist/app/assets/shield-check-CFNhE_aD.js +2 -0
  290. package/dist/app/assets/shield-check-CFNhE_aD.js.map +1 -0
  291. package/dist/app/assets/signIn-CVoSzqCz.js +2 -0
  292. package/dist/app/assets/signIn-CVoSzqCz.js.map +1 -0
  293. package/dist/app/assets/smartphone-BcQB9gIh.js +2 -0
  294. package/dist/app/assets/smartphone-BcQB9gIh.js.map +1 -0
  295. package/dist/app/assets/terminal-CGhryJds.js +2 -0
  296. package/dist/app/assets/terminal-CGhryJds.js.map +1 -0
  297. package/dist/app/assets/useAuth-lZZC20Tl.js +4 -0
  298. package/dist/app/assets/useAuth-lZZC20Tl.js.map +1 -0
  299. package/dist/app/favicon-16x16.png +0 -0
  300. package/dist/app/favicon-32x32.png +0 -0
  301. package/dist/app/favicon.ico +0 -0
  302. package/dist/app/favicon.svg +10 -0
  303. package/dist/app/index.html +43 -0
  304. package/dist/apple-touch-icon.png +0 -0
  305. package/dist/assets/AgentCli-8e28laT4.js +17 -0
  306. package/dist/assets/AgentCli-8e28laT4.js.map +1 -0
  307. package/dist/assets/App-DU0xew0e.js +13 -0
  308. package/dist/assets/App-DU0xew0e.js.map +1 -0
  309. package/dist/assets/AppReviewAso-OLwc4Rw_.js +4 -0
  310. package/dist/assets/AppReviewAso-OLwc4Rw_.js.map +1 -0
  311. package/dist/assets/Cancelled-BoeZQa1S.js +2 -0
  312. package/dist/assets/Cancelled-BoeZQa1S.js.map +1 -0
  313. package/dist/assets/CliPreflightCard-CxYyogdF.js +2 -0
  314. package/dist/assets/CliPreflightCard-CxYyogdF.js.map +1 -0
  315. package/dist/assets/CopyButton-CGfuSJtU.js +2 -0
  316. package/dist/assets/CopyButton-CGfuSJtU.js.map +1 -0
  317. package/dist/assets/FastlaneScreenshots-CFT6IiRb.js +52 -0
  318. package/dist/assets/FastlaneScreenshots-CFT6IiRb.js.map +1 -0
  319. package/dist/assets/FirstExport-B_UDacZm.js +6 -0
  320. package/dist/assets/FirstExport-B_UDacZm.js.map +1 -0
  321. package/dist/assets/FivePanelFramework-C1z_xUbe.js +60 -0
  322. package/dist/assets/FivePanelFramework-C1z_xUbe.js.map +1 -0
  323. package/dist/assets/ForgotPassword-ZQ8U3ejz.js +2 -0
  324. package/dist/assets/ForgotPassword-ZQ8U3ejz.js.map +1 -0
  325. package/dist/assets/Landing-DAIP71DD.js +2 -0
  326. package/dist/assets/Landing-DAIP71DD.js.map +1 -0
  327. package/dist/assets/LanguageSwitcher-D93nCuuR.js +2 -0
  328. package/dist/assets/LanguageSwitcher-D93nCuuR.js.map +1 -0
  329. package/dist/assets/Legal-Koe7vi6H.js +2 -0
  330. package/dist/assets/Legal-Koe7vi6H.js.map +1 -0
  331. package/dist/assets/NotFound-CfY31vMZ.js +2 -0
  332. package/dist/assets/NotFound-CfY31vMZ.js.map +1 -0
  333. package/dist/assets/Pricing-BQwtFVbj.js +2 -0
  334. package/dist/assets/Pricing-BQwtFVbj.js.map +1 -0
  335. package/dist/assets/Privacy-CaHf2UM7.js +2 -0
  336. package/dist/assets/Privacy-CaHf2UM7.js.map +1 -0
  337. package/dist/assets/SignIn-Cyi2_-Mn.js +2 -0
  338. package/dist/assets/SignIn-Cyi2_-Mn.js.map +1 -0
  339. package/dist/assets/SignUp-C9QH5po_.js +2 -0
  340. package/dist/assets/SignUp-C9QH5po_.js.map +1 -0
  341. package/dist/assets/SiteHeader-Dj3gDOnR.js +2 -0
  342. package/dist/assets/SiteHeader-Dj3gDOnR.js.map +1 -0
  343. package/dist/assets/StickyMobileCta-uyWGVhdc.js +2 -0
  344. package/dist/assets/StickyMobileCta-uyWGVhdc.js.map +1 -0
  345. package/dist/assets/StoreAssetsPipeline-BJlnD3kD.js +4 -0
  346. package/dist/assets/StoreAssetsPipeline-BJlnD3kD.js.map +1 -0
  347. package/dist/assets/Success-B7k7FvJj.js +2 -0
  348. package/dist/assets/Success-B7k7FvJj.js.map +1 -0
  349. package/dist/assets/Terms-DgJWOeUD.js +2 -0
  350. package/dist/assets/Terms-DgJWOeUD.js.map +1 -0
  351. package/dist/assets/ToolsIndex-xMPoFom9.js +6 -0
  352. package/dist/assets/ToolsIndex-xMPoFom9.js.map +1 -0
  353. package/dist/assets/WorkloadCalculator-Bdt6qPR3.js +5 -0
  354. package/dist/assets/WorkloadCalculator-Bdt6qPR3.js.map +1 -0
  355. package/dist/assets/calculator-CWfp5Day.js +2 -0
  356. package/dist/assets/calculator-CWfp5Day.js.map +1 -0
  357. package/dist/assets/check-BWCiUZ-C.js +2 -0
  358. package/dist/assets/check-BWCiUZ-C.js.map +1 -0
  359. package/dist/assets/chevron-down-DbSAem1L.js +2 -0
  360. package/dist/assets/chevron-down-DbSAem1L.js.map +1 -0
  361. package/dist/assets/circle-check-CeakjiXC.js +2 -0
  362. package/dist/assets/circle-check-CeakjiXC.js.map +1 -0
  363. package/dist/assets/clipboard-copy-DgTgnK84.js +2 -0
  364. package/dist/assets/clipboard-copy-DgTgnK84.js.map +1 -0
  365. package/dist/assets/copy-C9t_FzCZ.js +2 -0
  366. package/dist/assets/copy-C9t_FzCZ.js.map +1 -0
  367. package/dist/assets/crop-B7IxIx6D.js +2 -0
  368. package/dist/assets/crop-B7IxIx6D.js.map +1 -0
  369. package/dist/assets/download-65Zuvgwm.js +2 -0
  370. package/dist/assets/download-65Zuvgwm.js.map +1 -0
  371. package/dist/assets/eye-ouNo8Nv5.js +2 -0
  372. package/dist/assets/eye-ouNo8Nv5.js.map +1 -0
  373. package/dist/assets/grid-3x3-U1Nk_ppf.js +2 -0
  374. package/dist/assets/grid-3x3-U1Nk_ppf.js.map +1 -0
  375. package/dist/assets/hero/cli-build-tree-15s.mp4 +0 -0
  376. package/dist/assets/hero/cli-build-tree-15s.webm +0 -0
  377. package/dist/assets/hero/cli-build-tree-25s.mp4 +0 -0
  378. package/dist/assets/hero/cli-build-tree-25s.webm +0 -0
  379. package/dist/assets/hero/cli-build-tree-poster.png +0 -0
  380. package/dist/assets/hero/demo.gif +0 -0
  381. package/dist/assets/hero/demo.mp4 +0 -0
  382. package/dist/assets/hero/demo.webm +0 -0
  383. package/dist/assets/icons/apple-touch-icon.png +0 -0
  384. package/dist/assets/icons/device-base.png +0 -0
  385. package/dist/assets/icons/favicon-16x16.png +0 -0
  386. package/dist/assets/icons/favicon-32x32.png +0 -0
  387. package/dist/assets/icons/favicon.ico +0 -0
  388. package/dist/assets/icons/favicon.svg +1 -0
  389. package/dist/assets/index-B8Y8Y-Mi.js +180 -0
  390. package/dist/assets/index-B8Y8Y-Mi.js.map +1 -0
  391. package/dist/assets/index-hyiQFYGv.css +1 -0
  392. package/dist/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
  393. package/dist/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
  394. package/dist/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
  395. package/dist/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
  396. package/dist/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
  397. package/dist/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
  398. package/dist/assets/inter-cyrillic-700-normal-CjBOestx.woff2 +0 -0
  399. package/dist/assets/inter-cyrillic-700-normal-DrXBdSj3.woff +0 -0
  400. package/dist/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
  401. package/dist/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
  402. package/dist/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
  403. package/dist/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
  404. package/dist/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
  405. package/dist/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
  406. package/dist/assets/inter-cyrillic-ext-700-normal-BjwYoWNd.woff2 +0 -0
  407. package/dist/assets/inter-cyrillic-ext-700-normal-LO58E6JB.woff +0 -0
  408. package/dist/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
  409. package/dist/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
  410. package/dist/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
  411. package/dist/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
  412. package/dist/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
  413. package/dist/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
  414. package/dist/assets/inter-greek-700-normal-BUv2fZ6O.woff +0 -0
  415. package/dist/assets/inter-greek-700-normal-C3JjAnD8.woff2 +0 -0
  416. package/dist/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
  417. package/dist/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
  418. package/dist/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
  419. package/dist/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
  420. package/dist/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
  421. package/dist/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
  422. package/dist/assets/inter-greek-ext-700-normal-BoQ6DsYi.woff +0 -0
  423. package/dist/assets/inter-greek-ext-700-normal-qfdV9bQt.woff2 +0 -0
  424. package/dist/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
  425. package/dist/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
  426. package/dist/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
  427. package/dist/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
  428. package/dist/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
  429. package/dist/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
  430. package/dist/assets/inter-latin-700-normal-BLAVimhd.woff +0 -0
  431. package/dist/assets/inter-latin-700-normal-Yt3aPRUw.woff2 +0 -0
  432. package/dist/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
  433. package/dist/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
  434. package/dist/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
  435. package/dist/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
  436. package/dist/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
  437. package/dist/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
  438. package/dist/assets/inter-latin-ext-700-normal-Ca8adRJv.woff2 +0 -0
  439. package/dist/assets/inter-latin-ext-700-normal-TidjK2hL.woff +0 -0
  440. package/dist/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
  441. package/dist/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
  442. package/dist/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
  443. package/dist/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
  444. package/dist/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
  445. package/dist/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
  446. package/dist/assets/inter-vietnamese-700-normal-BZaoP0fm.woff +0 -0
  447. package/dist/assets/inter-vietnamese-700-normal-DlLaEgI2.woff2 +0 -0
  448. package/dist/assets/layout-grid-X9Sgull2.js +2 -0
  449. package/dist/assets/layout-grid-X9Sgull2.js.map +1 -0
  450. package/dist/assets/merriweather-cyrillic-400-normal-AvfsDsMQ.woff2 +0 -0
  451. package/dist/assets/merriweather-cyrillic-400-normal-DAcQ8g-H.woff +0 -0
  452. package/dist/assets/merriweather-cyrillic-700-normal-CHCcU-4a.woff +0 -0
  453. package/dist/assets/merriweather-cyrillic-700-normal-wbY04GlL.woff2 +0 -0
  454. package/dist/assets/merriweather-cyrillic-ext-400-normal-D9NYhYTq.woff2 +0 -0
  455. package/dist/assets/merriweather-cyrillic-ext-400-normal-Di6yW_eE.woff +0 -0
  456. package/dist/assets/merriweather-cyrillic-ext-700-normal-Bk1p9YoV.woff2 +0 -0
  457. package/dist/assets/merriweather-cyrillic-ext-700-normal-DoooT6Vg.woff +0 -0
  458. package/dist/assets/merriweather-latin-400-normal-CvqO63Ah.woff +0 -0
  459. package/dist/assets/merriweather-latin-400-normal-G4kZaoXi.woff2 +0 -0
  460. package/dist/assets/merriweather-latin-700-normal-D4-nzrAh.woff +0 -0
  461. package/dist/assets/merriweather-latin-700-normal-DoUP8Ce-.woff2 +0 -0
  462. package/dist/assets/merriweather-latin-ext-400-normal-CLqijLtt.woff +0 -0
  463. package/dist/assets/merriweather-latin-ext-400-normal-CWVzVQq3.woff2 +0 -0
  464. package/dist/assets/merriweather-latin-ext-700-normal-CaBzXGOk.woff +0 -0
  465. package/dist/assets/merriweather-latin-ext-700-normal-jHnxg2Kc.woff2 +0 -0
  466. package/dist/assets/merriweather-vietnamese-400-normal-Dh8WVvgZ.woff +0 -0
  467. package/dist/assets/merriweather-vietnamese-400-normal-hNacsVs_.woff2 +0 -0
  468. package/dist/assets/merriweather-vietnamese-700-normal-Bp6kWjW5.woff2 +0 -0
  469. package/dist/assets/merriweather-vietnamese-700-normal-C7_HxHBa.woff +0 -0
  470. package/dist/assets/montserrat-cyrillic-400-normal-BPq32Q8K.woff2 +0 -0
  471. package/dist/assets/montserrat-cyrillic-400-normal-jEs4Tk-Z.woff +0 -0
  472. package/dist/assets/montserrat-cyrillic-700-normal-BvLYcGP1.woff +0 -0
  473. package/dist/assets/montserrat-cyrillic-700-normal-D-Pqjtdp.woff2 +0 -0
  474. package/dist/assets/montserrat-cyrillic-ext-400-normal-DRPPeomZ.woff +0 -0
  475. package/dist/assets/montserrat-cyrillic-ext-400-normal-Xqov12YL.woff2 +0 -0
  476. package/dist/assets/montserrat-cyrillic-ext-700-normal-D-Mk2xRJ.woff +0 -0
  477. package/dist/assets/montserrat-cyrillic-ext-700-normal-MyDreaeu.woff2 +0 -0
  478. package/dist/assets/montserrat-latin-400-normal-BLhwKU8k.woff2 +0 -0
  479. package/dist/assets/montserrat-latin-400-normal-xItZbAXg.woff +0 -0
  480. package/dist/assets/montserrat-latin-700-normal-BWkrl476.woff +0 -0
  481. package/dist/assets/montserrat-latin-700-normal-BdjcYUrC.woff2 +0 -0
  482. package/dist/assets/montserrat-latin-ext-400-normal-B8bwfy6Y.woff2 +0 -0
  483. package/dist/assets/montserrat-latin-ext-400-normal-BffdBkAA.woff +0 -0
  484. package/dist/assets/montserrat-latin-ext-700-normal-BOP2Nhf0.woff2 +0 -0
  485. package/dist/assets/montserrat-latin-ext-700-normal-DdDFr05Z.woff +0 -0
  486. package/dist/assets/montserrat-vietnamese-400-normal-BeEscFYY.woff +0 -0
  487. package/dist/assets/montserrat-vietnamese-400-normal-D4oHqQTd.woff2 +0 -0
  488. package/dist/assets/montserrat-vietnamese-700-normal-C0x1De3p.woff2 +0 -0
  489. package/dist/assets/montserrat-vietnamese-700-normal-DnwGT2D9.woff +0 -0
  490. package/dist/assets/playfair-display-cyrillic-400-normal-CjW2EstV.woff2 +0 -0
  491. package/dist/assets/playfair-display-cyrillic-400-normal-ZiRag6zj.woff +0 -0
  492. package/dist/assets/playfair-display-cyrillic-700-normal-Dk1mTcxf.woff +0 -0
  493. package/dist/assets/playfair-display-cyrillic-700-normal-Dw3uKy19.woff2 +0 -0
  494. package/dist/assets/playfair-display-latin-400-normal-CFtfchNt.woff2 +0 -0
  495. package/dist/assets/playfair-display-latin-400-normal-DHYHbkg3.woff +0 -0
  496. package/dist/assets/playfair-display-latin-700-normal-Bc_1Q1cG.woff +0 -0
  497. package/dist/assets/playfair-display-latin-700-normal-CuDiGg7c.woff2 +0 -0
  498. package/dist/assets/playfair-display-latin-ext-400-normal-BxlSGspa.woff2 +0 -0
  499. package/dist/assets/playfair-display-latin-ext-400-normal-qdZwdvNS.woff +0 -0
  500. package/dist/assets/playfair-display-latin-ext-700-normal-C58ejOkc.woff2 +0 -0
  501. package/dist/assets/playfair-display-latin-ext-700-normal-D5HUU8GT.woff +0 -0
  502. package/dist/assets/playfair-display-vietnamese-400-normal-BV2APVTb.woff2 +0 -0
  503. package/dist/assets/playfair-display-vietnamese-400-normal-BbvUAu4N.woff +0 -0
  504. package/dist/assets/playfair-display-vietnamese-700-normal-CaKJSIny.woff2 +0 -0
  505. package/dist/assets/playfair-display-vietnamese-700-normal-Cr1rw0mr.woff +0 -0
  506. package/dist/assets/proof/output-01.png +0 -0
  507. package/dist/assets/proof/output-02.png +0 -0
  508. package/dist/assets/proof/output-03.png +0 -0
  509. package/dist/assets/proof/output-04.png +0 -0
  510. package/dist/assets/roboto-cyrillic-400-normal-DAIM1_dR.woff2 +0 -0
  511. package/dist/assets/roboto-cyrillic-400-normal-DZJji7Rx.woff +0 -0
  512. package/dist/assets/roboto-cyrillic-500-normal-BI4HuXre.woff +0 -0
  513. package/dist/assets/roboto-cyrillic-500-normal-hCeO1jFL.woff2 +0 -0
  514. package/dist/assets/roboto-cyrillic-700-normal-BiSG5NnW.woff2 +0 -0
  515. package/dist/assets/roboto-cyrillic-700-normal-KqaQ5bNp.woff +0 -0
  516. package/dist/assets/roboto-cyrillic-ext-400-normal-DtZHuW6i.woff +0 -0
  517. package/dist/assets/roboto-cyrillic-ext-400-normal-DzMWdK87.woff2 +0 -0
  518. package/dist/assets/roboto-cyrillic-ext-500-normal-B7rQpwPu.woff2 +0 -0
  519. package/dist/assets/roboto-cyrillic-ext-500-normal-C927yMrb.woff +0 -0
  520. package/dist/assets/roboto-cyrillic-ext-700-normal-BuQgZIrO.woff +0 -0
  521. package/dist/assets/roboto-cyrillic-ext-700-normal-UFn0vR9r.woff2 +0 -0
  522. package/dist/assets/roboto-greek-400-normal-CcizSnRP.woff +0 -0
  523. package/dist/assets/roboto-greek-400-normal-jFM2czAU.woff2 +0 -0
  524. package/dist/assets/roboto-greek-500-normal-BJMS0heP.woff2 +0 -0
  525. package/dist/assets/roboto-greek-500-normal-BLLWU9W-.woff +0 -0
  526. package/dist/assets/roboto-greek-700-normal-BcGn9doz.woff2 +0 -0
  527. package/dist/assets/roboto-greek-700-normal-D3kmAf0K.woff +0 -0
  528. package/dist/assets/roboto-latin-400-normal-068yxgMN.woff +0 -0
  529. package/dist/assets/roboto-latin-400-normal-CNwBRw8h.woff2 +0 -0
  530. package/dist/assets/roboto-latin-500-normal-CC5nhZkh.woff +0 -0
  531. package/dist/assets/roboto-latin-500-normal-CkrA1NAy.woff2 +0 -0
  532. package/dist/assets/roboto-latin-700-normal-CXeAXeti.woff2 +0 -0
  533. package/dist/assets/roboto-latin-700-normal-DUekQERp.woff +0 -0
  534. package/dist/assets/roboto-latin-ext-400-normal-ZYmyxeOy.woff2 +0 -0
  535. package/dist/assets/roboto-latin-ext-400-normal-eTRLN0Nt.woff +0 -0
  536. package/dist/assets/roboto-latin-ext-500-normal-C_ARlJGk.woff2 +0 -0
  537. package/dist/assets/roboto-latin-ext-500-normal-FFcS8vBN.woff +0 -0
  538. package/dist/assets/roboto-latin-ext-700-normal-70GS1MYH.woff2 +0 -0
  539. package/dist/assets/roboto-latin-ext-700-normal-BS1OuQqR.woff +0 -0
  540. package/dist/assets/roboto-math-400-normal-B3wgz80t.woff2 +0 -0
  541. package/dist/assets/roboto-math-400-normal-rzxYvyVt.woff +0 -0
  542. package/dist/assets/roboto-math-500-normal-CFNaIMFC.woff2 +0 -0
  543. package/dist/assets/roboto-math-500-normal-DaFX-ZC8.woff +0 -0
  544. package/dist/assets/roboto-math-700-normal-VUAI6Bz2.woff2 +0 -0
  545. package/dist/assets/roboto-math-700-normal-pYD1nhov.woff +0 -0
  546. package/dist/assets/roboto-symbols-400-normal-Tzuungub.woff +0 -0
  547. package/dist/assets/roboto-symbols-400-normal-fF1SLJBj.woff2 +0 -0
  548. package/dist/assets/roboto-symbols-500-normal-BXFTxrNR.woff2 +0 -0
  549. package/dist/assets/roboto-symbols-500-normal-CAhAe-ik.woff +0 -0
  550. package/dist/assets/roboto-symbols-700-normal-CuuvBBxy.woff +0 -0
  551. package/dist/assets/roboto-symbols-700-normal-rJi6RjIy.woff2 +0 -0
  552. package/dist/assets/roboto-vietnamese-400-normal-CDDxGrUb.woff2 +0 -0
  553. package/dist/assets/roboto-vietnamese-400-normal-DmXaN3yE.woff +0 -0
  554. package/dist/assets/roboto-vietnamese-500-normal-DW96CsrR.woff +0 -0
  555. package/dist/assets/roboto-vietnamese-500-normal-HYpufUYk.woff2 +0 -0
  556. package/dist/assets/roboto-vietnamese-700-normal-Dz0HwF-w.woff +0 -0
  557. package/dist/assets/roboto-vietnamese-700-normal-iKxYNAzq.woff2 +0 -0
  558. package/dist/assets/rocket-BjOXauLe.js +2 -0
  559. package/dist/assets/rocket-BjOXauLe.js.map +1 -0
  560. package/dist/assets/shield-check-CFNhE_aD.js +2 -0
  561. package/dist/assets/shield-check-CFNhE_aD.js.map +1 -0
  562. package/dist/assets/signIn-CVoSzqCz.js +2 -0
  563. package/dist/assets/signIn-CVoSzqCz.js.map +1 -0
  564. package/dist/assets/smartphone-BcQB9gIh.js +2 -0
  565. package/dist/assets/smartphone-BcQB9gIh.js.map +1 -0
  566. package/dist/assets/terminal-CGhryJds.js +2 -0
  567. package/dist/assets/terminal-CGhryJds.js.map +1 -0
  568. package/dist/assets/useAuth-lZZC20Tl.js +4 -0
  569. package/dist/assets/useAuth-lZZC20Tl.js.map +1 -0
  570. package/dist/cancelled/index.html +34 -0
  571. package/dist/downloads/shipscreens-agent-cli-config.yml +48 -0
  572. package/dist/downloads/shipscreens-agent-cli-copy.csv +2 -0
  573. package/dist/favicon-16x16.png +0 -0
  574. package/dist/favicon-32x32.png +0 -0
  575. package/dist/favicon.ico +0 -0
  576. package/dist/favicon.svg +10 -0
  577. package/dist/forgot-password/index.html +34 -0
  578. package/dist/index.html +42 -0
  579. package/dist/legal/index.html +33 -0
  580. package/dist/og-image.png +0 -0
  581. package/dist/pricing/index.html +33 -0
  582. package/dist/privacy/index.html +33 -0
  583. package/dist/robots.txt +11 -0
  584. package/dist/signin/index.html +34 -0
  585. package/dist/signup/index.html +34 -0
  586. package/dist/sitemap.xml +51 -0
  587. package/dist/success/index.html +34 -0
  588. package/dist/templates/clean_blue.png +0 -0
  589. package/dist/templates/minimal_dark.png +0 -0
  590. package/dist/templates/split_modern.png +0 -0
  591. package/dist/templates/vibrant_gradient.png +0 -0
  592. package/dist/terms/index.html +33 -0
  593. package/dist/tools/5-panel-screenshot-framework/index.html +33 -0
  594. package/dist/tools/agent-cli/index.html +33 -0
  595. package/dist/tools/app-review-aso/index.html +33 -0
  596. package/dist/tools/fastlane-screenshots/index.html +33 -0
  597. package/dist/tools/first-export/index.html +33 -0
  598. package/dist/tools/index.html +33 -0
  599. package/dist/tools/screenshot-workload-calculator/index.html +33 -0
  600. package/dist/tools/store-assets-pipeline/index.html +33 -0
  601. package/package.json +36 -0
  602. package/src/constants/devices.js +122 -0
  603. package/templates/agent/agent-prompt.txt +21 -0
  604. package/templates/agent/copy.csv +2 -0
  605. package/templates/agent/shipscreens.config.yml +48 -0
@@ -0,0 +1,4 @@
1
+ import{r as Xe}from"./index-B8Y8Y-Mi.js";const Do="Logging",ko="x-amz-user-agent",Fo="NoHubcallbackProvidedException";var D;(function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE",e.NONE="NONE"})(D||(D={}));const Dt={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class K{constructor(t,n=D.WARN){this.name=t,this.level=n,this._pluggables=[]}_padding(t){return t<10?"0"+t:""+t}_ts(){const t=new Date;return[this._padding(t.getMinutes()),this._padding(t.getSeconds())].join(":")+"."+t.getMilliseconds()}configure(t){return t?(this._config=t,this._config):this._config}_log(t,...n){let o=this.level;K.LOG_LEVEL&&(o=K.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(o=window.LOG_LEVEL);const s=Dt[o];if(!(Dt[t]>=s))return;let r=console.log.bind(console);t===D.ERROR&&console.error&&(r=console.error.bind(console)),t===D.WARN&&console.warn&&(r=console.warn.bind(console)),K.BIND_ALL_LOG_LEVELS&&(t===D.INFO&&console.info&&(r=console.info.bind(console)),t===D.DEBUG&&console.debug&&(r=console.debug.bind(console)));const d=`[${t}] ${this._ts()} ${this.name}`;let c="";if(n.length===1&&typeof n[0]=="string")c=`${d} - ${n[0]}`,r(c);else if(n.length===1)c=`${d} ${n[0]}`,r(d,n[0]);else if(typeof n[0]=="string"){let a=n.slice(1);a.length===1&&(a=a[0]),c=`${d} - ${n[0]} ${a}`,r(`${d} - ${n[0]}`,a)}else c=`${d} ${n}`,r(d,n);for(const a of this._pluggables){const u={message:c,timestamp:Date.now()};a.pushLogs([u])}}log(...t){this._log(D.INFO,...t)}info(...t){this._log(D.INFO,...t)}warn(...t){this._log(D.WARN,...t)}error(...t){this._log(D.ERROR,...t)}debug(...t){this._log(D.DEBUG,...t)}verbose(...t){this._log(D.VERBOSE,...t)}addPluggable(t){t&&t.getCategoryName()===Do&&(this._pluggables.push(t),t.configure(this._config))}listPluggables(){return this._pluggables}}K.LOG_LEVEL=null;K.BIND_ALL_LOG_LEVELS=!1;class M extends Error{constructor({message:t,name:n,recoverySuggestion:o,underlyingError:s,metadata:i}){if(super(t),this.name=n,this.underlyingError=s,this.recoverySuggestion=o,i){const{extendedRequestId:r,httpStatusCode:d,requestId:c}=i;this.metadata={extendedRequestId:r,httpStatusCode:d,requestId:c}}this.constructor=M,Object.setPrototypeOf(this,M.prototype)}}var re;(function(e){e.NoEndpointId="NoEndpointId",e.PlatformNotSupported="PlatformNotSupported",e.Unknown="Unknown",e.NetworkError="NetworkError"})(re||(re={}));const dt=(e,t=M)=>(n,o,s)=>{const{message:i,recoverySuggestion:r}=e[o];if(!n)throw new t({name:o,message:s?`${i} ${s}`:i,recoverySuggestion:r})},$=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",xe=new K("Hub");class Hn{constructor(t){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=t}_remove(t,n){const o=this.listeners.get(t);if(!o){xe.warn(`No listeners for ${t}`);return}this.listeners.set(t,[...o.filter(({callback:s})=>s!==n)])}dispatch(t,n,o,s){typeof t=="string"&&this.protectedChannels.indexOf(t)>-1&&(s===$||xe.warn(`WARNING: ${t} is protected and dispatching on it can have unintended consequences`));const i={channel:t,payload:{...n},source:o,patternInfo:[]};try{this._toListeners(i)}catch(r){xe.error(r)}}listen(t,n,o="noname"){let s;if(typeof n!="function")throw new M({name:Fo,message:"No callback supplied to Hub"});s=n;let i=this.listeners.get(t);return i||(i=[],this.listeners.set(t,i)),i.push({name:o,callback:s}),()=>{this._remove(t,s)}}_toListeners(t){const{channel:n,payload:o}=t,s=this.listeners.get(n);s&&s.forEach(i=>{xe.debug(`Dispatching to ${n} with `,o);try{i.callback(t)}catch(r){xe.error(r)}})}}const z=new Hn("__default__"),kt=new Hn("internal-hub"),ut=()=>{if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto;if(typeof crypto=="object")return crypto;throw new M({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},Lo=()=>{if(typeof window<"u"&&typeof window.btoa=="function")return window.btoa;if(typeof btoa=="function")return btoa;throw new M({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},Bo=()=>{if(typeof window<"u"&&typeof window.atob=="function")return window.atob;if(typeof atob=="function")return atob;throw new M({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},lt={convert(e,t){let n=e;return t?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),Bo()(n)}};var j;(function(e){e.AuthTokenConfigException="AuthTokenConfigException",e.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",e.AuthUserPoolException="AuthUserPoolException",e.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",e.OAuthNotConfigureException="OAuthNotConfigureException"})(j||(j={}));const Ko={[j.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[j.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[j.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[j.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[j.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},Vn=dt(Ko);function w(e){let t=!0;e?t=!!e.userPoolId&&!!e.userPoolClientId:t=!1,Vn(t,j.AuthUserPoolException)}function We(e){const t=!!e?.loginWith?.oauth?.domain&&!!e?.loginWith?.oauth?.redirectSignOut&&!!e?.loginWith?.oauth?.redirectSignIn&&!!e?.loginWith?.oauth?.responseType;Vn(t,j.OAuthNotConfigureException)}function te(e){const t=e.split(".");if(t.length!==3)throw new Error("Invalid token");try{const o=t[1].replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(lt.convert(o).split("").map(r=>`%${`00${r.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),i=JSON.parse(s);return{toString:()=>e,payload:i}}catch{throw new Error("Invalid token payload")}}const $n=e=>{const t=Reflect.ownKeys(e);for(const n of t){const o=e[n];(o&&typeof o=="object"||typeof o=="function")&&$n(o)}return Object.freeze(e)},Wo=new K("parseAWSExports"),qo={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},Ho=(e={})=>{if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new M({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});const{aws_appsync_apiKey:t,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:o,aws_appsync_region:s,aws_bots_config:i,aws_cognito_identity_pool_id:r,aws_cognito_sign_up_verification_method:d,aws_cognito_mfa_configuration:c,aws_cognito_mfa_types:a,aws_cognito_password_protection_settings:u,aws_cognito_verification_mechanisms:h,aws_cognito_signup_attributes:l,aws_cognito_social_providers:p,aws_cognito_username_attributes:g,aws_mandatory_sign_in:E,aws_mobile_analytics_app_id:y,aws_mobile_analytics_app_region:S,aws_user_files_s3_bucket:A,aws_user_files_s3_bucket_region:O,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:se,aws_user_pools_id:U,aws_user_pools_web_client_id:pe,geo:T,oauth:ve,predictions:W,aws_cloud_logic_custom:be,Notifications:Me,modelIntrospection:Re}=e,C={};y&&(C.Analytics={Pinpoint:{appId:y,region:S}});const{InAppMessaging:Ye,Push:Je}=Me??{};if(Ye?.AWSPinpoint||Je?.AWSPinpoint){if(Ye?.AWSPinpoint){const{appId:v,region:ie}=Ye.AWSPinpoint;C.Notifications={InAppMessaging:{Pinpoint:{appId:v,region:ie}}}}if(Je?.AWSPinpoint){const{appId:v,region:ie}=Je.AWSPinpoint;C.Notifications={...C.Notifications,PushNotification:{Pinpoint:{appId:v,region:ie}}}}}if(Array.isArray(i)&&(C.Interactions={LexV1:Object.fromEntries(i.map(v=>[v.name,v]))}),o){const v=qo[n];v||Wo.debug(`Invalid authentication type ${n}. Falling back to IAM.`),C.API={GraphQL:{endpoint:o,apiKey:t,region:s,defaultAuthMode:v??"iam"}},Re&&(C.API.GraphQL.modelIntrospection=Re)}const Co=c?{status:c&&c.toLowerCase(),totpEnabled:a?.includes("TOTP")??!1,smsEnabled:a?.includes("SMS")??!1}:void 0,Po=u?{minLength:u.passwordPolicyMinLength,requireLowercase:u.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:u.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:u.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:u.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,No=Array.from(new Set([...h??[],...l??[]])).reduce((v,ie)=>({...v,[ie.toLowerCase()]:{required:!0}}),{}),bt=g?.includes("EMAIL")??!1,Mt=g?.includes("PHONE_NUMBER")??!1;(r||U)&&(C.Auth={Cognito:{identityPoolId:r,allowGuestAccess:E!=="enable",signUpVerificationMethod:d,userAttributes:No,userPoolClientId:pe,userPoolId:U,mfa:Co,passwordFormat:Po,loginWith:{username:!(bt||Mt),email:bt,phone:Mt}}});const bo=ve?Object.keys(ve).length>0:!1,Mo=p?p.length>0:!1;if(C.Auth&&bo&&(C.Auth.Cognito.loginWith={...C.Auth.Cognito.loginWith,oauth:{...Vo(ve),...Mo&&{providers:$o(p)}}}),A&&(C.Storage={S3:{bucket:A,region:O,dangerouslyConnectToHttpEndpointForTesting:se}}),T){const{amazon_location_service:v}=T;C.Geo={LocationService:{maps:v.maps,geofenceCollections:v.geofenceCollections,searchIndices:v.search_indices,region:v.region}}}if(be&&(C.API={...C.API,REST:be.reduce((v,ie)=>{const{name:Oo,endpoint:Uo,region:Ot,service:Ut}=ie;return{...v,[Oo]:{endpoint:Uo,...Ut?{service:Ut}:void 0,...Ot?{region:Ot}:void 0}}},{})}),W){const{VoiceId:v}=W?.convert?.speechGenerator?.defaults??{};C.Predictions=v?{...W,convert:{...W.convert,speechGenerator:{...W.convert.speechGenerator,defaults:{voiceId:v}}}}:W}return C},Ft=e=>e?.split(",")??[],Vo=({domain:e,scope:t,redirectSignIn:n,redirectSignOut:o,responseType:s})=>({domain:e,scopes:t,redirectSignIn:Ft(n),redirectSignOut:Ft(o),responseType:s}),$o=e=>e.map(t=>{const n=t.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),zn=Symbol("oauth-listener"),P=[];for(let e=0;e<256;++e)P.push((e+256).toString(16).slice(1));function zo(e,t=0){return(P[e[t+0]]+P[e[t+1]]+P[e[t+2]]+P[e[t+3]]+"-"+P[e[t+4]]+P[e[t+5]]+"-"+P[e[t+6]]+P[e[t+7]]+"-"+P[e[t+8]]+P[e[t+9]]+"-"+P[e[t+10]]+P[e[t+11]]+P[e[t+12]]+P[e[t+13]]+P[e[t+14]]+P[e[t+15]]).toLowerCase()}let Ze;const Go=new Uint8Array(16);function jo(){if(!Ze){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ze=crypto.getRandomValues.bind(crypto)}return Ze(Go)}const Yo=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Lt={randomUUID:Yo};function Jo(e,t,n){if(Lt.randomUUID&&!t&&!e)return Lt.randomUUID();e=e||{};const o=e.random??e.rng?.()??jo();if(o.length<16)throw new Error("Random bytes length must be >= 16");if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let s=0;s<16;++s)t[n+s]=o[s];return t}return zo(o)}function Xo(e){const{version:t}=e;return t?t.startsWith("1"):!1}function Zo(e){if(!e)return;const{bucket_name:t,aws_region:n,buckets:o}=e;return{S3:{bucket:t,region:n,buckets:o&&ds(o)}}}function Qo(e){if(!e)return;const{user_pool_id:t,user_pool_client_id:n,identity_pool_id:o,password_policy:s,mfa_configuration:i,mfa_methods:r,unauthenticated_identities_enabled:d,oauth:c,username_attributes:a,standard_required_attributes:u,groups:h,passwordless:l}=e,p={Cognito:{userPoolId:t,userPoolClientId:n,groups:h}};return o&&(p.Cognito={...p.Cognito,identityPoolId:o}),s&&(p.Cognito.passwordFormat={requireLowercase:s.require_lowercase,requireNumbers:s.require_numbers,requireUppercase:s.require_uppercase,requireSpecialCharacters:s.require_symbols,minLength:s.min_length??6}),i&&(p.Cognito.mfa={status:cs(i),smsEnabled:r?.includes("SMS"),totpEnabled:r?.includes("TOTP")}),d&&(p.Cognito.allowGuestAccess=d),c&&(p.Cognito.loginWith={oauth:{domain:c.domain,redirectSignIn:c.redirect_sign_in_uri,redirectSignOut:c.redirect_sign_out_uri,responseType:c.response_type==="token"?"token":"code",scopes:c.scopes,providers:as(c.identity_providers)}}),a&&(p.Cognito.loginWith={...p.Cognito.loginWith,email:a.includes("email"),phone:a.includes("phone_number"),username:a.includes("username")}),u&&(p.Cognito.userAttributes=u.reduce((g,E)=>({...g,[E]:{required:!0}}),{})),l&&(p.Cognito.passwordless={emailOtpEnabled:l.email_otp_enabled,smsOtpEnabled:l.sms_otp_enabled,webAuthn:l.web_authn?{relyingPartyId:l.web_authn.relying_party_id,userVerification:l.web_authn.user_verification}:void 0,preferredChallenge:l.preferred_challenge}),p}function es(e){if(!e?.amazon_pinpoint)return;const{amazon_pinpoint:t}=e;return{Pinpoint:{appId:t.app_id,region:t.aws_region}}}function ts(e){if(!e)return;const{aws_region:t,geofence_collections:n,maps:o,search_indices:s}=e;return{LocationService:{region:t,searchIndices:s,geofenceCollections:n,maps:o}}}function ns(e){if(!e)return;const{aws_region:t,default_authorization_type:n,url:o,api_key:s,model_introspection:i}=e;return{GraphQL:{endpoint:o,defaultAuthMode:Gn(n),region:t,apiKey:s,modelIntrospection:i}}}function os(e){if(!e?.events)return;const{url:t,aws_region:n,api_key:o,default_authorization_type:s}=e.events;return{Events:{endpoint:t,defaultAuthMode:Gn(s),region:n,apiKey:o}}}function ss(e){if(!e)return;const{aws_region:t,channels:n,amazon_pinpoint_app_id:o}=e,s=n.includes("IN_APP_MESSAGING"),i=n.includes("APNS")||n.includes("FCM");if(!(s||i))return;const r={};return s&&(r.InAppMessaging={Pinpoint:{appId:o,region:t}}),i&&(r.PushNotification={Pinpoint:{appId:o,region:t}}),r}function is(e){const t={};if(e.storage&&(t.Storage=Zo(e.storage)),e.auth&&(t.Auth=Qo(e.auth)),e.analytics&&(t.Analytics=es(e.analytics)),e.geo&&(t.Geo=ts(e.geo)),e.data&&(t.API=ns(e.data)),e.custom){const n=os(e.custom);n&&"Events"in n&&(t.API={...t.API,...n})}return e.notifications&&(t.Notifications=ss(e.notifications)),t}const rs={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function Gn(e){return rs[e]}const Bt={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function as(e=[]){return e.reduce((t,n)=>(Bt[n]!==void 0&&t.push(Bt[n]),t),[])}function cs(e){return e==="OPTIONAL"?"optional":e==="REQUIRED"?"on":"off"}function ds(e){const t={};return e.forEach(({name:n,bucket_name:o,aws_region:s,paths:i})=>{if(n in t)throw new Error(`Duplicate friendly name found: ${n}. Name must be unique.`);const r=i?Object.entries(i).reduce((d,[c,a])=>(a!==void 0&&(d[c]=a),d),{}):void 0;t[n]={bucketName:o,region:s,paths:r}}),t}const us=e=>Object.keys(e).some(t=>t.startsWith("aws_"))?Ho(e):Xo(e)?is(e):e;function ls(e,t,n,o){function s(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function d(u){try{a(o.next(u))}catch(h){r(h)}}function c(u){try{a(o.throw(u))}catch(h){r(h)}}function a(u){u.done?i(u.value):s(u.value).then(d,c)}a((o=o.apply(e,t||[])).next())})}function hs(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,s,i,r=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return r.next=d(0),r.throw=d(1),r.return=d(2),typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function d(a){return function(u){return c([a,u])}}function c(a){if(o)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(n=0)),n;)try{if(o=1,s&&(i=a[0]&2?s.return:a[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;switch(s=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,s=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1],i=a;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(a);break}i[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(u){a=[6,u],s=0}finally{o=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}var L=64,ps=32,fs=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),gs=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Es=Math.pow(2,53)-1,De=(function(){function e(){this.state=Int32Array.from(gs),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,o=t.byteLength;if(this.bytesHashed+=o,this.bytesHashed*8>Es)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;o>0;)this.buffer[this.bufferLength++]=t[n++],o--,this.bufferLength===L&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),o=this.bufferLength;if(n.setUint8(this.bufferLength++,128),o%L>=L-8){for(var s=this.bufferLength;s<L;s++)n.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<L-8;s++)n.setUint8(s,0);n.setUint32(L-8,Math.floor(t/4294967296),!0),n.setUint32(L-4,t),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(ps),s=0;s<8;s++)i[s*4]=this.state[s]>>>24&255,i[s*4+1]=this.state[s]>>>16&255,i[s*4+2]=this.state[s]>>>8&255,i[s*4+3]=this.state[s]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,o=t.state,s=o[0],i=o[1],r=o[2],d=o[3],c=o[4],a=o[5],u=o[6],h=o[7],l=0;l<L;l++){if(l<16)this.temp[l]=(n[l*4]&255)<<24|(n[l*4+1]&255)<<16|(n[l*4+2]&255)<<8|n[l*4+3]&255;else{var p=this.temp[l-2],g=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[l-15];var E=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[l]=(g+this.temp[l-7]|0)+(E+this.temp[l-16]|0)}var y=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&a^~c&u)|0)+(h+(fs[l]+this.temp[l]|0)|0)|0,S=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&i^s&r^i&r)|0;h=u,u=a,a=c,c=d+y|0,d=r,r=i,i=s,s=y+S|0}o[0]+=s,o[1]+=i,o[2]+=r,o[3]+=d,o[4]+=c,o[5]+=a,o[6]+=u,o[7]+=h},e})();const ms=e=>new TextEncoder().encode(e);var ys=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:ms;function jn(e){return e instanceof Uint8Array?e:typeof e=="string"?ys(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Ss(e){return typeof e=="string"?e.length===0:e.byteLength===0}var Pe=(function(){function e(t){this.secret=t,this.hash=new De,this.reset()}return e.prototype.update=function(t){if(!(Ss(t)||this.error))try{this.hash.update(jn(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return ls(this,void 0,void 0,function(){return hs(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new De,this.secret){this.outer=new De;var t=Is(this.secret),n=new Uint8Array(L);n.set(t);for(var o=0;o<L;o++)t[o]^=54,n[o]^=92;this.hash.update(t),this.outer.update(n);for(var o=0;o<t.byteLength;o++)t[o]=0}},e})();function Is(e){var t=jn(e);if(t.byteLength>L){var n=new De;n.update(t),t=n.digest()}var o=new Uint8Array(L);return o.set(t),o}for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`)}var x;(function(e){e.WebUnknown="0",e.React="1",e.NextJs="2",e.Angular="3",e.VueJs="4",e.Nuxt="5",e.Svelte="6",e.ServerSideUnknown="100",e.ReactSSR="101",e.NextJsSSR="102",e.AngularSSR="103",e.VueJsSSR="104",e.NuxtSSR="105",e.SvelteSSR="106",e.ReactNative="201",e.Expo="202"})(x||(x={}));var nt;(function(e){e.AI="ai",e.API="api",e.Auth="auth",e.Analytics="analytics",e.DataStore="datastore",e.Geo="geo",e.InAppMessaging="inappmessaging",e.Interactions="interactions",e.Predictions="predictions",e.PubSub="pubsub",e.PushNotification="pushnotification",e.Storage="storage"})(nt||(nt={}));var Kt;(function(e){e.CreateConversation="1",e.GetConversation="2",e.ListConversations="3",e.DeleteConversation="4",e.SendMessage="5",e.ListMessages="6",e.OnMessage="7",e.Generation="8",e.UpdateConversation="9"})(Kt||(Kt={}));var Wt;(function(e){e.Record="1",e.IdentifyUser="2"})(Wt||(Wt={}));var qt;(function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"})(qt||(qt={}));var q;(function(e){e.SignUp="1",e.ConfirmSignUp="2",e.ResendSignUpCode="3",e.SignIn="4",e.FetchMFAPreference="6",e.UpdateMFAPreference="7",e.SetUpTOTP="10",e.VerifyTOTPSetup="11",e.ConfirmSignIn="12",e.DeleteUserAttributes="15",e.DeleteUser="16",e.UpdateUserAttributes="17",e.FetchUserAttributes="18",e.ConfirmUserAttribute="22",e.SignOut="26",e.UpdatePassword="27",e.ResetPassword="28",e.ConfirmResetPassword="29",e.FederatedSignIn="30",e.RememberDevice="32",e.ForgetDevice="33",e.FetchDevices="34",e.SendUserAttributeVerificationCode="35",e.SignInWithRedirect="36",e.StartWebAuthnRegistration="37",e.CompleteWebAuthnRegistration="38",e.ListWebAuthnCredentials="39",e.DeleteWebAuthnCredential="40"})(q||(q={}));var Ht;(function(e){e.Subscribe="1",e.GraphQl="2"})(Ht||(Ht={}));var Vt;(function(e){e.SearchByText="0",e.SearchByCoordinates="1",e.SearchForSuggestions="2",e.SearchByPlaceId="3",e.SaveGeofences="4",e.GetGeofence="5",e.ListGeofences="6",e.DeleteGeofences="7"})(Vt||(Vt={}));var $t;(function(e){e.SyncMessages="1",e.IdentifyUser="2",e.NotifyMessageInteraction="3"})($t||($t={}));var zt;(function(e){e.None="0"})(zt||(zt={}));var Gt;(function(e){e.Convert="1",e.Identify="2",e.Interpret="3"})(Gt||(Gt={}));var jt;(function(e){e.Subscribe="1"})(jt||(jt={}));var Yt;(function(e){e.InitializePushNotifications="1",e.IdentifyUser="2"})(Yt||(Yt={}));var Jt;(function(e){e.UploadData="1",e.DownloadData="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6",e.GetUrl="7",e.GetDataAccess="8",e.ListCallerAccessGrants="9"})(Jt||(Jt={}));const ws="6.16.2",qe=()=>typeof global<"u",me=()=>typeof window<"u",Yn=()=>typeof document<"u",ht=()=>typeof process<"u",Ne=(e,t)=>!!Object.keys(e).find(n=>n.startsWith(t));var Xt={};function vs(){const e=o=>o.startsWith("_react")||o.startsWith("__react"),t=o=>Object.keys(o).find(e),n=()=>Array.from(document.querySelectorAll("[id]"));return Yn()&&n().some(t)}function Rs(){return ht()&&typeof Xt<"u"&&!!Object.keys(Xt).find(e=>e.includes("react"))}function xs(){return me()&&Ne(window,"__VUE")}function As(){return qe()&&Ne(global,"__VUE")}var Zt={};function Ts(){return me()&&Ne(window,"__SVELTE")}function _s(){return ht()&&typeof Zt<"u"&&!!Object.keys(Zt).find(e=>e.includes("svelte"))}function Cs(){return me()&&window.next&&typeof window.next=="object"}function Ps(){return qe()&&(Ne(global,"__next")||Ne(global,"__NEXT"))}function Ns(){return me()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function bs(){return qe()&&typeof global.__NUXT_PATHS__<"u"}var Qt={};function Ms(){const e=!!(Yn()&&document.querySelector("[ng-version]")),t=!!(me()&&typeof window.ng<"u");return e||t}function Os(){return ht()&&typeof Qt=="object"&&Qt.npm_lifecycle_script?.startsWith("ng ")||!1}function Us(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function Ds(){return qe()&&typeof global.expo<"u"}function ks(){return me()}const Fs=[{platform:x.Expo,detectionMethod:Ds},{platform:x.ReactNative,detectionMethod:Us},{platform:x.NextJs,detectionMethod:Cs},{platform:x.Nuxt,detectionMethod:Ns},{platform:x.Angular,detectionMethod:Ms},{platform:x.React,detectionMethod:vs},{platform:x.VueJs,detectionMethod:xs},{platform:x.Svelte,detectionMethod:Ts},{platform:x.WebUnknown,detectionMethod:ks},{platform:x.NextJsSSR,detectionMethod:Ps},{platform:x.NuxtSSR,detectionMethod:bs},{platform:x.ReactSSR,detectionMethod:Rs},{platform:x.VueJsSSR,detectionMethod:As},{platform:x.AngularSSR,detectionMethod:Os},{platform:x.SvelteSSR,detectionMethod:_s}];function Ls(){return Fs.find(e=>e.detectionMethod())?.platform||x.ServerSideUnknown}let Ce;const Qe=[];let ot=!1;const Bs=10,Ks=10,Ws=1e3,Jn=()=>{if(!Ce){if(Ce=Ls(),ot)for(;Qe.length;)Qe.pop()?.();else Qe.forEach(e=>{e()});en(x.ServerSideUnknown,Bs),en(x.WebUnknown,Ks)}return Ce};function qs(){Ce=void 0}function en(e,t){Ce===e&&!ot&&setTimeout(()=>{qs(),ot=!0,setTimeout(Jn,Ws)},t)}const Hs={},Vs=(e,t)=>Hs[e]?.[t]?.additionalDetails,$s="aws-amplify",zs=e=>e.replace(/\+.*/,""),Gs=({category:e,action:t}={})=>{const n=[[$s,zs(ws)]];if(e&&n.push([e,t]),n.push(["framework",Jn()]),e&&t){const o=Vs(e,t);o&&o.forEach(s=>{n.push(s)})}return n},Xn=e=>Gs(e).map(([o,s])=>o&&s?`${o}/${s}`:o).join(" "),He=()=>typeof window<"u"&&typeof window.document<"u",tn=new K("Auth");class js{configure(t,n){this.authConfig=t,this.authOptions=n,t&&t.Cognito?.userPoolEndpoint&&tn.warn(nn("Amazon Cognito User Pool")),t&&t.Cognito?.identityPoolEndpoint&&tn.warn(nn("Amazon Cognito Identity Pool"))}async fetchAuthSession(t={}){let n,o;const s=await this.getTokens(t);return s?(o=s.accessToken?.payload?.sub,n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:s,authenticated:!0,forceRefresh:t.forceRefresh})):n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:t.forceRefresh}),{tokens:s,credentials:n?.credentials,identityId:n?.identityId,userSub:o}}async clearCredentials(){await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId()}async getTokens(t){return await this.authOptions?.tokenProvider?.getTokens(t)??void 0}}const nn=e=>`You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`;class Ys{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new js}configure(t,n){const o=us(t);this.resourcesConfig=o,n&&(this.libraryOptions=n),this.resourcesConfig=$n(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),(this.resourcesConfig.Analytics?.Pinpoint||this.resourcesConfig.Notifications?.InAppMessaging?.Pinpoint||this.resourcesConfig.Notifications?.PushNotification?.Pinpoint)&&console.warn("AWS will end support for Amazon Pinpoint on October 30, 2026. The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics."),z.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",$),this.notifyOAuthListener(),this.isConfigured=!0}getConfig(){return this.isConfigured||console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),this.resourcesConfig}[zn](t){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth?t(this.resourcesConfig.Auth?.Cognito):this.oAuthListener=t}notifyOAuthListener(){!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth||!this.oAuthListener||(this.oAuthListener(this.resourcesConfig.Auth?.Cognito),this.oAuthListener=void 0)}}const Z=new Ys,Js=(e,t)=>e.Auth.fetchAuthSession(t),Xs=e=>Js(Z,e);function Zn(){return Z.Auth.clearCredentials()}const Qn=e=>{const{headers:t,statusCode:n}=e;return{...Zs(e)?e.$metadata:{},httpStatusCode:n,requestId:t["x-amzn-requestid"]??t["x-amzn-request-id"]??t["x-amz-request-id"],extendedRequestId:t["x-amz-id-2"],cfId:t["x-amz-cf-id"]}},Zs=e=>typeof e?.$metadata=="object",pt=async e=>{if(!e||e.statusCode<300)return;const t=await ft(e),o=(r=>{const[d]=r.toString().split(/[,:]+/);return d.includes("#")?d.split("#")[1]:d})(e.headers["x-amzn-errortype"]??t.code??t.__type??"UnknownError"),s=t.message??t.Message??"Unknown error",i=new Error(s);return Object.assign(i,{name:o,$metadata:Qn(e)})},ft=async e=>{if(!e.body)throw new Error("Missing response payload");const t=await e.body.json();return Object.assign(t,{$metadata:Qn(e)})},ce=(e,t,n,o)=>async(s,i)=>{const r={...o,...s},d=await r.endpointResolver(r,i),c=await t(i,d),a=await e(c,{...r});return n(a)},Qs=300*1e3;function ei(e=Qs){return o=>{const s=2**o*100+100*Math.random();return s>e?!1:s}}const eo=3,on="amz-sdk-invocation-id",ti="amz-sdk-request",sn=300*1e3,ni=e=>{const n=ei(sn)(e);return n===!1?sn:n},oi=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],si=e=>!!e&&oi.includes(e),ii=e=>async(t,n)=>{const o=n??await e(t)??void 0,s=o?.code||o?.name,i=t?.statusCode;return{retryable:di(n)||ci(i,s)||si(s)||ui(i,s)}},ri=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],ai=["TimeoutError","RequestTimeout","RequestTimeoutException"],ci=(e,t)=>e===429||!!t&&ri.includes(t),di=e=>[re.NetworkError,"ERR_NETWORK"].includes(e?.name),ui=(e,t)=>!!e&&[500,502,503,504].includes(e)||!!t&&ai.includes(t),li=({maxAttempts:e=eo,retryDecider:t,computeDelay:n,abortSignal:o})=>{if(e<1)throw new Error("maxAttempts must be greater than 0");return(s,i)=>async function(d){let c,a=i.attemptsCount??0,u;const h=()=>{if(u)return rn(u,a),u;throw rn(c,a),c};for(;!o?.aborted&&a<e;){try{u=await s(d),c=void 0}catch(g){c=g,u=void 0}a=(i.attemptsCount??0)>a?i.attemptsCount??0:a+1,i.attemptsCount=a;const{isCredentialsExpiredError:l,retryable:p}=await t(u,c,i);if(p){if(i.isCredentialsExpired=!!l,!o?.aborted&&a<e){const g=n(a);await hi(g,o)}continue}else return h()}if(o?.aborted)throw new Error("Request aborted.");return h()}},hi=(e,t)=>{if(t?.aborted)return Promise.resolve();let n,o;const s=new Promise(i=>{o=i,n=setTimeout(i,e)});return t?.addEventListener("abort",function i(r){clearTimeout(n),t?.removeEventListener("abort",i),o()}),s},rn=(e,t)=>{Object.prototype.toString.call(e)==="[object Object]"&&(e.$metadata={...e.$metadata??{},attempts:t})},pi=Jo,fi=()=>e=>async function(n){return n.headers[on]||(n.headers[on]=pi()),e(n)},gi=({maxAttempts:e=eo})=>(t,n)=>async function(s){const i=n.attemptsCount??0;return s.headers[ti]=`attempt=${i+1}; max=${e}`,t(s)},Ei=({userAgentHeader:e="x-amz-user-agent",userAgentValue:t=""})=>n=>async function(s){if(t.trim().length===0)return await n(s);{const i=e.toLowerCase();return s.headers[i]=s.headers[i]?`${s.headers[i]} ${t}`:t,await n(s)}},to=(e,t)=>(n,o)=>{const s={};let i=r=>e(r,o);for(let r=t.length-1;r>=0;r--){const d=t[r];i=d(o)(i,s)}return i(n)},et=e=>{let t;return()=>(t||(t=e()),t)},mi=e=>!["HEAD","GET"].includes(e.toUpperCase()),yi=async({url:e,method:t,headers:n,body:o},{abortSignal:s,cache:i,withCrossDomainCredentials:r})=>{let d;try{d=await fetch(e,{method:t,headers:n,body:mi(t)?o:void 0,signal:s,cache:i,credentials:r?"include":"same-origin"})}catch(h){throw h instanceof TypeError?new M({name:re.NetworkError,message:"A network error has occurred.",underlyingError:h}):h}const c={};d.headers?.forEach((h,l)=>{c[l.toLowerCase()]=h});const a={statusCode:d.status,headers:c,body:null},u=Object.assign(d.body??{},{text:et(()=>d.text()),blob:et(()=>d.blob()),json:et(()=>d.json())});return{...a,body:u}},Si=to(yi,[Ei,fi,li,gi]),no={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},Ii={partitions:[no,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},wi=e=>{const{partitions:t}=Ii;for(const{regions:n,outputs:o,regionRegex:s}of t){const i=new RegExp(s);if(n.includes(e)||i.test(e))return o.dnsSuffix}return no.outputs.dnsSuffix},ye=URL;class Te extends M{constructor(){super({name:re.PlatformNotSupported,message:"Function not supported on current platform"})}}class oo{constructor(t){this.storage=t}async setItem(t,n){if(!this.storage)throw new Te;this.storage.setItem(t,n)}async getItem(t){if(!this.storage)throw new Te;return this.storage.getItem(t)}async removeItem(t){if(!this.storage)throw new Te;this.storage.removeItem(t)}async clear(){if(!this.storage)throw new Te;this.storage.clear()}}class so{constructor(){this.storage=new Map}get length(){return this.storage.size}key(t){return t>this.length-1?null:Array.from(this.storage.keys())[t]}setItem(t,n){this.storage.set(t,n)}getItem(t){return this.storage.get(t)??null}removeItem(t){this.storage.delete(t)}clear(){this.storage.clear()}}const io=new K("CoreStorageUtils"),vi=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{io.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new so},ro=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return io.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new so}};class Ri extends oo{constructor(){super(vi())}}class xi extends oo{constructor(){super(ro())}}class Ai{constructor(t){this._storage=t}get storage(){if(!this._storage)throw new Te;return this._storage}setItem(t,n){this.storage.setItem(t,n)}getItem(t){return this.storage.getItem(t)}removeItem(t){this.storage.removeItem(t)}clear(){this.storage.clear()}}class Ti extends Ai{constructor(){super(ro())}}const gt=new Ri;new xi;const Y=new Ti,_i=e=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],o=new Uint8Array(e);ut().getRandomValues(o);for(const s of o)n.push(t[s%t.length]);return n.join("")};function Ci(e){return(e.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function Pi(e){return e.split("").map(t=>t.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const Ni=e=>{let t;return async(...n)=>t||(t=new Promise((o,s)=>{e(...n).then(i=>{o(i)}).catch(i=>{s(i)}).finally(()=>{t=void 0})}),t)};function an({expiresAt:e,clockDrift:t,tolerance:n=5e3}){return Date.now()+t+n>e}const bi=async()=>{const{userAgentData:e}=navigator;if(!e)return navigator.userAgent;const{platform:t="",platformVersion:n="",model:o="",architecture:s="",fullVersionList:i=[]}=await e.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]),r=i.map(c=>`${c.brand}/${c.version}`).join(";");return[t,n,s,o,t,r].filter(c=>c).join(" ")||navigator.userAgent};function Mi(e){return Array.from(e,t=>String.fromCodePoint(t)).join("")}const fe={convert(e,t={urlSafe:!1,skipPadding:!1}){const n=typeof e=="string"?e:Mi(e);let o=Lo()(n);return t.urlSafe&&(o=o.replace(/\+/g,"-").replace(/\//g,"_")),t.skipPadding&&(o=o.replace(/=/g,"")),o}};function Oi(){return ut().getRandomValues(new Uint32Array(1))[0]}function Ui(e){const{words:t}=e,{sigBytes:n}=e,o=[];for(let s=0;s<n;s++){const i=t[s>>>2]>>>24-s%4*8&255;o.push((i>>>4).toString(16)),o.push((i&15).toString(16))}return o.join("")}class Et{constructor(t,n){this.words=[];let o=t;o=this.words=o||[],n!==void 0?this.sigBytes=n:this.sigBytes=o.length*4}random(t){const n=[];for(let o=0;o<t;o+=4)n.push(Oi());return new Et(n,t)}toString(){return Ui(this)}}var I;(function(e){e.EmptySignInUsername="EmptySignInUsername",e.EmptySignInPassword="EmptySignInPassword",e.CustomAuthSignInPassword="CustomAuthSignInPassword",e.EmptySignUpUsername="EmptySignUpUsername",e.EmptySignUpPassword="EmptySignUpPassword",e.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",e.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",e.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",e.EmptyChallengeResponse="EmptyChallengeResponse",e.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",e.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",e.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",e.EmptyResetPasswordUsername="EmptyResetPasswordUsername",e.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",e.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",e.IncorrectMFAMethod="IncorrectMFAMethod",e.EmptyUpdatePassword="EmptyUpdatePassword",e.InvalidPreferredChallenge="InvalidPreferredChallenge"})(I||(I={}));const ao={[I.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[I.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[I.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[I.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[I.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[I.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[I.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[I.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[I.EmptySignInPassword]:{message:"password is required to signIn"},[I.EmptySignInUsername]:{message:"username is required to signIn"},[I.EmptySignUpPassword]:{message:"password is required to signUp"},[I.EmptySignUpUsername]:{message:"username is required to signUp"},[I.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[I.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[I.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[I.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[I.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[I.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};var _;(function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in",e.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"})(_||(_={}));var ae;(function(e){e.SignInException="SignInException",e.OAuthSignInError="OAuthSignInException"})(ae||(ae={}));class m extends M{constructor(t){super(t),this.constructor=m,Object.setPrototypeOf(this,m.prototype)}}function Di(e,t){const{message:n,recoverySuggestion:o}=ao[t];if(!e)throw new m({name:t,message:n,recoverySuggestion:o})}function k(e){const t=e?.split("_")[0];if(!e||e.indexOf("_")<0||!t||typeof t!="string")throw new m({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function cn(e){return Object.entries(e).map(([t,n])=>({Name:t,Value:n}))}var dn;(function(e){e.ConcurrentModificationException="ConcurrentModificationException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(dn||(dn={}));var un;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(un||(un={}));var ln;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UsernameExistsException="UsernameExistsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(ln||(ln={}));var hn;(function(e){e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(hn||(hn={}));var pn;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(pn||(pn={}));var fn;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(fn||(fn={}));var gn;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(gn||(gn={}));var En;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(En||(En={}));var mn;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(mn||(mn={}));var yn;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(yn||(yn={}));var Sn;(function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"})(Sn||(Sn={}));var In;(function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"})(In||(In={}));var wn;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(wn||(wn={}));var vn;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException"})(vn||(vn={}));var Le;(function(e){e.PasswordResetRequiredException="PasswordResetRequiredException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Le||(Le={}));var Rn;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(Rn||(Rn={}));var xn;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.MFAMethodNotFoundException="MFAMethodNotFoundException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(xn||(xn={}));var An;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(An||(An={}));var st;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UsernameExistsException="UsernameExistsException"})(st||(st={}));var Tn;(function(e){e.AliasExistsException="AliasExistsException",e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Tn||(Tn={}));var _n;(function(e){e.CodeMismatchException="CodeMismatchException",e.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(_n||(_n={}));var Cn;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Cn||(Cn={}));var Pn;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Pn||(Pn={}));var Nn;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Nn||(Nn={}));const mt="UserUnAuthenticatedException",ki="UserAlreadyAuthenticatedException",Fi="DeviceMetadataNotFoundException",Li="InvalidRedirectException",Bi="InvalidAppSchemeException",Ki="InvalidPreferredRedirectUrlException",Wi=new m({name:Li,message:"signInRedirect or signOutRedirect had an invalid format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."});new m({name:Bi,message:"A valid non-http app scheme was not found in the config.",recoverySuggestion:"Please make sure a valid custom app scheme is present in the config."});new m({name:Ki,message:"The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.",recoverySuggestion:"Please make sure a matching preferredRedirectUrl is provided."});const qi="InvalidOriginException",Hi=new m({name:qi,message:"redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin",recoverySuggestion:"Please call signInWithRedirect from the same origin."}),Vi="OAuthSignOutException",$i="TokenRefreshException",zi="UnexpectedSignInInterruptionException";function Gi(e){if(!e||!e.accessToken)throw new m({name:mt,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const ji=new m({name:$i,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow.
2
+ Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow.
3
+ E.g { responseType: 'code' }`}),Yi=new m({name:mt,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function co(e){if(Zi(e))throw ji;if(!Xi(e))throw Yi}function uo(e){if(!e||!e.deviceKey||!e.deviceGroupKey||!e.randomPassword)throw new m({name:Fi,message:"Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.",recoverySuggestion:"Make sure to not clear storage after calling the signIn API."})}const Ji={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function lo(e){return e?.accessToken||e?.idToken}function Xi(e){return lo(e)&&e?.refreshToken}function Zi(e){return lo(e)&&!e?.refreshToken}const Qi=async e=>{const t=e.getConfig().Auth?.Cognito;w(t);const n=await e.Auth.getTokens({forceRefresh:!1});Gi(n);const{"cognito:username":o,sub:s}=n.idToken?.payload??{},i={username:o,userId:s},r=er(n);return r&&(i.signInDetails=r),i};function er(e){return e?.signInDetails}const yt=async()=>Qi(Z),Q=(e,t)=>Xn({category:nt.Auth,action:e,...t}),de=e=>(t,n)=>{const o=tr(e),s=JSON.stringify(t);return nr(n,o,s)},tr=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}),nr=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"});function St(e){if(!e||e.name==="Error"||e instanceof TypeError)throw new m({name:re.Unknown,message:"An unknown error has occurred.",underlyingError:e})}const Se=()=>async e=>{if(e.statusCode>=300){const t=await pt(e);throw St(t),new m({name:t.name,message:t.message,metadata:t.$metadata})}return ft(e)},or=()=>(e,t)=>async function(o){return o.headers["cache-control"]="no-store",e(o)},ue=to(Si,[or]),ho="cognito-idp",le={service:ho,retryDecider:ii(pt),computeDelay:ni,get userAgentValue(){return Xn()},cache:"no-store"},Ve=e=>ce(ue,de("InitiateAuth"),Se(),{...le,...e}),$e=e=>ce(ue,de("RespondToAuthChallenge"),Se(),{...le,...e}),sr=e=>ce(ue,de("AssociateSoftwareToken"),Se(),{...le,...e}),ir=({region:e})=>({url:new ye(`https://${ho}.${e}.${wi(e)}`)}),F=({endpointOverride:e})=>t=>e?{url:new ye(e)}:ir(t),rr=e=>ce(ue,de("GetTokensFromRefreshToken"),Se(),{...le,...e}),ar=async({tokens:e,authConfig:t,username:n,clientMetadata:o})=>{w(t?.Cognito);const{userPoolId:s,userPoolClientId:i,userPoolEndpoint:r}=t.Cognito,d=k(s);co(e);const c=rr({endpointResolver:F({endpointOverride:r})}),{AuthenticationResult:a}=await c({region:d},{ClientId:i,RefreshToken:e.refreshToken,DeviceKey:e.deviceMetadata?.deviceKey,ClientMetadata:o}),u=te(a?.AccessToken??""),h=a?.IdToken?te(a.IdToken):void 0,{iat:l}=u.payload;if(!l)throw new m({name:"iatNotFoundException",message:"iat not found in access token"});const p=l*1e3-new Date().getTime();return{accessToken:u,idToken:h,clockDrift:p,refreshToken:a?.RefreshToken??e.refreshToken,username:n}},cr=Ni(ar),dr={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var Be;(function(e){e.InvalidAuthTokens="InvalidAuthTokens"})(Be||(Be={}));const ur={[Be.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},lr=dt(ur),bn="CognitoIdentityServiceProvider";class hr{getKeyValueStorage(){if(!this.keyValueStorage)throw new m({name:"KeyValueStorageNotFoundException",message:"KeyValueStorage was not found in TokenStore"});return this.keyValueStorage}setKeyValueStorage(t){this.keyValueStorage=t}setAuthConfig(t){this.authConfig=t}async loadTokens(){try{const t=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(t.accessToken);if(!n)throw new m({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});const o=te(n),s=await this.getKeyValueStorage().getItem(t.idToken),i=s?te(s):void 0,r=await this.getKeyValueStorage().getItem(t.refreshToken)??void 0,d=await this.getKeyValueStorage().getItem(t.clockDrift)??"0",c=Number.parseInt(d),a=await this.getKeyValueStorage().getItem(t.signInDetails),u={accessToken:o,idToken:i,refreshToken:r,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:c,username:await this.getLastAuthUser()};return a&&(u.signInDetails=JSON.parse(a)),u}catch{return null}}async storeTokens(t){lr(t!==void 0,Be.InvalidAuthTokens);const n=t.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),n);const o=await this.getAuthKeys();await this.getKeyValueStorage().setItem(o.accessToken,t.accessToken.toString()),t.idToken?await this.getKeyValueStorage().setItem(o.idToken,t.idToken.toString()):await this.getKeyValueStorage().removeItem(o.idToken),t.refreshToken?await this.getKeyValueStorage().setItem(o.refreshToken,t.refreshToken):await this.getKeyValueStorage().removeItem(o.refreshToken),t.deviceMetadata&&(t.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(o.deviceKey,t.deviceMetadata.deviceKey),t.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(o.deviceGroupKey,t.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(o.randomPasswordKey,t.deviceMetadata.randomPassword)),t.signInDetails?await this.getKeyValueStorage().setItem(o.signInDetails,JSON.stringify(t.signInDetails)):await this.getKeyValueStorage().removeItem(o.signInDetails),await this.getKeyValueStorage().setItem(o.clockDrift,`${t.clockDrift}`)}async clearTokens(){const t=await this.getAuthKeys();await Promise.all([this.getKeyValueStorage().removeItem(t.accessToken),this.getKeyValueStorage().removeItem(t.idToken),this.getKeyValueStorage().removeItem(t.clockDrift),this.getKeyValueStorage().removeItem(t.refreshToken),this.getKeyValueStorage().removeItem(t.signInDetails),this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),this.getKeyValueStorage().removeItem(t.oauthMetadata)])}async getDeviceMetadata(t){const n=await this.getAuthKeys(t),o=await this.getKeyValueStorage().getItem(n.deviceKey),s=await this.getKeyValueStorage().getItem(n.deviceGroupKey),i=await this.getKeyValueStorage().getItem(n.randomPasswordKey);return i&&s&&o?{deviceKey:o,deviceGroupKey:s,randomPassword:i}:null}async clearDeviceMetadata(t){const n=await this.getAuthKeys(t);await Promise.all([this.getKeyValueStorage().removeItem(n.deviceKey),this.getKeyValueStorage().removeItem(n.deviceGroupKey),this.getKeyValueStorage().removeItem(n.randomPasswordKey)])}async getAuthKeys(t){w(this.authConfig?.Cognito);const n=t??await this.getLastAuthUser();return pr(bn,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){w(this.authConfig?.Cognito);const t=this.authConfig.Cognito.userPoolClientId;return`${bn}.${t}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(t){const{oauthMetadata:n}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n,JSON.stringify(t))}async getOAuthMetadata(){const{oauthMetadata:t}=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(t);return n&&JSON.parse(n)}}const pr=(e,t)=>po(dr)(`${e}`,t);function po(e){const t=Object.values({...e});return(n,o)=>t.reduce((s,i)=>({...s,[i]:`${n}.${o}.${i}`}),{})}const Mn="amplify-signin-with-hostedUI",H="CognitoIdentityServiceProvider";class fo{constructor(t){this.keyValueStorage=t}async clearOAuthInflightData(){w(this.cognitoConfig);const t=V(H,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(t.inflightOAuth),this.keyValueStorage.removeItem(t.oauthPKCE),this.keyValueStorage.removeItem(t.oauthState)])}async clearOAuthData(){w(this.cognitoConfig);const t=V(H,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(Mn),this.keyValueStorage.removeItem(t.oauthSignIn)}loadOAuthState(){w(this.cognitoConfig);const t=V(H,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(t.oauthState)}storeOAuthState(t){w(this.cognitoConfig);const n=V(H,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthState,t)}loadPKCE(){w(this.cognitoConfig);const t=V(H,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(t.oauthPKCE)}storePKCE(t){w(this.cognitoConfig);const n=V(H,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthPKCE,t)}setAuthConfig(t){this.cognitoConfig=t}async loadOAuthInFlight(){w(this.cognitoConfig);const t=V(H,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(t.inflightOAuth)==="true"}async storeOAuthInFlight(t){w(this.cognitoConfig);const n=V(H,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.inflightOAuth,`${t}`)}async loadOAuthSignIn(){w(this.cognitoConfig);const t=V(H,this.cognitoConfig.userPoolClientId),n=await this.keyValueStorage.getItem(Mn),[o,s]=(await this.keyValueStorage.getItem(t.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:o==="true"||n==="true",preferPrivateSession:s==="true"}}async storeOAuthSignIn(t,n=!1){w(this.cognitoConfig);const o=V(H,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(o.oauthSignIn,`${t},${n}`)}}const V=(e,t)=>po(Ji)(e,t),b=new fo(gt),it=[],fr=e=>{it.push(e)},go=()=>{for(;it.length;)it.pop()?.()};class gr{constructor(){this.waitForInflightOAuth=He()?async()=>{if(await b.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((t,n)=>{fr(t)}),this.inflightPromise)}:async()=>{}}setAuthConfig(t){b.setAuthConfig(t.Cognito),this.authConfig=t}setTokenRefresher(t){this.tokenRefresher=t}setAuthTokenStore(t){this.tokenStore=t}getTokenStore(){if(!this.tokenStore)throw new m({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new m({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(t){this.clientMetadataProvider=t}async getTokens(t){let n;try{w(this.authConfig?.Cognito)}catch{return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,n=await this.getTokenStore().loadTokens();const o=await this.getTokenStore().getLastAuthUser();if(n===null)return null;const s=!!n?.idToken&&an({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),i=an({expiresAt:(n.accessToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0});return(t?.forceRefresh||s||i)&&(n=await this.refreshTokens({tokens:n,username:o,clientMetadata:t?.clientMetadata??await this.clientMetadataProvider?.()}),n===null)?null:{accessToken:n?.accessToken,idToken:n?.idToken,signInDetails:n?.signInDetails}}async refreshTokens({tokens:t,username:n,clientMetadata:o}){try{const{signInDetails:s}=t,i=await this.getTokenRefresher()({tokens:t,authConfig:this.authConfig,username:n,clientMetadata:o});return i.signInDetails=s,await this.setTokens({tokens:i}),z.dispatch("auth",{event:"tokenRefresh"},"Auth",$),i}catch(s){return this.handleErrors(s)}}handleErrors(t){if(St(t),this.isAuthenticationError(t)&&this.clearTokens(),z.dispatch("auth",{event:"tokenRefresh_failure",data:{error:t}},"Auth",$),t.name.startsWith("NotAuthorizedException"))return null;throw t}isAuthenticationError(t){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(o=>t?.name?.startsWith?.(o))}async setTokens({tokens:t}){return this.getTokenStore().storeTokens(t)}async clearTokens(){return this.getTokenStore().clearTokens()}getDeviceMetadata(t){return this.getTokenStore().getDeviceMetadata(t)}clearDeviceMetadata(t){return this.getTokenStore().clearDeviceMetadata(t)}setOAuthMetadata(t){return this.getTokenStore().setOAuthMetadata(t)}getOAuthMetadata(){return this.getTokenStore().getOAuthMetadata()}}class Er{constructor(){this.authTokenStore=new hr,this.authTokenStore.setKeyValueStorage(gt),this.tokenOrchestrator=new gr,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(cr)}getTokens(t={}){return this.tokenOrchestrator.getTokens(t)}setKeyValueStorage(t){this.authTokenStore.setKeyValueStorage(t)}setClientMetadataProvider(t){this.tokenOrchestrator.setClientMetadataProvider(t)}setAuthConfig(t){this.authTokenStore.setAuthConfig(t),this.tokenOrchestrator.setAuthConfig(t)}}const mr=new Er,{tokenOrchestrator:ge}=mr;async function It(e){if(e.AccessToken){const t=te(e.AccessToken),n=(t.payload.iat||0)*1e3,o=new Date().getTime(),s=n>0?n-o:0;let i,r,d;e.RefreshToken&&(r=e.RefreshToken),e.IdToken&&(i=te(e.IdToken)),e?.NewDeviceMetadata&&(d=e.NewDeviceMetadata);const c={accessToken:t,idToken:i,refreshToken:r,clockDrift:s,deviceMetadata:d,username:e.username};e?.signInDetails&&(c.signInDetails=e.signInDetails),await ge.setTokens({tokens:c})}else throw new M({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}const yr="Unable to get user session following successful sign-in.",Eo=async()=>{try{z.dispatch("auth",{event:"signedIn",data:await yt()},"Auth",$)}catch(e){throw e.name===mt?new m({name:zi,message:yr,recoverySuggestion:"This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server."}):e}};function mo(){return{active:!1}}const Sr=(e,t)=>{switch(t.type){case"SET_USERNAME":return{...e,username:t.value};case"SET_SESSION":return{...e,session:t.value};case"START":return{...e,active:!0};case"RESET":return mo();default:return e}},Ir=e=>{let t=e(mo(),{type:"RESET"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}},_e=Ir(Sr),wr=180*1e3,Oe="CognitoSignInState",J={username:`${Oe}.username`,challengeName:`${Oe}.challengeName`,signInSession:`${Oe}.signInSession`,expiry:`${Oe}.expiry`},vr=(e,t)=>{switch(t.type){case"SET_SIGN_IN_SESSION":return Ue({signInSession:t.value}),{...e,signInSession:t.value};case"SET_SIGN_IN_STATE":return Ue(t.value),{...t.value};case"SET_CHALLENGE_NAME":return Ue({challengeName:t.value}),{...e,challengeName:t.value};case"SET_USERNAME":return Ue({username:t.value}),{...e,username:t.value};case"SET_INITIAL_STATE":return xr();case"RESET_STATE":return yo(),wt();default:return e}},Rr=e=>{const t=Number(e),n=Date.now();return t<=n},Ac=()=>{ne.dispatch({type:"RESET_STATE"})},yo=()=>{for(const e of Object.values(J))Y.removeItem(e)},wt=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),xr=()=>{const e=Y.getItem(J.expiry);if(!e||Rr(e))return yo(),wt();const t=Y.getItem(J.username)??void 0,n=Y.getItem(J.challengeName)??void 0,o=Y.getItem(J.signInSession)??void 0;return{username:t,challengeName:n,signInSession:o}},Ar=e=>{let t=e(wt(),{type:"SET_INITIAL_STATE"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}},ne=Ar(vr);function Tr(e){ne.dispatch({type:"SET_SIGN_IN_STATE",value:e})}const Ue=({challengeName:e,signInSession:t,username:n})=>{n&&Y.setItem(J.username,n),e&&Y.setItem(J.challengeName,e),t&&(Y.setItem(J.signInSession,t),Y.setItem(J.expiry,String(Date.now()+wr)))},On="Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.";class X extends M{constructor(t){super(t),this.constructor=X,Object.setPrototypeOf(this,X.prototype)}}var R;(function(e){e.PasskeyNotSupported="PasskeyNotSupported",e.PasskeyAlreadyExists="PasskeyAlreadyExists",e.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",e.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",e.RelyingPartyMismatch="RelyingPartyMismatch",e.PasskeyRegistrationFailed="PasskeyRegistrationFailed",e.PasskeyRetrievalFailed="PasskeyRetrievalFailed",e.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",e.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",e.PasskeyOperationAborted="PasskeyOperationAborted"})(R||(R={}));const tt="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",Un="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",Ke={[R.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:On},[R.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:Un},[R.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:Un},[R.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:On},[R.PasskeyRetrievalFailed]:{message:"Device failed to retrieve passkey.",recoverySuggestion:"Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP."},[R.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[R.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:tt},[R.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:tt},[R.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:tt},[R.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},vt=dt(Ke,X),_r=e=>{if(e instanceof Error){if(e.name==="AbortError"){const{message:t,recoverySuggestion:n}=Ke[R.PasskeyOperationAborted];return new X({name:R.PasskeyOperationAborted,message:t,recoverySuggestion:n,underlyingError:e})}if(e.name==="SecurityError"){const{message:t,recoverySuggestion:n}=Ke[R.RelyingPartyMismatch];return new X({name:R.RelyingPartyMismatch,message:t,recoverySuggestion:n,underlyingError:e})}}return new X({name:re.Unknown,message:"An unknown error has occurred.",underlyingError:e})},Cr=e=>{if(e instanceof X)return e;if(e instanceof Error&&e.name==="NotAllowedError"){const{message:t,recoverySuggestion:n}=Ke[R.PasskeyAuthenticationCanceled];return new X({name:R.PasskeyAuthenticationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}return _r(e)},Pr=()=>He()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Ae=e=>fe.convert(new Uint8Array(e),{urlSafe:!0,skipPadding:!0}),Dn=e=>Uint8Array.from(lt.convert(e,{urlSafe:!0}),t=>t.charCodeAt(0)).buffer,Nr=e=>{const t=Dn(e.challenge),n=(e.allowCredentials||[]).map(o=>({...o,id:Dn(o.id)}));return{...e,challenge:t,allowCredentials:n}},br=e=>{const t={clientDataJSON:Ae(e.response.clientDataJSON),authenticatorData:Ae(e.response.authenticatorData),signature:Ae(e.response.signature)};e.response.userHandle&&(t.userHandle=Ae(e.response.userHandle));const n={id:e.id,rawId:Ae(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorAttachment),n};function Mr(e){vt(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAssertionResponse,R.PasskeyRetrievalFailed)}const Or=async e=>{try{const t=Pr();vt(t,R.PasskeyNotSupported);const n=Nr(e),o=await navigator.credentials.get({publicKey:n});return Mr(o),br(o)}catch(t){throw Cr(t)}},Ur=e=>ce(ue,de("ConfirmDevice"),Se(),{...le,...e}),ke={convert(e){return new TextEncoder().encode(e)}};function f(e,t){e!=null&&this.fromString(e,t)}function N(){return new f(null,null)}let ee;const Dr=0xdeadbeefcafe,kn=(Dr&16777215)===15715070;function kr(e,t,n,o,s,i){for(;--i>=0;){const r=t*this[e++]+n[o]+s;s=Math.floor(r/67108864),n[o++]=r&67108863}return s}function Fr(e,t,n,o,s,i){const r=t&32767,d=t>>15;for(;--i>=0;){let c=this[e]&32767;const a=this[e++]>>15,u=d*c+a*r;c=r*c+((u&32767)<<15)+n[o]+(s&1073741823),s=(c>>>30)+(u>>>15)+d*a+(s>>>30),n[o++]=c&1073741823}return s}function Lr(e,t,n,o,s,i){const r=t&16383,d=t>>14;for(;--i>=0;){let c=this[e]&16383;const a=this[e++]>>14,u=d*c+a*r;c=r*c+((u&16383)<<14)+n[o]+s,s=(c>>28)+(u>>14)+d*a,n[o++]=c&268435455}return s}const Fn=typeof navigator<"u";Fn&&kn&&navigator.appName==="Microsoft Internet Explorer"?(f.prototype.am=Fr,ee=30):Fn&&kn&&navigator.appName!=="Netscape"?(f.prototype.am=kr,ee=26):(f.prototype.am=Lr,ee=28);f.prototype.DB=ee;f.prototype.DM=(1<<ee)-1;f.prototype.DV=1<<ee;const Rt=52;f.prototype.FV=Math.pow(2,Rt);f.prototype.F1=Rt-ee;f.prototype.F2=2*ee-Rt;const Br="0123456789abcdefghijklmnopqrstuvwxyz",ze=[];let Ie,B;Ie=48;for(B=0;B<=9;++B)ze[Ie++]=B;Ie=97;for(B=10;B<36;++B)ze[Ie++]=B;Ie=65;for(B=10;B<36;++B)ze[Ie++]=B;function Ln(e){return Br.charAt(e)}function Kr(e,t){const n=ze[e.charCodeAt(t)];return n??-1}function Wr(e){for(let t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function qr(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}function xt(e){const t=N();return t.fromInt(e),t}function Hr(e,t){let n;if(t===16)n=4;else if(t===8)n=3;else if(t===2)n=1;else if(t===32)n=5;else if(t===4)n=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let o=e.length,s=!1,i=0;for(;--o>=0;){const r=Kr(e,o);if(r<0){e.charAt(o)==="-"&&(s=!0);continue}s=!1,i===0?this[this.t++]=r:i+n>this.DB?(this[this.t-1]|=(r&(1<<this.DB-i)-1)<<i,this[this.t++]=r>>this.DB-i):this[this.t-1]|=r<<i,i+=n,i>=this.DB&&(i-=this.DB)}this.clamp(),s&&f.ZERO.subTo(this,this)}function Vr(){const e=this.s&this.DM;for(;this.t>0&&this[this.t-1]==e;)--this.t}function $r(e){if(this.s<0)return"-"+this.negate().toString(e);let t;if(e==16)t=4;else if(e===8)t=3;else if(e===2)t=1;else if(e===32)t=5;else if(e===4)t=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");const n=(1<<t)-1;let o,s=!1,i="",r=this.t,d=this.DB-r*this.DB%t;if(r-- >0)for(d<this.DB&&(o=this[r]>>d)>0&&(s=!0,i=Ln(o));r>=0;)d<t?(o=(this[r]&(1<<d)-1)<<t-d,o|=this[--r]>>(d+=this.DB-t)):(o=this[r]>>(d-=t)&n,d<=0&&(d+=this.DB,--r)),o>0&&(s=!0),s&&(i+=Ln(o));return s?i:"0"}function zr(){const e=N();return f.ZERO.subTo(this,e),e}function Gr(){return this.s<0?this.negate():this}function jr(e){let t=this.s-e.s;if(t!=0)return t;let n=this.t;if(t=n-e.t,t!=0)return this.s<0?-t:t;for(;--n>=0;)if((t=this[n]-e[n])!=0)return t;return 0}function At(e){let t=1,n;return(n=e>>>16)!==0&&(e=n,t+=16),(n=e>>8)!==0&&(e=n,t+=8),(n=e>>4)!==0&&(e=n,t+=4),(n=e>>2)!==0&&(e=n,t+=2),(n=e>>1)!==0&&(e=n,t+=1),t}function Yr(){return this.t<=0?0:this.DB*(this.t-1)+At(this[this.t-1]^this.s&this.DM)}function Jr(e,t){let n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s}function Xr(e,t){for(let n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s}function Zr(e,t){const n=e%this.DB,o=this.DB-n,s=(1<<o)-1,i=Math.floor(e/this.DB);let r=this.s<<n&this.DM,d;for(d=this.t-1;d>=0;--d)t[d+i+1]=this[d]>>o|r,r=(this[d]&s)<<n;for(d=i-1;d>=0;--d)t[d]=0;t[i]=r,t.t=this.t+i+1,t.s=this.s,t.clamp()}function Qr(e,t){t.s=this.s;const n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}const o=e%this.DB,s=this.DB-o,i=(1<<o)-1;t[0]=this[n]>>o;for(let r=n+1;r<this.t;++r)t[r-n-1]|=(this[r]&i)<<s,t[r-n]=this[r]>>o;o>0&&(t[this.t-n-1]|=(this.s&i)<<s),t.t=this.t-n,t.clamp()}function ea(e,t){let n=0,o=0;const s=Math.min(e.t,this.t);for(;n<s;)o+=this[n]-e[n],t[n++]=o&this.DM,o>>=this.DB;if(e.t<this.t){for(o-=e.s;n<this.t;)o+=this[n],t[n++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;n<e.t;)o-=e[n],t[n++]=o&this.DM,o>>=this.DB;o-=e.s}t.s=o<0?-1:0,o<-1?t[n++]=this.DV+o:o>0&&(t[n++]=o),t.t=n,t.clamp()}function ta(e,t){const n=this.abs(),o=e.abs();let s=n.t;for(t.t=s+o.t;--s>=0;)t[s]=0;for(s=0;s<o.t;++s)t[s+n.t]=n.am(0,o[s],t,s,0,n.t);t.s=0,t.clamp(),this.s!==e.s&&f.ZERO.subTo(t,t)}function na(e){const t=this.abs();let n=e.t=2*t.t;for(;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){const o=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,o,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()}function oa(e,t,n){const o=e.abs();if(o.t<=0)return;const s=this.abs();if(s.t<o.t){t?.fromInt(0),n!=null&&this.copyTo(n);return}n===null&&(n=N());const i=N(),r=this.s,d=e.s,c=this.DB-At(o[o.t-1]);c>0?(o.lShiftTo(c,i),s.lShiftTo(c,n)):(o.copyTo(i),s.copyTo(n));const a=i.t,u=i[a-1];if(u===0)return;const h=u*(1<<this.F1)+(a>1?i[a-2]>>this.F2:0),l=this.FV/h,p=(1<<this.F1)/h,g=1<<this.F2;let E=n.t,y=E-a;const S=t===null?N():t;for(i.dlShiftTo(y,S),n.compareTo(S)>=0&&(n[n.t++]=1,n.subTo(S,n)),f.ONE.dlShiftTo(a,S),S.subTo(i,i);i.t<a;)i[i.t++]=0;for(;--y>=0;){let A=n[--E]===u?this.DM:Math.floor(n[E]*l+(n[E-1]+g)*p);if((n[E]+=i.am(0,A,n,y,0,a))<A)for(i.dlShiftTo(y,S),n.subTo(S,n);n[E]<--A;)n.subTo(S,n)}t!==null&&(n.drShiftTo(a,t),r!==d&&f.ZERO.subTo(t,t)),n.t=a,n.clamp(),c>0&&n.rShiftTo(c,n),r<0&&f.ZERO.subTo(n,n)}function sa(e){const t=N();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(f.ZERO)>0&&e.subTo(t,t),t}function ia(){if(this.t<1)return 0;const e=this[0];if((e&1)===0)return 0;let t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function ra(e){return this.compareTo(e)===0}function aa(e,t){let n=0,o=0;const s=Math.min(e.t,this.t);for(;n<s;)o+=this[n]+e[n],t[n++]=o&this.DM,o>>=this.DB;if(e.t<this.t){for(o+=e.s;n<this.t;)o+=this[n],t[n++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;n<e.t;)o+=e[n],t[n++]=o&this.DM,o>>=this.DB;o+=e.s}t.s=o<0?-1:0,o>0?t[n++]=o:o<-1&&(t[n++]=this.DV+o),t.t=n,t.clamp()}function ca(e){const t=N();return this.addTo(e,t),t}function da(e){const t=N();return this.subTo(e,t),t}function ua(e){const t=N();return this.multiplyTo(e,t),t}function la(e){const t=N();return this.divRemTo(e,t,null),t}function we(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function ha(e){const t=N();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(f.ZERO)>0&&this.m.subTo(t,t),t}function pa(e){const t=N();return e.copyTo(t),this.reduce(t),t}function fa(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(let t=0;t<this.m.t;++t){let n=e[t]&32767;const o=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,o,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function ga(e,t){e.squareTo(t),this.reduce(t)}function Ea(e,t,n){e.multiplyTo(t,n),this.reduce(n)}we.prototype.convert=ha;we.prototype.revert=pa;we.prototype.reduce=fa;we.prototype.mulTo=Ea;we.prototype.sqrTo=ga;function ma(e,t,n){let o=e.bitLength(),s,i=xt(1);const r=new we(t);if(o<=0)return i;o<18?s=1:o<48?s=3:o<144?s=4:o<768?s=5:s=6;const d=[];let c=3;const a=s-1,u=(1<<s)-1;if(d[1]=r.convert(this),s>1){const S=N();for(r.sqrTo(d[1],S);c<=u;)d[c]=N(),r.mulTo(S,d[c-2],d[c]),c+=2}let h=e.t-1,l,p=!0,g=N(),E;for(o=At(e[h])-1;h>=0;){for(o>=a?l=e[h]>>o-a&u:(l=(e[h]&(1<<o+1)-1)<<a-o,h>0&&(l|=e[h-1]>>this.DB+o-a)),c=s;(l&1)===0;)l>>=1,--c;if((o-=c)<0&&(o+=this.DB,--h),p)d[l].copyTo(i),p=!1;else{for(;c>1;)r.sqrTo(i,g),r.sqrTo(g,i),c-=2;c>0?r.sqrTo(i,g):(E=i,i=g,g=E),r.mulTo(g,d[l],i)}for(;h>=0&&(e[h]&1<<o)===0;)r.sqrTo(i,g),E=i,i=g,g=E,--o<0&&(o=this.DB-1,--h)}const y=r.revert(i);return n(null,y),y}f.prototype.copyTo=Wr;f.prototype.fromInt=qr;f.prototype.fromString=Hr;f.prototype.clamp=Vr;f.prototype.dlShiftTo=Jr;f.prototype.drShiftTo=Xr;f.prototype.lShiftTo=Zr;f.prototype.rShiftTo=Qr;f.prototype.subTo=ea;f.prototype.multiplyTo=ta;f.prototype.squareTo=na;f.prototype.divRemTo=oa;f.prototype.invDigit=ia;f.prototype.addTo=aa;f.prototype.toString=$r;f.prototype.negate=zr;f.prototype.abs=Gr;f.prototype.compareTo=jr;f.prototype.bitLength=Yr;f.prototype.mod=sa;f.prototype.equals=ra;f.prototype.add=ca;f.prototype.subtract=da;f.prototype.multiply=ua;f.prototype.divide=la;f.prototype.modPow=ma;f.ZERO=xt(0);f.ONE=xt(1);const ya=async({a:e,g:t,k:n,x:o,B:s,N:i,U:r})=>new Promise((d,c)=>{t.modPow(o,i,(a,u)=>{if(a){c(a);return}s.subtract(n.multiply(u)).modPow(e.add(r.multiply(o)),i,(h,l)=>{if(h){c(h);return}d(l.mod(i))})})}),Sa="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",So={},rt={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),So[e]=t,rt[t]=e}const Ee=e=>{if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const o=e.slice(n,n+2).toLowerCase();if(o in rt)t[n/2]=rt[o];else throw new Error(`Cannot decode unrecognized sequence ${o} as hexadecimal`)}return t},Tt=e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=So[e[n]];return t},at=e=>{const t=new Pe;t.update(e);const n=t.digestSync(),o=Tt(n);return new Array(64-o.length).join("0")+o},Fe=e=>at(Ee(e)),Ia=/^[89a-f]/i,G=e=>{if(!(e instanceof f))throw new Error("Not a BigInteger");const t=e.compareTo(f.ZERO)<0;let n=e.abs().toString(16);if(n=n.length%2!==0?`0${n}`:n,n=Ia.test(n)?`00${n}`:n,t){const o=n.split("").map(i=>{const r=~parseInt(i,16)&15;return"0123456789ABCDEF".charAt(r)}).join("");n=new f(o,16).add(f.ONE).toString(16),n.toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},wa=({A:e,B:t})=>{const n=new f(Fe(G(e)+G(t)),16);if(n.equals(f.ZERO))throw new Error("U cannot be zero.");return n},va=(e,t,n)=>{const o=new Pe(t);o.update(e);const s=o.digestSync(),i=new Pe(s);return i.update(n),i.digestSync().slice(0,16)},_t=e=>{const t=new Et().random(e).toString();return Ee(t)},Ra=()=>fe.convert(_t(40));class xa{constructor({userPoolName:t,a:n,g:o,A:s,N:i}){this.encoder=ke,this.userPoolName=t,this.a=n,this.g=o,this.A=s,this.N=i,this.k=new f(Fe(`${G(i)}${G(o)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new m({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new m({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new m({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(t,n){this.randomPassword=Ra();const o=`${t}${n}:${this.randomPassword}`,s=at(o),i=Tt(_t(16));return this.saltToHashDevices=G(new f(i,16)),new Promise((r,d)=>{this.g.modPow(new f(Fe(this.saltToHashDevices+s),16),this.N,(c,a)=>{if(c){d(c);return}this.verifierDevices=G(a),r()})})}async getPasswordAuthenticationKey({username:t,password:n,serverBValue:o,salt:s}){if(o.mod(this.N).equals(f.ZERO))throw new Error("B cannot be zero.");const i=wa({A:this.A,B:o}),r=`${this.userPoolName}${t}:${n}`,d=at(r),c=new f(Fe(G(s)+d),16),a=await ya({a:this.a,g:this.g,k:this.k,x:c,B:o,N:this.N,U:i}),u=this.encoder.convert("Caldera Derived Key"),h=this.encoder.convert(""),l=new Uint8Array(u.byteLength+h.byteLength);return l.set(u,0),l.set(h,u.byteLength),va(Ee(G(a)),Ee(G(i)),l)}}const Aa=async({a:e,g:t,N:n})=>new Promise((o,s)=>{t.modPow(e,n,(i,r)=>{if(i){s(i);return}if(r.mod(n).equals(f.ZERO)){s(new Error("Illegal parameter. A mod N cannot be 0."));return}o(r)})}),Ge=async e=>{const t=new f(Sa,16),n=new f("2",16),o=Ta(),s=await Aa({a:o,g:n,N:t});return new xa({userPoolName:e,a:o,g:n,A:s,N:t})},Ta=()=>{const e=Tt(_t(128));return new f(e,16)};async function _a({userPoolId:e,userPoolEndpoint:t,newDeviceMetadata:n,accessToken:o}){if(!n)return;const s=e.split("_")[1]||"",i=await Ge(s),r=n?.DeviceKey,d=n?.DeviceGroupKey;try{await i.generateHashDevice(d??"",r??"")}catch{return}const c={Salt:fe.convert(Ee(i.getSaltToHashDevices())),PasswordVerifier:fe.convert(Ee(i.getVerifierDevices()))},a=i.getRandomPassword();try{return await Ur({endpointResolver:F({endpointOverride:t})})({region:k(e)},{AccessToken:o,DeviceName:await bi(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:c}),{deviceKey:r,deviceGroupKey:d,randomPassword:a}}catch{return}}async function Ca(e){const t=Z.getConfig().Auth?.Cognito;w(t);const{username:n,signInSession:o,signInDetails:s,challengeName:i}=ne.getState();if(i!=="WEB_AUTHN"||!n)throw new m({name:ae.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:r}=e;vt(!!r,R.InvalidPasskeyAuthenticationOptions);const d=await Or(JSON.parse(r)),c=$e({endpointResolver:F({endpointOverride:t.userPoolEndpoint})}),{ChallengeName:a,ChallengeParameters:u,AuthenticationResult:h,Session:l}=await c({region:k(t.userPoolId),userAgentValue:Q(q.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(d)},ClientId:t.userPoolClientId,Session:o});if(Tr({signInSession:l,username:n,challengeName:a,signInDetails:s}),h)return await It({...h,username:n,NewDeviceMetadata:await _a({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:h.NewDeviceMetadata,accessToken:h.AccessToken}),signInDetails:s}),ne.dispatch({type:"RESET_STATE"}),await Eo(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if(a==="WEB_AUTHN")throw new m({name:ae.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:a,challengeParameters:u}}function he({username:e,userPoolId:t,userPoolClientId:n}){if(typeof window>"u")return;const o=window.AmazonCognitoAdvancedSecurityData;if(typeof o>"u")return;const s=o.getData(e,t,n);return s?{EncodedData:s}:{}}const Pa=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Na=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Io=()=>{const e=new Date,t=Na[e.getUTCDay()],n=Pa[e.getUTCMonth()],o=e.getUTCDate();let s=e.getUTCHours();s<10&&(s=`0${s}`);let i=e.getUTCMinutes();i<10&&(i=`0${i}`);let r=e.getUTCSeconds();r<10&&(r=`0${r}`);const d=e.getUTCFullYear();return`${t} ${n} ${o} ${s}:${i}:${r} UTC ${d}`},wo=({userPoolName:e,username:t,challengeParameters:n,dateNow:o,hkdf:s})=>{const i=ke.convert(e),r=ke.convert(t),d=ba(n.SECRET_BLOCK),c=ke.convert(o),a=new Uint8Array(i.byteLength+r.byteLength+d.byteLength+c.byteLength);a.set(i,0),a.set(r,i.byteLength),a.set(d,i.byteLength+r.byteLength),a.set(c,i.byteLength+r.byteLength+d.byteLength);const u=new Pe(s);u.update(a);const h=u.digestSync();return fe.convert(h)},ba=e=>{const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),o=lt.convert(n),s=new Uint8Array(o.length);for(let i=0;i<o.length;++i)s[i]=o.charCodeAt(i);return s};async function Ct({username:e,config:t,clientMetadata:n,session:o,tokenOrchestrator:s}){const{userPoolId:i,userPoolEndpoint:r}=t,d=t.userPoolClientId,c=await s?.getDeviceMetadata(e);uo(c);const a=await Ge(c.deviceGroupKey),u={USERNAME:e,SRP_A:a.A.toString(16),DEVICE_KEY:c.deviceKey},h={ChallengeName:"DEVICE_SRP_AUTH",ClientId:d,ChallengeResponses:u,ClientMetadata:n,Session:o},l=$e({endpointResolver:F({endpointOverride:r})}),{ChallengeParameters:p,Session:g}=await l({region:k(i)},h);return Ma(e,p,n,g,a,t,s)}async function Ma(e,t,n,o,s,{userPoolId:i,userPoolClientId:r,userPoolEndpoint:d},c){const a=await c?.getDeviceMetadata(e);uo(a);const u=new f(t?.SRP_B,16),h=new f(t?.SALT,16),{deviceKey:l}=a,{deviceGroupKey:p}=a,g=await s.getPasswordAuthenticationKey({username:a.deviceKey,password:a.randomPassword,serverBValue:u,salt:h}),E=Io(),y={USERNAME:t?.USERNAME??e,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:wo({username:l,userPoolName:p,challengeParameters:t,dateNow:E,hkdf:g}),DEVICE_KEY:l},S=he({username:e,userPoolId:i,userPoolClientId:r}),A={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:r,ChallengeResponses:y,Session:o,ClientMetadata:n,UserContextData:S};return $e({endpointResolver:F({endpointOverride:d})})({region:k(i)},A)}async function vo(e,t,n,o,s,i,r){const{userPoolId:d,userPoolClientId:c,userPoolEndpoint:a}=i,u=d?.split("_")[1]||"",h=new f(t?.SRP_B,16),l=new f(t?.SALT,16),p=t?.USER_ID_FOR_SRP;if(!p)throw new m({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});const g=await s.getPasswordAuthenticationKey({username:p,password:e,serverBValue:h,salt:l}),E=Io(),y={USERNAME:p,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:wo({username:p,userPoolName:u,challengeParameters:t,dateNow:E,hkdf:g})},S=await r.getDeviceMetadata(p);S&&S.deviceKey&&(y.DEVICE_KEY=S.deviceKey);const A=he({username:p,userPoolId:d,userPoolClientId:c}),O={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:y,ClientMetadata:n,Session:o,ClientId:c,UserContextData:A},U=await $e({endpointResolver:F({endpointOverride:a})})({region:k(d)},O);return U.ChallengeName==="DEVICE_SRP_AUTH"?Ct({username:p,config:i,clientMetadata:n,session:U.Session,tokenOrchestrator:r}):U}async function Ro(e,t,n,o){try{return await e(...t)}catch(s){if(s instanceof m&&s.name==="ResourceNotFoundException"&&s.message.includes("Device does not exist."))return await o.clearDeviceMetadata(n),e(...t);throw s}}function je(e){const{dispatch:t}=ne;t({type:"SET_USERNAME",value:e})}async function Oa({username:e,password:t,clientMetadata:n,config:o,tokenOrchestrator:s,authFlow:i,preferredChallenge:r}){const{userPoolId:d,userPoolClientId:c,userPoolEndpoint:a}=o,u=d?.split("_")[1]||"",h=await Ge(u),l={USERNAME:e,SRP_A:h.A.toString(16)};i==="USER_AUTH"&&r&&(l.PREFERRED_CHALLENGE=r);const p=he({username:e,userPoolId:d,userPoolClientId:c}),g={AuthFlow:i,AuthParameters:l,ClientMetadata:n,ClientId:c,UserContextData:p},y=await Ve({endpointResolver:F({endpointOverride:a})})({region:k(d),userAgentValue:Q(q.SignIn)},g),{ChallengeParameters:S,Session:A}=y,O=S?.USERNAME??e;return je(O),y.ChallengeName==="PASSWORD_VERIFIER"?Ro(vo,[t,S,n,A,h,o,s],O,s):y}const Bn="userAttributes.";function Ua(e){return"isSignedIn"in e&&"nextStep"in e}async function Tc(e,t,n,o,s){const{userPoolClientId:i,userPoolId:r,userPoolEndpoint:d}=o,c={USERNAME:e,PASSWORD:t},a=await s.getDeviceMetadata(e);a&&a.deviceKey&&(c.DEVICE_KEY=a.deviceKey);const u=he({username:e,userPoolId:r,userPoolClientId:i}),h={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:c,ClientMetadata:n,ClientId:i,UserContextData:u},p=await Ve({endpointResolver:F({endpointOverride:d})})({region:k(r),userAgentValue:Q(q.SignIn)},h),g=p.ChallengeParameters?.USERNAME??p.ChallengeParameters?.USER_ID_FOR_SRP??e;return je(g),p.ChallengeName==="DEVICE_SRP_AUTH"?Ct({username:g,config:o,clientMetadata:n,session:p.Session,tokenOrchestrator:s}):p}async function _c(e,t,n,o,s){return Oa({username:e,password:t,clientMetadata:n,config:o,tokenOrchestrator:s,authFlow:"USER_SRP_AUTH"})}async function Cc(e,t,n,o){const{userPoolClientId:s,userPoolId:i,userPoolEndpoint:r}=n,d={USERNAME:e},c=await o.getDeviceMetadata(e);c&&c.deviceKey&&(d.DEVICE_KEY=c.deviceKey);const a=he({username:e,userPoolId:i,userPoolClientId:s}),u={AuthFlow:"CUSTOM_AUTH",AuthParameters:d,ClientMetadata:t,ClientId:s,UserContextData:a},l=await Ve({endpointResolver:F({endpointOverride:r})})({region:k(i),userAgentValue:Q(q.SignIn)},u),p=l.ChallengeParameters?.USERNAME??e;return je(p),l.ChallengeName==="DEVICE_SRP_AUTH"?Ct({username:p,config:n,clientMetadata:t,session:l.Session,tokenOrchestrator:o}):l}async function Pc(e,t,n,o,s){w(o);const{userPoolId:i,userPoolClientId:r,userPoolEndpoint:d}=o,c=i?.split("_")[1]||"",a=await Ge(c),u={USERNAME:e,SRP_A:a.A.toString(16),CHALLENGE_NAME:"SRP_A"},h=he({username:e,userPoolId:i,userPoolClientId:r}),l={AuthFlow:"CUSTOM_AUTH",AuthParameters:u,ClientMetadata:n,ClientId:r,UserContextData:h},p=Ve({endpointResolver:F({endpointOverride:d})}),{ChallengeParameters:g,Session:E}=await p({region:k(i),userAgentValue:Q(q.SignIn)},l),y=g?.USERNAME??e;return je(y),Ro(vo,[t,g,n,E,a,o,s],y,s)}async function Da(e){const{challengeName:t,challengeParameters:n,availableChallenges:o}=e,s=Z.getConfig().Auth?.Cognito;switch(w(s),t){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:n}};case"MFA_SETUP":{const{signInSession:i,username:r}=ne.getState(),d=Kn(Wn(n.MFAS_CAN_SETUP))||[],c=Ba(d),a=c.includes("TOTP"),u=c.includes("EMAIL");if(a&&u)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:c}};if(u)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(a){const h=sr({endpointResolver:F({endpointOverride:s.userPoolEndpoint})}),{Session:l,SecretCode:p}=await h({region:k(s.userPoolId)},{Session:i});return ne.dispatch({type:"SET_SIGN_IN_SESSION",value:l}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:ka(p,r)}}}throw new m({name:ae.SignInException,message:`Cannot initiate MFA setup from available types: ${d}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:Fa(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:Kn(Wn(n.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}};case"EMAIL_OTP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_EMAIL_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{const i=await Ca(n);return Ua(i)?i:Da(i)}case"PASSWORD":case"PASSWORD_SRP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_PASSWORD"}};case"SELECT_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION",availableChallenges:o}}}throw new m({name:ae.SignInException,message:`An error occurred during the sign in process. ${t} challengeName returned by the underlying service was not addressed.`})}function ka(e,t){return{sharedSecret:e,getSetupUri:(n,o)=>{const s=`otpauth://totp/${n}:${o??t}?secret=${e}&issuer=${n}`;return new ye(s)}}}function Nc(e){if(e===Le.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(e===Le.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function Fa(e){return e?JSON.parse(e).map(n=>n.includes(Bn)?n.replace(Bn,""):n):[]}function La(e){if(e==="SMS_MFA")return"SMS";if(e==="SOFTWARE_TOKEN_MFA")return"TOTP";if(e==="EMAIL_OTP")return"EMAIL"}function Kn(e){if(e)return e.map(La).filter(Boolean)}function Wn(e){return e?JSON.parse(e):[]}function Ba(e){return e.filter(t=>t==="EMAIL"||t==="TOTP")}async function Ka(){let e;try{e=await yt()}catch{}if(e&&e.userId&&e.username)throw new m({name:ki,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function bc(e){return ne.getState().username??e}function Wa(e=!0){_e.dispatch({type:"RESET"})}const qa=180*1e3;function Ha(e){const t=kt.listen("auth-internal",async({payload:o})=>{o.event==="confirmSignUp"&&o.data?.isSignUpComplete&&(kt.dispatch("auth-internal",{event:"autoSignIn"}),t())}),n=setTimeout(()=>{t(),clearTimeout(n),Wa()},qa)}const Va=()=>async e=>{if(e.statusCode>=300){const t=await pt(e);if(St(t),t.name===st.InvalidParameterException&&/'password'/.test(t.message)&&/Member must not be null/.test(t.message)){const n=I.EmptySignUpPassword,{message:o,recoverySuggestion:s}=ao[n];throw new m({name:n,message:o,recoverySuggestion:s})}throw new m({name:t.name,message:t.message})}return ft(e)},$a=e=>ce(ue,de("SignUp"),Va(),{...le,...e});async function za(e){const{username:t,password:n,options:o}=e,s=Z.getConfig().Auth?.Cognito,i=s?.signUpVerificationMethod??"code",{clientMetadata:r,validationData:d,autoSignIn:c}=e.options??{};w(s),Di(!!t,I.EmptySignUpUsername);const a=typeof c!="boolean"?c:void 0;a?.authFlowType;const{userPoolId:u,userPoolClientId:h,userPoolEndpoint:l}=s,p=$a({endpointResolver:F({endpointOverride:l})}),g={Username:t,Password:void 0,UserAttributes:o?.userAttributes&&cn(o?.userAttributes),ClientMetadata:r,ValidationData:d&&cn(d),ClientId:h,UserContextData:he({username:t,userPoolId:u,userPoolClientId:h})};n&&(g.Password=n);const{UserSub:E,CodeDeliveryDetails:y,UserConfirmed:S,Session:A}=await p({region:k(u),userAgentValue:Q(q.SignUp)},g);(a||c===!0)&&(_e.dispatch({type:"START"}),_e.dispatch({type:"SET_USERNAME",value:t}),_e.dispatch({type:"SET_SESSION",value:A}));const O={destination:y?.Destination,deliveryMedium:y?.DeliveryMedium,attributeName:y?.AttributeName},se=!!S,U=_e.getState().active;if(se)return U?{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:E}:{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:E};if(U){if(i==="link")return{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:O},userId:E};Ha()}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:O},userId:E}}new K("AuthError");const Ga={oauthSignInError:{message:_.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:_.DEFAULT_MSG},missingAuthConfig:{message:_.DEFAULT_MSG},emptyUsername:{message:_.EMPTY_USERNAME},invalidUsername:{message:_.INVALID_USERNAME},emptyPassword:{message:_.EMPTY_PASSWORD},emptyCode:{message:_.EMPTY_CODE},signUpError:{message:_.SIGN_UP_ERROR},noMFA:{message:_.NO_MFA},invalidMFA:{message:_.INVALID_MFA},emptyChallengeResponse:{message:_.EMPTY_CHALLENGE},noUserSession:{message:_.NO_USER_SESSION},deviceConfig:{message:_.DEVICE_CONFIG},networkError:{message:_.NETWORK_ERROR},autoSignInError:{message:_.AUTOSIGNIN_ERROR},default:{message:_.DEFAULT_MSG}},oe=(e,t)=>new m({message:e??"An error has occurred during the oauth process.",name:ae.OAuthSignInError,recoverySuggestion:Ga.oauthSignInError.log});var ct;(function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default",e.DeviceConfig="deviceConfig",e.NetworkError="networkError",e.AutoSignInError="autoSignInError",e.OAuthSignInError="oauthSignInError"})(ct||(ct={}));const ja="`signInWithRedirect` has been canceled.",Ya="An error occurred while validating the state.",Ja="Try to initiate an OAuth flow from Amplify",xo=async e=>{const t=await b.loadOAuthState(),n=e===t?t:void 0;if(!n)throw new m({name:ct.OAuthSignInError,message:e===null?ja:Ya,recoverySuggestion:e===null?void 0:Ja});return n},Ao=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:o,responseType:s,domain:i,preferPrivateSession:r})=>{const d=new ye(e),c=d.searchParams.get("error"),a=d.searchParams.get("error_description");if(c)throw oe(a??c);return s==="code"?Xa({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:o,domain:i,preferPrivateSession:r}):Za({currentUrl:e,redirectUri:o,preferPrivateSession:r})},Xa=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:o,domain:s,preferPrivateSession:i})=>{const r=new ye(e),d=r.searchParams.get("code"),c=r.searchParams.get("state");if(!d||!c)throw oe("User cancelled OAuth flow.");const a=await xo(c),u="https://"+s+"/oauth2/token",h=await b.loadPKCE(),l={grant_type:"authorization_code",code:d,client_id:n,redirect_uri:o,...h?{code_verifier:h}:{}},p=Object.entries(l).map(([pe,T])=>`${encodeURIComponent(pe)}=${encodeURIComponent(T)}`).join("&"),{access_token:g,refresh_token:E,id_token:y,error:S,error_message:A,token_type:O,expires_in:se}=await(await fetch(u,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[ko]:t},body:p})).json();if(S)throw oe(A??S);const U=(g&&te(g).payload.username)??"username";return await It({username:U,AccessToken:g,IdToken:y,RefreshToken:E}),To({redirectUri:o,state:a,preferPrivateSession:i})},Za=async({currentUrl:e,redirectUri:t,preferPrivateSession:n})=>{const o=new ye(e),{id_token:s,access_token:i,state:r,token_type:d,expires_in:c,error_description:a,error:u}=(o.hash??"#").substring(1).split("&").map(p=>p.split("=")).reduce((p,[g,E])=>({...p,[g]:E}),{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0});if(u)throw oe(a??u);if(!i)throw oe("No access token returned from OAuth flow.");const h=await xo(r),l=(i&&te(i).payload.username)??"username";return await It({username:l,AccessToken:i,IdToken:s}),To({redirectUri:t,state:h,preferPrivateSession:n})},To=async({redirectUri:e,state:t,preferPrivateSession:n})=>{await ge.setOAuthMetadata({oauthSignIn:!0}),await b.clearOAuthData(),await b.storeOAuthSignIn(!0,n),go(),tc(e),Qa(t)&&z.dispatch("auth",{event:"customOAuthState",data:Ci(ec(t))},"Auth",$),z.dispatch("auth",{event:"signInWithRedirect"},"Auth",$),await Eo()},Qa=e=>/-/.test(e),ec=e=>e.split("-").splice(1).join("-"),tc=e=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",e)};function Pt(e,t){{const n=e?.find(nc)??e?.find(oc),o=e?.find(ic)??e?.find(sc);if(n)return n;throw o?Hi:Wi}}const nc=e=>e.startsWith(String(window.location.origin+(window.location.pathname||"/"))),oc=e=>e.includes(String(window.location.hostname)),sc=e=>e.startsWith("http://"),ic=e=>e.startsWith("https://"),Nt=async e=>{go(),await b.clearOAuthInflightData(),z.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:e}},"Auth",$)},rc=async e=>{try{w(e),We(e),b.setAuthConfig(e)}catch{return}if(await b.loadOAuthInFlight())try{const t=window.location.href,{loginWith:n,userPoolClientId:o}=e,{domain:s,redirectSignIn:i,responseType:r}=n.oauth,d=Pt(i);await Ao({currentUrl:t,clientId:o,domain:s,redirectUri:d,responseType:r,userAgentValue:Q(q.SignInWithRedirect)})}catch(t){await Nt(t)}};He()&&Z[zn](rc);const ac={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},_o=async e=>{window?.location&&(window.location.href=e.replace("http://","https://"))},qn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",cc=e=>{const t=new Uint8Array(e);ut().getRandomValues(t);let n="",o;for(const s of t)n+=qn.charAt(s%qn.length);return{value:n,method:"S256",toCodeChallenge(){return o||(o=dc(n),o)}}};function dc(e){const t=new Pe;return t.update(e),uc(fe.convert(t.digestSync(),{urlSafe:!0}))}function uc(e){return e.replace(/=/g,"")}const lc=()=>_i(32),hc=e=>{async function t(n){if(n.persisted&&await e.loadOAuthInFlight()){const s=oe("User cancelled OAuth flow.");await Nt(s)}window.removeEventListener("pageshow",t)}window.addEventListener("pageshow",t)};async function pc(e){const t=Z.getConfig().Auth?.Cognito;w(t),We(t),b.setAuthConfig(t),e?.options?.prompt||await Ka();let n="COGNITO",o;return n=ac[e.provider],fc({oauthConfig:t.loginWith.oauth,clientId:t.userPoolClientId,provider:n,idpIdentifier:o,customState:e?.customState,preferPrivateSession:e?.options?.preferPrivateSession,options:{loginHint:e?.options?.loginHint,lang:e?.options?.lang,nonce:e?.options?.nonce,prompt:e?.options?.prompt},authSessionOpener:e?.options?.authSessionOpener})}const fc=async({oauthConfig:e,provider:t,idpIdentifier:n,clientId:o,customState:s,preferPrivateSession:i,options:r,authSessionOpener:d})=>{const{domain:c,redirectSignIn:a,responseType:u,scopes:h}=e,{loginHint:l,lang:p,nonce:g,prompt:E}=r??{},y=lc(),S=d||_o,A=s?`${y}-${Pi(s)}`:y,{value:O,method:se,toCodeChallenge:U}=cc(128),pe=Pt(e.redirectSignIn);He()&&b.storeOAuthInFlight(!0),b.storeOAuthState(A),b.storePKCE(O);const T=new URLSearchParams;T.append("redirect_uri",pe),T.append("response_type",u),T.append("client_id",o),T.append("identity_provider",t),T.append("scope",h.join(" ")),l&&T.append("login_hint",l),p&&T.append("lang",p),g&&T.append("nonce",g),E&&T.append("prompt",E.toLowerCase()),T.append("state",A),u==="code"&&(T.append("code_challenge",U()),T.append("code_challenge_method",se));const ve=`https://${c}/oauth2/authorize?${T.toString()}`;hc(b);const{type:W,error:be,url:Me}=await S(ve,a,i)??{};try{if(W==="error")throw oe(String(be));if(W==="canceled")throw oe(String(W));W==="success"&&Me&&await Ao({currentUrl:Me,clientId:o,domain:c,redirectUri:pe,responseType:u,userAgentValue:Q(q.SignInWithRedirect),preferPrivateSession:i})}catch(Re){throw await Nt(Re),Re}},gc=async e=>{await e.clearOAuthData(),ge.clearTokens(),await Zn(),z.dispatch("auth",{event:"signedOut"},"Auth",$)},Ec=async(e,t=!1,n)=>{We(e);const{loginWith:o,userPoolClientId:s}=e,{domain:i,redirectSignOut:r}=o.oauth,d=Pt(r),c=`https://${i}/logout?${Object.entries({client_id:s,logout_uri:encodeURIComponent(d)}).map(([a,u])=>`${a}=${u}`).join("&")}`;return _o(c)},mc=async(e,t,n,o)=>{const{isOAuthSignIn:s}=await t.loadOAuthSignIn(),i=await n.getOAuthMetadata();if(await gc(t),s||i?.oauthSignIn)return Ec(e,!1)},yc=e=>ce(ue,de("RevokeToken"),Se(),{...le,...e}),Sc=new K("Auth");async function Ic(e){const t=Z.getConfig().Auth?.Cognito;w(t),await wc(t);let n;try{We(t),n=!0}catch{n=!1}if(n){const o=new fo(gt);o.setAuthConfig(t);const{type:s}=await mc(t,o,ge)??{};if(s==="error")throw new m({name:Vi,message:"An error occurred when attempting to log out from OAuth provider."})}else ge.clearTokens(),await Zn(),z.dispatch("auth",{event:"signedOut"},"Auth",$)}async function wc(e){try{const{userPoolEndpoint:t,userPoolId:n,userPoolClientId:o}=e,s=await ge.getTokenStore().loadTokens();co(s),vc(s.accessToken)&&await yc({endpointResolver:F({endpointOverride:t})})({region:k(n),userAgentValue:Q(q.SignOut)},{ClientId:o,Token:s.refreshToken})}catch{Sc.debug("Client signOut error caught but will proceed with token removal")}}const vc=e=>!!e?.payload?.origin_jti;function Mc(){const[e,t]=Xe.useState(null),[n,o]=Xe.useState(!0);Xe.useEffect(()=>{s();const c=u=>{(u.payload?.event==="signedIn"||u.payload?.event==="tokenRefresh")&&s(),u.payload?.event==="signedOut"&&t(null)},a=z.listen("auth",c);return()=>{typeof a=="function"?a():a?.remove&&a.remove()}},[]);const s=async()=>{try{const c=await yt(),a=await Xs();t({id:c.userId,username:c.username,email:a.tokens?.idToken?.payload?.email||c.username,token:a.tokens?.idToken?.toString()})}catch{t(null)}finally{o(!1)}};return{user:e,isLoading:n,signUp:async(c,a)=>{try{const{isSignUpComplete:u,userId:h,nextStep:l}=await za({username:c,password:a,options:{userAttributes:{email:c}}});return{isSignUpComplete:u,userId:h,nextStep:l}}catch(u){throw console.error("Error signing up:",u),u}},signIn:async()=>{try{return await pc({provider:"COGNITO"})}catch(c){throw console.error("Error signing in:",c),c}},signOut:async()=>{try{await Ic(),t(null)}catch(c){console.error("Error signing out:",c)}},isAuthenticated:!!e}}export{Z as A,St as B,Nc as C,le as D,Pc as E,_c as F,Tc as G,kt as H,Oa as I,Ve as J,je as K,Ka as L,Se as a,de as b,ce as c,ue as d,w as e,Di as f,I as g,he as h,Q as i,k as j,q as k,_e as l,F as m,Ro as n,Cc as o,bc as p,Tr as q,Wa as r,za as s,ge as t,Mc as u,It as v,_a as w,Ac as x,Eo as y,Da as z};
4
+ //# sourceMappingURL=useAuth-lZZC20Tl.js.map