mito-ai 0.1.33__py3-none-any.whl → 0.1.49__py3-none-any.whl

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 (146) hide show
  1. mito_ai/__init__.py +49 -9
  2. mito_ai/_version.py +1 -1
  3. mito_ai/anthropic_client.py +142 -67
  4. mito_ai/{app_builder → app_deploy}/__init__.py +1 -1
  5. mito_ai/app_deploy/app_deploy_utils.py +44 -0
  6. mito_ai/app_deploy/handlers.py +345 -0
  7. mito_ai/{app_builder → app_deploy}/models.py +35 -22
  8. mito_ai/app_manager/__init__.py +4 -0
  9. mito_ai/app_manager/handlers.py +167 -0
  10. mito_ai/app_manager/models.py +71 -0
  11. mito_ai/app_manager/utils.py +24 -0
  12. mito_ai/auth/README.md +18 -0
  13. mito_ai/auth/__init__.py +6 -0
  14. mito_ai/auth/handlers.py +96 -0
  15. mito_ai/auth/urls.py +13 -0
  16. mito_ai/chat_history/handlers.py +63 -0
  17. mito_ai/chat_history/urls.py +32 -0
  18. mito_ai/completions/completion_handlers/agent_execution_handler.py +1 -1
  19. mito_ai/completions/completion_handlers/chat_completion_handler.py +4 -4
  20. mito_ai/completions/completion_handlers/utils.py +99 -37
  21. mito_ai/completions/handlers.py +57 -20
  22. mito_ai/completions/message_history.py +9 -1
  23. mito_ai/completions/models.py +31 -7
  24. mito_ai/completions/prompt_builders/agent_execution_prompt.py +21 -2
  25. mito_ai/completions/prompt_builders/agent_smart_debug_prompt.py +8 -0
  26. mito_ai/completions/prompt_builders/agent_system_message.py +115 -42
  27. mito_ai/completions/prompt_builders/chat_name_prompt.py +6 -6
  28. mito_ai/completions/prompt_builders/chat_prompt.py +18 -11
  29. mito_ai/completions/prompt_builders/chat_system_message.py +4 -0
  30. mito_ai/completions/prompt_builders/prompt_constants.py +23 -4
  31. mito_ai/completions/prompt_builders/utils.py +72 -10
  32. mito_ai/completions/providers.py +81 -47
  33. mito_ai/constants.py +25 -24
  34. mito_ai/file_uploads/__init__.py +3 -0
  35. mito_ai/file_uploads/handlers.py +248 -0
  36. mito_ai/file_uploads/urls.py +21 -0
  37. mito_ai/gemini_client.py +44 -48
  38. mito_ai/log/handlers.py +10 -3
  39. mito_ai/log/urls.py +3 -3
  40. mito_ai/openai_client.py +30 -44
  41. mito_ai/path_utils.py +70 -0
  42. mito_ai/streamlit_conversion/agent_utils.py +37 -0
  43. mito_ai/streamlit_conversion/prompts/prompt_constants.py +172 -0
  44. mito_ai/streamlit_conversion/prompts/prompt_utils.py +10 -0
  45. mito_ai/streamlit_conversion/prompts/streamlit_app_creation_prompt.py +46 -0
  46. mito_ai/streamlit_conversion/prompts/streamlit_error_correction_prompt.py +28 -0
  47. mito_ai/streamlit_conversion/prompts/streamlit_finish_todo_prompt.py +45 -0
  48. mito_ai/streamlit_conversion/prompts/streamlit_system_prompt.py +56 -0
  49. mito_ai/streamlit_conversion/prompts/update_existing_app_prompt.py +50 -0
  50. mito_ai/streamlit_conversion/search_replace_utils.py +94 -0
  51. mito_ai/streamlit_conversion/streamlit_agent_handler.py +144 -0
  52. mito_ai/streamlit_conversion/streamlit_utils.py +85 -0
  53. mito_ai/streamlit_conversion/validate_streamlit_app.py +105 -0
  54. mito_ai/streamlit_preview/__init__.py +6 -0
  55. mito_ai/streamlit_preview/handlers.py +111 -0
  56. mito_ai/streamlit_preview/manager.py +152 -0
  57. mito_ai/streamlit_preview/urls.py +22 -0
  58. mito_ai/streamlit_preview/utils.py +29 -0
  59. mito_ai/tests/chat_history/test_chat_history.py +211 -0
  60. mito_ai/tests/completions/completion_handlers_utils_test.py +190 -0
  61. mito_ai/tests/deploy_app/test_app_deploy_utils.py +89 -0
  62. mito_ai/tests/file_uploads/__init__.py +2 -0
  63. mito_ai/tests/file_uploads/test_handlers.py +282 -0
  64. mito_ai/tests/message_history/test_generate_short_chat_name.py +0 -4
  65. mito_ai/tests/message_history/test_message_history_utils.py +103 -23
  66. mito_ai/tests/open_ai_utils_test.py +18 -22
  67. mito_ai/tests/providers/test_anthropic_client.py +447 -0
  68. mito_ai/tests/providers/test_azure.py +2 -6
  69. mito_ai/tests/providers/test_capabilities.py +120 -0
  70. mito_ai/tests/{test_gemini_client.py → providers/test_gemini_client.py} +40 -36
  71. mito_ai/tests/providers/test_mito_server_utils.py +448 -0
  72. mito_ai/tests/providers/test_model_resolution.py +130 -0
  73. mito_ai/tests/providers/test_openai_client.py +57 -0
  74. mito_ai/tests/providers/test_provider_completion_exception.py +66 -0
  75. mito_ai/tests/providers/test_provider_limits.py +42 -0
  76. mito_ai/tests/providers/test_providers.py +382 -0
  77. mito_ai/tests/providers/test_retry_logic.py +389 -0
  78. mito_ai/tests/providers/test_stream_mito_server_utils.py +140 -0
  79. mito_ai/tests/providers/utils.py +85 -0
  80. mito_ai/tests/streamlit_conversion/__init__.py +3 -0
  81. mito_ai/tests/streamlit_conversion/test_apply_search_replace.py +240 -0
  82. mito_ai/tests/streamlit_conversion/test_streamlit_agent_handler.py +246 -0
  83. mito_ai/tests/streamlit_conversion/test_streamlit_utils.py +193 -0
  84. mito_ai/tests/streamlit_conversion/test_validate_streamlit_app.py +112 -0
  85. mito_ai/tests/streamlit_preview/test_streamlit_preview_handler.py +118 -0
  86. mito_ai/tests/streamlit_preview/test_streamlit_preview_manager.py +292 -0
  87. mito_ai/tests/test_constants.py +31 -3
  88. mito_ai/tests/test_telemetry.py +12 -0
  89. mito_ai/tests/user/__init__.py +2 -0
  90. mito_ai/tests/user/test_user.py +120 -0
  91. mito_ai/tests/utils/test_anthropic_utils.py +6 -6
  92. mito_ai/user/handlers.py +45 -0
  93. mito_ai/user/urls.py +21 -0
  94. mito_ai/utils/anthropic_utils.py +55 -121
  95. mito_ai/utils/create.py +17 -1
  96. mito_ai/utils/error_classes.py +42 -0
  97. mito_ai/utils/gemini_utils.py +39 -94
  98. mito_ai/utils/message_history_utils.py +7 -4
  99. mito_ai/utils/mito_server_utils.py +242 -0
  100. mito_ai/utils/open_ai_utils.py +38 -155
  101. mito_ai/utils/provider_utils.py +49 -0
  102. mito_ai/utils/server_limits.py +1 -1
  103. mito_ai/utils/telemetry_utils.py +137 -5
  104. {mito_ai-0.1.33.data → mito_ai-0.1.49.data}/data/share/jupyter/labextensions/mito_ai/build_log.json +102 -100
  105. {mito_ai-0.1.33.data → mito_ai-0.1.49.data}/data/share/jupyter/labextensions/mito_ai/package.json +4 -2
  106. {mito_ai-0.1.33.data → mito_ai-0.1.49.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/package.json.orig +3 -1
  107. {mito_ai-0.1.33.data → mito_ai-0.1.49.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/toolbar-buttons.json +2 -2
  108. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.281f4b9af60d620c6fb1.js → mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.8f1845da6bf2b128c049.js +15948 -8403
  109. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.8f1845da6bf2b128c049.js.map +1 -0
  110. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js +198 -0
  111. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js.map +1 -0
  112. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.4f1d00fd0c58fcc05d8d.js → mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.8b24b5b3b93f95205b56.js +58 -33
  113. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.8b24b5b3b93f95205b56.js.map +1 -0
  114. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/style_index_js.06083e515de4862df010.js → mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js +10 -2
  115. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js.map +1 -0
  116. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_apis_signOut_mjs-node_module-75790d.688c25857e7b81b1740f.js +533 -0
  117. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_apis_signOut_mjs-node_module-75790d.688c25857e7b81b1740f.js.map +1 -0
  118. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_-72f1c8.a917210f057fcfe224ad.js +6941 -0
  119. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_-72f1c8.a917210f057fcfe224ad.js.map +1 -0
  120. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_dist_esm_index_mjs.6bac1a8c4cc93f15f6b7.js +1021 -0
  121. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_dist_esm_index_mjs.6bac1a8c4cc93f15f6b7.js.map +1 -0
  122. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.4fcecd65bef9e9847609.js +59698 -0
  123. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.4fcecd65bef9e9847609.js.map +1 -0
  124. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_react-dom_client_js-node_modules_aws-amplify_ui-react_dist_styles_css.b43d4249e4d3dac9ad7b.js +7440 -0
  125. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_react-dom_client_js-node_modules_aws-amplify_ui-react_dist_styles_css.b43d4249e4d3dac9ad7b.js.map +1 -0
  126. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.9795f79265ddb416864b.js → mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js +2 -240
  127. mito_ai-0.1.49.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js.map +1 -0
  128. {mito_ai-0.1.33.dist-info → mito_ai-0.1.49.dist-info}/METADATA +5 -2
  129. mito_ai-0.1.49.dist-info/RECORD +205 -0
  130. mito_ai/app_builder/handlers.py +0 -218
  131. mito_ai/tests/providers_test.py +0 -438
  132. mito_ai/tests/test_anthropic_client.py +0 -270
  133. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.281f4b9af60d620c6fb1.js.map +0 -1
  134. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.4f1d00fd0c58fcc05d8d.js.map +0 -1
  135. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/style_index_js.06083e515de4862df010.js.map +0 -1
  136. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_html2canvas_dist_html2canvas_js.ea47e8c8c906197f8d19.js +0 -7842
  137. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_html2canvas_dist_html2canvas_js.ea47e8c8c906197f8d19.js.map +0 -1
  138. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.9795f79265ddb416864b.js.map +0 -1
  139. mito_ai-0.1.33.dist-info/RECORD +0 -134
  140. {mito_ai-0.1.33.data → mito_ai-0.1.49.data}/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +0 -0
  141. {mito_ai-0.1.33.data → mito_ai-0.1.49.data}/data/share/jupyter/labextensions/mito_ai/static/style.js +0 -0
  142. {mito_ai-0.1.33.data → mito_ai-0.1.49.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js +0 -0
  143. {mito_ai-0.1.33.data → mito_ai-0.1.49.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js.map +0 -0
  144. {mito_ai-0.1.33.dist-info → mito_ai-0.1.49.dist-info}/WHEEL +0 -0
  145. {mito_ai-0.1.33.dist-info → mito_ai-0.1.49.dist-info}/entry_points.txt +0 -0
  146. {mito_ai-0.1.33.dist-info → mito_ai-0.1.49.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style_index_js.5876024bb17dbd6a3ee6.js","mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAC0G;AACjB;AACY;AACK;AAC1G,8BAA8B,mFAA2B,CAAC,4FAAqC;AAC/F,0BAA0B,sFAAiC;AAC3D,0BAA0B,2FAAiC;AAC3D;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,OAAO,mFAAmF,MAAM,QAAQ,MAAM,KAAK,UAAU,YAAY,aAAa,aAAa,cAAc,WAAW,YAAY,aAAa,aAAa,aAAa,cAAc,aAAa,aAAa,aAAa,aAAa,aAAa,aAAa,cAAc,aAAa,aAAa,aAAa,aAAa,aAAa,aAAa,cAAc,aAAa,aAAa,aAAa,aAAa,cAAc,aAAa,aAAa,aAAa,aAAa,aAAa,aAAa,cAAc,aAAa,aAAa,aAAa,aAAa,aAAa,OAAO,KAAK,YAAY,OAAO,KAAK,UAAU,OAAO,YAAY,KAAK,KAAK,YAAY,OAAO,SAAS,YAAY,kUAAkU,gCAAgC,WAAW,uDAAuD,4CAA4C,uDAAuD,uCAAuC,uEAAuE,qEAAqE,kEAAkE,iDAAiD,sDAAsD,2BAA2B,yBAAyB,yBAAyB,yBAAyB,yBAAyB,yBAAyB,yBAAyB,yBAAyB,uBAAuB,uBAAuB,uBAAuB,uBAAuB,uBAAuB,uBAAuB,4BAA4B,0BAA0B,0BAA0B,0BAA0B,0BAA0B,0BAA0B,wBAAwB,wBAAwB,wBAAwB,wBAAwB,wBAAwB,wBAAwB,4BAA4B,0BAA0B,0BAA0B,0BAA0B,0BAA0B,GAAG,iBAAiB,oCAAoC,GAAG,cAAc,oBAAoB,GAAG,ykBAAykB,6BAA6B,GAAG,4IAA4I,6BAA6B,GAAG,mBAAmB;AACzvG;AACA,iEAAe,uBAAuB,EAAC;;;;;;;;;;;;;;;;;;;ACpGvC;AAC0G;AACjB;AACzF,8BAA8B,mFAA2B,CAAC,4FAAqC;AAC/F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,oFAAoF,MAAM,KAAK,UAAU,sNAAsN,mBAAmB,GAAG,qBAAqB;AACjX;AACA,iEAAe,uBAAuB,EAAC;;;;;;;;;;;;;;;;;;;ACfvC;AAC0G;AACjB;AACzF,8BAA8B,mFAA2B,CAAC,4FAAqC;AAC/F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,yFAAyF,MAAM,KAAK,YAAY,aAAa,OAAO,KAAK,YAAY,aAAa,OAAO,KAAK,YAAY,OAAO,KAAK,YAAY,aAAa,OAAO,KAAK,YAAY,OAAO,KAAK,YAAY,OAAO,QAAQ,YAAY,OAAO,KAAK,YAAY,aAAa,aAAa,aAAa,WAAW,YAAY,aAAa,aAAa,OAAO,KAAK,UAAU,YAAY,aAAa,aAAa,OAAO,KAAK,UAAU,MAAM,KAAK,YAAY,OAAO,KAAK,YAAY,yMAAyM,kCAAkC,2CAA2C,GAAG,2DAA2D,8CAA8C,2CAA2C,GAAG,gEAAgE,4CAA4C,GAAG,sEAAsE,kCAAkC,4CAA4C,GAAG,sEAAsE,4CAA4C,GAAG,mEAAmE,iCAAiC,GAAG,sTAAsT,iCAAiC,GAAG,2BAA2B,sBAAsB,yBAAyB,8CAA8C,6CAA6C,eAAe,uCAAuC,qBAAqB,qBAAqB,GAAG,qCAAqC,kBAAkB,wBAAwB,mCAAmC,wBAAwB,GAAG,yCAAyC,gBAAgB,GAAG,2BAA2B,oCAAoC,GAAG,2BAA2B,iCAAiC,GAAG,qBAAqB;AACr3E;AACA,iEAAe,uBAAuB,EAAC;;;;;;;;;;;AC3E1B;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,iDAAiD,qBAAqB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACpFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;;;;;;;;;;ACfa;;AAEb;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACnFa;;AAEb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACjCa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACTa;;AAEb;AACA;AACA,cAAc,KAAwC,GAAG,sBAAiB,GAAG,CAAI;AACjF;AACA;AACA;AACA;AACA;;;;;;;;;;ACTa;;AAEb;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC5Da;;AAEb;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACZA,MAA+F;AAC/F,MAAqF;AACrF,MAA4F;AAC5F,MAA+G;AAC/G,MAAwG;AACxG,MAAwG;AACxG,MAAkG;AAClG;AACA;;AAEA;;AAEA,4BAA4B,qGAAmB;AAC/C,wBAAwB,kHAAa;;AAErC,uBAAuB,uGAAa;AACpC;AACA,iBAAiB,+FAAM;AACvB,6BAA6B,sGAAkB;;AAE/C,aAAa,0GAAG,CAAC,qFAAO;;;;AAI4C;AACpE,OAAO,iEAAe,qFAAO,IAAI,qFAAO,UAAU,qFAAO,mBAAmB,EAAC;;;;;;;;;;;;;AC1B7E;AACA;AACA;AACA;;AAEoB","sources":["webpack://mito_ai/./style/base.css","webpack://mito_ai/./style/icons.css","webpack://mito_ai/./style/statusItem.css","webpack://mito_ai/./node_modules/css-loader/dist/runtime/api.js","webpack://mito_ai/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://mito_ai/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://mito_ai/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://mito_ai/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://mito_ai/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://mito_ai/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://mito_ai/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://mito_ai/./style/base.css?1944","webpack://mito_ai/./style/index.js"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_0___ from \"-!../node_modules/css-loader/dist/cjs.js!./icons.css\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_1___ from \"-!../node_modules/css-loader/dist/cjs.js!./statusItem.css\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_1___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/*\n See the JupyterLab Developer Guide for useful CSS Patterns:\n\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\n*/\n\n:root {\n /* Margins */\n --chat-taskpane-item-indent: 10px;\n --chat-taskpane-item-border-radius: 5px;\n --chat-taskpane-tool-call-horizontal-padding: 10px;\n --chat-context-button-height: 20px;\n\n /* Colors */\n --chat-background-color: var(--jp-layout-color1);\n --chat-user-message-background-color: var(--jp-input-background);\n --chat-user-message-font-color: var(--jp-content-font-color1);\n --chat-assistant-message-font-color: #0e1119;\n --muted-text-color: var(--jp-content-font-color2);\n\n --green-900: #155239;\n --green-800: #1a7741;\n --green-700: #239d58;\n --green-600: #39c172;\n --green-500: #74d99e;\n --green-400: #a8eec1;\n --green-300: #e3fcec;\n\n --red-900: #611818;\n --red-800: #891a1b;\n --red-700: #b82020;\n --red-600: #db3130;\n --red-500: #e46464;\n --red-400: #f5aaaa;\n --red-300: #fce8e8;\n\n --yellow-900: #5c4813;\n --yellow-600: #ffc107;\n --yellow-500: #fae29f;\n --yellow-300: #fde047;\n --yellow-100: #fef9c3;\n\n --grey-900: #222934;\n --grey-800: #5f6b7a;\n --grey-700: #8795a7;\n --grey-500: #b8c4ce;\n --grey-400: #cfd6de;\n --grey-300: #e1e7eb;\n --grey-200: #f8f9fa;\n\n --purple-700: #844af7;\n --purple-600: #9d6cff;\n --purple-500: #ba9bf8;\n --purple-400: #d0b9fe;\n --purple-300: #e9e0fd;\n}\n\n.text-muted {\n color: var(--jp-ui-font-color3);\n}\n\n.text-sm {\n font-size: 12px;\n}\n\n/* \n Jupyter tries to ensure that the cell toolbar does not overlap with the contents of the cell. \n There's some algorithm that adds the class \\`.jp-toolbar-overlap\\` to the cell toolbar \n when it gets too close to the cell contents. \n\n However, we don't want to hide the Accept and Reject toolbar buttons! We always want them to be visible.\n To do this, we change the method for hiding the cell toolbar. Instead of hiding the entire toolbar, \n we hide individual buttons, excluding the Accept and Reject buttons.\n*/\n.jp-toolbar-overlap .jp-cell-toolbar {\n display: flex !important;\n}\n\n.jp-toolbar-overlap\n .jp-cell-toolbar\n > *:not([data-jp-item-name='accept-code']):not(\n [data-jp-item-name='reject-code']\n ) {\n display: none !important;\n}`, \"\",{\"version\":3,\"sources\":[\"webpack://./style/base.css\"],\"names\":[],\"mappings\":\"AAAA;;;EAGE;;AAEF;;;;CAIC;;AAKD;EACE,YAAY;EACZ,iCAAiC;EACjC,uCAAuC;EACvC,kDAAkD;EAClD,kCAAkC;;EAElC,WAAW;EACX,gDAAgD;EAChD,gEAAgE;EAChE,6DAA6D;EAC7D,4CAA4C;EAC5C,iDAAiD;;EAEjD,oBAAoB;EACpB,oBAAoB;EACpB,oBAAoB;EACpB,oBAAoB;EACpB,oBAAoB;EACpB,oBAAoB;EACpB,oBAAoB;;EAEpB,kBAAkB;EAClB,kBAAkB;EAClB,kBAAkB;EAClB,kBAAkB;EAClB,kBAAkB;EAClB,kBAAkB;EAClB,kBAAkB;;EAElB,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;;EAErB,mBAAmB;EACnB,mBAAmB;EACnB,mBAAmB;EACnB,mBAAmB;EACnB,mBAAmB;EACnB,mBAAmB;EACnB,mBAAmB;;EAEnB,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;AACvB;;AAEA;EACE,+BAA+B;AACjC;;AAEA;EACE,eAAe;AACjB;;AAEA;;;;;;;;CAQC;AACD;EACE,wBAAwB;AAC1B;;AAEA;;;;;EAKE,wBAAwB;AAC1B\",\"sourcesContent\":[\"/*\\n * Copyright (c) Saga Inc.\\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\\n */\\n\\n/*\\n See the JupyterLab Developer Guide for useful CSS Patterns:\\n\\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\\n*/\\n\\n@import url('icons.css');\\n@import url('statusItem.css');\\n\\n:root {\\n /* Margins */\\n --chat-taskpane-item-indent: 10px;\\n --chat-taskpane-item-border-radius: 5px;\\n --chat-taskpane-tool-call-horizontal-padding: 10px;\\n --chat-context-button-height: 20px;\\n\\n /* Colors */\\n --chat-background-color: var(--jp-layout-color1);\\n --chat-user-message-background-color: var(--jp-input-background);\\n --chat-user-message-font-color: var(--jp-content-font-color1);\\n --chat-assistant-message-font-color: #0e1119;\\n --muted-text-color: var(--jp-content-font-color2);\\n\\n --green-900: #155239;\\n --green-800: #1a7741;\\n --green-700: #239d58;\\n --green-600: #39c172;\\n --green-500: #74d99e;\\n --green-400: #a8eec1;\\n --green-300: #e3fcec;\\n\\n --red-900: #611818;\\n --red-800: #891a1b;\\n --red-700: #b82020;\\n --red-600: #db3130;\\n --red-500: #e46464;\\n --red-400: #f5aaaa;\\n --red-300: #fce8e8;\\n\\n --yellow-900: #5c4813;\\n --yellow-600: #ffc107;\\n --yellow-500: #fae29f;\\n --yellow-300: #fde047;\\n --yellow-100: #fef9c3;\\n\\n --grey-900: #222934;\\n --grey-800: #5f6b7a;\\n --grey-700: #8795a7;\\n --grey-500: #b8c4ce;\\n --grey-400: #cfd6de;\\n --grey-300: #e1e7eb;\\n --grey-200: #f8f9fa;\\n\\n --purple-700: #844af7;\\n --purple-600: #9d6cff;\\n --purple-500: #ba9bf8;\\n --purple-400: #d0b9fe;\\n --purple-300: #e9e0fd;\\n}\\n\\n.text-muted {\\n color: var(--jp-ui-font-color3);\\n}\\n\\n.text-sm {\\n font-size: 12px;\\n}\\n\\n/* \\n Jupyter tries to ensure that the cell toolbar does not overlap with the contents of the cell. \\n There's some algorithm that adds the class `.jp-toolbar-overlap` to the cell toolbar \\n when it gets too close to the cell contents. \\n\\n However, we don't want to hide the Accept and Reject toolbar buttons! We always want them to be visible.\\n To do this, we change the method for hiding the cell toolbar. Instead of hiding the entire toolbar, \\n we hide individual buttons, excluding the Accept and Reject buttons.\\n*/\\n.jp-toolbar-overlap .jp-cell-toolbar {\\n display: flex !important;\\n}\\n\\n.jp-toolbar-overlap\\n .jp-cell-toolbar\\n > *:not([data-jp-item-name='accept-code']):not(\\n [data-jp-item-name='reject-code']\\n ) {\\n display: none !important;\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.jp-ToolbarButtonComponent > svg[data-icon='lightbulb-icon'] {\n color: #9c6bff;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./style/icons.css\"],\"names\":[],\"mappings\":\"AAAA;;;EAGE;;AAEF;EACE,cAAc;AAChB\",\"sourcesContent\":[\"/*\\n * Copyright (c) Saga Inc.\\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\\n */\\n\\n.jp-ToolbarButtonComponent > svg[data-icon='lightbulb-icon'] {\\n color: #9c6bff;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.mito-ai-status-button.jp-Button.jp-mod-minimal {\n background-color: transparent;\n color: var(--jp-inverse-layout-color2);\n}\n\n.mito-ai-status-button.jp-Button.jp-mod-minimal:hover {\n background-color: var(--jp-layout-color3);\n color: var(--jp-inverse-layout-color1);\n}\n\n.jp-StatusBar-Item.jp-mod-clicked > .mito-ai-status-button {\n color: var(--jp-ui-inverse-font-color1);\n}\n\n.jp-StatusBar-Item.jp-mod-clicked > .mito-ai-status-button:hover {\n background-color: transparent;\n color: var(--jp-ui-inverse-font-color1);\n}\n\n.jp-StatusBar-Item.jp-mod-clicked:hover > .mito-ai-status-button {\n color: var(--jp-ui-inverse-font-color0);\n}\n\n.mito-ai-status-button.jp-Button.jp-mod-minimal.mito-ai-error {\n color: var(--jp-warn-color1);\n}\n\n.mito-ai-status-button.jp-Button.jp-mod-minimal.mito-ai-error:hover,\n.jp-StatusBar-Item.jp-mod-clicked > .mito-ai-status-button.mito-ai-error,\n.jp-StatusBar-Item.jp-mod-clicked > .mito-ai-status-button.mito-ai-error:hover,\n.jp-StatusBar-Item.jp-mod-clicked:hover > .mito-ai-status-button.mito-ai-error {\n color: var(--jp-warn-color2);\n}\n\n.mito-ai-status-popup {\n padding: 4px 12px;\n padding-bottom: 40px;\n background-color: var(--jp-layout-color1);\n box-shadow: var(--jp-toolbar-box-shadow);\n z-index: 2;\n font-size: var(--jp-ui-font-size1);\n min-width: 150px;\n max-width: 300px;\n}\n\n.mito-ai-status-popup-table-row {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n\n.mito-ai-status-popup-table-row > p {\n margin: 4px;\n}\n\n.mito-ai-status-ready {\n color: var(--jp-success-color1);\n}\n\n.mito-ai-status-error {\n color: var(--jp-warn-color1);\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./style/statusItem.css\"],\"names\":[],\"mappings\":\"AAAA;;;EAGE;;AAEF;EACE,6BAA6B;EAC7B,sCAAsC;AACxC;;AAEA;EACE,yCAAyC;EACzC,sCAAsC;AACxC;;AAEA;EACE,uCAAuC;AACzC;;AAEA;EACE,6BAA6B;EAC7B,uCAAuC;AACzC;;AAEA;EACE,uCAAuC;AACzC;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;;;;EAIE,4BAA4B;AAC9B;;AAEA;EACE,iBAAiB;EACjB,oBAAoB;EACpB,yCAAyC;EACzC,wCAAwC;EACxC,UAAU;EACV,kCAAkC;EAClC,gBAAgB;EAChB,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,mBAAmB;AACrB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,+BAA+B;AACjC;;AAEA;EACE,4BAA4B;AAC9B\",\"sourcesContent\":[\"/*\\n * Copyright (c) Saga Inc.\\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\\n */\\n\\n.mito-ai-status-button.jp-Button.jp-mod-minimal {\\n background-color: transparent;\\n color: var(--jp-inverse-layout-color2);\\n}\\n\\n.mito-ai-status-button.jp-Button.jp-mod-minimal:hover {\\n background-color: var(--jp-layout-color3);\\n color: var(--jp-inverse-layout-color1);\\n}\\n\\n.jp-StatusBar-Item.jp-mod-clicked > .mito-ai-status-button {\\n color: var(--jp-ui-inverse-font-color1);\\n}\\n\\n.jp-StatusBar-Item.jp-mod-clicked > .mito-ai-status-button:hover {\\n background-color: transparent;\\n color: var(--jp-ui-inverse-font-color1);\\n}\\n\\n.jp-StatusBar-Item.jp-mod-clicked:hover > .mito-ai-status-button {\\n color: var(--jp-ui-inverse-font-color0);\\n}\\n\\n.mito-ai-status-button.jp-Button.jp-mod-minimal.mito-ai-error {\\n color: var(--jp-warn-color1);\\n}\\n\\n.mito-ai-status-button.jp-Button.jp-mod-minimal.mito-ai-error:hover,\\n.jp-StatusBar-Item.jp-mod-clicked > .mito-ai-status-button.mito-ai-error,\\n.jp-StatusBar-Item.jp-mod-clicked > .mito-ai-status-button.mito-ai-error:hover,\\n.jp-StatusBar-Item.jp-mod-clicked:hover > .mito-ai-status-button.mito-ai-error {\\n color: var(--jp-warn-color2);\\n}\\n\\n.mito-ai-status-popup {\\n padding: 4px 12px;\\n padding-bottom: 40px;\\n background-color: var(--jp-layout-color1);\\n box-shadow: var(--jp-toolbar-box-shadow);\\n z-index: 2;\\n font-size: var(--jp-ui-font-size1);\\n min-width: 150px;\\n max-width: 300px;\\n}\\n\\n.mito-ai-status-popup-table-row {\\n display: flex;\\n flex-direction: row;\\n justify-content: space-between;\\n align-items: center;\\n}\\n\\n.mito-ai-status-popup-table-row > p {\\n margin: 4px;\\n}\\n\\n.mito-ai-status-ready {\\n color: var(--jp-success-color1);\\n}\\n\\n.mito-ai-status-error {\\n color: var(--jp-warn-color1);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","\n import API from \"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/css-loader/dist/cjs.js!./base.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/css-loader/dist/cjs.js!./base.css\";\n export default content && content.locals ? content.locals : undefined;\n","/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\nimport './base.css';\n"],"names":[],"sourceRoot":""}
@@ -0,0 +1,533 @@
1
+ "use strict";
2
+ (self["webpackChunkmito_ai"] = self["webpackChunkmito_ai"] || []).push([["vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_apis_signOut_mjs-node_module-75790d"],{
3
+
4
+ /***/ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createGlobalSignOutClient.mjs":
5
+ /*!*******************************************************************************************************************************************!*\
6
+ !*** ./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createGlobalSignOutClient.mjs ***!
7
+ \*******************************************************************************************************************************************/
8
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
+
10
+ __webpack_require__.r(__webpack_exports__);
11
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12
+ /* harmony export */ createGlobalSignOutClient: () => (/* binding */ createGlobalSignOutClient)
13
+ /* harmony export */ });
14
+ /* harmony import */ var _aws_amplify_core_internals_aws_client_utils_composers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core/internals/aws-client-utils/composers */ "./node_modules/@aws-amplify/core/dist/esm/clients/internal/composeServiceApi.mjs");
15
+ /* harmony import */ var _shared_handler_cognitoUserPoolTransferHandler_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shared/handler/cognitoUserPoolTransferHandler.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs");
16
+ /* harmony import */ var _shared_serde_createUserPoolSerializer_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shared/serde/createUserPoolSerializer.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolSerializer.mjs");
17
+ /* harmony import */ var _shared_serde_createUserPoolDeserializer_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shared/serde/createUserPoolDeserializer.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolDeserializer.mjs");
18
+ /* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs");
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
28
+ // SPDX-License-Identifier: Apache-2.0
29
+ const createGlobalSignOutClient = (config) => (0,_aws_amplify_core_internals_aws_client_utils_composers__WEBPACK_IMPORTED_MODULE_0__.composeServiceApi)(_shared_handler_cognitoUserPoolTransferHandler_mjs__WEBPACK_IMPORTED_MODULE_1__.cognitoUserPoolTransferHandler, (0,_shared_serde_createUserPoolSerializer_mjs__WEBPACK_IMPORTED_MODULE_2__.createUserPoolSerializer)('GlobalSignOut'), (0,_shared_serde_createUserPoolDeserializer_mjs__WEBPACK_IMPORTED_MODULE_3__.createUserPoolDeserializer)(), {
30
+ ..._constants_mjs__WEBPACK_IMPORTED_MODULE_4__.DEFAULT_SERVICE_CLIENT_API_CONFIG,
31
+ ...config,
32
+ });
33
+
34
+
35
+ //# sourceMappingURL=createGlobalSignOutClient.mjs.map
36
+
37
+
38
+ /***/ }),
39
+
40
+ /***/ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createRevokeTokenClient.mjs":
41
+ /*!*****************************************************************************************************************************************!*\
42
+ !*** ./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createRevokeTokenClient.mjs ***!
43
+ \*****************************************************************************************************************************************/
44
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
45
+
46
+ __webpack_require__.r(__webpack_exports__);
47
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
48
+ /* harmony export */ createRevokeTokenClient: () => (/* binding */ createRevokeTokenClient)
49
+ /* harmony export */ });
50
+ /* harmony import */ var _aws_amplify_core_internals_aws_client_utils_composers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core/internals/aws-client-utils/composers */ "./node_modules/@aws-amplify/core/dist/esm/clients/internal/composeServiceApi.mjs");
51
+ /* harmony import */ var _shared_handler_cognitoUserPoolTransferHandler_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shared/handler/cognitoUserPoolTransferHandler.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs");
52
+ /* harmony import */ var _shared_serde_createUserPoolSerializer_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shared/serde/createUserPoolSerializer.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolSerializer.mjs");
53
+ /* harmony import */ var _shared_serde_createUserPoolDeserializer_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shared/serde/createUserPoolDeserializer.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolDeserializer.mjs");
54
+ /* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs");
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
64
+ // SPDX-License-Identifier: Apache-2.0
65
+ const createRevokeTokenClient = (config) => (0,_aws_amplify_core_internals_aws_client_utils_composers__WEBPACK_IMPORTED_MODULE_0__.composeServiceApi)(_shared_handler_cognitoUserPoolTransferHandler_mjs__WEBPACK_IMPORTED_MODULE_1__.cognitoUserPoolTransferHandler, (0,_shared_serde_createUserPoolSerializer_mjs__WEBPACK_IMPORTED_MODULE_2__.createUserPoolSerializer)('RevokeToken'), (0,_shared_serde_createUserPoolDeserializer_mjs__WEBPACK_IMPORTED_MODULE_3__.createUserPoolDeserializer)(), {
66
+ ..._constants_mjs__WEBPACK_IMPORTED_MODULE_4__.DEFAULT_SERVICE_CLIENT_API_CONFIG,
67
+ ...config,
68
+ });
69
+
70
+
71
+ //# sourceMappingURL=createRevokeTokenClient.mjs.map
72
+
73
+
74
+ /***/ }),
75
+
76
+ /***/ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signOut.mjs":
77
+ /*!************************************************************************************!*\
78
+ !*** ./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signOut.mjs ***!
79
+ \************************************************************************************/
80
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
81
+
82
+ __webpack_require__.r(__webpack_exports__);
83
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
84
+ /* harmony export */ signOut: () => (/* binding */ signOut)
85
+ /* harmony export */ });
86
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "./node_modules/@aws-amplify/core/dist/esm/Logger/ConsoleLogger.mjs");
87
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/core */ "./node_modules/@aws-amplify/core/dist/esm/singleton/Amplify.mjs");
88
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @aws-amplify/core */ "./node_modules/@aws-amplify/core/dist/esm/storage/index.mjs");
89
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @aws-amplify/core */ "./node_modules/@aws-amplify/core/dist/esm/singleton/apis/clearCredentials.mjs");
90
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @aws-amplify/core/internals/utils */ "./node_modules/@aws-amplify/core/dist/esm/Hub/index.mjs");
91
+ /* harmony import */ var _aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-amplify/core/internals/utils */ "./node_modules/@aws-amplify/core/dist/esm/singleton/Auth/utils/index.mjs");
92
+ /* harmony import */ var _aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @aws-amplify/core/internals/utils */ "./node_modules/@aws-amplify/core/dist/esm/Platform/types.mjs");
93
+ /* harmony import */ var _utils_getAuthUserAgentValue_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../utils/getAuthUserAgentValue.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/utils/getAuthUserAgentValue.mjs");
94
+ /* harmony import */ var _errors_AuthError_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../errors/AuthError.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/errors/AuthError.mjs");
95
+ /* harmony import */ var _utils_signInWithRedirectStore_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/signInWithRedirectStore.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/signInWithRedirectStore.mjs");
96
+ /* harmony import */ var _tokenProvider_tokenProvider_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../tokenProvider/tokenProvider.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/tokenProvider.mjs");
97
+ /* harmony import */ var _foundation_parsers_regionParsers_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../foundation/parsers/regionParsers.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/parsers/regionParsers.mjs");
98
+ /* harmony import */ var _utils_types_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/types.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/types.mjs");
99
+ /* harmony import */ var _aws_crypto_sha256_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-crypto/sha256-js */ "./node_modules/@aws-crypto/sha256-js/build/module/index.js");
100
+ /* harmony import */ var _utils_oauth_handleOAuthSignOut_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/oauth/handleOAuthSignOut.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/handleOAuthSignOut.mjs");
101
+ /* harmony import */ var _errors_constants_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../errors/constants.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/errors/constants.mjs");
102
+ /* harmony import */ var _foundation_factories_serviceClients_cognitoIdentityProvider_createRevokeTokenClient_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRevokeTokenClient.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createRevokeTokenClient.mjs");
103
+ /* harmony import */ var _foundation_factories_serviceClients_cognitoIdentityProvider_createGlobalSignOutClient_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../foundation/factories/serviceClients/cognitoIdentityProvider/createGlobalSignOutClient.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createGlobalSignOutClient.mjs");
104
+ /* harmony import */ var _factories_createCognitoUserPoolEndpointResolver_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../factories/createCognitoUserPoolEndpointResolver.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs");
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
132
+ // SPDX-License-Identifier: Apache-2.0
133
+ const logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__.ConsoleLogger('Auth');
134
+ /**
135
+ * Signs a user out
136
+ *
137
+ * @param input - The SignOutInput object
138
+ * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.
139
+ */
140
+ async function signOut(input) {
141
+ const cognitoConfig = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__.Amplify.getConfig().Auth?.Cognito;
142
+ (0,_aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_3__.assertTokenProviderConfig)(cognitoConfig);
143
+ if (input?.global) {
144
+ await globalSignOut(cognitoConfig);
145
+ }
146
+ else {
147
+ await clientSignOut(cognitoConfig);
148
+ }
149
+ let hasOAuthConfig;
150
+ try {
151
+ (0,_aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_3__.assertOAuthConfig)(cognitoConfig);
152
+ hasOAuthConfig = true;
153
+ }
154
+ catch (err) {
155
+ hasOAuthConfig = false;
156
+ }
157
+ if (hasOAuthConfig) {
158
+ const oAuthStore = new _utils_signInWithRedirectStore_mjs__WEBPACK_IMPORTED_MODULE_4__.DefaultOAuthStore(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_5__.defaultStorage);
159
+ oAuthStore.setAuthConfig(cognitoConfig);
160
+ const { type } = (await (0,_utils_oauth_handleOAuthSignOut_mjs__WEBPACK_IMPORTED_MODULE_6__.handleOAuthSignOut)(cognitoConfig, oAuthStore, _tokenProvider_tokenProvider_mjs__WEBPACK_IMPORTED_MODULE_7__.tokenOrchestrator, input?.oauth?.redirectUrl)) ?? {};
161
+ if (type === 'error') {
162
+ throw new _errors_AuthError_mjs__WEBPACK_IMPORTED_MODULE_8__.AuthError({
163
+ name: _errors_constants_mjs__WEBPACK_IMPORTED_MODULE_9__.OAUTH_SIGNOUT_EXCEPTION,
164
+ message: `An error occurred when attempting to log out from OAuth provider.`,
165
+ });
166
+ }
167
+ }
168
+ else {
169
+ // complete sign out
170
+ _tokenProvider_tokenProvider_mjs__WEBPACK_IMPORTED_MODULE_7__.tokenOrchestrator.clearTokens();
171
+ await (0,_aws_amplify_core__WEBPACK_IMPORTED_MODULE_10__.clearCredentials)();
172
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_11__.Hub.dispatch('auth', { event: 'signedOut' }, 'Auth', _aws_amplify_core__WEBPACK_IMPORTED_MODULE_11__.AMPLIFY_SYMBOL);
173
+ }
174
+ }
175
+ async function clientSignOut(cognitoConfig) {
176
+ try {
177
+ const { userPoolEndpoint, userPoolId, userPoolClientId } = cognitoConfig;
178
+ const authTokens = await _tokenProvider_tokenProvider_mjs__WEBPACK_IMPORTED_MODULE_7__.tokenOrchestrator.getTokenStore().loadTokens();
179
+ (0,_utils_types_mjs__WEBPACK_IMPORTED_MODULE_12__.assertAuthTokensWithRefreshToken)(authTokens);
180
+ if (isSessionRevocable(authTokens.accessToken)) {
181
+ const revokeToken = (0,_foundation_factories_serviceClients_cognitoIdentityProvider_createRevokeTokenClient_mjs__WEBPACK_IMPORTED_MODULE_13__.createRevokeTokenClient)({
182
+ endpointResolver: (0,_factories_createCognitoUserPoolEndpointResolver_mjs__WEBPACK_IMPORTED_MODULE_14__.createCognitoUserPoolEndpointResolver)({
183
+ endpointOverride: userPoolEndpoint,
184
+ }),
185
+ });
186
+ await revokeToken({
187
+ region: (0,_foundation_parsers_regionParsers_mjs__WEBPACK_IMPORTED_MODULE_15__.getRegionFromUserPoolId)(userPoolId),
188
+ userAgentValue: (0,_utils_getAuthUserAgentValue_mjs__WEBPACK_IMPORTED_MODULE_16__.getAuthUserAgentValue)(_aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_17__.AuthAction.SignOut),
189
+ }, {
190
+ ClientId: userPoolClientId,
191
+ Token: authTokens.refreshToken,
192
+ });
193
+ }
194
+ }
195
+ catch (err) {
196
+ // this shouldn't throw
197
+ logger.debug('Client signOut error caught but will proceed with token removal');
198
+ }
199
+ }
200
+ async function globalSignOut(cognitoConfig) {
201
+ try {
202
+ const { userPoolEndpoint, userPoolId } = cognitoConfig;
203
+ const authTokens = await _tokenProvider_tokenProvider_mjs__WEBPACK_IMPORTED_MODULE_7__.tokenOrchestrator.getTokenStore().loadTokens();
204
+ (0,_utils_types_mjs__WEBPACK_IMPORTED_MODULE_12__.assertAuthTokens)(authTokens);
205
+ const globalSignOutClient = (0,_foundation_factories_serviceClients_cognitoIdentityProvider_createGlobalSignOutClient_mjs__WEBPACK_IMPORTED_MODULE_18__.createGlobalSignOutClient)({
206
+ endpointResolver: (0,_factories_createCognitoUserPoolEndpointResolver_mjs__WEBPACK_IMPORTED_MODULE_14__.createCognitoUserPoolEndpointResolver)({
207
+ endpointOverride: userPoolEndpoint,
208
+ }),
209
+ });
210
+ await globalSignOutClient({
211
+ region: (0,_foundation_parsers_regionParsers_mjs__WEBPACK_IMPORTED_MODULE_15__.getRegionFromUserPoolId)(userPoolId),
212
+ userAgentValue: (0,_utils_getAuthUserAgentValue_mjs__WEBPACK_IMPORTED_MODULE_16__.getAuthUserAgentValue)(_aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_17__.AuthAction.SignOut),
213
+ }, {
214
+ AccessToken: authTokens.accessToken.toString(),
215
+ });
216
+ }
217
+ catch (err) {
218
+ // it should not throw
219
+ logger.debug('Global signOut error caught but will proceed with token removal');
220
+ }
221
+ }
222
+ const isSessionRevocable = (token) => !!token?.payload?.origin_jti;
223
+
224
+
225
+ //# sourceMappingURL=signOut.mjs.map
226
+
227
+
228
+ /***/ }),
229
+
230
+ /***/ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/completeOAuthSignOut.mjs":
231
+ /*!********************************************************************************************************!*\
232
+ !*** ./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/completeOAuthSignOut.mjs ***!
233
+ \********************************************************************************************************/
234
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
235
+
236
+ __webpack_require__.r(__webpack_exports__);
237
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
238
+ /* harmony export */ completeOAuthSignOut: () => (/* binding */ completeOAuthSignOut)
239
+ /* harmony export */ });
240
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "./node_modules/@aws-amplify/core/dist/esm/singleton/apis/clearCredentials.mjs");
241
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/core/internals/utils */ "./node_modules/@aws-amplify/core/dist/esm/Hub/index.mjs");
242
+ /* harmony import */ var _tokenProvider_tokenProvider_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tokenProvider/tokenProvider.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/tokenProvider.mjs");
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
251
+ // SPDX-License-Identifier: Apache-2.0
252
+ const completeOAuthSignOut = async (store) => {
253
+ await store.clearOAuthData();
254
+ _tokenProvider_tokenProvider_mjs__WEBPACK_IMPORTED_MODULE_0__.tokenOrchestrator.clearTokens();
255
+ await (0,_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__.clearCredentials)();
256
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__.Hub.dispatch('auth', { event: 'signedOut' }, 'Auth', _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__.AMPLIFY_SYMBOL);
257
+ };
258
+
259
+
260
+ //# sourceMappingURL=completeOAuthSignOut.mjs.map
261
+
262
+
263
+ /***/ }),
264
+
265
+ /***/ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/getRedirectUrl.mjs":
266
+ /*!**************************************************************************************************!*\
267
+ !*** ./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/getRedirectUrl.mjs ***!
268
+ \**************************************************************************************************/
269
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
270
+
271
+ __webpack_require__.r(__webpack_exports__);
272
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
273
+ /* harmony export */ getRedirectUrl: () => (/* binding */ getRedirectUrl)
274
+ /* harmony export */ });
275
+ /* harmony import */ var _errors_constants_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../errors/constants.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/errors/constants.mjs");
276
+
277
+
278
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
279
+ // SPDX-License-Identifier: Apache-2.0
280
+ /** @internal */
281
+ function getRedirectUrl(redirects, preferredRedirectUrl) {
282
+ if (preferredRedirectUrl) {
283
+ const redirectUrl = redirects?.find(redirect => redirect === preferredRedirectUrl);
284
+ if (!redirectUrl) {
285
+ throw _errors_constants_mjs__WEBPACK_IMPORTED_MODULE_0__.invalidPreferredRedirectUrlException;
286
+ }
287
+ return redirectUrl;
288
+ }
289
+ else {
290
+ const redirectUrlFromTheSameOrigin = redirects?.find(isSameOriginAndPathName) ??
291
+ redirects?.find(isTheSameDomain);
292
+ const redirectUrlFromDifferentOrigin = redirects?.find(isHttps) ?? redirects?.find(isHttp);
293
+ if (redirectUrlFromTheSameOrigin) {
294
+ return redirectUrlFromTheSameOrigin;
295
+ }
296
+ else if (redirectUrlFromDifferentOrigin) {
297
+ throw _errors_constants_mjs__WEBPACK_IMPORTED_MODULE_0__.invalidOriginException;
298
+ }
299
+ throw _errors_constants_mjs__WEBPACK_IMPORTED_MODULE_0__.invalidRedirectException;
300
+ }
301
+ }
302
+ // origin + pathname => https://example.com/app
303
+ const isSameOriginAndPathName = (redirect) => redirect.startsWith(String(window.location.origin + (window.location.pathname || '/')));
304
+ // domain => outlook.live.com, github.com
305
+ const isTheSameDomain = (redirect) => redirect.includes(String(window.location.hostname));
306
+ const isHttp = (redirect) => redirect.startsWith('http://');
307
+ const isHttps = (redirect) => redirect.startsWith('https://');
308
+
309
+
310
+ //# sourceMappingURL=getRedirectUrl.mjs.map
311
+
312
+
313
+ /***/ }),
314
+
315
+ /***/ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/handleOAuthSignOut.mjs":
316
+ /*!******************************************************************************************************!*\
317
+ !*** ./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/handleOAuthSignOut.mjs ***!
318
+ \******************************************************************************************************/
319
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
320
+
321
+ __webpack_require__.r(__webpack_exports__);
322
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
323
+ /* harmony export */ handleOAuthSignOut: () => (/* binding */ handleOAuthSignOut)
324
+ /* harmony export */ });
325
+ /* harmony import */ var _completeOAuthSignOut_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./completeOAuthSignOut.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/completeOAuthSignOut.mjs");
326
+ /* harmony import */ var _oAuthSignOutRedirect_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./oAuthSignOutRedirect.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/oAuthSignOutRedirect.mjs");
327
+
328
+
329
+
330
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
331
+ // SPDX-License-Identifier: Apache-2.0
332
+ const handleOAuthSignOut = async (cognitoConfig, store, tokenOrchestrator, redirectUrl) => {
333
+ const { isOAuthSignIn } = await store.loadOAuthSignIn();
334
+ const oauthMetadata = await tokenOrchestrator.getOAuthMetadata();
335
+ // Clear everything before attempting to visted logout endpoint since the current application
336
+ // state could be wiped away on redirect
337
+ await (0,_completeOAuthSignOut_mjs__WEBPACK_IMPORTED_MODULE_0__.completeOAuthSignOut)(store);
338
+ // The isOAuthSignIn flag is propagated by the oAuthToken store which manages oauth keys in local storage only.
339
+ // These keys are used to determine if a user is in an inflight or signedIn oauth states.
340
+ // However, this behavior represents an issue when 2 apps share the same set of tokens in Cookie storage because the app that didn't
341
+ // start the OAuth will not have access to the oauth keys.
342
+ // A heuristic solution is to add oauth metadata to the tokenOrchestrator which will have access to the underlying
343
+ // storage mechanism that is used by Amplify.
344
+ if (isOAuthSignIn || oauthMetadata?.oauthSignIn) {
345
+ // On web, this will always end up being a void action
346
+ return (0,_oAuthSignOutRedirect_mjs__WEBPACK_IMPORTED_MODULE_1__.oAuthSignOutRedirect)(cognitoConfig, false, redirectUrl);
347
+ }
348
+ };
349
+
350
+
351
+ //# sourceMappingURL=handleOAuthSignOut.mjs.map
352
+
353
+
354
+ /***/ }),
355
+
356
+ /***/ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/oAuthSignOutRedirect.mjs":
357
+ /*!********************************************************************************************************!*\
358
+ !*** ./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/oAuthSignOutRedirect.mjs ***!
359
+ \********************************************************************************************************/
360
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
361
+
362
+ __webpack_require__.r(__webpack_exports__);
363
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
364
+ /* harmony export */ oAuthSignOutRedirect: () => (/* binding */ oAuthSignOutRedirect)
365
+ /* harmony export */ });
366
+ /* harmony import */ var _aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core/internals/utils */ "./node_modules/@aws-amplify/core/dist/esm/singleton/Auth/utils/index.mjs");
367
+ /* harmony import */ var _utils_openAuthSession_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../utils/openAuthSession.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/utils/openAuthSession.mjs");
368
+ /* harmony import */ var _getRedirectUrl_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getRedirectUrl.mjs */ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/getRedirectUrl.mjs");
369
+
370
+
371
+
372
+
373
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
374
+ // SPDX-License-Identifier: Apache-2.0
375
+ const oAuthSignOutRedirect = async (authConfig, preferPrivateSession = false, redirectUrl) => {
376
+ (0,_aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_0__.assertOAuthConfig)(authConfig);
377
+ const { loginWith, userPoolClientId } = authConfig;
378
+ const { domain, redirectSignOut } = loginWith.oauth;
379
+ const signoutUri = (0,_getRedirectUrl_mjs__WEBPACK_IMPORTED_MODULE_1__.getRedirectUrl)(redirectSignOut, redirectUrl);
380
+ const oAuthLogoutEndpoint = `https://${domain}/logout?${Object.entries({
381
+ client_id: userPoolClientId,
382
+ logout_uri: encodeURIComponent(signoutUri),
383
+ })
384
+ .map(([k, v]) => `${k}=${v}`)
385
+ .join('&')}`;
386
+ return (0,_utils_openAuthSession_mjs__WEBPACK_IMPORTED_MODULE_2__.openAuthSession)(oAuthLogoutEndpoint);
387
+ };
388
+
389
+
390
+ //# sourceMappingURL=oAuthSignOutRedirect.mjs.map
391
+
392
+
393
+ /***/ }),
394
+
395
+ /***/ "./node_modules/@aws-amplify/auth/dist/esm/utils/getAuthUserAgentValue.mjs":
396
+ /*!*********************************************************************************!*\
397
+ !*** ./node_modules/@aws-amplify/auth/dist/esm/utils/getAuthUserAgentValue.mjs ***!
398
+ \*********************************************************************************/
399
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
400
+
401
+ __webpack_require__.r(__webpack_exports__);
402
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
403
+ /* harmony export */ getAuthUserAgentValue: () => (/* binding */ getAuthUserAgentValue)
404
+ /* harmony export */ });
405
+ /* harmony import */ var _aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core/internals/utils */ "./node_modules/@aws-amplify/core/dist/esm/Platform/index.mjs");
406
+ /* harmony import */ var _aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core/internals/utils */ "./node_modules/@aws-amplify/core/dist/esm/Platform/types.mjs");
407
+
408
+
409
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
410
+ // SPDX-License-Identifier: Apache-2.0
411
+ const getAuthUserAgentValue = (action, customUserAgentDetails) => (0,_aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_0__.getAmplifyUserAgent)({
412
+ category: _aws_amplify_core_internals_utils__WEBPACK_IMPORTED_MODULE_1__.Category.Auth,
413
+ action,
414
+ ...customUserAgentDetails,
415
+ });
416
+
417
+
418
+ //# sourceMappingURL=getAuthUserAgentValue.mjs.map
419
+
420
+
421
+ /***/ }),
422
+
423
+ /***/ "./node_modules/@aws-amplify/auth/dist/esm/utils/openAuthSession.mjs":
424
+ /*!***************************************************************************!*\
425
+ !*** ./node_modules/@aws-amplify/auth/dist/esm/utils/openAuthSession.mjs ***!
426
+ \***************************************************************************/
427
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
428
+
429
+ __webpack_require__.r(__webpack_exports__);
430
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
431
+ /* harmony export */ openAuthSession: () => (/* binding */ openAuthSession)
432
+ /* harmony export */ });
433
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
434
+ // SPDX-License-Identifier: Apache-2.0
435
+ const openAuthSession = async (url) => {
436
+ if (!window?.location) {
437
+ return;
438
+ }
439
+ // enforce HTTPS
440
+ window.location.href = url.replace('http://', 'https://');
441
+ };
442
+
443
+
444
+ //# sourceMappingURL=openAuthSession.mjs.map
445
+
446
+
447
+ /***/ }),
448
+
449
+ /***/ "./node_modules/@aws-amplify/core/dist/esm/singleton/apis/clearCredentials.mjs":
450
+ /*!*************************************************************************************!*\
451
+ !*** ./node_modules/@aws-amplify/core/dist/esm/singleton/apis/clearCredentials.mjs ***!
452
+ \*************************************************************************************/
453
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
454
+
455
+ __webpack_require__.r(__webpack_exports__);
456
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
457
+ /* harmony export */ clearCredentials: () => (/* binding */ clearCredentials)
458
+ /* harmony export */ });
459
+ /* harmony import */ var _Amplify_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Amplify.mjs */ "./node_modules/@aws-amplify/core/dist/esm/singleton/Amplify.mjs");
460
+
461
+
462
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
463
+ // SPDX-License-Identifier: Apache-2.0
464
+ function clearCredentials() {
465
+ return _Amplify_mjs__WEBPACK_IMPORTED_MODULE_0__.Amplify.Auth.clearCredentials();
466
+ }
467
+
468
+
469
+ //# sourceMappingURL=clearCredentials.mjs.map
470
+
471
+
472
+ /***/ }),
473
+
474
+ /***/ "./node_modules/@aws-amplify/core/dist/esm/singleton/apis/fetchAuthSession.mjs":
475
+ /*!*************************************************************************************!*\
476
+ !*** ./node_modules/@aws-amplify/core/dist/esm/singleton/apis/fetchAuthSession.mjs ***!
477
+ \*************************************************************************************/
478
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
479
+
480
+ __webpack_require__.r(__webpack_exports__);
481
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
482
+ /* harmony export */ fetchAuthSession: () => (/* binding */ fetchAuthSession)
483
+ /* harmony export */ });
484
+ /* harmony import */ var _Amplify_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Amplify.mjs */ "./node_modules/@aws-amplify/core/dist/esm/singleton/Amplify.mjs");
485
+ /* harmony import */ var _internal_fetchAuthSession_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/fetchAuthSession.mjs */ "./node_modules/@aws-amplify/core/dist/esm/singleton/apis/internal/fetchAuthSession.mjs");
486
+
487
+
488
+
489
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
490
+ // SPDX-License-Identifier: Apache-2.0
491
+ /**
492
+ * Fetch the auth session including the tokens and credentials if they are available. By default it
493
+ * will automatically refresh expired auth tokens if a valid refresh token is present. You can force a refresh
494
+ * of non-expired tokens with `{ forceRefresh: true }` input.
495
+ *
496
+ * @param options - Options configuring the fetch behavior.
497
+ * @throws {@link AuthError} - Throws error when session information cannot be refreshed.
498
+ * @returns Promise<AuthSession>
499
+ */
500
+ const fetchAuthSession = (options) => {
501
+ return (0,_internal_fetchAuthSession_mjs__WEBPACK_IMPORTED_MODULE_0__.fetchAuthSession)(_Amplify_mjs__WEBPACK_IMPORTED_MODULE_1__.Amplify, options);
502
+ };
503
+
504
+
505
+ //# sourceMappingURL=fetchAuthSession.mjs.map
506
+
507
+
508
+ /***/ }),
509
+
510
+ /***/ "./node_modules/@aws-amplify/core/dist/esm/singleton/apis/internal/fetchAuthSession.mjs":
511
+ /*!**********************************************************************************************!*\
512
+ !*** ./node_modules/@aws-amplify/core/dist/esm/singleton/apis/internal/fetchAuthSession.mjs ***!
513
+ \**********************************************************************************************/
514
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
515
+
516
+ __webpack_require__.r(__webpack_exports__);
517
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
518
+ /* harmony export */ fetchAuthSession: () => (/* binding */ fetchAuthSession)
519
+ /* harmony export */ });
520
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
521
+ // SPDX-License-Identifier: Apache-2.0
522
+ const fetchAuthSession = (amplify, options) => {
523
+ return amplify.Auth.fetchAuthSession(options);
524
+ };
525
+
526
+
527
+ //# sourceMappingURL=fetchAuthSession.mjs.map
528
+
529
+
530
+ /***/ })
531
+
532
+ }]);
533
+ //# sourceMappingURL=vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_apis_signOut_mjs-node_module-75790d.688c25857e7b81b1740f.js.map