adminizer 4.6.0 → 4.7.0-build.221
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.
- package/Readme.md +12 -0
- package/assets/RelationDialogStack-CnHFOYyR.css +1 -0
- package/assets/RelationDialogStack-DI2bZxQX.js +20 -0
- package/assets/add-4213XScp.js +1 -0
- package/assets/add-group--F1XxfJ1.js +1 -0
- package/assets/add-group-form-DKRXC2n-.js +1 -0
- package/assets/add-user-b9HfMq7z.js +1 -0
- package/assets/add-user-form-UXAToWQd.js +1 -0
- package/assets/app-Clx8f5hd.css +1 -0
- package/assets/app-layout-C02ja4OI.js +1 -0
- package/assets/app-shell-D8wtkECO.js +1 -0
- package/assets/app-sidebar-BR5_zwxj.js +1 -0
- package/assets/app-sidebar-header-BZbIBQjq.js +1 -0
- package/assets/app.js +59 -7990
- package/assets/breadcrumbs-CODaqVkB.js +1 -0
- package/assets/catalog-6ZZjWdFs.js +6 -0
- package/assets/dashboard-CftAdKiH.js +3 -0
- package/assets/date-picker-DSOkNiNo.js +1 -0
- package/assets/del-modal-Cd4M7af8.js +1 -0
- package/assets/dynamic-controls-BsrJhPDY.js +1 -0
- package/assets/geo-json-CzR5JBXL.js +1 -0
- package/assets/handsontable-BI98OF5R.js +336 -0
- package/assets/history-DLHSU7Ak.js +1 -0
- package/assets/home-NcQ7nnU0.js +2 -0
- package/assets/icon-C2JNaLxH.js +1 -0
- package/assets/init-user-D2HSyXup.js +1 -0
- package/assets/input-error-CH2caTtO.js +1 -0
- package/assets/jsoneditor-DVNQmA6G.js +3869 -0
- package/assets/list-CFU0-TgN.js +4 -0
- package/assets/login-DFSLEO17.js +1 -0
- package/assets/manifest.json +246 -273
- package/assets/material-icon-Bx9pGQiQ.js +1 -0
- package/assets/media-manager-WcKe1EvD.js +6 -0
- package/assets/module-CT7PC6pc.js +1 -0
- package/assets/monaco-Bl4zdWCn.js +11 -0
- package/assets/nav-footer-BiSQkPt4.js +1 -0
- package/assets/nav-main-rTH0PfDw.js +1 -0
- package/assets/nav-user-Bj6cWs0a.js +1 -0
- package/assets/notification-Bi-PX87D.js +20 -0
- package/assets/pagination-render-AKJvTIRA.js +1 -0
- package/assets/register-BTP4uxsK.js +1 -0
- package/assets/ru-eW0WKkga.js +1 -0
- package/assets/theme-switcher-Dm8EOGzx.js +1 -0
- package/assets/toast-editor-DOg_gvSp.js +668 -0
- package/assets/user-filters-list-YUfR4XMI.js +1 -0
- package/assets/user-info-BgSbT02v.js +1 -0
- package/assets/user-menu-content-TQTXHIv6.js +1 -0
- package/assets/{vanilla-picker-l5rcX3cq.js → vanilla-picker-B3LgXoKV.js} +1 -7
- package/assets/welcome-vLwTu1R6.js +1 -0
- package/controllers/add.d.ts +1 -1
- package/controllers/add.js +20 -26
- package/controllers/addGroup.d.ts +1 -1
- package/controllers/addGroup.js +7 -15
- package/controllers/addUser.d.ts +1 -1
- package/controllers/addUser.js +10 -16
- package/controllers/catalog/Catalog.d.ts +1 -1
- package/controllers/catalog/Catalog.js +1 -10
- package/controllers/catalog/FrontendCatalogAdapter.d.ts +3 -3
- package/controllers/catalog/FrontendCatalogAdapter.js +0 -6
- package/controllers/catalog/FrontentCatalogAdapter.d.ts +3 -3
- package/controllers/catalog/FrontentCatalogAdapter.js +0 -4
- package/controllers/ckeditorUpload.js +2 -18
- package/controllers/dashboard.d.ts +1 -1
- package/controllers/dashboard.js +2 -5
- package/controllers/edit.js +24 -37
- package/controllers/editGroup.d.ts +1 -1
- package/controllers/editGroup.js +10 -21
- package/controllers/editUser.d.ts +1 -1
- package/controllers/editUser.js +11 -23
- package/controllers/exportData.d.ts +6 -0
- package/controllers/exportData.js +315 -0
- package/controllers/feed.d.ts +6 -0
- package/controllers/feed.js +73 -0
- package/controllers/feedback/feedbackController.d.ts +1 -1
- package/controllers/feedback/feedbackController.js +5 -7
- package/controllers/filter-fields/columns.d.ts +11 -0
- package/controllers/filter-fields/columns.js +106 -0
- package/controllers/filter-fields/filterFields.d.ts +10 -0
- package/controllers/filter-fields/filterFields.js +141 -0
- package/controllers/filter-fields/getAllUserFilters.d.ts +6 -0
- package/controllers/filter-fields/getAllUserFilters.js +115 -0
- package/controllers/filter-fields/groups.d.ts +5 -0
- package/controllers/filter-fields/groups.js +26 -0
- package/controllers/filter-fields/savedFilters.d.ts +25 -0
- package/controllers/filter-fields/savedFilters.js +317 -0
- package/controllers/getAllWidgets.d.ts +1 -1
- package/controllers/getAllWidgets.js +1 -9
- package/controllers/history-actions/HistoryController.js +6 -31
- package/controllers/initUser.js +6 -5
- package/controllers/inlineUpdate.d.ts +7 -0
- package/controllers/inlineUpdate.js +148 -0
- package/controllers/list.d.ts +1 -1
- package/controllers/list.js +383 -70
- package/controllers/listUserFilters.d.ts +5 -0
- package/controllers/listUserFilters.js +26 -0
- package/controllers/login.js +2 -2
- package/controllers/media-manager/mediaManagerApi.js +0 -9
- package/controllers/navigation/edit.js +3 -9
- package/controllers/notifications/NotificationController.d.ts +1 -1
- package/controllers/notifications/NotificationController.js +12 -36
- package/controllers/register.js +10 -9
- package/controllers/remove.js +10 -19
- package/controllers/timezones.d.ts +1 -1
- package/controllers/timezones.js +0 -6
- package/controllers/userApiKey.d.ts +7 -0
- package/controllers/userApiKey.js +36 -0
- package/controllers/view.js +14 -26
- package/controllers/welcome.d.ts +1 -1
- package/controllers/welcome.js +0 -4
- package/controllers/widgets/Action.d.ts +1 -1
- package/controllers/widgets/Action.js +1 -9
- package/controllers/widgets/Custom.d.ts +1 -1
- package/controllers/widgets/Custom.js +1 -9
- package/controllers/widgets/Info.d.ts +1 -1
- package/controllers/widgets/Info.js +1 -9
- package/controllers/widgets/filterInfo.d.ts +1 -0
- package/controllers/widgets/filterInfo.js +44 -0
- package/controllers/widgets/switch.d.ts +1 -1
- package/controllers/widgets/switch.js +1 -9
- package/controllers/widgetsDB.d.ts +1 -1
- package/controllers/widgetsDB.js +2 -8
- package/helpers/accessRightsHelper.d.ts +1 -1
- package/helpers/accessRightsHelper.js +5 -4
- package/helpers/apiKeyHelper.d.ts +5 -0
- package/helpers/apiKeyHelper.js +8 -0
- package/helpers/configHelper.js +12 -15
- package/helpers/controllerHelper.d.ts +14 -21
- package/helpers/controllerHelper.js +50 -83
- package/helpers/fieldsHelper.js +3 -3
- package/helpers/filterDatetimeHelper.d.ts +5 -0
- package/helpers/filterDatetimeHelper.js +84 -0
- package/helpers/inertiaActionsHelper.d.ts +2 -2
- package/helpers/inertiaActionsHelper.js +5 -4
- package/helpers/inertiaAddHelper.d.ts +3 -414
- package/helpers/inertiaAddHelper.js +39 -15
- package/helpers/inertiaGroupHelper.d.ts +2 -2
- package/helpers/inertiaGroupHelper.js +3 -3
- package/helpers/inertiaListHelper.d.ts +7 -3
- package/helpers/inertiaListHelper.js +26 -12
- package/helpers/inertiaMenuHelper.d.ts +1 -0
- package/helpers/inertiaMenuHelper.js +15 -3
- package/helpers/inertiaUserHelper.d.ts +3 -2
- package/helpers/inertiaUserHelper.js +7 -3
- package/helpers/menuHelper.d.ts +5 -2
- package/helpers/menuHelper.js +64 -12
- package/helpers/viteHelper.js +1 -2
- package/index.d.ts +6 -2
- package/index.js +6 -2
- package/interfaces/adminpanelConfig.d.ts +126 -39
- package/interfaces/internalModelAccess.d.ts +37 -0
- package/interfaces/internalModelAccess.js +1 -0
- package/interfaces/listQueryBuilder.d.ts +22 -0
- package/interfaces/listQueryBuilder.js +1 -0
- package/interfaces/queryCriteria.d.ts +54 -0
- package/interfaces/queryCriteria.js +1 -0
- package/interfaces/types.d.ts +1 -13
- package/lib/Adminizer.d.ts +4 -2
- package/lib/Adminizer.js +29 -10
- package/lib/DataAccessor.d.ts +8 -5
- package/lib/DataAccessor.js +89 -42
- package/lib/I18n.d.ts +5 -1
- package/lib/I18n.js +45 -19
- package/lib/MiddlewareManager.d.ts +8 -0
- package/lib/MiddlewareManager.js +53 -0
- package/lib/ai-assistant/OpenAiModelService.d.ts +3 -3
- package/lib/ai-assistant/OpenAiModelService.js +23 -24
- package/lib/catalog/Navigation.d.ts +1 -0
- package/lib/catalog/Navigation.js +12 -11
- package/lib/controls/jsoneditor/JsonEditor.d.ts +1 -2
- package/lib/controls/markdown/ToastUiEditor.d.ts +1 -2
- package/lib/feedback/FeedbackHandler.js +2 -2
- package/lib/filters/ConditionValidator.d.ts +107 -0
- package/lib/filters/ConditionValidator.js +483 -0
- package/lib/filters/CustomFilterHandler.d.ts +122 -0
- package/lib/filters/CustomFilterHandler.js +131 -0
- package/lib/filters/FilterCustomFieldHandler.d.ts +2 -0
- package/lib/filters/FilterCustomFieldHandler.js +2 -0
- package/lib/filters/FilterService.d.ts +82 -0
- package/lib/filters/FilterService.js +323 -0
- package/lib/filters/index.d.ts +6 -0
- package/lib/filters/index.js +4 -0
- package/lib/history-actions/AbstractHistoryAdapter.d.ts +5 -4
- package/lib/history-actions/AbstractHistoryAdapter.js +45 -30
- package/lib/history-actions/DefaultHistoryAdapter.d.ts +2 -0
- package/lib/history-actions/DefaultHistoryAdapter.js +12 -6
- package/lib/history-actions/HistoryHandler.js +1 -1
- package/lib/list-query-builder/ListQueryBuilder.d.ts +117 -0
- package/lib/list-query-builder/ListQueryBuilder.js +707 -0
- package/lib/media-manager/AbstractMediaManager.d.ts +9 -8
- package/lib/media-manager/DefaultMediaManager.d.ts +2 -0
- package/lib/media-manager/DefaultMediaManager.js +27 -15
- package/lib/media-manager/Items.d.ts +4 -1
- package/lib/media-manager/Items.js +62 -59
- package/lib/media-manager/MediaManagerHandler.js +1 -1
- package/lib/media-manager/helpers/MediaManagerHelper.d.ts +5 -1
- package/lib/media-manager/helpers/MediaManagerHelper.js +38 -4
- package/lib/model/AbstractModel.d.ts +33 -25
- package/lib/model/AbstractModel.js +54 -2
- package/lib/model/InternalModelAccessFactory.d.ts +18 -0
- package/lib/model/InternalModelAccessFactory.js +82 -0
- package/lib/model/ModelHandler.d.ts +6 -0
- package/lib/model/ModelHandler.js +14 -0
- package/lib/model/adapter/sequelize.d.ts +32 -10
- package/lib/model/adapter/sequelize.js +409 -62
- package/lib/model/adapter/typeorm.d.ts +62 -0
- package/lib/model/adapter/typeorm.js +777 -0
- package/lib/model/internalModelAccessToken.d.ts +1 -0
- package/lib/model/internalModelAccessToken.js +1 -0
- package/lib/model/internalModelRepository.d.ts +3 -0
- package/lib/model/internalModelRepository.js +4 -0
- package/lib/notifications/AbstractNotificationService.d.ts +3 -0
- package/lib/notifications/AbstractNotificationService.js +42 -36
- package/lib/notifications/GeneralNotificationService.js +37 -40
- package/lib/notifications/SystemNotificationService.js +33 -36
- package/lib/requestProcessor.js +0 -3
- package/lib/ui-i18n/getUiTranslations.d.ts +1 -0
- package/lib/ui-i18n/getUiTranslations.js +3 -0
- package/lib/ui-i18n/uiTranslationKeys.d.ts +6 -0
- package/lib/ui-i18n/uiTranslationKeys.js +268 -0
- package/lib/widgets/widgetHandler.d.ts +7 -2
- package/lib/widgets/widgetHandler.js +98 -18
- package/models/FilterAP.d.ts +116 -0
- package/models/FilterAP.js +68 -0
- package/models/FilterColumnAP.d.ts +32 -0
- package/models/FilterColumnAP.js +21 -0
- package/models/GroupAP.d.ts +1 -1
- package/models/HistoryActionsAP.d.ts +3 -3
- package/models/MediaManagerMetaAP.d.ts +1 -1
- package/models/NavigationAP.d.ts +1 -1
- package/models/UserAP.d.ts +6 -1
- package/models/UserAP.js +4 -0
- package/package.json +39 -32
- package/policies/authPolicies.d.ts +12 -0
- package/policies/authPolicies.js +104 -0
- package/policies/permissionResolvers.d.ts +12 -0
- package/policies/permissionResolvers.js +52 -0
- package/services/FeedService.d.ts +70 -0
- package/services/FeedService.js +334 -0
- package/system/Router.d.ts +1 -0
- package/system/Router.js +136 -59
- package/system/bindAccessRights.js +11 -30
- package/system/bindAuthorization.js +18 -18
- package/system/bindCors.js +16 -1
- package/system/bindCustomFilterHandlers.d.ts +2 -0
- package/system/bindCustomFilterHandlers.js +4 -0
- package/system/bindInertia.js +18 -61
- package/system/bindReqFunctions.js +10 -2
- package/system/bindTranslations.js +7 -3
- package/system/buildInternalModelAccess.d.ts +4 -0
- package/system/buildInternalModelAccess.js +59 -0
- package/system/defaults.js +18 -14
- package/system/routePolicies.d.ts +2 -0
- package/system/routePolicies.js +29 -0
- package/translations/en.json +151 -39
- package/translations/ru.json +211 -64
- package/ui/components/handsontable.js +13 -27
- package/ui/components/ui/dialog-stack.js +1 -3
- package/ui/components/ui/popover.js +1 -1
- package/ui/components/ui/sidebar.js +1 -1
- package/assets/RelationDialogStack-D9UVEF9s.js +0 -407
- package/assets/RelationDialogStack-DV8OITPR.css +0 -4
- package/assets/add-BlvzWQKF.js +0 -1
- package/assets/add-group-1Uoq9NWe.js +0 -1
- package/assets/add-group-form-B01gwDGu.js +0 -1
- package/assets/add-user-BQCAsaRy.js +0 -1
- package/assets/add-user-form-Cgwc9JkI.js +0 -1
- package/assets/app-DaOMy1nl.css +0 -72
- package/assets/app-layout-CAm60qoE.js +0 -1
- package/assets/app-shell-QWCtn9ye.js +0 -1
- package/assets/app-sidebar-CfaYbnSy.js +0 -1
- package/assets/app-sidebar-header-BsPFDhZ8.js +0 -1
- package/assets/breadcrumbs-CZZirDj8.js +0 -1
- package/assets/catalog-k5myk7fk.js +0 -6
- package/assets/dashboard-BkL9ybBw.js +0 -3
- package/assets/date-picker-B5AZ_7Q9.js +0 -1
- package/assets/del-modal-BoyXZloG.js +0 -1
- package/assets/dynamic-controls-k61T9W2P.js +0 -1
- package/assets/form-1WGY0YgG.js +0 -1
- package/assets/form-DJapG3qF.js +0 -1
- package/assets/geo-json-DsMUHo0l.js +0 -4
- package/assets/handsontable-PxYdjN8c.js +0 -298
- package/assets/history-CluyR-yJ.js +0 -1
- package/assets/home-Dug9zBzM.js +0 -2
- package/assets/icon-DfDLMG5f.js +0 -1
- package/assets/init-user-CF80MEnT.js +0 -1
- package/assets/input-error-DuuqFgZa.js +0 -1
- package/assets/jsoneditor-De1FvcYu.js +0 -3882
- package/assets/list-CuexshNt.js +0 -1
- package/assets/list-table-BsEWjTKY.js +0 -22
- package/assets/login-eDemYzN-.js +0 -1
- package/assets/material-icon-DMT8KdmE.js +0 -1
- package/assets/media-manager-DfYa_mT_.js +0 -14
- package/assets/module-Cd4Tm6uq.js +0 -1
- package/assets/monaco-BhBYtg3d.js +0 -11
- package/assets/nav-footer-D3olYxtz.js +0 -1
- package/assets/nav-main-BctqyzeV.js +0 -1
- package/assets/nav-user-Bn1Lt-BZ.js +0 -1
- package/assets/notification-D64qvni-.js +0 -27
- package/assets/pagination-render-DxD78ahJ.js +0 -1
- package/assets/register-349PwYbe.js +0 -1
- package/assets/theme-switcher-DfExsHW2.js +0 -1
- package/assets/toast-editor-ESK5iWPx.js +0 -845
- package/assets/user-info-DtBK5Kh8.js +0 -1
- package/assets/user-menu-content-0XYOCMaA.js +0 -1
- package/assets/welcome-PDp-gUei.js +0 -1
- package/controllers/form.d.ts +0 -1
- package/controllers/form.js +0 -86
- package/helpers/formHelper.d.ts +0 -6
- package/helpers/formHelper.js +0 -38
- package/helpers/inertiaFromHelper.d.ts +0 -11
- package/helpers/inertiaFromHelper.js +0 -98
- package/helpers/runtimeMode.d.ts +0 -1
- package/helpers/runtimeMode.js +0 -3
- package/lib/PolicyManager.d.ts +0 -8
- package/lib/PolicyManager.js +0 -53
- package/lib/datatable/NodeTable.d.ts +0 -49
- package/lib/datatable/NodeTable.js +0 -207
- package/lib/model/adapter/waterline.d.ts +0 -32
- package/lib/model/adapter/waterline.js +0 -180
- package/migrations/index.d.ts +0 -3
- package/migrations/index.js +0 -4
- package/migrations/knex/20250106000001_adminizer_init.d.ts +0 -8
- package/migrations/knex/20250106000001_adminizer_init.js +0 -164
- package/migrations/umzug/0001.d.ts +0 -7
- package/migrations/umzug/0001.js +0 -121
- package/migrations/umzugExports.d.ts +0 -2
- package/migrations/umzugExports.js +0 -9
- package/system/bindForms.d.ts +0 -2
- package/system/bindForms.js +0 -20
- /package/{policies → middlewares}/addMessages.d.ts +0 -0
- /package/{policies → middlewares}/addMessages.js +0 -0
- /package/{policies → middlewares}/checkAuth.d.ts +0 -0
- /package/{policies → middlewares}/checkAuth.js +0 -0
- /package/{policies → middlewares}/setLocale.d.ts +0 -0
- /package/{policies → middlewares}/setLocale.js +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c8 as g,E as Dl,an as Cl,ao as El,aA as Ue,ay as Me,b7 as Jr,ba as Qr,bb as es,b8 as ts,b9 as ns,y as cn,r as Ie,a_ as No,bX as K,aw as pr,a2 as Pl,a8 as Ol,a3 as Il,a4 as _n,ci as Ml,cc as Us,cf as kt,bt as zn,bM as Al,B as Rl,aY as kl,h as Nl,ae as Ll,am as Vl,j as jl,ah as Bl,ai as Fl,U as _l,X as zl,V as Hl,W as Nt}from"./app.js";import{A as $l}from"./app-layout-C02ja4OI.js";import{aZ as m,aX as z}from"./handsontable-BI98OF5R.js";import{a as Ul,r as Wl,d as Gl}from"./jsoneditor-DVNQmA6G.js";import ln from"./material-icon-Bx9pGQiQ.js";import{D as Kl}from"./del-modal-Cd4M7af8.js";import{A as Lt}from"./RelationDialogStack-DI2bZxQX.js";import"./monaco-Bl4zdWCn.js";import"./app-shell-D8wtkECO.js";import"./app-sidebar-BR5_zwxj.js";import"./nav-main-rTH0PfDw.js";import"./app-sidebar-header-BZbIBQjq.js";import"./breadcrumbs-CODaqVkB.js";import"./nav-user-Bj6cWs0a.js";import"./user-info-BgSbT02v.js";import"./user-menu-content-TQTXHIv6.js";import"./theme-switcher-Dm8EOGzx.js";import"./icon-C2JNaLxH.js";import"./dynamic-controls-BsrJhPDY.js";import"./input-error-CH2caTtO.js";var Lo=e=>{throw TypeError(e)},Vo=(e,t,n)=>t.has(e)||Lo("Cannot "+n),A=(e,t,n)=>(Vo(e,t,"read from private field"),n?n.call(e):t.get(e)),ce=(e,t,n)=>t.has(e)?Lo("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Fe=(e,t,n,r)=>(Vo(e,t,"write to private field"),t.set(e,n),n),Oe,ql=class{constructor(){ce(this,Oe),this.register=e=>{A(this,Oe).push(e)},this.unregister=e=>{for(;A(this,Oe).indexOf(e)!==-1;)A(this,Oe).splice(A(this,Oe).indexOf(e),1)},this.backendChanged=e=>{for(let t of A(this,Oe))t.backendChanged(e)},Fe(this,Oe,[])}};Oe=new WeakMap;var se,ht,ie,De,_e,gr,mr,vr,Kt,qt,ft,jo=class Xt{constructor(t,n,r){if(ce(this,se),ce(this,ht),ce(this,ie),ce(this,De),ce(this,_e),ce(this,gr,(s,i,o)=>{if(!o.backend)throw new Error(`You must specify a 'backend' property in your Backend entry: ${JSON.stringify(o)}`);let a=o.backend(s,i,o.options),c=o.id,u=!o.id&&a&&a.constructor;if(u&&(c=a.constructor.name),!c)throw new Error(`You must specify an 'id' property in your Backend entry: ${JSON.stringify(o)}
|
|
2
|
+
see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx`);if(u&&console.warn(`Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.
|
|
3
|
+
This might be unsupported in the future, please specify 'id' explicitely for every backend.`),A(this,ie)[c])throw new Error(`You must specify a unique 'id' property in your Backend entry:
|
|
4
|
+
${JSON.stringify(o)} (conflicts with: ${JSON.stringify(A(this,ie)[c])})`);return{id:c,instance:a,preview:o.preview??!1,transition:o.transition,skipDispatchOnTransition:o.skipDispatchOnTransition??!1}}),this.setup=()=>{if(!(typeof window>"u")){if(Xt.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");Xt.isSetUp=!0,A(this,mr).call(this,window),A(this,ie)[A(this,se)].instance.setup()}},this.teardown=()=>{typeof window>"u"||(Xt.isSetUp=!1,A(this,vr).call(this,window),A(this,ie)[A(this,se)].instance.teardown())},this.connectDragSource=(s,i,o)=>A(this,ft).call(this,"connectDragSource",s,i,o),this.connectDragPreview=(s,i,o)=>A(this,ft).call(this,"connectDragPreview",s,i,o),this.connectDropTarget=(s,i,o)=>A(this,ft).call(this,"connectDropTarget",s,i,o),this.profile=()=>A(this,ie)[A(this,se)].instance.profile(),this.previewEnabled=()=>A(this,ie)[A(this,se)].preview,this.previewsList=()=>A(this,ht),this.backendsList=()=>A(this,De),ce(this,mr,s=>{for(let i of A(this,De))i.transition&&s.addEventListener(i.transition.event,A(this,Kt))}),ce(this,vr,s=>{for(let i of A(this,De))i.transition&&s.removeEventListener(i.transition.event,A(this,Kt))}),ce(this,Kt,s=>{let i=A(this,se);if(A(this,De).some(o=>o.id!==A(this,se)&&o.transition&&o.transition.check(s)?(Fe(this,se,o.id),!0):!1),A(this,se)!==i){A(this,ie)[i].instance.teardown();for(let[u,l]of Object.entries(A(this,_e)))l.unsubscribe(),l.unsubscribe=A(this,qt).call(this,l.func,...l.args);A(this,ht).backendChanged(this);let o=A(this,ie)[A(this,se)];if(o.instance.setup(),o.skipDispatchOnTransition)return;let a=s.constructor,c=new a(s.type,s);s.target?.dispatchEvent(c)}}),ce(this,qt,(s,i,o,a)=>A(this,ie)[A(this,se)].instance[s](i,o,a)),ce(this,ft,(s,i,o,a)=>{let c=`${s}_${i}`,u=A(this,qt).call(this,s,i,o,a);return A(this,_e)[c]={func:s,args:[i,o,a],unsubscribe:u},()=>{A(this,_e)[c].unsubscribe(),delete A(this,_e)[c]}}),!r||!r.backends||r.backends.length<1)throw new Error(`You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)
|
|
5
|
+
see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx`);Fe(this,ht,new ql),Fe(this,ie,{}),Fe(this,De,[]);for(let s of r.backends){let i=A(this,gr).call(this,t,n,s);A(this,ie)[i.id]=i,A(this,De).push(i)}Fe(this,se,A(this,De)[0].id),Fe(this,_e,{})}};se=new WeakMap,ht=new WeakMap,ie=new WeakMap,De=new WeakMap,_e=new WeakMap,gr=new WeakMap,mr=new WeakMap,vr=new WeakMap,Kt=new WeakMap,qt=new WeakMap,ft=new WeakMap,jo.isSetUp=!1;var Xl=jo,Yl=(e,t,n)=>new Xl(e,t,n),Bo=(e,t)=>({event:e,check:t}),Zl=Bo("touchstart",e=>{let t=e;return t.touches!==null&&t.touches!==void 0}),Jl=Bo("pointerdown",e=>e.pointerType==="mouse");const Fo=m.createContext({dragDropManager:void 0});function ae(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Ws=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Gs=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ks={INIT:"@@redux/INIT"+Gs(),REPLACE:"@@redux/REPLACE"+Gs()};function Ql(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function _o(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ae(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ae(1));return n(_o)(e,t)}if(typeof e!="function")throw new Error(ae(2));var s=e,i=t,o=[],a=o,c=!1;function u(){a===o&&(a=o.slice())}function l(){if(c)throw new Error(ae(3));return i}function d(v){if(typeof v!="function")throw new Error(ae(4));if(c)throw new Error(ae(5));var y=!0;return u(),a.push(v),function(){if(y){if(c)throw new Error(ae(6));y=!1,u();var T=a.indexOf(v);a.splice(T,1),o=null}}}function h(v){if(!Ql(v))throw new Error(ae(7));if(typeof v.type>"u")throw new Error(ae(8));if(c)throw new Error(ae(9));try{c=!0,i=s(i,v)}finally{c=!1}for(var y=o=a,b=0;b<y.length;b++){var T=y[b];T()}return v}function p(v){if(typeof v!="function")throw new Error(ae(10));s=v,h({type:Ks.REPLACE})}function f(){var v,y=d;return v={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(ae(11));function w(){T.next&&T.next(l())}w();var S=y(w);return{unsubscribe:S}}},v[Ws]=function(){return this},v}return h({type:Ks.INIT}),r={dispatch:h,subscribe:d,getState:l,replaceReducer:p},r[Ws]=f,r}function k(e,t,...n){if(eu()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let r;if(t===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;r=new Error(t.replace(/%s/g,function(){return n[s++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function eu(){return typeof process<"u"&&!0}function tu(e,t,n){return t.split(".").reduce((r,s)=>r&&r[s]?r[s]:n||null,e)}function nu(e,t){return e.filter(n=>n!==t)}function zo(e){return typeof e=="object"}function ru(e,t){const n=new Map,r=i=>{n.set(i,n.has(i)?n.get(i)+1:1)};e.forEach(r),t.forEach(r);const s=[];return n.forEach((i,o)=>{i===1&&s.push(o)}),s}function su(e,t){return e.filter(n=>t.indexOf(n)>-1)}const rs="dnd-core/INIT_COORDS",Tn="dnd-core/BEGIN_DRAG",ss="dnd-core/PUBLISH_DRAG_SOURCE",wn="dnd-core/HOVER",Sn="dnd-core/DROP",Dn="dnd-core/END_DRAG";function qs(e,t){return{type:rs,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const iu={type:rs,payload:{clientOffset:null,sourceClientOffset:null}};function ou(e){return function(n=[],r={publishSource:!0}){const{publishSource:s=!0,clientOffset:i,getSourceClientOffset:o}=r,a=e.getMonitor(),c=e.getRegistry();e.dispatch(qs(i)),au(n,a,c);const u=uu(n,a);if(u==null){e.dispatch(iu);return}let l=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");cu(o),l=o(u)}e.dispatch(qs(i,l));const h=c.getSource(u).beginDrag(a,u);if(h==null)return;lu(h),c.pinSource(u);const p=c.getSourceType(u);return{type:Tn,payload:{itemType:p,item:h,sourceId:u,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!s}}}}function au(e,t,n){k(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(r){k(n.getSource(r),"Expected sourceIds to be registered.")})}function cu(e){k(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function lu(e){k(zo(e),"Item must be an object.")}function uu(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function du(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){du(e,s,n[s])})}return e}function fu(e){return function(n={}){const r=e.getMonitor(),s=e.getRegistry();pu(r),vu(r).forEach((o,a)=>{const c=gu(o,a,s,r),u={type:Sn,payload:{dropResult:hu({},n,c)}};e.dispatch(u)})}}function pu(e){k(e.isDragging(),"Cannot call drop while not dragging."),k(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function gu(e,t,n,r){const s=n.getTarget(e);let i=s?s.drop(r,e):void 0;return mu(i),typeof i>"u"&&(i=t===0?{}:r.getDropResult()),i}function mu(e){k(typeof e>"u"||zo(e),"Drop result must either be an object or undefined.")}function vu(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function yu(e){return function(){const n=e.getMonitor(),r=e.getRegistry();bu(n);const s=n.getSourceId();return s!=null&&(r.getSource(s,!0).endDrag(n,s),r.unpinSource()),{type:Dn}}}function bu(e){k(e.isDragging(),"Cannot call endDrag while not dragging.")}function yr(e,t){return t===null?e===null:Array.isArray(e)?e.some(n=>n===t):e===t}function xu(e){return function(n,{clientOffset:r}={}){Tu(n);const s=n.slice(0),i=e.getMonitor(),o=e.getRegistry(),a=i.getItemType();return Su(s,o,a),wu(s,i,o),Du(s,i,o),{type:wn,payload:{targetIds:s,clientOffset:r||null}}}}function Tu(e){k(Array.isArray(e),"Expected targetIds to be an array.")}function wu(e,t,n){k(t.isDragging(),"Cannot call hover while not dragging."),k(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const s=e[r];k(e.lastIndexOf(s)===r,"Expected targetIds to be unique in the passed array.");const i=n.getTarget(s);k(i,"Expected targetIds to be registered.")}}function Su(e,t,n){for(let r=e.length-1;r>=0;r--){const s=e[r],i=t.getTargetType(s);yr(i,n)||e.splice(r,1)}}function Du(e,t,n){e.forEach(function(r){n.getTarget(r).hover(t,r)})}function Cu(e){return function(){if(e.getMonitor().isDragging())return{type:ss}}}function Eu(e){return{beginDrag:ou(e),publishDragSource:Cu(e),hover:xu(e),drop:fu(e),endDrag:yu(e)}}class Pu{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:n}=this.store;function r(i){return(...o)=>{const a=i.apply(t,o);typeof a<"u"&&n(a)}}const s=Eu(this);return Object.keys(s).reduce((i,o)=>{const a=s[o];return i[o]=r(a),i},{})}dispatch(t){this.store.dispatch(t)}constructor(t,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}}function Ou(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ho(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Iu(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:Ho(Ou(t,r),n)}function Mu(e){const{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:Ho(t,n)}const gt=[],is=[];gt.__IS_NONE__=!0;is.__IS_ALL__=!0;function Au(e,t){return e===gt?!1:e===is||typeof t>"u"?!0:su(t,e).length>0}class Ru{subscribeToStateChange(t,n={}){const{handlerIds:r}=n;k(typeof t=="function","listener must be a function."),k(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const i=()=>{const o=this.store.getState(),a=o.stateId;try{a===s||a===s+1&&!Au(o.dirtyHandlerIds,r)||t()}finally{s=a}};return this.store.subscribe(i)}subscribeToOffsetChange(t){k(typeof t=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const s=this.store.getState().dragOffset;s!==n&&(n=s,t())};return this.store.subscribe(r)}canDragSource(t){if(!t)return!1;const n=this.registry.getSource(t);return k(n,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:n.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const n=this.registry.getTarget(t);if(k(n,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(t),s=this.getItemType();return yr(r,s)&&n.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const n=this.registry.getSource(t,!0);if(k(n,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(t),s=this.getItemType();return r!==s?!1:n.isDragging(this,t)}isOverTarget(t,n={shallow:!1}){if(!t)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const s=this.registry.getTargetType(t),i=this.getItemType();if(i&&!yr(s,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const a=o.indexOf(t);return r?a===o.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Iu(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Mu(this.store.getState().dragOffset)}constructor(t,n){this.store=t,this.registry=n}}const Xs=typeof global<"u"?global:self,$o=Xs.MutationObserver||Xs.WebKitMutationObserver;function Uo(e){return function(){const n=setTimeout(s,0),r=setInterval(s,50);function s(){clearTimeout(n),clearInterval(r),e()}}}function ku(e){let t=1;const n=new $o(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const Nu=typeof $o=="function"?ku:Uo;class Lu{enqueueTask(t){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const n=this.index;if(this.index++,t[n].call(),this.index>this.capacity){for(let r=0,s=t.length-this.index;r<s;r++)t[r]=t[r+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Nu(this.flush),this.requestErrorThrow=Uo(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Vu{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,n){this.onError=t,this.release=n,this.task=null}}class ju{create(t){const n=this.freeTasks,r=n.length?n.pop():new Vu(this.onError,s=>n[n.length]=s);return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}const Wo=new Lu,Bu=new ju(Wo.registerPendingError);function Fu(e){Wo.enqueueTask(Bu.create(e))}const os="dnd-core/ADD_SOURCE",as="dnd-core/ADD_TARGET",cs="dnd-core/REMOVE_SOURCE",Cn="dnd-core/REMOVE_TARGET";function _u(e){return{type:os,payload:{sourceId:e}}}function zu(e){return{type:as,payload:{targetId:e}}}function Hu(e){return{type:cs,payload:{sourceId:e}}}function $u(e){return{type:Cn,payload:{targetId:e}}}function Uu(e){k(typeof e.canDrag=="function","Expected canDrag to be a function."),k(typeof e.beginDrag=="function","Expected beginDrag to be a function."),k(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Wu(e){k(typeof e.canDrop=="function","Expected canDrop to be a function."),k(typeof e.hover=="function","Expected hover to be a function."),k(typeof e.drop=="function","Expected beginDrag to be a function.")}function br(e,t){if(t&&Array.isArray(e)){e.forEach(n=>br(n,!1));return}k(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var le;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(le||(le={}));let Gu=0;function Ku(){return Gu++}function qu(e){const t=Ku().toString();switch(e){case le.SOURCE:return`S${t}`;case le.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Ys(e){switch(e[0]){case"S":return le.SOURCE;case"T":return le.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Zs(e,t){const n=e.entries();let r=!1;do{const{done:s,value:[,i]}=n.next();if(i===t)return!0;r=!!s}while(!r);return!1}class Xu{addSource(t,n){br(t),Uu(n);const r=this.addHandler(le.SOURCE,t,n);return this.store.dispatch(_u(r)),r}addTarget(t,n){br(t,!0),Wu(n);const r=this.addHandler(le.TARGET,t,n);return this.store.dispatch(zu(r)),r}containsHandler(t){return Zs(this.dragSources,t)||Zs(this.dropTargets,t)}getSource(t,n=!1){return k(this.isSourceId(t),"Expected a valid source ID."),n&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return k(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return k(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return k(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Ys(t)===le.SOURCE}isTargetId(t){return Ys(t)===le.TARGET}removeSource(t){k(this.getSource(t),"Expected an existing source."),this.store.dispatch(Hu(t)),Fu(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){k(this.getTarget(t),"Expected an existing target."),this.store.dispatch($u(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const n=this.getSource(t);k(n,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=n}unpinSource(){k(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,n,r){const s=qu(t);return this.types.set(s,n),t===le.SOURCE?this.dragSources.set(s,r):t===le.TARGET&&this.dropTargets.set(s,r),s}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const Yu=(e,t)=>e===t;function Zu(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Ju(e,t,n=Yu){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function Qu(e=gt,t){switch(t.type){case wn:break;case os:case as:case Cn:case cs:return gt;case Tn:case ss:case Dn:case Sn:default:return is}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,s=ru(n,r);if(!(s.length>0||!Ju(n,r)))return gt;const o=r[r.length-1],a=n[n.length-1];return o!==a&&(o&&s.push(o),a&&s.push(a)),s}function ed(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function td(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){ed(e,s,n[s])})}return e}const Js={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function nd(e=Js,t){const{payload:n}=t;switch(t.type){case rs:case Tn:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case wn:return Zu(e.clientOffset,n.clientOffset)?e:td({},e,{clientOffset:n.clientOffset});case Dn:case Sn:return Js;default:return e}}function rd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){rd(e,s,n[s])})}return e}const sd={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function id(e=sd,t){const{payload:n}=t;switch(t.type){case Tn:return Ye({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case ss:return Ye({},e,{isSourcePublic:!0});case wn:return Ye({},e,{targetIds:n.targetIds});case Cn:return e.targetIds.indexOf(n.targetId)===-1?e:Ye({},e,{targetIds:nu(e.targetIds,n.targetId)});case Sn:return Ye({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Dn:return Ye({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function od(e=0,t){switch(t.type){case os:case as:return e+1;case cs:case Cn:return e-1;default:return e}}function ad(e=0){return e+1}function cd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ld(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){cd(e,s,n[s])})}return e}function ud(e={},t){return{dirtyHandlerIds:Qu(e.dirtyHandlerIds,{type:t.type,payload:ld({},t.payload,{prevTargetIds:tu(e,"dragOperation.targetIds",[])})}),dragOffset:nd(e.dragOffset,t),refCount:od(e.refCount,t),dragOperation:id(e.dragOperation,t),stateId:ad(e.stateId)}}function dd(e,t=void 0,n={},r=!1){const s=hd(r),i=new Ru(s,new Xu(s)),o=new Pu(s,i),a=e(o,t,n);return o.receiveBackend(a),o}function hd(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return _o(ud,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function fd(e,t){if(e==null)return{};var n=pd(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pd(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}let Qs=0;const Yt=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var gd=m.memo(function(t){var{children:n}=t,r=fd(t,["children"]);const[s,i]=md(r);return m.useEffect(()=>{if(i){const o=Go();return++Qs,()=>{--Qs===0&&(o[Yt]=null)}}},[]),g.jsx(Fo.Provider,{value:s,children:n})});function md(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=vd(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}function vd(e,t=Go(),n,r){const s=t;return s[Yt]||(s[Yt]={dragDropManager:dd(e,t,n,r)}),s[Yt]}function Go(){return typeof global<"u"?global:window}var yd=Wl();const bd=Ul(yd),Xe=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Ko(e,t,n){const[r,s]=m.useState(()=>t(e)),i=m.useCallback(()=>{const o=t(e);bd(r,o)||(s(o),n&&n())},[r,e,n]);return Xe(i),[r,i]}function xd(e,t,n){const[r,s]=Ko(e,t,n);return Xe(function(){const o=e.getHandlerId();if(o!=null)return e.subscribeToStateChange(s,{handlerIds:[o]})},[e,s]),r}function qo(e,t,n){return xd(t,e||(()=>({})),()=>n.reconnect())}function Xo(e,t){const n=[];return typeof e!="function"&&n.push(e),m.useMemo(()=>typeof e=="function"?e():e,n)}function Td(e){return m.useMemo(()=>e.hooks.dragSource(),[e])}function wd(e){return m.useMemo(()=>e.hooks.dragPreview(),[e])}let Hn=!1,$n=!1;class Sd{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){k(!Hn,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Hn=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Hn=!1}}isDragging(){if(!this.sourceId)return!1;k(!$n,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return $n=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{$n=!1}}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,n){return this.internalMonitor.isOverTarget(t,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Un=!1;class Dd{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}canDrop(){if(!this.targetId)return!1;k(!Un,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Un=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Un=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function Cd(e,t,n){const r=n.getRegistry(),s=r.addTarget(e,t);return[s,()=>r.removeTarget(s)]}function Ed(e,t,n){const r=n.getRegistry(),s=r.addSource(e,t);return[s,()=>r.removeSource(s)]}function xr(e,t,n,r){let s;if(s!==void 0)return!!s;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<i.length;c++){const u=i[c];if(!a(u))return!1;const l=e[u],d=t[u];if(s=void 0,s===!1||s===void 0&&l!==d)return!1}return!0}function Tr(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pd(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function Od(e){return(t=null,n=null)=>{if(!m.isValidElement(t)){const i=t;return e(i,n),i}const r=t;return Pd(r),Id(r,n?i=>e(i,n):e)}}function Yo(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const s=Od(r);t[n]=()=>s}}),t}function ei(e,t){typeof e=="function"?e(t):e.current=t}function Id(e,t){const n=e.ref;return k(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?m.cloneElement(e,{ref:r=>{ei(n,r),ei(t,r)}}):m.cloneElement(e,{ref:t})}class Md{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?t?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),n):(this.lastConnectedDragSource=t,n):n}reconnectDragPreview(t=!1){const n=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!xr(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!xr(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=Yo({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,Tr(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,Tr(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class Ad{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!xr(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=Yo({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,Tr(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function Ee(){const{dragDropManager:e}=m.useContext(Fo);return k(e!=null,"Expected drag drop context"),e}function Rd(e,t){const n=Ee(),r=m.useMemo(()=>new Md(n.getBackend()),[n]);return Xe(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),Xe(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function kd(){const e=Ee();return m.useMemo(()=>new Sd(e),[e])}class Nd{beginDrag(){const t=this.spec,n=this.monitor;let r=null;return typeof t.item=="object"?r=t.item:typeof t.item=="function"?r=t.item(n):r={},r??null}canDrag(){const t=this.spec,n=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(n):!0}isDragging(t,n){const r=this.spec,s=this.monitor,{isDragging:i}=r;return i?i(s):n===t.getSourceId()}endDrag(){const t=this.spec,n=this.monitor,r=this.connector,{end:s}=t;s&&s(n.getItem(),n),r.reconnect()}constructor(t,n,r){this.spec=t,this.monitor=n,this.connector=r}}function Ld(e,t,n){const r=m.useMemo(()=>new Nd(e,t,n),[t,n]);return m.useEffect(()=>{r.spec=e},[e]),r}function Vd(e){return m.useMemo(()=>{const t=e.type;return k(t!=null,"spec.type must be defined"),t},[e])}function jd(e,t,n){const r=Ee(),s=Ld(e,t,n),i=Vd(e);Xe(function(){if(i!=null){const[a,c]=Ed(i,s,r);return t.receiveHandlerId(a),n.receiveHandlerId(a),c}},[r,t,n,s,i])}function Bd(e,t){const n=Xo(e);k(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=kd(),s=Rd(n.options,n.previewOptions);return jd(n,r,s),[qo(n.collect,r,s),Td(s),wd(s)]}function Fd(e){const n=Ee().getMonitor(),[r,s]=Ko(n,e);return m.useEffect(()=>n.subscribeToOffsetChange(s)),m.useEffect(()=>n.subscribeToStateChange(s)),r}function _d(e){return m.useMemo(()=>e.hooks.dropTarget(),[e])}function zd(e){const t=Ee(),n=m.useMemo(()=>new Ad(t.getBackend()),[t]);return Xe(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Hd(){const e=Ee();return m.useMemo(()=>new Dd(e),[e])}function $d(e){const{accept:t}=e;return m.useMemo(()=>(k(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class Ud{canDrop(){const t=this.spec,n=this.monitor;return t.canDrop?t.canDrop(n.getItem(),n):!0}hover(){const t=this.spec,n=this.monitor;t.hover&&t.hover(n.getItem(),n)}drop(){const t=this.spec,n=this.monitor;if(t.drop)return t.drop(n.getItem(),n)}constructor(t,n){this.spec=t,this.monitor=n}}function Wd(e,t){const n=m.useMemo(()=>new Ud(e,t),[t]);return m.useEffect(()=>{n.spec=e},[e]),n}function Gd(e,t,n){const r=Ee(),s=Wd(e,t),i=$d(e);Xe(function(){const[a,c]=Cd(i,s,r);return t.receiveHandlerId(a),n.receiveHandlerId(a),c},[r,t,s,n,i.map(o=>o.toString()).join("|")])}function Zo(e,t){const n=Xo(e),r=Hd(),s=zd(n.options);return Gd(n,r,s),[qo(n.collect,r,s),_d(s)]}function Jo(e){let t=null;return()=>(t==null&&(t=e()),t)}function Kd(e,t){return e.filter(n=>n!==t)}function qd(e,t){const n=new Set,r=i=>n.add(i);e.forEach(r),t.forEach(r);const s=[];return n.forEach(i=>s.push(i)),s}class Xd{enter(t){const n=this.entered.length,r=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(t));return this.entered=qd(this.entered.filter(r),[t]),n===0&&this.entered.length>0}leave(t){const n=this.entered.length;return this.entered=Kd(this.entered.filter(this.isNodeInDocument),t),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class Yd{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const s=this.config.exposeProperties[r];s!=null&&(n[r]={value:s(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,n){return n===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Qo="__NATIVE_FILE__",ea="__NATIVE_URL__",ta="__NATIVE_TEXT__",na="__NATIVE_HTML__",ti=Object.freeze(Object.defineProperty({__proto__:null,FILE:Qo,HTML:na,TEXT:ta,URL:ea},Symbol.toStringTag,{value:"Module"}));function Wn(e,t,n){const r=t.reduce((s,i)=>s||e.getData(i),"");return r??n}const wr={[Qo]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[na]:{exposeProperties:{html:(e,t)=>Wn(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[ea]:{exposeProperties:{urls:(e,t)=>Wn(e,t,"").split(`
|
|
6
|
+
`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[ta]:{exposeProperties:{text:(e,t)=>Wn(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Zd(e,t){const n=wr[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new Yd(n);return r.loadDataTransfer(t),r}function Gn(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(wr).filter(n=>{const r=wr[n];return r?.matchesTypes?r.matchesTypes.some(s=>t.indexOf(s)>-1):!1})[0]||null}const Jd=Jo(()=>/firefox/i.test(navigator.userAgent)),ra=Jo(()=>!!window.safari);class ni{interpolate(t){const{xs:n,ys:r,c1s:s,c2s:i,c3s:o}=this;let a=n.length-1;if(t===n[a])return r[a];let c=0,u=o.length-1,l;for(;c<=u;){l=Math.floor(.5*(c+u));const p=n[l];if(p<t)c=l+1;else if(p>t)u=l-1;else return r[l]}a=Math.max(0,u);const d=t-n[a],h=d*d;return r[a]+s[a]*d+i[a]*h+o[a]*d*h}constructor(t,n){const{length:r}=t,s=[];for(let p=0;p<r;p++)s.push(p);s.sort((p,f)=>t[p]<t[f]?-1:1);const i=[],o=[];let a,c;for(let p=0;p<r-1;p++)a=t[p+1]-t[p],c=n[p+1]-n[p],i.push(a),o.push(c/a);const u=[o[0]];for(let p=0;p<i.length-1;p++){const f=o[p],v=o[p+1];if(f*v<=0)u.push(0);else{a=i[p];const y=i[p+1],b=a+y;u.push(3*b/((b+y)/f+(b+a)/v))}}u.push(o[o.length-1]);const l=[],d=[];let h;for(let p=0;p<u.length-1;p++){h=o[p];const f=u[p],v=1/i[p],y=f+u[p+1]-h-h;l.push((h-f-y)*v),d.push(y*v*v)}this.xs=t,this.ys=n,this.c1s=u,this.c2s=l,this.c3s=d}}const Qd=1;function sa(e){const t=e.nodeType===Qd?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Vt(e){return{x:e.clientX,y:e.clientY}}function eh(e){var t;return e.nodeName==="IMG"&&(Jd()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function th(e,t,n,r){let s=e?t.width:n,i=e?t.height:r;return ra()&&e&&(i/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:i}}function nh(e,t,n,r,s){const i=eh(t),a=sa(i?e:t),c={x:n.x-a.x,y:n.y-a.y},{offsetWidth:u,offsetHeight:l}=e,{anchorX:d,anchorY:h}=r,{dragPreviewWidth:p,dragPreviewHeight:f}=th(i,t,u,l),v=()=>{let R=new ni([0,.5,1],[c.y,c.y/l*f,c.y+f-l]).interpolate(h);return ra()&&i&&(R+=(window.devicePixelRatio-1)*f),R},y=()=>new ni([0,.5,1],[c.x,c.x/u*p,c.x+p-u]).interpolate(d),{offsetX:b,offsetY:T}=s,w=b===0||b,S=T===0||T;return{x:w?b:y(),y:S?T:v()}}let rh=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,n){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=n}};function sh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ri(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){sh(e,s,n[s])})}return e}class ih{profile(){var t,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,n,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,n),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,n,r){this.sourceNodes.set(t,n),this.sourceNodeOptions.set(t,r);const s=o=>this.handleDragStart(o,t),i=o=>this.handleSelectStart(o);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",s),n.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),n.removeEventListener("dragstart",s),n.removeEventListener("selectstart",i),n.setAttribute("draggable","false")}}connectDropTarget(t,n){const r=o=>this.handleDragEnter(o,t),s=o=>this.handleDragOver(o,t),i=o=>this.handleDrop(o,t);return n.addEventListener("dragenter",r),n.addEventListener("dragover",s),n.addEventListener("drop",i),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",s),n.removeEventListener("drop",i)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(t);return ri({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(t);return ri({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(ti).some(n=>ti[n]===t)}beginDragNativeItem(t,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=Zd(t,n),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,n){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(t,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(t,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(t,n){this.dropTargetIds.unshift(n)}constructor(t,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&sa(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const o=Vt(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:o});const{dataTransfer:a}=s,c=Gn(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const l=this.monitor.getSourceId(),d=this.sourceNodes.get(l),h=this.sourcePreviewNodes.get(l)||d;if(h){const{anchorX:p,anchorY:f,offsetX:v,offsetY:y}=this.getCurrentSourcePreviewNodeOptions(),w=nh(d,h,o,{anchorX:p,anchorY:f},{offsetX:v,offsetY:y});a.setDragImage(h,w.x,w.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(a&&!a.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:a}=s,c=Gn(a);c&&this.beginDragNativeItem(c,a)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,i.length>0&&this.actions.hover(i,{clientOffset:Vt(s)}),i.some(a=>this.monitor.canDropOnTarget(a))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=Vt(s),this.scheduleHover(i),(i||[]).some(a=>this.monitor.canDropOnTarget(a))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;s.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}else Gn(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:Vt(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const i=s.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(s.preventDefault(),i.dragDrop()))},this.options=new rh(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new Xd(this.isNodeInDocument)}}let jt;function oh(){return jt||(jt=new Image,jt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),jt}const ah=function(t,n,r){return new ih(t,n,r)};var Re;(function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"})(Re||(Re={}));class ch{get delay(){var t;return(t=this.args.delay)!==null&&t!==void 0?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return(t=this.args.ignoreContextMenu)!==null&&t!==void 0?t:!1}get enableHoverOutsideTarget(){var t;return(t=this.args.enableHoverOutsideTarget)!==null&&t!==void 0?t:!1}get enableKeyboardEvents(){var t;return(t=this.args.enableKeyboardEvents)!==null&&t!==void 0?t:!1}get enableMouseEvents(){var t;return(t=this.args.enableMouseEvents)!==null&&t!==void 0?t:!1}get enableTouchEvents(){var t;return(t=this.args.enableTouchEvents)!==null&&t!==void 0?t:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,n,r,s;return(s=(r=(t=this.args)===null||t===void 0?void 0:t.delayTouchStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&s!==void 0?s:0}get delayMouseStart(){var t,n,r,s;return(s=(r=(t=this.args)===null||t===void 0?void 0:t.delayMouseStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&s!==void 0?s:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var t;if(!((t=this.context)===null||t===void 0)&&t.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var t;return((t=this.args)===null||t===void 0?void 0:t.rootElement)||this.document}constructor(t,n){this.args=t,this.context=n}}function lh(e,t,n,r){return Math.sqrt(Math.pow(Math.abs(n-e),2)+Math.pow(Math.abs(r-t),2))}function uh(e,t,n,r,s){if(!s)return!1;const i=Math.atan2(r-t,n-e)*180/Math.PI+180;for(let o=0;o<s.length;++o){const a=s[o];if(a&&(a.start==null||i>=a.start)&&(a.end==null||i<=a.end))return!0}return!1}const dh={Left:1},hh={Left:0};function Kn(e){return e.button===void 0||e.button===hh.Left}function fh(e){return e.buttons===void 0||(e.buttons&dh.Left)===0}function ia(e){return!!e.targetTouches}const ph=1;function gh(e){const t=e.nodeType===ph?e:e.parentElement;if(!t)return;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function mh(e,t){if(e.targetTouches.length===1)return un(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return un(e.touches[0])}function un(e,t){return ia(e)?mh(e,t):{x:e.clientX,y:e.clientY}}const si=(()=>{let e=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return e=!0,!0}}))}catch{}return e})(),ct={[Re.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[Re.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[Re.keyboard]:{keydown:"keydown"}};class mt{profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;t&&(k(!mt.isSetUp,"Cannot have two Touch backends at the same time."),mt.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;t&&(mt.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,n,r,s=!1){const i=si?{capture:s,passive:!1}:s;this.listenerTypes.forEach(function(o){const a=ct[o][n];a&&t.addEventListener(a,r,i)})}removeEventListener(t,n,r,s=!1){const i=si?{capture:s,passive:!1}:s;this.listenerTypes.forEach(function(o){const a=ct[o][n];a&&t.removeEventListener(a,r,i)})}connectDragSource(t,n){const r=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,n),this.addEventListener(n,"start",r),()=>{this.sourceNodes.delete(t),this.removeEventListener(n,"start",r)}}connectDragPreview(t,n,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,n),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,n){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const s=i=>{if(!this.document||!r||!this.monitor.isDragging())return;let o;switch(i.type){case ct.mouse.move:o={x:i.clientX,y:i.clientY};break;case ct.touch.move:var a,c;o={x:((a=i.touches[0])===null||a===void 0?void 0:a.clientX)||0,y:((c=i.touches[0])===null||c===void 0?void 0:c.clientY)||0};break}const u=o!=null?this.document.elementFromPoint(o.x,o.y):void 0,l=u&&n.contains(u);if(u===n||l)return this.handleMove(i,t)};return this.addEventListener(this.document.body,"move",s),this.targetNodes.set(t,n),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",s))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!t||!t.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,n,r){this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&gh(i)},this.handleTopMoveStartCapture=s=>{Kn(s)&&(this.moveStartSourceIds=[])},this.handleMoveStart=s=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(s)},this.handleTopMoveStart=s=>{if(!Kn(s))return;const i=un(s);i&&(ia(s)&&(this.lastTargetTouchFallback=s.targetTouches[0]),this._mouseClientOffset=i),this.waitingForDelay=!1},this.handleTopMoveStartDelay=s=>{if(!Kn(s))return;const i=s.type===ct.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,s),i),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(s,i)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(i)},this.handleTopMove=s=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:i,dragOverTargetIds:o}=this,a=this.options.enableHoverOutsideTarget,c=un(s,this.lastTargetTouchFallback);if(!c)return;if(this._isScrolling||!this.monitor.isDragging()&&uh(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,c.x,c.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&i&&lh(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,c.x,c.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(i,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const u=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(u),this.actions.publishDragSource(),s.cancelable&&s.preventDefault();const l=(o||[]).map(f=>this.targetNodes.get(f)).filter(f=>!!f),d=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(c.x,c.y,l):this.document.elementsFromPoint(c.x,c.y),h=[];for(const f in d){if(!d.hasOwnProperty(f))continue;let v=d[f];for(v!=null&&h.push(v);v;)v=v.parentElement,v&&h.indexOf(v)===-1&&h.push(v)}const p=h.filter(f=>l.indexOf(f)>-1).map(f=>this._getDropTargetId(f)).filter(f=>!!f).filter((f,v,y)=>y.indexOf(f)===v);if(a)for(const f in this.targetNodes){const v=this.targetNodes.get(f);if(u&&v&&v.contains(u)&&p.indexOf(f)===-1){p.unshift(f);break}}p.reverse(),this.actions.hover(p,{clientOffset:c})},this._getDropTargetId=s=>{const i=this.targetNodes.keys();let o=i.next();for(;o.done===!1;){const a=o.value;if(s===this.targetNodes.get(a))return a;o=i.next()}},this.handleTopMoveEndCapture=s=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!fh(s)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}s.cancelable&&s.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=s=>{s.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new ch(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Re.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Re.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Re.keyboard)}}const vh=function(t,n={},r={}){return new mt(t,n,r)};var We=[],yh=function(){return We.some(function(e){return e.activeTargets.length>0})},bh=function(){return We.some(function(e){return e.skippedTargets.length>0})},ii="ResizeObserver loop completed with undelivered notifications.",xh=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:ii}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=ii),window.dispatchEvent(e)},wt;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(wt||(wt={}));var Ge=function(e){return Object.freeze(e)},Th=(function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Ge(this)}return e})(),oa=(function(){function e(t,n,r,s){return this.x=t,this.y=n,this.width=r,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ge(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,s=t.top,i=t.right,o=t.bottom,a=t.left,c=t.width,u=t.height;return{x:n,y:r,top:s,right:i,bottom:o,left:a,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),ls=function(e){return e instanceof SVGElement&&"getBBox"in e},aa=function(e){if(ls(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var s=e,i=s.offsetWidth,o=s.offsetHeight;return!(i||o||e.getClientRects().length)},oi=function(e){var t;if(e instanceof Element)return!0;var n=(t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},wh=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},vt=typeof window<"u"?window:{},Bt=new WeakMap,ai=/auto|scroll/,Sh=/^tb|vertical/,Dh=/msie|trident/i.test(vt.navigator&&vt.navigator.userAgent),ye=function(e){return parseFloat(e||"0")},tt=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new Th((n?t:e)||0,(n?e:t)||0)},ci=Ge({devicePixelContentBoxSize:tt(),borderBoxSize:tt(),contentBoxSize:tt(),contentRect:new oa(0,0,0,0)}),ca=function(e,t){if(t===void 0&&(t=!1),Bt.has(e)&&!t)return Bt.get(e);if(aa(e))return Bt.set(e,ci),ci;var n=getComputedStyle(e),r=ls(e)&&e.ownerSVGElement&&e.getBBox(),s=!Dh&&n.boxSizing==="border-box",i=Sh.test(n.writingMode||""),o=!r&&ai.test(n.overflowY||""),a=!r&&ai.test(n.overflowX||""),c=r?0:ye(n.paddingTop),u=r?0:ye(n.paddingRight),l=r?0:ye(n.paddingBottom),d=r?0:ye(n.paddingLeft),h=r?0:ye(n.borderTopWidth),p=r?0:ye(n.borderRightWidth),f=r?0:ye(n.borderBottomWidth),v=r?0:ye(n.borderLeftWidth),y=d+u,b=c+l,T=v+p,w=h+f,S=a?e.offsetHeight-w-e.clientHeight:0,P=o?e.offsetWidth-T-e.clientWidth:0,R=s?y+T:0,L=s?b+w:0,O=r?r.width:ye(n.width)-R-P,F=r?r.height:ye(n.height)-L-S,E=O+y+P+T,V=F+b+S+w,$=Ge({devicePixelContentBoxSize:tt(Math.round(O*devicePixelRatio),Math.round(F*devicePixelRatio),i),borderBoxSize:tt(E,V,i),contentBoxSize:tt(O,F,i),contentRect:new oa(d,c,O,F)});return Bt.set(e,$),$},la=function(e,t,n){var r=ca(e,n),s=r.borderBoxSize,i=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case wt.DEVICE_PIXEL_CONTENT_BOX:return o;case wt.BORDER_BOX:return s;default:return i}},Ch=(function(){function e(t){var n=ca(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Ge([n.borderBoxSize]),this.contentBoxSize=Ge([n.contentBoxSize]),this.devicePixelContentBoxSize=Ge([n.devicePixelContentBoxSize])}return e})(),ua=function(e){if(aa(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Eh=function(){var e=1/0,t=[];We.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(u){var l=new Ch(u.target),d=ua(u.target);a.push(l),u.lastReportedSize=la(u.target,u.observedBox),d<e&&(e=d)}),t.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var s=r[n];s()}return e},li=function(e){We.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(s){s.isActive()&&(ua(s.target)>e?n.activeTargets.push(s):n.skippedTargets.push(s))})})},Ph=function(){var e=0;for(li(e);yh();)e=Eh(),li(e);return bh()&&xh(),e>0},qn,da=[],Oh=function(){return da.splice(0).forEach(function(e){return e()})},Ih=function(e){if(!qn){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Oh()}).observe(n,r),qn=function(){n.textContent="".concat(t?t--:t++)}}da.push(e),qn()},Mh=function(e){Ih(function(){requestAnimationFrame(e)})},Zt=0,Ah=function(){return!!Zt},Rh=250,kh={attributes:!0,characterData:!0,childList:!0,subtree:!0},ui=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],di=function(e){return e===void 0&&(e=0),Date.now()+e},Xn=!1,Nh=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=Rh),!Xn){Xn=!0;var r=di(t);Mh(function(){var s=!1;try{s=Ph()}finally{if(Xn=!1,t=r-di(),!Ah())return;s?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,kh)};document.body?n():vt.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ui.forEach(function(n){return vt.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),ui.forEach(function(n){return vt.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e})(),Sr=new Nh,hi=function(e){!Zt&&e>0&&Sr.start(),Zt+=e,!Zt&&Sr.stop()},Lh=function(e){return!ls(e)&&!wh(e)&&getComputedStyle(e).display==="inline"},Vh=(function(){function e(t,n){this.target=t,this.observedBox=n||wt.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=la(this.target,this.observedBox,!0);return Lh(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),jh=(function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e})(),Ft=new WeakMap,fi=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},_t=(function(){function e(){}return e.connect=function(t,n){var r=new jh(t,n);Ft.set(t,r)},e.observe=function(t,n,r){var s=Ft.get(t),i=s.observationTargets.length===0;fi(s.observationTargets,n)<0&&(i&&We.push(s),s.observationTargets.push(new Vh(n,r&&r.box)),hi(1),Sr.schedule())},e.unobserve=function(t,n){var r=Ft.get(t),s=fi(r.observationTargets,n),i=r.observationTargets.length===1;s>=0&&(i&&We.splice(We.indexOf(r),1),r.observationTargets.splice(s,1),hi(-1))},e.disconnect=function(t){var n=this,r=Ft.get(t);r.observationTargets.slice().forEach(function(s){return n.unobserve(t,s.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e})(),Bh=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");_t.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oi(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");_t.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oi(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");_t.unobserve(this,t)},e.prototype.disconnect=function(){_t.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})();const ha=m.createContext({});function Fh(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const _h=typeof window<"u",zh=_h?m.useLayoutEffect:m.useEffect,us=m.createContext(null);function ds(e,t){e.indexOf(t)===-1&&e.push(t)}function dn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const we=(e,t,n)=>n>t?t:n<e?e:n;let hs=()=>{};const ke={},fa=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),pa=e=>typeof e=="object"&&e!==null,ga=e=>/^0[^.\s]+$/u.test(e);function ma(e){let t;return()=>(t===void 0&&(t=e()),t)}const de=e=>e,Pt=(...e)=>e.reduce((t,n)=>r=>n(t(r))),St=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class fs{constructor(){this.subscriptions=[]}add(t){return ds(this.subscriptions,t),()=>dn(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const oe=e=>e*1e3,ue=e=>e/1e3,va=(e,t)=>t?e*(1e3/t):0,ya=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Hh=1e-7,$h=12;function Uh(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=ya(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>Hh&&++a<$h);return o}function Ot(e,t,n,r){if(e===t&&n===r)return de;const s=i=>Uh(i,0,1,e,n);return i=>i===0||i===1?i:ya(s(i),t,r)}const ba=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xa=e=>t=>1-e(1-t),Ta=Ot(.33,1.53,.69,.99),ps=xa(Ta),wa=ba(ps),Sa=e=>e>=1?1:(e*=2)<1?.5*ps(e):.5*(2-Math.pow(2,-10*(e-1))),gs=e=>1-Math.sin(Math.acos(e)),Da=xa(gs),Ca=ba(gs),Wh=Ot(.42,0,1,1),Gh=Ot(0,0,.58,1),Ea=Ot(.42,0,.58,1),Kh=e=>Array.isArray(e)&&typeof e[0]!="number",Pa=e=>Array.isArray(e)&&typeof e[0]=="number",qh={linear:de,easeIn:Wh,easeInOut:Ea,easeOut:Gh,circIn:gs,circInOut:Ca,circOut:Da,backIn:ps,backInOut:wa,backOut:Ta,anticipate:Sa},Xh=e=>typeof e=="string",pi=e=>{if(Pa(e)){hs(e.length===4);const[t,n,r,s]=e;return Ot(t,n,r,s)}else if(Xh(e))return qh[e];return e},zt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Yh(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(l){o.has(l)&&(u.schedule(l),e()),l(a)}const u={schedule:(l,d=!1,h=!1)=>{const f=h&&s?n:r;return d&&o.add(l),f.add(l),l},cancel:l=>{r.delete(l),o.delete(l)},process:l=>{if(a=l,s){i=!0;return}s=!0;const d=n;n=r,r=d,n.forEach(c),n.clear(),s=!1,i&&(i=!1,u.process(l))}};return u}const Zh=40;function Oa(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=zt.reduce((w,S)=>(w[S]=Yh(i),w),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:l,update:d,preRender:h,render:p,postRender:f}=o,v=()=>{const w=ke.useManualTiming,S=w?s.timestamp:performance.now();n=!1,w||(s.delta=r?1e3/60:Math.max(Math.min(S-s.timestamp,Zh),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),c.process(s),u.process(s),l.process(s),d.process(s),h.process(s),p.process(s),f.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(v))},y=()=>{n=!0,r=!0,s.isProcessing||e(v)};return{schedule:zt.reduce((w,S)=>{const P=o[S];return w[S]=(R,L=!1,O=!1)=>(n||y(),P.schedule(R,L,O)),w},{}),cancel:w=>{for(let S=0;S<zt.length;S++)o[zt[S]].cancel(w)},state:s,steps:o}}const{schedule:B,cancel:Ne,state:Z,steps:Yn}=Oa(typeof requestAnimationFrame<"u"?requestAnimationFrame:de,!0);let Jt;function Jh(){Jt=void 0}const Q={now:()=>(Jt===void 0&&Q.set(Z.isProcessing||ke.useManualTiming?Z.timestamp:performance.now()),Jt),set:e=>{Jt=e,queueMicrotask(Jh)}},Ia=e=>t=>typeof t=="string"&&t.startsWith(e),Ma=Ia("--"),Qh=Ia("var(--"),ms=e=>Qh(e)?ef.test(e.split("/*")[0].trim()):!1,ef=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function gi(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const st={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Dt={...st,transform:e=>we(0,1,e)},Ht={...st,default:1},yt=e=>Math.round(e*1e5)/1e5,vs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function tf(e){return e==null}const nf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ys=(e,t)=>n=>!!(typeof n=="string"&&nf.test(n)&&n.startsWith(e)||t&&!tf(n)&&Object.prototype.hasOwnProperty.call(n,t)),Aa=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(vs);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},rf=e=>we(0,255,e),Zn={...st,transform:e=>Math.round(rf(e))},He={test:ys("rgb","red"),parse:Aa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Zn.transform(e)+", "+Zn.transform(t)+", "+Zn.transform(n)+", "+yt(Dt.transform(r))+")"};function sf(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Dr={test:ys("#"),parse:sf,transform:He.transform},It=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ce=It("deg"),Te=It("%"),D=It("px"),of=It("vh"),af=It("vw"),mi={...Te,parse:e=>Te.parse(e)/100,transform:e=>Te.transform(e*100)},Je={test:ys("hsl","hue"),parse:Aa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Te.transform(yt(t))+", "+Te.transform(yt(n))+", "+yt(Dt.transform(r))+")"},q={test:e=>He.test(e)||Dr.test(e)||Je.test(e),parse:e=>He.test(e)?He.parse(e):Je.test(e)?Je.parse(e):Dr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?He.transform(e):Je.transform(e),getAnimatableNone:e=>{const t=q.parse(e);return t.alpha=0,q.transform(t)}},cf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function lf(e){return isNaN(e)&&typeof e=="string"&&(e.match(vs)?.length||0)+(e.match(cf)?.length||0)>0}const Ra="number",ka="color",uf="var",df="var(",vi="${}",hf=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function nt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(hf,c=>(q.test(c)?(r.color.push(i),s.push(ka),n.push(q.parse(c))):c.startsWith(df)?(r.var.push(i),s.push(uf),n.push(c)):(r.number.push(i),s.push(Ra),n.push(parseFloat(c))),++i,vi)).split(vi);return{values:n,split:a,indexes:r,types:s}}function ff(e){return nt(e).values}function Na({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===Ra?s+=yt(r[i]):o===ka?s+=q.transform(r[i]):s+=r[i]}return s}}function pf(e){return Na(nt(e))}const gf=e=>typeof e=="number"?0:q.test(e)?q.getAnimatableNone(e):e,mf=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:gf(e);function vf(e){const t=nt(e);return Na(t)(t.values.map((r,s)=>mf(r,t.split[s])))}const ge={test:lf,parse:ff,createTransformer:pf,getAnimatableNone:vf};function Jn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yf({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=Jn(c,a,e+1/3),i=Jn(c,a,e),o=Jn(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function hn(e,t){return n=>n>0?t:e}const j=(e,t,n)=>e+(t-e)*n,Qn=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},bf=[Dr,He,Je],xf=e=>bf.find(t=>t.test(e));function yi(e){const t=xf(e);if(!t)return!1;let n=t.parse(e);return t===Je&&(n=yf(n)),n}const bi=(e,t)=>{const n=yi(e),r=yi(t);if(!n||!r)return hn(e,t);const s={...n};return i=>(s.red=Qn(n.red,r.red,i),s.green=Qn(n.green,r.green,i),s.blue=Qn(n.blue,r.blue,i),s.alpha=j(n.alpha,r.alpha,i),He.transform(s))},Cr=new Set(["none","hidden"]);function Tf(e,t){return Cr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function wf(e,t){return n=>j(e,t,n)}function bs(e){return typeof e=="number"?wf:typeof e=="string"?ms(e)?hn:q.test(e)?bi:Cf:Array.isArray(e)?La:typeof e=="object"?q.test(e)?bi:Sf:hn}function La(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>bs(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function Sf(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=bs(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function Df(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const Cf=(e,t)=>{const n=ge.createTransformer(t),r=nt(e),s=nt(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Cr.has(e)&&!s.values.length||Cr.has(t)&&!r.values.length?Tf(e,t):Pt(La(Df(r,s),s.values),n):hn(e,t)};function Va(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?j(e,t,n):bs(e)(e,t)}const Ef=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>B.update(t,n),stop:()=>Ne(t),now:()=>Z.isProcessing?Z.timestamp:Q.now()}},ja=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},fn=2e4;function xs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<fn;)t+=n,r=e.next(t);return t>=fn?1/0:t}function Pf(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(xs(r),fn);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:ue(s)}}const W={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Er(e,t){return e*Math.sqrt(1-t*t)}const Of=12;function If(e,t,n){let r=n;for(let s=1;s<Of;s++)r=r-e(r)/t(r);return r}const er=.001;function Mf({duration:e=W.duration,bounce:t=W.bounce,velocity:n=W.velocity,mass:r=W.mass}){let s,i,o=1-t;o=we(W.minDamping,W.maxDamping,o),e=we(W.minDuration,W.maxDuration,ue(e)),o<1?(s=u=>{const l=u*o,d=l*e,h=l-n,p=Er(u,o),f=Math.exp(-d);return er-h/p*f},i=u=>{const d=u*o*e,h=d*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,f=Math.exp(-d),v=Er(Math.pow(u,2),o);return(-s(u)+er>0?-1:1)*((h-p)*f)/v}):(s=u=>{const l=Math.exp(-u*e),d=(u-n)*e+1;return-er+l*d},i=u=>{const l=Math.exp(-u*e),d=(n-u)*(e*e);return l*d});const a=5/e,c=If(s,i,a);if(e=oe(e),isNaN(c))return{stiffness:W.stiffness,damping:W.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Af=["duration","bounce"],Rf=["stiffness","damping","mass"];function xi(e,t){return t.some(n=>e[n]!==void 0)}function kf(e){let t={velocity:W.velocity,stiffness:W.stiffness,damping:W.damping,mass:W.mass,isResolvedFromDuration:!1,...e};if(!xi(e,Rf)&&xi(e,Af))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*we(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:W.mass,stiffness:s,damping:i}}else{const n=Mf({...e,velocity:0});t={...t,...n,mass:W.mass},t.isResolvedFromDuration=!0}return t}function pn(e=W.visualDuration,t=W.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:u,mass:l,duration:d,velocity:h,isResolvedFromDuration:p}=kf({...n,velocity:-ue(n.velocity||0)}),f=h||0,v=u/(2*Math.sqrt(c*l)),y=o-i,b=ue(Math.sqrt(c/l)),T=Math.abs(y)<5;r||(r=T?W.restSpeed.granular:W.restSpeed.default),s||(s=T?W.restDelta.granular:W.restDelta.default);let w,S,P,R,L,O;if(v<1)P=Er(b,v),R=(f+v*b*y)/P,w=E=>{const V=Math.exp(-v*b*E);return o-V*(R*Math.sin(P*E)+y*Math.cos(P*E))},L=v*b*R+y*P,O=v*b*y-R*P,S=E=>Math.exp(-v*b*E)*(L*Math.sin(P*E)+O*Math.cos(P*E));else if(v===1){w=V=>o-Math.exp(-b*V)*(y+(f+b*y)*V);const E=f+b*y;S=V=>Math.exp(-b*V)*(b*E*V-f)}else{const E=b*Math.sqrt(v*v-1);w=ne=>{const he=Math.exp(-v*b*ne),re=Math.min(E*ne,300);return o-he*((f+v*b*y)*Math.sinh(re)+E*y*Math.cosh(re))/E};const V=(f+v*b*y)/E,$=v*b*V-y*E,Se=v*b*y-V*E;S=ne=>{const he=Math.exp(-v*b*ne),re=Math.min(E*ne,300);return he*($*Math.sinh(re)+Se*Math.cosh(re))}}const F={calculatedDuration:p&&d||null,velocity:E=>oe(S(E)),next:E=>{if(!p&&v<1){const $=Math.exp(-v*b*E),Se=Math.sin(P*E),ne=Math.cos(P*E),he=o-$*(R*Se+y*ne),re=oe($*(L*Se+O*ne));return a.done=Math.abs(re)<=r&&Math.abs(o-he)<=s,a.value=a.done?o:he,a}const V=w(E);if(p)a.done=E>=d;else{const $=oe(S(E));a.done=Math.abs($)<=r&&Math.abs(o-V)<=s}return a.value=a.done?o:V,a},toString:()=>{const E=Math.min(xs(F),fn),V=ja($=>F.next(E*$).value,E,30);return E+"ms "+V},toTransition:()=>{}};return F}pn.applyToOptions=e=>{const t=Pf(e,100,pn);return e.ease=t.ease,e.duration=oe(t.duration),e.type="keyframes",e};const Nf=5;function Ba(e,t,n){const r=Math.max(t-Nf,0);return va(n-e(r),t-r)}function Pr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:u=.5,restSpeed:l}){const d=e[0],h={done:!1,value:d},p=O=>a!==void 0&&O<a||c!==void 0&&O>c,f=O=>a===void 0?c:c===void 0||Math.abs(a-O)<Math.abs(c-O)?a:c;let v=n*t;const y=d+v,b=o===void 0?y:o(y);b!==y&&(v=b-d);const T=O=>-v*Math.exp(-O/r),w=O=>b+T(O),S=O=>{const F=T(O),E=w(O);h.done=Math.abs(F)<=u,h.value=h.done?b:E};let P,R;const L=O=>{p(h.value)&&(P=O,R=pn({keyframes:[h.value,f(h.value)],velocity:Ba(w,O,h.value),damping:s,stiffness:i,restDelta:u,restSpeed:l}))};return L(0),{calculatedDuration:null,next:O=>{let F=!1;return!R&&P===void 0&&(F=!0,S(O),L(O)),P!==void 0&&O>=P?R.next(O-P):(!F&&S(O),h)}}}function Lf(e,t,n){const r=[],s=n||ke.mix||Va,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||de:t;a=Pt(c,a)}r.push(a)}return r}function Vf(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(hs(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Lf(t,r,s),c=a.length,u=l=>{if(o&&l<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(l<e[d+1]);d++);const h=St(e[d],e[d+1],l);return a[d](h)};return n?l=>u(we(e[0],e[i-1],l)):u}function jf(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=St(0,t,r);e.push(j(n,1,s))}}function Bf(e){const t=[0];return jf(t,e.length-1),t}function Ff(e,t){return e.map(n=>n*t)}function _f(e,t){return e.map(()=>t||Ea).splice(0,e.length-1)}function bt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Kh(r)?r.map(pi):pi(r),i={done:!1,value:t[0]},o=Ff(n&&n.length===t.length?n:Bf(t),e),a=Vf(o,t,{ease:Array.isArray(s)?s:_f(t,s)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const zf=e=>e!==null;function En(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(zf),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const Hf={decay:Pr,inertia:Pr,tween:bt,keyframes:bt,spring:pn};function Fa(e){typeof e.type=="string"&&(e.type=Hf[e.type])}class Ts{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const $f=e=>e/100;class gn extends Ts{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Q.now()&&this.tick(Q.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Fa(t);const{type:n=bt,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const c=n||bt;c!==bt&&typeof a[0]!="number"&&(this.mixKeyframes=Pt($f,Va(a[0],a[1])),a=[0,100]);const u=c({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=xs(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:l,repeat:d,repeatType:h,repeatDelay:p,type:f,onUpdate:v,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?b<0:b>s;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,S=r;if(d){const O=Math.min(this.currentTime,s)/a;let F=Math.floor(O),E=O%1;!E&&O>=1&&(E=1),E===1&&F--,F=Math.min(F,d+1),F%2&&(h==="reverse"?(E=1-E,p&&(E-=p/a)):h==="mirror"&&(S=o)),w=we(0,1,E)*a}let P;T?(this.delayState.value=l[0],P=this.delayState):P=S.next(w),i&&!T&&(P.value=i(P.value));let{done:R}=P;!T&&c!==null&&(R=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return L&&f!==Pr&&(P.value=En(l,this.options,y,this.speed)),v&&v(P.value),L&&this.finish(),P}then(t,n){return this.finished.then(t,n)}get duration(){return ue(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ue(t)}get time(){return ue(this.currentTime)}set time(t){t=oe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Ba(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Q.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=ue(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ef,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Q.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Uf(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const $e=e=>e*180/Math.PI,Or=e=>{const t=$e(Math.atan2(e[1],e[0]));return Ir(t)},Wf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Or,rotateZ:Or,skewX:e=>$e(Math.atan(e[1])),skewY:e=>$e(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ir=e=>(e=e%360,e<0&&(e+=360),e),Ti=Or,wi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Si=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Gf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:wi,scaleY:Si,scale:e=>(wi(e)+Si(e))/2,rotateX:e=>Ir($e(Math.atan2(e[6],e[5]))),rotateY:e=>Ir($e(Math.atan2(-e[2],e[0]))),rotateZ:Ti,rotate:Ti,skewX:e=>$e(Math.atan(e[4])),skewY:e=>$e(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Mr(e){return e.includes("scale")?1:0}function Ar(e,t){if(!e||e==="none")return Mr(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Gf,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Wf,s=a}if(!s)return Mr(t);const i=r[t],o=s[1].split(",").map(qf);return typeof i=="function"?i(o):o[i]}const Kf=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ar(n,t)};function qf(e){return parseFloat(e.trim())}const it=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set([...it,"pathRotation"]),Di=e=>e===st||e===D,Xf=new Set(["x","y","z"]),Yf=it.filter(e=>!Xf.has(e));function Zf(e){const t=[];return Yf.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ae={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ar(t,"x"),y:(e,{transform:t})=>Ar(t,"y")};Ae.translateX=Ae.x;Ae.translateY=Ae.y;const Ke=new Set;let Rr=!1,kr=!1,Nr=!1;function _a(){if(kr){const e=Array.from(Ke).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Zf(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{r.getValue(i)?.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}kr=!1,Rr=!1,Ke.forEach(e=>e.complete(Nr)),Ke.clear()}function za(){Ke.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(kr=!0)})}function Jf(){Nr=!0,za(),_a(),Nr=!1}class ws{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ke.add(this),Rr||(Rr=!0,B.read(za),B.resolveKeyframes(_a))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s?.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}Uf(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ke.delete(this)}cancel(){this.state==="scheduled"&&(Ke.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Qf=e=>e.startsWith("--");function Ha(e,t,n){Qf(t)?e.style.setProperty(t,n):e.style[t]=n}const ep={};function $a(e,t){const n=ma(e);return()=>ep[t]??n()}const tp=$a(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ua=$a(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ci={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pt([0,.65,.55,1]),circOut:pt([.55,0,1,.45]),backIn:pt([.31,.01,.66,-.59]),backOut:pt([.33,1.53,.69,.99])};function Wa(e,t){if(e)return typeof e=="function"?Ua()?ja(e,t):"ease-out":Pa(e)?pt(e):Array.isArray(e)?e.map(n=>Wa(n,t)||Ci.easeOut):Ci[e]}function np(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},u=void 0){const l={[t]:n};c&&(l.offset=c);const d=Wa(a,s);Array.isArray(d)&&(l.easing=d);const h={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(l,h)}function Ga(e){return typeof e=="function"&&"applyToOptions"in e}function rp({type:e,...t}){return Ga(e)&&Ua()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ka extends Ts{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,hs(typeof t.type!="string");const u=rp(t);this.animation=np(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const l=En(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(l),Ha(n,r,l),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ue(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ue(t)}get time(){return ue(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=oe(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&tp()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),de):s(this)}}const qa={anticipate:Sa,backInOut:wa,circInOut:Ca};function sp(e){return e in qa}function ip(e){typeof e.ease=="string"&&sp(e.ease)&&(e.ease=qa[e.ease])}const tr=10;class op extends Ka{constructor(t){ip(t),Fa(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new gn({...o,autoplay:!1}),c=Math.max(tr,Q.now()-this.startTime),u=we(0,tr,c-tr),l=a.sample(c).value,{name:d}=this.options;i&&d&&Ha(i,d,l),n.setWithVelocity(a.sample(Math.max(0,c-u)).value,l,u),a.stop()}}const Ei=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ge.test(e)||e==="0")&&!e.startsWith("url("));function ap(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function cp(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=Ei(s,t),a=Ei(i,t);return!o||!a?!1:ap(e)||(n==="spring"||Ga(n))&&r}function Lr(e){e.duration=0,e.type="keyframes"}const Xa=new Set(["opacity","clipPath","filter","transform"]),lp=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function up(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&lp.test(e[t]))return!0;return!1}const dp=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),hp=ma(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function fp(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=t.owner.getProps();return hp()&&n&&(Xa.has(n)||dp.has(n)&&up(a))&&(n!=="transform"||!l)&&!u&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const pp=40;class gp extends Ts{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:c,motionValue:u,element:l,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Q.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:c,motionValue:u,element:l,...d},p=l?.KeyframeResolver||ws;this.keyframeResolver=new p(a,(f,v,y)=>this.onKeyframesResolved(f,v,h,!y),c,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:u,onUpdate:l}=r;this.resolvedAt=Q.now();let d=!0;cp(t,i,o,a)||(d=!1,(ke.instantAnimations||!c)&&l?.(En(t,r,n)),t[0]=t[t.length-1],Lr(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>pp?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=d&&!u&&fp(p),v=p.motionValue?.owner?.current;let y;if(f)try{y=new op({...p,element:v})}catch{y=new gn(p)}else y=new gn(p);y.finished.then(()=>{this.notifyFinished()}).catch(de),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Jf()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Ya(e,t,n,r=0,s=1){const i=Array.from(e).sort((u,l)=>u.sortNodePosition(l)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const Pi=30,mp=e=>!isNaN(parseFloat(e));class vp{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const s=Q.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Q.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mp(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new fs);const r=this.events[t].add(n);return t==="change"?()=>{r(),B.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Pi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pi);return va(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rt(e,t){return new vp(e,t)}function Za(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Ss(e,t){const n=e?.[t]??e?.default??e;return n!==e?Za(n,e):n}const yp={type:"spring",stiffness:500,damping:25,restSpeed:10},bp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xp={type:"keyframes",duration:.8},Tp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wp=(e,{keyframes:t})=>t.length>2?xp:ot.has(e)?e.startsWith("scale")?bp(t[1]):yp:Tp,Sp=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Dp(e){for(const t in e)if(!Sp.has(t))return!0;return!1}const Ds=(e,t,n,r={},s,i)=>o=>{const a=Ss(r,e)||{},c=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-oe(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};Dp(a)||Object.assign(l,wp(e,l)),l.duration&&(l.duration=oe(l.duration)),l.repeatDelay&&(l.repeatDelay=oe(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let d=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(Lr(l),l.delay===0&&(d=!0)),(ke.instantAnimations||ke.skipAnimations||s?.shouldSkipAnimations||a.skipAnimations)&&(d=!0,Lr(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const h=En(l.keyframes,a);if(h!==void 0){B.update(()=>{l.onUpdate(h),l.onComplete()});return}}return a.isSync?new gn(l):new gp(l)},Cp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ep(e){const t=Cp.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function Ja(e,t,n=1){const[r,s]=Ep(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return fa(o)?parseFloat(o):o}return ms(s)?Ja(s,t,n+1):s}function Oi(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Cs(e,t,n,r){if(typeof t=="function"){const[s,i]=Oi(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=Oi(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function qe(e,t,n){const r=e.getProps();return Cs(r,t,n!==void 0?n:r.custom,e)}const Qa=new Set(["width","height","top","left","right","bottom",...it]),Vr=e=>Array.isArray(e);function Pp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,rt(n))}function Op(e){return Vr(e)?e[e.length-1]||0:e}function Ip(e,t){const n=qe(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=Op(i[o]);Pp(e,o,a)}}const J=e=>!!(e&&e.getVelocity);function Mp(e){return!!(J(e)&&e.add)}function jr(e,t){const n=e.getValue("willChange");if(Mp(n))return n.add(t);if(!n&&ke.WillChange){const r=new ke.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Es(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ap="framerAppearId",ec="data-"+Es(Ap);function tc(e){return e.props[ec]}function Rp({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function nc(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const c=e.getDefaultTransition();i=i?Za(i,c):c;const u=i?.reduceMotion,l=i?.skipAnimations;r&&(i=r);const d=[],h=s&&e.animationState&&e.animationState.getState()[s],p=i?.path;p&&p.animateVisualElement(e,a,i,n,d);for(const f in a){const v=e.getValue(f,e.latestValues[f]??null),y=a[f];if(y===void 0||h&&Rp(h,f))continue;const b={delay:n,...Ss(i||{},f)};l&&(b.skipAnimations=!0);const T=v.get();if(T!==void 0&&!v.isAnimating()&&!Array.isArray(y)&&y===T&&!b.velocity){B.update(()=>v.set(y));continue}let w=!1;if(window.MotionHandoffAnimation){const R=tc(e);if(R){const L=window.MotionHandoffAnimation(R,f,B);L!==null&&(b.startTime=L,w=!0)}}jr(e,f);const S=u??e.shouldReduceMotion;v.start(Ds(f,v,y,S&&Qa.has(f)?{type:!1}:b,e,w));const P=v.animation;P&&d.push(P)}if(o){const f=()=>B.update(()=>{o&&Ip(e,o)});d.length?Promise.all(d).then(f):f()}return d}function Br(e,t,n={}){const r=qe(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(nc(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:l,staggerDirection:d}=s;return kp(e,t,c,u,l,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function kp(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Br(c,t,{...o,delay:n+(typeof r=="function"?0:r)+Ya(e.variantChildren,c,r,s,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Np(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Br(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Br(e,t,n);else{const s=typeof t=="function"?qe(e,t,n.custom):t;r=Promise.all(nc(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Lp={test:e=>e==="auto",parse:e=>e},rc=e=>t=>t.test(e),sc=[st,D,Te,Ce,af,of,Lp],Ii=e=>sc.find(rc(e));function Vp(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ga(e):!0}const jp=new Set(["brightness","contrast","saturate","opacity"]);function Bp(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(vs)||[];if(!r)return e;const s=n.replace(r,"");let i=jp.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const Fp=/\b([a-z-]*)\(.*?\)/gu,Fr={...ge,getAnimatableNone:e=>{const t=e.match(Fp);return t?t.map(Bp).join(" "):e}},_r={...ge,getAnimatableNone:e=>{const t=ge.parse(e);return ge.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Mi={...st,transform:Math.round},_p={rotate:Ce,pathRotation:Ce,rotateX:Ce,rotateY:Ce,rotateZ:Ce,scale:Ht,scaleX:Ht,scaleY:Ht,scaleZ:Ht,skew:Ce,skewX:Ce,skewY:Ce,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:Dt,originX:mi,originY:mi,originZ:D},mn={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,top:D,right:D,bottom:D,left:D,inset:D,insetBlock:D,insetBlockStart:D,insetBlockEnd:D,insetInline:D,insetInlineStart:D,insetInlineEnd:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,paddingBlock:D,paddingBlockStart:D,paddingBlockEnd:D,paddingInline:D,paddingInlineStart:D,paddingInlineEnd:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,marginBlock:D,marginBlockStart:D,marginBlockEnd:D,marginInline:D,marginInlineStart:D,marginInlineEnd:D,fontSize:D,backgroundPositionX:D,backgroundPositionY:D,..._p,zIndex:Mi,fillOpacity:Dt,strokeOpacity:Dt,numOctaves:Mi},zp={...mn,color:q,backgroundColor:q,outlineColor:q,fill:q,stroke:q,borderColor:q,borderTopColor:q,borderRightColor:q,borderBottomColor:q,borderLeftColor:q,filter:Fr,WebkitFilter:Fr,mask:_r,WebkitMask:_r},ic=e=>zp[e],Hp=new Set([Fr,_r]);function oc(e,t){let n=ic(e);return Hp.has(n)||(n=ge),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $p=new Set(["auto","none","0"]);function Up(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!$p.has(i)&&nt(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=oc(n,s)}class Wp extends ws{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let d=t[l];if(typeof d=="string"&&(d=d.trim(),ms(d))){const h=Ja(d,n.current);h!==void 0&&(t[l]=h),l===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Qa.has(r)||t.length!==2)return;const[s,i]=t,o=Ii(s),a=Ii(i),c=gi(s),u=gi(i);if(c!==u&&Ae[r]){this.needsMeasurement=!0;return}if(o!==a)if(Di(o)&&Di(a))for(let l=0;l<t.length;l++){const d=t[l];typeof d=="string"&&(t[l]=parseFloat(d))}else Ae[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Vp(t[s]))&&r.push(s);r.length&&Up(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ae[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Ae[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function ac(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=n?.[e]??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const zr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Gp(e){return pa(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Ps}=Oa(queueMicrotask,!1),pe={x:!1,y:!1};function cc(){return pe.x||pe.y}function Kp(e){return e==="x"||e==="y"?pe[e]?null:(pe[e]=!0,()=>{pe[e]=!1}):pe.x||pe.y?null:(pe.x=pe.y=!0,()=>{pe.x=pe.y=!1})}function lc(e,t){const n=ac(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function qp(e){return!(e.pointerType==="touch"||cc())}function Xp(e,t,n={}){const[r,s,i]=lc(e,n);return r.forEach(o=>{let a=!1,c=!1,u;const l=()=>{o.removeEventListener("pointerleave",f)},d=y=>{u&&(u(y),u=void 0),l()},h=y=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,d(y))},p=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},f=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}d(y)}},v=y=>{if(!qp(y))return;c=!1;const b=t(o,y);typeof b=="function"&&(u=b,o.addEventListener("pointerleave",f,s))};o.addEventListener("pointerenter",v,s),o.addEventListener("pointerdown",p,s)}),i}const uc=(e,t)=>t?e===t?!0:uc(e,t.parentElement):!1,Os=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Yp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Zp(e){return Yp.has(e.tagName)||e.isContentEditable===!0}const Jp=new Set(["INPUT","SELECT","TEXTAREA"]);function Qp(e){return Jp.has(e.tagName)||e.isContentEditable===!0}const Qt=new WeakSet;function Ai(e){return t=>{t.key==="Enter"&&e(t)}}function nr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const eg=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ai(()=>{if(Qt.has(n))return;nr(n,"down");const s=Ai(()=>{nr(n,"up")}),i=()=>nr(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ri(e){return Os(e)&&!cc()}const ki=new WeakSet;function tg(e,t,n={}){const[r,s,i]=lc(e,n),o=a=>{const c=a.currentTarget;if(!Ri(a)||ki.has(a))return;Qt.add(c),n.stopPropagation&&ki.add(a);const u=t(c,a),l=(p,f)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Qt.has(c)&&Qt.delete(c),Ri(p)&&typeof u=="function"&&u(p,{success:f})},d=p=>{l(p,c===window||c===document||n.useGlobalTarget||uc(c,p.target))},h=p=>{l(p,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Gp(a)&&(a.addEventListener("focus",u=>eg(u,s)),!Zp(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Is(e){return pa(e)&&"ownerSVGElement"in e}const en=new WeakMap;let tn;const dc=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Is(r)&&"getBBox"in r?r.getBBox()[t]:r[n],ng=dc("inline","width","offsetWidth"),rg=dc("block","height","offsetHeight");function sg({target:e,borderBoxSize:t}){en.get(e)?.forEach(n=>{n(e,{get width(){return ng(e,t)},get height(){return rg(e,t)}})})}function ig(e){e.forEach(sg)}function og(){typeof ResizeObserver>"u"||(tn=new ResizeObserver(ig))}function ag(e,t){tn||og();const n=ac(e);return n.forEach(r=>{let s=en.get(r);s||(s=new Set,en.set(r,s)),s.add(t),tn?.observe(r)}),()=>{n.forEach(r=>{const s=en.get(r);s?.delete(t),s?.size||tn?.unobserve(r)})}}const nn=new Set;let Qe;function cg(){Qe=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};nn.forEach(t=>t(e))},window.addEventListener("resize",Qe)}function lg(e){return nn.add(e),Qe||cg(),()=>{nn.delete(e),!nn.size&&typeof Qe=="function"&&(window.removeEventListener("resize",Qe),Qe=void 0)}}function Ni(e,t){return typeof e=="function"?lg(e):ag(e,t)}function ug(e){return Is(e)&&e.tagName==="svg"}const dg=[...sc,q,ge],hg=e=>dg.find(rc(e)),Li=()=>({translate:0,scale:1,origin:0,originPoint:0}),et=()=>({x:Li(),y:Li()}),Vi=()=>({min:0,max:0}),Y=()=>({x:Vi(),y:Vi()}),fg=new WeakMap;function Pn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ct(e){return typeof e=="string"||Array.isArray(e)}const Ms=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],As=["initial",...Ms];function On(e){return Pn(e.animate)||As.some(t=>Ct(e[t]))}function hc(e){return!!(On(e)||e.variants)}function pg(e,t,n){for(const r in t){const s=t[r],i=n[r];if(J(s))e.addValue(r,s);else if(J(i))e.addValue(r,rt(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,rt(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Hr={current:null},fc={current:!1},gg=typeof window<"u";function mg(){if(fc.current=!0,!!gg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Hr.current=e.matches;e.addEventListener("change",t),t()}else Hr.current=!1}const ji=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let vn={};function pc(e){vn=e}function vg(){return vn}class yg{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ws,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Q.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,B.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=On(n),this.isVariantNode=hc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const f=h[p];u[p]!==void 0&&J(f)&&f.set(u[p])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,fg.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(fc.current||mg(),this.shouldReduceMotion=Hr.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ne(this.notifyUpdate),Ne(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Xa.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:u,duration:l}=n.accelerate,d=new Ka({element:this.current,name:t,keyframes:a,times:c,ease:u,duration:oe(l)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=ot.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&B.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in vn){const n=vn[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ji.length;r++){const s=ji[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=pg(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=rt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(fa(r)||ga(r))?r=parseFloat(r):!hg(r)&&ge.test(n)&&(r=oc(t,n)),this.setBaseTarget(t,J(r)?r.get():r)),J(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Cs(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!J(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new fs),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ps.render(this.render)}}class gc extends yg{constructor(){super(...arguments),this.KeyframeResolver=Wp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;J(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ve{constructor(t){this.isMounted=!1,this.node=t}update(){}}function mc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function bg({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function xg(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function rr(e){return e===void 0||e===1}function $r({scale:e,scaleX:t,scaleY:n}){return!rr(e)||!rr(t)||!rr(n)}function ze(e){return $r(e)||vc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function vc(e){return Bi(e.x)||Bi(e.y)}function Bi(e){return e&&e!=="0%"}function yn(e,t,n){const r=e-n,s=t*r;return n+s}function Fi(e,t,n,r,s){return s!==void 0&&(e=yn(e,s,r)),yn(e,n,r)+t}function Ur(e,t=0,n=1,r,s){e.min=Fi(e.min,t,n,r,s),e.max=Fi(e.max,t,n,r,s)}function yc(e,{x:t,y:n}){Ur(e.x,t.translate,t.scale,t.originPoint),Ur(e.y,n.translate,n.scale,n.originPoint)}const _i=.999999999999,zi=1.0000000000001;function Tg(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(xe(e.x,-i.scroll.offset.x),xe(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,yc(e,o)),r&&ze(i.latestValues)&&rn(e,i.latestValues,i.layout?.layoutBox))}t.x<zi&&t.x>_i&&(t.x=1),t.y<zi&&t.y>_i&&(t.y=1)}function xe(e,t){e.min+=t,e.max+=t}function Hi(e,t,n,r,s=.5){const i=j(e.min,e.max,s);Ur(e,t,n,i,r)}function $i(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function rn(e,t,n){const r=n??e;Hi(e.x,$i(t.x,r.x),t.scaleX,t.scale,t.originX),Hi(e.y,$i(t.y,r.y),t.scaleY,t.scale,t.originY)}function bc(e,t){return mc(xg(e.getBoundingClientRect(),t))}function wg(e,t,n){const r=bc(e,n),{scroll:s}=t;return s&&(xe(r.x,s.offset.x),xe(r.y,s.offset.y)),r}const Sg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Dg=it.length;function Cg(e,t,n){let r="",s=!0;for(let o=0;o<Dg;o++){const a=it[o],c=e[a];if(c===void 0)continue;let u=!0;if(typeof c=="number")u=c===(a.startsWith("scale")?1:0);else{const l=parseFloat(c);u=a.startsWith("scale")?l===1:l===0}if(!u||n){const l=zr(c,mn[a]);if(!u){s=!1;const d=Sg[a]||a;r+=`${d}(${l}) `}n&&(t[a]=l)}}const i=e.pathRotation;return i&&(s=!1,r+=`rotate(${zr(i,mn.pathRotation)}) `),r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Rs(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const c in t){const u=t[c];if(ot.has(c)){o=!0;continue}else if(Ma(c)){s[c]=u;continue}else{const l=zr(u,mn[c]);c.startsWith("origin")?(a=!0,i[c]=l):r[c]=l}}if(t.transform||(o||n?r.transform=Cg(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:l=0}=i;r.transformOrigin=`${c} ${u} ${l}`}}function xc(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s?.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function Ui(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const lt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(D.test(e))e=parseFloat(e);else return e;const n=Ui(e,t.target.x),r=Ui(e,t.target.y);return`${n}% ${r}%`}},Eg={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=ge.parse(e);if(s.length>5)return r;const i=ge.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=c;const u=j(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},Wr={borderRadius:{...lt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomLeftRadius:lt,borderBottomRightRadius:lt,boxShadow:Eg};function Tc(e,{layout:t,layoutId:n}){return ot.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Wr[e]||e==="opacity")}function ks(e,t,n){const r=e.style,s=t?.style,i={};if(!r)return i;for(const o in r)(J(r[o])||s&&J(s[o])||Tc(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}function Pg(e){return window.getComputedStyle(e)}class Og extends gc{constructor(){super(...arguments),this.type="html",this.renderInstance=xc}readValueFromInstance(t,n){if(ot.has(n))return this.projection?.isProjecting?Mr(n):Kf(t,n);{const r=Pg(t),s=(Ma(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return bc(t,n)}build(t,n,r){Rs(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ks(t,n,r)}}const Ig={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mg={offset:"strokeDashoffset",array:"strokeDasharray"};function Ag(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?Ig:Mg;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const Rg=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function wc(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},c,u,l){if(Rs(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=l?.transformBox??"fill-box",delete d.transformBox);for(const p of Rg)d[p]!==void 0&&(h[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&Ag(d,s,i,o,!1)}const Sc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Dc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function kg(e,t,n,r){xc(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Sc.has(s)?s:Es(s),t.attrs[s])}function Cc(e,t,n){const r=ks(e,t,n);for(const s in e)if(J(e[s])||J(t[s])){const i=it.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class Ng extends gc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ot.has(n)){const r=ic(n);return r&&r.default||0}return n=Sc.has(n)?n:Es(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Cc(t,n,r)}build(t,n,r){wc(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){kg(t,n,r,s)}mount(t){this.isSVGTag=Dc(t.tagName),super.mount(t)}}const Lg=As.length;function Ec(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ec(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Lg;n++){const r=As[n],s=e.props[r];(Ct(s)||s===!1)&&(t[r]=s)}return t}function Pc(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Vg=[...Ms].reverse(),jg=Ms.length;function Bg(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Np(e,n,r)))}function Fg(e){let t=Bg(e),n=Wi(),r=!0,s=!1;const i=u=>(l,d)=>{const h=qe(e,d,u==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:p,transitionEnd:f,...v}=h;l={...l,...v,...f}}return l};function o(u){t=u(e)}function a(u){const{props:l}=e,d=Ec(e.parent)||{},h=[],p=new Set;let f={},v=1/0;for(let b=0;b<jg;b++){const T=Vg[b],w=n[T],S=l[T]!==void 0?l[T]:d[T],P=Ct(S),R=T===u?w.isActive:null;R===!1&&(v=b);let L=S===d[T]&&S!==l[T]&&P;if(L&&(r||s)&&e.manuallyAnimateOnMount&&(L=!1),w.protectedKeys={...f},!w.isActive&&R===null||!S&&!w.prevProp||Pn(S)||typeof S=="boolean")continue;if(T==="exit"&&w.isActive&&R!==!0){w.prevResolvedValues&&(f={...f,...w.prevResolvedValues});continue}const O=_g(w.prevProp,S);let F=O||T===u&&w.isActive&&!L&&P||b>v&&P,E=!1;const V=Array.isArray(S)?S:[S];let $=V.reduce(i(T),{});R===!1&&($={});const{prevResolvedValues:Se={}}=w,ne={...Se,...$},he=X=>{F=!0,p.has(X)&&(E=!0,p.delete(X)),w.needsAnimating[X]=!0;const te=e.getValue(X);te&&(te.liveStyle=!1)};for(const X in ne){const te=$[X],me=Se[X];if(f.hasOwnProperty(X))continue;let Pe=!1;Vr(te)&&Vr(me)?Pe=!Pc(te,me)||O:Pe=te!==me,Pe?te!=null?he(X):p.add(X):te!==void 0&&p.has(X)?he(X):w.protectedKeys[X]=!0}w.prevProp=S,w.prevResolvedValues=$,w.isActive&&(f={...f,...$}),(r||s)&&e.blockInitialAnimation&&(F=!1);const re=L&&O;F&&(!re||E)&&h.push(...V.map(X=>{const te={type:T};if(typeof X=="string"&&(r||s)&&!re&&e.manuallyAnimateOnMount&&e.parent){const{parent:me}=e,Pe=qe(me,X);if(me.enteringChildren&&Pe){const{delayChildren:Rn}=Pe.transition||{};te.delay=Ya(me.enteringChildren,e,Rn)}}return{animation:X,options:te}}))}if(p.size){const b={};if(typeof l.initial!="boolean"){const T=qe(e,Array.isArray(l.initial)?l.initial[0]:l.initial);T&&T.transition&&(b.transition=T.transition)}p.forEach(T=>{const w=e.getBaseTarget(T),S=e.getValue(T);S&&(S.liveStyle=!0),b[T]=w??null}),h.push({animation:b})}let y=!!h.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,s=!1,y?t(h):Promise.resolve()}function c(u,l){if(n[u].isActive===l)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(u,l)),n[u].isActive=l;const d=a(u);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Wi(),s=!0}}}function _g(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Pc(t,e):!1}function Be(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wi(){return{animate:Be(!0),whileInView:Be(),whileHover:Be(),whileTap:Be(),whileDrag:Be(),whileFocus:Be(),exit:Be()}}function Gr(e,t){e.min=t.min,e.max=t.max}function fe(e,t){Gr(e.x,t.x),Gr(e.y,t.y)}function Gi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Oc=1e-4,zg=1-Oc,Hg=1+Oc,Ic=.01,$g=0-Ic,Ug=0+Ic;function ee(e){return e.max-e.min}function Wg(e,t,n){return Math.abs(e-t)<=n}function Ki(e,t,n,r=.5){e.origin=r,e.originPoint=j(t.min,t.max,e.origin),e.scale=ee(n)/ee(t),e.translate=j(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zg&&e.scale<=Hg||isNaN(e.scale))&&(e.scale=1),(e.translate>=$g&&e.translate<=Ug||isNaN(e.translate))&&(e.translate=0)}function xt(e,t,n,r){Ki(e.x,t.x,n.x,r?r.originX:void 0),Ki(e.y,t.y,n.y,r?r.originY:void 0)}function qi(e,t,n,r=0){const s=r?j(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+ee(t)}function Gg(e,t,n,r){qi(e.x,t.x,n.x,r?.x),qi(e.y,t.y,n.y,r?.y)}function Xi(e,t,n,r=0){const s=r?j(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+ee(t)}function bn(e,t,n,r){Xi(e.x,t.x,n.x,r?.x),Xi(e.y,t.y,n.y,r?.y)}function Yi(e,t,n,r,s){return e-=t,e=yn(e,1/n,r),s!==void 0&&(e=yn(e,1/s,r)),e}function Kg(e,t=0,n=1,r=.5,s,i=e,o=e){if(Te.test(t)&&(t=parseFloat(t),t=j(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=j(i.min,i.max,r);e===i&&(a-=t),e.min=Yi(e.min,t,n,a,s),e.max=Yi(e.max,t,n,a,s)}function Zi(e,t,[n,r,s],i,o){Kg(e,t[n],t[r],t[s],t.scale,i,o)}const qg=["x","scaleX","originX"],Xg=["y","scaleY","originY"];function Ji(e,t,n,r){Zi(e.x,t,qg,n?n.x:void 0,r?r.x:void 0),Zi(e.y,t,Xg,n?n.y:void 0,r?r.y:void 0)}function Qi(e){return e.translate===0&&e.scale===1}function Mc(e){return Qi(e.x)&&Qi(e.y)}function eo(e,t){return e.min===t.min&&e.max===t.max}function Yg(e,t){return eo(e.x,t.x)&&eo(e.y,t.y)}function to(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ac(e,t){return to(e.x,t.x)&&to(e.y,t.y)}function no(e){return ee(e.x)/ee(e.y)}function ro(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function be(e){return[e("x"),e("y")]}function Zg(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=n?.z||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:l,pathRotation:d,rotateX:h,rotateY:p,skewX:f,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),l&&(r+=`rotate(${l}deg) `),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const Rc=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Jg=Rc.length,so=e=>typeof e=="string"?parseFloat(e):e,io=e=>typeof e=="number"||D.test(e);function Qg(e,t,n,r,s,i){s?(e.opacity=j(0,n.opacity??1,em(r)),e.opacityExit=j(t.opacity??1,0,tm(r))):i&&(e.opacity=j(t.opacity??1,n.opacity??1,r));for(let o=0;o<Jg;o++){const a=Rc[o];let c=oo(t,a),u=oo(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||io(c)===io(u)?(e[a]=Math.max(j(so(c),so(u),r),0),(Te.test(u)||Te.test(c))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=j(t.rotate||0,n.rotate||0,r))}function oo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const em=kc(0,.5,Da),tm=kc(.5,.95,de);function kc(e,t,n){return r=>r<e?0:r>t?1:n(St(e,t,r))}function nm(e,t,n){const r=J(e)?e:rt(e);return r.start(Ds("",r,t,n)),r.animation}function Et(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const rm=(e,t)=>e.depth-t.depth;class sm{constructor(){this.children=[],this.isDirty=!1}add(t){ds(this.children,t),this.isDirty=!0}remove(t){dn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rm),this.isDirty=!1,this.children.forEach(t)}}function im(e,t){const n=Q.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ne(r),e(i-t))};return B.setup(r,!0),()=>Ne(r)}function sn(e){return J(e)?e.get():e}class om{constructor(){this.members=[]}add(t){ds(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(dn(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(dn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const r=this.members[n];if(r.isPresent!==!1&&r.instance?.isConnected!==!1)return this.promote(r),!0}return!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=r.options,{layoutDependency:i}=t.options;(s===void 0||s!==i)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const on={hasAnimatedSinceResize:!0,hasEverUpdated:!1},sr=["","X","Y","Z"],am=1e3;let cm=0;function ir(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Nc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=tc(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",B,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Nc(r)}function Lc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t?.()){this.id=cm++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(dm),this.nodes.forEach(vm),this.nodes.forEach(ym),this.nodes.forEach(hm)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new sm)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new fs),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Is(o)&&!ug(o),this.instance=o;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let l,d=0;const h=()=>this.root.updateBlockedByResize=!1;B.read(()=>{d=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,l&&l(),l=im(h,250),on.hasAnimatedSinceResize&&(on.hasAnimatedSinceResize=!1,this.nodes.forEach(lo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||u.getDefaultTransition()||Sm,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=u.getProps(),b=!this.targetLayout||!Ac(this.targetLayout,p),T=!d&&h;if(this.options.layoutRoot||this.resumeFrom||T||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Ss(f,"layout"),onPlay:v,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(l,T,w.path)}else d||lo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ne(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bm),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Nc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const d=this.path[l];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(pm),this.nodes.forEach(ao);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(co);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(gm),this.nodes.forEach(mm),this.nodes.forEach(lm),this.nodes.forEach(um)):this.nodes.forEach(co),this.clearAllSnapshots();const a=Q.now();Z.delta=we(0,1e3/60,a-Z.timestamp),Z.timestamp=a,Z.isProcessing=!0,Yn.update.process(Z),Yn.preRender.process(Z),Yn.render.process(Z),Z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ps.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(fm),this.sharedNodes.forEach(xm)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ee(this.snapshot.measuredBox.x)&&!ee(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Y()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Mc(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,l=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ze(this.latestValues)||l)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),Dm(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return Y();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Cm))){const{scroll:u}=this.root;u&&(xe(a.x,u.offset.x),xe(a.y,u.offset.y))}return a}removeElementScroll(o){const a=Y();if(fe(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:l,options:d}=u;u!==this.root&&l&&d.layoutScroll&&(l.wasRoot&&fe(a,o),xe(a.x,l.offset.x),xe(a.y,l.offset.y))}return a}applyTransform(o,a=!1,c){const u=c||Y();fe(u,o);for(let l=0;l<this.path.length;l++){const d=this.path[l];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(xe(u.x,-d.scroll.offset.x),xe(u.y,-d.scroll.offset.y)),ze(d.latestValues)&&rn(u,d.latestValues,d.layout?.layoutBox)}return ze(this.latestValues)&&rn(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(o){const a=Y();fe(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!ze(u.latestValues))continue;let l;u.instance&&($r(u.latestValues)&&u.updateSnapshot(),l=Y(),fe(l,u.measurePageBox())),Ji(a,u.latestValues,u.snapshot?.layoutBox,l)}return ze(this.latestValues)&&Ji(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:d}=this.options;if(!this.layout||!(l||d))return;this.resolvedRelativeTargetAt=Z.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Gg(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):fe(this.target,this.layout.layoutBox),yc(this.target,this.targetDelta)):fe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||$r(this.parent.latestValues)||vc(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),bn(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),fe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Z.timestamp&&(c=!1),c)return;const{layout:u,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||l))return;fe(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;Tg(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Y());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Gi(this.prevProjectionDelta.x,this.projectionDelta.x),Gi(this.prevProjectionDelta.y,this.projectionDelta.y)),xt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!ro(this.projectionDelta.x,this.prevProjectionDelta.x)||!ro(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=et(),this.projectionDelta=et(),this.projectionDeltaWithTransform=et()}setAnimationOrigin(o,a=!1,c){const u=this.snapshot,l=u?u.latestValues:{},d={...this.latestValues},h=et();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=Y(),f=u?u.source:void 0,v=this.layout?this.layout.source:void 0,y=f!==v,b=this.getStack(),T=!b||b.members.length<=1,w=!!(y&&!T&&this.options.crossfade===!0&&!this.path.some(wm));this.animationProgress=0;let S;const P=c?.interpolateProjection(o);this.mixTargetDelta=R=>{const L=R/1e3,O=P?.(L);O?(h.x.translate=O.x,h.x.scale=j(o.x.scale,1,L),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=O.y,h.y.scale=j(o.y.scale,1,L),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(uo(h.x,o.x,L),uo(h.y,o.y,L)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bn(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Tm(this.relativeTarget,this.relativeTargetOrigin,p,L),S&&Yg(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Y()),fe(S,this.relativeTarget)),y&&(this.animationValues=d,Qg(d,l,this.latestValues,L,w,T)),O&&O.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=O.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ne(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{on.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=rt(0)),this.motionValue.jump(0,!1),this.currentAnimation=nm(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(am),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=o;if(!(!a||!c||!u)){if(this!==o&&this.layout&&u&&Vc(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Y();const d=ee(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+d;const h=ee(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}fe(a,c),rn(a,l),xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new om),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&ir("z",o,u,this.animationValues);for(let l=0;l<sr.length;l++)ir(`rotate${sr[l]}`,o,u,this.animationValues),ir(`skew${sr[l]}`,o,u,this.animationValues);o.render();for(const l in u)o.setStaticValue(l,u[l]),this.animationValues&&(this.animationValues[l]=u[l]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=sn(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=sn(a?.pointerEvents)||""),this.hasProjected&&!ze(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const l=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=Zg(this.projectionDeltaWithTransform,this.treeScale,l);c&&(d=c(l,d)),o.transform=d;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:o.opacity=u===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const f in Wr){if(l[f]===void 0)continue;const{correct:v,applyTo:y,isCSSVariable:b}=Wr[f],T=d==="none"?l[f]:v(l[f],u);if(y){const w=y.length;for(let S=0;S<w;S++)o[y[S]]=T}else b?this.options.visualElement.renderState.vars[f]=T:o[f]=T}this.options.layoutId&&(o.pointerEvents=u===this?sn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(ao),this.root.sharedNodes.clear()}}}function lm(e){e.updateLayout()}function um(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:s}=e.options,i=t.source!==e.layout.source;if(s==="size")be(l=>{const d=i?t.measuredBox[l]:t.layoutBox[l],h=ee(d);d.min=n[l].min,d.max=d.min+h});else if(s==="x"||s==="y"){const l=s==="x"?"y":"x";Gr(i?t.measuredBox[l]:t.layoutBox[l],n[l])}else Vc(s,t.layoutBox,n)&&be(l=>{const d=i?t.measuredBox[l]:t.layoutBox[l],h=ee(n[l]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[l].max=e.relativeTarget[l].min+h)});const o=et();xt(o,n,t.layoutBox);const a=et();i?xt(a,e.applyTransform(r,!0),t.measuredBox):xt(a,n,t.layoutBox);const c=!Mc(o);let u=!1;if(!e.resumeFrom){const l=e.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:d,layout:h}=l;if(d&&h){const p=e.options.layoutAnchor||void 0,f=Y();bn(f,t.layoutBox,d.layoutBox,p);const v=Y();bn(v,n,h.layoutBox,p),Ac(f,v)||(u=!0),l.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=f,e.relativeParent=l)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function dm(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function hm(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function fm(e){e.clearSnapshot()}function ao(e){e.clearMeasurements()}function pm(e){e.isLayoutDirty=!0,e.updateLayout()}function co(e){e.isLayoutDirty=!1}function gm(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function mm(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function lo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vm(e){e.resolveTargetDelta()}function ym(e){e.calcProjection()}function bm(e){e.resetSkewAndRotation()}function xm(e){e.removeLeadSnapshot()}function uo(e,t,n){e.translate=j(t.translate,0,n),e.scale=j(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ho(e,t,n,r){e.min=j(t.min,n.min,r),e.max=j(t.max,n.max,r)}function Tm(e,t,n,r){ho(e.x,t.x,n.x,r),ho(e.y,t.y,n.y,r)}function wm(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Sm={duration:.45,ease:[.4,0,.1,1]},fo=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),po=fo("applewebkit/")&&!fo("chrome/")?Math.round:de;function go(e){e.min=po(e.min),e.max=po(e.max)}function Dm(e){go(e.x),go(e.y)}function Vc(e,t,n){return e==="position"||e==="preserve-aspect"&&!Wg(no(t),no(n),.2)}function Cm(e){return e!==e.root&&e.scroll?.wasRoot}const Em=Lc({attachResizeListener:(e,t)=>Et(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),or={current:void 0},jc=Lc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!or.current){const e=new Em({});e.mount(window),e.setOptions({layoutScroll:!0}),or.current=e}return or.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Bc=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Pm(e=!0){const t=m.useContext(us);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=m.useId();m.useEffect(()=>{if(e)return s(i)},[e]);const o=m.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Fc=m.createContext({strict:!1}),mo={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let vo=!1;function Om(){if(vo)return;const e={};for(const t in mo)e[t]={isEnabled:n=>mo[t].some(r=>!!n[r])};pc(e),vo=!0}function _c(){return Om(),vg()}function Im(e){const t=_c();for(const n in e)t[n]={...t[n],...e[n]};pc(t)}const Mm=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function xn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Mm.has(e)}let zc=e=>!xn(e);function Am(e){typeof e=="function"&&(zc=t=>t.startsWith("on")?!xn(t):e(t))}try{Am(require("@emotion/is-prop-valid").default)}catch{}function Rm(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||J(e[s])||(zc(s)||n===!0&&xn(s)||!t&&!xn(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const In=m.createContext({});function km(e,t){if(On(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ct(n)?n:void 0,animate:Ct(r)?r:void 0}}return e.inherit!==!1?t:{}}function Nm(e){const{initial:t,animate:n}=km(e,m.useContext(In));return m.useMemo(()=>({initial:t,animate:n}),[yo(t),yo(n)])}function yo(e){return Array.isArray(e)?e.join(" "):e}const Ns=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Hc(e,t,n){for(const r in t)!J(t[r])&&!Tc(r,n)&&(e[r]=t[r])}function Lm({transformTemplate:e},t){return m.useMemo(()=>{const n=Ns();return Rs(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Vm(e,t){const n=e.style||{},r={};return Hc(r,n,e),Object.assign(r,Lm(e,t)),r}function jm(e,t){const n={},r=Vm(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const $c=()=>({...Ns(),attrs:{}});function Bm(e,t,n,r){const s=m.useMemo(()=>{const i=$c();return wc(i,t,Dc(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Hc(i,e.style,e),s.style={...i,...s.style}}return s}const Fm=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ls(e){return typeof e!="string"||e.includes("-")?!1:!!(Fm.indexOf(e)>-1||/[A-Z]/u.test(e))}function _m(e,t,n,{latestValues:r},s,i=!1,o){const c=(o??Ls(e)?Bm:jm)(t,r,s,e),u=Rm(t,typeof e=="string",i),l=e!==m.Fragment?{...u,...c,ref:n}:{},{children:d}=t,h=m.useMemo(()=>J(d)?d.get():d,[d]);return m.createElement(e,{...l,children:h})}function zm({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Hm(n,r,s,e),renderState:t()}}function Hm(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=sn(i[h]);let{initial:o,animate:a}=e;const c=On(e),u=hc(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let l=n?n.initial===!1:!1;l=l||o===!1;const d=l?a:o;if(d&&typeof d!="boolean"&&!Pn(d)){const h=Array.isArray(d)?d:[d];for(let p=0;p<h.length;p++){const f=Cs(e,h[p]);if(f){const{transitionEnd:v,transition:y,...b}=f;for(const T in b){let w=b[T];if(Array.isArray(w)){const S=l?w.length-1:0;w=w[S]}w!==null&&(s[T]=w)}for(const T in v)s[T]=v[T]}}}return s}const Uc=e=>(t,n)=>{const r=m.useContext(In),s=m.useContext(us),i=()=>zm(e,t,r,s);return n?i():Fh(i)},$m=Uc({scrapeMotionValuesFromProps:ks,createRenderState:Ns}),Um=Uc({scrapeMotionValuesFromProps:Cc,createRenderState:$c}),Wm=Symbol.for("motionComponentSymbol");function Gm(e,t,n){const r=m.useRef(n);m.useInsertionEffect(()=>{r.current=n});const s=m.useRef(null);return m.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const o=r.current;if(typeof o=="function")if(i){const a=o(i);typeof a=="function"&&(s.current=a)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[t])}const Wc=m.createContext({});function Ze(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Km(e,t,n,r,s,i){const{visualElement:o}=m.useContext(In),a=m.useContext(Fc),c=m.useContext(us),u=m.useContext(Bc),l=u.reducedMotion,d=u.skipAnimations,h=m.useRef(null),p=m.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,skipAnimations:d,isSVG:i}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const f=h.current,v=m.useContext(Wc);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&qm(h.current,n,s,v);const y=m.useRef(!1);m.useInsertionEffect(()=>{f&&y.current&&f.update(n,c)});const b=n[ec],T=m.useRef(!!b&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return zh(()=>{p.current=!0,f&&(y.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),T.current&&f.animationState&&f.animationState.animateChanges())}),m.useEffect(()=>{f&&(!T.current&&f.animationState&&f.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),T.current=!1),f.enteringChildren=void 0)}),f}function qm(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:l,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Gc(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Ze(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u,layoutAnchor:l})}function Gc(e){if(e)return e.options.allowProjection!==!1?e.projection:Gc(e.parent)}function ar(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&Im(r);const i=n?n==="svg":Ls(e),o=i?Um:$m;function a(u,l){let d;const h={...m.useContext(Bc),...u,layoutId:Xm(u)},{isStatic:p}=h,f=Nm(u),v=o(u,p);if(!p&&typeof window<"u"){Ym();const y=Zm(h);d=y.MeasureLayout,f.visualElement=Km(e,v,h,s,y.ProjectionNode,i)}return g.jsxs(In.Provider,{value:f,children:[d&&f.visualElement?g.jsx(d,{visualElement:f.visualElement,...h}):null,_m(e,u,Gm(v,f.visualElement,l),v,p,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=m.forwardRef(a);return c[Wm]=e,c}function Xm({layoutId:e}){const t=m.useContext(ha).id;return t&&e!==void 0?t+"-"+e:e}function Ym(e,t){m.useContext(Fc).strict}function Zm(e){const t=_c(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Jm(e,t){if(typeof Proxy>"u")return ar;const n=new Map,r=(i,o)=>ar(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,ar(o,void 0,e,t)),n.get(o))})}const Qm=(e,t)=>t.isSVG??Ls(e)?new Ng(t):new Og(t,{allowProjection:e!==m.Fragment});class ev extends Ve{constructor(t){super(t),t.animationState||(t.animationState=Fg(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Pn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let tv=0;class nv extends Ve{constructor(){super(...arguments),this.id=tv++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:i,custom:o}=this.node.getProps();if(typeof i=="string"||typeof i=="object"&&i!==null&&!Array.isArray(i)){const a=qe(this.node,i,o);if(a){const{transition:c,transitionEnd:u,...l}=a;for(const d in l)this.node.getValue(d)?.jump(l[d])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const rv={animation:{Feature:ev},exit:{Feature:nv}};function Mt(e){return{point:{x:e.pageX,y:e.pageY}}}const sv=e=>t=>Os(t)&&e(t,Mt(t));function Tt(e,t,n,r){return Et(e,t,sv(n),r)}const Kc=({current:e})=>e?e.ownerDocument.defaultView:null,bo=(e,t)=>Math.abs(e-t);function iv(e,t){const n=bo(e.x,t.x),r=bo(e.y,t.y);return Math.sqrt(n**2+r**2)}const xo=new Set(["auto","scroll"]);class qc{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=$t(this.lastRawMoveEventInfo,this.transformPagePoint));const p=cr(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,v=iv(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!v)return;const{point:y}=p,{timestamp:b}=Z;this.history.push({...y,timestamp:b});const{onStart:T,onMove:w}=this.handlers;f||(T&&T(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,p)},this.handlePointerMove=(p,f)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=f,this.lastMoveEventInfo=$t(f,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(p,f)=>{this.end();const{onEnd:v,onSessionEnd:y,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=cr(p.type==="pointercancel"?this.lastMoveEventInfo:$t(f,this.transformPagePoint),this.history);this.startEvent&&v&&v(p,T),y&&y(p,T)},!Os(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const c=Mt(t),u=$t(c,this.transformPagePoint),{point:l}=u,{timestamp:d}=Z;this.history=[{...l,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,cr(u,this.history)),this.removeListeners=Pt(Tt(this.contextWindow,"pointermove",this.handlePointerMove),Tt(this.contextWindow,"pointerup",this.handlePointerUp),Tt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(xo.has(r.overflowX)||xo.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),B.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ne(this.updatePoint)}}function $t(e,t){return t?{point:t(e.point)}:e}function To(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cr({point:e},t){return{point:e,delta:To(e,Xc(t)),offset:To(e,ov(t)),velocity:av(t,.1)}}function ov(e){return e[0]}function Xc(e){return e[e.length-1]}function av(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Xc(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>oe(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>oe(t)*2&&(r=e[1]);const i=ue(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function cv(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?j(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?j(n,e,r.max):Math.min(e,n)),e}function wo(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lv(e,{top:t,left:n,bottom:r,right:s}){return{x:wo(e.x,n,s),y:wo(e.y,t,r)}}function So(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function uv(e,t){return{x:So(e.x,t.x),y:So(e.y,t.y)}}function dv(e,t){let n=.5;const r=ee(e),s=ee(t);return s>r?n=St(t.min,t.max-r,e.min):r>s&&(n=St(e.min,e.max-s,t.min)),we(0,1,n)}function hv(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Kr=.35;function fv(e=Kr){return e===!1?e=0:e===!0&&(e=Kr),{x:Do(e,"left","right"),y:Do(e,"top","bottom")}}function Do(e,t,n){return{min:Co(e,t),max:Co(e,n)}}function Co(e,t){return typeof e=="number"?e:e[t]||0}const pv=new WeakMap;class gv{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Y(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(Mt(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:p,dragPropagation:f,onDragStart:v}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Kp(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),be(b=>{let T=this.getAxisMotionValue(b).get()||0;if(Te.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[b];S&&(T=ee(S)*(parseFloat(T)/100))}}this.originPoint[b]=T}),v&&B.update(()=>v(d,h),!1,!0),jr(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:v,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:b}=h;if(f&&this.currentDirection===null){this.currentDirection=vv(b),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",h.point,b),this.updateAxis("y",h.point,b),this.visualElement.render(),y&&B.update(()=>y(d,h),!1,!0)},c=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new qc(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:r,contextWindow:Kc(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&B.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Ut(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=cv(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Ze(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=lv(r.layoutBox,t):this.constraints=!1,this.elastic=fv(n),s!==this.constraints&&!Ze(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&be(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=hv(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ze(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const i=wg(r,s.root,this.visualElement.getTransformPagePoint());let o=uv(s.layout.layoutBox,i);if(n){const a=n(bg(o));this.hasMutatedConstraints=!!a,a&&(o=mc(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=be(l=>{if(!Ut(l,n,this.currentDirection))return;let d=c&&c[l]||{};(o===!0||o===l)&&(d={min:0,max:0});const h=s?200:1e6,p=s?40:1e7,f={type:"inertia",velocity:r?t[l]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(l,f)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return jr(this.visualElement,t),r.start(Ds(t,r,0,n,this.visualElement,!1))}stopAnimation(){be(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){be(n=>{const{drag:r}=this.getProps();if(!Ut(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],c=i.get()||0;i.set(t[n]-j(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ze(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};be(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();s[o]=dv({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),be(o=>{if(!Ut(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];a.set(j(c,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;pv.set(this.visualElement,this);const t=this.visualElement.current,n=Tt(t,"pointerdown",u=>{const{drag:l,dragListener:d=!0}=this.getProps(),h=u.target,p=h!==t&&Qp(h);l&&d&&!p&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();Ze(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=mv(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),B.read(s);const a=Et(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(be(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),c&&c(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Kr,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Eo(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function mv(e,t,n){const r=Ni(e,Eo(n)),s=Ni(t,Eo(n));return()=>{r(),s()}}function Ut(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function vv(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class yv extends Ve{constructor(t){super(t),this.removeGroupControls=de,this.removeListeners=de,this.controls=new gv(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||de}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const lr=e=>(t,n)=>{e&&B.update(()=>e(t,n),!1,!0)};class bv extends Ve{constructor(){super(...arguments),this.removePointerDownListener=de}onPointerDown(t){this.session=new qc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Kc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:lr(t),onStart:lr(n),onMove:lr(r),onEnd:(i,o)=>{delete this.session,s&&B.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Tt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ur=!1;class xv extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),ur&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),on.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),ur=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||B.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Ps.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;ur=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Yc(e){const[t,n]=Pm(),r=m.useContext(ha);return g.jsx(xv,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(Wc),isPresent:t,safeToRemove:n})}const Tv={pan:{Feature:bv},drag:{Feature:yv,ProjectionNode:jc,MeasureLayout:Yc}};function Po(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&B.postRender(()=>i(t,Mt(t)))}class wv extends Ve{mount(){const{current:t}=this.node;t&&(this.unmount=Xp(t,(n,r)=>(Po(this.node,r,"Start"),s=>Po(this.node,s,"End"))))}unmount(){}}class Sv extends Ve{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pt(Et(this.node.current,"focus",()=>this.onFocus()),Et(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Oo(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&B.postRender(()=>i(t,Mt(t)))}class Dv extends Ve{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=tg(t,(s,i)=>(Oo(this.node,i,"Start"),(o,{success:a})=>Oo(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const qr=new WeakMap,dr=new WeakMap,Cv=e=>{const t=qr.get(e.target);t&&t(e)},Ev=e=>{e.forEach(Cv)};function Pv({root:e,...t}){const n=e||document;dr.has(n)||dr.set(n,{});const r=dr.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Ev,{root:e,...t})),r[s]}function Ov(e,t,n){const r=Pv(t);return qr.set(e,n),r.observe(e),()=>{qr.delete(e),r.unobserve(e)}}const Iv={some:0,all:1};class Mv extends Ve{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Iv[s]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:d}=this.node.getProps(),h=u?l:d;h&&h(c)};this.stopObserver=Ov(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Av(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function Av({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Rv={inView:{Feature:Mv},tap:{Feature:Dv},focus:{Feature:Sv},hover:{Feature:wv}},kv={layout:{ProjectionNode:jc,MeasureLayout:Yc}},Nv={...rv,...Rv,...Tv,...kv},Lv=Jm(Nv,Qm);function Io(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Vv({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const s=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,o]=m.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),a=m.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i,orientationHandler:null}),c=e?typeof e=="number"?e:e.scroll:null,u=e?typeof e=="number"?e:e.resize:null,l=m.useRef(!1);m.useEffect(()=>(l.current=!0,()=>{l.current=!1}));const[d,h,p]=m.useMemo(()=>{const b=()=>{if(!a.current.element)return;const{left:T,top:w,width:S,height:P,bottom:R,right:L,x:O,y:F}=a.current.element.getBoundingClientRect(),E={left:T,top:w,width:S,height:P,bottom:R,right:L,x:O,y:F};a.current.element instanceof HTMLElement&&r&&(E.height=a.current.element.offsetHeight,E.width=a.current.element.offsetWidth),Object.freeze(E),l.current&&!_v(a.current.lastBounds,E)&&o(a.current.lastBounds=E)};return[b,u?Io(b,u):b,c?Io(b,c):b]},[o,r,c,u]);function f(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",p,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function v(){a.current.element&&(a.current.resizeObserver=new s(p),a.current.resizeObserver.observe(a.current.element),t&&a.current.scrollContainers&&a.current.scrollContainers.forEach(b=>b.addEventListener("scroll",p,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{p()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const y=b=>{!b||b===a.current.element||(f(),a.current.element=b,a.current.scrollContainers=Zc(b),v())};return Bv(p,!!t),jv(h),m.useEffect(()=>{f(),v()},[t,p,h]),m.useEffect(()=>f,[]),[y,i,d]}function jv(e){m.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e])}function Bv(e,t){m.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",n,!0)}}},[e,t])}function Zc(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:s}=window.getComputedStyle(e);return[n,r,s].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...Zc(e.parentElement)]}const Fv=["x","y","top","bottom","left","right","width","height"],_v=(e,t)=>Fv.every(n=>e[n]===t[n]),Jc=m.createContext({}),zv={isLock:!1},Hv=e=>{const[t,n]=m.useState(zv.isLock);return z.createElement(Jc.Provider,{value:{isLock:t,lock:()=>n(!0),unlock:()=>n(!1)}},e.children)},At=m.createContext({}),Wt={dropTargetId:void 0,index:void 0},$v=e=>{const[t,n]=m.useState(Wt.dropTargetId),[r,s]=m.useState(Wt.index),i=(a,c)=>{n(a),s(c)},o=()=>{n(Wt.dropTargetId),s(Wt.index)};return z.createElement(At.Provider,{value:{dropTargetId:t,index:r,showPlaceholder:i,hidePlaceholder:o}},e.children)},Uv=(e,t)=>e.text>t.text?1:e.text<t.text?-1:0,Wv=(e={})=>({backends:[{id:"html5",backend:ah,options:e.html5,transition:Jl},{id:"touch",backend:vh,options:e.touch||{enableMouseEvents:!0},preview:!0,transition:Zl}]}),Qc=(e,t,n)=>{if(n===0)return 0;const r=e.filter(s=>s.parent===t);return r[n]?e.findIndex(s=>s.id===r[n].id):e.findIndex(s=>s.id===r[n-1].id)+1},el=(e,t,n)=>{if(n===0)return!1;const r=e.find(s=>s.id===n);return r===void 0?!1:r.parent===t?!0:el(e,t,r.parent)},Vs=e=>typeof e=="object"&&e!==null&&"id"in e&&"parent"in e&&"text"in e,Le=(e,t,n)=>{const{tree:r,rootId:s,canDrop:i}=n;if(e===null){if(t===s)return!0;const o=r.find(a=>a.id===t);return!!(o&&o.droppable)}else{const o=Vs(e)?e.id:null;if(i){const u=i(o,t);if(u!==void 0)return u}if(o===t)return!1;const a=r.find(u=>u.id===o),c=r.find(u=>u.id===t);return a===void 0||o===null?t===s||!!c?.droppable:c===void 0?a.parent!==0:a.parent===t||!c.droppable?!1:!el(r,o,t)}},Gv=(e,t)=>{const n=e.getBoundingClientRect(),r=n.top+n.height/2;return t>r?"down":"up"},Xr=(e,t)=>{let n="",r=0;return e.forEach((s,i)=>{const o=Gv(s,t.getClientOffset()?.y||0);n===""?n=o:n!==o&&(n=o,r=i),i===e.length-1&&o==="down"&&(r=i+1)}),r},Mo=(e,t,n)=>{const s=t.closest('[role="list"]')?.querySelectorAll(':scope > [role="listitem"]');return s?Xr(s,n):null},Kv=(e,t,n)=>{const r=e.getBoundingClientRect(),s=n.dropTargetOffset;if(s===0)return"middle";const i=r.top+s,o=r.bottom-s;return t>o?"lower":t<i?"upper":"middle"},Yr=(e,t,n,r)=>{if(!t)return null;if(e===null){const a=t.querySelectorAll(':scope > [role="listitem"]');return{id:r.rootId,index:Xr(a,n)}}const s=n.getItem(),i=t.querySelector('[role="list"]'),o=Kv(t,n.getClientOffset()?.y||0,r);if(i){if(o==="upper")if(Le(s,e.parent,r)){const c=Mo(e,t,n);return c===null?null:{id:e.parent,index:c}}else return{id:e.id,index:0};const a=i.querySelectorAll(':scope > [role="listitem"]');return{id:e.id,index:Xr(a,n)}}else{if(o==="middle")return{id:e.id,index:0};if(Le(s,e.parent,r)){const a=Mo(e,t,n);return a===null?null:{id:e.parent,index:a}}return null}},qv=(e,t)=>e.findIndex(n=>n.id===t),tl=(e,t,n,r)=>{const s=qv(e,t);let i=Qc(e,n,r);return i=i>s?i-1:i,[s,i]},ut=(e,t)=>e.find(n=>n.id===t),an=(e,t)=>e.some(n=>n.parent===t),Xv=(e,t,n)=>e.map(r=>r.id===t?{...r,parent:n}:r),Yv=(e,t,n)=>{const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const s=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(s,0,i)}},Zv=(e,t,n,r)=>{const[s,i]=tl(e,t,n,r),o=[...e];return Yv(o,s,i),o.map(a=>a.id===t?{...a,parent:n}:a)},nl=m.createContext({}),Jv=e=>{const[t,{handleToggle:n,handleCloseAll:r,handleOpenAll:s,handleOpen:i,handleClose:o}]=oy(e.tree,e.initialOpen);m.useImperativeHandle(e.treeRef,()=>({open:d=>i(d,e.onChangeOpen),close:d=>o(d,e.onChangeOpen),openAll:()=>s(e.onChangeOpen),closeAll:()=>r(e.onChangeOpen)}));const a=Ee().getMonitor(),c=e.canDrop,u=e.canDrag,l={extraAcceptTypes:[],listComponent:"ul",listItemComponent:"li",placeholderComponent:"li",sort:!0,insertDroppableFirst:!0,enableAnimateExpand:!1,dropTargetOffset:0,initialOpen:!1,...e,openIds:t,onDrop:(d,h,p)=>{if(d){const f={dragSourceId:d.id,dropTargetId:h,dragSource:d,dropTarget:ut(e.tree,h),monitor:a};let v=e.tree;if(ut(v,d.id)||(v=[...v,d]),e.sort===!1){const[,y]=tl(v,d.id,h,p);f.destinationIndex=y,f.relativeIndex=p,e.onDrop(Zv(v,d.id,h,p),f);return}e.onDrop(Xv(v,d.id,h),f)}else{const f={dropTargetId:h,dropTarget:ut(e.tree,h),monitor:a};e.sort===!1&&(f.destinationIndex=Qc(e.tree,h,p),f.relativeIndex=p),e.onDrop(e.tree,f)}},canDrop:c?(d,h)=>c(e.tree,{dragSourceId:d??void 0,dropTargetId:h,dragSource:a.getItem(),dropTarget:ut(e.tree,h),monitor:a}):void 0,canDrag:u?d=>u(ut(e.tree,d)):void 0,onToggle:d=>n(d,e.onChangeOpen)};return z.createElement(nl.Provider,{value:l},e.children)},Qv=e=>z.createElement(Jv,{...e},z.createElement(Hv,null,z.createElement($v,null,e.children))),je=()=>{const e=m.useContext(nl);if(!e)throw new Error("useTreeContext must be used under TreeProvider");return e},ey=(e,t)=>{const{rootId:n,rootProps:r,classes:s}=je();let i=s?.container||"";return t&&s?.dropTarget&&(i=`${i} ${s.dropTarget}`),e===n&&s?.root&&(i=`${i} ${s.root}`),e===n&&r?.className&&(i=`${i} ${r.className}`),i=i.trim(),i},ty=e=>{const t=m.useContext(Jc);m.useEffect(()=>{if(!e.current)return;const n=e.current,r=l=>{const{target:d}=l;(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)&&t.lock()},s=l=>{const{target:d}=l;(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)&&t.unlock()},i=l=>r(l),o=l=>s(l),a=l=>r(l),c=l=>s(l),u=new MutationObserver(()=>{document.activeElement===document.body&&t.unlock()});return u.observe(n,{subtree:!0,childList:!0}),n.addEventListener("mouseover",i),n.addEventListener("mouseout",o),n.addEventListener("focusin",a),n.addEventListener("focusout",c),()=>{u.disconnect(),n.removeEventListener("mouseover",i),n.removeEventListener("mouseout",o),n.removeEventListener("focusin",a),n.removeEventListener("focusout",c)}},[e,t]),m.useEffect(()=>{e.current?.setAttribute("draggable",t.isLock?"false":"true")},[e,t.isLock])},ny=(e,t,n)=>{t.current?n(t):n(e),m.useEffect(()=>{t.current?n(t):n(e)},[t.current])},Mn={TREE_ITEM:Symbol()};let rl=null;const sl=e=>{const{target:t}=e;if(t instanceof HTMLElement){const n=t.closest('[role="listitem"]');e.currentTarget===n&&(rl=n)}},Ao=e=>sl(e),Ro=e=>sl(e),ry=(e,t)=>{const n=je();m.useEffect(()=>{const o=t.current;return o?.addEventListener("dragstart",Ao),o?.addEventListener("touchstart",Ro,{passive:!0}),()=>{o?.removeEventListener("dragstart",Ao),o?.removeEventListener("touchstart",Ro)}},[t]);const[{isDragging:r},s,i]=Bd({type:Mn.TREE_ITEM,item:o=>{const a={ref:t,...e};return n.onDragStart&&n.onDragStart(a,o),a},end:(o,a)=>{const c=o;n.onDragEnd&&n.onDragEnd(c,a)},canDrag:()=>{const{canDrag:o}=n;return rl!==t.current?!1:o?o(e.id):!0},collect:o=>({isDragging:o.isDragging()})});return[r,s,i]},sy=(e,t)=>{const n=je(),r=m.useContext(At),[{isOver:s,dragSource:i},o]=Zo({accept:[Mn.TREE_ITEM,...n.extraAcceptTypes],drop:(a,c)=>{const{dropTargetId:u,index:l}=r;c.isOver({shallow:!0})&&u!==void 0&&l!==void 0&&n.onDrop(Vs(a)?a:null,u,l),r.hidePlaceholder()},canDrop:(a,c)=>{if(c.isOver({shallow:!0})){const u=Yr(e,t.current,c,n);return u===null?!1:Le(a,u.id,n)}return!1},hover:(a,c)=>{if(c.isOver({shallow:!0})){const{dropTargetId:u,index:l,showPlaceholder:d,hidePlaceholder:h}=r,p=Yr(e,t.current,c,n);if(p===null||!Le(a,p.id,n)){h();return}(p.id!==u||p.index!==l)&&d(p.id,p.index)}},collect:a=>{const c=a.getItem();return{isOver:a.isOver({shallow:!0})&&a.canDrop(),dragSource:c}}});return[s,i,o]},iy=e=>{const t=je(),n=m.useContext(At),[{isOver:r,dragSource:s},i]=Zo({accept:[Mn.TREE_ITEM,...t.extraAcceptTypes],drop:(o,a)=>{const{rootId:c,onDrop:u}=t,{dropTargetId:l,index:d}=n;a.isOver({shallow:!0})&&l!==void 0&&d!==void 0&&u(Vs(o)?o:null,c,d),n.hidePlaceholder()},canDrop:(o,a)=>{const{rootId:c}=t;return a.isOver({shallow:!0})?o===void 0?!1:Le(o,c,t):!1},hover:(o,a)=>{if(a.isOver({shallow:!0})){const{rootId:c}=t,{dropTargetId:u,index:l,showPlaceholder:d,hidePlaceholder:h}=n,p=Yr(null,e.current,a,t);if(p===null||!Le(o,c,t)){h();return}(p.id!==u||p.index!==l)&&d(p.id,p.index)}},collect:o=>{const a=o.getItem();return{isOver:o.isOver({shallow:!0})&&o.canDrop(),dragSource:a}}});return[r,s,i]},oy=(e,t)=>{const n=m.useMemo(()=>t===!0?e.filter(l=>an(e,l.id)).map(l=>l.id):Array.isArray(t)?t:[],[t]),[r,s]=m.useState(n);return m.useEffect(()=>s(n),[n]),[r,{handleToggle:(l,d)=>{const h=r.includes(l)?r.filter(p=>p!==l):[...r,l];s(h),d&&d(h)},handleCloseAll:l=>{s([]),l&&l([])},handleOpenAll:l=>{const d=e.filter(h=>an(e,h.id)).map(h=>h.id);s(d),l&&l(d)},handleOpen:(l,d)=>{let h=[];if(Array.isArray(l)){const p=e.filter(f=>l.includes(f.id)&&an(e,f.id));h=[...r,...p.map(f=>f.id)].filter((f,v,y)=>y.indexOf(f)===v)}else h=r.includes(l)?r:[...r,l];s(h),d&&d(h)},handleClose:(l,d)=>{const h=r.filter(p=>Array.isArray(l)?!l.includes(p):p!==l);s(h),d&&d(h)}}]},ay=()=>Fd(e=>{const t=e.getItemType();return{item:e.getItem(),clientOffset:e.getClientOffset(),isDragging:e.isDragging()&&t===Mn.TREE_ITEM}});function cy(e){const{isVisible:t,ease:n="easeIn",duration:r,variants:s={open:{opacity:1,height:"auto"},close:{opacity:0,height:0}},children:i}=e,[o,{height:a}]=Vv({polyfill:Bh}),[c,u]=m.useState(t),[l,d]=m.useState(t),[h,p]=m.useState(!1),f=()=>{p(!1),t||u(!1)};m.useEffect(()=>{p(!0),t?u(!0):d(!1)},[t]);const v=a===0;return m.useEffect(()=>{c&&d(!0)},[v]),z.createElement(Lv.div,{style:h?{overflow:"hidden"}:void 0,onAnimationComplete:f,initial:l?"open":"close",animate:l?"open":"close",inherit:!1,variants:s,transition:{ease:n,duration:ly(a,r)}},z.createElement("div",{ref:o},c&&i))}function ly(e,t){if(t)return t;if(!e)return 0;const n=e/36;return Math.round((4+10*n**.25+n/5)*10)/1500}const uy=e=>{const t=je(),n=m.useContext(At),r=m.useRef(null),s=m.useRef(null),i=t.tree.find(R=>R.id===e.id),{openIds:o,classes:a,enableAnimateExpand:c}=t,u=o.includes(e.id),[l,d,h]=ry(i,r),[p,f,v]=sy(i,r);ny(r,s,d),Le(f,e.id,t)&&v(r),m.useEffect(()=>{t.dragPreviewRender?h(oh(),{captureDraggingState:!0}):s.current&&h(r)},[h,t.dragPreviewRender]),ty(r);const y=m.useCallback(()=>{t.onToggle(i.id)},[i.id,t]),b=t.listItemComponent,T=t.canDrag?t.canDrag(e.id):!0,w=n.dropTargetId===e.id,S={depth:e.depth,isOpen:u,isDragging:l,isDropTarget:w,draggable:T,hasChild:an(t.tree,e.id),containerRef:r,handleRef:s,onToggle:y};let P="";return a?.listItem&&(P=typeof a.listItem=="string"?a.listItem:a.listItem(i,S)),p&&a?.dropTarget&&(P=`${P} ${a.dropTarget}`),l&&a?.draggingSource&&(P=`${P} ${a.draggingSource}`),z.createElement(b,{ref:r,className:P,role:"listitem"},t.render(i,S),c&&S.hasChild&&z.createElement(cy,{isVisible:u},z.createElement(Zr,{parentId:e.id,depth:e.depth+1})),!c&&S.hasChild&&u&&z.createElement(Zr,{parentId:e.id,depth:e.depth+1}))},ko=e=>{const{placeholderRender:t,placeholderComponent:n,classes:r}=je(),s=m.useContext(At),o=Ee().getMonitor(),a=o.getItem();if(!t||!a)return null;const c=e.dropTargetId===s.dropTargetId&&(e.index===s.index||e.index===void 0&&e.listCount===s.index),u=o.getTargetIds();return!c||!u.length?null:z.createElement(n,{className:r?.placeholder||""},t(a,{depth:e.depth}))},Zr=e=>{const t=je(),n=m.useRef(null),r=t.tree.filter(h=>h.parent===e.parentId);let s=r;const i=typeof t.sort=="function"?t.sort:Uv;if(t.insertDroppableFirst){let h=r.filter(f=>f.droppable),p=r.filter(f=>!f.droppable);t.sort===!1?s=[...h,...p]:(h=h.sort(i),p=p.sort(i),s=[...h,...p])}else t.sort!==!1&&(s=r.sort(i));const[o,a,c]=iy(n);e.parentId===t.rootId&&Le(a,t.rootId,t)&&c(n);const u=ey(e.parentId,o),l=t.rootProps||{},d=t.listComponent;return z.createElement(d,{ref:n,role:"list",...l,className:u},s.map((h,p)=>z.createElement(z.Fragment,{key:h.id},z.createElement(ko,{depth:e.depth,listCount:s.length,dropTargetId:e.parentId,index:p}),z.createElement(uy,{id:h.id,depth:e.depth}))),z.createElement(ko,{depth:e.depth,listCount:s.length,dropTargetId:e.parentId}))},dy={height:"100%",left:0,pointerEvents:"none",position:"fixed",top:0,width:"100%",zIndex:100},hy=e=>{const t=e.clientOffset;if(!t)return{};const{x:n,y:r}=t;return{pointerEvents:"none",transform:`translate(${n}px, ${r}px)`}},fy=()=>{const e=je(),t=ay(),{isDragging:n,clientOffset:r}=t;return!n||!r?null:z.createElement("div",{style:dy},z.createElement("div",{style:hy(t)},e.dragPreviewRender&&e.dragPreviewRender(t)))};function py(e,t){return z.createElement(Qv,{...e,treeRef:t},e.dragPreviewRender&&z.createElement(fy,null),z.createElement(Zr,{parentId:e.rootId,depth:0}))}const gy=m.forwardRef(py),my="_root_oow0e_1",vy="_isSelected_oow0e_9",yy="_expandIconWrapper_oow0e_12",by="_isOpen_oow0e_24",xy="_labelGridItem_oow0e_28",dt={root:my,isSelected:vy,expandIconWrapper:yy,isOpen:by,labelGridItem:xy},Ty=e=>{const t=e.depth*24,n=s=>{s.stopPropagation(),e.onToggle(e.node.id)},r=()=>e.onSelect(e.node);return g.jsxs("div",{className:`tree-node ${dt.root} ${e.isSelected?dt.isSelected:""} ${e.node.data?.marked?"bg-gray-200":""}`,style:{paddingInlineStart:t},onClick:r,children:[g.jsx("div",{className:`${dt.expandIconWrapper} ${e.isOpen?dt.isOpen:""}`,children:e.node.droppable&&g.jsx("div",{onClick:n,children:g.jsx(Dl,{size:18})})}),g.jsxs("div",{className:"flex items-center gap-2",children:[e.node.data?.isNavigation&&(e.node.data?.visible?g.jsx(Cl,{className:"size-5"}):g.jsx(El,{className:"size-5"})),g.jsx(ln,{name:e.node.data?.icon??"folder"})]}),g.jsx("div",{className:dt.labelGridItem,children:g.jsx("span",{children:e.node.text})}),e.loading&&g.jsx(Ue,{className:"size-4 animate-spin"})]})},wy="_root_ahb0f_1",Sy="_icon_ahb0f_15",Dy="_label_ahb0f_16",hr={root:wy,icon:Sy,label:Dy},Cy=e=>{const t=e.monitorProps.item;return g.jsxs("div",{className:`${hr.root} bg-chart-1/60`,children:[g.jsx("div",{className:hr.icon,children:g.jsx(ln,{name:t.data?.icon??"folder"})}),g.jsx("div",{className:hr.label,children:t.text})]})},Ey="_app_gsniw_1",Py="_draggingSource_gsniw_9",Oy="_placeholderContainer_gsniw_13",fr={app:Ey,draggingSource:Py,placeholderContainer:Oy},Iy="_root_rda6r_1",My={root:Iy},Ay=e=>{const t=e.depth*24;return g.jsx("div",{className:`${My.root} bg-chart-3`,style:{left:t}})},il=m.createContext({messages:{}}),Ry=({type:e,callback:t,parentId:n,isNavigation:r,...s})=>{const[i,o]=m.useState(!1),[a,c]=m.useState(!1),u=async l=>{try{(await K.post("",{data:{record:l,parentId:n,targetBlank:i,visible:a,_method:"select",type:e},_method:"createItem"})).data&&t()}catch(d){console.log(d)}};return g.jsxs("div",{className:"p-8",children:[g.jsxs("div",{className:"flex gap-4 flex-col",children:[g.jsxs("div",{className:`grid gap-4 ${s.items.length?"":"opacity-50 pointer-events-none"}`,children:[g.jsx(Me,{children:s.labels.selectTitle}),g.jsxs(Jr,{onValueChange:u,children:[g.jsx(Qr,{className:"w-full max-w-[170px] cursor-pointer",children:g.jsx(es,{placeholder:s.labels.selectTitle})}),g.jsx(ts,{className:"z-[1003]",children:s.items.map(l=>g.jsx(ns,{value:l.id.toString(),children:l.name},`${l.id}-${l.name}`))})]})]}),r&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex gap-4 items-center",children:[g.jsx(cn,{id:"targetBlank",checked:i,onCheckedChange:l=>o(!!l),className:"cursor-pointer size-5"}),g.jsx(Me,{htmlFor:"targetBlank",children:s.labels.openInNewWindow})]}),g.jsxs("div",{className:"flex gap-4 items-center",children:[g.jsx(cn,{id:"visible",checked:a,onCheckedChange:l=>c(!!l),className:"cursor-pointer size-5"}),g.jsx(Me,{htmlFor:"visible",children:s.labels.visible})]})]})]}),g.jsx("div",{className:"mt-8",children:g.jsx("span",{children:g.jsx("b",{children:s.labels.OR})})}),g.jsxs(Ie,{className:"mt-8",onClick:()=>s.add(s.model),children:[g.jsx(No,{}),s.labels.createTitle]})]})},Gt=({update:e=!1,type:t,parentId:n,...r})=>{const[s,i]=m.useState({}),[o,a]=m.useState(!1),[c,u]=m.useState(!1),[l,d]=m.useState(!1);m.useEffect(()=>{console.log(r)},[]),m.useEffect(()=>{r.item?(i({name:r.item.name||"",...Object.fromEntries(r.items.map(f=>[f.name,r.item?r.item[f.name]:""]))}),a(r.item.targetBlank||!1),u(r.item.visible||!1)):(i({name:"",...Object.fromEntries(r.items.map(f=>[f.name,""]))}),a(!1),u(!1))},[r.item,r.items]);const h=f=>{const{name:v,value:y}=f.target;i(b=>({...b,[v]:y}))},p=async f=>{f.preventDefault(),d(!0);try{let v=null;e?(v=await K.put("",{type:r.item?.type,modelId:r.item?.id,data:{...r.item,...s,targetBlank:o,visible:c},_method:"updateItem"}),r.callback(v.data.data)):(await K.post("",{data:{...s,targetBlank:o,visible:c,parentId:n,type:t},_method:"createItem"}),r.callback(null))}catch(v){console.error(v)}finally{d(!1)}};return g.jsxs("div",{className:"p-8",children:[g.jsxs("form",{className:"grid gap-6",id:"group-add",onSubmit:p,children:[g.jsxs("div",{className:"flex gap-4 items-center",children:[g.jsx(cn,{id:"targetBlank",checked:o,onCheckedChange:f=>a(!!f),className:"cursor-pointer size-5"}),g.jsx(Me,{htmlFor:"targetBlank",children:r.labels.openInNewWindow})]}),g.jsxs("div",{className:"flex gap-4 items-center",children:[g.jsx(cn,{id:"visible",checked:c,onCheckedChange:f=>u(!!f),className:"cursor-pointer size-5"}),g.jsx(Me,{htmlFor:"visible",children:r.labels.visible})]}),g.jsxs("div",{className:"grid gap-4",children:[g.jsx(Me,{htmlFor:"name",children:r.labels.title}),g.jsx(pr,{required:!0,value:s.name||"",name:"name",placeholder:r.labels.title,onChange:h})]}),r.items.map(f=>g.jsxs("div",{className:"grid gap-4",children:[g.jsx(Me,{children:f.label}),g.jsx(pr,{required:f.required,value:s[f.name]||"",name:f.name,placeholder:f.label,onChange:h})]},f.name))]}),g.jsxs(Ie,{className:"mt-8 w-fit",form:"group-add",type:"submit",disabled:l,children:[r.labels.save,l&&g.jsx(Ue,{className:"h-4 w-4 animate-spin ml-2"})]})]})},ky=({items:e,onSelect:t})=>{const n=m.useContext(il),[r,s]=m.useState(""),i=o=>{s(o),t(o),s("")};return g.jsxs("div",{className:"p-8",children:[g.jsx(Me,{className:"mb-4",children:n.messages["Select Item type"]}),g.jsxs(Jr,{onValueChange:i,value:r,children:[g.jsx(Qr,{className:"w-full max-w-[170px] cursor-pointer",children:g.jsx(es,{placeholder:n.messages["Select Ids"]})}),g.jsx(ts,{className:"z-[1005]",children:e.map(o=>g.jsx(ns,{value:o.type,children:o.name},`${o.type}-${o.name}`))})]})]})},Ny=({dialogRef:e,PopupEvent:t,firstRender:n,secondRender:r,popupType:s,addProps:i,editModel:o,popUpTargetBlank:a,popUpVisible:c,isNavigation:u,messages:l,DynamicComponent:d,DynamicActionComponent:h,addLinksGroupProps:p,reloadCatalog:f,itemType:v,parentid:y,addItemProps:b,getAddModelJSON:T,addModel:w,items:S,selectCatalogItem:P})=>g.jsxs(Pl,{ref:e,children:[g.jsx(Ol,{}),g.jsxs(Il,{children:[g.jsx(_n,{children:g.jsxs("div",{className:"relative h-full",children:[t==="create"&&g.jsxs(g.Fragment,{children:[n&&g.jsx(Ue,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-8 animate-spin"}),g.jsx(ky,{items:S,onSelect:P})]}),t==="update"&&g.jsx("div",{className:"h-full overflow-y-auto mt-5",children:n?g.jsx(Ue,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-8 animate-spin"}):g.jsxs(g.Fragment,{children:[s==="model.link"&&g.jsx(Lt,{page:i,catalog:!0,callback:o,openNewWindowLabel:l["Open in a new window"],visibleLable:l.Visible,openNewWindow:a,DnavVisible:c,isNavigation:u}),s==="model"&&g.jsx(Lt,{page:i,catalog:!0,callback:o,openNewWindowLabel:l["Open in a new window"],visibleLable:l.Visible,openNewWindow:a,DnavVisible:c,isNavigation:u}),s==="navigation.group"&&g.jsx(Gt,{callback:R=>{e.current?.close(),f(R)},update:!0,type:"group",...p}),s==="navigation.link"&&g.jsx(Gt,{callback:R=>{e.current?.close(),f(R)},update:!0,type:"link",...p}),s==="component"&&g.jsx(g.Fragment,{children:d})]})}),t==="action"&&g.jsx(g.Fragment,{children:h})]})}),g.jsx(_n,{children:g.jsxs("div",{className:"relative h-full",children:[r&&g.jsx(Ue,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-8 animate-spin"}),t==="create"&&g.jsxs(g.Fragment,{children:[s==="model.link"&&g.jsx(Ry,{add:T,callback:()=>{e.current?.close(),f(null)},type:v??"",parentId:y,isNavigation:u,...b}),s==="model"&&g.jsx("div",{className:"h-full overflow-y-auto mt-5",children:g.jsx(Lt,{page:i,catalog:!0,callback:w,openNewWindowLabel:l["Open in a new window"],visibleLable:l.Visible,isNavigation:u})}),s==="navigation.group"&&g.jsx(Gt,{callback:R=>{e.current?.close(),f(R)},type:"group",parentId:y,...p}),s==="navigation.link"&&g.jsx(Gt,{callback:R=>{e.current?.close(),f(R)},type:"link",parentId:y,...p}),s==="component"&&g.jsx(g.Fragment,{children:d})]})]})}),g.jsx(_n,{children:g.jsx("div",{className:"h-full overflow-y-auto mt-5",children:g.jsx(Lt,{page:i,catalog:!0,callback:w,openNewWindowLabel:l["Open in a new window"],visibleLable:l.Visible,isNavigation:u})})})]})]}),Ly=()=>{const e=m.useRef(null),t=m.useRef(null),[n,r]=m.useState([]),[s,i]=m.useState([]),[o,a]=m.useState({catalogId:"",catalogName:"",catalogSlug:"",idList:[],nodes:[],movingGroupsRootOnly:!1}),{t:c}=Ml(),u=new Proxy({},{get:(x,C)=>c(String(C))}),[l,d]=m.useState([]),[h,p]=m.useState(!1),f=m.useRef(null),[v,y]=m.useState({items:[],model:"",labels:{}}),[b,T]=m.useState({items:[],labels:{}}),[w,S]=m.useState(""),[P,R]=m.useState(null),[L,O]=m.useState(null),[F,E]=m.useState(null),[V,$]=m.useState(0),[Se,ne]=m.useState(!1),[he,re]=m.useState(!1),[An,X]=m.useState(!1),[te,me]=m.useState(null),[Pe,Rn]=m.useState(null),[at,ol]=m.useState([]),[kn,js]=m.useState([]),[al,Bs]=m.useState(!1),[cl,Nn]=m.useState(!1),[ll,Ln]=m.useState({props:{actions:[],btnBack:{link:"",title:""},btnSave:{title:""},edit:!1,fields:[],notFound:"",postLink:"",search:"",view:!1}}),[ul,ve]=m.useState(!1),[dl,Fs]=m.useState(!1);m.useEffect(()=>{const x=async()=>{const I=await K.post("",{_method:"getCatalog"}),{catalog:N,items:M,toolsActions:H}=I.data;a(N),d(M),r(N.nodes),ol(H),X(N.catalogSlug==="navigation")};(async()=>{try{p(!0),await x()}catch(I){console.error("Error initializing catalog:",I)}finally{p(!1)}})()},[]),m.useEffect(()=>{o.idList.length===1&&!o.catalogId&&o.catalogSlug&&Us.get(`${window.routePrefix}/catalog/${o.catalogSlug}/${o.idList[0]}`)},[o.catalogId,o.catalogSlug,o.idList]);const _s=x=>{s.find(I=>I.id===x.id)?($(0),i(s.filter(I=>I.id!==x.id))):($(x.id),i([...s,x]))},hl=x=>{x.target===x.currentTarget&&i([])},fl=m.useCallback(async(x,{dragSourceId:C,dropTargetId:I})=>{try{const N=x.find(_=>_.id===C),M=I||0,H={data:{reqNode:[{id:N?.id,parent:M,text:N?.text,data:N?.data}],reqParent:{id:M,children:x.filter(_=>_.parent===M).map(_=>({id:_.id,text:_.text,data:_.data})),data:M===0?{id:0}:x.find(_=>_.id===M)?.data}},_method:"updateTree"};r(x),await K.put("",H)}catch(N){console.error("Error updating tree:",N)}},[n]),Vn=m.useCallback(async(x,C)=>{if(C)try{R(x);const I=n.find(H=>H.id===x),M=(await K.post("",{data:I,_method:"getChilds"})).data.data;r(H=>{const _=new Set(H.map(U=>U.id)),G=M.filter(U=>!_.has(U.id));return G.length===0?H:[...H,...G]})}catch(I){console.error("Error loading child nodes:",I)}finally{R(null)}},[n]),pl=m.useCallback(async()=>{try{const x=await K.post("",{_method:"getCatalog"}),{catalog:C}=x.data;r(I=>{const N=new Map(I.map(G=>[G.id,G])),M=C.nodes,H=I.map(G=>{const U=M.find(Fn=>Fn.id===G.id);return U&&U.text!==G.text?U:G}),_=M.filter(G=>!N.has(G.id)||N.get(G.id)?.text!==G.text);return _.length===0&&H.length===I.length&&H.every((G,U)=>G===I[U])?I:[...H,..._]})}catch(x){console.error("Error reloading catalog:",x)}},[]),Rt=m.useCallback(async x=>{x?r(C=>C.map(I=>I.id===x.id?{...I,text:x.name,data:{...I.data,...x}}:I)):s[0]?.droppable?(e.current?.open(s[0].id),await Vn(s[0].id,!0)):await pl()},[s,Vn,r]),gl=m.useCallback(async x=>{O(x),ve(!0);const C=await K.post("",{type:x,_method:"getAddTemplate"});C.data.type==="model"?(S("model"),await Hs(C.data.data.model)):(vl(C.data),f.current?.next()),ve(!1)},[V]),zs=m.useCallback(async()=>{try{ve(!0);const x=await K.post("",{type:s[0]?.data?.type,modelId:s[0]?.data?.modelId??null,id:s[0]?.data?.id,_method:"getEditTemplate"});if(x.data)if(x.data.type.includes("navigation"))switch(x.data.type){case"navigation.group":T(x.data.data),S("navigation.group"),ve(!1);break;case"navigation.link":T(x.data.data),S("navigation.link"),ve(!1);break}else switch(x.data.type){case"model.link":const C=x.data.data.item,I=x.data.data.model??C.type??s[0]?.data?.type;if(!I){kt.error("Unable to determine model for edit form"),ve(!1);break}const N=await K.get(`${window.routePrefix}/model/${I}/edit/${C.modelId}?without_layout=true`);Ln(N.data),ne(C.targetBlank),re(C.visible),S("model.link"),ve(!1);break;case"model":const M=x.data.data.item,H=x.data.data.model??M.type??s[0]?.data?.type;if(!H){kt.error("Unable to determine model for edit form"),ve(!1);break}const _=await K.get(`${window.routePrefix}/model/${H}/edit/${M.modelId}?without_layout=true`);Ln(_.data),ne(M.targetBlank),re(M.visible),S("model"),ve(!1);break;default:(async()=>{const Fn=(await import(x.data.data.path)).default;me(g.jsx(Fn,{callback:Sl=>{f.current?.close(),Rt(Sl)},update:!0,item:x.data.data.item},`${x.data.data.id}-${x.data.data.item.name}`))})(),S("component"),ve(!1);break}}catch(x){console.log(x)}},[s]),ml=m.useCallback(async()=>{if(s.length)try{for(const x of s)if((await K.delete("",x)).data.data.ok){let I=[...n];const N=(M,H)=>{let _=H.filter(U=>U.id!==M);return H.filter(U=>U.parent===M).forEach(U=>{_=N(U.id,_)}),_};s.forEach(M=>{I=N(M.id,I)}),r(I)}}catch(x){console.error("Error deleting node:",x)}finally{i([]),$(0)}},[s,n]),vl=m.useCallback(x=>{if(x.type.includes("navigation"))switch(x.type){case"model.link":y(x.data),S("model.link");break;case"navigation.group":T(x.data),S("navigation.group");break;case"navigation.link":T(x.data),S("navigation.link");break}else switch(x.type){case"model.link":y(x.data),S("model.link");break;case"model":y(x.data),S("model");break;default:(async()=>{const N=(await import(x.data.path)).default;me(g.jsx(N,{parentId:V,callback:M=>{f.current?.close(),Rt(M)}},JSON.stringify(new Date)))})(),S("component");break}},[s,An]),Hs=m.useCallback(async x=>{Fs(!0);const C=await K.get(`${window.routePrefix}/model/${x}/add?without_layout=true'`);Ln(C.data),f.current?.next(),Fs(!1)},[L]),yl=async(x,C,I)=>{C&&(x.targetBlank=C),I&&(x.visible=I);try{await K.post("",{data:{record:x,parentId:V,type:L},_method:"createItem"})}catch(N){console.log(N)}finally{f.current?.close(),Rt()}},bl=m.useCallback(async(x,C,I)=>{C&&(x[0].targetBlank=C),I&&(x[0].visible=I),x[0].treeId=s[0]?.data?.id;try{const N=await K.put("",{type:s[0]?.data?.type,data:{record:x[0]},modelId:s[0]?.data?.modelId,_method:"updateItem"});r(M=>{const{modelId:H,type:_,name:G}=N.data.data;return H===void 0||_===void 0?(console.warn("No modelId or type in response!"),M):M.map(U=>U.data?.modelId===H&&U.data?.type===_?{...U,text:G,data:{...U.data,...N.data.data,visible:N.data.data.visible??!1}}:U)})}catch(N){console.error("Error updating model:",N)}finally{f.current?.close()}},[s,r,n]),$s=async x=>{if(i([]),Nn(!0),!x.trim()){const C=await K.post("",{_method:"getCatalog"}),{catalog:I}=C.data;r(I.nodes),requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.current&&(e.current.closeAll?.(),Nn(!1))})});return}try{const C=await K.post("",{s:x,_method:"search"});r(C.data.data),requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.current&&(e.current.openAll?.(),Nn(!1))})})}catch(C){console.error("Error searching:",C)}},xl=Gl($s,500),Tl=m.useCallback((x,C)=>{if(x){const I=s.some(N=>N.id===C.id);i([]),I||(_s(C),wl(C))}},[]),wl=m.useCallback(async x=>{js([]),Bs(!0);try{const C=await K.post("",{items:[x],type:"context",_method:"getActions"});C.data&&C?.data?.data?.length&&js(C.data.data)}catch(C){console.error(C)}finally{Bs(!1)}},[]),jn=m.useCallback(async x=>{const C=at.find(N=>N.id===x)??kn.find(N=>N.id===x);if(!C)return;let I=null;switch(C.type){case"link":try{I=await K.put("",{actionId:C.id,_method:"getLink"}),I.data&&window.open(`${I.data.data}`,"_blank")?.focus()}catch(M){console.error(M)}break;case"basic":let N={actionID:C.id,items:s,data:""};try{kt.warning(u["Performing an action..."]),await K.put("",{data:N,_method:"handleAction"})}catch(M){console.error(M)}finally{kt.success(u["Action completed"])}break;case"external":try{const M=await K.put("",{actionId:C.id,_method:"getPopUpTemplate"});M.data&&((async()=>{const G=(await import(M.data.data)).default;Rn(g.jsx(G,{items:s,callback:()=>{f.current?.close()}},JSON.stringify(s)))})(),f.current?.open(),E("action"))}catch(M){console.error(M)}break}},[at,s,kn]),Bn=o.catalogId||(o.idList.length===1?o.idList[0]:"");return g.jsx(g.Fragment,{children:h?g.jsxs(g.Fragment,{children:[g.jsx(zn,{className:"h-12 w-1/4 rounded-md"}),g.jsx(zn,{className:"h-12 w-full rounded-md"}),g.jsx(zn,{className:"h-full w-full rounded-md"})]}):g.jsxs(il.Provider,{value:{messages:u},children:[g.jsx(Al,{position:"top-center",richColors:!0,closeButton:!0}),g.jsxs("div",{className:"flex gap-8 items-center mb-4",children:[g.jsx("h1",{className:"text-[28px] leading-[36px] text-foreground",children:o.catalogName}),o.idList.length===1&&Bn&&g.jsx(Rl,{variant:"secondary",className:"px-3 py-1 text-sm",children:Bn}),o.idList.length>1&&g.jsxs(Jr,{value:Bn,onValueChange:x=>{Us.get(`${window.routePrefix}/catalog/${o.catalogSlug}/${x}`)},children:[g.jsx(Qr,{className:"w-full max-w-[170px] cursor-pointer",children:g.jsx(es,{placeholder:u["Select Ids"]})}),g.jsx(ts,{children:o.idList.map(x=>g.jsx(ns,{value:x,children:x},x))})]})]}),g.jsxs("div",{className:"xl:gap-10 justify-between flex flex-col xl:flex-row gap-3.5",children:[g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsxs("div",{className:"flex gap-2 items-center flex-wrap md:flex-nowrap",children:[g.jsxs(Ie,{variant:"default",size:"sm",className:`w-fit rounded-sm ${s.length===0||s.length===1&&s[0]?.droppable?"":"opacity-50 pointer-events-none"}`,onClick:()=>{E("create"),f.current?.open()},children:[g.jsx(No,{}),u.create]}),g.jsxs(Ie,{variant:"outline",size:"sm",className:`w-fit cursor-pointer rounded-sm ${s.length>1||!s.length?"opacity-50 pointer-events-none":""}`,onClick:()=>{zs(),E("update"),f.current?.open()},children:[g.jsx(kl,{}),u.Edit]}),g.jsx(Kl,{btnTitle:u.Delete,ref:t,variant:"destructive",btnCLass:`w-fit text-white hover ${s.length?"":"opacity-50 pointer-events-none"}`,delModal:{yes:u.Yes,no:u.No,text:u["Are you sure?"]},isLink:!1,handleDelete:ml}),g.jsxs(Ie,{variant:"secondary",size:"sm",className:`w-fit cursor-pointer rounded-sm ${s.length?"":"opacity-50 pointer-events-none"}`,onClick:()=>{$(0),i([])},children:[g.jsx(Nl,{}),u.Clean]})]}),g.jsxs("div",{className:"ml-4",children:[g.jsx("div",{className:"hidden lg:flex gap-2",children:at.map(x=>g.jsxs(Ie,{variant:"outline",size:"sm",onClick:()=>jn(x.id),children:[g.jsx(ln,{name:x.icon}),x.name]},x.id))}),at.length>0&&g.jsx("div",{className:"block lg:hidden",children:g.jsxs(Ll,{children:[g.jsx(Vl,{asChild:!0,children:g.jsx(Ie,{variant:"outline",size:"icon",children:g.jsx(jl,{})})}),g.jsx(Bl,{className:"w-fit",side:"right",align:"start",children:g.jsx(Fl,{className:"grid gap-2",children:at.map(x=>g.jsxs(Ie,{variant:"outline",size:"sm",onClick:()=>jn(x.id),children:[g.jsx(ln,{name:x.icon}),x.name]},x.id))})})]})})]})]}),g.jsxs("div",{className:"flex gap-2 items-center justify-start xl:justify-end",children:[cl&&g.jsx(Ue,{className:"size-4 animate-spin order-2 xl:order-1"}),g.jsx(pr,{type:"search",autoFocus:!1,placeholder:u.Search,className:"w-[200px] p-2 border rounded order-1 xl:order-2",onChange:x=>{xl(x.target.value)},onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),$s(x.currentTarget.value))}})]})]}),g.jsx("div",{className:"h-full",children:g.jsx(gd,{backend:Yl,options:Wv(),children:g.jsx("div",{className:fr.app,children:g.jsx(gy,{ref:e,tree:n,rootId:0,render:(x,{depth:C,isOpen:I,onToggle:N})=>g.jsxs(_l,{onOpenChange:M=>Tl(M,x),children:[g.jsx(zl,{children:g.jsx(Ty,{node:x,depth:C,isOpen:I,loading:P===x.id,isSelected:!!s.find(M=>M.id===x.id),onToggle:M=>{N(),Vn(M,!I)},onSelect:_s})}),g.jsxs(Hl,{children:[g.jsx(Nt,{className:`${s[0]?.droppable?"":"opacity-50 pointer-events-none"}`,onClick:()=>{E("create"),f.current?.open()},children:u.create}),g.jsx(Nt,{onClick:()=>{zs(),E("update"),f.current?.open()},children:u.Edit}),g.jsx(Nt,{variant:"destructive",onClick:()=>{document.body.removeAttribute("style"),t.current?.click()},className:s.length?"":"opacity-50 pointer-events-none",children:u.Delete}),al?g.jsx(Ue,{className:"mx-auto size-3 animate-spin"}):kn.map(M=>g.jsx(Nt,{onClick:()=>jn(M.id),children:M.name},M.id))]})]}),dropTargetOffset:5,insertDroppableFirst:!1,classes:{draggingSource:fr.draggingSource,dropTarget:"bg-chart-1/30",placeholder:fr.placeholderContainer,root:"py-4"},canDrop:(x,{dragSource:C,dropTargetId:I})=>{if(C?.parent===I)return!0},sort:!1,dragPreviewRender:x=>g.jsx(Cy,{monitorProps:x}),onDrop:fl,placeholderRender:(x,{depth:C})=>g.jsx(Ay,{node:x,depth:C}),rootProps:{onClick:hl}})})})}),g.jsx(Ny,{dialogRef:f,PopupEvent:F,firstRender:ul,secondRender:dl,popupType:w,addProps:ll,editModel:bl,popUpTargetBlank:Se,popUpVisible:he,isNavigation:An,messages:u,DynamicComponent:te,DynamicActionComponent:Pe,addLinksGroupProps:b,reloadCatalog:Rt,itemType:L,parentid:V,addItemProps:v,getAddModelJSON:Hs,addModel:yl,items:l,selectCatalogItem:gl})]})})},Vy=[];function ib(){return g.jsx($l,{breadcrumbs:Vy,children:g.jsx("div",{className:"flex h-full flex-1 flex-col gap-4 rounded-xl p-4",children:g.jsx(Ly,{})})})}export{ib as default};
|