zenml-nightly 0.62.0.dev20240729__py3-none-any.whl → 0.64.0.dev20240809__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.
- README.md +2 -2
- RELEASE_NOTES.md +120 -0
- zenml/VERSION +1 -1
- zenml/__init__.py +0 -4
- zenml/actions/pipeline_run/pipeline_run_action.py +19 -17
- zenml/analytics/enums.py +4 -6
- zenml/cli/__init__.py +28 -76
- zenml/cli/base.py +2 -2
- zenml/cli/pipeline.py +54 -61
- zenml/cli/stack.py +6 -8
- zenml/cli/web_login.py +8 -0
- zenml/client.py +232 -103
- zenml/config/build_configuration.py +43 -17
- zenml/config/compiler.py +14 -22
- zenml/config/docker_settings.py +80 -57
- zenml/config/pipeline_run_configuration.py +3 -0
- zenml/config/server_config.py +3 -0
- zenml/config/source.py +60 -1
- zenml/constants.py +11 -2
- zenml/entrypoints/base_entrypoint_configuration.py +53 -8
- zenml/enums.py +4 -1
- zenml/environment.py +25 -9
- zenml/image_builders/base_image_builder.py +1 -1
- zenml/image_builders/build_context.py +25 -72
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +13 -4
- zenml/integrations/azure/__init__.py +4 -0
- zenml/integrations/azure/flavors/__init__.py +11 -0
- zenml/integrations/azure/flavors/azureml_orchestrator_flavor.py +263 -0
- zenml/{_hub → integrations/azure/orchestrators}/__init__.py +7 -2
- zenml/integrations/azure/orchestrators/azureml_orchestrator.py +544 -0
- zenml/integrations/azure/orchestrators/azureml_orchestrator_entrypoint_config.py +86 -0
- zenml/integrations/azure/step_operators/azureml_step_operator.py +3 -0
- zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +20 -2
- zenml/integrations/databricks/orchestrators/databricks_orchestrator.py +19 -13
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +7 -2
- zenml/integrations/gcp/service_connectors/gcp_service_connector.py +123 -6
- zenml/integrations/kaniko/image_builders/kaniko_image_builder.py +1 -1
- zenml/integrations/mlflow/__init__.py +1 -1
- zenml/integrations/mlflow/experiment_trackers/mlflow_experiment_tracker.py +3 -1
- zenml/integrations/mlflow/flavors/mlflow_experiment_tracker_flavor.py +3 -0
- zenml/logger.py +13 -0
- zenml/models/__init__.py +26 -22
- zenml/models/v2/base/filter.py +32 -0
- zenml/models/v2/core/pipeline.py +73 -89
- zenml/models/v2/core/pipeline_build.py +15 -11
- zenml/models/v2/core/pipeline_deployment.py +72 -24
- zenml/models/v2/core/pipeline_run.py +65 -1
- zenml/models/v2/core/run_template.py +393 -0
- zenml/models/v2/core/server_settings.py +12 -0
- zenml/models/v2/core/user.py +0 -21
- zenml/models/v2/misc/server_models.py +7 -1
- zenml/models/v2/misc/stack_deployment.py +5 -0
- zenml/models/v2/misc/user_auth.py +0 -7
- zenml/new/pipelines/build_utils.py +220 -89
- zenml/new/pipelines/code_archive.py +157 -0
- zenml/new/pipelines/pipeline.py +46 -78
- zenml/new/pipelines/run_utils.py +79 -1
- zenml/post_execution/pipeline.py +1 -4
- zenml/service_connectors/service_connector_utils.py +18 -2
- zenml/stack_deployments/aws_stack_deployment.py +32 -8
- zenml/stack_deployments/azure_stack_deployment.py +122 -10
- zenml/stack_deployments/gcp_stack_deployment.py +36 -7
- zenml/stack_deployments/stack_deployment.py +23 -7
- zenml/steps/base_step.py +3 -0
- zenml/steps/utils.py +0 -4
- zenml/utils/archivable.py +149 -0
- zenml/utils/code_utils.py +244 -0
- zenml/utils/notebook_utils.py +122 -0
- zenml/utils/package_utils.py +39 -0
- zenml/utils/pipeline_docker_image_builder.py +3 -96
- zenml/utils/source_utils.py +109 -1
- zenml/zen_server/dashboard/assets/{404-B_YdvmwS.js → 404-CRAA_Lew.js} +1 -1
- zenml/zen_server/dashboard/assets/@radix-BXWm7HOa.js +85 -0
- zenml/zen_server/dashboard/assets/{@react-router-CO-OsFwI.js → @react-router-l3lMcXA2.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-l_1hUr1S.js → @reactflow-CeVxyqYT.js} +2 -2
- zenml/zen_server/dashboard/assets/{@tanstack-DYiOyJUL.js → @tanstack-FmcYZMuX.js} +4 -4
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-ErO9aOgK.js +1 -0
- zenml/zen_server/dashboard/assets/{AwarenessChannel-CFg5iX4Z.js → AwarenessChannel-CLXo5rKM.js} +1 -1
- zenml/zen_server/dashboard/assets/{CodeSnippet-Dvkx_82E.js → CodeSnippet-D0VLxT2A.js} +2 -2
- zenml/zen_server/dashboard/assets/CollapsibleCard-BaUPiVg0.js +1 -0
- zenml/zen_server/dashboard/assets/{Commands-DoN1xrEq.js → Commands-JrcZK-3j.js} +1 -1
- zenml/zen_server/dashboard/assets/CopyButton-Dbo52T1K.js +2 -0
- zenml/zen_server/dashboard/assets/{CsvVizualization-Ck-nZ43m.js → CsvVizualization-D3kAypDj.js} +3 -3
- zenml/zen_server/dashboard/assets/DisplayDate-DizbSeT-.js +1 -0
- zenml/zen_server/dashboard/assets/EditSecretDialog-Bd7mFLS4.js +1 -0
- zenml/zen_server/dashboard/assets/{EmptyState-BMLnFVlB.js → EmptyState-BHblM39I.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-kLtljEOM.js → Error-C6LeJSER.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-DguLLgTK.js → ExecutionStatus-jH4OrWBq.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-BXUMP21n.js → Helpbox-aAB2XP-z.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-DSt0O-dm.js → Infobox-BQ0aty32.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-xsrsIGE-.js → InlineAvatar-DpTLgM3Q.js} +1 -1
- zenml/zen_server/dashboard/assets/Lock-CNyJvf2r.js +1 -0
- zenml/zen_server/dashboard/assets/{MarkdownVisualization-xp3hhULl.js → MarkdownVisualization-Bajxn0HY.js} +1 -1
- zenml/zen_server/dashboard/assets/NumberBox-BmKE0qnO.js +1 -0
- zenml/zen_server/dashboard/assets/{PasswordChecker-DUveqlva.js → PasswordChecker-yGGoJSB-.js} +1 -1
- zenml/zen_server/dashboard/assets/ProviderRadio-BBqkIuTd.js +1 -0
- zenml/zen_server/dashboard/assets/RadioItem-xLhXoiFV.js +1 -0
- zenml/zen_server/dashboard/assets/SearchField-C9R0mdaX.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-BXGTWiwj.js → SetPassword-52sNxNiO.js} +1 -1
- zenml/zen_server/dashboard/assets/{SuccessStep-DZC60t0x.js → SuccessStep-DlkItqYG.js} +1 -1
- zenml/zen_server/dashboard/assets/Tick-uxv80Q6a.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DGvwFWO1.js → UpdatePasswordSchemas-oN4G3sKz.js} +1 -1
- zenml/zen_server/dashboard/assets/{aws-BgKTfTfx.js → aws-0_3UsPif.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-circle-i56092KI.js → check-circle-1_I207rW.js} +1 -1
- zenml/zen_server/dashboard/assets/chevron-down-BpaF8JqM.js +1 -0
- zenml/zen_server/dashboard/assets/{chevron-right-double-CZBOf6JM.js → chevron-right-double-Dk8e2L99.js} +1 -1
- zenml/zen_server/dashboard/assets/{cloud-only-C_yFCAkP.js → cloud-only-BkUuI0lZ.js} +1 -1
- zenml/zen_server/dashboard/assets/components-Br2ezRib.js +1 -0
- zenml/zen_server/dashboard/assets/{copy-BXNk6BjL.js → copy-f3XGPPxt.js} +1 -1
- zenml/zen_server/dashboard/assets/{database-1xWSgZfO.js → database-cXYNX9tt.js} +1 -1
- zenml/zen_server/dashboard/assets/{docker-CQMVm_4d.js → docker-8uj__HHK.js} +1 -1
- zenml/zen_server/dashboard/assets/dots-horizontal-sKQlWEni.js +1 -0
- zenml/zen_server/dashboard/assets/edit-C0MVvPD2.js +1 -0
- zenml/zen_server/dashboard/assets/{file-text-CqD_iu6l.js → file-text-B9JibxTs.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-bu_DgLKI.js → help-FuHlZwn0.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-rK_Wuy2W.js → index-Bd1xgUQG.js} +1 -1
- zenml/zen_server/dashboard/assets/index-DaGknux4.css +1 -0
- zenml/zen_server/dashboard/assets/{index-BczVOqUf.js → index-DhIZtpxB.js} +5 -5
- zenml/zen_server/dashboard/assets/index.esm-DT4uyn2i.js +1 -0
- zenml/zen_server/dashboard/assets/layout-D6oiSbfd.js +1 -0
- zenml/zen_server/dashboard/assets/{login-mutation-CrHrndTI.js → login-mutation-13A_JSVA.js} +1 -1
- zenml/zen_server/dashboard/assets/{logs-D8k8BVFf.js → logs-CgeE2vZP.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-DYa4pC-C.js → not-found-B0Mmb90p.js} +1 -1
- zenml/zen_server/dashboard/assets/package-DdkziX79.js +1 -0
- zenml/zen_server/dashboard/assets/page-7-v2OBm-.js +1 -0
- zenml/zen_server/dashboard/assets/{page-MFQyIJd3.js → page-B3ozwdD1.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BkuQDIf-.js → page-BGwA9B1M.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-1iL8aMqs.js → page-BkjAUyTA.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BnacgBiy.js +1 -0
- zenml/zen_server/dashboard/assets/page-BxF_KMQ3.js +2 -0
- zenml/zen_server/dashboard/assets/page-C4POHC0K.js +1 -0
- zenml/zen_server/dashboard/assets/page-C9kudd44.js +9 -0
- zenml/zen_server/dashboard/assets/page-CA1j3GpJ.js +1 -0
- zenml/zen_server/dashboard/assets/page-CCY6yfmu.js +1 -0
- zenml/zen_server/dashboard/assets/page-CgTe7Bme.js +1 -0
- zenml/zen_server/dashboard/assets/{page-8a4UMKXZ.js → page-Cgn-6v2Y.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CxQmQqDw.js +1 -0
- zenml/zen_server/dashboard/assets/page-D2Goey3H.js +1 -0
- zenml/zen_server/dashboard/assets/page-DLpOnf7u.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BhgCDInH.js → page-DSTQnBk-.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-1h_sD1jz.js → page-DTysUGOy.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-2grKx_MY.js → page-D_EXUFJb.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Db15QzsM.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BDns21Iz.js → page-DugsjcQ_.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-C6-UGEbH.js → page-OFKSPyN7.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BkeAAYwp.js → page-RnG-qhv9.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CCNRIt_f.js → page-T2BtjwPl.js} +1 -1
- zenml/zen_server/dashboard/assets/page-TXe1Eo3Z.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BnaevhnB.js → page-YiF_fNbe.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-uA5prJGY.js → page-hQaiQXfg.js} +1 -1
- zenml/zen_server/dashboard/assets/persist-3-5nOJ6m.js +1 -0
- zenml/zen_server/dashboard/assets/{play-circle-CNtZKDnW.js → play-circle-XSkLR12B.js} +1 -1
- zenml/zen_server/dashboard/assets/plus-FB9-lEq_.js +1 -0
- zenml/zen_server/dashboard/assets/refresh-COb6KYDi.js +1 -0
- zenml/zen_server/dashboard/assets/sharedSchema-BoYx_B_L.js +14 -0
- zenml/zen_server/dashboard/assets/{stack-detail-query-Cficsl6d.js → stack-detail-query-B-US_-wa.js} +1 -1
- zenml/zen_server/dashboard/assets/{terminal-By9cErXc.js → terminal-grtjrIEJ.js} +1 -1
- zenml/zen_server/dashboard/assets/trash-Cd5CSFqA.js +1 -0
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-7d8xi1tS.js → update-server-settings-mutation-B8GB_ubU.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-D7mAQGUM.js → url-hcMJkz8p.js} +1 -1
- zenml/zen_server/dashboard/assets/{zod-BhoGpZ63.js → zod-CnykDKJj.js} +1 -1
- zenml/zen_server/dashboard/index.html +7 -7
- zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
- zenml/zen_server/dashboard_legacy/index.html +1 -1
- zenml/zen_server/dashboard_legacy/{precache-manifest.12246c7548e71e2c4438e496360de80c.js → precache-manifest.9c473c96a43298343a7ce1256183123b.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/{main.3b27024b.chunk.js → main.463c90b9.chunk.js} +2 -2
- zenml/zen_server/dashboard_legacy/static/js/{main.3b27024b.chunk.js.map → main.463c90b9.chunk.js.map} +1 -1
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +2 -2
- zenml/zen_server/rbac/models.py +1 -0
- zenml/zen_server/rbac/utils.py +4 -0
- zenml/zen_server/routers/pipeline_builds_endpoints.py +2 -66
- zenml/zen_server/routers/pipeline_deployments_endpoints.py +2 -53
- zenml/zen_server/routers/pipelines_endpoints.py +1 -74
- zenml/zen_server/routers/run_templates_endpoints.py +212 -0
- zenml/zen_server/routers/stack_deployment_endpoints.py +6 -0
- zenml/zen_server/routers/users_endpoints.py +0 -7
- zenml/zen_server/routers/workspaces_endpoints.py +79 -0
- zenml/zen_server/{pipeline_deployment → template_execution}/runner_entrypoint_configuration.py +1 -8
- zenml/zen_server/{pipeline_deployment → template_execution}/utils.py +214 -92
- zenml/zen_server/utils.py +77 -2
- zenml/zen_server/zen_server_api.py +54 -2
- zenml/zen_stores/base_zen_store.py +7 -1
- zenml/zen_stores/migrations/versions/0.63.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.64.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/026d4577b6a0_add_code_path.py +39 -0
- zenml/zen_stores/migrations/versions/3dcc5d20e82f_add_last_user_activity.py +51 -0
- zenml/zen_stores/migrations/versions/7d1919bb1ef0_add_run_templates.py +100 -0
- zenml/zen_stores/migrations/versions/909550c7c4da_remove_user_hub_token.py +36 -0
- zenml/zen_stores/migrations/versions/b59aa68fdb1f_simplify_pipelines.py +139 -0
- zenml/zen_stores/rest_zen_store.py +112 -39
- zenml/zen_stores/schemas/__init__.py +2 -0
- zenml/zen_stores/schemas/pipeline_build_schemas.py +3 -3
- zenml/zen_stores/schemas/pipeline_deployment_schemas.py +32 -2
- zenml/zen_stores/schemas/pipeline_run_schemas.py +29 -3
- zenml/zen_stores/schemas/pipeline_schemas.py +29 -30
- zenml/zen_stores/schemas/run_template_schemas.py +264 -0
- zenml/zen_stores/schemas/server_settings_schemas.py +2 -0
- zenml/zen_stores/schemas/step_run_schemas.py +11 -4
- zenml/zen_stores/schemas/user_schemas.py +0 -2
- zenml/zen_stores/sql_zen_store.py +389 -151
- zenml/zen_stores/template_utils.py +261 -0
- zenml/zen_stores/zen_store_interface.py +93 -20
- {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/METADATA +3 -3
- {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/RECORD +211 -184
- zenml/_hub/client.py +0 -289
- zenml/_hub/constants.py +0 -21
- zenml/_hub/utils.py +0 -79
- zenml/cli/hub.py +0 -1116
- zenml/models/v2/core/pipeline_namespace.py +0 -113
- zenml/models/v2/misc/hub_plugin_models.py +0 -79
- zenml/new/pipelines/deserialization_utils.py +0 -292
- zenml/zen_server/dashboard/assets/@radix-CFOkMR_E.js +0 -85
- zenml/zen_server/dashboard/assets/CollapsibleCard-opiuBHHc.js +0 -1
- zenml/zen_server/dashboard/assets/CopyButton-Cr7xYEPb.js +0 -2
- zenml/zen_server/dashboard/assets/DisplayDate-DYgIjlDF.js +0 -1
- zenml/zen_server/dashboard/assets/Pagination-C6X-mifw.js +0 -1
- zenml/zen_server/dashboard/assets/index-EpMIKgrI.css +0 -1
- zenml/zen_server/dashboard/assets/index.esm-Corw4lXQ.js +0 -1
- zenml/zen_server/dashboard/assets/package-B3fWP-Dh.js +0 -1
- zenml/zen_server/dashboard/assets/page-5NCOHOsy.js +0 -1
- zenml/zen_server/dashboard/assets/page-B6h3iaHJ.js +0 -1
- zenml/zen_server/dashboard/assets/page-Bi-wtWiO.js +0 -5
- zenml/zen_server/dashboard/assets/page-Bq0YxkLV.js +0 -1
- zenml/zen_server/dashboard/assets/page-Bs2F4eoD.js +0 -2
- zenml/zen_server/dashboard/assets/page-CHNxpz3n.js +0 -1
- zenml/zen_server/dashboard/assets/page-DgorQFqi.js +0 -1
- zenml/zen_server/dashboard/assets/page-K8ebxVIs.js +0 -1
- zenml/zen_server/dashboard/assets/page-TgCF0P_U.js +0 -1
- zenml/zen_server/dashboard/assets/page-ZnCEe-eK.js +0 -9
- zenml/zen_server/dashboard/assets/persist-D7HJNBWx.js +0 -1
- zenml/zen_server/dashboard/assets/plus-C8WOyCzt.js +0 -1
- zenml/zen_server/dashboard/assets/secrets-video-OBJ6irhH.svg +0 -21
- zenml/zen_server/dashboard/assets/stacks-video-7gfxpAq4.svg +0 -21
- /zenml/zen_server/{pipeline_deployment → template_execution}/__init__.py +0 -0
- /zenml/zen_server/{pipeline_deployment → template_execution}/workload_manager_interface.py +0 -0
- {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/entry_points.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
var dt=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var u=(e,t,n)=>(dt(e,t,"read from private field"),n?n.call(e):t.get(e)),C=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},S=(e,t,n,i)=>(dt(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);var Ze=(e,t,n,i)=>({set _(s){S(e,t,s,n)},get _(){return u(e,t,i)}}),P=(e,t,n)=>(dt(e,t,"access private method"),n);import{r as E,j as Dn}from"./@radix-CFOkMR_E.js";var Le=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},He=typeof window>"u"||"Deno"in globalThis;function k(){}function An(e,t){return typeof e=="function"?e(t):e}function Ct(e){return typeof e=="number"&&e>=0&&e!==1/0}function an(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ut(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:r,queryKey:o,stale:l}=e;if(o){if(i){if(t.queryHash!==Lt(o,t.options))return!1}else if(!qe(t.queryKey,o))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||r&&!r(t))}function jt(e,t){const{exact:n,status:i,predicate:s,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(n){if(Re(t.options.mutationKey)!==Re(r))return!1}else if(!qe(t.options.mutationKey,r))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function Lt(e,t){return((t==null?void 0:t.queryKeyHashFn)||Re)(e)}function Re(e){return JSON.stringify(e,(t,n)=>Rt(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function qe(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!qe(e[n],t[n])):!1}function dn(e,t){if(e===t)return e;const n=kt(e)&&kt(t);if(n||Rt(e)&&Rt(t)){const i=n?e:Object.keys(e),s=i.length,r=n?t:Object.keys(t),o=r.length,l=n?[]:{};let a=0;for(let g=0;g<o;g++){const f=n?g:r[g];(!n&&i.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(l[f]=void 0,a++):(l[f]=dn(e[f],t[f]),l[f]===e[f]&&e[f]!==void 0&&a++)}return s===o&&a===s?e:l}return t}function rt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function kt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Rt(e){if(!Bt(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Bt(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Bt(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hn(e){return new Promise(t=>{setTimeout(t,e)})}function yt(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?dn(e,t):t}function Ln(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function Gn(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var cn=Symbol(),gn=(e,t)=>!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===cn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn,ge,ne,ye,Yt,zn=(Yt=class extends Le{constructor(){super();C(this,ge,void 0);C(this,ne,void 0);C(this,ye,void 0);S(this,ye,t=>{if(!He&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){u(this,ne)||this.setEventListener(u(this,ye))}onUnsubscribe(){var t;this.hasListeners()||((t=u(this,ne))==null||t.call(this),S(this,ne,void 0))}setEventListener(t){var n;S(this,ye,t),(n=u(this,ne))==null||n.call(this),S(this,ne,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){u(this,ge)!==t&&(S(this,ge,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof u(this,ge)=="boolean"?u(this,ge):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ge=new WeakMap,ne=new WeakMap,ye=new WeakMap,Yt),Gt=new zn,we,ie,Fe,Zt,Tn=(Zt=class extends Le{constructor(){super();C(this,we,!0);C(this,ie,void 0);C(this,Fe,void 0);S(this,Fe,t=>{if(!He&&window.addEventListener){const n=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){u(this,ie)||this.setEventListener(u(this,Fe))}onUnsubscribe(){var t;this.hasListeners()||((t=u(this,ie))==null||t.call(this),S(this,ie,void 0))}setEventListener(t){var n;S(this,Fe,t),(n=u(this,ie))==null||n.call(this),S(this,ie,t(this.setOnline.bind(this)))}setOnline(t){u(this,we)!==t&&(S(this,we,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return u(this,we)}},we=new WeakMap,ie=new WeakMap,Fe=new WeakMap,Zt),ot=new Tn;function qn(e){return Math.min(1e3*2**e,3e4)}function fn(e){return(e??"online")==="online"?ot.isOnline():!0}var hn=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ct(e){return e instanceof hn}function pn(e){let t=!1,n=0,i=!1,s,r,o;const l=new Promise((v,_)=>{r=v,o=_}),a=v=>{var _;i||(p(new hn(v)),(_=e.abort)==null||_.call(e))},g=()=>{t=!0},f=()=>{t=!1},h=()=>Gt.isFocused()&&(e.networkMode==="always"||ot.isOnline())&&e.canRun(),c=()=>fn(e.networkMode)&&e.canRun(),d=v=>{var _;i||(i=!0,(_=e.onSuccess)==null||_.call(e,v),s==null||s(),r(v))},p=v=>{var _;i||(i=!0,(_=e.onError)==null||_.call(e,v),s==null||s(),o(v))},m=()=>new Promise(v=>{var _;s=R=>{(i||h())&&v(R)},(_=e.onPause)==null||_.call(e)}).then(()=>{var v;s=void 0,i||(v=e.onContinue)==null||v.call(e)}),y=()=>{if(i)return;let v;const _=n===0?e.initialPromise:void 0;try{v=_??e.fn()}catch(R){v=Promise.reject(R)}Promise.resolve(v).then(d).catch(R=>{var M;if(i)return;const $=e.retry??(He?0:3),x=e.retryDelay??qn,G=typeof x=="function"?x(n,R):x,U=$===!0||typeof $=="number"&&n<$||typeof $=="function"&&$(n,R);if(t||!U){p(R);return}n++,(M=e.onFail)==null||M.call(e,n,R),Hn(G).then(()=>h()?void 0:m()).then(()=>{t?p(R):y()})})};return{promise:l,cancel:a,continue:()=>(s==null||s(),l),cancelRetry:g,continueRetry:f,canStart:c,start:()=>(c()?y():m().then(y),l)}}function bn(){let e=[],t=0,n=c=>{c()},i=c=>{c()},s=c=>setTimeout(c,0);const r=c=>{s=c},o=c=>{let d;t++;try{d=c()}finally{t--,t||g()}return d},l=c=>{t?e.push(c):s(()=>{n(c)})},a=c=>(...d)=>{l(()=>{c(...d)})},g=()=>{const c=e;e=[],c.length&&s(()=>{i(()=>{c.forEach(d=>{n(d)})})})};return{batch:o,batchCalls:a,schedule:l,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{i=c},setScheduler:r}}var V=bn(),fe,en,mn=(en=class{constructor(){C(this,fe,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ct(this.gcTime)&&S(this,fe,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(He?1/0:5*60*1e3))}clearGcTimeout(){u(this,fe)&&(clearTimeout(u(this,fe)),S(this,fe,void 0))}},fe=new WeakMap,en),_e,Pe,j,A,be,he,B,Y,tn,Qn=(tn=class extends mn{constructor(t){super();C(this,B);C(this,_e,void 0);C(this,Pe,void 0);C(this,j,void 0);C(this,A,void 0);C(this,be,void 0);C(this,he,void 0);S(this,he,!1),S(this,be,t.defaultOptions),this.setOptions(t.options),this.observers=[],S(this,j,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,S(this,_e,t.state||Un(this.options)),this.state=u(this,_e),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=u(this,A))==null?void 0:t.promise}setOptions(t){this.options={...u(this,be),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&u(this,j).remove(this)}setData(t,n){const i=yt(this.state.data,t,this.options);return P(this,B,Y).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(t,n){P(this,B,Y).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var i,s;const n=(i=u(this,A))==null?void 0:i.promise;return(s=u(this,A))==null||s.cancel(t),n?n.then(k).catch(k):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(u(this,_e))}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!an(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=u(this,A))==null||n.continue()}onOnline(){var n;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=u(this,A))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),u(this,j).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(u(this,A)&&(u(this,he)?u(this,A).cancel({revert:!0}):u(this,A).cancelRetry()),this.scheduleGc()),u(this,j).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||P(this,B,Y).call(this,{type:"invalidate"})}fetch(t,n){var a,g,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(u(this,A))return u(this,A).continueRetry(),u(this,A).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(c=>c.options.queryFn);h&&this.setOptions(h.options)}const i=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(S(this,he,!0),i.signal)})},r=()=>{const h=gn(this.options,n),c={queryKey:this.queryKey,meta:this.meta};return s(c),S(this,he,!1),this.options.persister?this.options.persister(h,c,this):h(c)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:r};s(o),(a=this.options.behavior)==null||a.onFetch(o,this),S(this,Pe,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=o.fetchOptions)==null?void 0:g.meta))&&P(this,B,Y).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const l=h=>{var c,d,p,m;ct(h)&&h.silent||P(this,B,Y).call(this,{type:"error",error:h}),ct(h)||((d=(c=u(this,j).config).onError)==null||d.call(c,h,this),(m=(p=u(this,j).config).onSettled)==null||m.call(p,this.state.data,h,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return S(this,A,pn({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:i.abort.bind(i),onSuccess:h=>{var c,d,p,m;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}this.setData(h),(d=(c=u(this,j).config).onSuccess)==null||d.call(c,h,this),(m=(p=u(this,j).config).onSettled)==null||m.call(p,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(h,c)=>{P(this,B,Y).call(this,{type:"failed",failureCount:h,error:c})},onPause:()=>{P(this,B,Y).call(this,{type:"pause"})},onContinue:()=>{P(this,B,Y).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),u(this,A).start()}},_e=new WeakMap,Pe=new WeakMap,j=new WeakMap,A=new WeakMap,be=new WeakMap,he=new WeakMap,B=new WeakSet,Y=function(t){const n=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Sn(i.data,this.options),fetchMeta:t.meta??null};case"success":return{...i,data:t.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return ct(s)&&s.revert&&u(this,Pe)?{...u(this,Pe),fetchStatus:"idle"}:{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=n(this.state),V.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),u(this,j).notify({query:this,type:"updated",action:t})})},tn);function Sn(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fn(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Un(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var K,nn,jn=(nn=class extends Le{constructor(t={}){super();C(this,K,void 0);this.config=t,S(this,K,new Map)}build(t,n,i){const s=n.queryKey,r=n.queryHash??Lt(s,n);let o=this.get(r);return o||(o=new Qn({cache:this,queryKey:s,queryHash:r,options:t.defaultQueryOptions(n),state:i,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){u(this,K).has(t.queryHash)||(u(this,K).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=u(this,K).get(t.queryHash);n&&(t.destroy(),n===t&&u(this,K).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){V.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return u(this,K).get(t)}getAll(){return[...u(this,K).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Ut(n,i))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(i=>Ut(t,i)):n}notify(t){V.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){V.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){V.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},K=new WeakMap,nn),X,H,pe,W,te,sn,kn=(sn=class extends mn{constructor(t){super();C(this,W);C(this,X,void 0);C(this,H,void 0);C(this,pe,void 0);this.mutationId=t.mutationId,S(this,H,t.mutationCache),S(this,X,[]),this.state=t.state||vn(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){u(this,X).includes(t)||(u(this,X).push(t),this.clearGcTimeout(),u(this,H).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){S(this,X,u(this,X).filter(n=>n!==t)),this.scheduleGc(),u(this,H).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){u(this,X).length||(this.state.status==="pending"?this.scheduleGc():u(this,H).remove(this))}continue(){var t;return((t=u(this,pe))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,r,o,l,a,g,f,h,c,d,p,m,y,v,_,R,$,x,G,U;S(this,pe,pn({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(M,q)=>{P(this,W,te).call(this,{type:"failed",failureCount:M,error:q})},onPause:()=>{P(this,W,te).call(this,{type:"pause"})},onContinue:()=>{P(this,W,te).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>u(this,H).canRun(this)}));const n=this.state.status==="pending",i=!u(this,pe).canStart();try{if(!n){P(this,W,te).call(this,{type:"pending",variables:t,isPaused:i}),await((r=(s=u(this,H).config).onMutate)==null?void 0:r.call(s,t,this));const q=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));q!==this.state.context&&P(this,W,te).call(this,{type:"pending",context:q,variables:t,isPaused:i})}const M=await u(this,pe).start();return await((g=(a=u(this,H).config).onSuccess)==null?void 0:g.call(a,M,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,M,t,this.state.context)),await((d=(c=u(this,H).config).onSettled)==null?void 0:d.call(c,M,null,this.state.variables,this.state.context,this)),await((m=(p=this.options).onSettled)==null?void 0:m.call(p,M,null,t,this.state.context)),P(this,W,te).call(this,{type:"success",data:M}),M}catch(M){try{throw await((v=(y=u(this,H).config).onError)==null?void 0:v.call(y,M,t,this.state.context,this)),await((R=(_=this.options).onError)==null?void 0:R.call(_,M,t,this.state.context)),await((x=($=u(this,H).config).onSettled)==null?void 0:x.call($,void 0,M,this.state.variables,this.state.context,this)),await((U=(G=this.options).onSettled)==null?void 0:U.call(G,void 0,M,t,this.state.context)),M}finally{P(this,W,te).call(this,{type:"error",error:M})}}finally{u(this,H).runNext(this)}}},X=new WeakMap,H=new WeakMap,pe=new WeakMap,W=new WeakSet,te=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),V.batch(()=>{u(this,X).forEach(i=>{i.onMutationUpdate(t)}),u(this,H).notify({mutation:this,type:"updated",action:t})})},sn);function vn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var b,Qe,rn,Bn=(rn=class extends Le{constructor(t={}){super();C(this,b,void 0);C(this,Qe,void 0);this.config=t,S(this,b,new Map),S(this,Qe,Date.now())}build(t,n,i){const s=new kn({mutationCache:this,mutationId:++Ze(this,Qe)._,options:t.defaultMutationOptions(n),state:i});return this.add(s),s}add(t){const n=et(t),i=u(this,b).get(n)??[];i.push(t),u(this,b).set(n,i),this.notify({type:"added",mutation:t})}remove(t){var i;const n=et(t);if(u(this,b).has(n)){const s=(i=u(this,b).get(n))==null?void 0:i.filter(r=>r!==t);s&&(s.length===0?u(this,b).delete(n):u(this,b).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var i;const n=(i=u(this,b).get(et(t)))==null?void 0:i.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var i;const n=(i=u(this,b).get(et(t)))==null?void 0:i.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){V.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...u(this,b).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(i=>jt(n,i))}findAll(t={}){return this.getAll().filter(n=>jt(t,n))}notify(t){V.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return V.batch(()=>Promise.all(t.map(n=>n.continue().catch(k))))}},b=new WeakMap,Qe=new WeakMap,rn);function et(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Nn(e){return{onFetch:(t,n)=>{const i=async()=>{var p,m,y,v,_;const s=t.options,r=(y=(m=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:y.direction,o=((v=t.state.data)==null?void 0:v.pages)||[],l=((_=t.state.data)==null?void 0:_.pageParams)||[],a={pages:[],pageParams:[]};let g=!1;const f=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},h=gn(t.options,t.fetchOptions),c=async(R,$,x)=>{if(g)return Promise.reject();if($==null&&R.pages.length)return Promise.resolve(R);const G={queryKey:t.queryKey,pageParam:$,direction:x?"backward":"forward",meta:t.options.meta};f(G);const U=await h(G),{maxPages:M}=t.options,q=x?Gn:Ln;return{pages:q(R.pages,U,M),pageParams:q(R.pageParams,$,M)}};let d;if(r&&o.length){const R=r==="backward",$=R?Kn:Nt,x={pages:o,pageParams:l},G=$(s,x);d=await c(x,G,R)}else{d=await c(a,l[0]??s.initialPageParam);const R=e??o.length;for(let $=1;$<R;$++){const x=Nt(s,d);d=await c(d,x)}}return d};t.options.persister?t.fetchFn=()=>{var s,r;return(r=(s=t.options).persister)==null?void 0:r.call(s,i,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=i}}}function Nt(e,{pages:t,pageParams:n}){const i=t.length-1;return e.getNextPageParam(t[i],t,n[i],n)}function Kn(e,{pages:t,pageParams:n}){var i;return(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n)}var O,se,re,Me,$e,oe,Ie,xe,on,ts=(on=class{constructor(e={}){C(this,O,void 0);C(this,se,void 0);C(this,re,void 0);C(this,Me,void 0);C(this,$e,void 0);C(this,oe,void 0);C(this,Ie,void 0);C(this,xe,void 0);S(this,O,e.queryCache||new jn),S(this,se,e.mutationCache||new Bn),S(this,re,e.defaultOptions||{}),S(this,Me,new Map),S(this,$e,new Map),S(this,oe,0)}mount(){Ze(this,oe)._++,u(this,oe)===1&&(S(this,Ie,Gt.subscribe(async e=>{e&&(await this.resumePausedMutations(),u(this,O).onFocus())})),S(this,xe,ot.subscribe(async e=>{e&&(await this.resumePausedMutations(),u(this,O).onOnline())})))}unmount(){var e,t;Ze(this,oe)._--,u(this,oe)===0&&((e=u(this,Ie))==null||e.call(this),S(this,Ie,void 0),(t=u(this,xe))==null||t.call(this),S(this,xe,void 0))}isFetching(e){return u(this,O).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return u(this,se).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=u(this,O).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),i=u(this,O).build(this,n);return e.revalidateIfStale&&i.isStaleByTime(n.staleTime)&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return u(this,O).findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),s=u(this,O).get(i.queryHash),r=s==null?void 0:s.state.data,o=An(t,r);if(o!==void 0)return u(this,O).build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return V.batch(()=>u(this,O).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=u(this,O).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=u(this,O);V.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=u(this,O),i={type:"active",...e};return V.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(i,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},i=V.batch(()=>u(this,O).findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(k).catch(k)}invalidateQueries(e={},t={}){return V.batch(()=>{if(u(this,O).findAll(e).forEach(i=>{i.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},i=V.batch(()=>u(this,O).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let r=s.fetch(void 0,n);return n.throwOnError||(r=r.catch(k)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(i).then(k)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=u(this,O).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(k).catch(k)}fetchInfiniteQuery(e){return e.behavior=Nn(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(k).catch(k)}resumePausedMutations(){return ot.isOnline()?u(this,se).resumePausedMutations():Promise.resolve()}getQueryCache(){return u(this,O)}getMutationCache(){return u(this,se)}getDefaultOptions(){return u(this,re)}setDefaultOptions(e){S(this,re,e)}setQueryDefaults(e,t){u(this,Me).set(Re(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...u(this,Me).values()];let n={};return t.forEach(i=>{qe(e,i.queryKey)&&(n={...n,...i.defaultOptions})}),n}setMutationDefaults(e,t){u(this,$e).set(Re(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...u(this,$e).values()];let n={};return t.forEach(i=>{qe(e,i.mutationKey)&&(n={...n,...i.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...u(this,re).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Lt(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===cn&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...u(this,re).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){u(this,O).clear(),u(this,se).clear()}},O=new WeakMap,se=new WeakMap,re=new WeakMap,Me=new WeakMap,$e=new WeakMap,oe=new WeakMap,Ie=new WeakMap,xe=new WeakMap,on),z,I,Ue,L,me,Oe,J,je,Ee,Ve,Se,ve,ue,De,Ce,ze,ke,wt,Be,Ft,Ne,_t,Ke,Pt,Xe,Mt,We,$t,Je,It,ut,Cn,un,Xn=(un=class extends Le{constructor(t,n){super();C(this,Ce);C(this,ke);C(this,Be);C(this,Ne);C(this,Ke);C(this,Xe);C(this,We);C(this,Je);C(this,ut);C(this,z,void 0);C(this,I,void 0);C(this,Ue,void 0);C(this,L,void 0);C(this,me,void 0);C(this,Oe,void 0);C(this,J,void 0);C(this,je,void 0);C(this,Ee,void 0);C(this,Ve,void 0);C(this,Se,void 0);C(this,ve,void 0);C(this,ue,void 0);C(this,De,new Set);this.options=n,S(this,z,t),S(this,J,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(u(this,I).addObserver(this),Kt(u(this,I),this.options)?P(this,Ce,ze).call(this):this.updateResult(),P(this,Ke,Pt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xt(u(this,I),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xt(u(this,I),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,P(this,Xe,Mt).call(this),P(this,We,$t).call(this),u(this,I).removeObserver(this)}setOptions(t,n){const i=this.options,s=u(this,I);if(this.options=u(this,z).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");P(this,Je,It).call(this),u(this,I).setOptions(this.options),i._defaulted&&!rt(this.options,i)&&u(this,z).getQueryCache().notify({type:"observerOptionsUpdated",query:u(this,I),observer:this});const r=this.hasListeners();r&&Xt(u(this,I),s,this.options,i)&&P(this,Ce,ze).call(this),this.updateResult(n),r&&(u(this,I)!==s||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&P(this,ke,wt).call(this);const o=P(this,Be,Ft).call(this);r&&(u(this,I)!==s||this.options.enabled!==i.enabled||o!==u(this,ue))&&P(this,Ne,_t).call(this,o)}getOptimisticResult(t){const n=u(this,z).getQueryCache().build(u(this,z),t),i=this.createResult(n,t);return Jn(this,i)&&(S(this,L,i),S(this,Oe,this.options),S(this,me,u(this,I).state)),i}getCurrentResult(){return u(this,L)}trackResult(t,n){const i={};return Object.keys(t).forEach(s=>{Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),t[s])})}),i}trackProp(t){u(this,De).add(t)}getCurrentQuery(){return u(this,I)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=u(this,z).defaultQueryOptions(t),i=u(this,z).getQueryCache().build(u(this,z),n);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,n))}fetch(t){return P(this,Ce,ze).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),u(this,L)))}createResult(t,n){var U;const i=u(this,I),s=this.options,r=u(this,L),o=u(this,me),l=u(this,Oe),g=t!==i?t.state:u(this,Ue),{state:f}=t;let h={...f},c=!1,d;if(n._optimisticResults){const M=this.hasListeners(),q=!M&&Kt(t,n),at=M&&Xt(t,i,n,s);(q||at)&&(h={...h,...Sn(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:y}=h;if(n.select&&h.data!==void 0)if(r&&h.data===(o==null?void 0:o.data)&&n.select===u(this,je))d=u(this,Ee);else try{S(this,je,n.select),d=n.select(h.data),d=yt(r==null?void 0:r.data,d,n),S(this,Ee,d),S(this,J,null)}catch(M){S(this,J,M)}else d=h.data;if(n.placeholderData!==void 0&&d===void 0&&y==="pending"){let M;if(r!=null&&r.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))M=r.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((U=u(this,Ve))==null?void 0:U.state.data,u(this,Ve)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),S(this,J,null)}catch(q){S(this,J,q)}M!==void 0&&(y="success",d=yt(r==null?void 0:r.data,M,n),c=!0)}u(this,J)&&(p=u(this,J),d=u(this,Ee),m=Date.now(),y="error");const v=h.fetchStatus==="fetching",_=y==="pending",R=y==="error",$=_&&v,x=d!==void 0;return{status:y,fetchStatus:h.fetchStatus,isPending:_,isSuccess:y==="success",isError:R,isInitialLoading:$,isLoading:$,data:d,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>g.dataUpdateCount||h.errorUpdateCount>g.errorUpdateCount,isFetching:v,isRefetching:v&&!_,isLoadingError:R&&!x,isPaused:h.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:R&&x,isStale:zt(t,n),refetch:this.refetch}}updateResult(t){const n=u(this,L),i=this.createResult(u(this,I),this.options);if(S(this,me,u(this,I).state),S(this,Oe,this.options),u(this,me).data!==void 0&&S(this,Ve,u(this,I)),rt(i,n))return;S(this,L,i);const s={},r=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!u(this,De).size)return!0;const a=new Set(l??u(this,De));return this.options.throwOnError&&a.add("error"),Object.keys(u(this,L)).some(g=>{const f=g;return u(this,L)[f]!==n[f]&&a.has(f)})};(t==null?void 0:t.listeners)!==!1&&r()&&(s.listeners=!0),P(this,ut,Cn).call(this,{...s,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&P(this,Ke,Pt).call(this)}},z=new WeakMap,I=new WeakMap,Ue=new WeakMap,L=new WeakMap,me=new WeakMap,Oe=new WeakMap,J=new WeakMap,je=new WeakMap,Ee=new WeakMap,Ve=new WeakMap,Se=new WeakMap,ve=new WeakMap,ue=new WeakMap,De=new WeakMap,Ce=new WeakSet,ze=function(t){P(this,Je,It).call(this);let n=u(this,I).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(k)),n},ke=new WeakSet,wt=function(){if(P(this,Xe,Mt).call(this),He||u(this,L).isStale||!Ct(this.options.staleTime))return;const n=an(u(this,L).dataUpdatedAt,this.options.staleTime)+1;S(this,Se,setTimeout(()=>{u(this,L).isStale||this.updateResult()},n))},Be=new WeakSet,Ft=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(u(this,I)):this.options.refetchInterval)??!1},Ne=new WeakSet,_t=function(t){P(this,We,$t).call(this),S(this,ue,t),!(He||this.options.enabled===!1||!Ct(u(this,ue))||u(this,ue)===0)&&S(this,ve,setInterval(()=>{(this.options.refetchIntervalInBackground||Gt.isFocused())&&P(this,Ce,ze).call(this)},u(this,ue)))},Ke=new WeakSet,Pt=function(){P(this,ke,wt).call(this),P(this,Ne,_t).call(this,P(this,Be,Ft).call(this))},Xe=new WeakSet,Mt=function(){u(this,Se)&&(clearTimeout(u(this,Se)),S(this,Se,void 0))},We=new WeakSet,$t=function(){u(this,ve)&&(clearInterval(u(this,ve)),S(this,ve,void 0))},Je=new WeakSet,It=function(){const t=u(this,z).getQueryCache().build(u(this,z),this.options);if(t===u(this,I))return;const n=u(this,I);S(this,I,t),S(this,Ue,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ut=new WeakSet,Cn=function(t){V.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(u(this,L))}),u(this,z).getQueryCache().notify({query:u(this,I),type:"observerResultsUpdated"})})},un);function Wn(e,t){return t.enabled!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Kt(e,t){return Wn(e,t)||e.state.data!==void 0&&xt(e,t,t.refetchOnMount)}function xt(e,t,n){if(t.enabled!==!1){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&zt(e,t)}return!1}function Xt(e,t,n,i){return(e!==t||i.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&zt(e,n)}function zt(e,t){return t.enabled!==!1&&e.isStaleByTime(t.staleTime)}function Jn(e,t){return!rt(e.getCurrentResult(),t)}var le,ae,T,ee,Ae,st,Ye,Ot,ln,Yn=(ln=class extends Le{constructor(t,n){super();C(this,Ae);C(this,Ye);C(this,le,void 0);C(this,ae,void 0);C(this,T,void 0);C(this,ee,void 0);S(this,le,t),this.setOptions(n),this.bindMethods(),P(this,Ae,st).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const n=this.options;this.options=u(this,le).defaultMutationOptions(t),rt(this.options,n)||u(this,le).getMutationCache().notify({type:"observerOptionsUpdated",mutation:u(this,T),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Re(n.mutationKey)!==Re(this.options.mutationKey)?this.reset():((i=u(this,T))==null?void 0:i.state.status)==="pending"&&u(this,T).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=u(this,T))==null||t.removeObserver(this)}onMutationUpdate(t){P(this,Ae,st).call(this),P(this,Ye,Ot).call(this,t)}getCurrentResult(){return u(this,ae)}reset(){var t;(t=u(this,T))==null||t.removeObserver(this),S(this,T,void 0),P(this,Ae,st).call(this),P(this,Ye,Ot).call(this)}mutate(t,n){var i;return S(this,ee,n),(i=u(this,T))==null||i.removeObserver(this),S(this,T,u(this,le).getMutationCache().build(u(this,le),this.options)),u(this,T).addObserver(this),u(this,T).execute(t)}},le=new WeakMap,ae=new WeakMap,T=new WeakMap,ee=new WeakMap,Ae=new WeakSet,st=function(){var n;const t=((n=u(this,T))==null?void 0:n.state)??vn();S(this,ae,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ye=new WeakSet,Ot=function(t){V.batch(()=>{var n,i,s,r,o,l,a,g;if(u(this,ee)&&this.hasListeners()){const f=u(this,ae).variables,h=u(this,ae).context;(t==null?void 0:t.type)==="success"?((i=(n=u(this,ee)).onSuccess)==null||i.call(n,t.data,f,h),(r=(s=u(this,ee)).onSettled)==null||r.call(s,t.data,null,f,h)):(t==null?void 0:t.type)==="error"&&((l=(o=u(this,ee)).onError)==null||l.call(o,t.error,f,h),(g=(a=u(this,ee)).onSettled)==null||g.call(a,void 0,t.error,f,h))}this.listeners.forEach(f=>{f(u(this,ae))})})},ln),Rn=E.createContext(void 0),yn=e=>{const t=E.useContext(Rn);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ns=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Dn.jsx(Rn.Provider,{value:e,children:t})),wn=E.createContext(!1),Zn=()=>E.useContext(wn);wn.Provider;function ei(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ti=E.createContext(ei()),ni=()=>E.useContext(ti);function Fn(e,t){return typeof e=="function"?e(...t):!!e}function ii(){}var si=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},ri=e=>{E.useEffect(()=>{e.clearReset()},[e])},oi=({result:e,errorResetBoundary:t,throwOnError:n,query:i})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&Fn(n,[e.error,i]),ui=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},li=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ai=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function di(e,t,n){const i=yn(n),s=Zn(),r=ni(),o=i.defaultQueryOptions(e);o._optimisticResults=s?"isRestoring":"optimistic",ui(o),si(o,r),ri(r);const[l]=E.useState(()=>new t(i,o)),a=l.getOptimisticResult(o);if(E.useSyncExternalStore(E.useCallback(g=>{const f=s?()=>{}:l.subscribe(V.batchCalls(g));return l.updateResult(),f},[l,s]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),E.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),li(o,a))throw ai(o,l,r);if(oi({result:a,errorResetBoundary:r,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash)}))throw a.error;return o.notifyOnChangeProps?a:l.trackResult(a)}function is(e,t){return di(e,Xn,t)}function ss(e){return e}function rs(e,t){const n=yn(t),[i]=E.useState(()=>new Yn(n,e));E.useEffect(()=>{i.setOptions(e)},[i,e]);const s=E.useSyncExternalStore(E.useCallback(o=>i.subscribe(V.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),r=E.useCallback((o,l)=>{i.mutate(o,l).catch(ii)},[i]);if(s.error&&Fn(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}/**
|
1
|
+
var dt=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var u=(e,t,n)=>(dt(e,t,"read from private field"),n?n.call(e):t.get(e)),C=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},v=(e,t,n,i)=>(dt(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);var Ze=(e,t,n,i)=>({set _(s){v(e,t,s,n)},get _(){return u(e,t,i)}}),_=(e,t,n)=>(dt(e,t,"access private method"),n);import{r as O,j as zn}from"./@radix-BXWm7HOa.js";var Le=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},He=typeof window>"u"||"Deno"in globalThis;function j(){}function bn(e,t){return typeof e=="function"?e(t):e}function Rt(e){return typeof e=="number"&&e>=0&&e!==1/0}function fn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nt(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:r,queryKey:o,stale:l}=e;if(o){if(i){if(t.queryHash!==bt(o,t.options))return!1}else if(!Te(t.queryKey,o))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||r&&!r(t))}function Kt(e,t){const{exact:n,status:i,predicate:s,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(n){if(Re(t.options.mutationKey)!==Re(r))return!1}else if(!Te(t.options.mutationKey,r))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function bt(e,t){return((t==null?void 0:t.queryKeyHashFn)||Re)(e)}function Re(e){return JSON.stringify(e,(t,n)=>yt(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function Te(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Te(e[n],t[n])):!1}function Tt(e,t){if(e===t)return e;const n=Xt(e)&&Xt(t);if(n||yt(e)&&yt(t)){const i=n?e:Object.keys(e),s=i.length,r=n?t:Object.keys(t),o=r.length,l=n?[]:{};let a=0;for(let g=0;g<o;g++){const f=n?g:r[g];(!n&&i.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(l[f]=void 0,a++):(l[f]=Tt(e[f],t[f]),l[f]===e[f]&&e[f]!==void 0&&a++)}return s===o&&a===s?e:l}return t}function rt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Xt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yt(e){if(!Wt(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Wt(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Wt(e){return Object.prototype.toString.call(e)==="[object Object]"}function Tn(e){return new Promise(t=>{setTimeout(t,e)})}function wt(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Tt(e,t):t}function qn(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function Qn(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var hn=Symbol(),pn=(e,t)=>!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===hn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn,ge,ne,ye,nn,Un=(nn=class extends Le{constructor(){super();C(this,ge,void 0);C(this,ne,void 0);C(this,ye,void 0);v(this,ye,t=>{if(!He&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){u(this,ne)||this.setEventListener(u(this,ye))}onUnsubscribe(){var t;this.hasListeners()||((t=u(this,ne))==null||t.call(this),v(this,ne,void 0))}setEventListener(t){var n;v(this,ye,t),(n=u(this,ne))==null||n.call(this),v(this,ne,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){u(this,ge)!==t&&(v(this,ge,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof u(this,ge)=="boolean"?u(this,ge):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ge=new WeakMap,ne=new WeakMap,ye=new WeakMap,nn),qt=new Un,we,ie,Fe,sn,kn=(sn=class extends Le{constructor(){super();C(this,we,!0);C(this,ie,void 0);C(this,Fe,void 0);v(this,Fe,t=>{if(!He&&window.addEventListener){const n=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){u(this,ie)||this.setEventListener(u(this,Fe))}onUnsubscribe(){var t;this.hasListeners()||((t=u(this,ie))==null||t.call(this),v(this,ie,void 0))}setEventListener(t){var n;v(this,Fe,t),(n=u(this,ie))==null||n.call(this),v(this,ie,t(this.setOnline.bind(this)))}setOnline(t){u(this,we)!==t&&(v(this,we,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return u(this,we)}},we=new WeakMap,ie=new WeakMap,Fe=new WeakMap,sn),ot=new kn;function jn(e){return Math.min(1e3*2**e,3e4)}function mn(e){return(e??"online")==="online"?ot.isOnline():!0}var vn=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function gt(e){return e instanceof vn}function Sn(e){let t=!1,n=0,i=!1,s,r,o;const l=new Promise((S,P)=>{r=S,o=P}),a=S=>{var P;i||(p(new vn(S)),(P=e.abort)==null||P.call(e))},g=()=>{t=!0},f=()=>{t=!1},h=()=>qt.isFocused()&&(e.networkMode==="always"||ot.isOnline())&&e.canRun(),d=()=>mn(e.networkMode)&&e.canRun(),c=S=>{var P;i||(i=!0,(P=e.onSuccess)==null||P.call(e,S),s==null||s(),r(S))},p=S=>{var P;i||(i=!0,(P=e.onError)==null||P.call(e,S),s==null||s(),o(S))},m=()=>new Promise(S=>{var P;s=R=>{(i||h())&&S(R)},(P=e.onPause)==null||P.call(e)}).then(()=>{var S;s=void 0,i||(S=e.onContinue)==null||S.call(e)}),y=()=>{if(i)return;let S;const P=n===0?e.initialPromise:void 0;try{S=P??e.fn()}catch(R){S=Promise.reject(R)}Promise.resolve(S).then(c).catch(R=>{var M;if(i)return;const $=e.retry??(He?0:3),I=e.retryDelay??jn,G=typeof I=="function"?I(n,R):I,U=$===!0||typeof $=="number"&&n<$||typeof $=="function"&&$(n,R);if(t||!U){p(R);return}n++,(M=e.onFail)==null||M.call(e,n,R),Tn(G).then(()=>h()?void 0:m()).then(()=>{t?p(R):y()})})};return{promise:l,cancel:a,continue:()=>(s==null||s(),l),cancelRetry:g,continueRetry:f,canStart:d,start:()=>(d()?y():m().then(y),l)}}function Bn(){let e=[],t=0,n=d=>{d()},i=d=>{d()},s=d=>setTimeout(d,0);const r=d=>{s=d},o=d=>{let c;t++;try{c=d()}finally{t--,t||g()}return c},l=d=>{t?e.push(d):s(()=>{n(d)})},a=d=>(...c)=>{l(()=>{d(...c)})},g=()=>{const d=e;e=[],d.length&&s(()=>{i(()=>{d.forEach(c=>{n(c)})})})};return{batch:o,batchCalls:a,schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{i=d},setScheduler:r}}var V=Bn(),fe,rn,Cn=(rn=class{constructor(){C(this,fe,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rt(this.gcTime)&&v(this,fe,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(He?1/0:5*60*1e3))}clearGcTimeout(){u(this,fe)&&(clearTimeout(u(this,fe)),v(this,fe,void 0))}},fe=new WeakMap,rn),Pe,_e,k,A,qe,he,B,Y,on,Nn=(on=class extends Cn{constructor(t){super();C(this,B);C(this,Pe,void 0);C(this,_e,void 0);C(this,k,void 0);C(this,A,void 0);C(this,qe,void 0);C(this,he,void 0);v(this,he,!1),v(this,qe,t.defaultOptions),this.setOptions(t.options),this.observers=[],v(this,k,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,v(this,Pe,t.state||Kn(this.options)),this.state=u(this,Pe),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=u(this,A))==null?void 0:t.promise}setOptions(t){this.options={...u(this,qe),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&u(this,k).remove(this)}setData(t,n){const i=wt(this.state.data,t,this.options);return _(this,B,Y).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(t,n){_(this,B,Y).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var i,s;const n=(i=u(this,A))==null?void 0:i.promise;return(s=u(this,A))==null||s.cancel(t),n?n.then(j).catch(j):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(u(this,Pe))}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!fn(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=u(this,A))==null||n.continue()}onOnline(){var n;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=u(this,A))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),u(this,k).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(u(this,A)&&(u(this,he)?u(this,A).cancel({revert:!0}):u(this,A).cancelRetry()),this.scheduleGc()),u(this,k).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||_(this,B,Y).call(this,{type:"invalidate"})}fetch(t,n){var a,g,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(u(this,A))return u(this,A).continueRetry(),u(this,A).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(d=>d.options.queryFn);h&&this.setOptions(h.options)}const i=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(v(this,he,!0),i.signal)})},r=()=>{const h=pn(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return s(d),v(this,he,!1),this.options.persister?this.options.persister(h,d,this):h(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:r};s(o),(a=this.options.behavior)==null||a.onFetch(o,this),v(this,_e,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=o.fetchOptions)==null?void 0:g.meta))&&_(this,B,Y).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const l=h=>{var d,c,p,m;gt(h)&&h.silent||_(this,B,Y).call(this,{type:"error",error:h}),gt(h)||((c=(d=u(this,k).config).onError)==null||c.call(d,h,this),(m=(p=u(this,k).config).onSettled)==null||m.call(p,this.state.data,h,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return v(this,A,Sn({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:i.abort.bind(i),onSuccess:h=>{var d,c,p,m;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}this.setData(h),(c=(d=u(this,k).config).onSuccess)==null||c.call(d,h,this),(m=(p=u(this,k).config).onSettled)==null||m.call(p,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(h,d)=>{_(this,B,Y).call(this,{type:"failed",failureCount:h,error:d})},onPause:()=>{_(this,B,Y).call(this,{type:"pause"})},onContinue:()=>{_(this,B,Y).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),u(this,A).start()}},Pe=new WeakMap,_e=new WeakMap,k=new WeakMap,A=new WeakMap,qe=new WeakMap,he=new WeakMap,B=new WeakSet,Y=function(t){const n=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Rn(i.data,this.options),fetchMeta:t.meta??null};case"success":return{...i,data:t.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return gt(s)&&s.revert&&u(this,_e)?{...u(this,_e),fetchStatus:"idle"}:{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=n(this.state),V.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),u(this,k).notify({query:this,type:"updated",action:t})})},on);function Rn(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mn(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Kn(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var K,un,Xn=(un=class extends Le{constructor(t={}){super();C(this,K,void 0);this.config=t,v(this,K,new Map)}build(t,n,i){const s=n.queryKey,r=n.queryHash??bt(s,n);let o=this.get(r);return o||(o=new Nn({cache:this,queryKey:s,queryHash:r,options:t.defaultQueryOptions(n),state:i,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){u(this,K).has(t.queryHash)||(u(this,K).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=u(this,K).get(t.queryHash);n&&(t.destroy(),n===t&&u(this,K).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){V.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return u(this,K).get(t)}getAll(){return[...u(this,K).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Nt(n,i))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(i=>Nt(t,i)):n}notify(t){V.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){V.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){V.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},K=new WeakMap,un),X,H,pe,W,te,ln,Wn=(ln=class extends Cn{constructor(t){super();C(this,W);C(this,X,void 0);C(this,H,void 0);C(this,pe,void 0);this.mutationId=t.mutationId,v(this,H,t.mutationCache),v(this,X,[]),this.state=t.state||yn(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){u(this,X).includes(t)||(u(this,X).push(t),this.clearGcTimeout(),u(this,H).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){v(this,X,u(this,X).filter(n=>n!==t)),this.scheduleGc(),u(this,H).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){u(this,X).length||(this.state.status==="pending"?this.scheduleGc():u(this,H).remove(this))}continue(){var t;return((t=u(this,pe))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,r,o,l,a,g,f,h,d,c,p,m,y,S,P,R,$,I,G,U;v(this,pe,Sn({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(M,T)=>{_(this,W,te).call(this,{type:"failed",failureCount:M,error:T})},onPause:()=>{_(this,W,te).call(this,{type:"pause"})},onContinue:()=>{_(this,W,te).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>u(this,H).canRun(this)}));const n=this.state.status==="pending",i=!u(this,pe).canStart();try{if(!n){_(this,W,te).call(this,{type:"pending",variables:t,isPaused:i}),await((r=(s=u(this,H).config).onMutate)==null?void 0:r.call(s,t,this));const T=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));T!==this.state.context&&_(this,W,te).call(this,{type:"pending",context:T,variables:t,isPaused:i})}const M=await u(this,pe).start();return await((g=(a=u(this,H).config).onSuccess)==null?void 0:g.call(a,M,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,M,t,this.state.context)),await((c=(d=u(this,H).config).onSettled)==null?void 0:c.call(d,M,null,this.state.variables,this.state.context,this)),await((m=(p=this.options).onSettled)==null?void 0:m.call(p,M,null,t,this.state.context)),_(this,W,te).call(this,{type:"success",data:M}),M}catch(M){try{throw await((S=(y=u(this,H).config).onError)==null?void 0:S.call(y,M,t,this.state.context,this)),await((R=(P=this.options).onError)==null?void 0:R.call(P,M,t,this.state.context)),await((I=($=u(this,H).config).onSettled)==null?void 0:I.call($,void 0,M,this.state.variables,this.state.context,this)),await((U=(G=this.options).onSettled)==null?void 0:U.call(G,void 0,M,t,this.state.context)),M}finally{_(this,W,te).call(this,{type:"error",error:M})}}finally{u(this,H).runNext(this)}}},X=new WeakMap,H=new WeakMap,pe=new WeakMap,W=new WeakSet,te=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),V.batch(()=>{u(this,X).forEach(i=>{i.onMutationUpdate(t)}),u(this,H).notify({mutation:this,type:"updated",action:t})})},ln);function yn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var q,Qe,an,Jn=(an=class extends Le{constructor(t={}){super();C(this,q,void 0);C(this,Qe,void 0);this.config=t,v(this,q,new Map),v(this,Qe,Date.now())}build(t,n,i){const s=new Wn({mutationCache:this,mutationId:++Ze(this,Qe)._,options:t.defaultMutationOptions(n),state:i});return this.add(s),s}add(t){const n=et(t),i=u(this,q).get(n)??[];i.push(t),u(this,q).set(n,i),this.notify({type:"added",mutation:t})}remove(t){var i;const n=et(t);if(u(this,q).has(n)){const s=(i=u(this,q).get(n))==null?void 0:i.filter(r=>r!==t);s&&(s.length===0?u(this,q).delete(n):u(this,q).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var i;const n=(i=u(this,q).get(et(t)))==null?void 0:i.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var i;const n=(i=u(this,q).get(et(t)))==null?void 0:i.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){V.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...u(this,q).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Kt(n,i))}findAll(t={}){return this.getAll().filter(n=>Kt(t,n))}notify(t){V.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return V.batch(()=>Promise.all(t.map(n=>n.continue().catch(j))))}},q=new WeakMap,Qe=new WeakMap,an);function et(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Ft(e){return{onFetch:(t,n)=>{const i=async()=>{var p,m,y,S,P;const s=t.options,r=(y=(m=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:y.direction,o=((S=t.state.data)==null?void 0:S.pages)||[],l=((P=t.state.data)==null?void 0:P.pageParams)||[],a={pages:[],pageParams:[]};let g=!1;const f=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},h=pn(t.options,t.fetchOptions),d=async(R,$,I)=>{if(g)return Promise.reject();if($==null&&R.pages.length)return Promise.resolve(R);const G={queryKey:t.queryKey,pageParam:$,direction:I?"backward":"forward",meta:t.options.meta};f(G);const U=await h(G),{maxPages:M}=t.options,T=I?Qn:qn;return{pages:T(R.pages,U,M),pageParams:T(R.pageParams,$,M)}};let c;if(r&&o.length){const R=r==="backward",$=R?wn:Pt,I={pages:o,pageParams:l},G=$(s,I);c=await d(I,G,R)}else{c=await d(a,l[0]??s.initialPageParam);const R=e??o.length;for(let $=1;$<R;$++){const I=Pt(s,c);c=await d(c,I)}}return c};t.options.persister?t.fetchFn=()=>{var s,r;return(r=(s=t.options).persister)==null?void 0:r.call(s,i,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=i}}}function Pt(e,{pages:t,pageParams:n}){const i=t.length-1;return e.getNextPageParam(t[i],t,n[i],n)}function wn(e,{pages:t,pageParams:n}){var i;return(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n)}function Yn(e,t){return t?Pt(e,t)!=null:!1}function Zn(e,t){return!t||!e.getPreviousPageParam?!1:wn(e,t)!=null}var E,se,re,Me,$e,oe,xe,Ie,cn,os=(cn=class{constructor(e={}){C(this,E,void 0);C(this,se,void 0);C(this,re,void 0);C(this,Me,void 0);C(this,$e,void 0);C(this,oe,void 0);C(this,xe,void 0);C(this,Ie,void 0);v(this,E,e.queryCache||new Xn),v(this,se,e.mutationCache||new Jn),v(this,re,e.defaultOptions||{}),v(this,Me,new Map),v(this,$e,new Map),v(this,oe,0)}mount(){Ze(this,oe)._++,u(this,oe)===1&&(v(this,xe,qt.subscribe(async e=>{e&&(await this.resumePausedMutations(),u(this,E).onFocus())})),v(this,Ie,ot.subscribe(async e=>{e&&(await this.resumePausedMutations(),u(this,E).onOnline())})))}unmount(){var e,t;Ze(this,oe)._--,u(this,oe)===0&&((e=u(this,xe))==null||e.call(this),v(this,xe,void 0),(t=u(this,Ie))==null||t.call(this),v(this,Ie,void 0))}isFetching(e){return u(this,E).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return u(this,se).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=u(this,E).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),i=u(this,E).build(this,n);return e.revalidateIfStale&&i.isStaleByTime(n.staleTime)&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return u(this,E).findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),s=u(this,E).get(i.queryHash),r=s==null?void 0:s.state.data,o=bn(t,r);if(o!==void 0)return u(this,E).build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return V.batch(()=>u(this,E).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=u(this,E).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=u(this,E);V.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=u(this,E),i={type:"active",...e};return V.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(i,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},i=V.batch(()=>u(this,E).findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(j).catch(j)}invalidateQueries(e={},t={}){return V.batch(()=>{if(u(this,E).findAll(e).forEach(i=>{i.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},i=V.batch(()=>u(this,E).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let r=s.fetch(void 0,n);return n.throwOnError||(r=r.catch(j)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(i).then(j)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=u(this,E).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(j).catch(j)}fetchInfiniteQuery(e){return e.behavior=Ft(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(j).catch(j)}resumePausedMutations(){return ot.isOnline()?u(this,se).resumePausedMutations():Promise.resolve()}getQueryCache(){return u(this,E)}getMutationCache(){return u(this,se)}getDefaultOptions(){return u(this,re)}setDefaultOptions(e){v(this,re,e)}setQueryDefaults(e,t){u(this,Me).set(Re(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...u(this,Me).values()];let n={};return t.forEach(i=>{Te(e,i.queryKey)&&(n={...n,...i.defaultOptions})}),n}setMutationDefaults(e,t){u(this,$e).set(Re(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...u(this,$e).values()];let n={};return t.forEach(i=>{Te(e,i.mutationKey)&&(n={...n,...i.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...u(this,re).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=bt(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===hn&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...u(this,re).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){u(this,E).clear(),u(this,se).clear()}},E=new WeakMap,se=new WeakMap,re=new WeakMap,Me=new WeakMap,$e=new WeakMap,oe=new WeakMap,xe=new WeakMap,Ie=new WeakMap,cn),z,x,Ue,L,me,Oe,J,ke,Ee,Ve,ve,Se,ue,De,Ce,ze,je,_t,Be,Mt,Ne,$t,Ke,xt,Xe,It,We,Ot,Je,Et,ut,Pn,dn,Fn=(dn=class extends Le{constructor(t,n){super();C(this,Ce);C(this,je);C(this,Be);C(this,Ne);C(this,Ke);C(this,Xe);C(this,We);C(this,Je);C(this,ut);C(this,z,void 0);C(this,x,void 0);C(this,Ue,void 0);C(this,L,void 0);C(this,me,void 0);C(this,Oe,void 0);C(this,J,void 0);C(this,ke,void 0);C(this,Ee,void 0);C(this,Ve,void 0);C(this,ve,void 0);C(this,Se,void 0);C(this,ue,void 0);C(this,De,new Set);this.options=n,v(this,z,t),v(this,J,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(u(this,x).addObserver(this),Jt(u(this,x),this.options)?_(this,Ce,ze).call(this):this.updateResult(),_(this,Ke,xt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Vt(u(this,x),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Vt(u(this,x),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,_(this,Xe,It).call(this),_(this,We,Ot).call(this),u(this,x).removeObserver(this)}setOptions(t,n){const i=this.options,s=u(this,x);if(this.options=u(this,z).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");_(this,Je,Et).call(this),u(this,x).setOptions(this.options),i._defaulted&&!rt(this.options,i)&&u(this,z).getQueryCache().notify({type:"observerOptionsUpdated",query:u(this,x),observer:this});const r=this.hasListeners();r&&Yt(u(this,x),s,this.options,i)&&_(this,Ce,ze).call(this),this.updateResult(n),r&&(u(this,x)!==s||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&_(this,je,_t).call(this);const o=_(this,Be,Mt).call(this);r&&(u(this,x)!==s||this.options.enabled!==i.enabled||o!==u(this,ue))&&_(this,Ne,$t).call(this,o)}getOptimisticResult(t){const n=u(this,z).getQueryCache().build(u(this,z),t),i=this.createResult(n,t);return ti(this,i)&&(v(this,L,i),v(this,Oe,this.options),v(this,me,u(this,x).state)),i}getCurrentResult(){return u(this,L)}trackResult(t,n){const i={};return Object.keys(t).forEach(s=>{Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),t[s])})}),i}trackProp(t){u(this,De).add(t)}getCurrentQuery(){return u(this,x)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=u(this,z).defaultQueryOptions(t),i=u(this,z).getQueryCache().build(u(this,z),n);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,n))}fetch(t){return _(this,Ce,ze).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),u(this,L)))}createResult(t,n){var U;const i=u(this,x),s=this.options,r=u(this,L),o=u(this,me),l=u(this,Oe),g=t!==i?t.state:u(this,Ue),{state:f}=t;let h={...f},d=!1,c;if(n._optimisticResults){const M=this.hasListeners(),T=!M&&Jt(t,n),ct=M&&Yt(t,i,n,s);(T||ct)&&(h={...h,...Rn(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:y}=h;if(n.select&&h.data!==void 0)if(r&&h.data===(o==null?void 0:o.data)&&n.select===u(this,ke))c=u(this,Ee);else try{v(this,ke,n.select),c=n.select(h.data),c=wt(r==null?void 0:r.data,c,n),v(this,Ee,c),v(this,J,null)}catch(M){v(this,J,M)}else c=h.data;if(n.placeholderData!==void 0&&c===void 0&&y==="pending"){let M;if(r!=null&&r.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))M=r.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((U=u(this,Ve))==null?void 0:U.state.data,u(this,Ve)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),v(this,J,null)}catch(T){v(this,J,T)}M!==void 0&&(y="success",c=wt(r==null?void 0:r.data,M,n),d=!0)}u(this,J)&&(p=u(this,J),c=u(this,Ee),m=Date.now(),y="error");const S=h.fetchStatus==="fetching",P=y==="pending",R=y==="error",$=P&&S,I=c!==void 0;return{status:y,fetchStatus:h.fetchStatus,isPending:P,isSuccess:y==="success",isError:R,isInitialLoading:$,isLoading:$,data:c,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>g.dataUpdateCount||h.errorUpdateCount>g.errorUpdateCount,isFetching:S,isRefetching:S&&!P,isLoadingError:R&&!I,isPaused:h.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:R&&I,isStale:Qt(t,n),refetch:this.refetch}}updateResult(t){const n=u(this,L),i=this.createResult(u(this,x),this.options);if(v(this,me,u(this,x).state),v(this,Oe,this.options),u(this,me).data!==void 0&&v(this,Ve,u(this,x)),rt(i,n))return;v(this,L,i);const s={},r=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!u(this,De).size)return!0;const a=new Set(l??u(this,De));return this.options.throwOnError&&a.add("error"),Object.keys(u(this,L)).some(g=>{const f=g;return u(this,L)[f]!==n[f]&&a.has(f)})};(t==null?void 0:t.listeners)!==!1&&r()&&(s.listeners=!0),_(this,ut,Pn).call(this,{...s,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&_(this,Ke,xt).call(this)}},z=new WeakMap,x=new WeakMap,Ue=new WeakMap,L=new WeakMap,me=new WeakMap,Oe=new WeakMap,J=new WeakMap,ke=new WeakMap,Ee=new WeakMap,Ve=new WeakMap,ve=new WeakMap,Se=new WeakMap,ue=new WeakMap,De=new WeakMap,Ce=new WeakSet,ze=function(t){_(this,Je,Et).call(this);let n=u(this,x).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(j)),n},je=new WeakSet,_t=function(){if(_(this,Xe,It).call(this),He||u(this,L).isStale||!Rt(this.options.staleTime))return;const n=fn(u(this,L).dataUpdatedAt,this.options.staleTime)+1;v(this,ve,setTimeout(()=>{u(this,L).isStale||this.updateResult()},n))},Be=new WeakSet,Mt=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(u(this,x)):this.options.refetchInterval)??!1},Ne=new WeakSet,$t=function(t){_(this,We,Ot).call(this),v(this,ue,t),!(He||this.options.enabled===!1||!Rt(u(this,ue))||u(this,ue)===0)&&v(this,Se,setInterval(()=>{(this.options.refetchIntervalInBackground||qt.isFocused())&&_(this,Ce,ze).call(this)},u(this,ue)))},Ke=new WeakSet,xt=function(){_(this,je,_t).call(this),_(this,Ne,$t).call(this,_(this,Be,Mt).call(this))},Xe=new WeakSet,It=function(){u(this,ve)&&(clearTimeout(u(this,ve)),v(this,ve,void 0))},We=new WeakSet,Ot=function(){u(this,Se)&&(clearInterval(u(this,Se)),v(this,Se,void 0))},Je=new WeakSet,Et=function(){const t=u(this,z).getQueryCache().build(u(this,z),this.options);if(t===u(this,x))return;const n=u(this,x);v(this,x,t),v(this,Ue,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ut=new WeakSet,Pn=function(t){V.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(u(this,L))}),u(this,z).getQueryCache().notify({query:u(this,x),type:"observerResultsUpdated"})})},dn);function ei(e,t){return t.enabled!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Jt(e,t){return ei(e,t)||e.state.data!==void 0&&Vt(e,t,t.refetchOnMount)}function Vt(e,t,n){if(t.enabled!==!1){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&Qt(e,t)}return!1}function Yt(e,t,n,i){return(e!==t||i.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Qt(e,n)}function Qt(e,t){return t.enabled!==!1&&e.isStaleByTime(t.staleTime)}function ti(e,t){return!rt(e.getCurrentResult(),t)}var ni=class extends Fn{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:Ft()},t)}getOptimisticResult(e){return e.behavior=Ft(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var p,m;const{state:n}=e,i=super.createResult(e,t),{isFetching:s,isRefetching:r,isError:o,isRefetchError:l}=i,a=(m=(p=n.fetchMeta)==null?void 0:p.fetchMore)==null?void 0:m.direction,g=o&&a==="forward",f=s&&a==="forward",h=o&&a==="backward",d=s&&a==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Yn(t,n.data),hasPreviousPage:Zn(t,n.data),isFetchNextPageError:g,isFetchingNextPage:f,isFetchPreviousPageError:h,isFetchingPreviousPage:d,isRefetchError:l&&!g&&!h,isRefetching:r&&!f&&!d}}},le,ae,b,ee,Ae,st,Ye,Dt,gn,ii=(gn=class extends Le{constructor(t,n){super();C(this,Ae);C(this,Ye);C(this,le,void 0);C(this,ae,void 0);C(this,b,void 0);C(this,ee,void 0);v(this,le,t),this.setOptions(n),this.bindMethods(),_(this,Ae,st).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const n=this.options;this.options=u(this,le).defaultMutationOptions(t),rt(this.options,n)||u(this,le).getMutationCache().notify({type:"observerOptionsUpdated",mutation:u(this,b),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Re(n.mutationKey)!==Re(this.options.mutationKey)?this.reset():((i=u(this,b))==null?void 0:i.state.status)==="pending"&&u(this,b).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=u(this,b))==null||t.removeObserver(this)}onMutationUpdate(t){_(this,Ae,st).call(this),_(this,Ye,Dt).call(this,t)}getCurrentResult(){return u(this,ae)}reset(){var t;(t=u(this,b))==null||t.removeObserver(this),v(this,b,void 0),_(this,Ae,st).call(this),_(this,Ye,Dt).call(this)}mutate(t,n){var i;return v(this,ee,n),(i=u(this,b))==null||i.removeObserver(this),v(this,b,u(this,le).getMutationCache().build(u(this,le),this.options)),u(this,b).addObserver(this),u(this,b).execute(t)}},le=new WeakMap,ae=new WeakMap,b=new WeakMap,ee=new WeakMap,Ae=new WeakSet,st=function(){var n;const t=((n=u(this,b))==null?void 0:n.state)??yn();v(this,ae,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ye=new WeakSet,Dt=function(t){V.batch(()=>{var n,i,s,r,o,l,a,g;if(u(this,ee)&&this.hasListeners()){const f=u(this,ae).variables,h=u(this,ae).context;(t==null?void 0:t.type)==="success"?((i=(n=u(this,ee)).onSuccess)==null||i.call(n,t.data,f,h),(r=(s=u(this,ee)).onSettled)==null||r.call(s,t.data,null,f,h)):(t==null?void 0:t.type)==="error"&&((l=(o=u(this,ee)).onError)==null||l.call(o,t.error,f,h),(g=(a=u(this,ee)).onSettled)==null||g.call(a,void 0,t.error,f,h))}this.listeners.forEach(f=>{f(u(this,ae))})})},gn),_n=O.createContext(void 0),lt=e=>{const t=O.useContext(_n);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},us=({client:e,children:t})=>(O.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),zn.jsx(_n.Provider,{value:e,children:t})),Mn=O.createContext(!1),si=()=>O.useContext(Mn);Mn.Provider;function ri(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var oi=O.createContext(ri()),ui=()=>O.useContext(oi);function $n(e,t){return typeof e=="function"?e(...t):!!e}function li(){}var ai=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},ci=e=>{O.useEffect(()=>{e.clearReset()},[e])},di=({result:e,errorResetBoundary:t,throwOnError:n,query:i})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&$n(n,[e.error,i]),gi=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},fi=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,hi=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function xn(e,t,n){const i=lt(n),s=si(),r=ui(),o=i.defaultQueryOptions(e);o._optimisticResults=s?"isRestoring":"optimistic",gi(o),ai(o,r),ci(r);const[l]=O.useState(()=>new t(i,o)),a=l.getOptimisticResult(o);if(O.useSyncExternalStore(O.useCallback(g=>{const f=s?()=>{}:l.subscribe(V.batchCalls(g));return l.updateResult(),f},[l,s]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),O.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),fi(o,a))throw hi(o,l,r);if(di({result:a,errorResetBoundary:r,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash)}))throw a.error;return o.notifyOnChangeProps?a:l.trackResult(a)}function ls(e,t){return xn(e,Fn,t)}function as(e){return e}function cs(e){return e}function ds(e,t){const n=lt(t);return pi({filters:{...e,status:"pending"}},n).length}function Zt(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function pi(e={},t){const n=lt(t).getMutationCache(),i=O.useRef(e),s=O.useRef(null);return s.current||(s.current=Zt(n,e)),O.useEffect(()=>{i.current=e}),O.useSyncExternalStore(O.useCallback(r=>n.subscribe(()=>{const o=Tt(s.current,Zt(n,i.current));s.current!==o&&(s.current=o,V.schedule(r))}),[n]),()=>s.current,()=>s.current)}function gs(e,t){const n=lt(t),[i]=O.useState(()=>new ii(n,e));O.useEffect(()=>{i.setOptions(e)},[i,e]);const s=O.useSyncExternalStore(O.useCallback(o=>i.subscribe(V.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),r=O.useCallback((o,l)=>{i.mutate(o,l).catch(li)},[i]);if(s.error&&$n(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}function fs(e,t){return xn(e,ni,t)}/**
|
2
2
|
* table-core
|
3
3
|
*
|
4
4
|
* Copyright (c) TanStack
|
@@ -7,10 +7,10 @@ var dt=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var u=(e,t,n)=>(dt(e
|
|
7
7
|
* LICENSE.md file in the root directory of this source tree.
|
8
8
|
*
|
9
9
|
* @license MIT
|
10
|
-
*/function
|
10
|
+
*/function ce(e,t){return typeof e=="function"?e(t):e}function Q(e,t){return n=>{t.setState(i=>({...i,[e]:ce(n,i[e])}))}}function at(e){return e instanceof Function}function mi(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function vi(e,t){const n=[],i=s=>{s.forEach(r=>{n.push(r);const o=t(r);o!=null&&o.length&&i(o)})};return i(e),n}function w(e,t,n){let i=[],s;return r=>{let o;n.key&&n.debug&&(o=Date.now());const l=e(r);if(!(l.length!==i.length||l.some((f,h)=>i[h]!==f)))return s;i=l;let g;if(n.key&&n.debug&&(g=Date.now()),s=t(...l),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const f=Math.round((Date.now()-o)*100)/100,h=Math.round((Date.now()-g)*100)/100,d=h/16,c=(p,m)=>{for(p=String(p);p.length<m;)p=" "+p;return p};console.info(`%c⏱ ${c(h,5)} /${c(f,5)} ms`,`
|
11
11
|
font-size: .6rem;
|
12
12
|
font-weight: bold;
|
13
|
-
color: hsl(${Math.max(0,Math.min(120-120*c,120))}deg 100% 31%);`,n==null?void 0:n.key)}return s}}function F(e,t,n,i){return{debug:()=>{var s;return(s=e==null?void 0:e.debugAll)!=null?s:e[t]},key:!1,onChange:i}}function fi(e,t,n,i){const s=()=>{var o;return(o=r.getValue())!=null?o:e.options.renderFallbackValue},r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:s,getContext:w(()=>[e,n,t,r],(o,l,a,g)=>({table:o,column:l,row:a,cell:g,getValue:g.getValue,renderValue:g.renderValue}),F(e.options,"debugCells"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(r,n,t,e)},{}),r}function hi(e,t,n,i){var s,r;const l={...e._getDefaultColumnDef(),...t},a=l.accessorKey;let g=(s=(r=l.id)!=null?r:a?a.replace(".","_"):void 0)!=null?s:typeof l.header=="string"?l.header:void 0,f;if(l.accessorFn?f=l.accessorFn:a&&(a.includes(".")?f=c=>{let d=c;for(const m of a.split(".")){var p;d=(p=d)==null?void 0:p[m]}return d}:f=c=>c[l.accessorKey]),!g)throw new Error;let h={id:`${String(g)}`,accessorFn:f,parent:i,depth:n,columnDef:l,columns:[],getFlatColumns:w(()=>[!0],()=>{var c;return[h,...(c=h.columns)==null?void 0:c.flatMap(d=>d.getFlatColumns())]},F(e.options,"debugColumns")),getLeafColumns:w(()=>[e._getOrderColumnsFn()],c=>{var d;if((d=h.columns)!=null&&d.length){let p=h.columns.flatMap(m=>m.getLeafColumns());return c(p)}return[h]},F(e.options,"debugColumns"))};for(const c of e._features)c.createColumn==null||c.createColumn(h,e);return h}const D="debugHeaders";function Wt(e,t,n){var i;let r={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const o=[],l=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(l),o.push(a)};return l(r),o},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(r,e)}),r}const pi={createTable:e=>{e.getHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>{var r,o;const l=(r=i==null?void 0:i.map(h=>n.find(c=>c.id===h)).filter(Boolean))!=null?r:[],a=(o=s==null?void 0:s.map(h=>n.find(c=>c.id===h)).filter(Boolean))!=null?o:[],g=n.filter(h=>!(i!=null&&i.includes(h.id))&&!(s!=null&&s.includes(h.id)));return tt(t,[...l,...g,...a],e)},F(e.options,D)),e.getCenterHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>(n=n.filter(r=>!(i!=null&&i.includes(r.id))&&!(s!=null&&s.includes(r.id))),tt(t,n,e,"center")),F(e.options,D)),e.getLeftHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var s;const r=(s=i==null?void 0:i.map(o=>n.find(l=>l.id===o)).filter(Boolean))!=null?s:[];return tt(t,r,e,"left")},F(e.options,D)),e.getRightHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var s;const r=(s=i==null?void 0:i.map(o=>n.find(l=>l.id===o)).filter(Boolean))!=null?s:[];return tt(t,r,e,"right")},F(e.options,D)),e.getFooterGroups=w(()=>[e.getHeaderGroups()],t=>[...t].reverse(),F(e.options,D)),e.getLeftFooterGroups=w(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),F(e.options,D)),e.getCenterFooterGroups=w(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),F(e.options,D)),e.getRightFooterGroups=w(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),F(e.options,D)),e.getFlatHeaders=w(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,D)),e.getLeftFlatHeaders=w(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,D)),e.getCenterFlatHeaders=w(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,D)),e.getRightFlatHeaders=w(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,D)),e.getCenterLeafHeaders=w(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,D)),e.getLeftLeafHeaders=w(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,D)),e.getRightLeafHeaders=w(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,D)),e.getLeafHeaders=w(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var s,r,o,l,a,g;return[...(s=(r=t[0])==null?void 0:r.headers)!=null?s:[],...(o=(l=n[0])==null?void 0:l.headers)!=null?o:[],...(a=(g=i[0])==null?void 0:g.headers)!=null?a:[]].map(f=>f.getLeafHeaders()).flat()},F(e.options,D))}};function tt(e,t,n,i){var s,r;let o=0;const l=function(c,d){d===void 0&&(d=1),o=Math.max(o,d),c.filter(p=>p.getIsVisible()).forEach(p=>{var m;(m=p.columns)!=null&&m.length&&l(p.columns,d+1)},0)};l(e);let a=[];const g=(c,d)=>{const p={depth:d,id:[i,`${d}`].filter(Boolean).join("_"),headers:[]},m=[];c.forEach(y=>{const v=[...m].reverse()[0],_=y.column.depth===p.depth;let R,$=!1;if(_&&y.column.parent?R=y.column.parent:(R=y.column,$=!0),v&&(v==null?void 0:v.column)===R)v.subHeaders.push(y);else{const x=Wt(n,R,{id:[i,d,R.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:$,placeholderId:$?`${m.filter(G=>G.column===R).length}`:void 0,depth:d,index:m.length});x.subHeaders.push(y),m.push(x)}p.headers.push(y),y.headerGroup=p}),a.push(p),d>0&&g(m,d-1)},f=t.map((c,d)=>Wt(n,c,{depth:o,index:d}));g(f,o-1),a.reverse();const h=c=>c.filter(p=>p.column.getIsVisible()).map(p=>{let m=0,y=0,v=[0];p.subHeaders&&p.subHeaders.length?(v=[],h(p.subHeaders).forEach(R=>{let{colSpan:$,rowSpan:x}=R;m+=$,v.push(x)})):m=1;const _=Math.min(...v);return y=y+_,p.colSpan=m,p.rowSpan=y,{colSpan:m,rowSpan:y}});return h((s=(r=a[0])==null?void 0:r.headers)!=null?s:[]),a}const mi=(e,t,n,i,s,r,o)=>{let l={id:t,index:i,original:n,depth:s,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(l._valuesCache.hasOwnProperty(a))return l._valuesCache[a];const g=e.getColumn(a);if(g!=null&&g.accessorFn)return l._valuesCache[a]=g.accessorFn(l.original,i),l._valuesCache[a]},getUniqueValues:a=>{if(l._uniqueValuesCache.hasOwnProperty(a))return l._uniqueValuesCache[a];const g=e.getColumn(a);if(g!=null&&g.accessorFn)return g.columnDef.getUniqueValues?(l._uniqueValuesCache[a]=g.columnDef.getUniqueValues(l.original,i),l._uniqueValuesCache[a]):(l._uniqueValuesCache[a]=[l.getValue(a)],l._uniqueValuesCache[a])},renderValue:a=>{var g;return(g=l.getValue(a))!=null?g:e.options.renderFallbackValue},subRows:r??[],getLeafRows:()=>gi(l.subRows,a=>a.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let a=[],g=l;for(;;){const f=g.getParentRow();if(!f)break;a.push(f),g=f}return a.reverse()},getAllCells:w(()=>[e.getAllLeafColumns()],a=>a.map(g=>fi(e,l,g,g.id)),F(e.options,"debugRows")),_getAllCellsByColumnId:w(()=>[l.getAllCells()],a=>a.reduce((g,f)=>(g[f.column.id]=f,g),{}),F(e.options,"debugRows"))};for(let a=0;a<e._features.length;a++){const g=e._features[a];g==null||g.createRow==null||g.createRow(l,e)}return l},Si={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},_n=(e,t,n)=>{var i;const s=n.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};_n.autoRemove=e=>N(e);const Pn=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};Pn.autoRemove=e=>N(e);const Mn=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(n==null?void 0:n.toLowerCase())};Mn.autoRemove=e=>N(e);const $n=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};$n.autoRemove=e=>N(e)||!(e!=null&&e.length);const In=(e,t,n)=>!n.some(i=>{var s;return!((s=e.getValue(t))!=null&&s.includes(i))});In.autoRemove=e=>N(e)||!(e!=null&&e.length);const xn=(e,t,n)=>n.some(i=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(i)});xn.autoRemove=e=>N(e)||!(e!=null&&e.length);const On=(e,t,n)=>e.getValue(t)===n;On.autoRemove=e=>N(e);const En=(e,t,n)=>e.getValue(t)==n;En.autoRemove=e=>N(e);const Tt=(e,t,n)=>{let[i,s]=n;const r=e.getValue(t);return r>=i&&r<=s};Tt.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,r=t===null||Number.isNaN(i)?-1/0:i,o=n===null||Number.isNaN(s)?1/0:s;if(r>o){const l=r;r=o,o=l}return[r,o]};Tt.autoRemove=e=>N(e)||N(e[0])&&N(e[1]);const Z={includesString:_n,includesStringSensitive:Pn,equalsString:Mn,arrIncludes:$n,arrIncludesAll:In,arrIncludesSome:xn,equals:On,weakEquals:En,inNumberRange:Tt};function N(e){return e==null||e===""}const vi={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Q("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);return typeof i=="string"?Z.includesString:typeof i=="number"?Z.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?Z.equals:Array.isArray(i)?Z.arrIncludes:Z.weakEquals},e.getFilterFn=()=>{var n,i;return lt(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:Z[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const s=e.getFilterFn(),r=i==null?void 0:i.find(f=>f.id===e.id),o=de(n,r?r.value:void 0);if(Jt(s,o,e)){var l;return(l=i==null?void 0:i.filter(f=>f.id!==e.id))!=null?l:[]}const a={id:e.id,value:o};if(r){var g;return(g=i==null?void 0:i.map(f=>f.id===e.id?a:f))!=null?g:[]}return i!=null&&i.length?[...i,a]:[a]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=s=>{var r;return(r=de(t,s))==null?void 0:r.filter(o=>{const l=n.find(a=>a.id===o.id);if(l){const a=l.getFilterFn();if(Jt(a,o.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Jt(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Ci=(e,t,n)=>n.reduce((i,s)=>{const r=s.getValue(e);return i+(typeof r=="number"?r:0)},0),Ri=(e,t,n)=>{let i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i>r||i===void 0&&r>=r)&&(i=r)}),i},yi=(e,t,n)=>{let i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i<r||i===void 0&&r>=r)&&(i=r)}),i},wi=(e,t,n)=>{let i,s;return n.forEach(r=>{const o=r.getValue(e);o!=null&&(i===void 0?o>=o&&(i=s=o):(i>o&&(i=o),s<o&&(s=o)))}),[i,s]},Fi=(e,t)=>{let n=0,i=0;if(t.forEach(s=>{let r=s.getValue(e);r!=null&&(r=+r)>=r&&(++n,i+=r)}),n)return i/n},_i=(e,t)=>{if(!t.length)return;const n=t.map(r=>r.getValue(e));if(!ci(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),s=n.sort((r,o)=>r-o);return n.length%2!==0?s[i]:(s[i-1]+s[i])/2},Pi=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Mi=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,$i=(e,t)=>t.length,gt={sum:Ci,min:Ri,max:yi,extent:wi,mean:Fi,median:_i,unique:Pi,uniqueCount:Mi,count:$i},Ii={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Q("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);if(typeof i=="number")return gt.sum;if(Object.prototype.toString.call(i)==="[object Date]")return gt.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return lt(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:gt[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function xi(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(r=>!t.includes(r.id));return n==="remove"?i:[...t.map(r=>e.find(o=>o.id===r)).filter(Boolean),...i]}const Oi={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Q("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=w(n=>[Te(t,n)],n=>n.findIndex(i=>i.id===e.id),F(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var i;return((i=Te(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const s=Te(t,n);return((i=s[s.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=w(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>s=>{let r=[];if(!(t!=null&&t.length))r=s;else{const o=[...t],l=[...s];for(;l.length&&o.length;){const a=o.shift(),g=l.findIndex(f=>f.id===a);g>-1&&r.push(l.splice(g,1)[0])}r=[...r,...l]}return xi(r,n,i)},F(e.options,"debugTable"))}},ft=()=>({left:[],right:[]}),Ei={getInitialState:e=>({columnPinning:ft(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Q("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var r,o;if(n==="right"){var l,a;return{left:((l=s==null?void 0:s.left)!=null?l:[]).filter(h=>!(i!=null&&i.includes(h))),right:[...((a=s==null?void 0:s.right)!=null?a:[]).filter(h=>!(i!=null&&i.includes(h))),...i]}}if(n==="left"){var g,f;return{left:[...((g=s==null?void 0:s.left)!=null?g:[]).filter(h=>!(i!=null&&i.includes(h))),...i],right:((f=s==null?void 0:s.right)!=null?f:[]).filter(h=>!(i!=null&&i.includes(h)))}}return{left:((r=s==null?void 0:s.left)!=null?r:[]).filter(h=>!(i!=null&&i.includes(h))),right:((o=s==null?void 0:s.right)!=null?o:[]).filter(h=>!(i!=null&&i.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var s,r,o;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((r=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?r:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:i,right:s}=t.getState().columnPinning,r=n.some(l=>i==null?void 0:i.includes(l)),o=n.some(l=>s==null?void 0:s.includes(l));return r?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();return s?(n=(i=t.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=w(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,s)=>{const r=[...i??[],...s??[]];return n.filter(o=>!r.includes(o.column.id))},F(t.options,"debugRows")),e.getLeftVisibleCells=w(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(r=>n.find(o=>o.column.id===r)).filter(Boolean).map(r=>({...r,position:"left"})),F(t.options,"debugRows")),e.getRightVisibleCells=w(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(r=>n.find(o=>o.column.id===r)).filter(Boolean).map(r=>({...r,position:"right"})),F(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?ft():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:ft())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var s,r;return!!((s=i.left)!=null&&s.length||(r=i.right)!=null&&r.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=w(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns")),e.getRightLeafColumns=w(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns")),e.getCenterLeafColumns=w(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const s=[...n??[],...i??[]];return t.filter(r=>!s.includes(r.id))},F(e.options,"debugColumns"))}},nt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ht=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Vi={getDefaultColumnDef:()=>nt,getInitialState:e=>({columnSizing:{},columnSizingInfo:ht(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Q("columnSizing",e),onColumnSizingInfoChange:Q("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,s;const r=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:nt.minSize,(i=r??e.columnDef.size)!=null?i:nt.size),(s=e.columnDef.maxSize)!=null?s:nt.maxSize)},e.getStart=w(n=>[n,Te(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((s,r)=>s+r.getSize(),0),F(t.options,"debugColumns")),e.getAfter=w(n=>[n,Te(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((s,r)=>s+r.getSize(),0),F(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...s}=n;return s})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=s=>{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var r;n+=(r=s.column.getSize())!=null?r:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),s=i==null?void 0:i.getCanResize();return r=>{if(!i||!s||(r.persist==null||r.persist(),pt(r)&&r.touches&&r.touches.length>1))return;const o=e.getSize(),l=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[i.id,i.getSize()]],a=pt(r)?Math.round(r.touches[0].clientX):r.clientX,g={},f=(v,_)=>{typeof _=="number"&&(t.setColumnSizingInfo(R=>{var $,x;const G=t.options.columnResizeDirection==="rtl"?-1:1,U=(_-(($=R==null?void 0:R.startOffset)!=null?$:0))*G,M=Math.max(U/((x=R==null?void 0:R.startSize)!=null?x:0),-.999999);return R.columnSizingStart.forEach(q=>{let[at,Qt]=q;g[at]=Math.round(Math.max(Qt+Qt*M,0)*100)/100}),{...R,deltaOffset:U,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(R=>({...R,...g})))},h=v=>f("move",v),c=v=>{f("end",v),t.setColumnSizingInfo(_=>({..._,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},d=n||typeof document<"u"?document:null,p={moveHandler:v=>h(v.clientX),upHandler:v=>{d==null||d.removeEventListener("mousemove",p.moveHandler),d==null||d.removeEventListener("mouseup",p.upHandler),c(v.clientX)}},m={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),h(v.touches[0].clientX),!1),upHandler:v=>{var _;d==null||d.removeEventListener("touchmove",m.moveHandler),d==null||d.removeEventListener("touchend",m.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),c((_=v.touches[0])==null?void 0:_.clientX)}},y=Di()?{passive:!1}:!1;pt(r)?(d==null||d.addEventListener("touchmove",m.moveHandler,y),d==null||d.addEventListener("touchend",m.upHandler,y)):(d==null||d.addEventListener("mousemove",p.moveHandler,y),d==null||d.addEventListener("mouseup",p.upHandler,y)),t.setColumnSizingInfo(v=>({...v,startOffset:a,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?ht():(n=e.initialState.columnSizingInfo)!=null?n:ht())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0}}};let it=null;function Di(){if(typeof it=="boolean")return it;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return it=e,it}function pt(e){return e.type==="touchstart"}const Ai={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Q("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const s=e.columns;return(n=s.length?s.some(r=>r.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=w(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),F(t.options,"debugRows")),e.getVisibleCells=w(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,s)=>[...n,...i,...s],F(t.options,"debugRows"))},createTable:e=>{const t=(n,i)=>w(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(r=>r.getIsVisible==null?void 0:r.getIsVisible()),F(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,r)=>({...s,[r.id]:n||!(r.getCanHide!=null&&r.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function Te(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Hi={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Li={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Q("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,s,r;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((r=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?r:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Z.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return lt(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:Z[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Gi={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Q("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var s,r;e.setExpanded(i?{}:(s=(r=e.initialState)==null?void 0:r.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(r=>{const o=r.split(".");i=Math.max(i,o.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var s;const r=i===!0?!0:!!(i!=null&&i[e.id]);let o={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{o[l]=!0}):o=i,n=(s=n)!=null?s:!r,!r&&n)return{...o,[e.id]:!0};if(r&&!n){const{[e.id]:l,...a}=o;return a}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i!=null&&i[e.id])},e.getCanExpand=()=>{var n,i,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Et=0,Vt=10,mt=()=>({pageIndex:Et,pageSize:Vt}),zi={getInitialState:e=>({...e,pagination:{...mt(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Q("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const s=r=>de(i,r);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=i=>{var s;e.setPagination(i?mt():(s=e.initialState.pagination)!=null?s:mt())},e.setPageIndex=i=>{e.setPagination(s=>{let r=de(i,s.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...s,pageIndex:r}})},e.resetPageIndex=i=>{var s,r;e.setPageIndex(i?Et:(s=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageIndex)!=null?s:Et)},e.resetPageSize=i=>{var s,r;e.setPageSize(i?Vt:(s=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageSize)!=null?s:Vt)},e.setPageSize=i=>{e.setPagination(s=>{const r=Math.max(1,de(i,s.pageSize)),o=s.pageSize*s.pageIndex,l=Math.floor(o/r);return{...s,pageIndex:l,pageSize:r}})},e.setPageCount=i=>e.setPagination(s=>{var r;let o=de(i,(r=e.options.pageCount)!=null?r:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...s,pageCount:o}}),e.getPageOptions=w(()=>[e.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((r,o)=>o)),s},F(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:i<s-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},St=()=>({top:[],bottom:[]}),Ti={getInitialState:e=>({rowPinning:St(),...e}),getDefaultOptions:e=>({onRowPinningChange:Q("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,s)=>{const r=i?e.getLeafRows().map(a=>{let{id:g}=a;return g}):[],o=s?e.getParentRows().map(a=>{let{id:g}=a;return g}):[],l=new Set([...o,e.id,...r]);t.setRowPinning(a=>{var g,f;if(n==="bottom"){var h,c;return{top:((h=a==null?void 0:a.top)!=null?h:[]).filter(m=>!(l!=null&&l.has(m))),bottom:[...((c=a==null?void 0:a.bottom)!=null?c:[]).filter(m=>!(l!=null&&l.has(m))),...Array.from(l)]}}if(n==="top"){var d,p;return{top:[...((d=a==null?void 0:a.top)!=null?d:[]).filter(m=>!(l!=null&&l.has(m))),...Array.from(l)],bottom:((p=a==null?void 0:a.bottom)!=null?p:[]).filter(m=>!(l!=null&&l.has(m)))}}return{top:((g=a==null?void 0:a.top)!=null?g:[]).filter(m=>!(l!=null&&l.has(m))),bottom:((f=a==null?void 0:a.bottom)!=null?f:[]).filter(m=>!(l!=null&&l.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:s}=t.options;return typeof i=="function"?i(e):(n=i??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:s}=t.getState().rowPinning,r=n.some(l=>i==null?void 0:i.includes(l)),o=n.some(l=>s==null?void 0:s.includes(l));return r?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();if(!s)return-1;const r=(n=t._getPinnedRows(s))==null?void 0:n.map(o=>{let{id:l}=o;return l});return(i=r==null?void 0:r.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?St():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:St())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var s,r;return!!((s=i.top)!=null&&s.length||(r=i.bottom)!=null&&r.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=w(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,n,i)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(o=>{const l=e.getRow(o,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(o=>t.find(l=>l.id===o))).filter(Boolean).map(o=>({...o,position:i}))},F(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=w(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const s=new Set([...n??[],...i??[]]);return t.filter(r=>!s.has(r.id))},F(e.options,"debugRows"))}},qi={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Q("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(r=>{r.getCanSelect()&&(i[r.id]=!0)}):s.forEach(r=>{delete i[r.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(r=>{Dt(s,r.id,i,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=w(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?vt(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable")),e.getFilteredSelectedRowModel=w(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?vt(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable")),e.getGroupedSelectedRowModel=w(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?vt(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(s=>!n[s.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const s=e.getIsSelected();t.setRowSelection(r=>{var o;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return r;const l={...r};return Dt(l,e.id,n,(o=i==null?void 0:i.selectChildren)!=null?o:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return qt(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return At(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return At(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var s;n&&e.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},Dt=(e,t,n,i,s)=>{var r;const o=s.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),o.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(r=o.subRows)!=null&&r.length&&o.getCanSelectSubRows()&&o.subRows.forEach(l=>Dt(e,l.id,n,i,s))};function vt(e,t){const n=e.getState().rowSelection,i=[],s={},r=function(o,l){return o.map(a=>{var g;const f=qt(a,n);if(f&&(i.push(a),s[a.id]=a),(g=a.subRows)!=null&&g.length&&(a={...a,subRows:r(a.subRows)}),f)return a}).filter(Boolean)};return{rows:r(t.rows),flatRows:i,rowsById:s}}function qt(e,t){var n;return(n=t[e.id])!=null?n:!1}function At(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let s=!0,r=!1;return e.subRows.forEach(o=>{if(!(r&&!s)&&(o.getCanSelect()&&(qt(o,t)?r=!0:s=!1),o.subRows&&o.subRows.length)){const l=At(o,t);l==="all"?r=!0:(l==="some"&&(r=!0),s=!1)}}),s?"all":r?"some":!1}const Ht=/([0-9]+)/gm,bi=(e,t,n)=>Vn(ce(e.getValue(n)).toLowerCase(),ce(t.getValue(n)).toLowerCase()),Qi=(e,t,n)=>Vn(ce(e.getValue(n)),ce(t.getValue(n))),Ui=(e,t,n)=>bt(ce(e.getValue(n)).toLowerCase(),ce(t.getValue(n)).toLowerCase()),ji=(e,t,n)=>bt(ce(e.getValue(n)),ce(t.getValue(n))),ki=(e,t,n)=>{const i=e.getValue(n),s=t.getValue(n);return i>s?1:i<s?-1:0},Bi=(e,t,n)=>bt(e.getValue(n),t.getValue(n));function bt(e,t){return e===t?0:e>t?1:-1}function ce(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Vn(e,t){const n=e.split(Ht).filter(Boolean),i=t.split(Ht).filter(Boolean);for(;n.length&&i.length;){const s=n.shift(),r=i.shift(),o=parseInt(s,10),l=parseInt(r,10),a=[o,l].sort();if(isNaN(a[0])){if(s>r)return 1;if(r>s)return-1;continue}if(isNaN(a[1]))return isNaN(o)?-1:1;if(o>l)return 1;if(l>o)return-1}return n.length-i.length}const Ge={alphanumeric:bi,alphanumericCaseSensitive:Qi,text:Ui,textCaseSensitive:ji,datetime:ki,basic:Bi},Ni={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Q("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of n){const r=s==null?void 0:s.getValue(e.id);if(Object.prototype.toString.call(r)==="[object Date]")return Ge.datetime;if(typeof r=="string"&&(i=!0,r.split(Ht).length>1))return Ge.alphanumeric}return i?Ge.text:Ge.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return lt(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:Ge[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const s=e.getNextSortingOrder(),r=typeof n<"u"&&n!==null;t.setSorting(o=>{const l=o==null?void 0:o.find(d=>d.id===e.id),a=o==null?void 0:o.findIndex(d=>d.id===e.id);let g=[],f,h=r?n:s==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&i?l?f="toggle":f="add":o!=null&&o.length&&a!==o.length-1?f="replace":l?f="toggle":f="replace",f==="toggle"&&(r||s||(f="remove")),f==="add"){var c;g=[...o,{id:e.id,desc:h}],g.splice(0,g.length-((c=t.options.maxMultiSortColCount)!=null?c:Number.MAX_SAFE_INTEGER))}else f==="toggle"?g=o.map(d=>d.id===e.id?{...d,desc:h}:d):f==="remove"?g=o.filter(d=>d.id!==e.id):g=[{id:e.id,desc:h}];return g})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,s;const r=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==r&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:o==="desc"?"asc":"desc":r},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Ki=[pi,Ai,Oi,Ei,Si,vi,Hi,Li,Ni,Ii,Gi,zi,Ti,qi,Vi];function Xi(e){var t,n;const i=[...Ki,...(t=e._features)!=null?t:[]];let s={_features:i};const r=s._features.reduce((c,d)=>Object.assign(c,d.getDefaultOptions==null?void 0:d.getDefaultOptions(s)),{}),o=c=>s.options.mergeOptions?s.options.mergeOptions(r,c):{...r,...c};let a={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(c=>{var d;a=(d=c.getInitialState==null?void 0:c.getInitialState(a))!=null?d:a});const g=[];let f=!1;const h={_features:i,options:{...r,...e},initialState:a,_queue:c=>{g.push(c),f||(f=!0,Promise.resolve().then(()=>{for(;g.length;)g.shift()();f=!1}).catch(d=>setTimeout(()=>{throw d})))},reset:()=>{s.setState(s.initialState)},setOptions:c=>{const d=de(c,s.options);s.options=o(d)},getState:()=>s.options.state,setState:c=>{s.options.onStateChange==null||s.options.onStateChange(c)},_getRowId:(c,d,p)=>{var m;return(m=s.options.getRowId==null?void 0:s.options.getRowId(c,d,p))!=null?m:`${p?[p.id,d].join("."):d}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(c,d)=>{let p=(d?s.getPrePaginationRowModel():s.getRowModel()).rowsById[c];if(!p&&(p=s.getCoreRowModel().rowsById[c],!p))throw new Error;return p},_getDefaultColumnDef:w(()=>[s.options.defaultColumn],c=>{var d;return c=(d=c)!=null?d:{},{header:p=>{const m=p.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:p=>{var m,y;return(m=(y=p.renderValue())==null||y.toString==null?void 0:y.toString())!=null?m:null},...s._features.reduce((p,m)=>Object.assign(p,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...c}},F(e,"debugColumns")),_getColumnDefs:()=>s.options.columns,getAllColumns:w(()=>[s._getColumnDefs()],c=>{const d=function(p,m,y){return y===void 0&&(y=0),p.map(v=>{const _=hi(s,v,y,m),R=v;return _.columns=R.columns?d(R.columns,_,y+1):[],_})};return d(c)},F(e,"debugColumns")),getAllFlatColumns:w(()=>[s.getAllColumns()],c=>c.flatMap(d=>d.getFlatColumns()),F(e,"debugColumns")),_getAllFlatColumnsById:w(()=>[s.getAllFlatColumns()],c=>c.reduce((d,p)=>(d[p.id]=p,d),{}),F(e,"debugColumns")),getAllLeafColumns:w(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(c,d)=>{let p=c.flatMap(m=>m.getLeafColumns());return d(p)},F(e,"debugColumns")),getColumn:c=>s._getAllFlatColumnsById()[c]};Object.assign(s,h);for(let c=0;c<s._features.length;c++){const d=s._features[c];d==null||d.createTable==null||d.createTable(s)}return s}function os(){return e=>w(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(s,r,o){r===void 0&&(r=0);const l=[];for(let g=0;g<s.length;g++){const f=mi(e,e._getRowId(s[g],g,o),s[g],g,r,void 0,o==null?void 0:o.id);if(n.flatRows.push(f),n.rowsById[f.id]=f,l.push(f),e.options.getSubRows){var a;f.originalSubRows=e.options.getSubRows(s[g],g),(a=f.originalSubRows)!=null&&a.length&&(f.subRows=i(f.originalSubRows,r+1,f))}}return l};return n.rows=i(t),n},F(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
|
13
|
+
color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,n==null?void 0:n.key)}return s}}function F(e,t,n,i){return{debug:()=>{var s;return(s=e==null?void 0:e.debugAll)!=null?s:e[t]},key:!1,onChange:i}}function Si(e,t,n,i){const s=()=>{var o;return(o=r.getValue())!=null?o:e.options.renderFallbackValue},r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:s,getContext:w(()=>[e,n,t,r],(o,l,a,g)=>({table:o,column:l,row:a,cell:g,getValue:g.getValue,renderValue:g.renderValue}),F(e.options,"debugCells"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(r,n,t,e)},{}),r}function Ci(e,t,n,i){var s,r;const l={...e._getDefaultColumnDef(),...t},a=l.accessorKey;let g=(s=(r=l.id)!=null?r:a?a.replace(".","_"):void 0)!=null?s:typeof l.header=="string"?l.header:void 0,f;if(l.accessorFn?f=l.accessorFn:a&&(a.includes(".")?f=d=>{let c=d;for(const m of a.split(".")){var p;c=(p=c)==null?void 0:p[m]}return c}:f=d=>d[l.accessorKey]),!g)throw new Error;let h={id:`${String(g)}`,accessorFn:f,parent:i,depth:n,columnDef:l,columns:[],getFlatColumns:w(()=>[!0],()=>{var d;return[h,...(d=h.columns)==null?void 0:d.flatMap(c=>c.getFlatColumns())]},F(e.options,"debugColumns")),getLeafColumns:w(()=>[e._getOrderColumnsFn()],d=>{var c;if((c=h.columns)!=null&&c.length){let p=h.columns.flatMap(m=>m.getLeafColumns());return d(p)}return[h]},F(e.options,"debugColumns"))};for(const d of e._features)d.createColumn==null||d.createColumn(h,e);return h}const D="debugHeaders";function en(e,t,n){var i;let r={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const o=[],l=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(l),o.push(a)};return l(r),o},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(r,e)}),r}const Ri={createTable:e=>{e.getHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>{var r,o;const l=(r=i==null?void 0:i.map(h=>n.find(d=>d.id===h)).filter(Boolean))!=null?r:[],a=(o=s==null?void 0:s.map(h=>n.find(d=>d.id===h)).filter(Boolean))!=null?o:[],g=n.filter(h=>!(i!=null&&i.includes(h.id))&&!(s!=null&&s.includes(h.id)));return tt(t,[...l,...g,...a],e)},F(e.options,D)),e.getCenterHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>(n=n.filter(r=>!(i!=null&&i.includes(r.id))&&!(s!=null&&s.includes(r.id))),tt(t,n,e,"center")),F(e.options,D)),e.getLeftHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var s;const r=(s=i==null?void 0:i.map(o=>n.find(l=>l.id===o)).filter(Boolean))!=null?s:[];return tt(t,r,e,"left")},F(e.options,D)),e.getRightHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var s;const r=(s=i==null?void 0:i.map(o=>n.find(l=>l.id===o)).filter(Boolean))!=null?s:[];return tt(t,r,e,"right")},F(e.options,D)),e.getFooterGroups=w(()=>[e.getHeaderGroups()],t=>[...t].reverse(),F(e.options,D)),e.getLeftFooterGroups=w(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),F(e.options,D)),e.getCenterFooterGroups=w(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),F(e.options,D)),e.getRightFooterGroups=w(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),F(e.options,D)),e.getFlatHeaders=w(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,D)),e.getLeftFlatHeaders=w(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,D)),e.getCenterFlatHeaders=w(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,D)),e.getRightFlatHeaders=w(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,D)),e.getCenterLeafHeaders=w(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,D)),e.getLeftLeafHeaders=w(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,D)),e.getRightLeafHeaders=w(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,D)),e.getLeafHeaders=w(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var s,r,o,l,a,g;return[...(s=(r=t[0])==null?void 0:r.headers)!=null?s:[],...(o=(l=n[0])==null?void 0:l.headers)!=null?o:[],...(a=(g=i[0])==null?void 0:g.headers)!=null?a:[]].map(f=>f.getLeafHeaders()).flat()},F(e.options,D))}};function tt(e,t,n,i){var s,r;let o=0;const l=function(d,c){c===void 0&&(c=1),o=Math.max(o,c),d.filter(p=>p.getIsVisible()).forEach(p=>{var m;(m=p.columns)!=null&&m.length&&l(p.columns,c+1)},0)};l(e);let a=[];const g=(d,c)=>{const p={depth:c,id:[i,`${c}`].filter(Boolean).join("_"),headers:[]},m=[];d.forEach(y=>{const S=[...m].reverse()[0],P=y.column.depth===p.depth;let R,$=!1;if(P&&y.column.parent?R=y.column.parent:(R=y.column,$=!0),S&&(S==null?void 0:S.column)===R)S.subHeaders.push(y);else{const I=en(n,R,{id:[i,c,R.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:$,placeholderId:$?`${m.filter(G=>G.column===R).length}`:void 0,depth:c,index:m.length});I.subHeaders.push(y),m.push(I)}p.headers.push(y),y.headerGroup=p}),a.push(p),c>0&&g(m,c-1)},f=t.map((d,c)=>en(n,d,{depth:o,index:c}));g(f,o-1),a.reverse();const h=d=>d.filter(p=>p.column.getIsVisible()).map(p=>{let m=0,y=0,S=[0];p.subHeaders&&p.subHeaders.length?(S=[],h(p.subHeaders).forEach(R=>{let{colSpan:$,rowSpan:I}=R;m+=$,S.push(I)})):m=1;const P=Math.min(...S);return y=y+P,p.colSpan=m,p.rowSpan=y,{colSpan:m,rowSpan:y}});return h((s=(r=a[0])==null?void 0:r.headers)!=null?s:[]),a}const yi=(e,t,n,i,s,r,o)=>{let l={id:t,index:i,original:n,depth:s,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(l._valuesCache.hasOwnProperty(a))return l._valuesCache[a];const g=e.getColumn(a);if(g!=null&&g.accessorFn)return l._valuesCache[a]=g.accessorFn(l.original,i),l._valuesCache[a]},getUniqueValues:a=>{if(l._uniqueValuesCache.hasOwnProperty(a))return l._uniqueValuesCache[a];const g=e.getColumn(a);if(g!=null&&g.accessorFn)return g.columnDef.getUniqueValues?(l._uniqueValuesCache[a]=g.columnDef.getUniqueValues(l.original,i),l._uniqueValuesCache[a]):(l._uniqueValuesCache[a]=[l.getValue(a)],l._uniqueValuesCache[a])},renderValue:a=>{var g;return(g=l.getValue(a))!=null?g:e.options.renderFallbackValue},subRows:r??[],getLeafRows:()=>vi(l.subRows,a=>a.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let a=[],g=l;for(;;){const f=g.getParentRow();if(!f)break;a.push(f),g=f}return a.reverse()},getAllCells:w(()=>[e.getAllLeafColumns()],a=>a.map(g=>Si(e,l,g,g.id)),F(e.options,"debugRows")),_getAllCellsByColumnId:w(()=>[l.getAllCells()],a=>a.reduce((g,f)=>(g[f.column.id]=f,g),{}),F(e.options,"debugRows"))};for(let a=0;a<e._features.length;a++){const g=e._features[a];g==null||g.createRow==null||g.createRow(l,e)}return l},wi={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},In=(e,t,n)=>{var i;const s=n.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};In.autoRemove=e=>N(e);const On=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};On.autoRemove=e=>N(e);const En=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(n==null?void 0:n.toLowerCase())};En.autoRemove=e=>N(e);const Vn=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};Vn.autoRemove=e=>N(e)||!(e!=null&&e.length);const Dn=(e,t,n)=>!n.some(i=>{var s;return!((s=e.getValue(t))!=null&&s.includes(i))});Dn.autoRemove=e=>N(e)||!(e!=null&&e.length);const An=(e,t,n)=>n.some(i=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(i)});An.autoRemove=e=>N(e)||!(e!=null&&e.length);const Hn=(e,t,n)=>e.getValue(t)===n;Hn.autoRemove=e=>N(e);const Ln=(e,t,n)=>e.getValue(t)==n;Ln.autoRemove=e=>N(e);const Ut=(e,t,n)=>{let[i,s]=n;const r=e.getValue(t);return r>=i&&r<=s};Ut.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,r=t===null||Number.isNaN(i)?-1/0:i,o=n===null||Number.isNaN(s)?1/0:s;if(r>o){const l=r;r=o,o=l}return[r,o]};Ut.autoRemove=e=>N(e)||N(e[0])&&N(e[1]);const Z={includesString:In,includesStringSensitive:On,equalsString:En,arrIncludes:Vn,arrIncludesAll:Dn,arrIncludesSome:An,equals:Hn,weakEquals:Ln,inNumberRange:Ut};function N(e){return e==null||e===""}const Fi={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Q("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);return typeof i=="string"?Z.includesString:typeof i=="number"?Z.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?Z.equals:Array.isArray(i)?Z.arrIncludes:Z.weakEquals},e.getFilterFn=()=>{var n,i;return at(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:Z[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const s=e.getFilterFn(),r=i==null?void 0:i.find(f=>f.id===e.id),o=ce(n,r?r.value:void 0);if(tn(s,o,e)){var l;return(l=i==null?void 0:i.filter(f=>f.id!==e.id))!=null?l:[]}const a={id:e.id,value:o};if(r){var g;return(g=i==null?void 0:i.map(f=>f.id===e.id?a:f))!=null?g:[]}return i!=null&&i.length?[...i,a]:[a]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=s=>{var r;return(r=ce(t,s))==null?void 0:r.filter(o=>{const l=n.find(a=>a.id===o.id);if(l){const a=l.getFilterFn();if(tn(a,o.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function tn(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Pi=(e,t,n)=>n.reduce((i,s)=>{const r=s.getValue(e);return i+(typeof r=="number"?r:0)},0),_i=(e,t,n)=>{let i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i>r||i===void 0&&r>=r)&&(i=r)}),i},Mi=(e,t,n)=>{let i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i<r||i===void 0&&r>=r)&&(i=r)}),i},$i=(e,t,n)=>{let i,s;return n.forEach(r=>{const o=r.getValue(e);o!=null&&(i===void 0?o>=o&&(i=s=o):(i>o&&(i=o),s<o&&(s=o)))}),[i,s]},xi=(e,t)=>{let n=0,i=0;if(t.forEach(s=>{let r=s.getValue(e);r!=null&&(r=+r)>=r&&(++n,i+=r)}),n)return i/n},Ii=(e,t)=>{if(!t.length)return;const n=t.map(r=>r.getValue(e));if(!mi(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),s=n.sort((r,o)=>r-o);return n.length%2!==0?s[i]:(s[i-1]+s[i])/2},Oi=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Ei=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Vi=(e,t)=>t.length,ft={sum:Pi,min:_i,max:Mi,extent:$i,mean:xi,median:Ii,unique:Oi,uniqueCount:Ei,count:Vi},Di={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Q("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);if(typeof i=="number")return ft.sum;if(Object.prototype.toString.call(i)==="[object Date]")return ft.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return at(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:ft[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function Ai(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(r=>!t.includes(r.id));return n==="remove"?i:[...t.map(r=>e.find(o=>o.id===r)).filter(Boolean),...i]}const Hi={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Q("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=w(n=>[be(t,n)],n=>n.findIndex(i=>i.id===e.id),F(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var i;return((i=be(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const s=be(t,n);return((i=s[s.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=w(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>s=>{let r=[];if(!(t!=null&&t.length))r=s;else{const o=[...t],l=[...s];for(;l.length&&o.length;){const a=o.shift(),g=l.findIndex(f=>f.id===a);g>-1&&r.push(l.splice(g,1)[0])}r=[...r,...l]}return Ai(r,n,i)},F(e.options,"debugTable"))}},ht=()=>({left:[],right:[]}),Li={getInitialState:e=>({columnPinning:ht(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Q("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var r,o;if(n==="right"){var l,a;return{left:((l=s==null?void 0:s.left)!=null?l:[]).filter(h=>!(i!=null&&i.includes(h))),right:[...((a=s==null?void 0:s.right)!=null?a:[]).filter(h=>!(i!=null&&i.includes(h))),...i]}}if(n==="left"){var g,f;return{left:[...((g=s==null?void 0:s.left)!=null?g:[]).filter(h=>!(i!=null&&i.includes(h))),...i],right:((f=s==null?void 0:s.right)!=null?f:[]).filter(h=>!(i!=null&&i.includes(h)))}}return{left:((r=s==null?void 0:s.left)!=null?r:[]).filter(h=>!(i!=null&&i.includes(h))),right:((o=s==null?void 0:s.right)!=null?o:[]).filter(h=>!(i!=null&&i.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var s,r,o;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((r=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?r:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:i,right:s}=t.getState().columnPinning,r=n.some(l=>i==null?void 0:i.includes(l)),o=n.some(l=>s==null?void 0:s.includes(l));return r?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();return s?(n=(i=t.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=w(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,s)=>{const r=[...i??[],...s??[]];return n.filter(o=>!r.includes(o.column.id))},F(t.options,"debugRows")),e.getLeftVisibleCells=w(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(r=>n.find(o=>o.column.id===r)).filter(Boolean).map(r=>({...r,position:"left"})),F(t.options,"debugRows")),e.getRightVisibleCells=w(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(r=>n.find(o=>o.column.id===r)).filter(Boolean).map(r=>({...r,position:"right"})),F(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?ht():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:ht())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var s,r;return!!((s=i.left)!=null&&s.length||(r=i.right)!=null&&r.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=w(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns")),e.getRightLeafColumns=w(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns")),e.getCenterLeafColumns=w(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const s=[...n??[],...i??[]];return t.filter(r=>!s.includes(r.id))},F(e.options,"debugColumns"))}},nt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},pt=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Gi={getDefaultColumnDef:()=>nt,getInitialState:e=>({columnSizing:{},columnSizingInfo:pt(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Q("columnSizing",e),onColumnSizingInfoChange:Q("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,s;const r=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:nt.minSize,(i=r??e.columnDef.size)!=null?i:nt.size),(s=e.columnDef.maxSize)!=null?s:nt.maxSize)},e.getStart=w(n=>[n,be(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((s,r)=>s+r.getSize(),0),F(t.options,"debugColumns")),e.getAfter=w(n=>[n,be(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((s,r)=>s+r.getSize(),0),F(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...s}=n;return s})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=s=>{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var r;n+=(r=s.column.getSize())!=null?r:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),s=i==null?void 0:i.getCanResize();return r=>{if(!i||!s||(r.persist==null||r.persist(),mt(r)&&r.touches&&r.touches.length>1))return;const o=e.getSize(),l=e?e.getLeafHeaders().map(S=>[S.column.id,S.column.getSize()]):[[i.id,i.getSize()]],a=mt(r)?Math.round(r.touches[0].clientX):r.clientX,g={},f=(S,P)=>{typeof P=="number"&&(t.setColumnSizingInfo(R=>{var $,I;const G=t.options.columnResizeDirection==="rtl"?-1:1,U=(P-(($=R==null?void 0:R.startOffset)!=null?$:0))*G,M=Math.max(U/((I=R==null?void 0:R.startSize)!=null?I:0),-.999999);return R.columnSizingStart.forEach(T=>{let[ct,Bt]=T;g[ct]=Math.round(Math.max(Bt+Bt*M,0)*100)/100}),{...R,deltaOffset:U,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||S==="end")&&t.setColumnSizing(R=>({...R,...g})))},h=S=>f("move",S),d=S=>{f("end",S),t.setColumnSizingInfo(P=>({...P,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},c=n||typeof document<"u"?document:null,p={moveHandler:S=>h(S.clientX),upHandler:S=>{c==null||c.removeEventListener("mousemove",p.moveHandler),c==null||c.removeEventListener("mouseup",p.upHandler),d(S.clientX)}},m={moveHandler:S=>(S.cancelable&&(S.preventDefault(),S.stopPropagation()),h(S.touches[0].clientX),!1),upHandler:S=>{var P;c==null||c.removeEventListener("touchmove",m.moveHandler),c==null||c.removeEventListener("touchend",m.upHandler),S.cancelable&&(S.preventDefault(),S.stopPropagation()),d((P=S.touches[0])==null?void 0:P.clientX)}},y=zi()?{passive:!1}:!1;mt(r)?(c==null||c.addEventListener("touchmove",m.moveHandler,y),c==null||c.addEventListener("touchend",m.upHandler,y)):(c==null||c.addEventListener("mousemove",p.moveHandler,y),c==null||c.addEventListener("mouseup",p.upHandler,y)),t.setColumnSizingInfo(S=>({...S,startOffset:a,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?pt():(n=e.initialState.columnSizingInfo)!=null?n:pt())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0}}};let it=null;function zi(){if(typeof it=="boolean")return it;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return it=e,it}function mt(e){return e.type==="touchstart"}const bi={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Q("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const s=e.columns;return(n=s.length?s.some(r=>r.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=w(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),F(t.options,"debugRows")),e.getVisibleCells=w(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,s)=>[...n,...i,...s],F(t.options,"debugRows"))},createTable:e=>{const t=(n,i)=>w(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(r=>r.getIsVisible==null?void 0:r.getIsVisible()),F(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,r)=>({...s,[r.id]:n||!(r.getCanHide!=null&&r.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function be(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ti={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},qi={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Q("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,s,r;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((r=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?r:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Z.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return at(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:Z[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Qi={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Q("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var s,r;e.setExpanded(i?{}:(s=(r=e.initialState)==null?void 0:r.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(r=>{const o=r.split(".");i=Math.max(i,o.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var s;const r=i===!0?!0:!!(i!=null&&i[e.id]);let o={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{o[l]=!0}):o=i,n=(s=n)!=null?s:!r,!r&&n)return{...o,[e.id]:!0};if(r&&!n){const{[e.id]:l,...a}=o;return a}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i!=null&&i[e.id])},e.getCanExpand=()=>{var n,i,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},At=0,Ht=10,vt=()=>({pageIndex:At,pageSize:Ht}),Ui={getInitialState:e=>({...e,pagination:{...vt(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Q("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const s=r=>ce(i,r);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=i=>{var s;e.setPagination(i?vt():(s=e.initialState.pagination)!=null?s:vt())},e.setPageIndex=i=>{e.setPagination(s=>{let r=ce(i,s.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...s,pageIndex:r}})},e.resetPageIndex=i=>{var s,r;e.setPageIndex(i?At:(s=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageIndex)!=null?s:At)},e.resetPageSize=i=>{var s,r;e.setPageSize(i?Ht:(s=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageSize)!=null?s:Ht)},e.setPageSize=i=>{e.setPagination(s=>{const r=Math.max(1,ce(i,s.pageSize)),o=s.pageSize*s.pageIndex,l=Math.floor(o/r);return{...s,pageIndex:l,pageSize:r}})},e.setPageCount=i=>e.setPagination(s=>{var r;let o=ce(i,(r=e.options.pageCount)!=null?r:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...s,pageCount:o}}),e.getPageOptions=w(()=>[e.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((r,o)=>o)),s},F(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:i<s-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},St=()=>({top:[],bottom:[]}),ki={getInitialState:e=>({rowPinning:St(),...e}),getDefaultOptions:e=>({onRowPinningChange:Q("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,s)=>{const r=i?e.getLeafRows().map(a=>{let{id:g}=a;return g}):[],o=s?e.getParentRows().map(a=>{let{id:g}=a;return g}):[],l=new Set([...o,e.id,...r]);t.setRowPinning(a=>{var g,f;if(n==="bottom"){var h,d;return{top:((h=a==null?void 0:a.top)!=null?h:[]).filter(m=>!(l!=null&&l.has(m))),bottom:[...((d=a==null?void 0:a.bottom)!=null?d:[]).filter(m=>!(l!=null&&l.has(m))),...Array.from(l)]}}if(n==="top"){var c,p;return{top:[...((c=a==null?void 0:a.top)!=null?c:[]).filter(m=>!(l!=null&&l.has(m))),...Array.from(l)],bottom:((p=a==null?void 0:a.bottom)!=null?p:[]).filter(m=>!(l!=null&&l.has(m)))}}return{top:((g=a==null?void 0:a.top)!=null?g:[]).filter(m=>!(l!=null&&l.has(m))),bottom:((f=a==null?void 0:a.bottom)!=null?f:[]).filter(m=>!(l!=null&&l.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:s}=t.options;return typeof i=="function"?i(e):(n=i??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:s}=t.getState().rowPinning,r=n.some(l=>i==null?void 0:i.includes(l)),o=n.some(l=>s==null?void 0:s.includes(l));return r?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();if(!s)return-1;const r=(n=t._getPinnedRows(s))==null?void 0:n.map(o=>{let{id:l}=o;return l});return(i=r==null?void 0:r.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?St():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:St())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var s,r;return!!((s=i.top)!=null&&s.length||(r=i.bottom)!=null&&r.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=w(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,n,i)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(o=>{const l=e.getRow(o,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(o=>t.find(l=>l.id===o))).filter(Boolean).map(o=>({...o,position:i}))},F(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=w(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const s=new Set([...n??[],...i??[]]);return t.filter(r=>!s.has(r.id))},F(e.options,"debugRows"))}},ji={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Q("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(r=>{r.getCanSelect()&&(i[r.id]=!0)}):s.forEach(r=>{delete i[r.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(r=>{Lt(s,r.id,i,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=w(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Ct(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable")),e.getFilteredSelectedRowModel=w(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Ct(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable")),e.getGroupedSelectedRowModel=w(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Ct(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(s=>!n[s.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const s=e.getIsSelected();t.setRowSelection(r=>{var o;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return r;const l={...r};return Lt(l,e.id,n,(o=i==null?void 0:i.selectChildren)!=null?o:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return kt(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Gt(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Gt(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var s;n&&e.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},Lt=(e,t,n,i,s)=>{var r;const o=s.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),o.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(r=o.subRows)!=null&&r.length&&o.getCanSelectSubRows()&&o.subRows.forEach(l=>Lt(e,l.id,n,i,s))};function Ct(e,t){const n=e.getState().rowSelection,i=[],s={},r=function(o,l){return o.map(a=>{var g;const f=kt(a,n);if(f&&(i.push(a),s[a.id]=a),(g=a.subRows)!=null&&g.length&&(a={...a,subRows:r(a.subRows)}),f)return a}).filter(Boolean)};return{rows:r(t.rows),flatRows:i,rowsById:s}}function kt(e,t){var n;return(n=t[e.id])!=null?n:!1}function Gt(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let s=!0,r=!1;return e.subRows.forEach(o=>{if(!(r&&!s)&&(o.getCanSelect()&&(kt(o,t)?r=!0:s=!1),o.subRows&&o.subRows.length)){const l=Gt(o,t);l==="all"?r=!0:(l==="some"&&(r=!0),s=!1)}}),s?"all":r?"some":!1}const zt=/([0-9]+)/gm,Bi=(e,t,n)=>Gn(de(e.getValue(n)).toLowerCase(),de(t.getValue(n)).toLowerCase()),Ni=(e,t,n)=>Gn(de(e.getValue(n)),de(t.getValue(n))),Ki=(e,t,n)=>jt(de(e.getValue(n)).toLowerCase(),de(t.getValue(n)).toLowerCase()),Xi=(e,t,n)=>jt(de(e.getValue(n)),de(t.getValue(n))),Wi=(e,t,n)=>{const i=e.getValue(n),s=t.getValue(n);return i>s?1:i<s?-1:0},Ji=(e,t,n)=>jt(e.getValue(n),t.getValue(n));function jt(e,t){return e===t?0:e>t?1:-1}function de(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Gn(e,t){const n=e.split(zt).filter(Boolean),i=t.split(zt).filter(Boolean);for(;n.length&&i.length;){const s=n.shift(),r=i.shift(),o=parseInt(s,10),l=parseInt(r,10),a=[o,l].sort();if(isNaN(a[0])){if(s>r)return 1;if(r>s)return-1;continue}if(isNaN(a[1]))return isNaN(o)?-1:1;if(o>l)return 1;if(l>o)return-1}return n.length-i.length}const Ge={alphanumeric:Bi,alphanumericCaseSensitive:Ni,text:Ki,textCaseSensitive:Xi,datetime:Wi,basic:Ji},Yi={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Q("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of n){const r=s==null?void 0:s.getValue(e.id);if(Object.prototype.toString.call(r)==="[object Date]")return Ge.datetime;if(typeof r=="string"&&(i=!0,r.split(zt).length>1))return Ge.alphanumeric}return i?Ge.text:Ge.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return at(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:Ge[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const s=e.getNextSortingOrder(),r=typeof n<"u"&&n!==null;t.setSorting(o=>{const l=o==null?void 0:o.find(c=>c.id===e.id),a=o==null?void 0:o.findIndex(c=>c.id===e.id);let g=[],f,h=r?n:s==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&i?l?f="toggle":f="add":o!=null&&o.length&&a!==o.length-1?f="replace":l?f="toggle":f="replace",f==="toggle"&&(r||s||(f="remove")),f==="add"){var d;g=[...o,{id:e.id,desc:h}],g.splice(0,g.length-((d=t.options.maxMultiSortColCount)!=null?d:Number.MAX_SAFE_INTEGER))}else f==="toggle"?g=o.map(c=>c.id===e.id?{...c,desc:h}:c):f==="remove"?g=o.filter(c=>c.id!==e.id):g=[{id:e.id,desc:h}];return g})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,s;const r=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==r&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:o==="desc"?"asc":"desc":r},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Zi=[Ri,bi,Hi,Li,wi,Fi,Ti,qi,Yi,Di,Qi,Ui,ki,ji,Gi];function es(e){var t,n;const i=[...Zi,...(t=e._features)!=null?t:[]];let s={_features:i};const r=s._features.reduce((d,c)=>Object.assign(d,c.getDefaultOptions==null?void 0:c.getDefaultOptions(s)),{}),o=d=>s.options.mergeOptions?s.options.mergeOptions(r,d):{...r,...d};let a={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(d=>{var c;a=(c=d.getInitialState==null?void 0:d.getInitialState(a))!=null?c:a});const g=[];let f=!1;const h={_features:i,options:{...r,...e},initialState:a,_queue:d=>{g.push(d),f||(f=!0,Promise.resolve().then(()=>{for(;g.length;)g.shift()();f=!1}).catch(c=>setTimeout(()=>{throw c})))},reset:()=>{s.setState(s.initialState)},setOptions:d=>{const c=ce(d,s.options);s.options=o(c)},getState:()=>s.options.state,setState:d=>{s.options.onStateChange==null||s.options.onStateChange(d)},_getRowId:(d,c,p)=>{var m;return(m=s.options.getRowId==null?void 0:s.options.getRowId(d,c,p))!=null?m:`${p?[p.id,c].join("."):c}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(d,c)=>{let p=(c?s.getPrePaginationRowModel():s.getRowModel()).rowsById[d];if(!p&&(p=s.getCoreRowModel().rowsById[d],!p))throw new Error;return p},_getDefaultColumnDef:w(()=>[s.options.defaultColumn],d=>{var c;return d=(c=d)!=null?c:{},{header:p=>{const m=p.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:p=>{var m,y;return(m=(y=p.renderValue())==null||y.toString==null?void 0:y.toString())!=null?m:null},...s._features.reduce((p,m)=>Object.assign(p,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...d}},F(e,"debugColumns")),_getColumnDefs:()=>s.options.columns,getAllColumns:w(()=>[s._getColumnDefs()],d=>{const c=function(p,m,y){return y===void 0&&(y=0),p.map(S=>{const P=Ci(s,S,y,m),R=S;return P.columns=R.columns?c(R.columns,P,y+1):[],P})};return c(d)},F(e,"debugColumns")),getAllFlatColumns:w(()=>[s.getAllColumns()],d=>d.flatMap(c=>c.getFlatColumns()),F(e,"debugColumns")),_getAllFlatColumnsById:w(()=>[s.getAllFlatColumns()],d=>d.reduce((c,p)=>(c[p.id]=p,c),{}),F(e,"debugColumns")),getAllLeafColumns:w(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(d,c)=>{let p=d.flatMap(m=>m.getLeafColumns());return c(p)},F(e,"debugColumns")),getColumn:d=>s._getAllFlatColumnsById()[d]};Object.assign(s,h);for(let d=0;d<s._features.length;d++){const c=s._features[d];c==null||c.createTable==null||c.createTable(s)}return s}function hs(){return e=>w(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(s,r,o){r===void 0&&(r=0);const l=[];for(let g=0;g<s.length;g++){const f=yi(e,e._getRowId(s[g],g,o),s[g],g,r,void 0,o==null?void 0:o.id);if(n.flatRows.push(f),n.rowsById[f.id]=f,l.push(f),e.options.getSubRows){var a;f.originalSubRows=e.options.getSubRows(s[g],g),(a=f.originalSubRows)!=null&&a.length&&(f.subRows=i(f.originalSubRows,r+1,f))}}return l};return n.rows=i(t),n},F(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
|
14
14
|
* react-table
|
15
15
|
*
|
16
16
|
* Copyright (c) TanStack
|
@@ -19,4 +19,4 @@ var dt=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var u=(e,t,n)=>(dt(e
|
|
19
19
|
* LICENSE.md file in the root directory of this source tree.
|
20
20
|
*
|
21
21
|
* @license MIT
|
22
|
-
*/function
|
22
|
+
*/function ps(e,t){return e?ts(e)?O.createElement(e,t):e:null}function ts(e){return ns(e)||typeof e=="function"||is(e)}function ns(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function is(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function ms(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=O.useState(()=>({current:es(t)})),[i,s]=O.useState(()=>n.current.initialState);return n.current.setOptions(r=>({...r,...e,state:{...i,...e.state},onStateChange:o=>{s(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}export{os as Q,ls as a,gs as b,lt as c,Xn as d,us as e,ps as f,hs as g,fs as h,cs as i,ds as j,as as q,ms as u};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as c,j as e}from"./@radix-BXWm7HOa.js";import{ay as m,az as g,at as d,aA as p}from"./index-DhIZtpxB.js";const h=c.forwardRef((r,o)=>{const{triggerChildren:a,children:i,onSelect:t,onOpenChange:l,icon:x,...s}=r;return e.jsxs(m,{onOpenChange:l,children:[e.jsx(g,{asChild:!0,children:e.jsx(d,{...s,className:"hover:cursor-pointer",icon:r.icon,ref:o,onSelect:n=>{n.preventDefault(),t&&t()},children:a})}),e.jsx(p,{children:i})]})});h.displayName="AlertDialogItem";export{h as A};
|
zenml/zen_server/dashboard/assets/{AwarenessChannel-CFg5iX4Z.js → AwarenessChannel-CLXo5rKM.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
import{r as l,j as e}from"./@radix-CFOkMR_E.js";import{t as v}from"./zod-BhoGpZ63.js";import{I as w,aG as g,h as j,s as L,aq as b,ar as M,as as V,at as S,au as Z,aK as H}from"./index-BczVOqUf.js";import{u as y,C as N}from"./index.esm-Corw4lXQ.js";import{d as E,p as F,A as R}from"./SuccessStep-DZC60t0x.js";import{S as k,a as P}from"./file-text-CqD_iu6l.js";import{S as B}from"./play-circle-CNtZKDnW.js";function e1({email:s,fullName:a,submitHandler:i}){const c=l.useId(),r=l.useId(),o=l.useId(),{register:m,handleSubmit:d,control:C,watch:n,formState:{isValid:x}}=y({resolver:v(E),defaultValues:{fullName:a||"",getUpdates:!0,email:s||""}});return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Add your account details"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Please, fill in your details to get started with ZenML."})]}),e.jsxs("form",{onSubmit:d(i),className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:c,className:"text-text-sm",children:"Full Name (optional)"}),e.jsx(w,{...m("fullName"),id:c,className:"w-full"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{htmlFor:r,className:"text-text-sm",children:["Email ",!n("getUpdates")&&e.jsx(e.Fragment,{children:"(optional)"})]}),e.jsx(w,{placeholder:"example@company.inc",...m("email"),type:"email",id:r,className:"w-full"})]})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(N,{control:C,name:"getUpdates",render:({field:{onChange:t,value:p}})=>e.jsx(g,{checked:p,onCheckedChange:h=>t(!!h),id:o})}),e.jsx("label",{htmlFor:o,className:"text-text-sm",children:"I want to receive news and recommendations about how to use ZenML"})]}),e.jsx(j,{disabled:!x,className:"w-full text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})}),e.jsxs("p",{className:"text-center text-theme-text-secondary",children:["By continuing you agree to the"," ",e.jsx("a",{className:"link text-theme-text-brand",href:"https://www.zenml.io/privacy-policy",rel:"noopener noreferrer",target:"_blank",children:"Privacy Policy"})]})]})]})}const U=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.16146 2H9.83854C10.3657 1.99998 10.8205 1.99997 11.195 2.03057C11.5904 2.06287 11.9836 2.13419 12.362 2.32698C12.9265 2.6146 13.3854 3.07354 13.673 3.63803C13.8658 4.01641 13.9371 4.40963 13.9694 4.80497C14 5.17955 14 5.63432 14 6.16148V10L17.8385 10C18.3657 9.99998 18.8205 9.99997 19.195 10.0306C19.5904 10.0629 19.9836 10.1342 20.362 10.327C20.9265 10.6146 21.3854 11.0735 21.673 11.638C21.8658 12.0164 21.9371 12.4096 21.9694 12.805C22 13.1795 22 13.6343 22 14.1614V20C22.5523 20 23 20.4477 23 21C23 21.5523 22.5523 22 22 22H2C1.44772 22 1 21.5523 1 21C1 20.4477 1.44772 20 2 20V6.16146C1.99998 5.63431 1.99997 5.17955 2.03057 4.80497C2.06287 4.40963 2.13419 4.01641 2.32698 3.63803C2.6146 3.07354 3.07354 2.6146 3.63803 2.32698C4.01641 2.13419 4.40963 2.06287 4.80497 2.03057C5.17954 1.99997 5.63431 1.99998 6.16146 2ZM4 20H12V6.2C12 5.62345 11.9992 5.25118 11.9761 4.96784C11.9539 4.69617 11.9162 4.59546 11.891 4.54601C11.7951 4.35785 11.6422 4.20487 11.454 4.109C11.4045 4.0838 11.3038 4.04612 11.0322 4.02393C10.7488 4.00078 10.3766 4 9.8 4H6.2C5.62345 4 5.25117 4.00078 4.96784 4.02393C4.69617 4.04612 4.59545 4.0838 4.54601 4.109C4.35785 4.20487 4.20487 4.35785 4.10899 4.54601C4.0838 4.59546 4.04612 4.69617 4.02393 4.96784C4.00078 5.25117 4 5.62345 4 6.2V20ZM14 12V20H20V14.2C20 13.6234 19.9992 13.2512 19.9761 12.9678C19.9539 12.6962 19.9162 12.5955 19.891 12.546C19.7951 12.3578 19.6422 12.2049 19.454 12.109C19.4045 12.0838 19.3038 12.0461 19.0322 12.0239C18.7488 12.0008 18.3766 12 17.8 12H14ZM5.5 7C5.5 6.44772 5.94772 6 6.5 6H9.5C10.0523 6 10.5 6.44772 10.5 7C10.5 7.55229 10.0523 8 9.5 8H6.5C5.94772 8 5.5 7.55229 5.5 7ZM5.5 11C5.5 10.4477 5.94772 10 6.5 10H9.5C10.0523 10 10.5 10.4477 10.5 11C10.5 11.5523 10.0523 12 9.5 12H6.5C5.94772 12 5.5 11.5523 5.5 11ZM5.5 15C5.5 14.4477 5.94772 14 6.5 14H9.5C10.0523 14 10.5 14.4477 10.5 15C10.5 15.5523 10.0523 16 9.5 16H6.5C5.94772 16 5.5 15.5523 5.5 15Z"})),_=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.8026 4.52039L11.8026 4.52039L11.8026 4.52039ZM12 4.61798L19.7639 8.49994L19.5721 8.59583C19.5596 8.6018 19.5471 8.60803 19.5348 8.6145L17 9.88191L12.4472 7.60552C11.9532 7.35853 11.3526 7.55875 11.1056 8.05273C10.8586 8.54671 11.0588 9.14738 11.5528 9.39437L14.7639 10.9999L12 12.3819L4.4652 8.61451C4.4529 8.60803 4.44044 8.6018 4.42784 8.59583L4.23607 8.49994L12 4.61798ZM3 10.118L1.55279 9.39437C1.214 9.22498 1 8.87872 1 8.49994C1 8.12117 1.214 7.77491 1.55279 7.60552L11.195 2.7844C11.2024 2.7807 11.211 2.77633 11.2206 2.77143C11.3139 2.72382 11.507 2.62529 11.7234 2.58468C11.9062 2.55039 12.0938 2.55039 12.2766 2.58468C12.493 2.62529 12.6861 2.72382 12.7794 2.77143C12.789 2.77633 12.7976 2.7807 12.805 2.7844L22.4472 7.60552C22.786 7.77491 23 8.12117 23 8.49994C23 8.87872 22.786 9.22498 22.4472 9.39437L21 10.118V16.3066C21 16.332 21.0001 16.3582 21.0002 16.3851C21.0013 16.6707 21.0027 17.0296 20.884 17.3629C20.7814 17.6508 20.6142 17.9113 20.3952 18.1245C20.1417 18.3713 19.8149 18.5196 19.5548 18.6376C19.5303 18.6487 19.5065 18.6595 19.4833 18.6701L13.0833 21.6035C13.0667 21.6111 13.0496 21.619 13.0321 21.6271C12.8423 21.7147 12.6034 21.8251 12.3421 21.8704C12.1157 21.9097 11.8843 21.9097 11.6579 21.8704C11.3966 21.8251 11.1577 21.7147 10.9679 21.6271C10.9504 21.619 10.9333 21.6111 10.9167 21.6035L4.5167 18.6701L4.93335 17.7611L4.51669 18.6701C4.49354 18.6595 4.46967 18.6487 4.44522 18.6376C4.1851 18.5196 3.85826 18.3713 3.60476 18.1245C3.3858 17.9113 3.21862 17.6508 3.11604 17.3629C2.99727 17.0296 2.99867 16.6707 2.99979 16.3851C2.9999 16.3582 3 16.332 3 16.3066V10.118ZM5 11.118V16.3066C5 16.505 5.00047 16.6074 5.00521 16.6814C5.00536 16.6837 5.0055 16.6859 5.00565 16.688C5.00747 16.6889 5.00938 16.69 5.01138 16.6911C5.07675 16.7262 5.16965 16.7693 5.35001 16.852L11.75 19.7853C11.8813 19.8455 11.9473 19.8754 11.9962 19.895C11.9975 19.8955 11.9988 19.896 12 19.8965C12.0012 19.896 12.0025 19.8955 12.0038 19.895C12.0527 19.8754 12.1187 19.8455 12.25 19.7853L18.65 16.852C18.8304 16.7693 18.9233 16.7262 18.9886 16.6911C18.9906 16.69 18.9925 16.6889 18.9944 16.688C18.9945 16.6859 18.9946 16.6837 18.9948 16.6814C18.9995 16.6074 19 16.505 19 16.3066V11.118L18 11.618V14.4999C18 15.0522 17.5523 15.4999 17 15.4999C16.4477 15.4999 16 15.0522 16 14.4999V12.618L12.805 14.2155C12.7976 14.2192 12.789 14.2236 12.7794 14.2285C12.6861 14.2761 12.493 14.3746 12.2766 14.4152C12.0938 14.4495 11.9062 14.4495 11.7234 14.4152C11.507 14.3746 11.3139 14.2761 11.2206 14.2285C11.211 14.2236 11.2024 14.2192 11.195 14.2155L5 11.118ZM11.8026 12.4795C11.8024 12.4796 11.8024 12.4796 11.8026 12.4795L11.8026 12.4795ZM12.1974 12.4795C12.1976 12.4796 12.1976 12.4796 12.1974 12.4795L12.1974 12.4795ZM12.1974 4.52039L12.1974 4.52039L12.1974 4.52039Z"})),I=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 4C10.067 4 8.50002 5.567 8.50002 7.5C8.50002 9.433 10.067 11 12 11C13.933 11 15.5 9.433 15.5 7.5C15.5 5.567 13.933 4 12 4ZM6.50002 7.5C6.50002 4.46243 8.96246 2 12 2C15.0376 2 17.5 4.46243 17.5 7.5C17.5 10.5376 15.0376 13 12 13C8.96246 13 6.50002 10.5376 6.50002 7.5ZM9.32629 14.5C9.38335 14.5 9.44125 14.5 9.50003 14.5H14.5C14.5588 14.5 14.6167 14.5 14.6738 14.5C15.901 14.4995 16.739 14.4992 17.4514 14.7153C19.0495 15.2 20.3 16.4506 20.7847 18.0486C21.0008 18.761 21.0005 19.599 21.0001 20.8263C21 20.8833 21 20.9412 21 21C21 21.5523 20.5523 22 20 22C19.4477 22 19 21.5523 19 21C19 19.5317 18.9892 19.0192 18.8708 18.6291C18.58 17.6703 17.8297 16.92 16.8709 16.6292C16.4808 16.5108 15.9683 16.5 14.5 16.5H9.50003C8.03171 16.5 7.51923 16.5108 7.12917 16.6292C6.17036 16.92 5.42005 17.6703 5.1292 18.6291C5.01088 19.0192 5.00002 19.5317 5.00002 21C5.00002 21.5523 4.55231 22 4.00002 22C3.44774 22 3.00002 21.5523 3.00002 21C3.00002 20.9412 3 20.8833 2.99998 20.8263C2.99953 19.599 2.99922 18.761 3.21532 18.0486C3.70007 16.4506 4.95059 15.2 6.54859 14.7153C7.261 14.4992 8.09902 14.4995 9.32629 14.5Z"})),u=l.forwardRef(({children:s,className:a,id:i,...c},r)=>e.jsxs("div",{className:"min-h-[160px] min-w-[160px]",children:[e.jsx("input",{id:i,...c,ref:r,className:L("peer sr-only",a),type:"radio"}),e.jsx("label",{htmlFor:i,className:"flex h-full w-full flex-col items-center justify-center space-y-5 rounded-md border border-theme-border-minimal bg-theme-surface-primary p-5 text-text-lg text-theme-text-secondary hover:cursor-pointer peer-checked:border-primary-100 peer-checked:bg-primary-25 peer-focus-visible:border-primary-100",children:s})]}));u.displayName="UseRadioButton";const A=["0","1-5","6-25","26-99","100+"];function l1({submitHandler:s,user:a}){var m,d,C,n;const{control:i,handleSubmit:c,register:r,formState:{isValid:o}}=y({defaultValues:{primaryUse:(d=(m=a==null?void 0:a.metadata)==null?void 0:m.user_metadata)==null?void 0:d.primary_use,amountProductionModels:(n=(C=a==null?void 0:a.metadata)==null?void 0:C.user_metadata)==null?void 0:n.models_production},resolver:v(F)});return e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"What will be your primary use for ZenML?"})}),e.jsxs("form",{onSubmit:c(s),className:"space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-[20px] md:grid-cols-3",children:[e.jsxs(u,{id:"use-personal",...r("primaryUse"),value:"personal",children:[e.jsx(I,{className:"h-7 w-7 fill-primary-400"}),e.jsx("span",{children:"Personal"})]}),e.jsxs(u,{...r("primaryUse"),id:"use-work",value:"work",children:[e.jsx(U,{className:"h-7 w-7 fill-primary-400"}),e.jsx("span",{children:"Work"})]}),e.jsxs(u,{...r("primaryUse"),id:"use-student",value:"student",children:[e.jsx(_,{className:"h-7 w-7 fill-primary-400"}),e.jsx("span",{children:"Student"})]})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"amount-select",className:"font-semibold",children:"How many models do you have in production?"}),e.jsx(N,{name:"amountProductionModels",control:i,render:({field:{ref:x,onChange:t,...p}})=>e.jsxs(b,{...p,onValueChange:t,children:[e.jsx(M,{id:"amount-select",className:"w-full border border-neutral-300 bg-theme-surface-primary px-2 text-left text-text-md",children:e.jsx(V,{placeholder:"Select a range"})}),e.jsx(S,{className:"",children:A.map((h,f)=>e.jsx(Z,{value:h,children:e.jsx("div",{className:"flex items-center gap-1",children:h})},f))})]})})]}),e.jsx(j,{disabled:!o,className:"w-full text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})})]})]})}const z=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"#0A66C2",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{d:"M19.0409 18.8729H16.0776V14.2779C16.0776 13.1821 16.0578 11.7716 14.5363 11.7716C12.9929 11.7716 12.7567 12.9654 12.7567 14.1981V18.8726H9.79336V9.42332H12.6382V10.7147H12.678C12.9627 10.2327 13.3741 9.83617 13.8684 9.56738C14.3627 9.29859 14.9214 9.16757 15.4849 9.18828C18.4884 9.18828 19.0422 11.1444 19.0422 13.6892L19.0409 18.8729ZM6.44969 8.13167C6.10957 8.13173 5.77706 8.03192 5.49422 7.84487C5.21139 7.65782 4.99094 7.39193 4.86073 7.08081C4.73051 6.7697 4.69638 6.42734 4.76268 6.09703C4.82897 5.76672 4.99271 5.46329 5.23317 5.22511C5.47363 4.98694 5.78002 4.82471 6.11359 4.75895C6.44716 4.69319 6.79293 4.72685 7.10719 4.85567C7.42144 4.98449 7.69006 5.20269 7.87907 5.48267C8.06808 5.76265 8.16901 6.09184 8.16907 6.42861C8.16911 6.65222 8.12466 6.87365 8.03827 7.08025C7.95189 7.28685 7.82527 7.47458 7.66561 7.63273C7.50595 7.79087 7.31638 7.91633 7.10775 8.00193C6.89913 8.08754 6.67552 8.13163 6.44969 8.13167ZM7.93137 18.8729H4.96491V9.42332H7.93137V18.8729ZM20.5183 2.00135H3.47583C3.08901 1.99703 2.71626 2.14494 2.43953 2.41258C2.1628 2.68023 2.00472 3.04571 2 3.42871V20.3734C2.00456 20.7565 2.16255 21.1223 2.43927 21.3902C2.71599 21.6581 3.08882 21.8063 3.47583 21.8022H20.5183C20.9061 21.8071 21.28 21.6593 21.5578 21.3914C21.8356 21.1234 21.9946 20.7573 22 20.3734V3.42749C21.9945 3.04373 21.8353 2.67783 21.5575 2.41019C21.2797 2.14255 20.9059 1.99506 20.5183 2.00013"})),T=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("g",{clipPath:"url(#clip0_1732_1425)"},l.createElement("path",{d:"M17.743 3H20.7952L14.1285 10.6707L22 21.0723H15.8153L10.996 14.7671L5.45382 21.0723H2.40161L9.5502 12.8795L2 3H8.34538L12.7229 8.78313L17.743 3ZM16.6586 19.2249H18.3454L7.42169 4.72691H5.5743L16.6586 19.2249Z",fill:"#7A3EF4"})),l.createElement("defs",null,l.createElement("clipPath",{id:"clip0_1732_1425"},l.createElement("rect",{width:20,height:18.0723,fill:"white",transform:"translate(2 3)"})))),W=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("g",{clipPath:"url(#clip0_1732_1440)"},l.createElement("path",{d:"M22 2H2V22H22V2Z",fill:"#7A3EF4"}),l.createElement("path",{d:"M14.0344 6.71565C14.2078 7.45081 14.868 7.99846 15.6562 7.99846C16.5766 7.99846 17.3226 7.25237 17.3226 6.33206C17.3226 5.41174 16.5766 4.66565 15.6562 4.66565C14.8516 4.66565 14.1805 5.23596 14.0242 5.99456C12.6765 6.13909 11.6242 7.28206 11.6242 8.66721C11.6242 8.67034 11.6242 8.67268 11.6242 8.67581C10.1586 8.73752 8.8203 9.15471 7.7578 9.81331C7.36327 9.50784 6.86796 9.32581 6.33046 9.32581C5.04061 9.32581 3.9953 10.3711 3.9953 11.661C3.9953 12.5969 4.5453 13.4031 5.33983 13.7758C5.41718 16.4867 8.37108 18.6672 12.0047 18.6672C15.6383 18.6672 18.5961 16.4844 18.6695 13.7711C19.4578 13.3961 20.0031 12.5922 20.0031 11.6617C20.0031 10.3719 18.9578 9.32659 17.668 9.32659C17.1328 9.32659 16.6398 9.50706 16.2461 9.81018C15.1742 9.1469 13.8211 8.72971 12.3406 8.67424C12.3406 8.6719 12.3406 8.67034 12.3406 8.66799C12.3406 7.67581 13.0781 6.85237 14.0344 6.71721V6.71565ZM7.66405 13.143C7.70311 12.2961 8.26561 11.6461 8.91952 11.6461C9.57343 11.6461 10.0734 12.3328 10.0344 13.1797C9.9953 14.0266 9.50702 14.3344 8.85233 14.3344C8.19764 14.3344 7.62499 13.9899 7.66405 13.143ZM15.0906 11.6461C15.7453 11.6461 16.3078 12.2961 16.3461 13.143C16.3851 13.9899 15.8117 14.3344 15.1578 14.3344C14.5039 14.3344 14.0148 14.0274 13.9758 13.1797C13.9367 12.3328 14.4359 11.6461 15.0906 11.6461ZM14.3125 15.1024C14.4351 15.1149 14.5133 15.2422 14.4656 15.3563C14.0633 16.318 13.1133 16.9938 12.0047 16.9938C10.8961 16.9938 9.94686 16.318 9.54374 15.3563C9.49608 15.2422 9.57421 15.1149 9.69686 15.1024C10.4156 15.0297 11.193 14.9899 12.0047 14.9899C12.8164 14.9899 13.593 15.0297 14.3125 15.1024Z",fill:"white"})),l.createElement("defs",null,l.createElement("clipPath",{id:"clip0_1732_1440"},l.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(2 2)"})))),D=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 4C7.84315 4 6.5 5.34315 6.5 7C6.5 8.65685 7.84315 10 9.5 10C11.1569 10 12.5 8.65685 12.5 7C12.5 5.34315 11.1569 4 9.5 4ZM4.5 7C4.5 4.23858 6.73858 2 9.5 2C12.2614 2 14.5 4.23858 14.5 7C14.5 9.76142 12.2614 12 9.5 12C6.73858 12 4.5 9.76142 4.5 7ZM14.5731 2.91554C14.7803 2.40361 15.3633 2.1566 15.8752 2.36382C17.7058 3.10481 19 4.90006 19 7C19 9.09994 17.7058 10.8952 15.8752 11.6362C15.3633 11.8434 14.7803 11.5964 14.5731 11.0845C14.3658 10.5725 14.6129 9.98953 15.1248 9.7823C16.2261 9.33652 17 8.25744 17 7C17 5.74256 16.2261 4.66348 15.1248 4.2177C14.6129 4.01047 14.3658 3.42748 14.5731 2.91554ZM7.96448 14H11.0355C11.9373 14 12.6647 14 13.2567 14.0404C13.8654 14.0819 14.4037 14.1695 14.9134 14.3806C16.1386 14.8881 17.1119 15.8614 17.6194 17.0866C17.8305 17.5963 17.9181 18.1346 17.9596 18.7433C18 19.3353 18 20.0627 18 20.9645V21C18 21.5523 17.5523 22 17 22C16.4477 22 16 21.5523 16 21C16 20.0544 15.9995 19.3953 15.9643 18.8794C15.9297 18.3725 15.865 18.0773 15.7716 17.8519C15.4672 17.1169 14.8831 16.5328 14.1481 16.2284C13.9227 16.135 13.6275 16.0703 13.1206 16.0357C12.6047 16.0005 11.9456 16 11 16H8C7.05444 16 6.39534 16.0005 5.87945 16.0357C5.37254 16.0703 5.07733 16.135 4.85195 16.2284C4.11687 16.5328 3.53284 17.1169 3.22836 17.8519C3.135 18.0773 3.07033 18.3725 3.03574 18.8794C3.00054 19.3953 3 20.0544 3 21C3 21.5523 2.55229 22 2 22C1.44772 22 1 21.5523 1 21L1 20.9645C0.999993 20.0627 0.999988 19.3353 1.04038 18.7433C1.08191 18.1346 1.16948 17.5963 1.3806 17.0866C1.88807 15.8614 2.86144 14.8881 4.08658 14.3806C4.59628 14.1695 5.13456 14.0819 5.74331 14.0404C6.33531 14 7.06272 14 7.96448 14ZM18.0316 14.8768C18.1692 14.3419 18.7144 14.0199 19.2493 14.1576C21.4056 14.7126 23 16.6688 23 19V21C23 21.5523 22.5523 22 22 22C21.4477 22 21 21.5523 21 21V19C21 17.6035 20.0449 16.4275 18.7507 16.0945C18.2159 15.9568 17.8939 15.4116 18.0316 14.8768Z"})),G=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18C12.8859 18 14.5977 17.2542 15.8564 16.0414C15.8827 16.0072 15.9115 15.9742 15.9429 15.9429C15.9742 15.9115 16.0072 15.8827 16.0414 15.8564C17.2542 14.5977 18 12.8859 18 11C18 7.13401 14.866 4 11 4ZM18.0319 16.6177C19.2635 15.078 20 13.125 20 11C20 6.02944 15.9706 2 11 2C6.02944 2 2 6.02944 2 11C2 15.9706 6.02944 20 11 20C13.125 20 15.078 19.2635 16.6177 18.0319L20.2929 21.7071C20.6834 22.0976 21.3166 22.0976 21.7071 21.7071C22.0976 21.3166 22.0976 20.6834 21.7071 20.2929L18.0319 16.6177Z"})),O=[{channel:"LinkedIn",icon:e.jsx(z,{className:"h-5 w-5 fill-primary-400"})},{channel:"X / Twitter",icon:e.jsx(T,{className:"h-5 w-5"})},{channel:"Newsletter",icon:e.jsx(k,{className:"h-5 w-5 fill-primary-400"})},{channel:"Webinar",icon:e.jsx(B,{className:"h-5 w-5 fill-primary-400"})},{channel:"Reddit",icon:e.jsx(W,{className:"h-5 w-5"})},{channel:"Conference",icon:e.jsx(H,{className:"h-5 w-5 fill-primary-400"})},{channel:"Recommendation",icon:e.jsx(D,{className:"h-5 w-5 fill-primary-400"})},{channel:"Blog",icon:e.jsx(P,{className:"h-5 w-5 fill-primary-400"})},{channel:"Google / Search Engine",icon:e.jsx(G,{className:"h-5 w-5 fill-primary-400"})}];function s1({submitHandler:s}){const{register:a,setValue:i,watch:c,handleSubmit:r,unregister:o,control:m,formState:{isValid:d}}=y({resolver:v(R),defaultValues:{channels:[]}}),C=c("other");return l.useEffect(()=>{C?a("otherVal"):o("otherVal")},[a,o,C]),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"How did you hear about us?"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select all the applicable options"})]}),e.jsxs("form",{onSubmit:r(s),className:"space-y-5",children:[e.jsxs("div",{className:"grid w-full grid-cols-1 gap-[20px] md:grid-cols-2 xl:min-w-[700px]",children:[e.jsx(N,{control:m,name:"channels",render:({field:{onChange:n,value:x}})=>e.jsx(e.Fragment,{children:O.map((t,p)=>e.jsxs("div",{className:"flex items-center gap-1 rounded-md bg-theme-surface-primary pl-3",children:[e.jsx(g,{onCheckedChange:h=>{n(h?[...x,t.channel]:x.filter(f=>f!==t.channel))},value:t.channel,className:"h-3 w-3",id:t.channel}),e.jsxs("label",{className:"flex w-full items-center gap-1 py-3 pr-3 text-theme-text-secondary hover:cursor-pointer",htmlFor:t.channel,children:[t.icon,t.channel]})]},p))})}),e.jsxs("div",{className:"flex items-center rounded-md bg-theme-surface-primary pl-3",children:[e.jsx(g,{onCheckedChange:n=>i("other",!!n),...a("other",{value:!1}),className:"mr-2 h-3 w-3",id:"other"}),e.jsx("label",{className:"w-full py-3 pr-3 text-theme-text-secondary hover:cursor-pointer",htmlFor:"other",children:"Other (specify)"})]}),C&&e.jsx(w,{inputSize:"lg",...a("otherVal"),placeholder:"Specify...",className:"w-full border-theme-border-minimal"})]}),e.jsx(j,{disabled:!d,type:"submit",className:"w-full text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})})]})]})}export{e1 as A,l1 as P,s1 as a};
|
1
|
+
import{r as l,j as e}from"./@radix-BXWm7HOa.js";import{t as v}from"./zod-CnykDKJj.js";import{I as w,aH as g,h as j,q as L,am as b,an as M,ao as V,ap as S,aq as H,aL as Z}from"./index-DhIZtpxB.js";import{u as y,C as N}from"./index.esm-DT4uyn2i.js";import{d as E,p as F,A as R}from"./SuccessStep-DlkItqYG.js";import{S as k,a as P}from"./file-text-B9JibxTs.js";import{S as B}from"./play-circle-XSkLR12B.js";function e1({email:s,fullName:a,submitHandler:i}){const c=l.useId(),r=l.useId(),o=l.useId(),{register:m,handleSubmit:d,control:C,watch:n,formState:{isValid:x}}=y({resolver:v(E),defaultValues:{fullName:a||"",getUpdates:!0,email:s||""}});return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Add your account details"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Please, fill in your details to get started with ZenML."})]}),e.jsxs("form",{onSubmit:d(i),className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:c,className:"text-text-sm",children:"Full Name (optional)"}),e.jsx(w,{...m("fullName"),id:c,className:"w-full"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{htmlFor:r,className:"text-text-sm",children:["Email ",!n("getUpdates")&&e.jsx(e.Fragment,{children:"(optional)"})]}),e.jsx(w,{placeholder:"example@company.inc",...m("email"),type:"email",id:r,className:"w-full"})]})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(N,{control:C,name:"getUpdates",render:({field:{onChange:t,value:p}})=>e.jsx(g,{checked:p,onCheckedChange:h=>t(!!h),id:o})}),e.jsx("label",{htmlFor:o,className:"text-text-sm",children:"I want to receive news and recommendations about how to use ZenML"})]}),e.jsx(j,{disabled:!x,className:"w-full text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})}),e.jsxs("p",{className:"text-center text-theme-text-secondary",children:["By continuing you agree to the"," ",e.jsx("a",{className:"link text-theme-text-brand",href:"https://www.zenml.io/privacy-policy",rel:"noopener noreferrer",target:"_blank",children:"Privacy Policy"})]})]})]})}const U=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.16146 2H9.83854C10.3657 1.99998 10.8205 1.99997 11.195 2.03057C11.5904 2.06287 11.9836 2.13419 12.362 2.32698C12.9265 2.6146 13.3854 3.07354 13.673 3.63803C13.8658 4.01641 13.9371 4.40963 13.9694 4.80497C14 5.17955 14 5.63432 14 6.16148V10L17.8385 10C18.3657 9.99998 18.8205 9.99997 19.195 10.0306C19.5904 10.0629 19.9836 10.1342 20.362 10.327C20.9265 10.6146 21.3854 11.0735 21.673 11.638C21.8658 12.0164 21.9371 12.4096 21.9694 12.805C22 13.1795 22 13.6343 22 14.1614V20C22.5523 20 23 20.4477 23 21C23 21.5523 22.5523 22 22 22H2C1.44772 22 1 21.5523 1 21C1 20.4477 1.44772 20 2 20V6.16146C1.99998 5.63431 1.99997 5.17955 2.03057 4.80497C2.06287 4.40963 2.13419 4.01641 2.32698 3.63803C2.6146 3.07354 3.07354 2.6146 3.63803 2.32698C4.01641 2.13419 4.40963 2.06287 4.80497 2.03057C5.17954 1.99997 5.63431 1.99998 6.16146 2ZM4 20H12V6.2C12 5.62345 11.9992 5.25118 11.9761 4.96784C11.9539 4.69617 11.9162 4.59546 11.891 4.54601C11.7951 4.35785 11.6422 4.20487 11.454 4.109C11.4045 4.0838 11.3038 4.04612 11.0322 4.02393C10.7488 4.00078 10.3766 4 9.8 4H6.2C5.62345 4 5.25117 4.00078 4.96784 4.02393C4.69617 4.04612 4.59545 4.0838 4.54601 4.109C4.35785 4.20487 4.20487 4.35785 4.10899 4.54601C4.0838 4.59546 4.04612 4.69617 4.02393 4.96784C4.00078 5.25117 4 5.62345 4 6.2V20ZM14 12V20H20V14.2C20 13.6234 19.9992 13.2512 19.9761 12.9678C19.9539 12.6962 19.9162 12.5955 19.891 12.546C19.7951 12.3578 19.6422 12.2049 19.454 12.109C19.4045 12.0838 19.3038 12.0461 19.0322 12.0239C18.7488 12.0008 18.3766 12 17.8 12H14ZM5.5 7C5.5 6.44772 5.94772 6 6.5 6H9.5C10.0523 6 10.5 6.44772 10.5 7C10.5 7.55229 10.0523 8 9.5 8H6.5C5.94772 8 5.5 7.55229 5.5 7ZM5.5 11C5.5 10.4477 5.94772 10 6.5 10H9.5C10.0523 10 10.5 10.4477 10.5 11C10.5 11.5523 10.0523 12 9.5 12H6.5C5.94772 12 5.5 11.5523 5.5 11ZM5.5 15C5.5 14.4477 5.94772 14 6.5 14H9.5C10.0523 14 10.5 14.4477 10.5 15C10.5 15.5523 10.0523 16 9.5 16H6.5C5.94772 16 5.5 15.5523 5.5 15Z"})),_=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.8026 4.52039L11.8026 4.52039L11.8026 4.52039ZM12 4.61798L19.7639 8.49994L19.5721 8.59583C19.5596 8.6018 19.5471 8.60803 19.5348 8.6145L17 9.88191L12.4472 7.60552C11.9532 7.35853 11.3526 7.55875 11.1056 8.05273C10.8586 8.54671 11.0588 9.14738 11.5528 9.39437L14.7639 10.9999L12 12.3819L4.4652 8.61451C4.4529 8.60803 4.44044 8.6018 4.42784 8.59583L4.23607 8.49994L12 4.61798ZM3 10.118L1.55279 9.39437C1.214 9.22498 1 8.87872 1 8.49994C1 8.12117 1.214 7.77491 1.55279 7.60552L11.195 2.7844C11.2024 2.7807 11.211 2.77633 11.2206 2.77143C11.3139 2.72382 11.507 2.62529 11.7234 2.58468C11.9062 2.55039 12.0938 2.55039 12.2766 2.58468C12.493 2.62529 12.6861 2.72382 12.7794 2.77143C12.789 2.77633 12.7976 2.7807 12.805 2.7844L22.4472 7.60552C22.786 7.77491 23 8.12117 23 8.49994C23 8.87872 22.786 9.22498 22.4472 9.39437L21 10.118V16.3066C21 16.332 21.0001 16.3582 21.0002 16.3851C21.0013 16.6707 21.0027 17.0296 20.884 17.3629C20.7814 17.6508 20.6142 17.9113 20.3952 18.1245C20.1417 18.3713 19.8149 18.5196 19.5548 18.6376C19.5303 18.6487 19.5065 18.6595 19.4833 18.6701L13.0833 21.6035C13.0667 21.6111 13.0496 21.619 13.0321 21.6271C12.8423 21.7147 12.6034 21.8251 12.3421 21.8704C12.1157 21.9097 11.8843 21.9097 11.6579 21.8704C11.3966 21.8251 11.1577 21.7147 10.9679 21.6271C10.9504 21.619 10.9333 21.6111 10.9167 21.6035L4.5167 18.6701L4.93335 17.7611L4.51669 18.6701C4.49354 18.6595 4.46967 18.6487 4.44522 18.6376C4.1851 18.5196 3.85826 18.3713 3.60476 18.1245C3.3858 17.9113 3.21862 17.6508 3.11604 17.3629C2.99727 17.0296 2.99867 16.6707 2.99979 16.3851C2.9999 16.3582 3 16.332 3 16.3066V10.118ZM5 11.118V16.3066C5 16.505 5.00047 16.6074 5.00521 16.6814C5.00536 16.6837 5.0055 16.6859 5.00565 16.688C5.00747 16.6889 5.00938 16.69 5.01138 16.6911C5.07675 16.7262 5.16965 16.7693 5.35001 16.852L11.75 19.7853C11.8813 19.8455 11.9473 19.8754 11.9962 19.895C11.9975 19.8955 11.9988 19.896 12 19.8965C12.0012 19.896 12.0025 19.8955 12.0038 19.895C12.0527 19.8754 12.1187 19.8455 12.25 19.7853L18.65 16.852C18.8304 16.7693 18.9233 16.7262 18.9886 16.6911C18.9906 16.69 18.9925 16.6889 18.9944 16.688C18.9945 16.6859 18.9946 16.6837 18.9948 16.6814C18.9995 16.6074 19 16.505 19 16.3066V11.118L18 11.618V14.4999C18 15.0522 17.5523 15.4999 17 15.4999C16.4477 15.4999 16 15.0522 16 14.4999V12.618L12.805 14.2155C12.7976 14.2192 12.789 14.2236 12.7794 14.2285C12.6861 14.2761 12.493 14.3746 12.2766 14.4152C12.0938 14.4495 11.9062 14.4495 11.7234 14.4152C11.507 14.3746 11.3139 14.2761 11.2206 14.2285C11.211 14.2236 11.2024 14.2192 11.195 14.2155L5 11.118ZM11.8026 12.4795C11.8024 12.4796 11.8024 12.4796 11.8026 12.4795L11.8026 12.4795ZM12.1974 12.4795C12.1976 12.4796 12.1976 12.4796 12.1974 12.4795L12.1974 12.4795ZM12.1974 4.52039L12.1974 4.52039L12.1974 4.52039Z"})),I=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 4C10.067 4 8.50002 5.567 8.50002 7.5C8.50002 9.433 10.067 11 12 11C13.933 11 15.5 9.433 15.5 7.5C15.5 5.567 13.933 4 12 4ZM6.50002 7.5C6.50002 4.46243 8.96246 2 12 2C15.0376 2 17.5 4.46243 17.5 7.5C17.5 10.5376 15.0376 13 12 13C8.96246 13 6.50002 10.5376 6.50002 7.5ZM9.32629 14.5C9.38335 14.5 9.44125 14.5 9.50003 14.5H14.5C14.5588 14.5 14.6167 14.5 14.6738 14.5C15.901 14.4995 16.739 14.4992 17.4514 14.7153C19.0495 15.2 20.3 16.4506 20.7847 18.0486C21.0008 18.761 21.0005 19.599 21.0001 20.8263C21 20.8833 21 20.9412 21 21C21 21.5523 20.5523 22 20 22C19.4477 22 19 21.5523 19 21C19 19.5317 18.9892 19.0192 18.8708 18.6291C18.58 17.6703 17.8297 16.92 16.8709 16.6292C16.4808 16.5108 15.9683 16.5 14.5 16.5H9.50003C8.03171 16.5 7.51923 16.5108 7.12917 16.6292C6.17036 16.92 5.42005 17.6703 5.1292 18.6291C5.01088 19.0192 5.00002 19.5317 5.00002 21C5.00002 21.5523 4.55231 22 4.00002 22C3.44774 22 3.00002 21.5523 3.00002 21C3.00002 20.9412 3 20.8833 2.99998 20.8263C2.99953 19.599 2.99922 18.761 3.21532 18.0486C3.70007 16.4506 4.95059 15.2 6.54859 14.7153C7.261 14.4992 8.09902 14.4995 9.32629 14.5Z"})),u=l.forwardRef(({children:s,className:a,id:i,...c},r)=>e.jsxs("div",{className:"min-h-[160px] min-w-[160px]",children:[e.jsx("input",{id:i,...c,ref:r,className:L("peer sr-only",a),type:"radio"}),e.jsx("label",{htmlFor:i,className:"flex h-full w-full flex-col items-center justify-center space-y-5 rounded-md border border-theme-border-minimal bg-theme-surface-primary p-5 text-text-lg text-theme-text-secondary hover:cursor-pointer peer-checked:border-primary-100 peer-checked:bg-primary-25 peer-focus-visible:border-primary-100",children:s})]}));u.displayName="UseRadioButton";const A=["0","1-5","6-25","26-99","100+"];function l1({submitHandler:s,user:a}){var m,d,C,n;const{control:i,handleSubmit:c,register:r,formState:{isValid:o}}=y({defaultValues:{primaryUse:(d=(m=a==null?void 0:a.metadata)==null?void 0:m.user_metadata)==null?void 0:d.primary_use,amountProductionModels:(n=(C=a==null?void 0:a.metadata)==null?void 0:C.user_metadata)==null?void 0:n.models_production},resolver:v(F)});return e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"What will be your primary use for ZenML?"})}),e.jsxs("form",{onSubmit:c(s),className:"space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-[20px] md:grid-cols-3",children:[e.jsxs(u,{id:"use-personal",...r("primaryUse"),value:"personal",children:[e.jsx(I,{className:"h-7 w-7 fill-primary-400"}),e.jsx("span",{children:"Personal"})]}),e.jsxs(u,{...r("primaryUse"),id:"use-work",value:"work",children:[e.jsx(U,{className:"h-7 w-7 fill-primary-400"}),e.jsx("span",{children:"Work"})]}),e.jsxs(u,{...r("primaryUse"),id:"use-student",value:"student",children:[e.jsx(_,{className:"h-7 w-7 fill-primary-400"}),e.jsx("span",{children:"Student"})]})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"amount-select",className:"font-semibold",children:"How many models do you have in production?"}),e.jsx(N,{name:"amountProductionModels",control:i,render:({field:{ref:x,onChange:t,...p}})=>e.jsxs(b,{...p,onValueChange:t,children:[e.jsx(M,{id:"amount-select",className:"w-full border border-neutral-300 bg-theme-surface-primary px-2 text-left text-text-md",children:e.jsx(V,{placeholder:"Select a range"})}),e.jsx(S,{className:"",children:A.map((h,f)=>e.jsx(H,{value:h,children:e.jsx("div",{className:"flex items-center gap-1",children:h})},f))})]})})]}),e.jsx(j,{disabled:!o,className:"w-full text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})})]})]})}const z=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"#0A66C2",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{d:"M19.0409 18.8729H16.0776V14.2779C16.0776 13.1821 16.0578 11.7716 14.5363 11.7716C12.9929 11.7716 12.7567 12.9654 12.7567 14.1981V18.8726H9.79336V9.42332H12.6382V10.7147H12.678C12.9627 10.2327 13.3741 9.83617 13.8684 9.56738C14.3627 9.29859 14.9214 9.16757 15.4849 9.18828C18.4884 9.18828 19.0422 11.1444 19.0422 13.6892L19.0409 18.8729ZM6.44969 8.13167C6.10957 8.13173 5.77706 8.03192 5.49422 7.84487C5.21139 7.65782 4.99094 7.39193 4.86073 7.08081C4.73051 6.7697 4.69638 6.42734 4.76268 6.09703C4.82897 5.76672 4.99271 5.46329 5.23317 5.22511C5.47363 4.98694 5.78002 4.82471 6.11359 4.75895C6.44716 4.69319 6.79293 4.72685 7.10719 4.85567C7.42144 4.98449 7.69006 5.20269 7.87907 5.48267C8.06808 5.76265 8.16901 6.09184 8.16907 6.42861C8.16911 6.65222 8.12466 6.87365 8.03827 7.08025C7.95189 7.28685 7.82527 7.47458 7.66561 7.63273C7.50595 7.79087 7.31638 7.91633 7.10775 8.00193C6.89913 8.08754 6.67552 8.13163 6.44969 8.13167ZM7.93137 18.8729H4.96491V9.42332H7.93137V18.8729ZM20.5183 2.00135H3.47583C3.08901 1.99703 2.71626 2.14494 2.43953 2.41258C2.1628 2.68023 2.00472 3.04571 2 3.42871V20.3734C2.00456 20.7565 2.16255 21.1223 2.43927 21.3902C2.71599 21.6581 3.08882 21.8063 3.47583 21.8022H20.5183C20.9061 21.8071 21.28 21.6593 21.5578 21.3914C21.8356 21.1234 21.9946 20.7573 22 20.3734V3.42749C21.9945 3.04373 21.8353 2.67783 21.5575 2.41019C21.2797 2.14255 20.9059 1.99506 20.5183 2.00013"})),T=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("g",{clipPath:"url(#clip0_1732_1425)"},l.createElement("path",{d:"M17.743 3H20.7952L14.1285 10.6707L22 21.0723H15.8153L10.996 14.7671L5.45382 21.0723H2.40161L9.5502 12.8795L2 3H8.34538L12.7229 8.78313L17.743 3ZM16.6586 19.2249H18.3454L7.42169 4.72691H5.5743L16.6586 19.2249Z",fill:"#7A3EF4"})),l.createElement("defs",null,l.createElement("clipPath",{id:"clip0_1732_1425"},l.createElement("rect",{width:20,height:18.0723,fill:"white",transform:"translate(2 3)"})))),W=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("g",{clipPath:"url(#clip0_1732_1440)"},l.createElement("path",{d:"M22 2H2V22H22V2Z",fill:"#7A3EF4"}),l.createElement("path",{d:"M14.0344 6.71565C14.2078 7.45081 14.868 7.99846 15.6562 7.99846C16.5766 7.99846 17.3226 7.25237 17.3226 6.33206C17.3226 5.41174 16.5766 4.66565 15.6562 4.66565C14.8516 4.66565 14.1805 5.23596 14.0242 5.99456C12.6765 6.13909 11.6242 7.28206 11.6242 8.66721C11.6242 8.67034 11.6242 8.67268 11.6242 8.67581C10.1586 8.73752 8.8203 9.15471 7.7578 9.81331C7.36327 9.50784 6.86796 9.32581 6.33046 9.32581C5.04061 9.32581 3.9953 10.3711 3.9953 11.661C3.9953 12.5969 4.5453 13.4031 5.33983 13.7758C5.41718 16.4867 8.37108 18.6672 12.0047 18.6672C15.6383 18.6672 18.5961 16.4844 18.6695 13.7711C19.4578 13.3961 20.0031 12.5922 20.0031 11.6617C20.0031 10.3719 18.9578 9.32659 17.668 9.32659C17.1328 9.32659 16.6398 9.50706 16.2461 9.81018C15.1742 9.1469 13.8211 8.72971 12.3406 8.67424C12.3406 8.6719 12.3406 8.67034 12.3406 8.66799C12.3406 7.67581 13.0781 6.85237 14.0344 6.71721V6.71565ZM7.66405 13.143C7.70311 12.2961 8.26561 11.6461 8.91952 11.6461C9.57343 11.6461 10.0734 12.3328 10.0344 13.1797C9.9953 14.0266 9.50702 14.3344 8.85233 14.3344C8.19764 14.3344 7.62499 13.9899 7.66405 13.143ZM15.0906 11.6461C15.7453 11.6461 16.3078 12.2961 16.3461 13.143C16.3851 13.9899 15.8117 14.3344 15.1578 14.3344C14.5039 14.3344 14.0148 14.0274 13.9758 13.1797C13.9367 12.3328 14.4359 11.6461 15.0906 11.6461ZM14.3125 15.1024C14.4351 15.1149 14.5133 15.2422 14.4656 15.3563C14.0633 16.318 13.1133 16.9938 12.0047 16.9938C10.8961 16.9938 9.94686 16.318 9.54374 15.3563C9.49608 15.2422 9.57421 15.1149 9.69686 15.1024C10.4156 15.0297 11.193 14.9899 12.0047 14.9899C12.8164 14.9899 13.593 15.0297 14.3125 15.1024Z",fill:"white"})),l.createElement("defs",null,l.createElement("clipPath",{id:"clip0_1732_1440"},l.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(2 2)"})))),q=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 4C7.84315 4 6.5 5.34315 6.5 7C6.5 8.65685 7.84315 10 9.5 10C11.1569 10 12.5 8.65685 12.5 7C12.5 5.34315 11.1569 4 9.5 4ZM4.5 7C4.5 4.23858 6.73858 2 9.5 2C12.2614 2 14.5 4.23858 14.5 7C14.5 9.76142 12.2614 12 9.5 12C6.73858 12 4.5 9.76142 4.5 7ZM14.5731 2.91554C14.7803 2.40361 15.3633 2.1566 15.8752 2.36382C17.7058 3.10481 19 4.90006 19 7C19 9.09994 17.7058 10.8952 15.8752 11.6362C15.3633 11.8434 14.7803 11.5964 14.5731 11.0845C14.3658 10.5725 14.6129 9.98953 15.1248 9.7823C16.2261 9.33652 17 8.25744 17 7C17 5.74256 16.2261 4.66348 15.1248 4.2177C14.6129 4.01047 14.3658 3.42748 14.5731 2.91554ZM7.96448 14H11.0355C11.9373 14 12.6647 14 13.2567 14.0404C13.8654 14.0819 14.4037 14.1695 14.9134 14.3806C16.1386 14.8881 17.1119 15.8614 17.6194 17.0866C17.8305 17.5963 17.9181 18.1346 17.9596 18.7433C18 19.3353 18 20.0627 18 20.9645V21C18 21.5523 17.5523 22 17 22C16.4477 22 16 21.5523 16 21C16 20.0544 15.9995 19.3953 15.9643 18.8794C15.9297 18.3725 15.865 18.0773 15.7716 17.8519C15.4672 17.1169 14.8831 16.5328 14.1481 16.2284C13.9227 16.135 13.6275 16.0703 13.1206 16.0357C12.6047 16.0005 11.9456 16 11 16H8C7.05444 16 6.39534 16.0005 5.87945 16.0357C5.37254 16.0703 5.07733 16.135 4.85195 16.2284C4.11687 16.5328 3.53284 17.1169 3.22836 17.8519C3.135 18.0773 3.07033 18.3725 3.03574 18.8794C3.00054 19.3953 3 20.0544 3 21C3 21.5523 2.55229 22 2 22C1.44772 22 1 21.5523 1 21L1 20.9645C0.999993 20.0627 0.999988 19.3353 1.04038 18.7433C1.08191 18.1346 1.16948 17.5963 1.3806 17.0866C1.88807 15.8614 2.86144 14.8881 4.08658 14.3806C4.59628 14.1695 5.13456 14.0819 5.74331 14.0404C6.33531 14 7.06272 14 7.96448 14ZM18.0316 14.8768C18.1692 14.3419 18.7144 14.0199 19.2493 14.1576C21.4056 14.7126 23 16.6688 23 19V21C23 21.5523 22.5523 22 22 22C21.4477 22 21 21.5523 21 21V19C21 17.6035 20.0449 16.4275 18.7507 16.0945C18.2159 15.9568 17.8939 15.4116 18.0316 14.8768Z"})),D=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18C12.8859 18 14.5977 17.2542 15.8564 16.0414C15.8827 16.0072 15.9115 15.9742 15.9429 15.9429C15.9742 15.9115 16.0072 15.8827 16.0414 15.8564C17.2542 14.5977 18 12.8859 18 11C18 7.13401 14.866 4 11 4ZM18.0319 16.6177C19.2635 15.078 20 13.125 20 11C20 6.02944 15.9706 2 11 2C6.02944 2 2 6.02944 2 11C2 15.9706 6.02944 20 11 20C13.125 20 15.078 19.2635 16.6177 18.0319L20.2929 21.7071C20.6834 22.0976 21.3166 22.0976 21.7071 21.7071C22.0976 21.3166 22.0976 20.6834 21.7071 20.2929L18.0319 16.6177Z"})),O=[{channel:"LinkedIn",icon:e.jsx(z,{className:"h-5 w-5 fill-primary-400"})},{channel:"X / Twitter",icon:e.jsx(T,{className:"h-5 w-5"})},{channel:"Newsletter",icon:e.jsx(k,{className:"h-5 w-5 fill-primary-400"})},{channel:"Webinar",icon:e.jsx(B,{className:"h-5 w-5 fill-primary-400"})},{channel:"Reddit",icon:e.jsx(W,{className:"h-5 w-5"})},{channel:"Conference",icon:e.jsx(Z,{className:"h-5 w-5 fill-primary-400"})},{channel:"Recommendation",icon:e.jsx(q,{className:"h-5 w-5 fill-primary-400"})},{channel:"Blog",icon:e.jsx(P,{className:"h-5 w-5 fill-primary-400"})},{channel:"Google / Search Engine",icon:e.jsx(D,{className:"h-5 w-5 fill-primary-400"})}];function s1({submitHandler:s}){const{register:a,setValue:i,watch:c,handleSubmit:r,unregister:o,control:m,formState:{isValid:d}}=y({resolver:v(R),defaultValues:{channels:[]}}),C=c("other");return l.useEffect(()=>{C?a("otherVal"):o("otherVal")},[a,o,C]),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"How did you hear about us?"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select all the applicable options"})]}),e.jsxs("form",{onSubmit:r(s),className:"space-y-5",children:[e.jsxs("div",{className:"grid w-full grid-cols-1 gap-[20px] md:grid-cols-2 xl:min-w-[700px]",children:[e.jsx(N,{control:m,name:"channels",render:({field:{onChange:n,value:x}})=>e.jsx(e.Fragment,{children:O.map((t,p)=>e.jsxs("div",{className:"flex items-center gap-1 rounded-md bg-theme-surface-primary pl-3",children:[e.jsx(g,{onCheckedChange:h=>{n(h?[...x,t.channel]:x.filter(f=>f!==t.channel))},value:t.channel,className:"h-3 w-3",id:t.channel}),e.jsxs("label",{className:"flex w-full items-center gap-1 py-3 pr-3 text-theme-text-secondary hover:cursor-pointer",htmlFor:t.channel,children:[t.icon,t.channel]})]},p))})}),e.jsxs("div",{className:"flex items-center rounded-md bg-theme-surface-primary pl-3",children:[e.jsx(g,{onCheckedChange:n=>i("other",!!n),...a("other",{value:!1}),className:"mr-2 h-3 w-3",id:"other"}),e.jsx("label",{className:"w-full py-3 pr-3 text-theme-text-secondary hover:cursor-pointer",htmlFor:"other",children:"Other (specify)"})]}),C&&e.jsx(w,{inputSize:"lg",...a("otherVal"),placeholder:"Specify...",className:"w-full border-theme-border-minimal"})]}),e.jsx(j,{disabled:!d,type:"submit",className:"w-full text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})})]})]})}export{e1 as A,l1 as P,s1 as a};
|