zenml-nightly 0.63.0.dev20240802__py3-none-any.whl → 0.64.0.dev20240810__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 (198) hide show
  1. README.md +1 -1
  2. RELEASE_NOTES.md +79 -0
  3. zenml/VERSION +1 -1
  4. zenml/__init__.py +0 -4
  5. zenml/analytics/enums.py +0 -6
  6. zenml/cli/__init__.py +0 -61
  7. zenml/cli/base.py +1 -1
  8. zenml/cli/web_login.py +8 -0
  9. zenml/client.py +0 -4
  10. zenml/config/build_configuration.py +43 -17
  11. zenml/config/docker_settings.py +80 -57
  12. zenml/config/source.py +58 -0
  13. zenml/constants.py +9 -2
  14. zenml/entrypoints/base_entrypoint_configuration.py +53 -8
  15. zenml/enums.py +1 -1
  16. zenml/environment.py +25 -9
  17. zenml/image_builders/base_image_builder.py +1 -1
  18. zenml/image_builders/build_context.py +25 -72
  19. zenml/integrations/azure/__init__.py +4 -0
  20. zenml/integrations/azure/flavors/__init__.py +11 -0
  21. zenml/integrations/azure/flavors/azureml_orchestrator_flavor.py +263 -0
  22. zenml/{_hub → integrations/azure/orchestrators}/__init__.py +7 -2
  23. zenml/integrations/azure/orchestrators/azureml_orchestrator.py +544 -0
  24. zenml/integrations/azure/orchestrators/azureml_orchestrator_entrypoint_config.py +86 -0
  25. zenml/integrations/azure/step_operators/azureml_step_operator.py +3 -0
  26. zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +9 -0
  27. zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +7 -2
  28. zenml/integrations/gcp/service_connectors/gcp_service_connector.py +123 -6
  29. zenml/integrations/kaniko/image_builders/kaniko_image_builder.py +1 -1
  30. zenml/integrations/mlflow/__init__.py +1 -1
  31. zenml/integrations/mlflow/experiment_trackers/mlflow_experiment_tracker.py +3 -1
  32. zenml/integrations/mlflow/flavors/mlflow_experiment_tracker_flavor.py +3 -0
  33. zenml/logger.py +13 -0
  34. zenml/models/__init__.py +0 -12
  35. zenml/models/v2/core/pipeline_deployment.py +21 -29
  36. zenml/models/v2/core/pipeline_run.py +13 -0
  37. zenml/models/v2/core/server_settings.py +12 -0
  38. zenml/models/v2/core/user.py +0 -21
  39. zenml/models/v2/misc/server_models.py +7 -1
  40. zenml/models/v2/misc/user_auth.py +0 -7
  41. zenml/new/pipelines/build_utils.py +193 -38
  42. zenml/new/pipelines/code_archive.py +157 -0
  43. zenml/new/pipelines/pipeline.py +29 -2
  44. zenml/new/pipelines/run_utils.py +67 -1
  45. zenml/service_connectors/service_connector_utils.py +14 -0
  46. zenml/stack_deployments/aws_stack_deployment.py +26 -3
  47. zenml/stack_deployments/azure_stack_deployment.py +11 -6
  48. zenml/stack_deployments/gcp_stack_deployment.py +24 -2
  49. zenml/stack_deployments/stack_deployment.py +17 -2
  50. zenml/steps/base_step.py +3 -0
  51. zenml/utils/archivable.py +149 -0
  52. zenml/utils/code_utils.py +244 -0
  53. zenml/utils/notebook_utils.py +122 -0
  54. zenml/utils/pipeline_docker_image_builder.py +3 -96
  55. zenml/utils/source_utils.py +109 -1
  56. zenml/zen_server/dashboard/assets/{404-CI13wQp4.js → 404-CRAA_Lew.js} +1 -1
  57. zenml/zen_server/dashboard/assets/@radix-BXWm7HOa.js +85 -0
  58. zenml/zen_server/dashboard/assets/{@react-router-CO-OsFwI.js → @react-router-l3lMcXA2.js} +1 -1
  59. zenml/zen_server/dashboard/assets/{@reactflow-DIYUhKYX.js → @reactflow-CeVxyqYT.js} +2 -2
  60. zenml/zen_server/dashboard/assets/{@tanstack-k96lU_C-.js → @tanstack-FmcYZMuX.js} +4 -4
  61. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-ErO9aOgK.js +1 -0
  62. zenml/zen_server/dashboard/assets/{AwarenessChannel-BNg5uWgI.js → AwarenessChannel-CLXo5rKM.js} +1 -1
  63. zenml/zen_server/dashboard/assets/{CodeSnippet-Cyp7f4dM.js → CodeSnippet-D0VLxT2A.js} +1 -1
  64. zenml/zen_server/dashboard/assets/{CollapsibleCard-Cu_A9W57.js → CollapsibleCard-BaUPiVg0.js} +1 -1
  65. zenml/zen_server/dashboard/assets/{Commands-DmQwTXjj.js → Commands-JrcZK-3j.js} +1 -1
  66. zenml/zen_server/dashboard/assets/CopyButton-Dbo52T1K.js +2 -0
  67. zenml/zen_server/dashboard/assets/{CsvVizualization-BvqItd-O.js → CsvVizualization-D3kAypDj.js} +3 -3
  68. zenml/zen_server/dashboard/assets/DisplayDate-DizbSeT-.js +1 -0
  69. zenml/zen_server/dashboard/assets/EditSecretDialog-Bd7mFLS4.js +1 -0
  70. zenml/zen_server/dashboard/assets/{EmptyState-BMLnFVlB.js → EmptyState-BHblM39I.js} +1 -1
  71. zenml/zen_server/dashboard/assets/{Error-DbXCTGua.js → Error-C6LeJSER.js} +1 -1
  72. zenml/zen_server/dashboard/assets/{ExecutionStatus-9zM7eaLh.js → ExecutionStatus-jH4OrWBq.js} +1 -1
  73. zenml/zen_server/dashboard/assets/{Helpbox-BIiNc-uH.js → Helpbox-aAB2XP-z.js} +1 -1
  74. zenml/zen_server/dashboard/assets/{Infobox-iv1Nu1A0.js → Infobox-BQ0aty32.js} +1 -1
  75. zenml/zen_server/dashboard/assets/{InlineAvatar-BvBtO2Dp.js → InlineAvatar-DpTLgM3Q.js} +1 -1
  76. zenml/zen_server/dashboard/assets/Lock-CNyJvf2r.js +1 -0
  77. zenml/zen_server/dashboard/assets/{MarkdownVisualization-xp3hhULl.js → MarkdownVisualization-Bajxn0HY.js} +1 -1
  78. zenml/zen_server/dashboard/assets/NumberBox-BmKE0qnO.js +1 -0
  79. zenml/zen_server/dashboard/assets/{PasswordChecker-DUveqlva.js → PasswordChecker-yGGoJSB-.js} +1 -1
  80. zenml/zen_server/dashboard/assets/{ProviderRadio-pSAvrGRS.js → ProviderRadio-BBqkIuTd.js} +1 -1
  81. zenml/zen_server/dashboard/assets/RadioItem-xLhXoiFV.js +1 -0
  82. zenml/zen_server/dashboard/assets/SearchField-C9R0mdaX.js +1 -0
  83. zenml/zen_server/dashboard/assets/{SetPassword-BOxpgh6N.js → SetPassword-52sNxNiO.js} +1 -1
  84. zenml/zen_server/dashboard/assets/{SuccessStep-CTSKN2lp.js → SuccessStep-DlkItqYG.js} +1 -1
  85. zenml/zen_server/dashboard/assets/{Tick-Bnr2TpW6.js → Tick-uxv80Q6a.js} +1 -1
  86. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-BeCeaRW5.js → UpdatePasswordSchemas-oN4G3sKz.js} +1 -1
  87. zenml/zen_server/dashboard/assets/{aws-BgKTfTfx.js → aws-0_3UsPif.js} +1 -1
  88. zenml/zen_server/dashboard/assets/{check-circle-i56092KI.js → check-circle-1_I207rW.js} +1 -1
  89. zenml/zen_server/dashboard/assets/{chevron-down-D_ZlKMqH.js → chevron-down-BpaF8JqM.js} +1 -1
  90. zenml/zen_server/dashboard/assets/{chevron-right-double-CZBOf6JM.js → chevron-right-double-Dk8e2L99.js} +1 -1
  91. zenml/zen_server/dashboard/assets/{cloud-only-qelmY92E.js → cloud-only-BkUuI0lZ.js} +1 -1
  92. zenml/zen_server/dashboard/assets/components-Br2ezRib.js +1 -0
  93. zenml/zen_server/dashboard/assets/{copy-BXNk6BjL.js → copy-f3XGPPxt.js} +1 -1
  94. zenml/zen_server/dashboard/assets/{database-1xWSgZfO.js → database-cXYNX9tt.js} +1 -1
  95. zenml/zen_server/dashboard/assets/{docker-CQMVm_4d.js → docker-8uj__HHK.js} +1 -1
  96. zenml/zen_server/dashboard/assets/{dots-horizontal-BObFzD5l.js → dots-horizontal-sKQlWEni.js} +1 -1
  97. zenml/zen_server/dashboard/assets/edit-C0MVvPD2.js +1 -0
  98. zenml/zen_server/dashboard/assets/{file-text-CqD_iu6l.js → file-text-B9JibxTs.js} +1 -1
  99. zenml/zen_server/dashboard/assets/{help-bu_DgLKI.js → help-FuHlZwn0.js} +1 -1
  100. zenml/zen_server/dashboard/assets/index-Bd1xgUQG.js +1 -0
  101. zenml/zen_server/dashboard/assets/index-DaGknux4.css +1 -0
  102. zenml/zen_server/dashboard/assets/{index-KsTz2dHG.js → index-DhIZtpxB.js} +5 -5
  103. zenml/zen_server/dashboard/assets/{index.esm-CbHNSeVw.js → index.esm-DT4uyn2i.js} +1 -1
  104. zenml/zen_server/dashboard/assets/layout-D6oiSbfd.js +1 -0
  105. zenml/zen_server/dashboard/assets/{login-mutation-DRpbESS7.js → login-mutation-13A_JSVA.js} +1 -1
  106. zenml/zen_server/dashboard/assets/{logs-D8k8BVFf.js → logs-CgeE2vZP.js} +1 -1
  107. zenml/zen_server/dashboard/assets/{not-found-Dfx9hfkf.js → not-found-B0Mmb90p.js} +1 -1
  108. zenml/zen_server/dashboard/assets/{package-ClbU3KUi.js → package-DdkziX79.js} +1 -1
  109. zenml/zen_server/dashboard/assets/page-7-v2OBm-.js +1 -0
  110. zenml/zen_server/dashboard/assets/{page-f3jBVI5Z.js → page-B3ozwdD1.js} +1 -1
  111. zenml/zen_server/dashboard/assets/{page-DYBNGxJt.js → page-BGwA9B1M.js} +1 -1
  112. zenml/zen_server/dashboard/assets/{page-C176KxyB.js → page-BkjAUyTA.js} +1 -1
  113. zenml/zen_server/dashboard/assets/page-BnacgBiy.js +1 -0
  114. zenml/zen_server/dashboard/assets/{page-CzucfYPo.js → page-BxF_KMQ3.js} +2 -2
  115. zenml/zen_server/dashboard/assets/page-C4POHC0K.js +1 -0
  116. zenml/zen_server/dashboard/assets/page-C9kudd44.js +9 -0
  117. zenml/zen_server/dashboard/assets/page-CA1j3GpJ.js +1 -0
  118. zenml/zen_server/dashboard/assets/page-CCY6yfmu.js +1 -0
  119. zenml/zen_server/dashboard/assets/page-CgTe7Bme.js +1 -0
  120. zenml/zen_server/dashboard/assets/{page-DtpwnNXq.js → page-Cgn-6v2Y.js} +1 -1
  121. zenml/zen_server/dashboard/assets/page-CxQmQqDw.js +1 -0
  122. zenml/zen_server/dashboard/assets/page-D2Goey3H.js +1 -0
  123. zenml/zen_server/dashboard/assets/page-DLpOnf7u.js +1 -0
  124. zenml/zen_server/dashboard/assets/{page-DVPxY5fT.js → page-DSTQnBk-.js} +1 -1
  125. zenml/zen_server/dashboard/assets/{page-BoFtUD9H.js → page-DTysUGOy.js} +1 -1
  126. zenml/zen_server/dashboard/assets/{page-p2hLJdS2.js → page-D_EXUFJb.js} +1 -1
  127. zenml/zen_server/dashboard/assets/page-Db15QzsM.js +1 -0
  128. zenml/zen_server/dashboard/assets/{page-Btu39x7k.js → page-DugsjcQ_.js} +1 -1
  129. zenml/zen_server/dashboard/assets/{page-CZe9GEBF.js → page-OFKSPyN7.js} +1 -1
  130. zenml/zen_server/dashboard/assets/{page-CDgZmwxP.js → page-RnG-qhv9.js} +1 -1
  131. zenml/zen_server/dashboard/assets/{page-Cjn97HMv.js → page-T2BtjwPl.js} +1 -1
  132. zenml/zen_server/dashboard/assets/page-TXe1Eo3Z.js +1 -0
  133. zenml/zen_server/dashboard/assets/{page-BxiWdeyg.js → page-YiF_fNbe.js} +1 -1
  134. zenml/zen_server/dashboard/assets/{page-399pVZHU.js → page-hQaiQXfg.js} +1 -1
  135. zenml/zen_server/dashboard/assets/persist-3-5nOJ6m.js +1 -0
  136. zenml/zen_server/dashboard/assets/{play-circle-CNtZKDnW.js → play-circle-XSkLR12B.js} +1 -1
  137. zenml/zen_server/dashboard/assets/{plus-DOeLmm7C.js → plus-FB9-lEq_.js} +1 -1
  138. zenml/zen_server/dashboard/assets/refresh-COb6KYDi.js +1 -0
  139. zenml/zen_server/dashboard/assets/sharedSchema-BoYx_B_L.js +14 -0
  140. zenml/zen_server/dashboard/assets/{stack-detail-query-Ck7j7BP_.js → stack-detail-query-B-US_-wa.js} +1 -1
  141. zenml/zen_server/dashboard/assets/{terminal-By9cErXc.js → terminal-grtjrIEJ.js} +1 -1
  142. zenml/zen_server/dashboard/assets/trash-Cd5CSFqA.js +1 -0
  143. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-f3ZT7psb.js → update-server-settings-mutation-B8GB_ubU.js} +1 -1
  144. zenml/zen_server/dashboard/assets/{url-rGEp5Umh.js → url-hcMJkz8p.js} +1 -1
  145. zenml/zen_server/dashboard/assets/{zod-BtSyGx4C.js → zod-CnykDKJj.js} +1 -1
  146. zenml/zen_server/dashboard/index.html +7 -7
  147. zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
  148. zenml/zen_server/dashboard_legacy/index.html +1 -1
  149. zenml/zen_server/dashboard_legacy/{precache-manifest.2fa6e528a6e7447caaf35dadfe7514bb.js → precache-manifest.9c473c96a43298343a7ce1256183123b.js} +4 -4
  150. zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
  151. zenml/zen_server/dashboard_legacy/static/js/{main.4aab7e98.chunk.js → main.463c90b9.chunk.js} +2 -2
  152. zenml/zen_server/dashboard_legacy/static/js/{main.4aab7e98.chunk.js.map → main.463c90b9.chunk.js.map} +1 -1
  153. zenml/zen_server/deploy/helm/Chart.yaml +1 -1
  154. zenml/zen_server/deploy/helm/README.md +2 -2
  155. zenml/zen_server/routers/stack_deployment_endpoints.py +6 -0
  156. zenml/zen_server/routers/users_endpoints.py +0 -7
  157. zenml/zen_server/utils.py +75 -0
  158. zenml/zen_server/zen_server_api.py +52 -1
  159. zenml/zen_stores/base_zen_store.py +7 -1
  160. zenml/zen_stores/migrations/versions/0.64.0_release.py +23 -0
  161. zenml/zen_stores/migrations/versions/026d4577b6a0_add_code_path.py +39 -0
  162. zenml/zen_stores/migrations/versions/3dcc5d20e82f_add_last_user_activity.py +51 -0
  163. zenml/zen_stores/migrations/versions/909550c7c4da_remove_user_hub_token.py +36 -0
  164. zenml/zen_stores/rest_zen_store.py +5 -3
  165. zenml/zen_stores/schemas/pipeline_deployment_schemas.py +3 -0
  166. zenml/zen_stores/schemas/pipeline_run_schemas.py +3 -0
  167. zenml/zen_stores/schemas/server_settings_schemas.py +2 -0
  168. zenml/zen_stores/schemas/user_schemas.py +0 -2
  169. zenml/zen_stores/sql_zen_store.py +25 -1
  170. {zenml_nightly-0.63.0.dev20240802.dist-info → zenml_nightly-0.64.0.dev20240810.dist-info}/METADATA +2 -2
  171. {zenml_nightly-0.63.0.dev20240802.dist-info → zenml_nightly-0.64.0.dev20240810.dist-info}/RECORD +174 -157
  172. zenml/_hub/client.py +0 -289
  173. zenml/_hub/constants.py +0 -21
  174. zenml/_hub/utils.py +0 -79
  175. zenml/cli/hub.py +0 -1116
  176. zenml/models/v2/misc/hub_plugin_models.py +0 -79
  177. zenml/zen_server/dashboard/assets/@radix-CFOkMR_E.js +0 -85
  178. zenml/zen_server/dashboard/assets/CopyButton-B3sWVJ4Z.js +0 -2
  179. zenml/zen_server/dashboard/assets/DisplayDate-DYgIjlDF.js +0 -1
  180. zenml/zen_server/dashboard/assets/SearchField-CXoBknpt.js +0 -1
  181. zenml/zen_server/dashboard/assets/components-DWe4cTjS.js +0 -1
  182. zenml/zen_server/dashboard/assets/index-vfjX_fJV.css +0 -1
  183. zenml/zen_server/dashboard/assets/page-C6tXXjnK.js +0 -1
  184. zenml/zen_server/dashboard/assets/page-CP9obrnG.js +0 -1
  185. zenml/zen_server/dashboard/assets/page-CaTOsNNw.js +0 -1
  186. zenml/zen_server/dashboard/assets/page-CmXmB_5i.js +0 -1
  187. zenml/zen_server/dashboard/assets/page-CvGAOfad.js +0 -1
  188. zenml/zen_server/dashboard/assets/page-D0bbc-qr.js +0 -5
  189. zenml/zen_server/dashboard/assets/page-DLEtD2ex.js +0 -1
  190. zenml/zen_server/dashboard/assets/page-DupV0aBd.js +0 -1
  191. zenml/zen_server/dashboard/assets/page-EweAR81y.js +0 -1
  192. zenml/zen_server/dashboard/assets/page-w-YaL77M.js +0 -9
  193. zenml/zen_server/dashboard/assets/persist-BReKApOc.js +0 -14
  194. zenml/zen_server/dashboard/assets/secrets-video-OBJ6irhH.svg +0 -21
  195. zenml/zen_server/dashboard/assets/stacks-video-7gfxpAq4.svg +0 -21
  196. {zenml_nightly-0.63.0.dev20240802.dist-info → zenml_nightly-0.64.0.dev20240810.dist-info}/LICENSE +0 -0
  197. {zenml_nightly-0.63.0.dev20240802.dist-info → zenml_nightly-0.64.0.dev20240810.dist-info}/WHEEL +0 -0
  198. {zenml_nightly-0.63.0.dev20240802.dist-info → zenml_nightly-0.64.0.dev20240810.dist-info}/entry_points.txt +0 -0
@@ -1 +1 @@
1
- import{b as A}from"./@radix-CFOkMR_E.js";var he=e=>e.type==="checkbox",ne=e=>e instanceof Date,P=e=>e==null;const cr=e=>typeof e=="object";var M=e=>!P(e)&&!Array.isArray(e)&&cr(e)&&!ne(e),fr=e=>M(e)&&e.target?he(e.target)?e.target.checked:e.target.value:e,Ur=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dr=(e,s)=>e.has(Ur(s)),Tr=e=>{const s=e.constructor&&e.constructor.prototype;return M(s)&&s.hasOwnProperty("isPrototypeOf")},He=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function L(e){let s;const r=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(He&&(e instanceof Blob||e instanceof FileList))&&(r||M(e)))if(s=r?[]:{},!r&&!Tr(e))s=e;else for(const i in e)e.hasOwnProperty(i)&&(s[i]=L(e[i]));else return e;return s}var oe=e=>Array.isArray(e)?e.filter(Boolean):[],E=e=>e===void 0,c=(e,s,r)=>{if(!s||!M(e))return r;const i=oe(s.split(/[,[\].]+?/)).reduce((u,n)=>P(u)?u:u[n],e);return E(i)||i===e?E(e[s])?r:e[s]:i},Z=e=>typeof e=="boolean",$e=e=>/^\w*$/.test(e),yr=e=>oe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),k=(e,s,r)=>{let i=-1;const u=$e(s)?[s]:yr(s),n=u.length,y=n-1;for(;++i<n;){const _=u[i];let F=r;if(i!==y){const R=e[_];F=M(R)||Array.isArray(R)?R:isNaN(+u[i+1])?{}:[]}if(_==="__proto__")return;e[_]=F,e=e[_]}return e};const Fe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},G={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},re={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},gr=A.createContext(null),Se=()=>A.useContext(gr),Zr=e=>{const{children:s,...r}=e;return A.createElement(gr.Provider,{value:r},s)};var _r=(e,s,r,i=!0)=>{const u={defaultValues:s._defaultValues};for(const n in e)Object.defineProperty(u,n,{get:()=>{const y=n;return s._proxyFormState[y]!==G.all&&(s._proxyFormState[y]=!i||G.all),r&&(r[y]=!0),e[y]}});return u},j=e=>M(e)&&!Object.keys(e).length,hr=(e,s,r,i)=>{r(e);const{name:u,...n}=e;return j(n)||Object.keys(n).length>=Object.keys(s).length||Object.keys(n).find(y=>s[y]===(!i||G.all))},q=e=>Array.isArray(e)?e:[e],vr=(e,s,r)=>!e||!s||e===s||q(e).some(i=>i&&(r?i===s:i.startsWith(s)||s.startsWith(i)));function we(e){const s=A.useRef(e);s.current=e,A.useEffect(()=>{const r=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function Lr(e){const s=Se(),{control:r=s.control,disabled:i,name:u,exact:n}=e||{},[y,_]=A.useState(r._formState),F=A.useRef(!0),R=A.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),m=A.useRef(u);return m.current=u,we({disabled:i,next:b=>F.current&&vr(m.current,b.name,n)&&hr(b,R.current,r._updateFormState)&&_({...r._formState,...b}),subject:r._subjects.state}),A.useEffect(()=>(F.current=!0,R.current.isValid&&r._updateValid(!0),()=>{F.current=!1}),[r]),_r(y,r,R.current,!1)}var ee=e=>typeof e=="string",br=(e,s,r,i,u)=>ee(e)?(i&&s.watch.add(e),c(r,e,u)):Array.isArray(e)?e.map(n=>(i&&s.watch.add(n),c(r,n))):(i&&(s.watchAll=!0),r);function Mr(e){const s=Se(),{control:r=s.control,name:i,defaultValue:u,disabled:n,exact:y}=e||{},_=A.useRef(i);_.current=i,we({disabled:n,subject:r._subjects.values,next:m=>{vr(_.current,m.name,y)&&R(L(br(_.current,r._names,m.values||r._formValues,!1,u)))}});const[F,R]=A.useState(r._getWatch(i,u));return A.useEffect(()=>r._removeUnmounted()),F}function Br(e){const s=Se(),{name:r,disabled:i,control:u=s.control,shouldUnregister:n}=e,y=dr(u._names.array,r),_=Mr({control:u,name:r,defaultValue:c(u._formValues,r,c(u._defaultValues,r,e.defaultValue)),exact:!0}),F=Lr({control:u,name:r}),R=A.useRef(u.register(r,{...e.rules,value:_,...Z(e.disabled)?{disabled:e.disabled}:{}}));return A.useEffect(()=>{const m=u._options.shouldUnregister||n,b=(D,H)=>{const B=c(u._fields,D);B&&(B._f.mount=H)};if(b(r,!0),m){const D=L(c(u._options.defaultValues,r));k(u._defaultValues,r,D),E(c(u._formValues,r))&&k(u._formValues,r,D)}return()=>{(y?m&&!u._state.action:m)?u.unregister(r):b(r,!1)}},[r,u,y,n]),A.useEffect(()=>{c(u._fields,r)&&u._updateDisabledField({disabled:i,fields:u._fields,name:r,value:c(u._fields,r)._f.value})},[i,r,u]),{field:{name:r,value:_,...Z(i)||F.disabled?{disabled:F.disabled||i}:{},onChange:A.useCallback(m=>R.current.onChange({target:{value:fr(m),name:r},type:Fe.CHANGE}),[r]),onBlur:A.useCallback(()=>R.current.onBlur({target:{value:c(u._formValues,r),name:r},type:Fe.BLUR}),[r,u]),ref:m=>{const b=c(u._fields,r);b&&m&&(b._f.ref={focus:()=>m.focus(),select:()=>m.select(),setCustomValidity:D=>m.setCustomValidity(D),reportValidity:()=>m.reportValidity()})}},formState:F,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!c(F.errors,r)},isDirty:{enumerable:!0,get:()=>!!c(F.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!c(F.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!c(F.validatingFields,r)},error:{enumerable:!0,get:()=>c(F.errors,r)}})}}const et=e=>e.render(Br(e));var Ir=(e,s,r,i,u)=>s?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:u||!0}}:{},te=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{const r=(Math.random()*16+e)%16|0;return(s=="x"?r:r&3|8).toString(16)})},Re=(e,s,r={})=>r.shouldFocus||E(r.shouldFocus)?r.focusName||`${e}.${E(r.focusIndex)?s:r.focusIndex}.`:"",_e=e=>({isOnSubmit:!e||e===G.onSubmit,isOnBlur:e===G.onBlur,isOnChange:e===G.onChange,isOnAll:e===G.all,isOnTouch:e===G.onTouched}),We=(e,s,r)=>!r&&(s.watchAll||s.watch.has(e)||[...s.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const le=(e,s,r,i)=>{for(const u of r||Object.keys(e)){const n=c(e,u);if(n){const{_f:y,..._}=n;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],u)&&!i)break;if(y.ref&&s(y.ref,y.name)&&!i)break;le(_,s)}else M(_)&&le(_,s)}}};var Ar=(e,s,r)=>{const i=oe(c(e,r));return k(i,"root",s[r]),k(e,r,i),e},Ke=e=>e.type==="file",se=e=>typeof e=="function",me=e=>{if(!He)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},Ae=e=>ee(e),Ge=e=>e.type==="radio",Ve=e=>e instanceof RegExp;const ir={value:!1,isValid:!1},ar={value:!0,isValid:!0};var Fr=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!E(e[0].attributes.value)?E(e[0].value)||e[0].value===""?ar:{value:e[0].value,isValid:!0}:ar:ir}return ir};const ur={isValid:!1,value:null};var mr=e=>Array.isArray(e)?e.reduce((s,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:s,ur):ur;function nr(e,s,r="validate"){if(Ae(e)||Array.isArray(e)&&e.every(Ae)||Z(e)&&!e)return{type:r,message:Ae(e)?e:"",ref:s}}var ue=e=>M(e)&&!Ve(e)?e:{value:e,message:""},qe=async(e,s,r,i,u)=>{const{ref:n,refs:y,required:_,maxLength:F,minLength:R,min:m,max:b,pattern:D,validate:H,name:B,valueAsNumber:ce,mount:X,disabled:Y}=e._f,p=c(s,B);if(!X||Y)return{};const z=y?y[0]:n,J=x=>{i&&z.reportValidity&&(z.setCustomValidity(Z(x)?"":x||""),z.reportValidity())},g={},v=Ge(n),V=he(n),C=v||V,$=(ce||Ke(n))&&E(n.value)&&E(p)||me(n)&&n.value===""||p===""||Array.isArray(p)&&!p.length,N=Ir.bind(null,B,r,g),ve=(x,S,T,I=re.maxLength,Q=re.minLength)=>{const K=x?S:T;g[B]={type:x?I:Q,message:K,ref:n,...N(x?I:Q,K)}};if(u?!Array.isArray(p)||!p.length:_&&(!C&&($||P(p))||Z(p)&&!p||V&&!Fr(y).isValid||v&&!mr(y).isValid)){const{value:x,message:S}=Ae(_)?{value:!!_,message:_}:ue(_);if(x&&(g[B]={type:re.required,message:S,ref:z,...N(re.required,S)},!r))return J(S),g}if(!$&&(!P(m)||!P(b))){let x,S;const T=ue(b),I=ue(m);if(!P(p)&&!isNaN(p)){const Q=n.valueAsNumber||p&&+p;P(T.value)||(x=Q>T.value),P(I.value)||(S=Q<I.value)}else{const Q=n.valueAsDate||new Date(p),K=ye=>new Date(new Date().toDateString()+" "+ye),fe=n.type=="time",de=n.type=="week";ee(T.value)&&p&&(x=fe?K(p)>K(T.value):de?p>T.value:Q>new Date(T.value)),ee(I.value)&&p&&(S=fe?K(p)<K(I.value):de?p<I.value:Q<new Date(I.value))}if((x||S)&&(ve(!!x,T.message,I.message,re.max,re.min),!r))return J(g[B].message),g}if((F||R)&&!$&&(ee(p)||u&&Array.isArray(p))){const x=ue(F),S=ue(R),T=!P(x.value)&&p.length>+x.value,I=!P(S.value)&&p.length<+S.value;if((T||I)&&(ve(T,x.message,S.message),!r))return J(g[B].message),g}if(D&&!$&&ee(p)){const{value:x,message:S}=ue(D);if(Ve(x)&&!p.match(x)&&(g[B]={type:re.pattern,message:S,ref:n,...N(re.pattern,S)},!r))return J(S),g}if(H){if(se(H)){const x=await H(p,s),S=nr(x,z);if(S&&(g[B]={...S,...N(re.validate,S.message)},!r))return J(S.message),g}else if(M(H)){let x={};for(const S in H){if(!j(x)&&!r)break;const T=nr(await H[S](p,s),z,S);T&&(x={...T,...N(S,T.message)},J(T.message),r&&(g[B]=x))}if(!j(x)&&(g[B]={ref:z,...x},!r))return g}}return J(!0),g},Oe=(e,s)=>[...e,...q(s)],Ue=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Te(e,s,r){return[...e.slice(0,s),...q(r),...e.slice(s)]}var Le=(e,s,r)=>Array.isArray(e)?(E(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(s,1)[0]),e):[],Me=(e,s)=>[...q(s),...q(e)];function Nr(e,s){let r=0;const i=[...e];for(const u of s)i.splice(u-r,1),r++;return oe(i).length?i:[]}var Be=(e,s)=>E(s)?[]:Nr(e,q(s).sort((r,i)=>r-i)),Ie=(e,s,r)=>{[e[s],e[r]]=[e[r],e[s]]};function Pr(e,s){const r=s.slice(0,-1).length;let i=0;for(;i<r;)e=E(e)?i++:e[s[i++]];return e}function jr(e){for(const s in e)if(e.hasOwnProperty(s)&&!E(e[s]))return!1;return!0}function U(e,s){const r=Array.isArray(s)?s:$e(s)?[s]:yr(s),i=r.length===1?e:Pr(e,r),u=r.length-1,n=r[u];return i&&delete i[n],u!==0&&(M(i)&&j(i)||Array.isArray(i)&&jr(i))&&U(e,r.slice(0,-1)),e}var lr=(e,s,r)=>(e[s]=r,e);function rt(e){const s=Se(),{control:r=s.control,name:i,keyName:u="id",shouldUnregister:n}=e,[y,_]=A.useState(r._getFieldArray(i)),F=A.useRef(r._getFieldArray(i).map(te)),R=A.useRef(y),m=A.useRef(i),b=A.useRef(!1);m.current=i,R.current=y,r._names.array.add(i),e.rules&&r.register(i,e.rules),we({next:({values:g,name:v})=>{if(v===m.current||!v){const V=c(g,m.current);Array.isArray(V)&&(_(V),F.current=V.map(te))}},subject:r._subjects.array});const D=A.useCallback(g=>{b.current=!0,r._updateFieldArray(i,g)},[r,i]),H=(g,v)=>{const V=q(L(g)),C=Oe(r._getFieldArray(i),V);r._names.focus=Re(i,C.length-1,v),F.current=Oe(F.current,V.map(te)),D(C),_(C),r._updateFieldArray(i,C,Oe,{argA:Ue(g)})},B=(g,v)=>{const V=q(L(g)),C=Me(r._getFieldArray(i),V);r._names.focus=Re(i,0,v),F.current=Me(F.current,V.map(te)),D(C),_(C),r._updateFieldArray(i,C,Me,{argA:Ue(g)})},ce=g=>{const v=Be(r._getFieldArray(i),g);F.current=Be(F.current,g),D(v),_(v),r._updateFieldArray(i,v,Be,{argA:g})},X=(g,v,V)=>{const C=q(L(v)),$=Te(r._getFieldArray(i),g,C);r._names.focus=Re(i,g,V),F.current=Te(F.current,g,C.map(te)),D($),_($),r._updateFieldArray(i,$,Te,{argA:g,argB:Ue(v)})},Y=(g,v)=>{const V=r._getFieldArray(i);Ie(V,g,v),Ie(F.current,g,v),D(V),_(V),r._updateFieldArray(i,V,Ie,{argA:g,argB:v},!1)},p=(g,v)=>{const V=r._getFieldArray(i);Le(V,g,v),Le(F.current,g,v),D(V),_(V),r._updateFieldArray(i,V,Le,{argA:g,argB:v},!1)},z=(g,v)=>{const V=L(v),C=lr(r._getFieldArray(i),g,V);F.current=[...C].map(($,N)=>!$||N===g?te():F.current[N]),D(C),_([...C]),r._updateFieldArray(i,C,lr,{argA:g,argB:V},!0,!1)},J=g=>{const v=q(L(g));F.current=v.map(te),D([...v]),_([...v]),r._updateFieldArray(i,[...v],V=>V,{},!0,!1)};return A.useEffect(()=>{if(r._state.action=!1,We(i,r._names)&&r._subjects.state.next({...r._formState}),b.current&&(!_e(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([i]).then(g=>{const v=c(g.errors,i),V=c(r._formState.errors,i);(V?!v&&V.type||v&&(V.type!==v.type||V.message!==v.message):v&&v.type)&&(v?k(r._formState.errors,i,v):U(r._formState.errors,i),r._subjects.state.next({errors:r._formState.errors}))});else{const g=c(r._fields,i);g&&g._f&&!(_e(r._options.reValidateMode).isOnSubmit&&_e(r._options.mode).isOnSubmit)&&qe(g,r._formValues,r._options.criteriaMode===G.all,r._options.shouldUseNativeValidation,!0).then(v=>!j(v)&&r._subjects.state.next({errors:Ar(r._formState.errors,v,i)}))}r._subjects.values.next({name:i,values:{...r._formValues}}),r._names.focus&&le(r._fields,(g,v)=>{if(r._names.focus&&v.startsWith(r._names.focus)&&g.focus)return g.focus(),1}),r._names.focus="",r._updateValid(),b.current=!1},[y,i,r]),A.useEffect(()=>(!c(r._formValues,i)&&r._updateFieldArray(i),()=>{(r._options.shouldUnregister||n)&&r.unregister(i)}),[i,r,u,n]),{swap:A.useCallback(Y,[D,i,r]),move:A.useCallback(p,[D,i,r]),prepend:A.useCallback(B,[D,i,r]),append:A.useCallback(H,[D,i,r]),remove:A.useCallback(ce,[D,i,r]),insert:A.useCallback(X,[D,i,r]),update:A.useCallback(z,[D,i,r]),replace:A.useCallback(J,[D,i,r]),fields:A.useMemo(()=>y.map((g,v)=>({...g,[u]:F.current[v]||te()})),[y,u])}}var Ne=()=>{let e=[];return{get observers(){return e},next:u=>{for(const n of e)n.next&&n.next(u)},subscribe:u=>(e.push(u),{unsubscribe:()=>{e=e.filter(n=>n!==u)}}),unsubscribe:()=>{e=[]}}},xe=e=>P(e)||!cr(e);function ie(e,s){if(xe(e)||xe(s))return e===s;if(ne(e)&&ne(s))return e.getTime()===s.getTime();const r=Object.keys(e),i=Object.keys(s);if(r.length!==i.length)return!1;for(const u of r){const n=e[u];if(!i.includes(u))return!1;if(u!=="ref"){const y=s[u];if(ne(n)&&ne(y)||M(n)&&M(y)||Array.isArray(n)&&Array.isArray(y)?!ie(n,y):n!==y)return!1}}return!0}var Vr=e=>e.type==="select-multiple",Wr=e=>Ge(e)||he(e),Pe=e=>me(e)&&e.isConnected,xr=e=>{for(const s in e)if(se(e[s]))return!0;return!1};function pe(e,s={}){const r=Array.isArray(e);if(M(e)||r)for(const i in e)Array.isArray(e[i])||M(e[i])&&!xr(e[i])?(s[i]=Array.isArray(e[i])?[]:{},pe(e[i],s[i])):P(e[i])||(s[i]=!0);return s}function pr(e,s,r){const i=Array.isArray(e);if(M(e)||i)for(const u in e)Array.isArray(e[u])||M(e[u])&&!xr(e[u])?E(s)||xe(r[u])?r[u]=Array.isArray(e[u])?pe(e[u],[]):{...pe(e[u])}:pr(e[u],P(s)?{}:s[u],r[u]):r[u]=!ie(e[u],s[u]);return r}var be=(e,s)=>pr(e,s,pe(s)),Sr=(e,{valueAsNumber:s,valueAsDate:r,setValueAs:i})=>E(e)?e:s?e===""?NaN:e&&+e:r&&ee(e)?new Date(e):i?i(e):e;function je(e){const s=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):s.disabled))return Ke(s)?s.files:Ge(s)?mr(e.refs).value:Vr(s)?[...s.selectedOptions].map(({value:r})=>r):he(s)?Fr(e.refs).value:Sr(E(s.value)?e.ref.value:s.value,e)}var qr=(e,s,r,i)=>{const u={};for(const n of e){const y=c(s,n);y&&k(u,n,y._f)}return{criteriaMode:r,names:[...e],fields:u,shouldUseNativeValidation:i}},ge=e=>E(e)?e:Ve(e)?e.source:M(e)?Ve(e.value)?e.value.source:e.value:e,Hr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function or(e,s,r){const i=c(e,r);if(i||$e(r))return{error:i,name:r};const u=r.split(".");for(;u.length;){const n=u.join("."),y=c(s,n),_=c(e,n);if(y&&!Array.isArray(y)&&r!==n)return{name:r};if(_&&_.type)return{name:n,error:_};u.pop()}return{name:r}}var $r=(e,s,r,i,u)=>u.isOnAll?!1:!r&&u.isOnTouch?!(s||e):(r?i.isOnBlur:u.isOnBlur)?!e:(r?i.isOnChange:u.isOnChange)?e:!0,Kr=(e,s)=>!oe(c(e,s)).length&&U(e,s);const Gr={mode:G.onSubmit,reValidateMode:G.onChange,shouldFocusError:!0};function zr(e={}){let s={...Gr,...e},r={submitCount:0,isDirty:!1,isLoading:se(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},i={},u=M(s.defaultValues)||M(s.values)?L(s.defaultValues||s.values)||{}:{},n=s.shouldUnregister?{}:L(u),y={action:!1,mount:!1,watch:!1},_={mount:new Set,unMount:new Set,array:new Set,watch:new Set},F,R=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},b={values:Ne(),array:Ne(),state:Ne()},D=_e(s.mode),H=_e(s.reValidateMode),B=s.criteriaMode===G.all,ce=t=>a=>{clearTimeout(R),R=setTimeout(t,a)},X=async t=>{if(m.isValid||t){const a=s.resolver?j((await C()).errors):await N(i,!0);a!==r.isValid&&b.state.next({isValid:a})}},Y=(t,a)=>{(m.isValidating||m.validatingFields)&&((t||Array.from(_.mount)).forEach(l=>{l&&(a?k(r.validatingFields,l,a):U(r.validatingFields,l))}),b.state.next({validatingFields:r.validatingFields,isValidating:!j(r.validatingFields)}))},p=(t,a=[],l,d,f=!0,o=!0)=>{if(d&&l){if(y.action=!0,o&&Array.isArray(c(i,t))){const h=l(c(i,t),d.argA,d.argB);f&&k(i,t,h)}if(o&&Array.isArray(c(r.errors,t))){const h=l(c(r.errors,t),d.argA,d.argB);f&&k(r.errors,t,h),Kr(r.errors,t)}if(m.touchedFields&&o&&Array.isArray(c(r.touchedFields,t))){const h=l(c(r.touchedFields,t),d.argA,d.argB);f&&k(r.touchedFields,t,h)}m.dirtyFields&&(r.dirtyFields=be(u,n)),b.state.next({name:t,isDirty:x(t,a),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else k(n,t,a)},z=(t,a)=>{k(r.errors,t,a),b.state.next({errors:r.errors})},J=t=>{r.errors=t,b.state.next({errors:r.errors,isValid:!1})},g=(t,a,l,d)=>{const f=c(i,t);if(f){const o=c(n,t,E(l)?c(u,t):l);E(o)||d&&d.defaultChecked||a?k(n,t,a?o:je(f._f)):I(t,o),y.mount&&X()}},v=(t,a,l,d,f)=>{let o=!1,h=!1;const w={name:t},O=!!(c(i,t)&&c(i,t)._f.disabled);if(!l||d){m.isDirty&&(h=r.isDirty,r.isDirty=w.isDirty=x(),o=h!==w.isDirty);const W=O||ie(c(u,t),a);h=!!(!O&&c(r.dirtyFields,t)),W||O?U(r.dirtyFields,t):k(r.dirtyFields,t,!0),w.dirtyFields=r.dirtyFields,o=o||m.dirtyFields&&h!==!W}if(l){const W=c(r.touchedFields,t);W||(k(r.touchedFields,t,l),w.touchedFields=r.touchedFields,o=o||m.touchedFields&&W!==l)}return o&&f&&b.state.next(w),o?w:{}},V=(t,a,l,d)=>{const f=c(r.errors,t),o=m.isValid&&Z(a)&&r.isValid!==a;if(e.delayError&&l?(F=ce(()=>z(t,l)),F(e.delayError)):(clearTimeout(R),F=null,l?k(r.errors,t,l):U(r.errors,t)),(l?!ie(f,l):f)||!j(d)||o){const h={...d,...o&&Z(a)?{isValid:a}:{},errors:r.errors,name:t};r={...r,...h},b.state.next(h)}},C=async t=>{Y(t,!0);const a=await s.resolver(n,s.context,qr(t||_.mount,i,s.criteriaMode,s.shouldUseNativeValidation));return Y(t),a},$=async t=>{const{errors:a}=await C(t);if(t)for(const l of t){const d=c(a,l);d?k(r.errors,l,d):U(r.errors,l)}else r.errors=a;return a},N=async(t,a,l={valid:!0})=>{for(const d in t){const f=t[d];if(f){const{_f:o,...h}=f;if(o){const w=_.array.has(o.name);Y([d],!0);const O=await qe(f,n,B,s.shouldUseNativeValidation&&!a,w);if(Y([d]),O[o.name]&&(l.valid=!1,a))break;!a&&(c(O,o.name)?w?Ar(r.errors,O,o.name):k(r.errors,o.name,O[o.name]):U(r.errors,o.name))}h&&await N(h,a,l)}}return l.valid},ve=()=>{for(const t of _.unMount){const a=c(i,t);a&&(a._f.refs?a._f.refs.every(l=>!Pe(l)):!Pe(a._f.ref))&&De(t)}_.unMount=new Set},x=(t,a)=>(t&&a&&k(n,t,a),!ie(ze(),u)),S=(t,a,l)=>br(t,_,{...y.mount?n:E(a)?u:ee(t)?{[t]:a}:a},l,a),T=t=>oe(c(y.mount?n:u,t,e.shouldUnregister?c(u,t,[]):[])),I=(t,a,l={})=>{const d=c(i,t);let f=a;if(d){const o=d._f;o&&(!o.disabled&&k(n,t,Sr(a,o)),f=me(o.ref)&&P(a)?"":a,Vr(o.ref)?[...o.ref.options].forEach(h=>h.selected=f.includes(h.value)):o.refs?he(o.ref)?o.refs.length>1?o.refs.forEach(h=>(!h.defaultChecked||!h.disabled)&&(h.checked=Array.isArray(f)?!!f.find(w=>w===h.value):f===h.value)):o.refs[0]&&(o.refs[0].checked=!!f):o.refs.forEach(h=>h.checked=h.value===f):Ke(o.ref)?o.ref.value="":(o.ref.value=f,o.ref.type||b.values.next({name:t,values:{...n}})))}(l.shouldDirty||l.shouldTouch)&&v(t,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ye(t)},Q=(t,a,l)=>{for(const d in a){const f=a[d],o=`${t}.${d}`,h=c(i,o);(_.array.has(t)||!xe(f)||h&&!h._f)&&!ne(f)?Q(o,f,l):I(o,f,l)}},K=(t,a,l={})=>{const d=c(i,t),f=_.array.has(t),o=L(a);k(n,t,o),f?(b.array.next({name:t,values:{...n}}),(m.isDirty||m.dirtyFields)&&l.shouldDirty&&b.state.next({name:t,dirtyFields:be(u,n),isDirty:x(t,o)})):d&&!d._f&&!P(o)?Q(t,o,l):I(t,o,l),We(t,_)&&b.state.next({...r}),b.values.next({name:y.mount?t:void 0,values:{...n}})},fe=async t=>{y.mount=!0;const a=t.target;let l=a.name,d=!0;const f=c(i,l),o=()=>a.type?je(f._f):fr(t),h=w=>{d=Number.isNaN(w)||w===c(n,l,w)};if(f){let w,O;const W=o(),ae=t.type===Fe.BLUR||t.type===Fe.FOCUS_OUT,Cr=!Hr(f._f)&&!s.resolver&&!c(r.errors,l)&&!f._f.deps||$r(ae,c(r.touchedFields,l),r.isSubmitted,H,D),Ee=We(l,_,ae);k(n,l,W),ae?(f._f.onBlur&&f._f.onBlur(t),F&&F(0)):f._f.onChange&&f._f.onChange(t);const Ce=v(l,W,ae,!1),Rr=!j(Ce)||Ee;if(!ae&&b.values.next({name:l,type:t.type,values:{...n}}),Cr)return m.isValid&&X(),Rr&&b.state.next({name:l,...Ee?{}:Ce});if(!ae&&Ee&&b.state.next({...r}),s.resolver){const{errors:tr}=await C([l]);if(h(W),d){const Or=or(r.errors,i,l),sr=or(tr,i,Or.name||l);w=sr.error,l=sr.name,O=j(tr)}}else Y([l],!0),w=(await qe(f,n,B,s.shouldUseNativeValidation))[l],Y([l]),h(W),d&&(w?O=!1:m.isValid&&(O=await N(i,!0)));d&&(f._f.deps&&ye(f._f.deps),V(l,O,w,Ce))}},de=(t,a)=>{if(c(r.errors,a)&&t.focus)return t.focus(),1},ye=async(t,a={})=>{let l,d;const f=q(t);if(s.resolver){const o=await $(E(t)?t:f);l=j(o),d=t?!f.some(h=>c(o,h)):l}else t?(d=(await Promise.all(f.map(async o=>{const h=c(i,o);return await N(h&&h._f?{[o]:h}:h)}))).every(Boolean),!(!d&&!r.isValid)&&X()):d=l=await N(i);return b.state.next({...!ee(t)||m.isValid&&l!==r.isValid?{}:{name:t},...s.resolver||!t?{isValid:l}:{},errors:r.errors}),a.shouldFocus&&!d&&le(i,de,t?f:_.mount),d},ze=t=>{const a={...y.mount?n:u};return E(t)?a:ee(t)?c(a,t):t.map(l=>c(a,l))},Je=(t,a)=>({invalid:!!c((a||r).errors,t),isDirty:!!c((a||r).dirtyFields,t),isTouched:!!c((a||r).touchedFields,t),isValidating:!!c((a||r).validatingFields,t),error:c((a||r).errors,t)}),wr=t=>{t&&q(t).forEach(a=>U(r.errors,a)),b.state.next({errors:t?r.errors:{}})},Qe=(t,a,l)=>{const d=(c(i,t,{_f:{}})._f||{}).ref,f=c(r.errors,t)||{},{ref:o,message:h,type:w,...O}=f;k(r.errors,t,{...O,...a,ref:d}),b.state.next({name:t,errors:r.errors,isValid:!1}),l&&l.shouldFocus&&d&&d.focus&&d.focus()},Dr=(t,a)=>se(t)?b.values.subscribe({next:l=>t(S(void 0,a),l)}):S(t,a,!0),De=(t,a={})=>{for(const l of t?q(t):_.mount)_.mount.delete(l),_.array.delete(l),a.keepValue||(U(i,l),U(n,l)),!a.keepError&&U(r.errors,l),!a.keepDirty&&U(r.dirtyFields,l),!a.keepTouched&&U(r.touchedFields,l),!a.keepIsValidating&&U(r.validatingFields,l),!s.shouldUnregister&&!a.keepDefaultValue&&U(u,l);b.values.next({values:{...n}}),b.state.next({...r,...a.keepDirty?{isDirty:x()}:{}}),!a.keepIsValid&&X()},Xe=({disabled:t,name:a,field:l,fields:d,value:f})=>{if(Z(t)&&y.mount||t){const o=t?void 0:E(f)?je(l?l._f:c(d,a)._f):f;k(n,a,o),v(a,o,!1,!1,!0)}},ke=(t,a={})=>{let l=c(i,t);const d=Z(a.disabled);return k(i,t,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:t}},name:t,mount:!0,...a}}),_.mount.add(t),l?Xe({field:l,disabled:a.disabled,name:t,value:a.value}):g(t,!0,a.value),{...d?{disabled:a.disabled}:{},...s.progressive?{required:!!a.required,min:ge(a.min),max:ge(a.max),minLength:ge(a.minLength),maxLength:ge(a.maxLength),pattern:ge(a.pattern)}:{},name:t,onChange:fe,onBlur:fe,ref:f=>{if(f){ke(t,a),l=c(i,t);const o=E(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,h=Wr(o),w=l._f.refs||[];if(h?w.find(O=>O===o):o===l._f.ref)return;k(i,t,{_f:{...l._f,...h?{refs:[...w.filter(Pe),o,...Array.isArray(c(u,t))?[{}]:[]],ref:{type:o.type,name:t}}:{ref:o}}}),g(t,!1,void 0,o)}else l=c(i,t,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||a.shouldUnregister)&&!(dr(_.array,t)&&y.action)&&_.unMount.add(t)}}},Ye=()=>s.shouldFocusError&&le(i,de,_.mount),kr=t=>{Z(t)&&(b.state.next({disabled:t}),le(i,(a,l)=>{const d=c(i,l);d&&(a.disabled=d._f.disabled||t,Array.isArray(d._f.refs)&&d._f.refs.forEach(f=>{f.disabled=d._f.disabled||t}))},0,!1))},Ze=(t,a)=>async l=>{let d;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let f=L(n);if(b.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:h}=await C();r.errors=o,f=h}else await N(i);if(U(r.errors,"root"),j(r.errors)){b.state.next({errors:{}});try{await t(f,l)}catch(o){d=o}}else a&&await a({...r.errors},l),Ye(),setTimeout(Ye);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:j(r.errors)&&!d,submitCount:r.submitCount+1,errors:r.errors}),d)throw d},Er=(t,a={})=>{c(i,t)&&(E(a.defaultValue)?K(t,L(c(u,t))):(K(t,a.defaultValue),k(u,t,L(a.defaultValue))),a.keepTouched||U(r.touchedFields,t),a.keepDirty||(U(r.dirtyFields,t),r.isDirty=a.defaultValue?x(t,L(c(u,t))):x()),a.keepError||(U(r.errors,t),m.isValid&&X()),b.state.next({...r}))},er=(t,a={})=>{const l=t?L(t):u,d=L(l),f=j(t),o=f?u:d;if(a.keepDefaultValues||(u=l),!a.keepValues){if(a.keepDirtyValues)for(const h of _.mount)c(r.dirtyFields,h)?k(o,h,c(n,h)):K(h,c(o,h));else{if(He&&E(t))for(const h of _.mount){const w=c(i,h);if(w&&w._f){const O=Array.isArray(w._f.refs)?w._f.refs[0]:w._f.ref;if(me(O)){const W=O.closest("form");if(W){W.reset();break}}}}i={}}n=e.shouldUnregister?a.keepDefaultValues?L(u):{}:L(o),b.array.next({values:{...o}}),b.values.next({values:{...o}})}_={mount:a.keepDirtyValues?_.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!m.isValid||!!a.keepIsValid||!!a.keepDirtyValues,y.watch=!!e.shouldUnregister,b.state.next({submitCount:a.keepSubmitCount?r.submitCount:0,isDirty:f?!1:a.keepDirty?r.isDirty:!!(a.keepDefaultValues&&!ie(t,u)),isSubmitted:a.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:f?[]:a.keepDirtyValues?a.keepDefaultValues&&n?be(u,n):r.dirtyFields:a.keepDefaultValues&&t?be(u,t):{},touchedFields:a.keepTouched?r.touchedFields:{},errors:a.keepErrors?r.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},rr=(t,a)=>er(se(t)?t(n):t,a);return{control:{register:ke,unregister:De,getFieldState:Je,handleSubmit:Ze,setError:Qe,_executeSchema:C,_getWatch:S,_getDirty:x,_updateValid:X,_removeUnmounted:ve,_updateFieldArray:p,_updateDisabledField:Xe,_getFieldArray:T,_reset:er,_resetDefaultValues:()=>se(s.defaultValues)&&s.defaultValues().then(t=>{rr(t,s.resetOptions),b.state.next({isLoading:!1})}),_updateFormState:t=>{r={...r,...t}},_disableForm:kr,_subjects:b,_proxyFormState:m,_setErrors:J,get _fields(){return i},get _formValues(){return n},get _state(){return y},set _state(t){y=t},get _defaultValues(){return u},get _names(){return _},set _names(t){_=t},get _formState(){return r},set _formState(t){r=t},get _options(){return s},set _options(t){s={...s,...t}}},trigger:ye,register:ke,handleSubmit:Ze,watch:Dr,setValue:K,getValues:ze,reset:rr,resetField:Er,clearErrors:wr,unregister:De,setError:Qe,setFocus:(t,a={})=>{const l=c(i,t),d=l&&l._f;if(d){const f=d.refs?d.refs[0]:d.ref;f.focus&&(f.focus(),a.shouldSelect&&f.select())}},getFieldState:Je}}function tt(e={}){const s=A.useRef(),r=A.useRef(),[i,u]=A.useState({isDirty:!1,isValidating:!1,isLoading:se(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:se(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...zr(e),formState:i});const n=s.current.control;return n._options=e,we({subject:n._subjects.state,next:y=>{hr(y,n._proxyFormState,n._updateFormState,!0)&&u({...n._formState})}}),A.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),A.useEffect(()=>{if(n._proxyFormState.isDirty){const y=n._getDirty();y!==i.isDirty&&n._subjects.state.next({isDirty:y})}},[n,i.isDirty]),A.useEffect(()=>{e.values&&!ie(e.values,r.current)?(n._reset(e.values,n._options.resetOptions),r.current=e.values,u(y=>({...y}))):n._resetDefaultValues()},[e.values,n]),A.useEffect(()=>{e.errors&&n._setErrors(e.errors)},[e.errors,n]),A.useEffect(()=>{n._state.mount||(n._updateValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),A.useEffect(()=>{e.shouldUnregister&&n._subjects.values.next({values:n._getWatch()})},[e.shouldUnregister,n]),s.current.formState=_r(i,n),s.current}export{et as C,Zr as F,Se as a,rt as b,Ir as c,c as g,tt as u};
1
+ import{b as A}from"./@radix-BXWm7HOa.js";var he=e=>e.type==="checkbox",ne=e=>e instanceof Date,P=e=>e==null;const cr=e=>typeof e=="object";var M=e=>!P(e)&&!Array.isArray(e)&&cr(e)&&!ne(e),fr=e=>M(e)&&e.target?he(e.target)?e.target.checked:e.target.value:e,Ur=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dr=(e,s)=>e.has(Ur(s)),Tr=e=>{const s=e.constructor&&e.constructor.prototype;return M(s)&&s.hasOwnProperty("isPrototypeOf")},He=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function L(e){let s;const r=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(He&&(e instanceof Blob||e instanceof FileList))&&(r||M(e)))if(s=r?[]:{},!r&&!Tr(e))s=e;else for(const i in e)e.hasOwnProperty(i)&&(s[i]=L(e[i]));else return e;return s}var oe=e=>Array.isArray(e)?e.filter(Boolean):[],E=e=>e===void 0,c=(e,s,r)=>{if(!s||!M(e))return r;const i=oe(s.split(/[,[\].]+?/)).reduce((u,n)=>P(u)?u:u[n],e);return E(i)||i===e?E(e[s])?r:e[s]:i},Z=e=>typeof e=="boolean",$e=e=>/^\w*$/.test(e),yr=e=>oe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),k=(e,s,r)=>{let i=-1;const u=$e(s)?[s]:yr(s),n=u.length,y=n-1;for(;++i<n;){const _=u[i];let F=r;if(i!==y){const R=e[_];F=M(R)||Array.isArray(R)?R:isNaN(+u[i+1])?{}:[]}if(_==="__proto__")return;e[_]=F,e=e[_]}return e};const Fe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},G={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},re={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},gr=A.createContext(null),Se=()=>A.useContext(gr),Zr=e=>{const{children:s,...r}=e;return A.createElement(gr.Provider,{value:r},s)};var _r=(e,s,r,i=!0)=>{const u={defaultValues:s._defaultValues};for(const n in e)Object.defineProperty(u,n,{get:()=>{const y=n;return s._proxyFormState[y]!==G.all&&(s._proxyFormState[y]=!i||G.all),r&&(r[y]=!0),e[y]}});return u},j=e=>M(e)&&!Object.keys(e).length,hr=(e,s,r,i)=>{r(e);const{name:u,...n}=e;return j(n)||Object.keys(n).length>=Object.keys(s).length||Object.keys(n).find(y=>s[y]===(!i||G.all))},q=e=>Array.isArray(e)?e:[e],vr=(e,s,r)=>!e||!s||e===s||q(e).some(i=>i&&(r?i===s:i.startsWith(s)||s.startsWith(i)));function we(e){const s=A.useRef(e);s.current=e,A.useEffect(()=>{const r=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function Lr(e){const s=Se(),{control:r=s.control,disabled:i,name:u,exact:n}=e||{},[y,_]=A.useState(r._formState),F=A.useRef(!0),R=A.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),m=A.useRef(u);return m.current=u,we({disabled:i,next:b=>F.current&&vr(m.current,b.name,n)&&hr(b,R.current,r._updateFormState)&&_({...r._formState,...b}),subject:r._subjects.state}),A.useEffect(()=>(F.current=!0,R.current.isValid&&r._updateValid(!0),()=>{F.current=!1}),[r]),_r(y,r,R.current,!1)}var ee=e=>typeof e=="string",br=(e,s,r,i,u)=>ee(e)?(i&&s.watch.add(e),c(r,e,u)):Array.isArray(e)?e.map(n=>(i&&s.watch.add(n),c(r,n))):(i&&(s.watchAll=!0),r);function Mr(e){const s=Se(),{control:r=s.control,name:i,defaultValue:u,disabled:n,exact:y}=e||{},_=A.useRef(i);_.current=i,we({disabled:n,subject:r._subjects.values,next:m=>{vr(_.current,m.name,y)&&R(L(br(_.current,r._names,m.values||r._formValues,!1,u)))}});const[F,R]=A.useState(r._getWatch(i,u));return A.useEffect(()=>r._removeUnmounted()),F}function Br(e){const s=Se(),{name:r,disabled:i,control:u=s.control,shouldUnregister:n}=e,y=dr(u._names.array,r),_=Mr({control:u,name:r,defaultValue:c(u._formValues,r,c(u._defaultValues,r,e.defaultValue)),exact:!0}),F=Lr({control:u,name:r}),R=A.useRef(u.register(r,{...e.rules,value:_,...Z(e.disabled)?{disabled:e.disabled}:{}}));return A.useEffect(()=>{const m=u._options.shouldUnregister||n,b=(D,H)=>{const B=c(u._fields,D);B&&(B._f.mount=H)};if(b(r,!0),m){const D=L(c(u._options.defaultValues,r));k(u._defaultValues,r,D),E(c(u._formValues,r))&&k(u._formValues,r,D)}return()=>{(y?m&&!u._state.action:m)?u.unregister(r):b(r,!1)}},[r,u,y,n]),A.useEffect(()=>{c(u._fields,r)&&u._updateDisabledField({disabled:i,fields:u._fields,name:r,value:c(u._fields,r)._f.value})},[i,r,u]),{field:{name:r,value:_,...Z(i)||F.disabled?{disabled:F.disabled||i}:{},onChange:A.useCallback(m=>R.current.onChange({target:{value:fr(m),name:r},type:Fe.CHANGE}),[r]),onBlur:A.useCallback(()=>R.current.onBlur({target:{value:c(u._formValues,r),name:r},type:Fe.BLUR}),[r,u]),ref:m=>{const b=c(u._fields,r);b&&m&&(b._f.ref={focus:()=>m.focus(),select:()=>m.select(),setCustomValidity:D=>m.setCustomValidity(D),reportValidity:()=>m.reportValidity()})}},formState:F,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!c(F.errors,r)},isDirty:{enumerable:!0,get:()=>!!c(F.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!c(F.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!c(F.validatingFields,r)},error:{enumerable:!0,get:()=>c(F.errors,r)}})}}const et=e=>e.render(Br(e));var Ir=(e,s,r,i,u)=>s?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:u||!0}}:{},te=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{const r=(Math.random()*16+e)%16|0;return(s=="x"?r:r&3|8).toString(16)})},Re=(e,s,r={})=>r.shouldFocus||E(r.shouldFocus)?r.focusName||`${e}.${E(r.focusIndex)?s:r.focusIndex}.`:"",_e=e=>({isOnSubmit:!e||e===G.onSubmit,isOnBlur:e===G.onBlur,isOnChange:e===G.onChange,isOnAll:e===G.all,isOnTouch:e===G.onTouched}),We=(e,s,r)=>!r&&(s.watchAll||s.watch.has(e)||[...s.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const le=(e,s,r,i)=>{for(const u of r||Object.keys(e)){const n=c(e,u);if(n){const{_f:y,..._}=n;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],u)&&!i)break;if(y.ref&&s(y.ref,y.name)&&!i)break;le(_,s)}else M(_)&&le(_,s)}}};var Ar=(e,s,r)=>{const i=oe(c(e,r));return k(i,"root",s[r]),k(e,r,i),e},Ke=e=>e.type==="file",se=e=>typeof e=="function",me=e=>{if(!He)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},Ae=e=>ee(e),Ge=e=>e.type==="radio",Ve=e=>e instanceof RegExp;const ir={value:!1,isValid:!1},ar={value:!0,isValid:!0};var Fr=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!E(e[0].attributes.value)?E(e[0].value)||e[0].value===""?ar:{value:e[0].value,isValid:!0}:ar:ir}return ir};const ur={isValid:!1,value:null};var mr=e=>Array.isArray(e)?e.reduce((s,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:s,ur):ur;function nr(e,s,r="validate"){if(Ae(e)||Array.isArray(e)&&e.every(Ae)||Z(e)&&!e)return{type:r,message:Ae(e)?e:"",ref:s}}var ue=e=>M(e)&&!Ve(e)?e:{value:e,message:""},qe=async(e,s,r,i,u)=>{const{ref:n,refs:y,required:_,maxLength:F,minLength:R,min:m,max:b,pattern:D,validate:H,name:B,valueAsNumber:ce,mount:X,disabled:Y}=e._f,p=c(s,B);if(!X||Y)return{};const z=y?y[0]:n,J=x=>{i&&z.reportValidity&&(z.setCustomValidity(Z(x)?"":x||""),z.reportValidity())},g={},v=Ge(n),V=he(n),C=v||V,$=(ce||Ke(n))&&E(n.value)&&E(p)||me(n)&&n.value===""||p===""||Array.isArray(p)&&!p.length,N=Ir.bind(null,B,r,g),ve=(x,S,T,I=re.maxLength,Q=re.minLength)=>{const K=x?S:T;g[B]={type:x?I:Q,message:K,ref:n,...N(x?I:Q,K)}};if(u?!Array.isArray(p)||!p.length:_&&(!C&&($||P(p))||Z(p)&&!p||V&&!Fr(y).isValid||v&&!mr(y).isValid)){const{value:x,message:S}=Ae(_)?{value:!!_,message:_}:ue(_);if(x&&(g[B]={type:re.required,message:S,ref:z,...N(re.required,S)},!r))return J(S),g}if(!$&&(!P(m)||!P(b))){let x,S;const T=ue(b),I=ue(m);if(!P(p)&&!isNaN(p)){const Q=n.valueAsNumber||p&&+p;P(T.value)||(x=Q>T.value),P(I.value)||(S=Q<I.value)}else{const Q=n.valueAsDate||new Date(p),K=ye=>new Date(new Date().toDateString()+" "+ye),fe=n.type=="time",de=n.type=="week";ee(T.value)&&p&&(x=fe?K(p)>K(T.value):de?p>T.value:Q>new Date(T.value)),ee(I.value)&&p&&(S=fe?K(p)<K(I.value):de?p<I.value:Q<new Date(I.value))}if((x||S)&&(ve(!!x,T.message,I.message,re.max,re.min),!r))return J(g[B].message),g}if((F||R)&&!$&&(ee(p)||u&&Array.isArray(p))){const x=ue(F),S=ue(R),T=!P(x.value)&&p.length>+x.value,I=!P(S.value)&&p.length<+S.value;if((T||I)&&(ve(T,x.message,S.message),!r))return J(g[B].message),g}if(D&&!$&&ee(p)){const{value:x,message:S}=ue(D);if(Ve(x)&&!p.match(x)&&(g[B]={type:re.pattern,message:S,ref:n,...N(re.pattern,S)},!r))return J(S),g}if(H){if(se(H)){const x=await H(p,s),S=nr(x,z);if(S&&(g[B]={...S,...N(re.validate,S.message)},!r))return J(S.message),g}else if(M(H)){let x={};for(const S in H){if(!j(x)&&!r)break;const T=nr(await H[S](p,s),z,S);T&&(x={...T,...N(S,T.message)},J(T.message),r&&(g[B]=x))}if(!j(x)&&(g[B]={ref:z,...x},!r))return g}}return J(!0),g},Oe=(e,s)=>[...e,...q(s)],Ue=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Te(e,s,r){return[...e.slice(0,s),...q(r),...e.slice(s)]}var Le=(e,s,r)=>Array.isArray(e)?(E(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(s,1)[0]),e):[],Me=(e,s)=>[...q(s),...q(e)];function Nr(e,s){let r=0;const i=[...e];for(const u of s)i.splice(u-r,1),r++;return oe(i).length?i:[]}var Be=(e,s)=>E(s)?[]:Nr(e,q(s).sort((r,i)=>r-i)),Ie=(e,s,r)=>{[e[s],e[r]]=[e[r],e[s]]};function Pr(e,s){const r=s.slice(0,-1).length;let i=0;for(;i<r;)e=E(e)?i++:e[s[i++]];return e}function jr(e){for(const s in e)if(e.hasOwnProperty(s)&&!E(e[s]))return!1;return!0}function U(e,s){const r=Array.isArray(s)?s:$e(s)?[s]:yr(s),i=r.length===1?e:Pr(e,r),u=r.length-1,n=r[u];return i&&delete i[n],u!==0&&(M(i)&&j(i)||Array.isArray(i)&&jr(i))&&U(e,r.slice(0,-1)),e}var lr=(e,s,r)=>(e[s]=r,e);function rt(e){const s=Se(),{control:r=s.control,name:i,keyName:u="id",shouldUnregister:n}=e,[y,_]=A.useState(r._getFieldArray(i)),F=A.useRef(r._getFieldArray(i).map(te)),R=A.useRef(y),m=A.useRef(i),b=A.useRef(!1);m.current=i,R.current=y,r._names.array.add(i),e.rules&&r.register(i,e.rules),we({next:({values:g,name:v})=>{if(v===m.current||!v){const V=c(g,m.current);Array.isArray(V)&&(_(V),F.current=V.map(te))}},subject:r._subjects.array});const D=A.useCallback(g=>{b.current=!0,r._updateFieldArray(i,g)},[r,i]),H=(g,v)=>{const V=q(L(g)),C=Oe(r._getFieldArray(i),V);r._names.focus=Re(i,C.length-1,v),F.current=Oe(F.current,V.map(te)),D(C),_(C),r._updateFieldArray(i,C,Oe,{argA:Ue(g)})},B=(g,v)=>{const V=q(L(g)),C=Me(r._getFieldArray(i),V);r._names.focus=Re(i,0,v),F.current=Me(F.current,V.map(te)),D(C),_(C),r._updateFieldArray(i,C,Me,{argA:Ue(g)})},ce=g=>{const v=Be(r._getFieldArray(i),g);F.current=Be(F.current,g),D(v),_(v),r._updateFieldArray(i,v,Be,{argA:g})},X=(g,v,V)=>{const C=q(L(v)),$=Te(r._getFieldArray(i),g,C);r._names.focus=Re(i,g,V),F.current=Te(F.current,g,C.map(te)),D($),_($),r._updateFieldArray(i,$,Te,{argA:g,argB:Ue(v)})},Y=(g,v)=>{const V=r._getFieldArray(i);Ie(V,g,v),Ie(F.current,g,v),D(V),_(V),r._updateFieldArray(i,V,Ie,{argA:g,argB:v},!1)},p=(g,v)=>{const V=r._getFieldArray(i);Le(V,g,v),Le(F.current,g,v),D(V),_(V),r._updateFieldArray(i,V,Le,{argA:g,argB:v},!1)},z=(g,v)=>{const V=L(v),C=lr(r._getFieldArray(i),g,V);F.current=[...C].map(($,N)=>!$||N===g?te():F.current[N]),D(C),_([...C]),r._updateFieldArray(i,C,lr,{argA:g,argB:V},!0,!1)},J=g=>{const v=q(L(g));F.current=v.map(te),D([...v]),_([...v]),r._updateFieldArray(i,[...v],V=>V,{},!0,!1)};return A.useEffect(()=>{if(r._state.action=!1,We(i,r._names)&&r._subjects.state.next({...r._formState}),b.current&&(!_e(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([i]).then(g=>{const v=c(g.errors,i),V=c(r._formState.errors,i);(V?!v&&V.type||v&&(V.type!==v.type||V.message!==v.message):v&&v.type)&&(v?k(r._formState.errors,i,v):U(r._formState.errors,i),r._subjects.state.next({errors:r._formState.errors}))});else{const g=c(r._fields,i);g&&g._f&&!(_e(r._options.reValidateMode).isOnSubmit&&_e(r._options.mode).isOnSubmit)&&qe(g,r._formValues,r._options.criteriaMode===G.all,r._options.shouldUseNativeValidation,!0).then(v=>!j(v)&&r._subjects.state.next({errors:Ar(r._formState.errors,v,i)}))}r._subjects.values.next({name:i,values:{...r._formValues}}),r._names.focus&&le(r._fields,(g,v)=>{if(r._names.focus&&v.startsWith(r._names.focus)&&g.focus)return g.focus(),1}),r._names.focus="",r._updateValid(),b.current=!1},[y,i,r]),A.useEffect(()=>(!c(r._formValues,i)&&r._updateFieldArray(i),()=>{(r._options.shouldUnregister||n)&&r.unregister(i)}),[i,r,u,n]),{swap:A.useCallback(Y,[D,i,r]),move:A.useCallback(p,[D,i,r]),prepend:A.useCallback(B,[D,i,r]),append:A.useCallback(H,[D,i,r]),remove:A.useCallback(ce,[D,i,r]),insert:A.useCallback(X,[D,i,r]),update:A.useCallback(z,[D,i,r]),replace:A.useCallback(J,[D,i,r]),fields:A.useMemo(()=>y.map((g,v)=>({...g,[u]:F.current[v]||te()})),[y,u])}}var Ne=()=>{let e=[];return{get observers(){return e},next:u=>{for(const n of e)n.next&&n.next(u)},subscribe:u=>(e.push(u),{unsubscribe:()=>{e=e.filter(n=>n!==u)}}),unsubscribe:()=>{e=[]}}},xe=e=>P(e)||!cr(e);function ie(e,s){if(xe(e)||xe(s))return e===s;if(ne(e)&&ne(s))return e.getTime()===s.getTime();const r=Object.keys(e),i=Object.keys(s);if(r.length!==i.length)return!1;for(const u of r){const n=e[u];if(!i.includes(u))return!1;if(u!=="ref"){const y=s[u];if(ne(n)&&ne(y)||M(n)&&M(y)||Array.isArray(n)&&Array.isArray(y)?!ie(n,y):n!==y)return!1}}return!0}var Vr=e=>e.type==="select-multiple",Wr=e=>Ge(e)||he(e),Pe=e=>me(e)&&e.isConnected,xr=e=>{for(const s in e)if(se(e[s]))return!0;return!1};function pe(e,s={}){const r=Array.isArray(e);if(M(e)||r)for(const i in e)Array.isArray(e[i])||M(e[i])&&!xr(e[i])?(s[i]=Array.isArray(e[i])?[]:{},pe(e[i],s[i])):P(e[i])||(s[i]=!0);return s}function pr(e,s,r){const i=Array.isArray(e);if(M(e)||i)for(const u in e)Array.isArray(e[u])||M(e[u])&&!xr(e[u])?E(s)||xe(r[u])?r[u]=Array.isArray(e[u])?pe(e[u],[]):{...pe(e[u])}:pr(e[u],P(s)?{}:s[u],r[u]):r[u]=!ie(e[u],s[u]);return r}var be=(e,s)=>pr(e,s,pe(s)),Sr=(e,{valueAsNumber:s,valueAsDate:r,setValueAs:i})=>E(e)?e:s?e===""?NaN:e&&+e:r&&ee(e)?new Date(e):i?i(e):e;function je(e){const s=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):s.disabled))return Ke(s)?s.files:Ge(s)?mr(e.refs).value:Vr(s)?[...s.selectedOptions].map(({value:r})=>r):he(s)?Fr(e.refs).value:Sr(E(s.value)?e.ref.value:s.value,e)}var qr=(e,s,r,i)=>{const u={};for(const n of e){const y=c(s,n);y&&k(u,n,y._f)}return{criteriaMode:r,names:[...e],fields:u,shouldUseNativeValidation:i}},ge=e=>E(e)?e:Ve(e)?e.source:M(e)?Ve(e.value)?e.value.source:e.value:e,Hr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function or(e,s,r){const i=c(e,r);if(i||$e(r))return{error:i,name:r};const u=r.split(".");for(;u.length;){const n=u.join("."),y=c(s,n),_=c(e,n);if(y&&!Array.isArray(y)&&r!==n)return{name:r};if(_&&_.type)return{name:n,error:_};u.pop()}return{name:r}}var $r=(e,s,r,i,u)=>u.isOnAll?!1:!r&&u.isOnTouch?!(s||e):(r?i.isOnBlur:u.isOnBlur)?!e:(r?i.isOnChange:u.isOnChange)?e:!0,Kr=(e,s)=>!oe(c(e,s)).length&&U(e,s);const Gr={mode:G.onSubmit,reValidateMode:G.onChange,shouldFocusError:!0};function zr(e={}){let s={...Gr,...e},r={submitCount:0,isDirty:!1,isLoading:se(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},i={},u=M(s.defaultValues)||M(s.values)?L(s.defaultValues||s.values)||{}:{},n=s.shouldUnregister?{}:L(u),y={action:!1,mount:!1,watch:!1},_={mount:new Set,unMount:new Set,array:new Set,watch:new Set},F,R=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},b={values:Ne(),array:Ne(),state:Ne()},D=_e(s.mode),H=_e(s.reValidateMode),B=s.criteriaMode===G.all,ce=t=>a=>{clearTimeout(R),R=setTimeout(t,a)},X=async t=>{if(m.isValid||t){const a=s.resolver?j((await C()).errors):await N(i,!0);a!==r.isValid&&b.state.next({isValid:a})}},Y=(t,a)=>{(m.isValidating||m.validatingFields)&&((t||Array.from(_.mount)).forEach(l=>{l&&(a?k(r.validatingFields,l,a):U(r.validatingFields,l))}),b.state.next({validatingFields:r.validatingFields,isValidating:!j(r.validatingFields)}))},p=(t,a=[],l,d,f=!0,o=!0)=>{if(d&&l){if(y.action=!0,o&&Array.isArray(c(i,t))){const h=l(c(i,t),d.argA,d.argB);f&&k(i,t,h)}if(o&&Array.isArray(c(r.errors,t))){const h=l(c(r.errors,t),d.argA,d.argB);f&&k(r.errors,t,h),Kr(r.errors,t)}if(m.touchedFields&&o&&Array.isArray(c(r.touchedFields,t))){const h=l(c(r.touchedFields,t),d.argA,d.argB);f&&k(r.touchedFields,t,h)}m.dirtyFields&&(r.dirtyFields=be(u,n)),b.state.next({name:t,isDirty:x(t,a),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else k(n,t,a)},z=(t,a)=>{k(r.errors,t,a),b.state.next({errors:r.errors})},J=t=>{r.errors=t,b.state.next({errors:r.errors,isValid:!1})},g=(t,a,l,d)=>{const f=c(i,t);if(f){const o=c(n,t,E(l)?c(u,t):l);E(o)||d&&d.defaultChecked||a?k(n,t,a?o:je(f._f)):I(t,o),y.mount&&X()}},v=(t,a,l,d,f)=>{let o=!1,h=!1;const w={name:t},O=!!(c(i,t)&&c(i,t)._f.disabled);if(!l||d){m.isDirty&&(h=r.isDirty,r.isDirty=w.isDirty=x(),o=h!==w.isDirty);const W=O||ie(c(u,t),a);h=!!(!O&&c(r.dirtyFields,t)),W||O?U(r.dirtyFields,t):k(r.dirtyFields,t,!0),w.dirtyFields=r.dirtyFields,o=o||m.dirtyFields&&h!==!W}if(l){const W=c(r.touchedFields,t);W||(k(r.touchedFields,t,l),w.touchedFields=r.touchedFields,o=o||m.touchedFields&&W!==l)}return o&&f&&b.state.next(w),o?w:{}},V=(t,a,l,d)=>{const f=c(r.errors,t),o=m.isValid&&Z(a)&&r.isValid!==a;if(e.delayError&&l?(F=ce(()=>z(t,l)),F(e.delayError)):(clearTimeout(R),F=null,l?k(r.errors,t,l):U(r.errors,t)),(l?!ie(f,l):f)||!j(d)||o){const h={...d,...o&&Z(a)?{isValid:a}:{},errors:r.errors,name:t};r={...r,...h},b.state.next(h)}},C=async t=>{Y(t,!0);const a=await s.resolver(n,s.context,qr(t||_.mount,i,s.criteriaMode,s.shouldUseNativeValidation));return Y(t),a},$=async t=>{const{errors:a}=await C(t);if(t)for(const l of t){const d=c(a,l);d?k(r.errors,l,d):U(r.errors,l)}else r.errors=a;return a},N=async(t,a,l={valid:!0})=>{for(const d in t){const f=t[d];if(f){const{_f:o,...h}=f;if(o){const w=_.array.has(o.name);Y([d],!0);const O=await qe(f,n,B,s.shouldUseNativeValidation&&!a,w);if(Y([d]),O[o.name]&&(l.valid=!1,a))break;!a&&(c(O,o.name)?w?Ar(r.errors,O,o.name):k(r.errors,o.name,O[o.name]):U(r.errors,o.name))}h&&await N(h,a,l)}}return l.valid},ve=()=>{for(const t of _.unMount){const a=c(i,t);a&&(a._f.refs?a._f.refs.every(l=>!Pe(l)):!Pe(a._f.ref))&&De(t)}_.unMount=new Set},x=(t,a)=>(t&&a&&k(n,t,a),!ie(ze(),u)),S=(t,a,l)=>br(t,_,{...y.mount?n:E(a)?u:ee(t)?{[t]:a}:a},l,a),T=t=>oe(c(y.mount?n:u,t,e.shouldUnregister?c(u,t,[]):[])),I=(t,a,l={})=>{const d=c(i,t);let f=a;if(d){const o=d._f;o&&(!o.disabled&&k(n,t,Sr(a,o)),f=me(o.ref)&&P(a)?"":a,Vr(o.ref)?[...o.ref.options].forEach(h=>h.selected=f.includes(h.value)):o.refs?he(o.ref)?o.refs.length>1?o.refs.forEach(h=>(!h.defaultChecked||!h.disabled)&&(h.checked=Array.isArray(f)?!!f.find(w=>w===h.value):f===h.value)):o.refs[0]&&(o.refs[0].checked=!!f):o.refs.forEach(h=>h.checked=h.value===f):Ke(o.ref)?o.ref.value="":(o.ref.value=f,o.ref.type||b.values.next({name:t,values:{...n}})))}(l.shouldDirty||l.shouldTouch)&&v(t,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ye(t)},Q=(t,a,l)=>{for(const d in a){const f=a[d],o=`${t}.${d}`,h=c(i,o);(_.array.has(t)||!xe(f)||h&&!h._f)&&!ne(f)?Q(o,f,l):I(o,f,l)}},K=(t,a,l={})=>{const d=c(i,t),f=_.array.has(t),o=L(a);k(n,t,o),f?(b.array.next({name:t,values:{...n}}),(m.isDirty||m.dirtyFields)&&l.shouldDirty&&b.state.next({name:t,dirtyFields:be(u,n),isDirty:x(t,o)})):d&&!d._f&&!P(o)?Q(t,o,l):I(t,o,l),We(t,_)&&b.state.next({...r}),b.values.next({name:y.mount?t:void 0,values:{...n}})},fe=async t=>{y.mount=!0;const a=t.target;let l=a.name,d=!0;const f=c(i,l),o=()=>a.type?je(f._f):fr(t),h=w=>{d=Number.isNaN(w)||w===c(n,l,w)};if(f){let w,O;const W=o(),ae=t.type===Fe.BLUR||t.type===Fe.FOCUS_OUT,Cr=!Hr(f._f)&&!s.resolver&&!c(r.errors,l)&&!f._f.deps||$r(ae,c(r.touchedFields,l),r.isSubmitted,H,D),Ee=We(l,_,ae);k(n,l,W),ae?(f._f.onBlur&&f._f.onBlur(t),F&&F(0)):f._f.onChange&&f._f.onChange(t);const Ce=v(l,W,ae,!1),Rr=!j(Ce)||Ee;if(!ae&&b.values.next({name:l,type:t.type,values:{...n}}),Cr)return m.isValid&&X(),Rr&&b.state.next({name:l,...Ee?{}:Ce});if(!ae&&Ee&&b.state.next({...r}),s.resolver){const{errors:tr}=await C([l]);if(h(W),d){const Or=or(r.errors,i,l),sr=or(tr,i,Or.name||l);w=sr.error,l=sr.name,O=j(tr)}}else Y([l],!0),w=(await qe(f,n,B,s.shouldUseNativeValidation))[l],Y([l]),h(W),d&&(w?O=!1:m.isValid&&(O=await N(i,!0)));d&&(f._f.deps&&ye(f._f.deps),V(l,O,w,Ce))}},de=(t,a)=>{if(c(r.errors,a)&&t.focus)return t.focus(),1},ye=async(t,a={})=>{let l,d;const f=q(t);if(s.resolver){const o=await $(E(t)?t:f);l=j(o),d=t?!f.some(h=>c(o,h)):l}else t?(d=(await Promise.all(f.map(async o=>{const h=c(i,o);return await N(h&&h._f?{[o]:h}:h)}))).every(Boolean),!(!d&&!r.isValid)&&X()):d=l=await N(i);return b.state.next({...!ee(t)||m.isValid&&l!==r.isValid?{}:{name:t},...s.resolver||!t?{isValid:l}:{},errors:r.errors}),a.shouldFocus&&!d&&le(i,de,t?f:_.mount),d},ze=t=>{const a={...y.mount?n:u};return E(t)?a:ee(t)?c(a,t):t.map(l=>c(a,l))},Je=(t,a)=>({invalid:!!c((a||r).errors,t),isDirty:!!c((a||r).dirtyFields,t),isTouched:!!c((a||r).touchedFields,t),isValidating:!!c((a||r).validatingFields,t),error:c((a||r).errors,t)}),wr=t=>{t&&q(t).forEach(a=>U(r.errors,a)),b.state.next({errors:t?r.errors:{}})},Qe=(t,a,l)=>{const d=(c(i,t,{_f:{}})._f||{}).ref,f=c(r.errors,t)||{},{ref:o,message:h,type:w,...O}=f;k(r.errors,t,{...O,...a,ref:d}),b.state.next({name:t,errors:r.errors,isValid:!1}),l&&l.shouldFocus&&d&&d.focus&&d.focus()},Dr=(t,a)=>se(t)?b.values.subscribe({next:l=>t(S(void 0,a),l)}):S(t,a,!0),De=(t,a={})=>{for(const l of t?q(t):_.mount)_.mount.delete(l),_.array.delete(l),a.keepValue||(U(i,l),U(n,l)),!a.keepError&&U(r.errors,l),!a.keepDirty&&U(r.dirtyFields,l),!a.keepTouched&&U(r.touchedFields,l),!a.keepIsValidating&&U(r.validatingFields,l),!s.shouldUnregister&&!a.keepDefaultValue&&U(u,l);b.values.next({values:{...n}}),b.state.next({...r,...a.keepDirty?{isDirty:x()}:{}}),!a.keepIsValid&&X()},Xe=({disabled:t,name:a,field:l,fields:d,value:f})=>{if(Z(t)&&y.mount||t){const o=t?void 0:E(f)?je(l?l._f:c(d,a)._f):f;k(n,a,o),v(a,o,!1,!1,!0)}},ke=(t,a={})=>{let l=c(i,t);const d=Z(a.disabled);return k(i,t,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:t}},name:t,mount:!0,...a}}),_.mount.add(t),l?Xe({field:l,disabled:a.disabled,name:t,value:a.value}):g(t,!0,a.value),{...d?{disabled:a.disabled}:{},...s.progressive?{required:!!a.required,min:ge(a.min),max:ge(a.max),minLength:ge(a.minLength),maxLength:ge(a.maxLength),pattern:ge(a.pattern)}:{},name:t,onChange:fe,onBlur:fe,ref:f=>{if(f){ke(t,a),l=c(i,t);const o=E(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,h=Wr(o),w=l._f.refs||[];if(h?w.find(O=>O===o):o===l._f.ref)return;k(i,t,{_f:{...l._f,...h?{refs:[...w.filter(Pe),o,...Array.isArray(c(u,t))?[{}]:[]],ref:{type:o.type,name:t}}:{ref:o}}}),g(t,!1,void 0,o)}else l=c(i,t,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||a.shouldUnregister)&&!(dr(_.array,t)&&y.action)&&_.unMount.add(t)}}},Ye=()=>s.shouldFocusError&&le(i,de,_.mount),kr=t=>{Z(t)&&(b.state.next({disabled:t}),le(i,(a,l)=>{const d=c(i,l);d&&(a.disabled=d._f.disabled||t,Array.isArray(d._f.refs)&&d._f.refs.forEach(f=>{f.disabled=d._f.disabled||t}))},0,!1))},Ze=(t,a)=>async l=>{let d;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let f=L(n);if(b.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:h}=await C();r.errors=o,f=h}else await N(i);if(U(r.errors,"root"),j(r.errors)){b.state.next({errors:{}});try{await t(f,l)}catch(o){d=o}}else a&&await a({...r.errors},l),Ye(),setTimeout(Ye);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:j(r.errors)&&!d,submitCount:r.submitCount+1,errors:r.errors}),d)throw d},Er=(t,a={})=>{c(i,t)&&(E(a.defaultValue)?K(t,L(c(u,t))):(K(t,a.defaultValue),k(u,t,L(a.defaultValue))),a.keepTouched||U(r.touchedFields,t),a.keepDirty||(U(r.dirtyFields,t),r.isDirty=a.defaultValue?x(t,L(c(u,t))):x()),a.keepError||(U(r.errors,t),m.isValid&&X()),b.state.next({...r}))},er=(t,a={})=>{const l=t?L(t):u,d=L(l),f=j(t),o=f?u:d;if(a.keepDefaultValues||(u=l),!a.keepValues){if(a.keepDirtyValues)for(const h of _.mount)c(r.dirtyFields,h)?k(o,h,c(n,h)):K(h,c(o,h));else{if(He&&E(t))for(const h of _.mount){const w=c(i,h);if(w&&w._f){const O=Array.isArray(w._f.refs)?w._f.refs[0]:w._f.ref;if(me(O)){const W=O.closest("form");if(W){W.reset();break}}}}i={}}n=e.shouldUnregister?a.keepDefaultValues?L(u):{}:L(o),b.array.next({values:{...o}}),b.values.next({values:{...o}})}_={mount:a.keepDirtyValues?_.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!m.isValid||!!a.keepIsValid||!!a.keepDirtyValues,y.watch=!!e.shouldUnregister,b.state.next({submitCount:a.keepSubmitCount?r.submitCount:0,isDirty:f?!1:a.keepDirty?r.isDirty:!!(a.keepDefaultValues&&!ie(t,u)),isSubmitted:a.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:f?[]:a.keepDirtyValues?a.keepDefaultValues&&n?be(u,n):r.dirtyFields:a.keepDefaultValues&&t?be(u,t):{},touchedFields:a.keepTouched?r.touchedFields:{},errors:a.keepErrors?r.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},rr=(t,a)=>er(se(t)?t(n):t,a);return{control:{register:ke,unregister:De,getFieldState:Je,handleSubmit:Ze,setError:Qe,_executeSchema:C,_getWatch:S,_getDirty:x,_updateValid:X,_removeUnmounted:ve,_updateFieldArray:p,_updateDisabledField:Xe,_getFieldArray:T,_reset:er,_resetDefaultValues:()=>se(s.defaultValues)&&s.defaultValues().then(t=>{rr(t,s.resetOptions),b.state.next({isLoading:!1})}),_updateFormState:t=>{r={...r,...t}},_disableForm:kr,_subjects:b,_proxyFormState:m,_setErrors:J,get _fields(){return i},get _formValues(){return n},get _state(){return y},set _state(t){y=t},get _defaultValues(){return u},get _names(){return _},set _names(t){_=t},get _formState(){return r},set _formState(t){r=t},get _options(){return s},set _options(t){s={...s,...t}}},trigger:ye,register:ke,handleSubmit:Ze,watch:Dr,setValue:K,getValues:ze,reset:rr,resetField:Er,clearErrors:wr,unregister:De,setError:Qe,setFocus:(t,a={})=>{const l=c(i,t),d=l&&l._f;if(d){const f=d.refs?d.refs[0]:d.ref;f.focus&&(f.focus(),a.shouldSelect&&f.select())}},getFieldState:Je}}function tt(e={}){const s=A.useRef(),r=A.useRef(),[i,u]=A.useState({isDirty:!1,isValidating:!1,isLoading:se(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:se(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...zr(e),formState:i});const n=s.current.control;return n._options=e,we({subject:n._subjects.state,next:y=>{hr(y,n._proxyFormState,n._updateFormState,!0)&&u({...n._formState})}}),A.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),A.useEffect(()=>{if(n._proxyFormState.isDirty){const y=n._getDirty();y!==i.isDirty&&n._subjects.state.next({isDirty:y})}},[n,i.isDirty]),A.useEffect(()=>{e.values&&!ie(e.values,r.current)?(n._reset(e.values,n._options.resetOptions),r.current=e.values,u(y=>({...y}))):n._resetDefaultValues()},[e.values,n]),A.useEffect(()=>{e.errors&&n._setErrors(e.errors)},[e.errors,n]),A.useEffect(()=>{n._state.mount||(n._updateValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),A.useEffect(()=>{e.shouldUnregister&&n._subjects.values.next({values:n._getWatch()})},[e.shouldUnregister,n]),s.current.formState=_r(i,n),s.current}export{et as C,Zr as F,rt as a,Se as b,Ir as c,c as g,tt as u};
@@ -0,0 +1 @@
1
+ import{r as C}from"./@radix-BXWm7HOa.js";const H=e=>C.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43598C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43598 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM10 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H10L10 20ZM8 4L8 20H7.8C6.94342 20 6.36113 19.9992 5.91104 19.9624C5.47262 19.9266 5.24842 19.8617 5.09202 19.782C4.7157 19.5903 4.40973 19.2843 4.21799 18.908C4.1383 18.7516 4.07337 18.5274 4.03755 18.089C4.00078 17.6389 4 17.0566 4 16.2V7.8C4 6.94342 4.00078 6.36113 4.03755 5.91104C4.07337 5.47262 4.1383 5.24842 4.21799 5.09202C4.40973 4.7157 4.7157 4.40973 5.09202 4.21799C5.24842 4.1383 5.47262 4.07337 5.91104 4.03755C6.36113 4.00078 6.94342 4 7.8 4H8ZM11.5 7C11.5 6.44772 11.9477 6 12.5 6H17.5C18.0523 6 18.5 6.44772 18.5 7C18.5 7.55229 18.0523 8 17.5 8H12.5C11.9477 8 11.5 7.55229 11.5 7ZM11.5 11C11.5 10.4477 11.9477 10 12.5 10H17.5C18.0523 10 18.5 10.4477 18.5 11C18.5 11.5523 18.0523 12 17.5 12H12.5C11.9477 12 11.5 11.5523 11.5 11ZM11.5 15C11.5 14.4477 11.9477 14 12.5 14H17.5C18.0523 14 18.5 14.4477 18.5 15C18.5 15.5523 18.0523 16 17.5 16H12.5C11.9477 16 11.5 15.5523 11.5 15Z"}));export{H as S};
@@ -1 +1 @@
1
- import{j as s,F as r,k as i,l as u}from"./index-KsTz2dHG.js";import{b as c}from"./@tanstack-k96lU_C-.js";async function l(a){const e=i(u.login),t=await s(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a)});if(!t.ok){const o=await t.json().then(n=>n.detail).catch(()=>["","Failed to login"]);throw new r({status:t.status,statusText:t.statusText,message:o[1]||"Failed to login"})}return t.json()}function m(a){return c({mutationFn:async e=>l(e),...a})}export{m as u};
1
+ import{j as s,F as r,k as i,l as u}from"./index-DhIZtpxB.js";import{b as c}from"./@tanstack-FmcYZMuX.js";async function l(a){const e=i(u.login),t=await s(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a)});if(!t.ok){const o=await t.json().then(n=>n.detail).catch(()=>["","Failed to login"]);throw new r({status:t.status,statusText:t.statusText,message:o[1]||"Failed to login"})}return t.json()}function m(a){return c({mutationFn:async e=>l(e),...a})}export{m as u};
@@ -1 +1 @@
1
- import{r as C}from"./@radix-CFOkMR_E.js";const o=e=>C.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.2242 3.0552C14.0208 3.00637 13.7931 2.99994 13.0118 2.99994H8.5C8.00379 2.99994 7.85253 3.0021 7.73895 3.01705C6.84148 3.13521 6.13526 3.84142 6.01711 4.73889C6.00216 4.85247 6 5.00373 6 5.49994C6 6.05223 5.55228 6.49994 5 6.49994C4.44772 6.49994 4 6.05223 4 5.49994C4 5.47668 3.99999 5.45376 3.99999 5.43118C3.99988 5.03374 3.9998 4.73929 4.03422 4.47784C4.27053 2.6829 5.68296 1.27047 7.4779 1.03416C7.73935 0.99974 8.0338 0.99982 8.43124 0.999929C8.45382 0.999935 8.47674 0.999941 8.5 0.999941H13.0118C13.0462 0.999941 13.0801 0.999925 13.1137 0.999909C13.7487 0.999607 14.2284 0.999378 14.6911 1.11046C15.0993 1.20845 15.4895 1.37007 15.8474 1.58938C16.2531 1.83801 16.5922 2.17744 17.041 2.62667C17.0647 2.65038 17.0887 2.6744 17.113 2.69872L20.3012 5.88695C20.3255 5.91126 20.3495 5.93525 20.3732 5.95893C20.8225 6.40774 21.1619 6.74686 21.4106 7.15259C21.6299 7.51048 21.7915 7.90065 21.8895 8.3088C22.0006 8.77149 22.0003 9.25128 22 9.88627C22 9.9198 22 9.95375 22 9.98817V17.2413C22 18.0462 22 18.7106 21.9558 19.2518C21.9099 19.8139 21.8113 20.3306 21.564 20.8159C21.1805 21.5686 20.5686 22.1805 19.816 22.564C19.3306 22.8113 18.8139 22.9098 18.2518 22.9557C17.7106 23 17.0463 23 16.2413 22.9999H8.5C8.47673 22.9999 8.45381 22.9999 8.43122 23C8.03379 23.0001 7.73935 23.0001 7.4779 22.9657C5.68296 22.7294 4.27053 21.317 4.03422 19.522C3.9998 19.2606 3.99988 18.9661 3.99999 18.5687C3.99999 18.5461 4 18.5232 4 18.4999C4 17.9477 4.44772 17.4999 5 17.4999C5.55228 17.4999 6 17.9477 6 18.4999C6 18.9961 6.00216 19.1474 6.01711 19.261C6.13526 20.1585 6.84148 20.8647 7.73895 20.9828C7.85253 20.9978 8.00379 20.9999 8.5 20.9999H16.2C17.0566 20.9999 17.6389 20.9992 18.089 20.9624C18.5274 20.9266 18.7516 20.8616 18.908 20.782C19.2843 20.5902 19.5903 20.2842 19.782 19.9079C19.8617 19.7515 19.9266 19.5273 19.9624 19.0889C19.9992 18.6388 20 18.0565 20 17.1999V9.98817C20 9.20679 19.9936 8.9791 19.9447 8.77569C19.8957 8.57162 19.8149 8.37653 19.7053 8.19758C19.596 8.01923 19.4395 7.85366 18.887 7.30116L15.6988 4.11294C15.1463 3.56042 14.9807 3.40396 14.8024 3.29466C14.6234 3.185 14.4283 3.10419 14.2242 3.0552ZM5.70711 8.79283C6.09763 9.18336 6.09763 9.81652 5.70711 10.207L3.91421 11.9999L5.70711 13.7928C6.09763 14.1834 6.09763 14.8165 5.70711 15.207C5.31658 15.5976 4.68342 15.5976 4.29289 15.207L1.79289 12.707C1.40237 12.3165 1.40237 11.6834 1.79289 11.2928L4.29289 8.79283C4.68342 8.40231 5.31658 8.40231 5.70711 8.79283ZM8.29289 8.79283C8.68342 8.40231 9.31658 8.40231 9.70711 8.79283L12.2071 11.2928C12.5976 11.6834 12.5976 12.3165 12.2071 12.707L9.70711 15.207C9.31658 15.5976 8.68342 15.5976 8.29289 15.207C7.90237 14.8165 7.90237 14.1834 8.29289 13.7928L10.0858 11.9999L8.29289 10.207C7.90237 9.81652 7.90237 9.18336 8.29289 8.79283Z"}));export{o as S};
1
+ import{r as C}from"./@radix-BXWm7HOa.js";const o=e=>C.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.2242 3.0552C14.0208 3.00637 13.7931 2.99994 13.0118 2.99994H8.5C8.00379 2.99994 7.85253 3.0021 7.73895 3.01705C6.84148 3.13521 6.13526 3.84142 6.01711 4.73889C6.00216 4.85247 6 5.00373 6 5.49994C6 6.05223 5.55228 6.49994 5 6.49994C4.44772 6.49994 4 6.05223 4 5.49994C4 5.47668 3.99999 5.45376 3.99999 5.43118C3.99988 5.03374 3.9998 4.73929 4.03422 4.47784C4.27053 2.6829 5.68296 1.27047 7.4779 1.03416C7.73935 0.99974 8.0338 0.99982 8.43124 0.999929C8.45382 0.999935 8.47674 0.999941 8.5 0.999941H13.0118C13.0462 0.999941 13.0801 0.999925 13.1137 0.999909C13.7487 0.999607 14.2284 0.999378 14.6911 1.11046C15.0993 1.20845 15.4895 1.37007 15.8474 1.58938C16.2531 1.83801 16.5922 2.17744 17.041 2.62667C17.0647 2.65038 17.0887 2.6744 17.113 2.69872L20.3012 5.88695C20.3255 5.91126 20.3495 5.93525 20.3732 5.95893C20.8225 6.40774 21.1619 6.74686 21.4106 7.15259C21.6299 7.51048 21.7915 7.90065 21.8895 8.3088C22.0006 8.77149 22.0003 9.25128 22 9.88627C22 9.9198 22 9.95375 22 9.98817V17.2413C22 18.0462 22 18.7106 21.9558 19.2518C21.9099 19.8139 21.8113 20.3306 21.564 20.8159C21.1805 21.5686 20.5686 22.1805 19.816 22.564C19.3306 22.8113 18.8139 22.9098 18.2518 22.9557C17.7106 23 17.0463 23 16.2413 22.9999H8.5C8.47673 22.9999 8.45381 22.9999 8.43122 23C8.03379 23.0001 7.73935 23.0001 7.4779 22.9657C5.68296 22.7294 4.27053 21.317 4.03422 19.522C3.9998 19.2606 3.99988 18.9661 3.99999 18.5687C3.99999 18.5461 4 18.5232 4 18.4999C4 17.9477 4.44772 17.4999 5 17.4999C5.55228 17.4999 6 17.9477 6 18.4999C6 18.9961 6.00216 19.1474 6.01711 19.261C6.13526 20.1585 6.84148 20.8647 7.73895 20.9828C7.85253 20.9978 8.00379 20.9999 8.5 20.9999H16.2C17.0566 20.9999 17.6389 20.9992 18.089 20.9624C18.5274 20.9266 18.7516 20.8616 18.908 20.782C19.2843 20.5902 19.5903 20.2842 19.782 19.9079C19.8617 19.7515 19.9266 19.5273 19.9624 19.0889C19.9992 18.6388 20 18.0565 20 17.1999V9.98817C20 9.20679 19.9936 8.9791 19.9447 8.77569C19.8957 8.57162 19.8149 8.37653 19.7053 8.19758C19.596 8.01923 19.4395 7.85366 18.887 7.30116L15.6988 4.11294C15.1463 3.56042 14.9807 3.40396 14.8024 3.29466C14.6234 3.185 14.4283 3.10419 14.2242 3.0552ZM5.70711 8.79283C6.09763 9.18336 6.09763 9.81652 5.70711 10.207L3.91421 11.9999L5.70711 13.7928C6.09763 14.1834 6.09763 14.8165 5.70711 15.207C5.31658 15.5976 4.68342 15.5976 4.29289 15.207L1.79289 12.707C1.40237 12.3165 1.40237 11.6834 1.79289 11.2928L4.29289 8.79283C4.68342 8.40231 5.31658 8.40231 5.70711 8.79283ZM8.29289 8.79283C8.68342 8.40231 9.31658 8.40231 9.70711 8.79283L12.2071 11.2928C12.5976 11.6834 12.5976 12.3165 12.2071 12.707L9.70711 15.207C9.31658 15.5976 8.68342 15.5976 8.29289 15.207C7.90237 14.8165 7.90237 14.1834 8.29289 13.7928L10.0858 11.9999L8.29289 10.207C7.90237 9.81652 7.90237 9.18336 8.29289 8.79283Z"}));export{o as S};
@@ -1 +1 @@
1
- import{r as s,j as e}from"./@radix-CFOkMR_E.js";import{i as r,h as n}from"./index-KsTz2dHG.js";import{b as o}from"./@react-router-CO-OsFwI.js";import"./@tanstack-k96lU_C-.js";import"./@reactflow-DIYUhKYX.js";const a=t=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L7.41421 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H7.41421L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z"})),l=a;function h(){const t=o();return e.jsx(e.Fragment,{children:e.jsxs("section",{className:"layout-container my-9 flex flex-col items-center gap-5",children:[e.jsx(r,{className:"h-[120px] w-[120px] fill-neutral-300"}),e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-display-xs font-semibold",children:"Error 404 - Run Not Found"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Oh no! It seems that the run you are looking for doesn't exist."})]}),e.jsxs(n,{intent:"primary",size:"lg",onClick:()=>t(-1),children:[e.jsx(l,{className:"h-5 w-5 fill-theme-text-negative"})," ",e.jsx("span",{children:"Go back"})]})]})})}export{h as default};
1
+ import{r as s,j as e}from"./@radix-BXWm7HOa.js";import{i as r,h as n}from"./index-DhIZtpxB.js";import{b as o}from"./@react-router-l3lMcXA2.js";import"./@tanstack-FmcYZMuX.js";import"./@reactflow-CeVxyqYT.js";const a=t=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L7.41421 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H7.41421L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z"})),l=a;function h(){const t=o();return e.jsx(e.Fragment,{children:e.jsxs("section",{className:"layout-container my-9 flex flex-col items-center gap-5",children:[e.jsx(r,{className:"h-[120px] w-[120px] fill-neutral-300"}),e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-display-xs font-semibold",children:"Error 404 - Run Not Found"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Oh no! It seems that the run you are looking for doesn't exist."})]}),e.jsxs(n,{intent:"primary",size:"lg",onClick:()=>t(-1),children:[e.jsx(l,{className:"h-5 w-5 fill-theme-text-negative"})," ",e.jsx("span",{children:"Go back"})]})]})})}export{h as default};
@@ -1 +1 @@
1
- import{r as C}from"./@radix-CFOkMR_E.js";const l=e=>C.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5971 1.18505C11.8629 1.13038 12.1371 1.13038 12.4029 1.18505C12.7102 1.24824 12.9848 1.40207 13.2032 1.52436C13.2235 1.53575 13.2433 1.54687 13.2627 1.55761L20.6627 5.66872C20.6831 5.68009 20.7042 5.6917 20.7258 5.70359C20.9569 5.8309 21.2476 5.99097 21.4707 6.23315C21.6637 6.44253 21.8097 6.6907 21.899 6.96105C22.0024 7.27375 22.0011 7.60553 22.0002 7.8694C22.0001 7.89406 22 7.91813 22 7.94153V16.0586C22 16.082 22.0001 16.1061 22.0002 16.1308C22.0011 16.3946 22.0024 16.7264 21.899 17.0391C21.8097 17.3095 21.6637 17.5576 21.4707 17.767C21.2476 18.0092 20.9569 18.1693 20.7258 18.2966C20.7042 18.3085 20.6831 18.3201 20.6627 18.3314L13.2627 22.4426C13.2433 22.4533 13.2235 22.4644 13.2032 22.4758C12.9848 22.5981 12.7102 22.7519 12.4029 22.8151C12.1371 22.8698 11.8629 22.8698 11.5971 22.8151C11.2898 22.7519 11.0152 22.5981 10.7968 22.4758C10.7765 22.4644 10.7567 22.4533 10.7373 22.4426L3.33733 18.3314C3.31688 18.3201 3.2958 18.3085 3.2742 18.2966C3.04307 18.1693 2.75245 18.0092 2.52927 17.767C2.33632 17.5576 2.1903 17.3095 2.10097 17.0391C1.99765 16.7264 1.99886 16.3946 1.99982 16.1308C1.99991 16.1061 2 16.082 2 16.0586V7.94153C2 7.91813 1.99991 7.89406 1.99982 7.8694C1.99886 7.60553 1.99765 7.27375 2.10097 6.96105C2.1903 6.6907 2.33632 6.44253 2.52927 6.23315C2.75244 5.99097 3.04306 5.8309 3.27419 5.7036C3.29579 5.6917 3.31687 5.68009 3.33733 5.66872L10.7373 1.55761C10.7567 1.54687 10.7765 1.53575 10.7968 1.52436C11.0152 1.40207 11.2898 1.24824 11.5971 1.18505ZM12 3.14907L11.9952 3.15136C11.9375 3.1792 11.8602 3.22173 11.7086 3.30592L5.05914 7.00008L12 10.8561L18.9408 7.00006L12.2914 3.30592C12.1398 3.22173 12.0625 3.1792 12.0048 3.15136L12 3.14907ZM20 8.69955V16.0586C20 16.2416 19.9996 16.3353 19.9955 16.4031C19.9954 16.4051 19.9951 16.4088 19.9951 16.4088C19.9951 16.4088 19.992 16.4108 19.9903 16.4119C19.933 16.4484 19.8513 16.4943 19.6914 16.5831L13 20.3006L13 12.5885L20 8.69955ZM11 12.5885L4 8.69959V16.0586C4 16.2416 4.00042 16.3353 4.0045 16.4031C4.00462 16.4051 4.00487 16.4088 4.00487 16.4088C4.00487 16.4088 4.00802 16.4108 4.0097 16.4119C4.067 16.4484 4.14866 16.4943 4.30862 16.5831L11 20.3006L11 12.5885Z"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.62585 4.01444C6.89406 3.53166 7.50286 3.35771 7.98565 3.62593L16.9856 8.62593C17.4684 8.89414 17.6424 9.50294 17.3742 9.98573C17.1059 10.4685 16.4971 10.6425 16.0144 10.3742L7.01436 5.37424C6.53158 5.10603 6.35763 4.49722 6.62585 4.01444Z"}));export{l as S};
1
+ import{r as C}from"./@radix-BXWm7HOa.js";const l=e=>C.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5971 1.18505C11.8629 1.13038 12.1371 1.13038 12.4029 1.18505C12.7102 1.24824 12.9848 1.40207 13.2032 1.52436C13.2235 1.53575 13.2433 1.54687 13.2627 1.55761L20.6627 5.66872C20.6831 5.68009 20.7042 5.6917 20.7258 5.70359C20.9569 5.8309 21.2476 5.99097 21.4707 6.23315C21.6637 6.44253 21.8097 6.6907 21.899 6.96105C22.0024 7.27375 22.0011 7.60553 22.0002 7.8694C22.0001 7.89406 22 7.91813 22 7.94153V16.0586C22 16.082 22.0001 16.1061 22.0002 16.1308C22.0011 16.3946 22.0024 16.7264 21.899 17.0391C21.8097 17.3095 21.6637 17.5576 21.4707 17.767C21.2476 18.0092 20.9569 18.1693 20.7258 18.2966C20.7042 18.3085 20.6831 18.3201 20.6627 18.3314L13.2627 22.4426C13.2433 22.4533 13.2235 22.4644 13.2032 22.4758C12.9848 22.5981 12.7102 22.7519 12.4029 22.8151C12.1371 22.8698 11.8629 22.8698 11.5971 22.8151C11.2898 22.7519 11.0152 22.5981 10.7968 22.4758C10.7765 22.4644 10.7567 22.4533 10.7373 22.4426L3.33733 18.3314C3.31688 18.3201 3.2958 18.3085 3.2742 18.2966C3.04307 18.1693 2.75245 18.0092 2.52927 17.767C2.33632 17.5576 2.1903 17.3095 2.10097 17.0391C1.99765 16.7264 1.99886 16.3946 1.99982 16.1308C1.99991 16.1061 2 16.082 2 16.0586V7.94153C2 7.91813 1.99991 7.89406 1.99982 7.8694C1.99886 7.60553 1.99765 7.27375 2.10097 6.96105C2.1903 6.6907 2.33632 6.44253 2.52927 6.23315C2.75244 5.99097 3.04306 5.8309 3.27419 5.7036C3.29579 5.6917 3.31687 5.68009 3.33733 5.66872L10.7373 1.55761C10.7567 1.54687 10.7765 1.53575 10.7968 1.52436C11.0152 1.40207 11.2898 1.24824 11.5971 1.18505ZM12 3.14907L11.9952 3.15136C11.9375 3.1792 11.8602 3.22173 11.7086 3.30592L5.05914 7.00008L12 10.8561L18.9408 7.00006L12.2914 3.30592C12.1398 3.22173 12.0625 3.1792 12.0048 3.15136L12 3.14907ZM20 8.69955V16.0586C20 16.2416 19.9996 16.3353 19.9955 16.4031C19.9954 16.4051 19.9951 16.4088 19.9951 16.4088C19.9951 16.4088 19.992 16.4108 19.9903 16.4119C19.933 16.4484 19.8513 16.4943 19.6914 16.5831L13 20.3006L13 12.5885L20 8.69955ZM11 12.5885L4 8.69959V16.0586C4 16.2416 4.00042 16.3353 4.0045 16.4031C4.00462 16.4051 4.00487 16.4088 4.00487 16.4088C4.00487 16.4088 4.00802 16.4108 4.0097 16.4119C4.067 16.4484 4.14866 16.4943 4.30862 16.5831L11 20.3006L11 12.5885Z"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.62585 4.01444C6.89406 3.53166 7.50286 3.35771 7.98565 3.62593L16.9856 8.62593C17.4684 8.89414 17.6424 9.50294 17.3742 9.98573C17.1059 10.4685 16.4971 10.6425 16.0144 10.3742L7.01436 5.37424C6.53158 5.10603 6.35763 4.49722 6.62585 4.01444Z"}));export{l as S};
@@ -0,0 +1 @@
1
+ import{r as m,j as e,aw as T,ax as H,ay as J,az as W}from"./@radix-BXWm7HOa.js";import{k as w,l as N,j as Y,n as q,F as S,a0 as X,a1 as ee,a2 as te,a3 as se,a4 as re,Y as f,av as ae,z as d,s as ne,t as ie,v as oe,K as ce,w as le,I as Q,y as de,h as b,au as me,r as B,aj as ue,f as pe,i as he,q as xe}from"./index-DhIZtpxB.js";import{b as u,C as fe,u as ge,F as ke}from"./index.esm-DT4uyn2i.js";import{i as je,h as ye,j as be,b as ve,q as we,a as Ne,c as Se}from"./@tanstack-FmcYZMuX.js";import{o as Ce,s as Le}from"./url-hcMJkz8p.js";import{d as Te}from"./index-Bd1xgUQG.js";import{R as _e,a as Fe}from"./RadioItem-xLhXoiFV.js";import{C as ze}from"./CodeSnippet-D0VLxT2A.js";import{a as Me,C as V,s as Ae}from"./sharedSchema-BoYx_B_L.js";import{D as De}from"./DisplayDate-DizbSeT-.js";import{I as Ie}from"./InlineAvatar-DpTLgM3Q.js";import{S as $e}from"./check-circle-1_I207rW.js";import{L as Ee,b as Oe}from"./@react-router-l3lMcXA2.js";import{t as Pe}from"./zod-CnykDKJj.js";import"./@reactflow-CeVxyqYT.js";import"./copy-f3XGPPxt.js";import"./stack-detail-query-B-US_-wa.js";import"./database-cXYNX9tt.js";import"./layout-D6oiSbfd.js";async function Re(t){const r=w(N.components.all)+(t?`?${Ce(t)}`:""),s=await Y(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&q(),!s.ok){const a=await s.json().then(n=>Array.isArray(n.detail)?n.detail[1]:n.detail).catch(()=>"Error while fetching stack components");throw new S({status:s.status,statusText:s.statusText,message:a})}return s.json()}const Z={all:["components"],componentListInfinite:t=>je({queryKey:[...Z.all,t],queryFn:async({pageParam:r})=>Re({...t,page:r}),getNextPageParam:r=>r.index<r.total_pages?r.index+1:null,initialPageParam:1})},K=m.forwardRef(({closeModal:t,type:r,children:s,...a},n)=>e.jsxs(X,{children:[e.jsx(ee,{asChild:!0,children:s}),e.jsxs(te,{className:"max-w-2xl",...a,ref:n,children:[e.jsx(se,{children:e.jsx(re,{children:"Create New "})}),e.jsx("div",{className:"space-y-5 overflow-auto p-7",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Create a new ",f(r)]}),e.jsx(ze,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml ${ae(r)} register ${r.toUpperCase()}_NAME --flavor=${r.toUpperCase()}_FLAVOR [--${r.toUpperCase()}_OPTIONS]`})]})})]})]}));K.displayName="UpdateStackDialog";const C=["orchestrator","artifact_store","container_registry","step_operator","model_deployer","feature_store","experiment_tracker","alerter","annotator","data_validator","image_builder","model_registry"],v=d.object({id:d.string().trim().min(1),name:d.string().trim().min(1),logoUrl:d.string().trim().min(1)}),Ue=C.reduce((t,r)=>(t[r]=v.nullable(),t),{}),qe=d.object({stackName:Me,components:d.object({...Ue,orchestrator:v,artifact_store:v})}),_={helpLink:"https://docs.zenml.io/stack-components/orchestrators",description:"An orchestrator is a special kind of backend that manages the running of each step of the pipeline. Orchestrators administer the actual pipeline runs. By default, ZenML initializes your repository with an orchestrator that runs everything on your local machine."},F={helpLink:"https://docs.zenml.io/stack-components/artifact-stores",description:"The Artifact Store is a central component in any MLOps stack. As the name suggests, it acts as a data persistence layer where artifacts (e.g. datasets, models) ingested or generated by the machine learning pipelines are stored."},z={helpLink:"https://docs.zenml.io/stack-components/container-registries",description:"Container registry is used to store container images that are built to run machine learning pipelines in remote environments. Containerization of the pipeline code creates a portable environment that allows code to run in an isolated manner."},M={description:"Step operators allow you to run individual steps in a custom environment different from the default one used by your active orchestrator.",helpLink:"https://docs.zenml.io/stack-components/step-operators"},A={description:"Model deployers are stack components responsible for online model serving. They are responsible for deploying models to a remote server. Model deployers also act as a registry for models that are served with ZenML.",helpLink:"https://docs.zenml.io/stack-components/model-deployers"},D={description:"ZenML supports connecting to a Redis-backed Feast feature store as a stack component integration.",helpLink:"https://docs.zenml.io/stack-components/feature-stores"},I={description:"Experiment trackers let you track your ML experiments by logging the parameters and allowing you to compare between different runs.",helpLink:"https://docs.zenml.io/stack-components/experiment-trackers"},$={description:"Alerters allow you to send messages to chat services (like Slack, Discord, Mattermost, etc.) from within your pipelines. This is useful to immediately get notified when failures happen, for general monitoring/reporting, and also for building human-in-the-loop ML.",helpLink:"https://docs.zenml.io/stack-components/alerters "},E={description:"Annotators are a stack component that enables the use of data annotation as part of your ZenML stack and pipelines.",helpLink:"https://docs.zenml.io/stack-components/annotators"},O={description:"Data Validators used in ZenML pipelines usually generate data profiles and data quality check reports that are versioned and stored in the Artifact Store and can be retrieved and visualized later.",helpLink:"https://docs.zenml.io/stack-components/data-validators"},P={description:"The image builder is an essential part of most remote MLOps stacks. It is used to build container images such that your machine-learning pipelines and steps can be executed in remote environments.",helpLink:"https://docs.zenml.io/stack-components/image-builders"},R={description:"Model registries are centralized storage solutions for managing and tracking machine learning models across various stages of development and deployment.",helpLink:"https://docs.zenml.io/stack-components/model-registries"};function Qe({type:t}){const{description:r,link:s}=Be(t);return e.jsx(ne,{children:e.jsxs(ie,{delayDuration:200,children:[e.jsxs(oe,{children:[e.jsx(ce,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(le,{align:"start",side:"bottom",className:"flex max-w-xl flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:r}),e.jsx("a",{className:"link mt-2 text-primary-400",target:"_blank",href:s,children:"Learn more"})]})]})})}function Be(t){switch(t){case"orchestrator":return{description:_.description,link:_.helpLink};case"alerter":return{description:$.description,link:$.helpLink};case"annotator":return{description:E.description,link:E.helpLink};case"artifact_store":return{description:F.description,link:F.helpLink};case"container_registry":return{description:z.description,link:z.helpLink};case"data_validator":return{description:O.description,link:O.helpLink};case"experiment_tracker":return{description:I.description,link:I.helpLink};case"feature_store":return{description:D.description,link:D.helpLink};case"image_builder":return{description:P.description,link:P.helpLink};case"model_deployer":return{description:A.description,link:A.helpLink};case"model_registry":return{description:R.description,link:R.helpLink};case"step_operator":return{description:M.description,link:M.helpLink}}}function Ve(){return e.jsxs(e.Fragment,{children:[C.map(t=>e.jsx(T,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(Ge,{type:t})},t)),e.jsx(T,{className:"h-full",value:"",children:e.jsx("div",{className:"flex h-full w-full items-center justify-center text-theme-text-tertiary",children:"Select a category to add a new component"})})]})}function Ze({type:t,search:r}){const s=ye({...Z.componentListInfinite({sort_by:"desc:updated",type:t,...r?{name:`contains:${r}`}:{}})}),{control:a,watch:n,setValue:o}=u();return s.isError?e.jsx("p",{children:"Error while fetching Components"}):s.isPending?e.jsx("div",{className:"flex w-full flex-1 items-center justify-center",children:e.jsx(de,{})}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:s.data.pages.map(c=>c.items.map(i=>e.jsx("li",{children:e.jsx(fe,{name:`components.${t}.id`,control:a,render:({field:{onChange:l,...y}})=>{var g,p,h,x;return e.jsxs(_e,{className:"justify-between bg-theme-surface-primary font-medium","data-state":n(`components.${t}.id`)===i.id?"selected":"unselected",htmlFor:i.id,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(Fe,{...y,id:i.id,type:"radio",value:i.id,onChange:k=>{var j;o(`components.${t}.name`,i.name),o(`components.${t}.logoUrl`,((j=i.body)==null?void 0:j.logo_url)||""),l(k)},checked:n(`components.${t}.id`)===i.id,name:t}),e.jsx("img",{alt:"flavor icon",src:Le(((g=i.body)==null?void 0:g.logo_url)||""),width:24,height:24}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("div",{className:"truncate font-semibold",children:i.name}),e.jsx("div",{className:"truncate text-text-xs text-theme-text-secondary",children:i.id.split("-")[0]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-text-sm",children:[((h=(p=i.body)==null?void 0:p.user)==null?void 0:h.name)&&e.jsx(Ie,{username:i.body.user.name}),((x=i.body)==null?void 0:x.updated)&&e.jsx("div",{className:"text-theme-text-secondary",children:e.jsx(De,{short:!0,dateString:i.body.updated})})]})]})}})},i.id)))}),e.jsx(Je,{type:t}),s.hasNextPage&&e.jsx(b,{onClick:()=>s.fetchNextPage(),type:"button",size:"md",intent:"secondary",emphasis:"subtle",className:"flex w-full items-center justify-center bg-theme-surface-primary",children:e.jsxs("div",{className:"flex items-center gap-1",children:[s.isFetchingNextPage&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Load more"]})})]})}function Ke({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(V,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:f(t)}),e.jsx(Qe,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",me(t)," from your server:"]})]})}function Ge({type:t}){const[r,s]=m.useState("");return e.jsxs(e.Fragment,{children:[e.jsx(Ke,{type:t}),e.jsx(He,{search:r,setSearch:s}),e.jsx(Ze,{search:r,type:t})]})}function He({setSearch:t,search:r}){const[s,a]=m.useState(r),n=m.useCallback(Te(t,500),[]);m.useEffect(()=>()=>{n.cancel()},[n]);function o(c){a(c),n(c)}return e.jsx(Q,{value:s,onChange:c=>o(c.target.value),placeholder:"Search..."})}function Je({type:t}){return e.jsx(K,{type:t,children:e.jsxs("button",{className:"w-full rounded-md border border-dashed border-neutral-300 bg-theme-surface-tertiary py-5 text-theme-text-secondary",children:["New ",f(t)]})})}function We({type:t}){const{watch:r,formState:{errors:s}}=u(),a=r(`components.${t}`),n=a&&a.id;return e.jsx("div",{"data-error":!n&&s.components&&s.components[t]?"true":"false","data-filled":n?"true":"false",className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm data-[error=true]:border-theme-text-error data-[filled=true]:border-success-400 data-[filled=true]:bg-theme-surface-primary data-[state=active]:bg-theme-surface-primary group-data-[state=active]/trigger:bg-theme-surface-primary group-data-[state=active]/trigger:shadow-md data-[error=false]:data-[filled=false]:group-data-[state=active]/trigger:border-theme-border-bold",children:n?e.jsx(Ye,{type:t}):e.jsx(Xe,{type:t})})}function Ye({type:t}){const{watch:r}=u(),s=r(`components.${t}`);return s&&s.id?e.jsxs("div",{className:"flex flex-col items-center gap-2 text-text-sm",children:[e.jsx("img",{width:24,height:24,src:s.logoUrl,alt:`Icon of ${s.name}`}),e.jsxs("div",{className:"space-y-0.25",children:[e.jsx("div",{className:"text-theme-text-primary",children:s.name}),e.jsx("div",{className:"text-text-xs text-theme-text-tertiary",children:f(t)})]})]}):null}function Xe({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:t}),e.jsx("span",{children:f(t)})]})}function et(){return e.jsxs("div",{className:"flex h-full flex-col justify-between space-y-5",children:[e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsx(rt,{}),e.jsx(tt,{})]}),e.jsx(st,{})]})}function tt(){const{watch:t,resetField:r}=u();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:"Add Components"}),e.jsxs("p",{className:"text-theme-text-secondary",children:["All stacks have at minimum an orchestrator and an artifact store."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/stack-components/component-guide",className:"link text-primary-400",children:"Learn more"})]})]}),e.jsx(H,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:C.map(s=>e.jsxs("div",{className:"relative",children:[e.jsx(J,{className:"group/trigger w-full",value:s,children:e.jsx(We,{type:s})}),t(`components.${s}.id`)&&e.jsx("button",{type:"button",onClick:a=>{a.preventDefault(),r(`components.${s}`)},className:"absolute right-[-12px] top-[-12px] flex aspect-square h-[28px] w-[28px] items-center justify-center rounded-rounded bg-theme-surface-primary",children:e.jsx($e,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},s))})})]})}function st(){const{formState:{isSubmitting:t}}=u(),r=!!be();return e.jsxs("div",{className:"flex items-center justify-end space-x-2 border-t border-theme-border-moderate p-5",children:[e.jsx(b,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(Ee,{to:B.stacks.create.index,children:"Cancel"})}),e.jsxs(b,{className:"flex items-center gap-1",disabled:t||r,size:"md",children:[(r||t)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Stack"]})]})}function rt(){var s;const{register:t,formState:{errors:r}}=u();return e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-text-sm",htmlFor:"stack-name",children:"Stack Name"}),e.jsx(Q,{id:"stack-name",className:`${r.stackName?"border-red-500":""} w-full`,placeholder:"zenml-stack",...t("stackName")}),r.stackName&&e.jsx("p",{className:"text-text-xs text-red-500",children:(s=r.stackName.message)==null?void 0:s.toString()})]})}async function at({workspaceId:t,payload:r}){const s=w(N.workspaces.stacks(t)),a=await fetch(s,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!a.ok){const n=await a.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while creating new stack");throw new S({status:a.status,statusText:a.statusText,message:n})}return a.json()}function nt(t){return ve({...t,mutationFn:async({workspaceId:r,payload:s})=>at({workspaceId:r,payload:s})})}async function it({workspaceId:t}){const r=w(N.workspaces.detail(t)),s=await fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(s.status===404&&q(),!s.ok){const a=await s.json().then(n=>Array.isArray(n.detail)?n.detail[1]:n.detail).catch(()=>`Error while fetching workspace ${t}`);throw new S({status:s.status,statusText:s.statusText,message:a})}return s.json()}const G={all:["workspaces"],workspaceDetail:t=>we({queryKey:[...G.all,t],queryFn:async()=>it({workspaceId:t})})};function ot(){const t=Ne({...G.workspaceDetail("default")}),r=ue(),{toast:s}=pe(),a=Oe(),n=Se(),o=nt({onSuccess:async()=>{n.invalidateQueries({queryKey:Ae.all}),a(B.stacks.overview)},onError:l=>{s({status:"error",emphasis:"subtle",icon:e.jsx(he,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:l.message,rounded:!0})}});function c(l){var p,h,x;const y=Object.entries(l.components).reduce((k,[j,L])=>(L&&(k[j]=[L.id]),k),{}),g={name:l.stackName,user:((p=r.data)==null?void 0:p.id)||"",workspace:((h=t.data)==null?void 0:h.id)||"",components:y};o.mutate({workspaceId:((x=t.data)==null?void 0:x.id)||"",payload:g})}const i=ge({resolver:Pe(qe),defaultValues:{components:{alerter:null,orchestrator:{},annotator:null,artifact_store:{},container_registry:null,data_validator:null,experiment_tracker:null,feature_store:null,model_registry:null,image_builder:null,model_deployer:null,step_operator:null},stackName:""}});return{createManualStack:c,form:i}}function Lt(){const[t,r]=m.useState(""),{createManualStack:s,form:a}=ot();return e.jsx(ke,{...a,children:e.jsx(W,{value:t,onValueChange:r,className:"h-full",children:e.jsxs("form",{onSubmit:a.handleSubmit(s),className:"flex h-[calc(100vh_-_4rem_-_4rem_-_2px)] flex-1 flex-col divide-y divide-theme-border-moderate xl:flex-row-reverse xl:divide-x xl:divide-y-0 xl:divide-x-reverse",children:[e.jsx(U,{className:"h-full flex-1 bg-theme-surface-primary",children:e.jsx(et,{})}),e.jsx(U,{children:e.jsx(Ve,{})})]})})})}function U({className:t,...r}){return e.jsx("div",{className:xe("w-full overflow-y-auto xl:w-1/2",t),...r})}export{Lt as default};
@@ -1 +1 @@
1
- import{r as l,j as e}from"./@radix-CFOkMR_E.js";import{u as m,S as f,a as S,b as j}from"./SuccessStep-CTSKN2lp.js";import{f as v,ao as b,aJ as g,i as w,h as x,A,a as C,b as U,an as P,S as _}from"./index-KsTz2dHG.js";import{A as N,a as k,P as z}from"./AwarenessChannel-BNg5uWgI.js";import{c as H}from"./@tanstack-k96lU_C-.js";import"./UpdatePasswordSchemas-BeCeaRW5.js";import"./check-circle-i56092KI.js";import"./url-rGEp5Umh.js";import"./@react-router-CO-OsFwI.js";import"./@reactflow-DIYUhKYX.js";import"./zod-BtSyGx4C.js";import"./index.esm-CbHNSeVw.js";import"./file-text-CqD_iu6l.js";import"./play-circle-CNtZKDnW.js";const h=l.createContext(null);function E({children:t,initialUser:r}){const[s,a]=l.useState(r||{});return e.jsx(h.Provider,{value:{user:s,setUser:a},children:t})}function d(){const t=l.useContext(h);if(t===null)throw new Error("useSurveyUserContext must be used within an SurveyUserProvider");return t}function F({user:t}){var o,u;const{setSurveyStep:r}=m(),{setUser:s}=d();function a({fullName:n,getUpdates:i,email:c}){s(p=>({...p,...c?{email:c}:{email:null},full_name:n,email_opted_in:i})),r(2)}return e.jsx(N,{email:(o=t.metadata)==null?void 0:o.email,fullName:(u=t.body)==null?void 0:u.full_name,submitHandler:a})}function Z(){const{user:t}=d(),{setSurveyStep:r}=m(),{toast:s}=v(),a=H(),{mutate:o}=b({onSuccess:async()=>{await a.invalidateQueries({queryKey:g()}),r(n=>n+1)},onError:n=>{n instanceof Error&&s({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:n.message,rounded:!0})}});function u({other:n,channels:i,otherVal:c}){const y={awareness_channels:n?[...i,c]:i};o({...t,user_metadata:{...t.user_metadata,...y}})}return e.jsx(k,{submitHandler:u})}function B({user:t}){const{setSurveyStep:r}=m(),{setUser:s}=d();function a({amountProductionModels:o,primaryUse:u}){const n={models_production:o,primary_use:u};s(i=>({...i,user_metadata:{...i.user_metadata,...n}})),r(3)}return e.jsx(z,{user:t,submitHandler:a})}const D="/assets/adam-e-y0WnB_.webp",L="/assets/alex-DcCuDHPg.webp",M="/assets/baris-C0ZrZ10g.webp",K="/assets/hamza-NKKOZz1I.webp",J="/assets/stefan-B08Ftbba.webp";function T(){const{setSurveyStep:t}=m();function r(){window.open("https://zenml.io/slack","_blank"),t(s=>s+1)}return e.jsxs("div",{className:"max-w-[540px] space-y-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Join The ZenML Slack Community"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Connect to our growing community and meet fellow ZenML enthusiasts, get support, and share your insights. Let's grow together!"})]}),e.jsx(I,{}),e.jsx(x,{onClick:()=>r(),className:"h-auto min-h-8 w-full justify-center py-1",intent:"primary",emphasis:"bold",size:"lg",children:"Join the ZenML Community and Continue"}),e.jsx(x,{intent:"secondary",emphasis:"minimal",onClick:()=>t(s=>s+1),className:"mx-auto justify-center text-neutral-500",size:"sm",children:"Skip this step"})]})}const q=[{name:"Adam",image:D},{name:"Hamza",image:K},{name:"Alex",image:L},{name:"Stefan",image:J},{name:"Baris",image:M}];function I(){return e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"flex items-center justify-center -space-x-[7px]",children:q.map(t=>e.jsxs(A,{size:"lg",type:"rounded",children:[e.jsx(C,{alt:`Portrait of ${t.name}`,src:t.image}),e.jsx(U,{size:"lg",children:t.name[0]})]},t.name))}),e.jsx("p",{className:"text-center text-text-xs text-theme-text-tertiary",children:"Adam Probst, Hamza Tahir, and +1,800 others have already joined"})]})}function O(){const{data:t,isPending:r,isError:s}=P({throwOnError:!0}),{surveyStep:a}=m();return s?null:r?e.jsx(_,{className:"h-[300px]"}):e.jsx(e.Fragment,{children:e.jsxs(E,{children:[e.jsx(f,{stepAmount:4}),a===1&&e.jsx(F,{user:t}),a===2&&e.jsx(B,{user:t}),a===3&&e.jsx(Z,{}),a===4&&e.jsx(T,{}),a===5&&e.jsx(S,{subHeader:"Your ZenML account is now updated",displayBody:!1,username:t.name})]})})}function ie(){return e.jsx("div",{children:e.jsx(j,{children:e.jsx(O,{})})})}export{ie as default};
1
+ import{r as l,j as e}from"./@radix-BXWm7HOa.js";import{u as m,S as f,a as S,b as j}from"./SuccessStep-DlkItqYG.js";import{f as v,ak as b,aK as g,i as w,h as x,A,a as C,b as U,aj as P,S as _}from"./index-DhIZtpxB.js";import{A as k,a as N,P as z}from"./AwarenessChannel-CLXo5rKM.js";import{c as H}from"./@tanstack-FmcYZMuX.js";import"./UpdatePasswordSchemas-oN4G3sKz.js";import"./check-circle-1_I207rW.js";import"./url-hcMJkz8p.js";import"./@react-router-l3lMcXA2.js";import"./@reactflow-CeVxyqYT.js";import"./zod-CnykDKJj.js";import"./index.esm-DT4uyn2i.js";import"./file-text-B9JibxTs.js";import"./play-circle-XSkLR12B.js";const h=l.createContext(null);function E({children:t,initialUser:r}){const[s,a]=l.useState(r||{});return e.jsx(h.Provider,{value:{user:s,setUser:a},children:t})}function d(){const t=l.useContext(h);if(t===null)throw new Error("useSurveyUserContext must be used within an SurveyUserProvider");return t}function F({user:t}){var o,u;const{setSurveyStep:r}=m(),{setUser:s}=d();function a({fullName:n,getUpdates:i,email:c}){s(p=>({...p,...c?{email:c}:{email:null},full_name:n,email_opted_in:i})),r(2)}return e.jsx(k,{email:(o=t.metadata)==null?void 0:o.email,fullName:(u=t.body)==null?void 0:u.full_name,submitHandler:a})}function Z(){const{user:t}=d(),{setSurveyStep:r}=m(),{toast:s}=v(),a=H(),{mutate:o}=b({onSuccess:async()=>{await a.invalidateQueries({queryKey:g()}),r(n=>n+1)},onError:n=>{n instanceof Error&&s({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:n.message,rounded:!0})}});function u({other:n,channels:i,otherVal:c}){const y={awareness_channels:n?[...i,c]:i};o({...t,user_metadata:{...t.user_metadata,...y}})}return e.jsx(N,{submitHandler:u})}function B({user:t}){const{setSurveyStep:r}=m(),{setUser:s}=d();function a({amountProductionModels:o,primaryUse:u}){const n={models_production:o,primary_use:u};s(i=>({...i,user_metadata:{...i.user_metadata,...n}})),r(3)}return e.jsx(z,{user:t,submitHandler:a})}const D="/assets/adam-e-y0WnB_.webp",L="/assets/alex-DcCuDHPg.webp",M="/assets/baris-C0ZrZ10g.webp",K="/assets/hamza-NKKOZz1I.webp",T="/assets/stefan-B08Ftbba.webp";function q(){const{setSurveyStep:t}=m();function r(){window.open("https://zenml.io/slack","_blank"),t(s=>s+1)}return e.jsxs("div",{className:"max-w-[540px] space-y-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Join The ZenML Slack Community"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Connect to our growing community and meet fellow ZenML enthusiasts, get support, and share your insights. Let's grow together!"})]}),e.jsx(J,{}),e.jsx(x,{onClick:()=>r(),className:"h-auto min-h-8 w-full justify-center py-1",intent:"primary",emphasis:"bold",size:"lg",children:"Join the ZenML Community and Continue"}),e.jsx(x,{intent:"secondary",emphasis:"minimal",onClick:()=>t(s=>s+1),className:"mx-auto justify-center text-neutral-500",size:"sm",children:"Skip this step"})]})}const I=[{name:"Adam",image:D},{name:"Hamza",image:K},{name:"Alex",image:L},{name:"Stefan",image:T},{name:"Baris",image:M}];function J(){return e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"flex items-center justify-center -space-x-[7px]",children:I.map(t=>e.jsxs(A,{size:"lg",type:"rounded",children:[e.jsx(C,{alt:`Portrait of ${t.name}`,src:t.image}),e.jsx(U,{size:"lg",children:t.name[0]})]},t.name))}),e.jsx("p",{className:"text-center text-text-xs text-theme-text-tertiary",children:"Adam Probst, Hamza Tahir, and +1,800 others have already joined"})]})}function O(){const{data:t,isPending:r,isError:s}=P({throwOnError:!0}),{surveyStep:a}=m();return s?null:r?e.jsx(_,{className:"h-[300px]"}):e.jsx(e.Fragment,{children:e.jsxs(E,{children:[e.jsx(f,{stepAmount:4}),a===1&&e.jsx(F,{user:t}),a===2&&e.jsx(B,{user:t}),a===3&&e.jsx(Z,{}),a===4&&e.jsx(q,{}),a===5&&e.jsx(S,{subHeader:"Your ZenML account is now updated",displayBody:!1,username:t.name})]})})}function ie(){return e.jsx("div",{children:e.jsx(j,{children:e.jsx(O,{})})})}export{ie as default};
@@ -1 +1 @@
1
- import{r as o,j as e}from"./@radix-CFOkMR_E.js";import{z as i,f as v,a6 as y,ap as j,a9 as S,i as C,u as k,B as w,S as E}from"./index-KsTz2dHG.js";import{u as F}from"./update-server-settings-mutation-f3ZT7psb.js";import{t as q}from"./zod-BtSyGx4C.js";import{c as A}from"./@tanstack-k96lU_C-.js";import{u as I,C as b}from"./index.esm-CbHNSeVw.js";import"./@react-router-CO-OsFwI.js";import"./@reactflow-DIYUhKYX.js";const _=i.object({announcements:i.boolean(),updates:i.boolean()});function K({settings:t}){var h,f;const c=o.useId(),d=o.useId(),{toast:l}=v(),u=A(),{mutate:g}=F({onError:s=>{u.invalidateQueries({queryKey:j()}),S(s)&&l({status:"error",emphasis:"subtle",icon:e.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:()=>{u.invalidateQueries({queryKey:j()}),l({status:"success",emphasis:"subtle",rounded:!0,description:"Settings updated successfully"})}}),{control:m,handleSubmit:p,watch:x}=I({resolver:q(_),defaultValues:{announcements:((h=t.body)==null?void 0:h.display_announcements)??void 0,updates:((f=t.body)==null?void 0:f.display_updates)??void 0}});function N({announcements:s,updates:a}){g({display_announcements:s,display_updates:a})}return o.useEffect(()=>{const s=x(()=>p(N)());return()=>s.unsubscribe()},[p,x]),e.jsx("form",{id:"create-user-form",className:"space-y-5",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(b,{control:m,name:"announcements",render:({field:{value:s,onChange:a,ref:n}})=>e.jsx(y,{ref:n,checked:s,onCheckedChange:r=>{a(!!r)},id:c})}),e.jsxs("label",{htmlFor:c,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Announcements"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Enable Announcements for important ZenML updates, surveys, and feedback opportunities."})]})]}),e.jsx("hr",{}),e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(b,{control:m,name:"updates",render:({field:{value:s,onChange:a,ref:n}})=>e.jsx(y,{ref:n,checked:s,onCheckedChange:r=>{a(!!r)},id:d})}),e.jsxs("label",{htmlFor:d,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Updates"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Activate Updates to receive the latest ZenML news and feature releases."})]})]})]})})}function P(){const{data:t}=k({throwOnError:!0});return e.jsxs(w,{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Notifications"}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"ZenML comes equipped with default widgets designed to enhance your experience by analyzing usage patterns, gathering your feedback, and ensuring you stay informed about our latest updates and features."})]}),e.jsx("div",{className:"",children:t?e.jsx(K,{settings:t}):e.jsx(E,{className:"h-[250px] w-full"})})]})}export{P as default};
1
+ import{r as o,j as e}from"./@radix-BXWm7HOa.js";import{z as i,f as v,a6 as y,al as j,a9 as S,i as C,u as k,B as w,S as E}from"./index-DhIZtpxB.js";import{u as F}from"./update-server-settings-mutation-B8GB_ubU.js";import{t as q}from"./zod-CnykDKJj.js";import{c as A}from"./@tanstack-FmcYZMuX.js";import{u as I,C as b}from"./index.esm-DT4uyn2i.js";import"./@react-router-l3lMcXA2.js";import"./@reactflow-CeVxyqYT.js";const _=i.object({announcements:i.boolean(),updates:i.boolean()});function K({settings:t}){var h,f;const c=o.useId(),d=o.useId(),{toast:l}=v(),u=A(),{mutate:g}=F({onError:s=>{u.invalidateQueries({queryKey:j()}),S(s)&&l({status:"error",emphasis:"subtle",icon:e.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:()=>{u.invalidateQueries({queryKey:j()}),l({status:"success",emphasis:"subtle",rounded:!0,description:"Settings updated successfully"})}}),{control:m,handleSubmit:p,watch:x}=I({resolver:q(_),defaultValues:{announcements:((h=t.body)==null?void 0:h.display_announcements)??void 0,updates:((f=t.body)==null?void 0:f.display_updates)??void 0}});function N({announcements:s,updates:a}){g({display_announcements:s,display_updates:a})}return o.useEffect(()=>{const s=x(()=>p(N)());return()=>s.unsubscribe()},[p,x]),e.jsx("form",{id:"create-user-form",className:"space-y-5",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(b,{control:m,name:"announcements",render:({field:{value:s,onChange:a,ref:n}})=>e.jsx(y,{ref:n,checked:s,onCheckedChange:r=>{a(!!r)},id:c})}),e.jsxs("label",{htmlFor:c,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Announcements"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Enable Announcements for important ZenML updates, surveys, and feedback opportunities."})]})]}),e.jsx("hr",{}),e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(b,{control:m,name:"updates",render:({field:{value:s,onChange:a,ref:n}})=>e.jsx(y,{ref:n,checked:s,onCheckedChange:r=>{a(!!r)},id:d})}),e.jsxs("label",{htmlFor:d,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Updates"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Activate Updates to receive the latest ZenML news and feature releases."})]})]})]})})}function P(){const{data:t}=k({throwOnError:!0});return e.jsxs(w,{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Notifications"}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"ZenML comes equipped with default widgets designed to enhance your experience by analyzing usage patterns, gathering your feedback, and ensuring you stay informed about our latest updates and features."})]}),e.jsx("div",{className:"",children:t?e.jsx(K,{settings:t}):e.jsx(E,{className:"h-[250px] w-full"})})]})}export{P as default};
@@ -1 +1 @@
1
- import{j as e}from"./@radix-CFOkMR_E.js";import{u as n,A as o,a as i,g as d,b as c,S as a,c as x,d as m,B as u,r as f}from"./index-KsTz2dHG.js";import{C as h}from"./CodeSnippet-Cyp7f4dM.js";import{L as j}from"./@react-router-CO-OsFwI.js";import"./@tanstack-k96lU_C-.js";import"./@reactflow-DIYUhKYX.js";import"./copy-BXNk6BjL.js";const p="/assets/cloud-squares-DeRLMopf.svg";function v(){var r,t,l;const{data:s}=n({throwOnError:!0});return e.jsx("div",{className:"w-full items-center border-b border-theme-border-moderate bg-white py-5",children:e.jsx("div",{className:"layout-container flex flex-col flex-wrap items-center justify-between md:flex-row",children:e.jsxs("div",{className:"flex flex-col items-center gap-5 md:flex-row",children:[s?e.jsxs(o,{size:"xxl",type:"square",children:[e.jsx(i,{alt:"Logo displayed for the server",src:d(((r=s.body)==null?void 0:r.server_name)||"default",64)}),e.jsx(c,{size:"xxl",children:((t=s.body)==null?void 0:t.server_name[0])||"D"})]}):e.jsx(a,{className:"h-[96px] w-[96px]"}),e.jsx("div",{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[s?e.jsx("h1",{className:"mb-1 text-display-xs font-semibold",children:((l=s.body)==null?void 0:l.server_name)||"default"}):e.jsx(a,{className:"h-full w-8"}),e.jsx("div",{className:"flex flex-row flex-wrap gap-0.5",children:e.jsx(w,{})})]})})]})})})}function w(){const{data:s,isError:r,isPending:t}=x({throwOnError:!0});return r?null:t?e.jsx(a,{className:"w-6"}):e.jsxs("div",{className:"flex h-6 items-center gap-0.5 rounded-md border border-theme-border-moderate px-1 py-0.5 text-text-sm text-theme-text-secondary",children:[e.jsx(m,{className:"h-4 w-4 fill-theme-text-brand"}),s.version]})}function Z(){return e.jsxs("div",{children:[e.jsx(v,{}),e.jsx("div",{className:"layout-container py-5",children:e.jsx(g,{})})]})}function g(){return e.jsxs(u,{className:"flex flex-col-reverse overflow-hidden lg:flex-row",children:[e.jsxs("div",{className:"w-full px-7 py-5 lg:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Welcome to ZenML"}),e.jsxs("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:["You successfully installed ZenML dashboard. ",e.jsx("br",{}),"Now you can get started with your new ZenML server.",e.jsx("br",{}),"To get started"," ",e.jsx(j,{className:"link text-theme-text-brand",to:f.onboarding,children:"checkout the onboarding guide"}),"."]}),e.jsx("hr",{className:"mb-5 mt-5 w-[100px]"}),e.jsxs("div",{className:"",children:[e.jsx("p",{className:"mb-1 text-text-sm",children:"Copy your ZenML server URL"}),e.jsx("div",{className:"",children:e.jsx(h,{codeClasses:"truncate",className:"truncate",code:`zenml connect --url=${window.location.origin}`})})]})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx("img",{alt:"illustration of different purple squares",src:p,className:"h-full w-full"})})]})}export{Z as default};
1
+ import{j as e}from"./@radix-BXWm7HOa.js";import{u as n,A as o,a as i,g as d,b as c,S as a,c as x,d as m,B as u,r as f}from"./index-DhIZtpxB.js";import{C as h}from"./CodeSnippet-D0VLxT2A.js";import{L as j}from"./@react-router-l3lMcXA2.js";import"./@tanstack-FmcYZMuX.js";import"./@reactflow-CeVxyqYT.js";import"./copy-f3XGPPxt.js";const p="/assets/cloud-squares-DeRLMopf.svg";function v(){var r,t,l;const{data:s}=n({throwOnError:!0});return e.jsx("div",{className:"w-full items-center border-b border-theme-border-moderate bg-white py-5",children:e.jsx("div",{className:"layout-container flex flex-col flex-wrap items-center justify-between md:flex-row",children:e.jsxs("div",{className:"flex flex-col items-center gap-5 md:flex-row",children:[s?e.jsxs(o,{size:"xxl",type:"square",children:[e.jsx(i,{alt:"Logo displayed for the server",src:d(((r=s.body)==null?void 0:r.server_name)||"default",64)}),e.jsx(c,{size:"xxl",children:((t=s.body)==null?void 0:t.server_name[0])||"D"})]}):e.jsx(a,{className:"h-[96px] w-[96px]"}),e.jsx("div",{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[s?e.jsx("h1",{className:"mb-1 text-display-xs font-semibold",children:((l=s.body)==null?void 0:l.server_name)||"default"}):e.jsx(a,{className:"h-full w-8"}),e.jsx("div",{className:"flex flex-row flex-wrap gap-0.5",children:e.jsx(w,{})})]})})]})})})}function w(){const{data:s,isError:r,isPending:t}=x({throwOnError:!0});return r?null:t?e.jsx(a,{className:"w-6"}):e.jsxs("div",{className:"flex h-6 items-center gap-0.5 rounded-md border border-theme-border-moderate px-1 py-0.5 text-text-sm text-theme-text-secondary",children:[e.jsx(m,{className:"h-4 w-4 fill-theme-text-brand"}),s.version]})}function Z(){return e.jsxs("div",{children:[e.jsx(v,{}),e.jsx("div",{className:"layout-container py-5",children:e.jsx(g,{})})]})}function g(){return e.jsxs(u,{className:"flex flex-col-reverse overflow-hidden lg:flex-row",children:[e.jsxs("div",{className:"w-full px-7 py-5 lg:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Welcome to ZenML"}),e.jsxs("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:["You successfully installed ZenML dashboard. ",e.jsx("br",{}),"Now you can get started with your new ZenML server.",e.jsx("br",{}),"To get started"," ",e.jsx(j,{className:"link text-theme-text-brand",to:f.onboarding,children:"checkout the onboarding guide"}),"."]}),e.jsx("hr",{className:"mb-5 mt-5 w-[100px]"}),e.jsxs("div",{className:"",children:[e.jsx("p",{className:"mb-1 text-text-sm",children:"Copy your ZenML server URL"}),e.jsx("div",{className:"",children:e.jsx(h,{codeClasses:"truncate",className:"truncate",code:`zenml connect --url=${window.location.origin}`})})]})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx("img",{alt:"illustration of different purple squares",src:p,className:"h-full w-full"})})]})}export{Z as default};
@@ -0,0 +1 @@
1
+ import{r as _,j as t}from"./@radix-BXWm7HOa.js";import{b as Xe,u as P,C as M,S as et,a as ce,P as le,W as tt,L as rt}from"./ProviderRadio-BBqkIuTd.js";import{B as st,z as h,k as Y,l as J,j as ve,n as Ee,F as X,S as ee,I as B,h as w,am as nt,an as ot,ao as it,ap as at,aF as ct,aq as lt,a6 as ut,a0 as dt,a2 as ft,a4 as mt,d as ht,y as xt,f as Me,i as pt,r as yt,A as jt,b as gt,Y as _t}from"./index-DhIZtpxB.js";import{t as $}from"./zod-CnykDKJj.js";import{b as y,C as b,u as W,F as V,a as vt}from"./index.esm-DT4uyn2i.js";import{C as Se,a as St,S as bt,s as Re}from"./sharedSchema-BoYx_B_L.js";import{R as K,a as H}from"./RadioItem-xLhXoiFV.js";import{q as Le,a as te,b as qe,j as Be,c as Ct}from"./@tanstack-FmcYZMuX.js";import{o as wt,s as Nt}from"./url-hcMJkz8p.js";import{S as Ft}from"./Lock-CNyJvf2r.js";import{S as kt}from"./plus-FB9-lEq_.js";import{S as Pt}from"./trash-Cd5CSFqA.js";import{S as At}from"./dots-horizontal-sKQlWEni.js";import{T as be}from"./Tick-uxv80Q6a.js";import{C as zt}from"./persist-3-5nOJ6m.js";import{e as Ot}from"./components-Br2ezRib.js";import{L as Tt}from"./@react-router-l3lMcXA2.js";import"./aws-0_3UsPif.js";import"./@reactflow-CeVxyqYT.js";import"./stack-detail-query-B-US_-wa.js";import"./database-cXYNX9tt.js";import"./layout-D6oiSbfd.js";const $e=_.createContext(null);function It({children:e}){const[r,s]=_.useState({stackName:null,createdStackId:null,connectorConfig:null,fullstackResources:null,artifactStoreConfig:null,registryConfig:null,orchestratorConfig:null});return t.jsx($e.Provider,{value:{data:r,setData:s},children:e})}function C(){const e=_.useContext($e);if(e===null)throw new Error("useExistingInfraContext must be used within an ExistingInfraProvider");return e}const We=_.createContext(null);function ke({children:e,initialSchema:r}){const[s,n]=_.useState(r);return t.jsx(We.Provider,{value:{schema:s,setSchema:n},children:e})}function re(){const e=_.useContext(We);if(!e)throw new Error("useSchemaContext must be used within a SchemaProvider");return e}function T({children:e}){return t.jsx(st,{className:"w-full",children:e})}function I({children:e}){return t.jsx("div",{className:"border-b border-theme-border-moderate px-5 py-3 text-display-xs font-semibold",children:e})}function D({children:e}){return t.jsx("div",{className:"p-5",children:e})}function Dt({children:e}){return t.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-theme-border-moderate p-5",children:e})}function E({children:e,displayCancel:r=!0}){return t.jsxs(Dt,{children:[r&&t.jsx(Xe,{}),e]})}const Et=h.object({resourceId:h.string().min(1),flavor:h.string()});function Mt(){return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Se,{type:"artifact_store",className:"h-5 w-5 fill-primary-400"}),"Select your Artifact Store"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Choose one of the storages for the new Artifact Store."})]})}var Ve=Symbol.for("immer-nothing"),Pe=Symbol.for("immer-draftable"),j=Symbol.for("immer-state");function v(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var A=Object.getPrototypeOf;function z(e){return!!e&&!!e[j]}function F(e){var r;return e?Ze(e)||Array.isArray(e)||!!e[Pe]||!!((r=e.constructor)!=null&&r[Pe])||ne(e)||oe(e):!1}var Rt=Object.prototype.constructor.toString();function Ze(e){if(!e||typeof e!="object")return!1;const r=A(e);if(r===null)return!0;const s=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return s===Object?!0:typeof s=="function"&&Function.toString.call(s)===Rt}function U(e,r){se(e)===0?Reflect.ownKeys(e).forEach(s=>{r(s,e[s],e)}):e.forEach((s,n)=>r(n,s,e))}function se(e){const r=e[j];return r?r.type_:Array.isArray(e)?1:ne(e)?2:oe(e)?3:0}function he(e,r){return se(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function Ke(e,r,s){const n=se(e);n===2?e.set(r,s):n===3?e.add(s):e[r]=s}function Lt(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function ne(e){return e instanceof Map}function oe(e){return e instanceof Set}function N(e){return e.copy_||e.base_}function xe(e,r){if(ne(e))return new Map(e);if(oe(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=Ze(e);if(r===!0||r==="class_only"&&!s){const n=Object.getOwnPropertyDescriptors(e);delete n[j];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const a=o[i],u=n[a];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[a]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[a]})}return Object.create(A(e),n)}else{const n=A(e);if(n!==null&&s)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function Ce(e,r=!1){return ie(e)||z(e)||!F(e)||(se(e)>1&&(e.set=e.add=e.clear=e.delete=qt),Object.freeze(e),r&&Object.entries(e).forEach(([s,n])=>Ce(n,!0))),e}function qt(){v(2)}function ie(e){return Object.isFrozen(e)}var Bt={};function k(e){const r=Bt[e];return r||v(0,e),r}var R;function He(){return R}function $t(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ae(e,r){r&&(k("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function pe(e){ye(e),e.drafts_.forEach(Wt),e.drafts_=null}function ye(e){e===R&&(R=e.parent_)}function ze(e){return R=$t(R,e)}function Wt(e){const r=e[j];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Oe(e,r){r.unfinalizedDrafts_=r.drafts_.length;const s=r.drafts_[0];return e!==void 0&&e!==s?(s[j].modified_&&(pe(r),v(4)),F(e)&&(e=Q(r,e),r.parent_||G(r,e)),r.patches_&&k("Patches").generateReplacementPatches_(s[j].base_,e,r.patches_,r.inversePatches_)):e=Q(r,s,[]),pe(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==Ve?e:void 0}function Q(e,r,s){if(ie(r))return r;const n=r[j];if(!n)return U(r,(o,i)=>Te(e,n,r,o,i,s)),r;if(n.scope_!==e)return r;if(!n.modified_)return G(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),U(i,(u,f)=>Te(e,n,o,u,f,s,a)),G(e,o,!1),s&&e.patches_&&k("Patches").generatePatches_(n,s,e.patches_,e.inversePatches_)}return n.copy_}function Te(e,r,s,n,o,i,a){if(z(o)){const u=i&&r&&r.type_!==3&&!he(r.assigned_,n)?i.concat(n):void 0,f=Q(e,o,u);if(Ke(s,n,f),z(f))e.canAutoFreeze_=!1;else return}else a&&s.add(o);if(F(o)&&!ie(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Q(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(s,n)&&G(e,o)}}function G(e,r,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ce(r,s)}function Vt(e,r){const s=Array.isArray(e),n={type_:s?1:0,scope_:r?r.scope_:He(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=we;s&&(o=[n],i=L);const{revoke:a,proxy:u}=Proxy.revocable(o,i);return n.draft_=u,n.revoke_=a,u}var we={get(e,r){if(r===j)return e;const s=N(e);if(!he(s,r))return Zt(e,s,r);const n=s[r];return e.finalized_||!F(n)?n:n===ue(e.base_,r)?(de(e),e.copy_[r]=ge(n,e)):n},has(e,r){return r in N(e)},ownKeys(e){return Reflect.ownKeys(N(e))},set(e,r,s){const n=Ue(N(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,s),!0;if(!e.modified_){const o=ue(N(e),r),i=o==null?void 0:o[j];if(i&&i.base_===s)return e.copy_[r]=s,e.assigned_[r]=!1,!0;if(Lt(s,o)&&(s!==void 0||he(e.base_,r)))return!0;de(e),je(e)}return e.copy_[r]===s&&(s!==void 0||r in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=s,e.assigned_[r]=!0),!0},deleteProperty(e,r){return ue(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,de(e),je(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const s=N(e),n=Reflect.getOwnPropertyDescriptor(s,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:s[r]}},defineProperty(){v(11)},getPrototypeOf(e){return A(e.base_)},setPrototypeOf(){v(12)}},L={};U(we,(e,r)=>{L[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});L.deleteProperty=function(e,r){return L.set.call(this,e,r,void 0)};L.set=function(e,r,s){return we.set.call(this,e[0],r,s,e[0])};function ue(e,r){const s=e[j];return(s?N(s):e)[r]}function Zt(e,r,s){var o;const n=Ue(r,s);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Ue(e,r){if(!(r in e))return;let s=A(e);for(;s;){const n=Object.getOwnPropertyDescriptor(s,r);if(n)return n;s=A(s)}}function je(e){e.modified_||(e.modified_=!0,e.parent_&&je(e.parent_))}function de(e){e.copy_||(e.copy_=xe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Kt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,s,n)=>{if(typeof r=="function"&&typeof s!="function"){const i=s;s=r;const a=this;return function(f=i,...d){return a.produce(f,c=>s.call(this,c,...d))}}typeof s!="function"&&v(6),n!==void 0&&typeof n!="function"&&v(7);let o;if(F(r)){const i=ze(this),a=ge(r,void 0);let u=!0;try{o=s(a),u=!1}finally{u?pe(i):ye(i)}return Ae(i,n),Oe(o,i)}else if(!r||typeof r!="object"){if(o=s(r),o===void 0&&(o=r),o===Ve&&(o=void 0),this.autoFreeze_&&Ce(o,!0),n){const i=[],a=[];k("Patches").generateReplacementPatches_(r,o,i,a),n(i,a)}return o}else v(1,r)},this.produceWithPatches=(r,s)=>{if(typeof r=="function")return(a,...u)=>this.produceWithPatches(a,f=>r(f,...u));let n,o;return[this.produce(r,s,(a,u)=>{n=a,o=u}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){F(e)||v(8),z(e)&&(e=Ht(e));const r=ze(this),s=ge(e,void 0);return s[j].isManual_=!0,ye(r),s}finishDraft(e,r){const s=e&&e[j];(!s||!s.isManual_)&&v(9);const{scope_:n}=s;return Ae(n,r),Oe(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,r){let s;for(s=r.length-1;s>=0;s--){const o=r[s];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}s>-1&&(r=r.slice(s+1));const n=k("Patches").applyPatches_;return z(e)?n(e,r):this.produce(e,o=>n(o,r))}};function ge(e,r){const s=ne(e)?k("MapSet").proxyMap_(e,r):oe(e)?k("MapSet").proxySet_(e,r):Vt(e,r);return(r?r.scope_:He()).drafts_.push(s),s}function Ht(e){return z(e)||v(10,e),Qe(e)}function Qe(e){if(!F(e)||ie(e))return e;const r=e[j];let s;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,s=xe(e,r.scope_.immer_.useStrictShallowCopy_)}else s=xe(e,!0);return U(s,(n,o)=>{Ke(s,n,Qe(o))}),r&&(r.finalized_=!1),s}var g=new Kt,O=g.produce;g.produceWithPatches.bind(g);g.setAutoFreeze.bind(g);g.setUseStrictShallowCopy.bind(g);g.applyPatches.bind(g);g.createDraft.bind(g);g.finishDraft.bind(g);function Ut(){const{data:e,setData:r}=C(),{setCurrentStep:s}=P();if(!e.fullstackResources)return s(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const n=e.fullstackResources.components_resources_info.artifact_store,o=n.flatMap(a=>a.accessible_by_service_connector.map(u=>({...a,value:u})));function i({flavor:a,resourceId:u}){const f=n.find(d=>d.flavor===a);f&&(r(d=>O(d,c=>{c.artifactStoreConfig={flavor:a,configuration:Object.fromEntries(Object.keys(f.required_configuration||{}).map(m=>[m,u])),service_connector_resource_id:u}})),s(d=>d+1))}return{handleFormSubmit:i,flattenedInstances:o}}async function Qt(e){const r=Y(J.flavors.all)+(e?`?${wt(e)}`:""),s=await ve(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Ee(),!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching flavors");throw new X({status:s.status,statusText:s.statusText,message:n})}return s.json()}const Ge={all:["flavors"],flavorList:e=>Le({queryKey:[...Ge.all,e],queryFn:async()=>Qt(e)})};function q({flavor:e,type:r,width:s=32,height:n=32,...o}){var a;const i=te({...Ge.flavorList({name:e,type:r})});return i.isError?null:i.isPending?t.jsx(ee,{style:{height:`${n}px`,width:`${s}px`}}):t.jsx("img",{width:s,height:n,alt:`${e} logo`,...o,src:Nt(((a=i.data.items[0].body)==null?void 0:a.logo_url)??"")})}const Gt="artifact_store";function Yt(){const[e,r]=_.useState(""),{control:s,setValue:n,handleSubmit:o,register:i,watch:a,trigger:u,reset:f}=y(),{flattenedInstances:d,handleFormSubmit:c}=Ut(),m=d.filter(l=>l.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(B,{placeholder:"Search...",onChange:l=>{f(),r(l.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...i("flavor")}),t.jsx("ul",{className:"space-y-1",children:m.map(l=>t.jsx("li",{children:t.jsx(b,{name:"resourceId",control:s,render:({field:{onChange:x,...p}})=>t.jsxs(K,{"data-state":a("resourceId")===l.value?"selected":"unselected",htmlFor:l.value,children:[t.jsx(H,{id:l.value,type:"radio",...p,onChange:S=>{n("flavor",l.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),x(S.target.value),u()},value:l.value,name:"connector-radio"}),t.jsx(q,{type:Gt,width:24,height:24,flavor:l.flavor})," ",t.jsx("span",{children:l.value})]})})},l.value))})]})]})}function Jt(){const e=W({resolver:$(Et),shouldUnregister:!0});return t.jsx(V,{...e,children:t.jsxs(T,{children:[t.jsx(I,{children:"Artifact Store"}),t.jsx(D,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Mt,{}),t.jsx(Yt,{})]})}),t.jsx(E,{children:t.jsx(Xt,{})})]})})}function Xt(){const e=y();return t.jsx(w,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}function er(e,r){const s=Object.keys(e).reduce((n,o)=>{var d,c;const i=e[o];let a;const u=Ye(o,r);switch(i.type||((c=(d=i.anyOf)==null?void 0:d.find(m=>m.type!==null))==null?void 0:c.type)){case"string":a=h.string().trim();break;case"boolean":a=h.boolean();break;case"array":a=h.array(h.string());break;default:a=h.string();break}return u&&(a=a.optional()),!u&&i.type==="string"&&a instanceof h.ZodString&&(a=a.min(1,"Required")),n[o]=a,n},{});return h.object(s)}function Ye(e,r){return!r.includes(e)}async function tr(e){const r=Y(J.serviceConnectors.types.detail(e)),s=await ve(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Ee(),!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new X({status:s.status,statusText:s.statusText,message:n})}return s.json()}const Ne={connectorTypes:["service_connector_types"],serviceConnectorTypeDetail:e=>Le({queryKey:[...Ne.connectorTypes,e],queryFn:async()=>tr(e)})},Je=h.object({authMethod:h.string().min(1),stackName:St});function rr(){var c,m;const{data:e}=C(),{setCurrentStep:r}=P(),{control:s,watch:n,resetField:o}=y(),{setSchema:i}=re(),a=te({...Ne.serviceConnectorTypeDetail(((c=e.connectorConfig)==null?void 0:c.type)||"")});if(a.isError)return null;if(a.isPending)return t.jsx(ee,{className:"h-[40px] w-[100px]"});const u=a.data.auth_methods.filter(l=>l.auth_method!=="implicit").map(l=>({name:l.name,auth_method:l.auth_method}));if(!((m=e.connectorConfig)!=null&&m.type)){r(1);return}function f(){var Fe;const l=n("authMethod"),x=(Fe=a.data)==null?void 0:Fe.auth_methods.find(ae=>ae.auth_method===l);if(!x)return;const p=er(x.config_schema.properties,x.config_schema.required);i(Je.merge(p)),Object.keys(p.shape).forEach(ae=>o(ae))}const d=e.connectorConfig.type||"";return t.jsx(b,{control:s,name:"authMethod",render:({field:{onChange:l,ref:x,...p}})=>t.jsxs(nt,{...p,onValueChange:S=>{l(S),f()},children:[t.jsx(ot,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(it,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(at,{children:t.jsx(ct,{viewportClassName:"max-h-[300px]",children:u.map(S=>t.jsx(lt,{className:"space-x-2",value:S.auth_method,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(M,{provider:d}),t.jsx("div",{children:S.name})]})},S.auth_method))})})]})})}function sr(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(bt,{className:"h-5 w-5 fill-primary-400"}),"Select an Authentication Method"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your resources for seamless integration of cloud services into your ML pipelines."})]}),t.jsx(rr,{})]})}function nr({schema:e,name:r,isOptional:s}){var o,i;const n=e.type||((i=(o=e.anyOf)==null?void 0:o.find(a=>a.type!==null))==null?void 0:i.type);if(!n)return null;switch(n){case"string":return t.jsx(or,{isOptional:s,schema:e,name:r});case"array":return t.jsx(ir,{isOptional:s,schema:e,name:r});case"boolean":return t.jsx(ar,{isOptional:s,schema:e,name:r});default:return null}}function or({name:e,schema:r,isOptional:s}){const n=y(),o=r.format==="password";return t.jsxs("div",{children:[t.jsxs("label",{htmlFor:e,className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx(b,{defaultValue:"",control:n.control,name:e,render:({field:i})=>t.jsx(B,{inputSize:"md",className:"w-full",id:e,...i,type:o?"password":"text"})})]})}function ir({name:e,schema:r,isOptional:s}){const{control:n}=y(),{fields:o,append:i,remove:a}=vt({name:e,control:n});return t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx("ul",{className:"space-y-5",children:o.map((u,f)=>t.jsxs("li",{className:"flex w-full items-center gap-4 [&>div]:w-full",children:[t.jsx(b,{defaultValue:"",name:`${e}.${f}`,render:({field:d})=>t.jsx(B,{className:"w-full flex-1",inputSize:"md",...d})}),t.jsxs(w,{className:"h-7 w-7",emphasis:"subtle",size:"sm",type:"button",onClick:()=>a(f),children:[t.jsx(Pt,{className:"h-5 w-5 fill-primary-900"}),t.jsx("span",{className:"sr-only",children:"remove"})]})]},u.id))}),t.jsxs(w,{className:"h-7 w-7",emphasis:"subtle",type:"button",onClick:()=>i(""),children:[t.jsx(kt,{className:"h-5 w-5 fill-primary-900"}),t.jsx("p",{className:"sr-only",children:"Add Item"})]})]})}function ar({name:e,schema:r,isOptional:s}){const n=y(),o=r.default||!1;return t.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t.jsxs("label",{htmlFor:e,className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx(b,{defaultValue:o,control:n.control,name:e,render:({field:{onChange:i,value:a,...u}})=>t.jsx(ut,{id:e,checked:a,onCheckedChange:f=>i(f),...u})})]})}function cr(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Ft,{className:"h-5 w-5 fill-primary-400"}),"Add your Configuration"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),t.jsx(lr,{})]})}function lr(){var f,d;const{data:e}=C(),{watch:r}=y(),s=te({...Ne.serviceConnectorTypeDetail(((f=e.connectorConfig)==null?void 0:f.type)||"")}),n=r("authMethod"),o=(d=s.data)==null?void 0:d.auth_methods.find(c=>c.auth_method===n);if(s.isError)return null;if(s.isPending)return t.jsx(ee,{className:"h-[200px] w-full"});if(!o)return null;const i=o.config_schema.properties,a=o.config_schema.required,u=Object.entries(i).sort(([c],[m])=>a.includes(c)&&!a.includes(m)?-1:!a.includes(c)&&a.includes(m)?1:0);return t.jsx("div",{className:"space-y-5",children:u.map(([c,m])=>t.jsx(nr,{isOptional:Ye(c,a),name:c,schema:m},c))})}function ur({open:e,loadingComponents:r}){var n,o;const{data:s}=C();return(n=s.connectorConfig)!=null&&n.type?t.jsx(dt,{open:e,children:t.jsxs(ft,{onPointerDownOutside:i=>i.preventDefault(),onEscapeKeyDown:i=>i.preventDefault(),className:"max-w-[600px]",children:[t.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:t.jsx(mt,{className:"text-text-lg",children:"Connecting and loading your components..."})}),t.jsxs("div",{className:"flex h-[200px] items-center justify-center gap-5 bg-primary-50",children:[t.jsx(ht,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(At,{className:"h-5 w-5 fill-theme-text-tertiary"})}),t.jsx(M,{className:"h-[60px] w-[60px]",provider:s.connectorConfig.type})]}),t.jsxs("div",{className:"flex flex-col gap-1 px-7 pb-6 pt-5",children:[t.jsxs("p",{className:"text-theme-text-secondary",children:["We're securely connecting to"," ",t.jsx("span",{className:"capitalize",children:(o=s.connectorConfig)==null?void 0:o.type})," and retrieving your custom components. This process typically takes about 30-60 seconds."]}),t.jsx(dr,{loadingComponents:r})]})]})}):null}function dr({loadingComponents:e}){const[r,s]=_.useState(!0),[n,o]=_.useState(!0);return _.useEffect(()=>{const i=setTimeout(()=>{s(!1)},Math.floor(Math.random()*1e3)+500),a=setTimeout(()=>{o(!1)},1500);return()=>{clearTimeout(i),clearTimeout(a)}},[]),t.jsxs("ul",{className:"mt-3 space-y-3 text-theme-text-secondary",children:[t.jsxs(me,{children:[t.jsx(fe,{loading:r}),"Establishing a secure connection"]}),t.jsxs(me,{children:[t.jsx(fe,{loading:n}),"Authenticating your account"]}),t.jsxs(me,{children:[t.jsx(fe,{loading:e}),"Fetching your existing components"]})]})}function fe({loading:e}){return e?t.jsx(xt,{className:"h-5 w-5 border-2"}):t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"})}function me({children:e}){return t.jsx("li",{className:"flex items-center gap-1",children:e})}async function fr({payload:e}){const r=Y(J.serviceConnectors.fullStackResources),s=await ve(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new X({status:s.status,statusText:s.statusText,message:n})}return s.json()}function mr(e){return qe({...e,mutationFn:async({payload:r})=>fr({payload:r})})}function hr(e){return new Promise(r=>setTimeout(r,e))}function xr(){const{setCurrentStep:e}=P(),[r,s]=_.useState(!0),{toast:n}=Me(),{setData:o,data:i}=C(),a=mr({onSuccess:async f=>{o(d=>O(d,c=>{c.fullstackResources=f})),s(!1),await hr(200),e(d=>d+1)},onError:f=>{n({status:"error",emphasis:"subtle",description:f.message,rounded:!0})}});return{handleFormSubmit:({authMethod:f,stackName:d,...c})=>{Object.keys(c).forEach(l=>{(c[l]===""||c[l]===null||c[l]===void 0||Array.isArray(c[l])&&c[l].length===0)&&delete c[l]});const m=O(i,l=>{l.stackName=d,l.connectorConfig&&(l.connectorConfig.auth_method=f,l.connectorConfig.configuration={...c})});o(m),m.connectorConfig&&a.mutate({payload:m.connectorConfig})},fullStackResources:a,loadingComponents:r}}function pr(){const{handleSubmit:e,formState:{isSubmitting:r}}=y(),{handleFormSubmit:s,fullStackResources:n,loadingComponents:o}=xr();return t.jsxs("form",{onSubmit:e(s),id:"connect-form",children:[t.jsx(ur,{loadingComponents:o,open:r||n.isPending}),t.jsx(sr,{}),t.jsx(et,{}),t.jsx(cr,{})]})}function yr(){const{schema:e}=re(),r=W({shouldUnregister:!0,mode:"onChange",resolver:$(e)});return t.jsx(V,{...r,children:t.jsxs(T,{children:[t.jsx(I,{children:"Connect to your Cloud"}),t.jsx(D,{children:t.jsx(pr,{})}),t.jsx(E,{children:t.jsx(jr,{})})]})})}function jr(){const{formState:{isValid:e,isSubmitting:r}}=y(),s=!!Be();return t.jsx(w,{className:"justify-center gap-2",disabled:!e||s||r,form:"connect-form",size:"md",children:s||r?"Loading...":"Next"})}async function gr({workspaceId:e,payload:r}){const s=Y(J.workspaces.fullStack(e)),n=await fetch(s,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){const o=await n.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>"Error while creating full stack");throw new X({status:n.status,statusText:n.statusText,message:o})}return n.json()}function _r(e){return qe({...e,mutationFn:async({workspaceId:r,payload:s})=>gr({workspaceId:r,payload:s})})}function vr(){const{data:e,setData:r}=C(),s=Ct(),{toast:n}=Me(),{setCurrentStep:o}=P(),{mutate:i}=_r({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(pt,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess:async d=>{r(c=>O(c,m=>{m.createdStackId=d.id})),o(c=>c+1),s.invalidateQueries({queryKey:Re.all})}});if(!e.fullstackResources)return o(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const a=e.fullstackResources.components_resources_info.container_registry,u=a.flatMap(d=>d.accessible_by_service_connector.map(c=>({...d,value:c})));function f({flavor:d,resourceId:c}){const m=a.find(x=>x.flavor===d);if(!m)return;const l=O(e,x=>{x.registryConfig={flavor:d,configuration:Object.fromEntries(Object.keys(m.required_configuration||{}).map(p=>[p,c])),service_connector_resource_id:c}});r(l),i({workspaceId:"default",payload:{name:l.stackName||Math.random().toString(36).substring(7),service_connectors:l.connectorConfig?[l.connectorConfig]:[],components:{orchestrator:l.orchestratorConfig,artifact_store:l.artifactStoreConfig,container_registry:l.registryConfig}}})}return{handleFormSubmit:f,flattenedInstances:u}}const Sr="container_registry";function br(){const[e,r]=_.useState(""),{control:s,setValue:n,handleSubmit:o,register:i,watch:a,trigger:u,reset:f}=y(),{flattenedInstances:d,handleFormSubmit:c}=vr(),m=d.filter(l=>l.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(B,{placeholder:"Search...",onChange:l=>{f(),r(l.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...i("flavor")}),t.jsx("ul",{className:"space-y-1",children:m.map(l=>t.jsx("li",{children:t.jsx(b,{name:"resourceId",control:s,render:({field:{onChange:x,...p}})=>t.jsxs(K,{"data-state":a("resourceId")===l.value?"selected":"unselected",htmlFor:l.value,children:[t.jsx(H,{id:l.value,type:"radio",...p,onChange:S=>{n("flavor",l.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),x(S.target.value),u()},value:l.value,name:"connector-radio"}),t.jsx(q,{width:24,height:24,type:Sr,flavor:l.flavor})," ",t.jsx("span",{children:l.value})]})})},l.value))})]})]})}function Cr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Se,{type:"container_registry",className:"h-5 w-5 fill-primary-400"}),"Select your Container Registry"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the Container Registries for your new stack"})]})})}const wr=h.object({flavor:h.string().min(1),resourceId:h.string().min(1)});function Nr(){const e=W({resolver:$(wr),shouldUnregister:!0});return t.jsx(V,{...e,children:t.jsxs(T,{children:[t.jsx(I,{children:"Container Registry"}),t.jsx(D,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Cr,{}),t.jsx(br,{})]})}),t.jsx(E,{children:t.jsx(Fr,{})})]})})}function Fr(){const e=y(),r=!!Be();return t.jsxs(w,{className:"justify-center gap-2",disabled:!e.formState.isValid||r,form:"artifact-store-form",size:"md",children:[r&&t.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),r?"Loading...":"Next"]})}function kr(){var i;const{data:e,setData:r}=C(),{setCurrentStep:s}=P();if(!e.fullstackResources)return s(2),{orchestrators:[],handleFormSubmit:()=>{}};const n=((i=e.fullstackResources.components_resources_info)==null?void 0:i.orchestrator)||[];function o({flavor:a,resourceId:u,...f}){const d=n.find(c=>c.flavor===a);d&&(r(c=>{const m=d!=null&&d.use_resource_value_as_fixed_config?Object.fromEntries(Object.keys(d.required_configuration||{}).map(l=>[l,u])):{...f};return O(c,l=>{l.orchestratorConfig={flavor:a,configuration:m,service_connector_resource_id:u}})}),s(c=>c+1))}return{orchestrators:n,handleFormSubmit:o}}const _e=h.object({flavor:h.string().min(1),resourceId:h.string().min(1)});function Pr(e){const r=Object.keys(e).reduce((s,n)=>(s[n]=h.string().trim().min(1),s),{});return h.object(r)}const Z="kubernetes",Ie="orchestrator";function Ar(){const{orchestrators:e,handleFormSubmit:r}=kr(),{setSchema:s}=re(),{control:n,watch:o,setValue:i,register:a,reset:u,handleSubmit:f}=y(),d=o("flavor");return t.jsxs("form",{onSubmit:f(r),id:"artifact-store-form",children:[d!==Z&&t.jsx("input",{...a("resourceId"),type:"hidden"}),t.jsx("ul",{className:"space-y-1",children:e.map((c,m)=>t.jsxs("li",{children:[t.jsx(b,{control:n,name:"flavor",render:({field:{onChange:l,...x}})=>t.jsxs(K,{"data-state":d===c.flavor?"selected":"unselected",htmlFor:c.flavor,children:[t.jsx(H,{onChange:p=>{u({flavor:c.flavor}),c.use_resource_value_as_fixed_config===!0&&s(_e),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&s(_e.merge(Pr(c.required_configuration))),c.flavor!==Z&&c.accessible_by_service_connector.length>0&&i("resourceId",c.accessible_by_service_connector[0]),l(p)},...x,id:c.flavor,type:"radio",value:c.flavor,name:"orchestrator-flavor-radio"}),t.jsx(q,{width:24,height:24,type:Ie,flavor:c.flavor}),t.jsx("span",{children:c.flavor_display_name})]})}),d===c.flavor&&(c.flavor===Z||c.use_resource_value_as_fixed_config===!1)&&t.jsxs("div",{className:"space-y-3 py-5 pl-8",children:[c.flavor===Z&&t.jsx("ul",{className:"space-y-1",children:c.accessible_by_service_connector.map(l=>t.jsx("li",{children:t.jsx(b,{control:n,name:"resourceId",render:({field:x})=>t.jsxs(K,{"data-state":o("resourceId")===l?"selected":"unselected",htmlFor:l,children:[t.jsx(H,{...x,id:l,type:"radio",value:l,name:"instance-radio"}),t.jsx(q,{type:Ie,width:24,height:24,flavor:c.flavor}),t.jsx("span",{children:l})]})})},l))}),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&Object.keys(c.required_configuration).length>=1&&t.jsx("div",{children:Object.entries(c.required_configuration).map(([l,x])=>t.jsx("div",{children:t.jsx(b,{name:l,control:n,render:({field:p})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:l,className:"text-text-sm",children:x}),t.jsx(B,{...p,inputSize:"md",required:!0,className:"w-full",id:l})]})})},l))})]})]},m))})]})}function zr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Se,{type:"orchestrator",className:"h-5 w-5 fill-primary-400"}),"Select your Orchestrator"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the connected orchestrators for your new stack"})]})})}function Or(){const{schema:e}=re(),r=W({resolver:$(e),shouldUnregister:!0,defaultValues:{resourceId:""}});return t.jsx(V,{...r,children:t.jsxs(T,{children:[t.jsx(I,{children:"Orchestrator"}),t.jsxs(D,{children:[t.jsx(zr,{}),t.jsx(Ar,{})]}),t.jsx(E,{children:t.jsx(Tr,{})})]})})}function Tr(){const e=y();return t.jsx(w,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const Ir=h.object({provider:h.string().min(1)});function Dr(){var i;const{setData:e,data:r}=C(),{setCurrentStep:s}=P(),n=W({resolver:$(Ir),defaultValues:{provider:((i=r.connectorConfig)==null?void 0:i.type)||""}});function o(a){e(u=>({...u,connectorConfig:{type:a.provider,auth_method:""}})),s(u=>u+1)}return t.jsx(V,{...n,children:t.jsxs(T,{children:[t.jsx(I,{children:"Select Your Existing Cloud Infrastructure"}),t.jsx(D,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where you have existing infrastructure to connect with ZenML. This will allow you to integrate your current cloud resources with ZenML for model deployment and management."})]}),t.jsxs("form",{id:"provider-form",onSubmit:n.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[t.jsx(ce,{id:"aws-provider",...n.register("provider"),value:"aws",children:t.jsx(le,{icon:t.jsx(M,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),t.jsx(ce,{id:"gcp-provider",...n.register("provider"),value:"gcp",children:t.jsx(le,{icon:t.jsx(M,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),t.jsx(ce,{id:"azure-provider",...n.register("provider"),value:"azure",children:t.jsx(le,{icon:t.jsx(M,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),t.jsx(E,{children:t.jsx(Er,{})})]})})}function Er(){const{formState:{isValid:e}}=y();return t.jsx(w,{form:"provider-form",disabled:!e,size:"md",children:"Next"})}function Mr(){var o;const{data:e}=C(),r=te({...Re.stackDetail(e.createdStackId||""),throwOnError:!0});if(r.isError)return null;if(r.isPending)return t.jsx(ee,{className:"h-[200px] w-full"});const s=r.data,n=Ot((o=r.data.metadata)==null?void 0:o.components);return t.jsxs(T,{children:[t.jsx(I,{children:"Your stack"}),t.jsx(D,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),t.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[t.jsx(Lr,{stack:s}),n.map(i=>t.jsx(qr,{component:i},i.id))]})]})}),t.jsx(E,{displayCancel:!1,children:t.jsx(Rr,{})})]})}function Rr(){return t.jsx(w,{size:"md",asChild:!0,children:t.jsx(Tt,{to:yt.stacks.overview,children:"Finish"})})}function Lr({stack:e}){return t.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 font-semibold",children:[t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(jt,{type:"square",size:"lg",children:t.jsx(gt,{size:"lg",children:e.name[0]})}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]})}function qr({component:e}){var r,s,n,o;return t.jsxs("div",{className:"flex items-center justify-between py-3 pl-9 pr-5",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(q,{width:24,height:24,flavor:((r=e.body)==null?void 0:r.flavor)||"",type:((s=e.body)==null?void 0:s.type)||"orchestrator"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg font-semibold",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),t.jsx(zt,{type:((n=e.body)==null?void 0:n.type)||"alerter",children:_t((o=e.body)==null?void 0:o.type)})]},e.id)}function Br(){const{currentStep:e}=P();if(e===1)return t.jsx(Dr,{});if(e===2)return t.jsx(ke,{initialSchema:Je,children:t.jsx(yr,{})});if(e===3)return t.jsx(Jt,{});if(e===4)return t.jsx(ke,{initialSchema:_e,children:t.jsx(Or,{})});if(e===5)return t.jsx(Nr,{});if(e===6)return t.jsx(Mr,{})}const De=["Infrastructure Type","Cloud Provider","Connect your Cloud","Artifact Store","Orchestrator","Container Registry"];function us(){return t.jsx(tt,{maxSteps:De.length+1,initialStep:1,children:t.jsx(It,{children:t.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[t.jsx(rt,{entries:De}),t.jsx("div",{className:"w-full",children:t.jsx(Br,{})})]})})})}export{us as default};
@@ -1,2 +1,2 @@
1
- import{r as a,j as e}from"./@radix-CFOkMR_E.js";import{B as h,d as Z,p as H,q as j,aL as C,av as D,U as p,V as g,r as R,h as I,aM as k,c as w,S as N,aN as L,$ as E,aO as _,aP as M,aH as S,ay as O}from"./index-KsTz2dHG.js";import{S as P,a as F}from"./file-text-CqD_iu6l.js";import{S as V}from"./terminal-By9cErXc.js";import{S as B}from"./package-ClbU3KUi.js";import{S as v}from"./chevron-down-D_ZlKMqH.js";import{T as b}from"./Tick-Bnr2TpW6.js";import{S as A}from"./plus-DOeLmm7C.js";import{C as c}from"./CodeSnippet-Cyp7f4dM.js";import{H as y}from"./Helpbox-BIiNc-uH.js";import{F as T}from"./chevron-right-double-CZBOf6JM.js";import{L as q}from"./@react-router-CO-OsFwI.js";import{H as $}from"./help-bu_DgLKI.js";import"./@tanstack-k96lU_C-.js";import"./@reactflow-DIYUhKYX.js";import"./copy-BXNk6BjL.js";const U=s=>a.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{d:"M6.20195 14.6383C6.20195 15.7947 5.25733 16.7393 4.10098 16.7393C2.94463 16.7393 2 15.7947 2 14.6383C2 13.482 2.94463 12.5374 4.10098 12.5374H6.20195V14.6383Z",fill:"#E01E5A"}),a.createElement("path",{d:"M7.26056 14.6383C7.26056 13.482 8.20518 12.5374 9.36154 12.5374C10.5179 12.5374 11.4625 13.482 11.4625 14.6383V19.8989C11.4625 21.0553 10.5179 21.9999 9.36154 21.9999C8.20518 21.9999 7.26056 21.0553 7.26056 19.8989V14.6383Z",fill:"#E01E5A"}),a.createElement("path",{d:"M9.36154 6.20195C8.20518 6.20195 7.26056 5.25733 7.26056 4.10098C7.26056 2.94463 8.20518 2 9.36154 2C10.5179 2 11.4625 2.94463 11.4625 4.10098V6.20195H9.36154Z",fill:"#36C5F0"}),a.createElement("path",{d:"M9.36156 7.26062C10.5179 7.26062 11.4625 8.20525 11.4625 9.3616C11.4625 10.5179 10.5179 11.4626 9.36156 11.4626H4.10098C2.94463 11.4626 2 10.5179 2 9.3616C2 8.20525 2.94463 7.26062 4.10098 7.26062H9.36156Z",fill:"#36C5F0"}),a.createElement("path",{d:"M17.798 9.3616C17.798 8.20525 18.7426 7.26062 19.8989 7.26062C21.0553 7.26062 21.9999 8.20525 21.9999 9.3616C21.9999 10.5179 21.0553 11.4626 19.8989 11.4626H17.798V9.3616Z",fill:"#2EB67D"}),a.createElement("path",{d:"M16.7394 9.36156C16.7394 10.5179 15.7948 11.4625 14.6385 11.4625C13.4821 11.4625 12.5375 10.5179 12.5375 9.36156V4.10098C12.5375 2.94463 13.4821 2 14.6385 2C15.7948 2 16.7394 2.94463 16.7394 4.10098V9.36156Z",fill:"#2EB67D"}),a.createElement("path",{d:"M14.6384 17.7981C15.7947 17.7981 16.7394 18.7427 16.7394 19.8991C16.7394 21.0554 15.7947 22 14.6384 22C13.482 22 12.5374 21.0554 12.5374 19.8991V17.7981H14.6384Z",fill:"#ECB22E"}),a.createElement("path",{d:"M14.6385 16.7393C13.4821 16.7393 12.5375 15.7947 12.5375 14.6383C12.5375 13.482 13.4821 12.5374 14.6385 12.5374H19.899C21.0554 12.5374 22 13.482 22 14.6383C22 15.7947 21.0554 16.7393 19.899 16.7393H14.6385Z",fill:"#ECB22E"})),K=s=>a.createElement("svg",{viewBox:"0 0 60 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.8968 2.5L35 2.5C35.663 2.5 36.2989 2.76339 36.7678 3.23224L51.7678 18.2322C52.2366 18.7011 52.5 19.337 52.5 20V43.1033C52.5 45.1157 52.5001 46.7766 52.3895 48.1296C52.2747 49.5348 52.0283 50.8266 51.4101 52.0399C50.4513 53.9215 48.9215 55.4513 47.0399 56.4101C45.8266 57.0283 44.5348 57.2747 43.1296 57.3895C41.7766 57.5001 40.1157 57.5 38.1033 57.5H21.8967C19.8843 57.5 18.2234 57.5001 16.8704 57.3895C15.4652 57.2747 14.1734 57.0283 12.9601 56.4101C11.0785 55.4513 9.54867 53.9215 8.58994 52.0399C7.97171 50.8266 7.7253 49.5348 7.61049 48.1296C7.49994 46.7766 7.49997 45.1157 7.5 43.1032V16.8968C7.49997 14.8843 7.49994 13.2234 7.61049 11.8704C7.7253 10.4652 7.97171 9.17344 8.58994 7.9601C9.54867 6.07848 11.0785 4.54867 12.9601 3.58994C14.1734 2.97171 15.4652 2.7253 16.8704 2.61049C18.2234 2.49994 19.8843 2.49997 21.8968 2.5ZM17.2776 7.59388C16.1816 7.68343 15.621 7.84575 15.2301 8.04497C14.2892 8.52434 13.5243 9.28924 13.045 10.23C12.8457 10.621 12.6834 11.1816 12.5939 12.2776C12.5019 13.4028 12.5 14.8586 12.5 17V43C12.5 45.1414 12.5019 46.5972 12.5939 47.7224C12.6834 48.8184 12.8457 49.3789 13.045 49.7699C13.5243 50.7108 14.2892 51.4757 15.2301 51.955C15.621 52.1543 16.1816 52.3166 17.2776 52.4061C18.4028 52.4981 19.8586 52.5 22 52.5H38C40.1415 52.5 41.5972 52.4981 42.7224 52.4061C43.8184 52.3166 44.379 52.1543 44.77 51.955C45.7108 51.4757 46.4757 50.7108 46.955 49.7699C47.1543 49.3789 47.3166 48.8184 47.4061 47.7224C47.4981 46.5972 47.5 45.1414 47.5 43V22.5002L38.9203 22.5002C38.2893 22.5003 37.6748 22.5003 37.1544 22.4578C36.5829 22.4111 35.9086 22.301 35.23 21.9552C34.2892 21.4758 33.5243 20.7109 33.045 19.7701C32.6992 19.0916 32.5891 18.4172 32.5424 17.8458C32.4998 17.3253 32.4999 16.7109 32.5 16.0799L32.5 7.5H22C19.8586 7.5 18.4028 7.50195 17.2776 7.59388ZM37.5 11.0355L43.9646 17.5002H39C38.2587 17.5002 37.8531 17.4982 37.5616 17.4744C37.55 17.4735 37.539 17.4725 37.5286 17.4716C37.5277 17.4612 37.5267 17.4502 37.5258 17.4386C37.5019 17.1471 37.5 16.7415 37.5 16.0002V11.0355ZM30.4548 28.7949C29.7284 28.6703 28.9814 28.8068 28.346 29.1803C27.7106 29.5537 27.2278 30.14 26.9833 30.8352C26.5251 32.1377 25.0978 32.8221 23.7953 32.3639C22.4929 31.9057 21.8084 30.4785 22.2666 29.176C22.903 27.3668 24.1592 25.8413 25.8126 24.8696C27.466 23.8979 29.4099 23.5427 31.3001 23.8669C33.1903 24.1911 34.9048 25.1738 36.1399 26.641C37.3746 28.1078 38.0506 29.9642 38.048 31.8815C38.0469 35.081 35.6802 37.1377 34.1244 38.1749C33.2702 38.7444 32.4338 39.1608 31.8208 39.4332C31.5108 39.571 31.2489 39.6759 31.0587 39.7484C30.9634 39.7847 30.8855 39.8131 30.8279 39.8336L30.7568 39.8585L30.7331 39.8666L30.7244 39.8695L30.7209 39.8707C30.7201 39.8709 30.7178 39.8717 29.9633 37.6083L30.7178 39.8717C29.4079 40.3083 27.9921 39.6004 27.5555 38.2906C27.1197 36.983 27.8243 35.5698 29.1298 35.1306L29.1528 35.1225C29.1775 35.1137 29.2204 35.0982 29.2788 35.076C29.396 35.0313 29.5732 34.9606 29.7901 34.8642C30.2311 34.6682 30.7999 34.382 31.3509 34.0147C32.6051 33.1785 33.048 32.4256 33.048 31.8792L33.048 31.8755C33.0491 31.1385 32.7894 30.4248 32.3147 29.861C31.8401 29.2972 31.1812 28.9195 30.4548 28.7949ZM27.5 45C27.5 43.6193 28.6193 42.5 30 42.5H30.025C31.4057 42.5 32.525 43.6193 32.525 45C32.525 46.3807 31.4057 47.5 30.025 47.5H30C28.6193 47.5 27.5 46.3807 27.5 45Z"}));function Q(){const s=[{text:"Connect with Slack",href:"https://zenml.io/slack",icon:e.jsx(U,{className:"h-5 w-5"})},{text:"Send us a message",href:"mailto:cloud@zenml.io",icon:e.jsx(P,{className:"h-5 w-5 fill-primary-600"})}];return e.jsxs(h,{className:"flex w-full flex-col overflow-hidden",children:[e.jsx("div",{className:"flex h-[120px] items-center justify-center bg-primary-50 ",children:e.jsx(Z,{className:"h-[60px] w-[60px]"})}),e.jsxs("div",{className:"p-5",children:[e.jsx("p",{className:"mb-0.5 text-text-lg font-semibold",children:"Need support?"}),e.jsx("p",{className:"mb-2 text-theme-text-secondary",children:"Schedule a call with us, connect with our Slack community or send us a message."}),e.jsx("ul",{className:"space-y-1",children:s.map((t,r)=>e.jsx("li",{children:e.jsx(z,{href:t.href,text:t.text,icon:t.icon})},r))})]})]})}function W(){const s=[{text:"Browse our docs",href:"https://docs.zenml.io",icon:e.jsx(F,{className:"h-5 w-5 fill-primary-600"})},{text:"Discover projects",href:"https://github.com/zenml-io/zenml-projects",icon:e.jsx(B,{className:"h-5 w-5 fill-primary-600"})},{text:"Navigate our examples",href:"https://github.com/zenml-io/zenml/tree/main/examples/",icon:e.jsx(V,{className:"h-5 w-5 fill-primary-600"})},{text:"Read our blog",href:"https://zenml.io/blog",icon:e.jsx(H,{className:"h-5 w-5 fill-primary-600"})}];return e.jsxs(h,{className:"flex w-full flex-col overflow-hidden",children:[e.jsx("div",{className:"flex h-[120px] items-center justify-center bg-turquoise-25",children:e.jsx(K,{className:"h-[60px] w-[60px] fill-teal-400"})}),e.jsxs("div",{className:"p-5",children:[e.jsx("p",{className:"mb-0.5 text-text-lg font-semibold",children:"Resources"}),e.jsx("p",{className:"mb-2 text-theme-text-secondary",children:"Need help? Follow our extensive documentation to get started."}),e.jsx("ul",{className:"space-y-1",children:s.map((t,r)=>e.jsx("li",{children:e.jsx(z,{href:t.href,text:t.text,icon:t.icon})},r))})]})]})}function z({href:s,text:t,icon:r}){return e.jsxs("a",{className:"inline-flex items-center gap-1 font-semibold text-primary-600 underline transition-all duration-200 hover:decoration-transparent",target:"_blank",href:s,rel:"noopener noreferrer",children:[r&&r,t]})}function Y(){return e.jsx(h,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:e.jsxs("div",{className:"w-full px-7 py-5 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Welcome to ZenML"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"You successfully installed the ZenML dashboard. Now you can get started with your new ZenML server."})]})})}function G({className:s,...t}){return e.jsx("div",{className:j("flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-rounded border-2 border-warning-300 bg-warning-50",s),...t,children:e.jsx(T,{className:"h-3 w-3 fill-warning-300"})})}function u({completed:s,title:t,children:r,hasDownstream:n,active:l}){const[i,m]=a.useState(l);return e.jsx(C,{open:i,onOpenChange:m,children:e.jsxs("div",{className:"flex w-full flex-col gap-3",children:[e.jsxs("div",{className:"flex w-full justify-between gap-2",children:[s?e.jsx(b,{className:"shrink-0"}):n?e.jsx(G,{}):e.jsx(D,{className:"shrink-0"}),e.jsx(p,{className:"w-full",children:e.jsx(J,{skipped:n,title:t,completed:s})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(p,{children:e.jsx(v,{className:` ${i?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500`})})})]}),r&&e.jsx(g,{children:e.jsxs("div",{className:"flex w-full items-center gap-2",children:[e.jsx("div",{className:"w-[28px] shrink-0"}),e.jsx("div",{className:"w-full min-w-0 flex-1",children:r})]})})]})})}function J({completed:s,title:t,skipped:r}){return e.jsx("div",{className:"flex w-full items-center justify-between gap-2",children:e.jsx("div",{className:"flex w-full items-center",children:e.jsx("div",{className:`font-semibold ${j({"text-theme-text-tertiary":s||r,"line-through decoration-theme-text-tertiary":s})}
2
- `,children:t})})})}function X({completed:s,active:t,hasDownstreamStep:r}){const n=R.stacks.create.index+"?"+new URLSearchParams({origin:"onboarding"}).toString();return e.jsxs(u,{hasDownstream:r,completed:s,title:"Create a new stack",active:t,children:[e.jsxs("p",{className:"mb-3",children:["A stack configures how a pipeline is executed"," ",e.jsx(se,{href:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Connect your Cloud to deploy your ZenML pipelines in a remote stack."}),e.jsx(I,{className:"w-fit",size:"md",asChild:!0,children:e.jsxs(q,{className:"flex",to:n,children:[e.jsx(A,{className:"h-5 w-5 shrink-0 fill-white"}),"Register a stack"]})})]}),e.jsx(y,{link:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})]})]})}function ee({active:s,completed:t,hasDownstreamStep:r}){return e.jsx(u,{hasDownstream:r,completed:t,title:"Run the pipeline in the new stack",active:s,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Set the new stack"}),e.jsx(c,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"zenml stack set REMOTE_STACK"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Run the pipeline"}),e.jsx(c,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"python run.py --training-pipeline"})]}),e.jsx("div",{children:e.jsx(y,{link:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})})]})})}function se({href:s}){return e.jsx("a",{href:s,rel:"noopener noreferrer",target:"_blank",className:"link text-text-sm font-semibold text-theme-text-brand",children:"Learn more"})}function te(){const s=k({refetchInterval:5e3}),t=w(),[r,n]=a.useState(!0);if(s.isPending||t.isPending)return e.jsx(N,{className:"h-[200px] w-full"});if(s.isError||t.isError)return null;const l=L(s.data,E(t.data.deployment_type||"other")),{progress:i,totalItems:m,itemsDone:f,getItem:x}=_(s.data),o=x("stack_with_remote_orchestrator_created"),d=x("pipeline_run_with_remote_orchestrator");return e.jsx(e.Fragment,{children:e.jsxs(C,{onOpenChange:n,open:r,className:j("rounded-md border border-theme-border-moderate bg-theme-surface-primary"),children:[e.jsxs(p,{className:"flex w-full items-center justify-between gap-[10px] p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[i>=100?e.jsx(b,{className:"h-7 w-7",tickClasses:"w-[28px] h-[28px]"}):e.jsx(M,{value:i,children:e.jsxs("span",{className:"absolute text-text-xs font-semibold",children:[f,"/",m]})}),e.jsxs("div",{className:"text-left",children:[e.jsxs("p",{className:"text-text-md font-semibold",children:["Production Setup"," ",e.jsx("span",{className:"text-text-md font-medium text-theme-text-secondary",children:"(10 min)"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:l.isFinished?"Level up your skills in a production setting.":e.jsx("span",{className:"text-primary-400",children:"Complete the Starter Setup to enable the production setup."})})]})]}),e.jsx(v,{className:` ${r?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`})]}),e.jsx(g,{className:"border-t border-theme-border-moderate p-5",children:e.jsxs("ul",{className:"divide-y divide-theme-border-moderate",children:[e.jsx("li",{className:"py-5 first:pt-0 last:pb-0",children:e.jsx(X,{active:l.isFinished&&o.isActive,completed:o.isCompleted,hasDownstreamStep:o.hasDownStreamStep})}),e.jsx("li",{className:"py-5 first:pt-0 last:pb-0",children:e.jsx(ee,{active:l.isFinished&&d.isActive,completed:d.isCompleted,hasDownstreamStep:d.hasDownStreamStep})})]})})]})})}function re({completed:s,hasDownstreamStep:t,active:r}){const{data:n}=w({throwOnError:!0});return e.jsx(u,{active:r,hasDownstream:t,completed:s,title:"Connect to ZenML",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install ZenML"}),e.jsx(c,{code:`pip install "zenml==${n?n.version:e.jsx(N,{className:"w-7"})}"`})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Login to your ZenML Server"}),e.jsx(c,{code:`zenml connect --url ${window.location.origin}`})]}),e.jsx(y,{link:"https://docs.zenml.io/user-guide/production-guide/deploying-zenml#connecting-to-a-deployed-zenml"})]})})}function ae({active:s,completed:t,hasDownstreamStep:r}){return e.jsx(u,{active:s,hasDownstream:r,completed:t,title:"Run your first pipeline",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Download the quickstart example to your local machine"}),e.jsx(c,{code:"git clone --depth 1 https://github.com/zenml-io/zenml.git && cd zenml/examples/quickstart"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize ZenML in the current directory"}),e.jsx(c,{code:"zenml init"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install the remaining requirements apart from ZenML"}),e.jsx(c,{code:"pip install -r requirements.txt"})]}),e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:["Run the training pipeline.",e.jsx("br",{}),"Once it is running, your dashboard will show all the details of the associated run, models, and artifacts."]}),e.jsx(c,{code:"python run.py --training-pipeline"})]}),e.jsxs(h,{className:"flex w-full flex-wrap items-center justify-between gap-y-1 p-2",children:[e.jsxs("div",{className:"flex items-center gap-[10px]",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-sm bg-teal-25",children:e.jsx($,{className:"h-5 w-5 fill-teal-400"})}),e.jsx("p",{children:"Do you need help?"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:S({intent:"secondary",emphasis:"subtle",size:"md"}),href:"https://github.com/zenml-io/zenml/blob/main/examples/quickstart/README.md",children:"Open the Readme"}),e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:S({intent:"primary",emphasis:"subtle",size:"md"}),href:"https://docs.zenml.io/user-guide/starter-guide/create-an-ml-pipeline",children:"Browse our docs"})]})]})]})})}function ne(){const s=k({refetchInterval:5e3}),t=w(),[r,n]=a.useState(!0);if(s.isPending||t.isPending)return e.jsx(N,{className:"h-[200px] w-full"});if(s.isError||t.isError)return null;const l=E(t.data.deployment_type||"other"),{progress:i,itemsDone:m,totalItems:f,getItem:x}=L(s.data,l),o=x("device_verified"),d=x("pipeline_run");return e.jsxs(C,{open:r,onOpenChange:n,className:"rounded-md border border-theme-border-moderate bg-theme-surface-primary",children:[e.jsxs(p,{className:"flex w-full items-center justify-between gap-[10px] p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[i>=100?e.jsx(b,{className:"h-7 w-7",tickClasses:"w-[28px] h-[28px]"}):e.jsx(M,{value:i,children:e.jsxs("span",{className:"absolute text-text-xs font-semibold",children:[m,"/",f]})}),e.jsxs("div",{className:"text-left",children:[e.jsxs("p",{className:"text-text-xl font-semibold",children:["Starter Setup"," ",e.jsx("span",{className:"text-text-md font-medium text-theme-text-secondary",children:"(2 min)"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow these steps to make sure your client is connected and run your first MLOps pipeline with ZenML"})]})]}),e.jsx(v,{className:` ${r?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`})]}),e.jsx(g,{className:"border-t border-theme-border-moderate p-5",children:e.jsxs("ul",{className:"divide-y divide-theme-border-moderate",children:[!l&&e.jsx("li",{className:"py-5 first:pt-0 last:pb-0",children:e.jsx(re,{active:o.isActive,completed:o.isCompleted,hasDownstreamStep:o.hasDownStreamStep})}),e.jsx("li",{className:"py-5 first:pt-0 last:pb-0",children:e.jsx(ae,{active:d.isActive,completed:d.isCompleted,hasDownstreamStep:d.hasDownStreamStep})})]})})]})}function ve(){const{setTourState:s,tourState:{tourActive:t}}=O();return a.useEffect(()=>{t&&s(r=>({...r,run:!0,stepIndex:r.stepIndex}))},[t]),e.jsxs("div",{className:"layout-container grid grid-cols-4 gap-5 py-5",children:[e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-3",children:[e.jsx(Y,{}),e.jsx(ne,{}),e.jsx(te,{})]}),e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-1",children:[e.jsx(Q,{}),e.jsx(W,{})]})]})}export{ve as default};
1
+ import{r as a,j as e}from"./@radix-BXWm7HOa.js";import{B as h,d as Z,p as D,q as j,aM as C,ar as H,U as p,V as g,r as I,h as R,aN as k,c as w,S as N,aO as L,$ as E,aP as _,aQ as M,aI as S,aw as O}from"./index-DhIZtpxB.js";import{S as P,a as F}from"./file-text-B9JibxTs.js";import{S as V}from"./terminal-grtjrIEJ.js";import{S as B}from"./package-DdkziX79.js";import{S as v}from"./chevron-down-BpaF8JqM.js";import{T as b}from"./Tick-uxv80Q6a.js";import{S as A}from"./plus-FB9-lEq_.js";import{C as c}from"./CodeSnippet-D0VLxT2A.js";import{H as y}from"./Helpbox-aAB2XP-z.js";import{F as T}from"./chevron-right-double-Dk8e2L99.js";import{L as q}from"./@react-router-l3lMcXA2.js";import{H as $}from"./help-FuHlZwn0.js";import"./@tanstack-FmcYZMuX.js";import"./@reactflow-CeVxyqYT.js";import"./copy-f3XGPPxt.js";const Q=s=>a.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{d:"M6.20195 14.6383C6.20195 15.7947 5.25733 16.7393 4.10098 16.7393C2.94463 16.7393 2 15.7947 2 14.6383C2 13.482 2.94463 12.5374 4.10098 12.5374H6.20195V14.6383Z",fill:"#E01E5A"}),a.createElement("path",{d:"M7.26056 14.6383C7.26056 13.482 8.20518 12.5374 9.36154 12.5374C10.5179 12.5374 11.4625 13.482 11.4625 14.6383V19.8989C11.4625 21.0553 10.5179 21.9999 9.36154 21.9999C8.20518 21.9999 7.26056 21.0553 7.26056 19.8989V14.6383Z",fill:"#E01E5A"}),a.createElement("path",{d:"M9.36154 6.20195C8.20518 6.20195 7.26056 5.25733 7.26056 4.10098C7.26056 2.94463 8.20518 2 9.36154 2C10.5179 2 11.4625 2.94463 11.4625 4.10098V6.20195H9.36154Z",fill:"#36C5F0"}),a.createElement("path",{d:"M9.36156 7.26062C10.5179 7.26062 11.4625 8.20525 11.4625 9.3616C11.4625 10.5179 10.5179 11.4626 9.36156 11.4626H4.10098C2.94463 11.4626 2 10.5179 2 9.3616C2 8.20525 2.94463 7.26062 4.10098 7.26062H9.36156Z",fill:"#36C5F0"}),a.createElement("path",{d:"M17.798 9.3616C17.798 8.20525 18.7426 7.26062 19.8989 7.26062C21.0553 7.26062 21.9999 8.20525 21.9999 9.3616C21.9999 10.5179 21.0553 11.4626 19.8989 11.4626H17.798V9.3616Z",fill:"#2EB67D"}),a.createElement("path",{d:"M16.7394 9.36156C16.7394 10.5179 15.7948 11.4625 14.6385 11.4625C13.4821 11.4625 12.5375 10.5179 12.5375 9.36156V4.10098C12.5375 2.94463 13.4821 2 14.6385 2C15.7948 2 16.7394 2.94463 16.7394 4.10098V9.36156Z",fill:"#2EB67D"}),a.createElement("path",{d:"M14.6384 17.7981C15.7947 17.7981 16.7394 18.7427 16.7394 19.8991C16.7394 21.0554 15.7947 22 14.6384 22C13.482 22 12.5374 21.0554 12.5374 19.8991V17.7981H14.6384Z",fill:"#ECB22E"}),a.createElement("path",{d:"M14.6385 16.7393C13.4821 16.7393 12.5375 15.7947 12.5375 14.6383C12.5375 13.482 13.4821 12.5374 14.6385 12.5374H19.899C21.0554 12.5374 22 13.482 22 14.6383C22 15.7947 21.0554 16.7393 19.899 16.7393H14.6385Z",fill:"#ECB22E"})),U=s=>a.createElement("svg",{viewBox:"0 0 60 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.8968 2.5L35 2.5C35.663 2.5 36.2989 2.76339 36.7678 3.23224L51.7678 18.2322C52.2366 18.7011 52.5 19.337 52.5 20V43.1033C52.5 45.1157 52.5001 46.7766 52.3895 48.1296C52.2747 49.5348 52.0283 50.8266 51.4101 52.0399C50.4513 53.9215 48.9215 55.4513 47.0399 56.4101C45.8266 57.0283 44.5348 57.2747 43.1296 57.3895C41.7766 57.5001 40.1157 57.5 38.1033 57.5H21.8967C19.8843 57.5 18.2234 57.5001 16.8704 57.3895C15.4652 57.2747 14.1734 57.0283 12.9601 56.4101C11.0785 55.4513 9.54867 53.9215 8.58994 52.0399C7.97171 50.8266 7.7253 49.5348 7.61049 48.1296C7.49994 46.7766 7.49997 45.1157 7.5 43.1032V16.8968C7.49997 14.8843 7.49994 13.2234 7.61049 11.8704C7.7253 10.4652 7.97171 9.17344 8.58994 7.9601C9.54867 6.07848 11.0785 4.54867 12.9601 3.58994C14.1734 2.97171 15.4652 2.7253 16.8704 2.61049C18.2234 2.49994 19.8843 2.49997 21.8968 2.5ZM17.2776 7.59388C16.1816 7.68343 15.621 7.84575 15.2301 8.04497C14.2892 8.52434 13.5243 9.28924 13.045 10.23C12.8457 10.621 12.6834 11.1816 12.5939 12.2776C12.5019 13.4028 12.5 14.8586 12.5 17V43C12.5 45.1414 12.5019 46.5972 12.5939 47.7224C12.6834 48.8184 12.8457 49.3789 13.045 49.7699C13.5243 50.7108 14.2892 51.4757 15.2301 51.955C15.621 52.1543 16.1816 52.3166 17.2776 52.4061C18.4028 52.4981 19.8586 52.5 22 52.5H38C40.1415 52.5 41.5972 52.4981 42.7224 52.4061C43.8184 52.3166 44.379 52.1543 44.77 51.955C45.7108 51.4757 46.4757 50.7108 46.955 49.7699C47.1543 49.3789 47.3166 48.8184 47.4061 47.7224C47.4981 46.5972 47.5 45.1414 47.5 43V22.5002L38.9203 22.5002C38.2893 22.5003 37.6748 22.5003 37.1544 22.4578C36.5829 22.4111 35.9086 22.301 35.23 21.9552C34.2892 21.4758 33.5243 20.7109 33.045 19.7701C32.6992 19.0916 32.5891 18.4172 32.5424 17.8458C32.4998 17.3253 32.4999 16.7109 32.5 16.0799L32.5 7.5H22C19.8586 7.5 18.4028 7.50195 17.2776 7.59388ZM37.5 11.0355L43.9646 17.5002H39C38.2587 17.5002 37.8531 17.4982 37.5616 17.4744C37.55 17.4735 37.539 17.4725 37.5286 17.4716C37.5277 17.4612 37.5267 17.4502 37.5258 17.4386C37.5019 17.1471 37.5 16.7415 37.5 16.0002V11.0355ZM30.4548 28.7949C29.7284 28.6703 28.9814 28.8068 28.346 29.1803C27.7106 29.5537 27.2278 30.14 26.9833 30.8352C26.5251 32.1377 25.0978 32.8221 23.7953 32.3639C22.4929 31.9057 21.8084 30.4785 22.2666 29.176C22.903 27.3668 24.1592 25.8413 25.8126 24.8696C27.466 23.8979 29.4099 23.5427 31.3001 23.8669C33.1903 24.1911 34.9048 25.1738 36.1399 26.641C37.3746 28.1078 38.0506 29.9642 38.048 31.8815C38.0469 35.081 35.6802 37.1377 34.1244 38.1749C33.2702 38.7444 32.4338 39.1608 31.8208 39.4332C31.5108 39.571 31.2489 39.6759 31.0587 39.7484C30.9634 39.7847 30.8855 39.8131 30.8279 39.8336L30.7568 39.8585L30.7331 39.8666L30.7244 39.8695L30.7209 39.8707C30.7201 39.8709 30.7178 39.8717 29.9633 37.6083L30.7178 39.8717C29.4079 40.3083 27.9921 39.6004 27.5555 38.2906C27.1197 36.983 27.8243 35.5698 29.1298 35.1306L29.1528 35.1225C29.1775 35.1137 29.2204 35.0982 29.2788 35.076C29.396 35.0313 29.5732 34.9606 29.7901 34.8642C30.2311 34.6682 30.7999 34.382 31.3509 34.0147C32.6051 33.1785 33.048 32.4256 33.048 31.8792L33.048 31.8755C33.0491 31.1385 32.7894 30.4248 32.3147 29.861C31.8401 29.2972 31.1812 28.9195 30.4548 28.7949ZM27.5 45C27.5 43.6193 28.6193 42.5 30 42.5H30.025C31.4057 42.5 32.525 43.6193 32.525 45C32.525 46.3807 31.4057 47.5 30.025 47.5H30C28.6193 47.5 27.5 46.3807 27.5 45Z"}));function K(){const s=[{text:"Connect with Slack",href:"https://zenml.io/slack",icon:e.jsx(Q,{className:"h-5 w-5"})},{text:"Send us a message",href:"mailto:cloud@zenml.io",icon:e.jsx(P,{className:"h-5 w-5 fill-primary-600"})}];return e.jsxs(h,{className:"flex w-full flex-col overflow-hidden",children:[e.jsx("div",{className:"flex h-[120px] items-center justify-center bg-primary-50 ",children:e.jsx(Z,{className:"h-[60px] w-[60px]"})}),e.jsxs("div",{className:"p-5",children:[e.jsx("p",{className:"mb-0.5 text-text-lg font-semibold",children:"Need support?"}),e.jsx("p",{className:"mb-2 text-theme-text-secondary",children:"Schedule a call with us, connect with our Slack community or send us a message."}),e.jsx("ul",{className:"space-y-1",children:s.map((t,r)=>e.jsx("li",{children:e.jsx(z,{href:t.href,text:t.text,icon:t.icon})},r))})]})]})}function W(){const s=[{text:"Browse our docs",href:"https://docs.zenml.io",icon:e.jsx(F,{className:"h-5 w-5 fill-primary-600"})},{text:"Discover projects",href:"https://github.com/zenml-io/zenml-projects",icon:e.jsx(B,{className:"h-5 w-5 fill-primary-600"})},{text:"Navigate our examples",href:"https://github.com/zenml-io/zenml/tree/main/examples/",icon:e.jsx(V,{className:"h-5 w-5 fill-primary-600"})},{text:"Read our blog",href:"https://zenml.io/blog",icon:e.jsx(D,{className:"h-5 w-5 fill-primary-600"})}];return e.jsxs(h,{className:"flex w-full flex-col overflow-hidden",children:[e.jsx("div",{className:"flex h-[120px] items-center justify-center bg-turquoise-25",children:e.jsx(U,{className:"h-[60px] w-[60px] fill-teal-400"})}),e.jsxs("div",{className:"p-5",children:[e.jsx("p",{className:"mb-0.5 text-text-lg font-semibold",children:"Resources"}),e.jsx("p",{className:"mb-2 text-theme-text-secondary",children:"Need help? Follow our extensive documentation to get started."}),e.jsx("ul",{className:"space-y-1",children:s.map((t,r)=>e.jsx("li",{children:e.jsx(z,{href:t.href,text:t.text,icon:t.icon})},r))})]})]})}function z({href:s,text:t,icon:r}){return e.jsxs("a",{className:"inline-flex items-center gap-1 font-semibold text-primary-600 underline transition-all duration-200 hover:decoration-transparent",target:"_blank",href:s,rel:"noopener noreferrer",children:[r&&r,t]})}function Y(){return e.jsx(h,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:e.jsxs("div",{className:"w-full px-7 py-5 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Welcome to ZenML"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"You successfully installed the ZenML dashboard. Now you can get started with your new ZenML server."})]})})}function G({className:s,...t}){return e.jsx("div",{className:j("flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-rounded border-2 border-warning-300 bg-warning-50",s),...t,children:e.jsx(T,{className:"h-3 w-3 fill-warning-300"})})}function u({completed:s,title:t,children:r,hasDownstream:n,active:l}){const[i,m]=a.useState(l);return e.jsx(C,{open:i,onOpenChange:m,children:e.jsxs("div",{className:"flex w-full flex-col gap-3",children:[e.jsxs("div",{className:"flex w-full justify-between gap-2",children:[s?e.jsx(b,{className:"shrink-0"}):n?e.jsx(G,{}):e.jsx(H,{className:"shrink-0"}),e.jsx(p,{className:"w-full",children:e.jsx(J,{skipped:n,title:t,completed:s})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(p,{children:e.jsx(v,{className:` ${i?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500`})})})]}),r&&e.jsx(g,{children:e.jsxs("div",{className:"flex w-full items-center gap-2",children:[e.jsx("div",{className:"w-[28px] shrink-0"}),e.jsx("div",{className:"w-full min-w-0 flex-1",children:r})]})})]})})}function J({completed:s,title:t,skipped:r}){return e.jsx("div",{className:"flex w-full items-center justify-between gap-2",children:e.jsx("div",{className:"flex w-full items-center",children:e.jsx("div",{className:`font-semibold ${j({"text-theme-text-tertiary":s||r,"line-through decoration-theme-text-tertiary":s})}
2
+ `,children:t})})})}function X({completed:s,active:t,hasDownstreamStep:r}){const n=I.stacks.create.index+"?"+new URLSearchParams({origin:"onboarding"}).toString();return e.jsxs(u,{hasDownstream:r,completed:s,title:"Create a new stack",active:t,children:[e.jsxs("p",{className:"mb-3",children:["A stack configures how a pipeline is executed"," ",e.jsx(se,{href:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Connect your Cloud to deploy your ZenML pipelines in a remote stack."}),e.jsx(R,{className:"w-fit",size:"md",asChild:!0,children:e.jsxs(q,{className:"flex",to:n,children:[e.jsx(A,{className:"h-5 w-5 shrink-0 fill-white"}),"Register a stack"]})})]}),e.jsx(y,{link:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})]})]})}function ee({active:s,completed:t,hasDownstreamStep:r}){return e.jsx(u,{hasDownstream:r,completed:t,title:"Run the pipeline in the new stack",active:s,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Set the new stack"}),e.jsx(c,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"zenml stack set REMOTE_STACK"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Run the pipeline"}),e.jsx(c,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"python run.py --training-pipeline"})]}),e.jsx("div",{children:e.jsx(y,{link:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})})]})})}function se({href:s}){return e.jsx("a",{href:s,rel:"noopener noreferrer",target:"_blank",className:"link text-text-sm font-semibold text-theme-text-brand",children:"Learn more"})}function te(){const s=k({refetchInterval:5e3}),t=w(),[r,n]=a.useState(!0);if(s.isPending||t.isPending)return e.jsx(N,{className:"h-[200px] w-full"});if(s.isError||t.isError)return null;const l=L(s.data,E(t.data.deployment_type||"other")),{progress:i,totalItems:m,itemsDone:f,getItem:x}=_(s.data),o=x("stack_with_remote_orchestrator_created"),d=x("pipeline_run_with_remote_orchestrator");return e.jsx(e.Fragment,{children:e.jsxs(C,{onOpenChange:n,open:r,className:j("rounded-md border border-theme-border-moderate bg-theme-surface-primary"),children:[e.jsxs(p,{className:"flex w-full items-center justify-between gap-[10px] p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[i>=100?e.jsx(b,{className:"h-7 w-7",tickClasses:"w-[28px] h-[28px]"}):e.jsx(M,{value:i,children:e.jsxs("span",{className:"absolute text-text-xs font-semibold",children:[f,"/",m]})}),e.jsxs("div",{className:"text-left",children:[e.jsxs("p",{className:"text-text-md font-semibold",children:["Production Setup"," ",e.jsx("span",{className:"text-text-md font-medium text-theme-text-secondary",children:"(10 min)"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:l.isFinished?"Level up your skills in a production setting.":e.jsx("span",{className:"text-primary-400",children:"Complete the Starter Setup to enable the production setup."})})]})]}),e.jsx(v,{className:` ${r?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`})]}),e.jsx(g,{className:"border-t border-theme-border-moderate p-5",children:e.jsxs("ul",{className:"divide-y divide-theme-border-moderate",children:[e.jsx("li",{className:"py-5 first:pt-0 last:pb-0",children:e.jsx(X,{active:l.isFinished&&o.isActive,completed:o.isCompleted,hasDownstreamStep:o.hasDownStreamStep})}),e.jsx("li",{className:"py-5 first:pt-0 last:pb-0",children:e.jsx(ee,{active:l.isFinished&&d.isActive,completed:d.isCompleted,hasDownstreamStep:d.hasDownStreamStep})})]})})]})})}function re({completed:s,hasDownstreamStep:t,active:r}){const{data:n}=w({throwOnError:!0});return e.jsx(u,{active:r,hasDownstream:t,completed:s,title:"Connect to ZenML",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install ZenML"}),e.jsx(c,{code:`pip install "zenml==${n?n.version:e.jsx(N,{className:"w-7"})}"`})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Login to your ZenML Server"}),e.jsx(c,{code:`zenml connect --url ${window.location.origin}`})]}),e.jsx(y,{link:"https://docs.zenml.io/user-guide/production-guide/deploying-zenml#connecting-to-a-deployed-zenml"})]})})}function ae({active:s,completed:t,hasDownstreamStep:r}){return e.jsx(u,{active:s,hasDownstream:r,completed:t,title:"Run your first pipeline",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Download the quickstart example to your local machine"}),e.jsx(c,{code:"git clone --depth 1 https://github.com/zenml-io/zenml.git && cd zenml/examples/quickstart"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize ZenML in the current directory"}),e.jsx(c,{code:"zenml init"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install the remaining requirements apart from ZenML"}),e.jsx(c,{code:"pip install -r requirements.txt"})]}),e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:["Run the training pipeline.",e.jsx("br",{}),"Once it is running, your dashboard will show all the details of the associated run, models, and artifacts."]}),e.jsx(c,{code:"python run.py --training-pipeline"})]}),e.jsxs(h,{className:"flex w-full flex-wrap items-center justify-between gap-y-1 p-2",children:[e.jsxs("div",{className:"flex items-center gap-[10px]",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-sm bg-teal-25",children:e.jsx($,{className:"h-5 w-5 fill-teal-400"})}),e.jsx("p",{children:"Do you need help?"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:S({intent:"secondary",emphasis:"subtle",size:"md"}),href:"https://github.com/zenml-io/zenml/blob/main/examples/quickstart/README.md",children:"Open the Readme"}),e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:S({intent:"primary",emphasis:"subtle",size:"md"}),href:"https://docs.zenml.io/user-guide/starter-guide/create-an-ml-pipeline",children:"Browse our docs"})]})]})]})})}function ne(){const s=k({refetchInterval:5e3}),t=w(),[r,n]=a.useState(!0);if(s.isPending||t.isPending)return e.jsx(N,{className:"h-[200px] w-full"});if(s.isError||t.isError)return null;const l=E(t.data.deployment_type||"other"),{progress:i,itemsDone:m,totalItems:f,getItem:x}=L(s.data,l),o=x("device_verified"),d=x("pipeline_run");return e.jsxs(C,{open:r,onOpenChange:n,className:"rounded-md border border-theme-border-moderate bg-theme-surface-primary",children:[e.jsxs(p,{className:"flex w-full items-center justify-between gap-[10px] p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[i>=100?e.jsx(b,{className:"h-7 w-7",tickClasses:"w-[28px] h-[28px]"}):e.jsx(M,{value:i,children:e.jsxs("span",{className:"absolute text-text-xs font-semibold",children:[m,"/",f]})}),e.jsxs("div",{className:"text-left",children:[e.jsxs("p",{className:"text-text-xl font-semibold",children:["Starter Setup"," ",e.jsx("span",{className:"text-text-md font-medium text-theme-text-secondary",children:"(2 min)"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow these steps to make sure your client is connected and run your first MLOps pipeline with ZenML"})]})]}),e.jsx(v,{className:` ${r?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`})]}),e.jsx(g,{className:"border-t border-theme-border-moderate p-5",children:e.jsxs("ul",{className:"divide-y divide-theme-border-moderate",children:[!l&&e.jsx("li",{className:"py-5 first:pt-0 last:pb-0",children:e.jsx(re,{active:o.isActive,completed:o.isCompleted,hasDownstreamStep:o.hasDownStreamStep})}),e.jsx("li",{className:"py-5 first:pt-0 last:pb-0",children:e.jsx(ae,{active:d.isActive,completed:d.isCompleted,hasDownstreamStep:d.hasDownStreamStep})})]})})]})}function ve(){const{setTourState:s,tourState:{tourActive:t}}=O();return a.useEffect(()=>{t&&s(r=>({...r,run:!0,stepIndex:r.stepIndex}))},[t]),e.jsxs("div",{className:"layout-container grid grid-cols-4 gap-5 py-5",children:[e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-3",children:[e.jsx(Y,{}),e.jsx(ne,{}),e.jsx(te,{})]}),e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-1",children:[e.jsx(K,{}),e.jsx(W,{})]})]})}export{ve as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./@radix-BXWm7HOa.js";import{S as x}from"./layout-D6oiSbfd.js";import{B as f,E as d,r as i,c as h,S as p,$ as j,aB as g}from"./index-DhIZtpxB.js";import{c as l,L as n}from"./@react-router-l3lMcXA2.js";import{S as y}from"./database-cXYNX9tt.js";import"./@tanstack-FmcYZMuX.js";import"./@reactflow-CeVxyqYT.js";function c({icon:t,estimatedTime:s,subtitle:a,title:r,comingSoon:o=!1,isRecommended:u=!1}){return e.jsxs(f,{className:`h-full w-full space-y-1 px-6 py-5 ${o&&"bg-neutral-50"}`,children:[t,e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:r}),u&&e.jsx(d,{className:"font-semibold",color:"green",size:"sm",children:"Recommended"}),o&&e.jsx(d,{className:"font-semibold",color:"purple",size:"sm",children:"Coming Soon"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:a}),e.jsxs("p",{className:"text-text-xs text-theme-text-tertiary",children:["Estimated time: ",s," mins"]})]})}function N(){return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Manual Setup"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Register your stack and component manually selecting your preferred tools from a list"})]}),e.jsx("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:e.jsx(S,{})})]})}function S(){const[t]=l(),s=i.stacks.create.manual+(t.size>=1?`?${t.toString()}`:"");return e.jsx("div",{className:"relative",children:e.jsx(n,{to:s,children:e.jsx(c,{title:"Manual Setup",subtitle:"Use a script to set a new cloud infrastructure from scratch",icon:e.jsx(x,{className:"h-6 w-6 fill-primary-400"}),estimatedTime:"3"})})})}function v(){const{isError:t,isPending:s,data:a}=h();if(s)return e.jsx(p,{className:"h-[200px] w-full"});if(t)return e.jsx("div",{children:"Failed to load server info"});const r=j(a.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Smart Stack Setup"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Use our smart tools to connect to your Cloud in a quick and simplified way."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx(w,{isLocalDeployment:r}),e.jsx(b,{isLocalDeployment:r})]})]})}function w({isLocalDeployment:t}){const[s]=l(),a=i.stacks.create.newInfra+(s.size>=1?`?${s.toString()}`:"");return e.jsxs("div",{className:"relative",children:[t&&e.jsx(m,{}),e.jsx(n,{to:a,children:e.jsx(c,{title:"New Infrastructure",isRecommended:!0,subtitle:"Use a script to set a new cloud infrastructure from scratch",icon:e.jsx(y,{className:"h-6 w-6 fill-primary-400"}),estimatedTime:"3"})})]})}function b({isLocalDeployment:t}){const[s]=l(),a=i.stacks.create.existingInfra+(s.size>=1?`?${s.toString()}`:"");return e.jsxs("div",{className:"relative",children:[t&&e.jsx(m,{}),e.jsx(n,{to:a,children:e.jsx(c,{title:"Use existing Cloud",subtitle:"Connect to your existing Cloud and configure your components manually.",icon:e.jsx(g,{className:"h-6 w-6 fill-primary-400"}),estimatedTime:"15"})})]})}function m(){return e.jsx("div",{className:"group absolute flex h-full w-full items-center justify-center rounded-md border border-theme-border-moderate bg-white/70",children:e.jsx("div",{className:"hidden rounded-md bg-theme-text-primary px-3 py-2 text-text-xs text-theme-text-negative shadow-lg animate-in fade-in-0 fade-out-0 zoom-in-95 group-hover:block",children:"Smart Setup is not available for local deployments"})})}function $(){return e.jsxs("section",{className:"layout-container space-y-5 py-5",children:[e.jsx(v,{}),e.jsx(N,{})]})}export{$ as default};