adminizer 4.2.0 → 4.3.0-build.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/assets/add-BNb5A_qF.js +1 -0
  2. package/assets/{add-form-BjackXJe.js → add-form-CGi_qv3J.js} +1 -1
  3. package/assets/add-group-RRjHTu93.js +1 -0
  4. package/assets/{add-group-form-YI6KS37x.js → add-group-form-DSd4UrnU.js} +1 -1
  5. package/assets/add-user-DSuvcKp6.js +1 -0
  6. package/assets/{add-user-form-bv5BNX5A.js → add-user-form-BAssKDpI.js} +1 -1
  7. package/assets/{app-CVnUv8s_.css → app-GsYdx39W.css} +1 -1
  8. package/assets/{app-layout-DecN527i.js → app-layout-ContoN1K.js} +1 -1
  9. package/assets/{app-sidebar-4JFP8UdU.js → app-sidebar-D7l5BJPV.js} +1 -1
  10. package/assets/app-sidebar-header-CK8t32cm.js +1 -0
  11. package/assets/app.js +13 -13
  12. package/assets/{breadcrumbs-Bo2z-LNC.js → breadcrumbs-DnNOEnT4.js} +1 -1
  13. package/assets/{catalog-DVyrGTNR.js → catalog-BavcTVb4.js} +1 -1
  14. package/assets/{dashboard-Dy3pk9t7.js → dashboard-xr-OyVyG.js} +1 -1
  15. package/assets/{date-picker-B2z-aeuv.js → date-picker-DBHnomTY.js} +1 -1
  16. package/assets/{del-modal-l3LxJWCN.js → del-modal-BeF4r3gk.js} +1 -1
  17. package/assets/{field-renderer-BHo944Cn.js → field-renderer-Sd68OLyc.js} +3 -3
  18. package/assets/form-C9P9m_9q.js +1 -0
  19. package/assets/{form-hP8sjbND.js → form-DomTBI89.js} +1 -1
  20. package/assets/home-BWHeZm-1.js +2 -0
  21. package/assets/{icon-C_X2cQ6W.js → icon-ChQBPA5l.js} +1 -1
  22. package/assets/{init-user-DgCD4ZN1.js → init-user-DqMDju_E.js} +1 -1
  23. package/assets/input-error-g1h6ps7t.js +1 -0
  24. package/assets/list-EEgAn-nx.js +1 -0
  25. package/assets/{list-table-_OiQmr2A.js → list-table-Br0K3rXg.js} +1 -1
  26. package/assets/login-CUDpGsHl.js +1 -0
  27. package/assets/manifest.json +97 -64
  28. package/assets/material-icon-BIcI8APG.js +1 -0
  29. package/assets/media-manager-CTstvyHm.js +14 -0
  30. package/assets/{module-Ceq6vuwa.js → module-CpZBs0fN.js} +1 -1
  31. package/assets/{multi-select-BbKSrMw2.js → multi-select-BFWbEjH-.js} +1 -1
  32. package/assets/{nav-footer-B8gMV6Wp.js → nav-footer-bO8D-Yir.js} +1 -1
  33. package/assets/{nav-main-BUp9qA8R.js → nav-main-DVgvko8g.js} +1 -1
  34. package/assets/{nav-user-DeF3SDRj.js → nav-user-vIwYShwE.js} +1 -1
  35. package/assets/notification-BTXEslqa.js +1 -0
  36. package/assets/{pagination-render-B9U_hVbB.js → pagination-render-rZ5_6g0n.js} +1 -1
  37. package/assets/{register-C6acWsLe.js → register-Kfu8zmmu.js} +1 -1
  38. package/assets/tabs-CwgzWt48.js +1 -0
  39. package/assets/{theme-switcher-D8T9NgWG.js → theme-switcher-fzVA8btX.js} +1 -1
  40. package/assets/{user-info-CAgkqARx.js → user-info-Db5Y8KeN.js} +1 -1
  41. package/assets/{user-menu-content-BxL0QMC9.js → user-menu-content-Bc8YNZPf.js} +1 -1
  42. package/assets/{welcome-Dk7GoS5R.js → welcome-MKPFhPtG.js} +1 -1
  43. package/controllers/add.js +2 -0
  44. package/controllers/edit.js +14 -0
  45. package/controllers/login.js +56 -21
  46. package/controllers/media-manager/mediaManagerApi.js +1 -1
  47. package/controllers/notifications/NotificationController.d.ts +11 -0
  48. package/controllers/notifications/NotificationController.js +203 -0
  49. package/controllers/remove.js +2 -0
  50. package/files/favicon.png +0 -0
  51. package/helpers/diffHelpers.d.ts +2 -0
  52. package/helpers/diffHelpers.js +24 -0
  53. package/helpers/inertiaAutHelper.js +19 -0
  54. package/index.d.ts +2 -0
  55. package/index.js +2 -0
  56. package/interfaces/adminpanelConfig.d.ts +18 -0
  57. package/interfaces/types.d.ts +22 -0
  58. package/lib/Adminizer.d.ts +18 -2
  59. package/lib/Adminizer.js +61 -1
  60. package/lib/media-manager/AbstractMediaManager.js +2 -2
  61. package/lib/v4/model/adapter/sequelize.js +4 -0
  62. package/lib/v4/model/adapter/typeorm.d.ts +1 -0
  63. package/lib/v4/model/adapter/typeorm.js +21 -1
  64. package/lib/v4/notifications/AbstractNotificationService.d.ts +22 -0
  65. package/lib/v4/notifications/AbstractNotificationService.js +149 -0
  66. package/lib/v4/notifications/GeneralNotificationService.d.ts +8 -0
  67. package/lib/v4/notifications/GeneralNotificationService.js +56 -0
  68. package/lib/v4/notifications/NotificationHandler.d.ts +69 -0
  69. package/lib/v4/notifications/NotificationHandler.js +127 -0
  70. package/lib/v4/notifications/SystemNotificationService.d.ts +18 -0
  71. package/lib/v4/notifications/SystemNotificationService.js +123 -0
  72. package/models/NotificationAP.d.ts +36 -0
  73. package/models/NotificationAP.js +22 -0
  74. package/models/UserNotificationAP.d.ts +26 -0
  75. package/models/UserNotificationAP.js +18 -0
  76. package/package.json +13 -5
  77. package/system/Router.js +18 -0
  78. package/system/bindAssets.js +1 -0
  79. package/system/bindInertia.js +5 -0
  80. package/system/bindMediaManager.js +2 -1
  81. package/system/bindNavigation.js +2 -3
  82. package/system/bindNotifications.d.ts +2 -0
  83. package/system/bindNotifications.js +14 -0
  84. package/system/defaults.js +6 -0
  85. package/translations/ar.json +5 -4
  86. package/translations/cn.json +5 -4
  87. package/translations/de.json +72 -71
  88. package/translations/en.json +5 -4
  89. package/translations/es.json +5 -4
  90. package/translations/fr.json +5 -4
  91. package/translations/hi.json +5 -4
  92. package/translations/jp.json +5 -4
  93. package/translations/ko.json +5 -4
  94. package/translations/pt.json +5 -4
  95. package/translations/ru.json +2 -1
  96. package/translations/ua.json +5 -4
  97. package/translations/uz.json +73 -72
  98. package/translations/vi.json +5 -4
  99. package/assets/add-DOaZgoTz.js +0 -1
  100. package/assets/add-group-Br44s2D6.js +0 -1
  101. package/assets/add-user-DWcH0s9-.js +0 -1
  102. package/assets/app-sidebar-header-CIKLfLsF.js +0 -1
  103. package/assets/form-BXfnz6h5.js +0 -1
  104. package/assets/home-BD4MWmm9.js +0 -2
  105. package/assets/input-error-Bab-HPbn.js +0 -1
  106. package/assets/list-C-27EH39.js +0 -1
  107. package/assets/login-jzvVXgAV.js +0 -1
  108. package/assets/material-icon-DsiW0iQG.js +0 -1
  109. package/assets/media-manager-CSB_XRcE.js +0 -14
@@ -1 +1 @@
1
- import{c as d,j as r,b5 as b,b6 as m,r as u,b7 as h,b8 as x,b9 as o,$ as j,ba as p}from"./app.js";function f(l){const e=d.c(4),{breadcrumbs:t}=l;let s;e[0]!==t?(s=t.length>0&&r.jsx(b,{children:r.jsx(m,{children:t.map((c,n)=>{const i=n===t.length-1;return r.jsxs(u.Fragment,{children:[r.jsx(h,{children:i?r.jsx(x,{children:c.title}):r.jsx(o,{asChild:!0,children:r.jsx(j,{href:c.href,children:c.title})})}),!i&&r.jsx(p,{})]},n)})})}),e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(r.Fragment,{children:s}),e[2]=s,e[3]=a):a=e[3],a}export{f as Breadcrumbs};
1
+ import{c as d,j as r,ba as b,bb as m,r as u,bc as h,bd as x,be as o,$ as j,bf as p}from"./app.js";function B(l){const e=d.c(4),{breadcrumbs:t}=l;let s;e[0]!==t?(s=t.length>0&&r.jsx(b,{children:r.jsx(m,{children:t.map((c,n)=>{const i=n===t.length-1;return r.jsxs(u.Fragment,{children:[r.jsx(h,{children:i?r.jsx(x,{children:c.title}):r.jsx(o,{asChild:!0,children:r.jsx(j,{href:c.href,children:c.title})})}),!i&&r.jsx(p,{})]},n)})})}),e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(r.Fragment,{children:s}),e[2]=s,e[3]=a):a=e[3],a}export{B as Breadcrumbs};
@@ -1,4 +1,4 @@
1
- import{r as m,j as v,g as ac,e as H,c as Ke,C as lc,L as He,a as rt,S as Nr,b as kr,d as Eo,B as Oe,f as Lr,h as q,i as Vr,k as jr,P as Po,I as ir,D as cc,l as kn,m as uc,n as dc,t as ki,o as Ln,T as hc,p as fc,s as pc,u as gc,v as mc,w as vc,x as yc,y as bc,z as Tc,A as xc,E as Sc,F as wc,G as Ht}from"./app.js";import{A as Dc}from"./app-layout-DecN527i.js";import{r as Cc}from"./index-C148XJoK.js";import un from"./material-icon-DsiW0iQG.js";import{D as Ec}from"./del-modal-l3LxJWCN.js";import Li from"./add-form-BjackXJe.js";import{d as Pc}from"./debounce-D6eaSoDg.js";import"./app-shell-DHzMWA1L.js";import"./app-sidebar-4JFP8UdU.js";import"./nav-main-BUp9qA8R.js";import"./app-sidebar-header-CIKLfLsF.js";import"./breadcrumbs-Bo2z-LNC.js";import"./nav-user-DeF3SDRj.js";import"./user-info-CAgkqARx.js";import"./user-menu-content-BxL0QMC9.js";import"./theme-switcher-D8T9NgWG.js";import"./use-appearance-CXP5cHaQ.js";import"./icon-C_X2cQ6W.js";import"./field-renderer-BHo944Cn.js";import"./dynamic-controls-CSVVCONh.js";import"./multi-select-BbKSrMw2.js";import"./form-state-702tb_BV.js";import"./input-error-Bab-HPbn.js";function Oo(t){let e=null;return()=>(e==null&&(e=t()),e)}function Oc(t,e){return t.filter(n=>n!==e)}function Ic(t,e){const n=new Set,r=s=>n.add(s);t.forEach(r),e.forEach(r);const i=[];return n.forEach(s=>i.push(s)),i}class Ac{enter(e){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(e));return this.entered=Ic(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=Oc(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class Mc{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Io="__NATIVE_FILE__",Ao="__NATIVE_URL__",Mo="__NATIVE_TEXT__",Ro="__NATIVE_HTML__",Vi=Object.freeze(Object.defineProperty({__proto__:null,FILE:Io,HTML:Ro,TEXT:Mo,URL:Ao},Symbol.toStringTag,{value:"Module"}));function Vn(t,e,n){const r=e.reduce((i,s)=>i||t.getData(s),"");return r??n}const sr={[Io]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Ro]:{exposeProperties:{html:(t,e)=>Vn(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Ao]:{exposeProperties:{urls:(t,e)=>Vn(t,e,"").split(`
1
+ import{r as m,j as v,g as ac,e as H,c as Ke,C as lc,L as He,a as rt,S as Nr,b as kr,d as Eo,B as Oe,f as Lr,h as q,i as Vr,k as jr,P as Po,I as ir,D as cc,l as kn,m as uc,n as dc,t as ki,o as Ln,T as hc,p as fc,s as pc,u as gc,v as mc,w as vc,x as yc,y as bc,z as Tc,A as xc,E as Sc,F as wc,G as Ht}from"./app.js";import{A as Dc}from"./app-layout-ContoN1K.js";import{r as Cc}from"./index-C148XJoK.js";import un from"./material-icon-BIcI8APG.js";import{D as Ec}from"./del-modal-BeF4r3gk.js";import Li from"./add-form-CGi_qv3J.js";import{d as Pc}from"./debounce-D6eaSoDg.js";import"./app-shell-DHzMWA1L.js";import"./app-sidebar-D7l5BJPV.js";import"./nav-main-DVgvko8g.js";import"./app-sidebar-header-CK8t32cm.js";import"./breadcrumbs-DnNOEnT4.js";import"./nav-user-vIwYShwE.js";import"./user-info-Db5Y8KeN.js";import"./user-menu-content-Bc8YNZPf.js";import"./theme-switcher-fzVA8btX.js";import"./use-appearance-CXP5cHaQ.js";import"./icon-ChQBPA5l.js";import"./field-renderer-Sd68OLyc.js";import"./dynamic-controls-CSVVCONh.js";import"./multi-select-BFWbEjH-.js";import"./form-state-702tb_BV.js";import"./input-error-g1h6ps7t.js";function Oo(t){let e=null;return()=>(e==null&&(e=t()),e)}function Oc(t,e){return t.filter(n=>n!==e)}function Ic(t,e){const n=new Set,r=s=>n.add(s);t.forEach(r),e.forEach(r);const i=[];return n.forEach(s=>i.push(s)),i}class Ac{enter(e){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(e));return this.entered=Ic(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=Oc(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class Mc{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Io="__NATIVE_FILE__",Ao="__NATIVE_URL__",Mo="__NATIVE_TEXT__",Ro="__NATIVE_HTML__",Vi=Object.freeze(Object.defineProperty({__proto__:null,FILE:Io,HTML:Ro,TEXT:Mo,URL:Ao},Symbol.toStringTag,{value:"Module"}));function Vn(t,e,n){const r=e.reduce((i,s)=>i||t.getData(s),"");return r??n}const sr={[Io]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Ro]:{exposeProperties:{html:(t,e)=>Vn(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Ao]:{exposeProperties:{urls:(t,e)=>Vn(t,e,"").split(`
2
2
  `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Mo]:{exposeProperties:{text:(t,e)=>Vn(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function Rc(t,e){const n=sr[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new Mc(n);return r.loadDataTransfer(e),r}function jn(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(sr).filter(n=>{const r=sr[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const Nc=Oo(()=>/firefox/i.test(navigator.userAgent)),No=Oo(()=>!!window.safari);class ji{interpolate(e){const{xs:n,ys:r,c1s:i,c2s:s,c3s:o}=this;let a=n.length-1;if(e===n[a])return r[a];let l=0,c=o.length-1,u;for(;l<=c;){u=Math.floor(.5*(l+c));const f=n[u];if(f<e)l=u+1;else if(f>e)c=u-1;else return r[u]}a=Math.max(0,c);const d=e-n[a],h=d*d;return r[a]+i[a]*d+s[a]*h+o[a]*d*h}constructor(e,n){const{length:r}=e,i=[];for(let f=0;f<r;f++)i.push(f);i.sort((f,p)=>e[f]<e[p]?-1:1);const s=[],o=[];let a,l;for(let f=0;f<r-1;f++)a=e[f+1]-e[f],l=n[f+1]-n[f],s.push(a),o.push(l/a);const c=[o[0]];for(let f=0;f<s.length-1;f++){const p=o[f],g=o[f+1];if(p*g<=0)c.push(0);else{a=s[f];const b=s[f+1],y=a+b;c.push(3*y/((y+b)/p+(y+a)/g))}}c.push(o[o.length-1]);const u=[],d=[];let h;for(let f=0;f<c.length-1;f++){h=o[f];const p=c[f],g=1/s[f],b=p+c[f+1]-h-h;u.push((h-p-b)*g),d.push(b*g*g)}this.xs=e,this.ys=n,this.c1s=c,this.c2s=u,this.c3s=d}}const kc=1;function ko(t){const e=t.nodeType===kc?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function $t(t){return{x:t.clientX,y:t.clientY}}function Lc(t){var e;return t.nodeName==="IMG"&&(Nc()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function Vc(t,e,n,r){let i=t?e.width:n,s=t?e.height:r;return No()&&t&&(s/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:s}}function jc(t,e,n,r,i){const s=Lc(e),a=ko(s?t:e),l={x:n.x-a.x,y:n.y-a.y},{offsetWidth:c,offsetHeight:u}=t,{anchorX:d,anchorY:h}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=Vc(s,e,c,u),g=()=>{let I=new ji([0,.5,1],[l.y,l.y/u*p,l.y+p-u]).interpolate(h);return No()&&s&&(I+=(window.devicePixelRatio-1)*p),I},b=()=>new ji([0,.5,1],[l.x,l.x/c*f,l.x+f-c]).interpolate(d),{offsetX:y,offsetY:x}=i,S=y===0||y,D=x===0||x;return{x:S?y:b(),y:D?x:g()}}let _c=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}};function Bc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _i(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Bc(t,i,n[i])})}return t}class Fc{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.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 e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const i=o=>this.handleDragStart(o,e),s=o=>this.handleSelectStart(o);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",s),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=o=>this.handleDragEnter(o,e),i=o=>this.handleDragOver(o,e),s=o=>this.handleDrop(o,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",s),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",s)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return _i({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return _i({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Vi).some(n=>Vi[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=Rc(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;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 e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,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=i=>{const s=this.sourceNodes.get(i);return s&&ko(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{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=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const o=$t(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:o});const{dataTransfer:a}=i,l=jn(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const u=this.monitor.getSourceId(),d=this.sourceNodes.get(u),h=this.sourcePreviewNodes.get(u)||d;if(h){const{anchorX:f,anchorY:p,offsetX:g,offsetY:b}=this.getCurrentSourcePreviewNodeOptions(),S=jc(d,h,o,{anchorX:f,anchorY:p},{offsetX:g,offsetY:b});a.setDragImage(h,S.x,S.y)}}try{a==null||a.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:c}=this.getCurrentSourcePreviewNodeOptions();c?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(l)this.beginDragNativeItem(l);else{if(a&&!a.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:a}=i,l=jn(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:s}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,s.length>0&&this.actions.hover(s,{clientOffset:$t(i)}),s.some(a=>this.monitor.canDropOnTarget(a))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=$t(i),this.scheduleHover(s),(s||[]).some(a=>this.monitor.canDropOnTarget(a))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var s;i.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(i.dataTransfer)}else jn(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:$t(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const s=i.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(i.preventDefault(),s.dragDrop()))},this.options=new _c(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new Ac(this.isNodeInDocument)}}let Wt;function zc(){return Wt||(Wt=new Image,Wt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Wt}const Uc=function(e,n,r){return new Fc(e,n,r)};var $e=[],Hc=function(){return $e.some(function(t){return t.activeTargets.length>0})},$c=function(){return $e.some(function(t){return t.skippedTargets.length>0})},Bi="ResizeObserver loop completed with undelivered notifications.",Wc=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Bi}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Bi),window.dispatchEvent(t)},Ot;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ot||(Ot={}));var We=function(t){return Object.freeze(t)},Gc=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,We(this)}return t}(),Lo=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,We(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,s=e.right,o=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:r,top:i,right:s,bottom:o,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),_r=function(t){return t instanceof SVGElement&&"getBBox"in t},Vo=function(t){if(_r(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,s=i.offsetWidth,o=i.offsetHeight;return!(s||o||t.getClientRects().length)},Fi=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},qc=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},xt=typeof window<"u"?window:{},Gt=new WeakMap,zi=/auto|scroll/,Kc=/^tb|vertical/,Xc=/msie|trident/i.test(xt.navigator&&xt.navigator.userAgent),me=function(t){return parseFloat(t||"0")},it=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Gc((n?e:t)||0,(n?t:e)||0)},Ui=We({devicePixelContentBoxSize:it(),borderBoxSize:it(),contentBoxSize:it(),contentRect:new Lo(0,0,0,0)}),jo=function(t,e){if(e===void 0&&(e=!1),Gt.has(t)&&!e)return Gt.get(t);if(Vo(t))return Gt.set(t,Ui),Ui;var n=getComputedStyle(t),r=_r(t)&&t.ownerSVGElement&&t.getBBox(),i=!Xc&&n.boxSizing==="border-box",s=Kc.test(n.writingMode||""),o=!r&&zi.test(n.overflowY||""),a=!r&&zi.test(n.overflowX||""),l=r?0:me(n.paddingTop),c=r?0:me(n.paddingRight),u=r?0:me(n.paddingBottom),d=r?0:me(n.paddingLeft),h=r?0:me(n.borderTopWidth),f=r?0:me(n.borderRightWidth),p=r?0:me(n.borderBottomWidth),g=r?0:me(n.borderLeftWidth),b=d+c,y=l+u,x=g+f,S=h+p,D=a?t.offsetHeight-S-t.clientHeight:0,w=o?t.offsetWidth-x-t.clientWidth:0,I=i?b+x:0,k=i?y+S:0,C=r?r.width:me(n.width)-I-w,_=r?r.height:me(n.height)-k-D,j=C+b+w+x,G=_+y+D+S,X=We({devicePixelContentBoxSize:it(Math.round(C*devicePixelRatio),Math.round(_*devicePixelRatio),s),borderBoxSize:it(j,G,s),contentBoxSize:it(C,_,s),contentRect:new Lo(d,l,C,_)});return Gt.set(t,X),X},_o=function(t,e,n){var r=jo(t,n),i=r.borderBoxSize,s=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case Ot.DEVICE_PIXEL_CONTENT_BOX:return o;case Ot.BORDER_BOX:return i;default:return s}},Yc=function(){function t(e){var n=jo(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=We([n.borderBoxSize]),this.contentBoxSize=We([n.contentBoxSize]),this.devicePixelContentBoxSize=We([n.devicePixelContentBoxSize])}return t}(),Bo=function(t){if(Vo(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Zc=function(){var t=1/0,e=[];$e.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(c){var u=new Yc(c.target),d=Bo(c.target);a.push(u),c.lastReportedSize=_o(c.target,c.observedBox),d<t&&(t=d)}),e.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},Hi=function(t){$e.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Bo(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Jc=function(){var t=0;for(Hi(t);Hc();)t=Zc(),Hi(t);return $c()&&Wc(),t>0},_n,Fo=[],Qc=function(){return Fo.splice(0).forEach(function(t){return t()})},eu=function(t){if(!_n){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Qc()}).observe(n,r),_n=function(){n.textContent="".concat(e?e--:e++)}}Fo.push(t),_n()},tu=function(t){eu(function(){requestAnimationFrame(t)})},en=0,nu=function(){return!!en},ru=250,iu={attributes:!0,characterData:!0,childList:!0,subtree:!0},$i=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Wi=function(t){return t===void 0&&(t=0),Date.now()+t},Bn=!1,su=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=ru),!Bn){Bn=!0;var r=Wi(e);tu(function(){var i=!1;try{i=Jc()}finally{if(Bn=!1,e=r-Wi(),!nu())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,iu)};document.body?n():xt.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),$i.forEach(function(n){return xt.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),$i.forEach(function(n){return xt.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),or=new su,Gi=function(t){!en&&t>0&&or.start(),en+=t,!en&&or.stop()},ou=function(t){return!_r(t)&&!qc(t)&&getComputedStyle(t).display==="inline"},au=function(){function t(e,n){this.target=e,this.observedBox=n||Ot.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=_o(this.target,this.observedBox,!0);return ou(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),lu=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),qt=new WeakMap,qi=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Kt=function(){function t(){}return t.connect=function(e,n){var r=new lu(e,n);qt.set(e,r)},t.observe=function(e,n,r){var i=qt.get(e),s=i.observationTargets.length===0;qi(i.observationTargets,n)<0&&(s&&$e.push(i),i.observationTargets.push(new au(n,r&&r.box)),Gi(1),or.schedule())},t.unobserve=function(e,n){var r=qt.get(e),i=qi(r.observationTargets,n),s=r.observationTargets.length===1;i>=0&&(s&&$e.splice($e.indexOf(r),1),r.observationTargets.splice(i,1),Gi(-1))},t.disconnect=function(e){var n=this,r=qt.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),cu=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Kt.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Fi(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Kt.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Fi(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Kt.unobserve(this,e)},t.prototype.disconnect=function(){Kt.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const zo=m.createContext({});function uu(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const Br=m.createContext(null),Uo=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function du(t=!0){const e=m.useContext(Br);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,s=m.useId();m.useEffect(()=>{t&&i(s)},[t]);const o=m.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,o]:[!0]}const Fr=typeof window<"u",hu=Fr?m.useLayoutEffect:m.useEffect,se=t=>t;let Ho=se;function zr(t){let e;return()=>(e===void 0&&(e=t()),e)}const st=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Se=t=>t*1e3,we=t=>t/1e3,fu={useManualTiming:!1};function pu(t){let e=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),t()),c(o)}const l={schedule:(c,u=!1,d=!1)=>{const f=d&&r?e:n;return u&&s.add(c),f.has(c)||f.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(o=c,r){i=!0;return}r=!0,[e,n]=[n,e],e.forEach(a),e.clear(),r=!1,i&&(i=!1,l.process(c))}};return l}const Xt=["read","resolveKeyframes","update","preRender","render","postRender"],gu=40;function $o(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Xt.reduce((y,x)=>(y[x]=pu(s),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=o,f=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,gu),1),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(f))},p=()=>{n=!0,r=!0,i.isProcessing||t(f)};return{schedule:Xt.reduce((y,x)=>{const S=o[x];return y[x]=(D,w=!1,I=!1)=>(n||p(),S.schedule(D,w,I)),y},{}),cancel:y=>{for(let x=0;x<Xt.length;x++)o[Xt[x]].cancel(y)},state:i,steps:o}}const{schedule:F,cancel:Ae,state:J,steps:Fn}=$o(typeof requestAnimationFrame<"u"?requestAnimationFrame:se,!0),Wo=m.createContext({strict:!1}),Ki={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"]},ot={};for(const t in Ki)ot[t]={isEnabled:e=>Ki[t].some(n=>!!e[n])};function mu(t){for(const e in t)ot[e]={...ot[e],...t[e]}}const vu=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","ignoreStrict","viewport"]);function dn(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||vu.has(t)}let Go=t=>!dn(t);function yu(t){t&&(Go=e=>e.startsWith("on")?!dn(e):t(e))}try{yu(require("@emotion/is-prop-valid").default)}catch{}function bu(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Go(i)||n===!0&&dn(i)||!e&&!dn(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function Tu(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...r)=>t(...r);return new Proxy(n,{get:(r,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const bn=m.createContext({});function It(t){return typeof t=="string"||Array.isArray(t)}function Tn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Ur=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hr=["initial",...Ur];function xn(t){return Tn(t.animate)||Hr.some(e=>It(t[e]))}function qo(t){return!!(xn(t)||t.variants)}function xu(t,e){if(xn(t)){const{initial:n,animate:r}=t;return{initial:n===!1||It(n)?n:void 0,animate:It(r)?r:void 0}}return t.inherit!==!1?e:{}}function Su(t){const{initial:e,animate:n}=xu(t,m.useContext(bn));return m.useMemo(()=>({initial:e,animate:n}),[Xi(e),Xi(n)])}function Xi(t){return Array.isArray(t)?t.join(" "):t}const wu=Symbol.for("motionComponentSymbol");function Je(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Du(t,e,n){return m.useCallback(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Je(n)&&(n.current=r))},[e])}const $r=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Cu="framerAppearId",Ko="data-"+$r(Cu),{schedule:Wr}=$o(queueMicrotask,!1),Xo=m.createContext({});function Eu(t,e,n,r,i){var s,o;const{visualElement:a}=m.useContext(bn),l=m.useContext(Wo),c=m.useContext(Br),u=m.useContext(Uo).reducedMotion,d=m.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=d.current,f=m.useContext(Xo);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&Pu(d.current,n,i,f);const p=m.useRef(!1);m.useInsertionEffect(()=>{h&&p.current&&h.update(n,c)});const g=n[Ko],b=m.useRef(!!g&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,g))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,g)));return hu(()=>{h&&(p.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Wr.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),m.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),b.current=!1))}),h}function Pu(t,e,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Yo(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Je(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Yo(t){if(t)return t.options.allowProjection!==!1?t.projection:Yo(t.parent)}function Ou({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){var s,o;t&&mu(t);function a(c,u){let d;const h={...m.useContext(Uo),...c,layoutId:Iu(c)},{isStatic:f}=h,p=Su(c),g=r(c,f);if(!f&&Fr){Au();const b=Mu(h);d=b.MeasureLayout,p.visualElement=Eu(i,g,h,e,b.ProjectionNode)}return v.jsxs(bn.Provider,{value:p,children:[d&&p.visualElement?v.jsx(d,{visualElement:p.visualElement,...h}):null,n(i,c,Du(g,p.visualElement,u),g,f,p.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(o=(s=i.displayName)!==null&&s!==void 0?s:i.name)!==null&&o!==void 0?o:""})`}`;const l=m.forwardRef(a);return l[wu]=i,l}function Iu({layoutId:t}){const e=m.useContext(zo).id;return e&&t!==void 0?e+"-"+t:t}function Au(t,e){m.useContext(Wo).strict}function Mu(t){const{drag:e,layout:n}=ot;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Ru=["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 Gr(t){return typeof t!="string"||t.includes("-")?!1:!!(Ru.indexOf(t)>-1||/[A-Z]/u.test(t))}function Yi(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function qr(t,e,n,r){if(typeof e=="function"){const[i,s]=Yi(r);e=e(n!==void 0?n:t.custom,i,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,s]=Yi(r);e=e(n!==void 0?n:t.custom,i,s)}return e}const ar=t=>Array.isArray(t),Nu=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),ku=t=>ar(t)?t[t.length-1]||0:t,te=t=>!!(t&&t.getVelocity);function tn(t){const e=te(t)?t.get():t;return Nu(e)?e.toValue():e}function Lu({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},r,i,s){const o={latestValues:Vu(r,i,s,t),renderState:e()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Zo=t=>(e,n)=>{const r=m.useContext(bn),i=m.useContext(Br),s=()=>Lu(t,e,r,i);return n?s():uu(s)};function Vu(t,e,n,r){const i={},s=r(t,{});for(const h in s)i[h]=tn(s[h]);let{initial:o,animate:a}=t;const l=xn(t),c=qo(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Tn(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const p=qr(t,h[f]);if(p){const{transitionEnd:g,transition:b,...y}=p;for(const x in y){let S=y[x];if(Array.isArray(S)){const D=u?S.length-1:0;S=S[D]}S!==null&&(i[x]=S)}for(const x in g)i[x]=g[x]}}}return i}const lt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xe=new Set(lt),Jo=t=>e=>typeof e=="string"&&e.startsWith(t),Qo=Jo("--"),ju=Jo("var(--"),Kr=t=>ju(t)?_u.test(t.split("/*")[0].trim()):!1,_u=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ea=(t,e)=>e&&typeof t=="number"?e.transform(t):t,De=(t,e,n)=>n>e?e:n<t?t:n,ct={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},At={...ct,transform:t=>De(0,1,t)},Yt={...ct,default:1},kt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ee=kt("deg"),ve=kt("%"),A=kt("px"),Bu=kt("vh"),Fu=kt("vw"),Zi={...ve,parse:t=>ve.parse(t)/100,transform:t=>ve.transform(t*100)},zu={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,backgroundPositionX:A,backgroundPositionY:A},Uu={rotate:Ee,rotateX:Ee,rotateY:Ee,rotateZ:Ee,scale:Yt,scaleX:Yt,scaleY:Yt,scaleZ:Yt,skew:Ee,skewX:Ee,skewY:Ee,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:At,originX:Zi,originY:Zi,originZ:A},Ji={...ct,transform:Math.round},Xr={...zu,...Uu,zIndex:Ji,size:A,fillOpacity:At,strokeOpacity:At,numOctaves:Ji},Hu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$u=lt.length;function Wu(t,e,n){let r="",i=!0;for(let s=0;s<$u;s++){const o=lt[s],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=ea(a,Xr[o]);if(!l){i=!1;const u=Hu[o]||o;r+=`${u}(${c}) `}n&&(e[o]=c)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function Yr(t,e,n){const{style:r,vars:i,transformOrigin:s}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(Xe.has(l)){o=!0;continue}else if(Qo(l)){i[l]=c;continue}else{const u=ea(c,Xr[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(e.transform||(o||n?r.transform=Wu(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const Gu={offset:"stroke-dashoffset",array:"stroke-dasharray"},qu={offset:"strokeDashoffset",array:"strokeDasharray"};function Ku(t,e,n=1,r=0,i=!0){t.pathLength=1;const s=i?Gu:qu;t[s.offset]=A.transform(-r);const o=A.transform(e),a=A.transform(n);t[s.array]=`${o} ${a}`}function Qi(t,e,n){return typeof t=="string"?t:A.transform(e+n*t)}function Xu(t,e,n){const r=Qi(e,t.x,t.width),i=Qi(n,t.y,t.height);return`${r} ${i}`}function Zr(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Yr(t,c,d),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f,dimensions:p}=t;h.transform&&(p&&(f.transform=h.transform),delete h.transform),p&&(i!==void 0||s!==void 0||f.transform)&&(f.transformOrigin=Xu(p,i!==void 0?i:.5,s!==void 0?s:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&Ku(h,o,a,l,!1)}const Jr=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ta=()=>({...Jr(),attrs:{}}),Qr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function na(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const s in n)t.style.setProperty(s,n[s])}const ra=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"]);function ia(t,e,n,r){na(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(ra.has(i)?i:$r(i),e.attrs[i])}const hn={};function Yu(t){Object.assign(hn,t)}function sa(t,{layout:e,layoutId:n}){return Xe.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!hn[t]||t==="opacity")}function ei(t,e,n){var r;const{style:i}=t,s={};for(const o in i)(te(i[o])||e.style&&te(e.style[o])||sa(o,t)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return s}function oa(t,e,n){const r=ei(t,e,n);for(const i in t)if(te(t[i])||te(e[i])){const s=lt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i]}return r}function Zu(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const es=["x","y","width","height","cx","cy","r"],Ju={useVisualState:Zo({scrapeMotionValuesFromProps:oa,createRenderState:ta,onUpdate:({props:t,prevProps:e,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!t.drag;if(!s){for(const a in i)if(Xe.has(a)){s=!0;break}}if(!s)return;let o=!e;if(e)for(let a=0;a<es.length;a++){const l=es[a];t[l]!==e[l]&&(o=!0)}o&&F.read(()=>{Zu(n,r),F.render(()=>{Zr(r,i,Qr(n.tagName),t.transformTemplate),ia(n,r)})})}})},Qu={useVisualState:Zo({scrapeMotionValuesFromProps:ei,createRenderState:Jr})};function aa(t,e,n){for(const r in e)!te(e[r])&&!sa(r,n)&&(t[r]=e[r])}function ed({transformTemplate:t},e){return m.useMemo(()=>{const n=Jr();return Yr(n,e,t),Object.assign({},n.vars,n.style)},[e])}function td(t,e){const n=t.style||{},r={};return aa(r,n,t),Object.assign(r,ed(t,e)),r}function nd(t,e){const n={},r=td(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}function rd(t,e,n,r){const i=m.useMemo(()=>{const s=ta();return Zr(s,e,Qr(r),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};aa(s,t.style,t),i.style={...s,...i.style}}return i}function id(t=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Gr(n)?rd:nd)(r,s,o,n),c=bu(r,typeof n=="string",t),u=n!==m.Fragment?{...c,...l,ref:i}:{},{children:d}=r,h=m.useMemo(()=>te(d)?d.get():d,[d]);return m.createElement(n,{...u,children:h})}}function sd(t,e){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Gr(r)?Ju:Qu,preloadedFeatures:t,useRender:id(i),createVisualElement:e,Component:r};return Ou(o)}}function la(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Sn(t,e,n){const r=t.getProps();return qr(r,e,n!==void 0?n:r.custom,t)}const od=zr(()=>window.ScrollTimeline!==void 0);class ad{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e,n){const r=this.animations.map(i=>{if(od()&&i.attachTimeline)return i.attachTimeline(e);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ld extends ad{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function ti(t,e){return t?t[e]||t.default||t:void 0}const lr=2e4;function ca(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<lr;)e+=n,r=t.next(e);return e>=lr?1/0:e}function ni(t){return typeof t=="function"}function ts(t,e){t.timeline=e,t.onfinish=null}const ri=t=>Array.isArray(t)&&typeof t[0]=="number",cd={linearEasing:void 0};function ud(t,e){const n=zr(t);return()=>{var r;return(r=cd[e])!==null&&r!==void 0?r:n()}}const fn=ud(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ua=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let s=0;s<i;s++)r+=t(st(0,i-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function da(t){return!!(typeof t=="function"&&fn()||!t||typeof t=="string"&&(t in cr||fn())||ri(t)||Array.isArray(t)&&t.every(da))}const mt=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,cr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mt([0,.65,.55,1]),circOut:mt([.55,0,1,.45]),backIn:mt([.31,.01,.66,-.59]),backOut:mt([.33,1.53,.69,.99])};function ha(t,e){if(t)return typeof t=="function"&&fn()?ua(t,e):ri(t)?mt(t):Array.isArray(t)?t.map(n=>ha(n,e)||cr.easeOut):cr[t]}const pe={x:!1,y:!1};function fa(){return pe.x||pe.y}function dd(t,e,n){var r;if(t instanceof Element)return[t];if(typeof t=="string"){let i=document;const s=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function pa(t,e){const n=dd(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function ns(t){return e=>{e.pointerType==="touch"||fa()||t(e)}}function hd(t,e,n={}){const[r,i,s]=pa(t,n),o=ns(a=>{const{target:l}=a,c=e(a);if(typeof c!="function"||!l)return;const u=ns(d=>{c(d),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,i)});return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const ga=(t,e)=>e?t===e?!0:ga(t,e.parentElement):!1,ii=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,fd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pd(t){return fd.has(t.tagName)||t.tabIndex!==-1}const vt=new WeakSet;function rs(t){return e=>{e.key==="Enter"&&t(e)}}function zn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const gd=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=rs(()=>{if(vt.has(n))return;zn(n,"down");const i=rs(()=>{zn(n,"up")}),s=()=>zn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function is(t){return ii(t)&&!fa()}function md(t,e,n={}){const[r,i,s]=pa(t,n),o=a=>{const l=a.currentTarget;if(!is(a)||vt.has(l))return;vt.add(l);const c=e(a),u=(f,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),!(!is(f)||!vt.has(l))&&(vt.delete(l),typeof c=="function"&&c(f,{success:p}))},d=f=>{u(f,n.useGlobalTarget||ga(l,f.target))},h=f=>{u(f,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{!pd(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a.addEventListener("focus",c=>gd(c,i),i)}),s}function vd(t){return t==="x"||t==="y"?pe[t]?null:(pe[t]=!0,()=>{pe[t]=!1}):pe.x||pe.y?null:(pe.x=pe.y=!0,()=>{pe.x=pe.y=!1})}const ma=new Set(["width","height","top","left","right","bottom",...lt]);let nn;function yd(){nn=void 0}const ye={now:()=>(nn===void 0&&ye.set(J.isProcessing||fu.useManualTiming?J.timestamp:performance.now()),nn),set:t=>{nn=t,queueMicrotask(yd)}};function si(t,e){t.indexOf(e)===-1&&t.push(e)}function oi(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class ai{constructor(){this.subscriptions=[]}add(e){return si(this.subscriptions,e),()=>oi(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function va(t,e){return e?t*(1e3/e):0}const ss=30,bd=t=>!isNaN(parseFloat(t));class Td{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=ye.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=ye.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=bd(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ai);const r=this.events[e].add(n);return e==="change"?()=>{r(),F.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ss)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ss);return va(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Mt(t,e){return new Td(t,e)}function xd(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Mt(n))}function Sd(t,e){const n=Sn(t,e);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=ku(s[o]);xd(t,o,a)}}function wd(t){return!!(te(t)&&t.add)}function ur(t,e){const n=t.getValue("willChange");if(wd(n))return n.add(e)}function ya(t){return t.props[Ko]}const ba=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Dd=1e-7,Cd=12;function Ed(t,e,n,r,i){let s,o,a=0;do o=e+(n-e)/2,s=ba(o,r,i)-t,s>0?n=o:e=o;while(Math.abs(s)>Dd&&++a<Cd);return o}function Lt(t,e,n,r){if(t===e&&n===r)return se;const i=s=>Ed(s,0,1,t,n);return s=>s===0||s===1?s:ba(i(s),e,r)}const Ta=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xa=t=>e=>1-t(1-e),Sa=Lt(.33,1.53,.69,.99),li=xa(Sa),wa=Ta(li),Da=t=>(t*=2)<1?.5*li(t):.5*(2-Math.pow(2,-10*(t-1))),ci=t=>1-Math.sin(Math.acos(t)),Ca=xa(ci),Ea=Ta(ci),Pa=t=>/^0[^.\s]+$/u.test(t);function Pd(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Pa(t):!0}const St=t=>Math.round(t*1e5)/1e5,ui=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Od(t){return t==null}const Id=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,di=(t,e)=>n=>!!(typeof n=="string"&&Id.test(n)&&n.startsWith(t)||e&&!Od(n)&&Object.prototype.hasOwnProperty.call(n,e)),Oa=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(ui);return{[t]:parseFloat(i),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ad=t=>De(0,255,t),Un={...ct,transform:t=>Math.round(Ad(t))},Ue={test:di("rgb","red"),parse:Oa("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Un.transform(t)+", "+Un.transform(e)+", "+Un.transform(n)+", "+St(At.transform(r))+")"};function Md(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const dr={test:di("#"),parse:Md,transform:Ue.transform},Qe={test:di("hsl","hue"),parse:Oa("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+ve.transform(St(e))+", "+ve.transform(St(n))+", "+St(At.transform(r))+")"},ee={test:t=>Ue.test(t)||dr.test(t)||Qe.test(t),parse:t=>Ue.test(t)?Ue.parse(t):Qe.test(t)?Qe.parse(t):dr.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ue.transform(t):Qe.transform(t)},Rd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Nd(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ui))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Rd))===null||n===void 0?void 0:n.length)||0)>0}const Ia="number",Aa="color",kd="var",Ld="var(",os="${}",Vd=/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 Rt(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=e.replace(Vd,l=>(ee.test(l)?(r.color.push(s),i.push(Aa),n.push(ee.parse(l))):l.startsWith(Ld)?(r.var.push(s),i.push(kd),n.push(l)):(r.number.push(s),i.push(Ia),n.push(parseFloat(l))),++s,os)).split(os);return{values:n,split:a,indexes:r,types:i}}function Ma(t){return Rt(t).values}function Ra(t){const{split:e,types:n}=Rt(t),r=e.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=e[o],i[o]!==void 0){const a=n[o];a===Ia?s+=St(i[o]):a===Aa?s+=ee.transform(i[o]):s+=i[o]}return s}}const jd=t=>typeof t=="number"?0:t;function _d(t){const e=Ma(t);return Ra(t)(e.map(jd))}const Me={test:Nd,parse:Ma,createTransformer:Ra,getAnimatableNone:_d},Bd=new Set(["brightness","contrast","saturate","opacity"]);function Fd(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(ui)||[];if(!r)return t;const i=n.replace(r,"");let s=Bd.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+i+")"}const zd=/\b([a-z-]*)\(.*?\)/gu,hr={...Me,getAnimatableNone:t=>{const e=t.match(zd);return e?e.map(Fd).join(" "):t}},Ud={...Xr,color:ee,backgroundColor:ee,outlineColor:ee,fill:ee,stroke:ee,borderColor:ee,borderTopColor:ee,borderRightColor:ee,borderBottomColor:ee,borderLeftColor:ee,filter:hr,WebkitFilter:hr},hi=t=>Ud[t];function Na(t,e){let n=hi(t);return n!==hr&&(n=Me),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Hd=new Set(["auto","none","0"]);function $d(t,e,n){let r=0,i;for(;r<t.length&&!i;){const s=t[r];typeof s=="string"&&!Hd.has(s)&&Rt(s).values.length&&(i=t[r]),r++}if(i&&n)for(const s of e)t[s]=Na(n,i)}const as=t=>t===ct||t===A,ls=(t,e)=>parseFloat(t.split(", ")[e]),cs=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return ls(i[1],e);{const s=r.match(/^matrix\((.+)\)$/u);return s?ls(s[1],t):0}},Wd=new Set(["x","y","z"]),Gd=lt.filter(t=>!Wd.has(t));function qd(t){const e=[];return Gd.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const at={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:cs(4,13),y:cs(5,14)};at.translateX=at.x;at.translateY=at.y;const Ge=new Set;let fr=!1,pr=!1;function ka(){if(pr){const t=Array.from(Ge).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=qd(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}pr=!1,fr=!1,Ge.forEach(t=>t.complete()),Ge.clear()}function La(){Ge.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(pr=!0)})}function Kd(){La(),ka()}class fi{constructor(e,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ge.add(this),fr||(fr=!0,F.read(La),F.resolveKeyframes(ka))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;for(let s=0;s<e.length;s++)if(e[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[s]=e[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ge.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ge.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Va=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Xd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Yd(t){const e=Xd.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function ja(t,e,n=1){const[r,i]=Yd(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);if(s){const o=s.trim();return Va(o)?parseFloat(o):o}return Kr(i)?ja(i,e,n+1):i}const _a=t=>e=>e.test(t),Zd={test:t=>t==="auto",parse:t=>t},Ba=[ct,A,ve,Ee,Fu,Bu,Zd],us=t=>Ba.find(_a(t));class Fa extends fi{constructor(e,n,r,i,s){super(e,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Kr(c))){const u=ja(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ma.has(r)||e.length!==2)return;const[i,s]=e,o=us(i),a=us(s);if(o!==a)if(as(o)&&as(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)Pd(e[i])&&r.push(i);r.length&&$d(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=at[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=at[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const ds=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Me.test(t)||t==="0")&&!t.startsWith("url("));function Jd(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Qd(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],o=ds(i,e),a=ds(s,e);return!o||!a?!1:Jd(t)||(n==="spring"||ni(n))&&r}const eh=t=>t!==null;function wn(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(eh),s=e&&n!=="loop"&&e%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const th=40;class za{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ye.now(),this.options={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>th?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Kd(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=ye.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Qd(e,r,i,s))if(o)this.options.duration=0;else{l&&l(wn(e,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const $=(t,e,n)=>t+(e-t)*n;function Hn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function nh({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,s=0,o=0;if(!e)i=s=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Hn(l,a,t+1/3),s=Hn(l,a,t),o=Hn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function pn(t,e){return n=>n>0?e:t}const $n=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},rh=[dr,Ue,Qe],ih=t=>rh.find(e=>e.test(t));function hs(t){const e=ih(t);if(!e)return!1;let n=e.parse(t);return e===Qe&&(n=nh(n)),n}const fs=(t,e)=>{const n=hs(t),r=hs(e);if(!n||!r)return pn(t,e);const i={...n};return s=>(i.red=$n(n.red,r.red,s),i.green=$n(n.green,r.green,s),i.blue=$n(n.blue,r.blue,s),i.alpha=$(n.alpha,r.alpha,s),Ue.transform(i))},sh=(t,e)=>n=>e(t(n)),Vt=(...t)=>t.reduce(sh),gr=new Set(["none","hidden"]);function oh(t,e){return gr.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ah(t,e){return n=>$(t,e,n)}function pi(t){return typeof t=="number"?ah:typeof t=="string"?Kr(t)?pn:ee.test(t)?fs:uh:Array.isArray(t)?Ua:typeof t=="object"?ee.test(t)?fs:lh:pn}function Ua(t,e){const n=[...t],r=n.length,i=t.map((s,o)=>pi(s)(s,e[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function lh(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=pi(t[i])(t[i],e[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function ch(t,e){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[s]=l,i[o]++}return r}const uh=(t,e)=>{const n=Me.createTransformer(e),r=Rt(t),i=Rt(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?gr.has(t)&&!i.values.length||gr.has(e)&&!r.values.length?oh(t,e):Vt(Ua(ch(r,i),i.values),n):pn(t,e)};function Ha(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?$(t,e,n):pi(t)(t,e)}const dh=5;function $a(t,e,n){const r=Math.max(e-dh,0);return va(n-t(r),e-r)}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},ps=.001;function hh({duration:t=W.duration,bounce:e=W.bounce,velocity:n=W.velocity,mass:r=W.mass}){let i,s,o=1-e;o=De(W.minDamping,W.maxDamping,o),t=De(W.minDuration,W.maxDuration,we(t)),o<1?(i=c=>{const u=c*o,d=u*t,h=u-n,f=mr(c,o),p=Math.exp(-d);return ps-h/f*p},s=c=>{const d=c*o*t,h=d*n+n,f=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-d),g=mr(Math.pow(c,2),o);return(-i(c)+ps>0?-1:1)*((h-f)*p)/g}):(i=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=ph(i,s,a);if(t=Se(t),isNaN(l))return{stiffness:W.stiffness,damping:W.damping,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:t}}}const fh=12;function ph(t,e,n){let r=n;for(let i=1;i<fh;i++)r=r-t(r)/e(r);return r}function mr(t,e){return t*Math.sqrt(1-e*e)}const gh=["duration","bounce"],mh=["stiffness","damping","mass"];function gs(t,e){return e.some(n=>t[n]!==void 0)}function vh(t){let e={velocity:W.velocity,stiffness:W.stiffness,damping:W.damping,mass:W.mass,isResolvedFromDuration:!1,...t};if(!gs(t,mh)&&gs(t,gh))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*De(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:W.mass,stiffness:i,damping:s}}else{const n=hh(t);e={...e,...n,mass:W.mass},e.isResolvedFromDuration=!0}return e}function Wa(t=W.visualDuration,e=W.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=vh({...n,velocity:-we(n.velocity||0)}),p=h||0,g=c/(2*Math.sqrt(l*u)),b=o-s,y=we(Math.sqrt(l/u)),x=Math.abs(b)<5;r||(r=x?W.restSpeed.granular:W.restSpeed.default),i||(i=x?W.restDelta.granular:W.restDelta.default);let S;if(g<1){const w=mr(y,g);S=I=>{const k=Math.exp(-g*y*I);return o-k*((p+g*y*b)/w*Math.sin(w*I)+b*Math.cos(w*I))}}else if(g===1)S=w=>o-Math.exp(-y*w)*(b+(p+y*b)*w);else{const w=y*Math.sqrt(g*g-1);S=I=>{const k=Math.exp(-g*y*I),C=Math.min(w*I,300);return o-k*((p+g*y*b)*Math.sinh(C)+w*b*Math.cosh(C))/w}}const D={calculatedDuration:f&&d||null,next:w=>{const I=S(w);if(f)a.done=w>=d;else{let k=0;g<1&&(k=w===0?Se(p):$a(S,w,I));const C=Math.abs(k)<=r,_=Math.abs(o-I)<=i;a.done=C&&_}return a.value=a.done?o:I,a},toString:()=>{const w=Math.min(ca(D),lr),I=ua(k=>D.next(w*k).value,w,30);return w+"ms "+I}};return D}function ms({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],h={done:!1,value:d},f=C=>a!==void 0&&C<a||l!==void 0&&C>l,p=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let g=n*e;const b=d+g,y=o===void 0?b:o(b);y!==b&&(g=y-d);const x=C=>-g*Math.exp(-C/r),S=C=>y+x(C),D=C=>{const _=x(C),j=S(C);h.done=Math.abs(_)<=c,h.value=h.done?y:j};let w,I;const k=C=>{f(h.value)&&(w=C,I=Wa({keyframes:[h.value,p(h.value)],velocity:$a(S,C,h.value),damping:i,stiffness:s,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:C=>{let _=!1;return!I&&w===void 0&&(_=!0,D(C),k(C)),w!==void 0&&C>=w?I.next(C-w):(!_&&D(C),h)}}}const yh=Lt(.42,0,1,1),bh=Lt(0,0,.58,1),Ga=Lt(.42,0,.58,1),Th=t=>Array.isArray(t)&&typeof t[0]!="number",xh={linear:se,easeIn:yh,easeInOut:Ga,easeOut:bh,circIn:ci,circInOut:Ea,circOut:Ca,backIn:li,backInOut:wa,backOut:Sa,anticipate:Da},vs=t=>{if(ri(t)){Ho(t.length===4);const[e,n,r,i]=t;return Lt(e,n,r,i)}else if(typeof t=="string")return xh[t];return t};function Sh(t,e,n){const r=[],i=n||Ha,s=t.length-1;for(let o=0;o<s;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||se:e;a=Vt(l,a)}r.push(a)}return r}function wh(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const s=t.length;if(Ho(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Sh(e,r,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const h=st(t[d],t[d+1],u);return a[d](h)};return n?u=>c(De(t[0],t[s-1],u)):c}function Dh(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=st(0,e,r);t.push($(n,1,i))}}function Ch(t){const e=[0];return Dh(e,t.length-1),e}function Eh(t,e){return t.map(n=>n*e)}function Ph(t,e){return t.map(()=>e||Ga).splice(0,t.length-1)}function gn({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=Th(r)?r.map(vs):vs(r),s={done:!1,value:e[0]},o=Eh(n&&n.length===e.length?n:Ch(e),t),a=wh(o,e,{ease:Array.isArray(i)?i:Ph(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const Oh=t=>{const e=({timestamp:n})=>t(n);return{start:()=>F.update(e,!0),stop:()=>Ae(e),now:()=>J.isProcessing?J.timestamp:ye.now()}},Ih={decay:ms,inertia:ms,tween:gn,keyframes:gn,spring:Wa},Ah=t=>t/100;class gi extends za{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||fi,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=ni(n)?n:Ih[n]||gn;let l,c;a!==gn&&typeof e[0]!="number"&&(l=Vt(Ah,Ha(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});s==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ca(u));const{calculatedDuration:d}=u,h=d+i,f=h*(r+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:C}=this.options;return{done:!0,value:C[C.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:h,repeat:f,repeatType:p,repeatDelay:g,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let S=this.currentTime,D=s;if(f){const C=Math.min(this.currentTime,u)/d;let _=Math.floor(C),j=C%1;!j&&C>=1&&(j=1),j===1&&_--,_=Math.min(_,f+1),!!(_%2)&&(p==="reverse"?(j=1-j,g&&(j-=g/d)):p==="mirror"&&(D=o)),S=De(0,1,j)*d}const w=x?{done:!1,value:l[0]}:D.next(S);a&&(w.value=a(w.value));let{done:I}=w;!x&&c!==null&&(I=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return k&&i!==void 0&&(w.value=wn(l,this.options,i)),b&&b(w.value),k&&this.finish(),w}get duration(){const{resolved:e}=this;return e?we(e.calculatedDuration):0}get time(){return we(this.currentTime)}set time(e){e=Se(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=we(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Oh,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Mh=new Set(["opacity","clipPath","filter","transform"]);function Rh(t,e,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=ha(a,i);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const Nh=zr(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),mn=10,kh=2e4;function Lh(t){return ni(t.type)||t.type==="spring"||!da(t.ease)}function Vh(t,e){const n=new gi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const i=[];let s=0;for(;!r.done&&s<kh;)r=n.sample(s),i.push(r.value),s+=mn;return{times:void 0,keyframes:i,duration:s-mn,ease:"linear"}}const qa={anticipate:Da,backInOut:wa,circInOut:Ea};function jh(t){return t in qa}class ys extends za{constructor(e){super(e);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Fa(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&fn()&&jh(s)&&(s=qa[s]),Lh(this.options)){const{onComplete:d,onUpdate:h,motionValue:f,element:p,...g}=this.options,b=Vh(e,g);e=b.keyframes,e.length===1&&(e[1]=e[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const u=Rh(a.owner.current,l,e,{...this.options,duration:r,times:i,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(ts(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(wn(e,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:i,type:o,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return we(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return we(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Se(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return se;const{animation:r}=n;ts(r,e)}return se}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:h,...f}=this.options,p=new gi({...f,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),g=Se(this.time);c.setWithVelocity(p.sample(g-mn).value,p.sample(g).value,mn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Nh()&&r&&Mh.has(r)&&!l&&!c&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const _h={type:"spring",stiffness:500,damping:25,restSpeed:10},Bh=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Fh={type:"keyframes",duration:.8},zh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Uh=(t,{keyframes:e})=>e.length>2?Fh:Xe.has(t)?t.startsWith("scale")?Bh(e[1]):_h:zh;function Hh({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const mi=(t,e,n,r={},i,s)=>o=>{const a=ti(r,t)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Se(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:i};Hh(a)||(u={...u,...Uh(t,u)}),u.duration&&(u.duration=Se(u.duration)),u.repeatDelay&&(u.repeatDelay=Se(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!s&&e.get()!==void 0){const h=wn(u.keyframes,a);if(h!==void 0)return F.update(()=>{u.onUpdate(h),u.onComplete()}),new ld([])}return!s&&ys.supports(u)?new ys(u):new gi(u)};function $h({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Ka(t,e,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;r&&(o=r);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const d in l){const h=t.getValue(d,(s=t.latestValues[d])!==null&&s!==void 0?s:null),f=l[d];if(f===void 0||u&&$h(u,d))continue;const p={delay:n,...ti(o||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=ya(t);if(y){const x=window.MotionHandoffAnimation(y,d,F);x!==null&&(p.startTime=x,g=!0)}}ur(t,d),h.start(mi(d,h,f,t.shouldReduceMotion&&ma.has(d)?{type:!1}:p,t,g));const b=h.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{F.update(()=>{a&&Sd(t,a)})}),c}function vr(t,e,n={}){var r;const i=Sn(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Ka(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=s;return Wh(t,e,u+c,d,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[o,a]:[a,o];return c().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function Wh(t,e,n=0,r=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort(Gh).forEach((c,u)=>{c.notify("AnimationStart",e),o.push(vr(c,e,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function Gh(t,e){return t.sortNodePosition(e)}function qh(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(s=>vr(t,s,n));r=Promise.all(i)}else if(typeof e=="string")r=vr(t,e,n);else{const i=typeof e=="function"?Sn(t,e,n.custom):e;r=Promise.all(Ka(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const Kh=Hr.length;function Xa(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Xa(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Kh;n++){const r=Hr[n],i=t.props[r];(It(i)||i===!1)&&(e[r]=i)}return e}const Xh=[...Ur].reverse(),Yh=Ur.length;function Zh(t){return e=>Promise.all(e.map(({animation:n,options:r})=>qh(t,n,r)))}function Jh(t){let e=Zh(t),n=bs(),r=!0;const i=l=>(c,u)=>{var d;const h=Sn(t,u,l==="exit"?(d=t.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:p,...g}=h;c={...c,...g,...p}}return c};function s(l){e=l(t)}function o(l){const{props:c}=t,u=Xa(t.parent)||{},d=[],h=new Set;let f={},p=1/0;for(let b=0;b<Yh;b++){const y=Xh[b],x=n[y],S=c[y]!==void 0?c[y]:u[y],D=It(S),w=y===l?x.isActive:null;w===!1&&(p=b);let I=S===u[y]&&S!==c[y]&&D;if(I&&r&&t.manuallyAnimateOnMount&&(I=!1),x.protectedKeys={...f},!x.isActive&&w===null||!S&&!x.prevProp||Tn(S)||typeof S=="boolean")continue;const k=Qh(x.prevProp,S);let C=k||y===l&&x.isActive&&!I&&D||b>p&&D,_=!1;const j=Array.isArray(S)?S:[S];let G=j.reduce(i(y),{});w===!1&&(G={});const{prevResolvedValues:X={}}=x,ge={...X,...G},fe=z=>{C=!0,h.has(z)&&(_=!0,h.delete(z)),x.needsAnimating[z]=!0;const Y=t.getValue(z);Y&&(Y.liveStyle=!1)};for(const z in ge){const Y=G[z],Q=X[z];if(f.hasOwnProperty(z))continue;let Z=!1;ar(Y)&&ar(Q)?Z=!la(Y,Q):Z=Y!==Q,Z?Y!=null?fe(z):h.add(z):Y!==void 0&&h.has(z)?fe(z):x.protectedKeys[z]=!0}x.prevProp=S,x.prevResolvedValues=G,x.isActive&&(f={...f,...G}),r&&t.blockInitialAnimation&&(C=!1),C&&(!(I&&k)||_)&&d.push(...j.map(z=>({animation:z,options:{type:y}})))}if(h.size){const b={};h.forEach(y=>{const x=t.getBaseTarget(y),S=t.getValue(y);S&&(S.liveStyle=!0),b[y]=x??null}),d.push({animation:b})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),r=!1,g?e(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=o(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=bs(),r=!0}}}function Qh(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!la(e,t):!1}function je(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bs(){return{animate:je(!0),whileInView:je(),whileHover:je(),whileTap:je(),whileDrag:je(),whileFocus:je(),exit:je()}}class Ne{constructor(e){this.isMounted=!1,this.node=e}update(){}}class ef extends Ne{constructor(e){super(e),e.animationState||(e.animationState=Jh(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Tn(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let tf=0;class nf extends Ne{constructor(){super(...arguments),this.id=tf++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const rf={animation:{Feature:ef},exit:{Feature:nf}};function Nt(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function jt(t){return{point:{x:t.pageX,y:t.pageY}}}const sf=t=>e=>ii(e)&&t(e,jt(e));function wt(t,e,n,r){return Nt(t,e,sf(n),r)}const Ts=(t,e)=>Math.abs(t-e);function of(t,e){const n=Ts(t.x,e.x),r=Ts(t.y,e.y);return Math.sqrt(n**2+r**2)}class Ya{constructor(e,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Gn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=of(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:p}=d,{timestamp:g}=J;this.history.push({...p,timestamp:g});const{onStart:b,onMove:y}=this.handlers;h||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Wn(h,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Gn(d.type==="pointercancel"?this.lastMoveEventInfo:Wn(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,b),p&&p(d,b)},!ii(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=jt(e),a=Wn(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=J;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Gn(a,this.history)),this.removeListeners=Vt(wt(this.contextWindow,"pointermove",this.handlePointerMove),wt(this.contextWindow,"pointerup",this.handlePointerUp),wt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ae(this.updatePoint)}}function Wn(t,e){return e?{point:e(t.point)}:t}function xs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Gn({point:t},e){return{point:t,delta:xs(t,Za(e)),offset:xs(t,af(e)),velocity:lf(e,.1)}}function af(t){return t[0]}function Za(t){return t[t.length-1]}function lf(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=Za(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Se(e)));)n--;if(!r)return{x:0,y:0};const s=we(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const Ja=1e-4,cf=1-Ja,uf=1+Ja,Qa=.01,df=0-Qa,hf=0+Qa;function oe(t){return t.max-t.min}function ff(t,e,n){return Math.abs(t-e)<=n}function Ss(t,e,n,r=.5){t.origin=r,t.originPoint=$(e.min,e.max,t.origin),t.scale=oe(n)/oe(e),t.translate=$(n.min,n.max,t.origin)-t.originPoint,(t.scale>=cf&&t.scale<=uf||isNaN(t.scale))&&(t.scale=1),(t.translate>=df&&t.translate<=hf||isNaN(t.translate))&&(t.translate=0)}function Dt(t,e,n,r){Ss(t.x,e.x,n.x,r?r.originX:void 0),Ss(t.y,e.y,n.y,r?r.originY:void 0)}function ws(t,e,n){t.min=n.min+e.min,t.max=t.min+oe(e)}function pf(t,e,n){ws(t.x,e.x,n.x),ws(t.y,e.y,n.y)}function Ds(t,e,n){t.min=e.min-n.min,t.max=t.min+oe(e)}function Ct(t,e,n){Ds(t.x,e.x,n.x),Ds(t.y,e.y,n.y)}function gf(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?$(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?$(n,t,r.max):Math.min(t,n)),t}function Cs(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function mf(t,{top:e,left:n,bottom:r,right:i}){return{x:Cs(t.x,n,i),y:Cs(t.y,e,r)}}function Es(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function vf(t,e){return{x:Es(t.x,e.x),y:Es(t.y,e.y)}}function yf(t,e){let n=.5;const r=oe(t),i=oe(e);return i>r?n=st(e.min,e.max-r,t.min):r>i&&(n=st(t.min,t.max-i,e.min)),De(0,1,n)}function bf(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const yr=.35;function Tf(t=yr){return t===!1?t=0:t===!0&&(t=yr),{x:Ps(t,"left","right"),y:Ps(t,"top","bottom")}}function Ps(t,e,n){return{min:Os(t,e),max:Os(t,n)}}function Os(t,e){return typeof t=="number"?t:t[e]||0}const Is=()=>({translate:0,scale:1,origin:0,originPoint:0}),et=()=>({x:Is(),y:Is()}),As=()=>({min:0,max:0}),K=()=>({x:As(),y:As()});function ue(t){return[t("x"),t("y")]}function el({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function xf({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Sf(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function qn(t){return t===void 0||t===1}function br({scale:t,scaleX:e,scaleY:n}){return!qn(t)||!qn(e)||!qn(n)}function _e(t){return br(t)||tl(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function tl(t){return Ms(t.x)||Ms(t.y)}function Ms(t){return t&&t!=="0%"}function vn(t,e,n){const r=t-n,i=e*r;return n+i}function Rs(t,e,n,r,i){return i!==void 0&&(t=vn(t,i,r)),vn(t,n,r)+e}function Tr(t,e=0,n=1,r,i){t.min=Rs(t.min,e,n,r,i),t.max=Rs(t.max,e,n,r,i)}function nl(t,{x:e,y:n}){Tr(t.x,e.translate,e.scale,e.originPoint),Tr(t.y,n.translate,n.scale,n.originPoint)}const Ns=.999999999999,ks=1.0000000000001;function wf(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&nt(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,nl(t,o)),r&&_e(s.latestValues)&&nt(t,s.latestValues))}e.x<ks&&e.x>Ns&&(e.x=1),e.y<ks&&e.y>Ns&&(e.y=1)}function tt(t,e){t.min=t.min+e,t.max=t.max+e}function Ls(t,e,n,r,i=.5){const s=$(t.min,t.max,i);Tr(t,e,n,s,r)}function nt(t,e){Ls(t.x,e.x,e.scaleX,e.scale,e.originX),Ls(t.y,e.y,e.scaleY,e.scale,e.originY)}function rl(t,e){return el(Sf(t.getBoundingClientRect(),e))}function Df(t,e,n){const r=rl(t,n),{scroll:i}=e;return i&&(tt(r.x,i.offset.x),tt(r.y,i.offset.y)),r}const il=({current:t})=>t?t.ownerDocument.defaultView:null,Cf=new WeakMap;class Ef{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=K(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(jt(u).point)},s=(u,d)=>{const{drag:h,dragPropagation:f,onDragStart:p}=this.getProps();if(h&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=vd(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ue(b=>{let y=this.getAxisMotionValue(b).get()||0;if(ve.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const S=x.layout.layoutBox[b];S&&(y=oe(S)*(parseFloat(y)/100))}}this.originPoint[b]=y}),p&&F.postRender(()=>p(u,d)),ur(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:p,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=d;if(f&&this.currentDirection===null){this.currentDirection=Pf(b),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),g&&g(u,d)},a=(u,d)=>this.stop(u,d),l=()=>ue(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ya(e,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:il(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&F.postRender(()=>s(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!Zt(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=gf(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,s=this.constraints;n&&Je(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=mf(i.layoutBox,n):this.constraints=!1,this.elastic=Tf(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&ue(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=bf(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Je(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Df(r,i.root,this.visualElement.getTransformPagePoint());let o=vf(i.layout.layoutBox,s);if(n){const a=n(xf(o));this.hasMutatedConstraints=!!a,a&&(o=el(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ue(u=>{if(!Zt(u,n,this.currentDirection))return;let d=l&&l[u]||{};o&&(d={min:0,max:0});const h=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return ur(this.visualElement,e),r.start(mi(e,r,0,n,this.visualElement,!1))}stopAnimation(){ue(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){ue(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){ue(n=>{const{drag:r}=this.getProps();if(!Zt(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(e[n]-$(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Je(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ue(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=yf({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ue(o=>{if(!Zt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set($(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;Cf.set(this.visualElement,this);const e=this.visualElement.current,n=wt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Je(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),F.read(r);const o=Nt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ue(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=yr,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Zt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Pf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Of extends Ne{constructor(e){super(e),this.removeGroupControls=se,this.removeListeners=se,this.controls=new Ef(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||se}unmount(){this.removeGroupControls(),this.removeListeners()}}const Vs=t=>(e,n)=>{t&&F.postRender(()=>t(e,n))};class If extends Ne{constructor(){super(...arguments),this.removePointerDownListener=se}onPointerDown(e){this.session=new Ya(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:il(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Vs(e),onStart:Vs(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&F.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=wt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const rn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function js(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ht={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(A.test(t))t=parseFloat(t);else return t;const n=js(t,e.target.x),r=js(t,e.target.y);return`${n}% ${r}%`}},Af={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Me.parse(t);if(i.length>5)return r;const s=Me.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=$(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class Mf extends m.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;Yu(Rf),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),rn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||F.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Wr.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function sl(t){const[e,n]=du(),r=m.useContext(zo);return v.jsx(Mf,{...t,layoutGroup:r,switchLayoutGroup:m.useContext(Xo),isPresent:e,safeToRemove:n})}const Rf={borderRadius:{...ht,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomLeftRadius:ht,borderBottomRightRadius:ht,boxShadow:Af};function Nf(t,e,n){const r=te(t)?t:Mt(t);return r.start(mi("",r,e,n)),r.animation}function kf(t){return t instanceof SVGElement&&t.tagName!=="svg"}const Lf=(t,e)=>t.depth-e.depth;class Vf{constructor(){this.children=[],this.isDirty=!1}add(e){si(this.children,e),this.isDirty=!0}remove(e){oi(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Lf),this.isDirty=!1,this.children.forEach(e)}}function jf(t,e){const n=ye.now(),r=({timestamp:i})=>{const s=i-n;s>=e&&(Ae(r),t(s-e))};return F.read(r,!0),()=>Ae(r)}const ol=["TopLeft","TopRight","BottomLeft","BottomRight"],_f=ol.length,_s=t=>typeof t=="string"?parseFloat(t):t,Bs=t=>typeof t=="number"||A.test(t);function Bf(t,e,n,r,i,s){i?(t.opacity=$(0,n.opacity!==void 0?n.opacity:1,Ff(r)),t.opacityExit=$(e.opacity!==void 0?e.opacity:1,0,zf(r))):s&&(t.opacity=$(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<_f;o++){const a=`border${ol[o]}Radius`;let l=Fs(e,a),c=Fs(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Bs(l)===Bs(c)?(t[a]=Math.max($(_s(l),_s(c),r),0),(ve.test(c)||ve.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=$(e.rotate||0,n.rotate||0,r))}function Fs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ff=al(0,.5,Ca),zf=al(.5,.95,se);function al(t,e,n){return r=>r<t?0:r>e?1:n(st(t,e,r))}function zs(t,e){t.min=e.min,t.max=e.max}function ae(t,e){zs(t.x,e.x),zs(t.y,e.y)}function Us(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Hs(t,e,n,r,i){return t-=e,t=vn(t,1/n,r),i!==void 0&&(t=vn(t,1/i,r)),t}function Uf(t,e=0,n=1,r=.5,i,s=t,o=t){if(ve.test(e)&&(e=parseFloat(e),e=$(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=$(s.min,s.max,r);t===s&&(a-=e),t.min=Hs(t.min,e,n,a,i),t.max=Hs(t.max,e,n,a,i)}function $s(t,e,[n,r,i],s,o){Uf(t,e[n],e[r],e[i],e.scale,s,o)}const Hf=["x","scaleX","originX"],$f=["y","scaleY","originY"];function Ws(t,e,n,r){$s(t.x,e,Hf,n?n.x:void 0,r?r.x:void 0),$s(t.y,e,$f,n?n.y:void 0,r?r.y:void 0)}function Gs(t){return t.translate===0&&t.scale===1}function ll(t){return Gs(t.x)&&Gs(t.y)}function qs(t,e){return t.min===e.min&&t.max===e.max}function Wf(t,e){return qs(t.x,e.x)&&qs(t.y,e.y)}function Ks(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function cl(t,e){return Ks(t.x,e.x)&&Ks(t.y,e.y)}function Xs(t){return oe(t.x)/oe(t.y)}function Ys(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Gf{constructor(){this.members=[]}add(e){si(this.members,e),e.scheduleRender()}remove(e){if(oi(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qf(t,e,n){let r="";const i=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Be={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},yt=typeof window<"u"&&window.MotionDebug!==void 0,Kn=["","X","Y","Z"],Kf={visibility:"hidden"},Zs=1e3;let Xf=0;function Xn(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function ul(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ya(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",F,!(i||s))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&ul(r)}function dl({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Xf++,this.animationId=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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,yt&&(Be.totalNodes=Be.resolvedTargetDeltas=Be.recalculatedProjection=0),this.nodes.forEach(Jf),this.nodes.forEach(rp),this.nodes.forEach(ip),this.nodes.forEach(Qf),yt&&window.MotionDebug.record(Be)},this.resolvedRelativeTargetAt=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 l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vf)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ai),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=kf(o),this.instance=o;const{layoutId:l,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),a&&(c||l)&&(this.isLayoutDirty=!0),t){let d;const h=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=jf(h,250),rn.hasAnimatedSinceResize&&(rn.hasAnimatedSinceResize=!1,this.nodes.forEach(Qs))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||cp,{onLayoutAnimationStart:b,onLayoutAnimationComplete:y}=u.getProps(),x=!this.targetLayout||!cl(this.targetLayout,p)||f,S=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||S||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,S);const D={...ti(g,"layout"),onPlay:b,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(D.delay=0,D.type=!1),this.startAnimation(D)}else h||Qs(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,Ae(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(sp),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&&ul(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Js);return}this.isUpdating||this.nodes.forEach(tp),this.isUpdating=!1,this.nodes.forEach(np),this.nodes.forEach(Yf),this.nodes.forEach(Zf),this.clearAllSnapshots();const a=ye.now();J.delta=De(0,1e3/60,a-J.timestamp),J.timestamp=a,J.isProcessing=!0,Fn.update.process(J),Fn.preRender.process(J),Fn.render.process(J),J.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ep),this.sharedNodes.forEach(op)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=K(),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){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ll(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(a||_e(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),up(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return K();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(dp))){const{scroll:u}=this.root;u&&(tt(l.x,u.offset.x),tt(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=K();if(ae(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&ae(l,o),tt(l.x,d.offset.x),tt(l.y,d.offset.y))}return l}applyTransform(o,a=!1){const l=K();ae(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&nt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),_e(u.latestValues)&&nt(l,u.latestValues)}return _e(this.latestValues)&&nt(l,this.latestValues),l}removeTransform(o){const a=K();ae(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!_e(c.latestValues))continue;br(c.latestValues)&&c.updateSnapshot();const u=K(),d=c.measurePageBox();ae(u,d),Ws(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return _e(this.latestValues)&&Ws(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!==J.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=J.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=K(),this.relativeTargetOrigin=K(),Ct(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),ae(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=K(),this.targetWithTransforms=K()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ae(this.target,this.layout.layoutBox),nl(this.target,this.targetDelta)):ae(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=K(),this.relativeTargetOrigin=K(),Ct(this.relativeTargetOrigin,this.target,f.target),ae(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}yt&&Be.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||br(this.parent.latestValues)||tl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===J.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=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||d))return;ae(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;wf(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=K());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Us(this.prevProjectionDelta.x,this.projectionDelta.x),Us(this.prevProjectionDelta.y,this.projectionDelta.y)),Dt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Ys(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ys(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),yt&&Be.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=et(),this.projectionDelta=et(),this.projectionDeltaWithTransform=et()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=et();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=K(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=f!==p,b=this.getStack(),y=!b||b.members.length<=1,x=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(lp));this.animationProgress=0;let S;this.mixTargetDelta=D=>{const w=D/1e3;eo(d.x,o.x,w),eo(d.y,o.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ct(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ap(this.relativeTarget,this.relativeTargetOrigin,h,w),S&&Wf(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=K()),ae(S,this.relativeTarget)),g&&(this.animationValues=u,Bf(u,c,this.latestValues,w,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ae(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{rn.hasAnimatedSinceResize=!0,this.currentAnimation=Nf(0,Zs,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},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(Zs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&hl(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||K();const d=oe(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=oe(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}ae(a,l),nt(a,u),Dt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Gf),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),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:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Xn("z",o,c,this.animationValues);for(let u=0;u<Kn.length;u++)Xn(`rotate${Kn[u]}`,o,c,this.animationValues),Xn(`skew${Kn[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Kf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=tn(o==null?void 0:o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=tn(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!_e(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const h=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=qf(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const g in hn){if(h[g]===void 0)continue;const{correct:b,applyTo:y}=hn[g],x=c.transform==="none"?h[g]:b(h[g],d);if(y){const S=y.length;for(let D=0;D<S;D++)c[y[D]]=x}else c[g]=x}return this.options.layoutId&&(c.pointerEvents=d===this?tn(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Js),this.root.sharedNodes.clear()}}}function Yf(t){t.updateLayout()}function Zf(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;s==="size"?ue(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],f=oe(h);h.min=r[d].min,h.max=h.min+f}):hl(s,n.layoutBox,r)&&ue(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],f=oe(r[d]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+f)});const a=et();Dt(a,r,n.layoutBox);const l=et();o?Dt(l,t.applyTransform(i,!0),n.measuredBox):Dt(l,r,n.layoutBox);const c=!ll(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const p=K();Ct(p,n.layoutBox,h.layoutBox);const g=K();Ct(g,r,f.layoutBox),cl(p,g)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=p,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function Jf(t){yt&&Be.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Qf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ep(t){t.clearSnapshot()}function Js(t){t.clearMeasurements()}function tp(t){t.isLayoutDirty=!1}function np(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Qs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rp(t){t.resolveTargetDelta()}function ip(t){t.calcProjection()}function sp(t){t.resetSkewAndRotation()}function op(t){t.removeLeadSnapshot()}function eo(t,e,n){t.translate=$(e.translate,0,n),t.scale=$(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function to(t,e,n,r){t.min=$(e.min,n.min,r),t.max=$(e.max,n.max,r)}function ap(t,e,n,r){to(t.x,e.x,n.x,r),to(t.y,e.y,n.y,r)}function lp(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const cp={duration:.45,ease:[.4,0,.1,1]},no=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ro=no("applewebkit/")&&!no("chrome/")?Math.round:se;function io(t){t.min=ro(t.min),t.max=ro(t.max)}function up(t){io(t.x),io(t.y)}function hl(t,e,n){return t==="position"||t==="preserve-aspect"&&!ff(Xs(e),Xs(n),.2)}function dp(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const hp=dl({attachResizeListener:(t,e)=>Nt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Yn={current:void 0},fl=dl({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Yn.current){const t=new hp({});t.mount(window),t.setOptions({layoutScroll:!0}),Yn.current=t}return Yn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),fp={pan:{Feature:If},drag:{Feature:Of,ProjectionNode:fl,MeasureLayout:sl}};function so(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&F.postRender(()=>s(e,jt(e)))}class pp extends Ne{mount(){const{current:e}=this.node;e&&(this.unmount=hd(e,n=>(so(this.node,n,"Start"),r=>so(this.node,r,"End"))))}unmount(){}}class gp extends Ne{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=Vt(Nt(this.node.current,"focus",()=>this.onFocus()),Nt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function oo(t,e,n){const{props:r}=t;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&F.postRender(()=>s(e,jt(e)))}class mp extends Ne{mount(){const{current:e}=this.node;e&&(this.unmount=md(e,n=>(oo(this.node,n,"Start"),(r,{success:i})=>oo(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const xr=new WeakMap,Zn=new WeakMap,vp=t=>{const e=xr.get(t.target);e&&e(t)},yp=t=>{t.forEach(vp)};function bp({root:t,...e}){const n=t||document;Zn.has(n)||Zn.set(n,{});const r=Zn.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(yp,{root:t,...e})),r[i]}function Tp(t,e,n){const r=bp(e);return xr.set(t,n),r.observe(t),()=>{xr.delete(t),r.unobserve(t)}}const xp={some:0,all:1};class Sp extends Ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:xp[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return Tp(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(wp(e,n))&&this.startObserver()}unmount(){}}function wp({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Dp={inView:{Feature:Sp},tap:{Feature:mp},focus:{Feature:gp},hover:{Feature:pp}},Cp={layout:{ProjectionNode:fl,MeasureLayout:sl}},Sr={current:null},pl={current:!1};function Ep(){if(pl.current=!0,!!Fr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Sr.current=t.matches;t.addListener(e),e()}else Sr.current=!1}const Pp=[...Ba,ee,Me],Op=t=>Pp.find(_a(t)),ao=new WeakMap;function Ip(t,e,n){for(const r in e){const i=e[r],s=n[r];if(te(i))t.addValue(r,i);else if(te(s))t.addValue(r,Mt(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(r);t.addValue(r,Mt(o!==void 0?o:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const lo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ap{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 f=ye.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,F.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=o;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=xn(n),this.isVariantNode=qo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const p=h[f];l[f]!==void 0&&te(p)&&p.set(l[f],!1)}}mount(e){this.current=e,ao.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),pl.current||Ep(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Sr.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){ao.delete(this.current),this.projection&&this.projection.unmount(),Ae(this.notifyUpdate),Ae(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Xe.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&F.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ot){const n=ot[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):K()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<lo.length;r++){const i=lo[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=e[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Ip(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Mt(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Va(i)||Pa(i))?i=parseFloat(i):!Op(i)&&Me.test(n)&&(i=Na(e,n)),this.setBaseTarget(e,te(i)?i.get():i)),te(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=qr(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[e])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!te(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ai),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class gl extends Ap{constructor(){super(...arguments),this.KeyframeResolver=Fa}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;te(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Mp(t){return window.getComputedStyle(t)}class Rp extends gl{constructor(){super(...arguments),this.type="html",this.renderInstance=na}readValueFromInstance(e,n){if(Xe.has(n)){const r=hi(n);return r&&r.default||0}else{const r=Mp(e),i=(Qo(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return rl(e,n)}build(e,n,r){Yr(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return ei(e,n,r)}}class Np extends gl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=K}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Xe.has(n)){const r=hi(n);return r&&r.default||0}return n=ra.has(n)?n:$r(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return oa(e,n,r)}build(e,n,r){Zr(e,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,n,r,i){ia(e,n,r,i)}mount(e){this.isSVGTag=Qr(e.tagName),super.mount(e)}}const kp=(t,e)=>Gr(t)?new Np(e):new Rp(e,{allowProjection:t!==m.Fragment}),Lp=sd({...rf,...Dp,...fp,...Cp},kp),Vp=Tu(Lp);function co(t,e){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>t(...r),e)}}function jp({debounce:t,scroll:e,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)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[s,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:s,orientationHandler:null}),l=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,u=m.useRef(!1);m.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[d,h,f]=m.useMemo(()=>{const y=()=>{if(!a.current.element)return;const{left:x,top:S,width:D,height:w,bottom:I,right:k,x:C,y:_}=a.current.element.getBoundingClientRect(),j={left:x,top:S,width:D,height:w,bottom:I,right:k,x:C,y:_};a.current.element instanceof HTMLElement&&r&&(j.height=a.current.element.offsetHeight,j.width=a.current.element.offsetWidth),Object.freeze(j),u.current&&!zp(a.current.lastBounds,j)&&o(a.current.lastBounds=j)};return[y,c?co(y,c):y,l?co(y,l):y]},[o,r,l,c]);function p(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",f,!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 g(){a.current.element&&(a.current.resizeObserver=new i(f),a.current.resizeObserver.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(y=>y.addEventListener("scroll",f,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{f()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const b=y=>{!y||y===a.current.element||(p(),a.current.element=y,a.current.scrollContainers=ml(y),g())};return Bp(f,!!e),_p(h),m.useEffect(()=>{p(),g()},[e,f,h]),m.useEffect(()=>p,[]),[b,s,d]}function _p(t){m.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Bp(t,e){m.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function ml(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(s=>s==="auto"||s==="scroll")&&e.push(t),[...e,...ml(t.parentElement)]}const Fp=["x","y","top","bottom","left","right","width","height"],zp=(t,e)=>Fp.every(n=>t[n]===e[n]),vl=m.createContext({dragDropManager:void 0});function le(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var uo=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ho=function(){return Math.random().toString(36).substring(7).split("").join(".")},fo={INIT:"@@redux/INIT"+ho(),REPLACE:"@@redux/REPLACE"+ho()};function Up(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function yl(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(le(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(le(1));return n(yl)(t,e)}if(typeof t!="function")throw new Error(le(2));var i=t,s=e,o=[],a=o,l=!1;function c(){a===o&&(a=o.slice())}function u(){if(l)throw new Error(le(3));return s}function d(g){if(typeof g!="function")throw new Error(le(4));if(l)throw new Error(le(5));var b=!0;return c(),a.push(g),function(){if(b){if(l)throw new Error(le(6));b=!1,c();var x=a.indexOf(g);a.splice(x,1),o=null}}}function h(g){if(!Up(g))throw new Error(le(7));if(typeof g.type>"u")throw new Error(le(8));if(l)throw new Error(le(9));try{l=!0,s=i(s,g)}finally{l=!1}for(var b=o=a,y=0;y<b.length;y++){var x=b[y];x()}return g}function f(g){if(typeof g!="function")throw new Error(le(10));i=g,h({type:fo.REPLACE})}function p(){var g,b=d;return g={subscribe:function(x){if(typeof x!="object"||x===null)throw new Error(le(11));function S(){x.next&&x.next(u())}S();var D=b(S);return{unsubscribe:D}}},g[uo]=function(){return this},g}return h({type:fo.INIT}),r={dispatch:h,subscribe:d,getState:u,replaceReducer:f},r[uo]=p,r}function L(t,e,...n){if(Hp()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===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 i=0;r=new Error(e.replace(/%s/g,function(){return n[i++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function Hp(){return typeof process<"u"&&!0}function $p(t,e,n){return e.split(".").reduce((r,i)=>r&&r[i]?r[i]:n||null,t)}function Wp(t,e){return t.filter(n=>n!==e)}function bl(t){return typeof t=="object"}function Gp(t,e){const n=new Map,r=s=>{n.set(s,n.has(s)?n.get(s)+1:1)};t.forEach(r),e.forEach(r);const i=[];return n.forEach((s,o)=>{s===1&&i.push(o)}),i}function qp(t,e){return t.filter(n=>e.indexOf(n)>-1)}const vi="dnd-core/INIT_COORDS",Dn="dnd-core/BEGIN_DRAG",yi="dnd-core/PUBLISH_DRAG_SOURCE",Cn="dnd-core/HOVER",En="dnd-core/DROP",Pn="dnd-core/END_DRAG";function po(t,e){return{type:vi,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const Kp={type:vi,payload:{clientOffset:null,sourceClientOffset:null}};function Xp(t){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:s,getSourceClientOffset:o}=r,a=t.getMonitor(),l=t.getRegistry();t.dispatch(po(s)),Yp(n,a,l);const c=Qp(n,a);if(c==null){t.dispatch(Kp);return}let u=null;if(s){if(!o)throw new Error("getSourceClientOffset must be defined");Zp(o),u=o(c)}t.dispatch(po(s,u));const h=l.getSource(c).beginDrag(a,c);if(h==null)return;Jp(h),l.pinSource(c);const f=l.getSourceType(c);return{type:Dn,payload:{itemType:f,item:h,sourceId:c,clientOffset:s||null,sourceClientOffset:u||null,isSourcePublic:!!i}}}}function Yp(t,e,n){L(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){L(n.getSource(r),"Expected sourceIds to be registered.")})}function Zp(t){L(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Jp(t){L(bl(t),"Item must be an object.")}function Qp(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function eg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){eg(t,i,n[i])})}return t}function ng(t){return function(n={}){const r=t.getMonitor(),i=t.getRegistry();rg(r),og(r).forEach((o,a)=>{const l=ig(o,a,i,r),c={type:En,payload:{dropResult:tg({},n,l)}};t.dispatch(c)})}}function rg(t){L(t.isDragging(),"Cannot call drop while not dragging."),L(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function ig(t,e,n,r){const i=n.getTarget(t);let s=i?i.drop(r,t):void 0;return sg(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function sg(t){L(typeof t>"u"||bl(t),"Drop result must either be an object or undefined.")}function og(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function ag(t){return function(){const n=t.getMonitor(),r=t.getRegistry();lg(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:Pn}}}function lg(t){L(t.isDragging(),"Cannot call endDrag while not dragging.")}function wr(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function cg(t){return function(n,{clientOffset:r}={}){ug(n);const i=n.slice(0),s=t.getMonitor(),o=t.getRegistry(),a=s.getItemType();return hg(i,o,a),dg(i,s,o),fg(i,s,o),{type:Cn,payload:{targetIds:i,clientOffset:r||null}}}}function ug(t){L(Array.isArray(t),"Expected targetIds to be an array.")}function dg(t,e,n){L(e.isDragging(),"Cannot call hover while not dragging."),L(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const i=t[r];L(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");const s=n.getTarget(i);L(s,"Expected targetIds to be registered.")}}function hg(t,e,n){for(let r=t.length-1;r>=0;r--){const i=t[r],s=e.getTargetType(i);wr(s,n)||t.splice(r,1)}}function fg(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function pg(t){return function(){if(t.getMonitor().isDragging())return{type:yi}}}function gg(t){return{beginDrag:Xp(t),publishDragSource:pg(t),hover:cg(t),drop:ng(t),endDrag:ag(t)}}class mg{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(s){return(...o)=>{const a=s.apply(e,o);typeof a<"u"&&n(a)}}const i=gg(this);return Object.keys(i).reduce((s,o)=>{const a=i[o];return s[o]=r(a),s},{})}dispatch(e){this.store.dispatch(e)}constructor(e,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=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function vg(t,e){return{x:t.x+e.x,y:t.y+e.y}}function Tl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function yg(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:Tl(vg(e,r),n)}function bg(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:Tl(e,n)}const Et=[],bi=[];Et.__IS_NONE__=!0;bi.__IS_ALL__=!0;function Tg(t,e){return t===Et?!1:t===bi||typeof e>"u"?!0:qp(e,t).length>0}class xg{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;L(typeof e=="function","listener must be a function."),L(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const s=()=>{const o=this.store.getState(),a=o.stateId;try{a===i||a===i+1&&!Tg(o.dirtyHandlerIds,r)||e()}finally{i=a}};return this.store.subscribe(s)}subscribeToOffsetChange(e){L(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return L(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(L(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),i=this.getItemType();return wr(r,i)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(L(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),i=this.getItemType();return r!==i?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),s=this.getItemType();if(s&&!wr(i,s))return!1;const o=this.getTargetIds();if(!o.length)return!1;const a=o.indexOf(e);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 yg(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return bg(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const go=typeof global<"u"?global:self,xl=go.MutationObserver||go.WebKitMutationObserver;function Sl(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function Sg(t){let e=1;const n=new xl(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const wg=typeof xl=="function"?Sg:Sl;class Dg{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=wg(this.flush),this.requestErrorThrow=Sl(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Cg{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Eg{create(e){const n=this.freeTasks,r=n.length?n.pop():new Cg(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const wl=new Dg,Pg=new Eg(wl.registerPendingError);function Og(t){wl.enqueueTask(Pg.create(t))}const Ti="dnd-core/ADD_SOURCE",xi="dnd-core/ADD_TARGET",Si="dnd-core/REMOVE_SOURCE",On="dnd-core/REMOVE_TARGET";function Ig(t){return{type:Ti,payload:{sourceId:t}}}function Ag(t){return{type:xi,payload:{targetId:t}}}function Mg(t){return{type:Si,payload:{sourceId:t}}}function Rg(t){return{type:On,payload:{targetId:t}}}function Ng(t){L(typeof t.canDrag=="function","Expected canDrag to be a function."),L(typeof t.beginDrag=="function","Expected beginDrag to be a function."),L(typeof t.endDrag=="function","Expected endDrag to be a function.")}function kg(t){L(typeof t.canDrop=="function","Expected canDrop to be a function."),L(typeof t.hover=="function","Expected hover to be a function."),L(typeof t.drop=="function","Expected beginDrag to be a function.")}function Dr(t,e){if(e&&Array.isArray(t)){t.forEach(n=>Dr(n,!1));return}L(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var de;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(de||(de={}));let Lg=0;function Vg(){return Lg++}function jg(t){const e=Vg().toString();switch(t){case de.SOURCE:return`S${e}`;case de.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function mo(t){switch(t[0]){case"S":return de.SOURCE;case"T":return de.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function vo(t,e){const n=t.entries();let r=!1;do{const{done:i,value:[,s]}=n.next();if(s===e)return!0;r=!!i}while(!r);return!1}class _g{addSource(e,n){Dr(e),Ng(n);const r=this.addHandler(de.SOURCE,e,n);return this.store.dispatch(Ig(r)),r}addTarget(e,n){Dr(e,!0),kg(n);const r=this.addHandler(de.TARGET,e,n);return this.store.dispatch(Ag(r)),r}containsHandler(e){return vo(this.dragSources,e)||vo(this.dropTargets,e)}getSource(e,n=!1){return L(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return L(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return L(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return L(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return mo(e)===de.SOURCE}isTargetId(e){return mo(e)===de.TARGET}removeSource(e){L(this.getSource(e),"Expected an existing source."),this.store.dispatch(Mg(e)),Og(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){L(this.getTarget(e),"Expected an existing target."),this.store.dispatch(Rg(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);L(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){L(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const i=jg(e);return this.types.set(i,n),e===de.SOURCE?this.dragSources.set(i,r):e===de.TARGET&&this.dropTargets.set(i,r),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Bg=(t,e)=>t===e;function Fg(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function zg(t,e,n=Bg){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Ug(t=Et,e){switch(e.type){case Cn:break;case Ti:case xi:case On:case Si:return Et;case Dn:case yi:case Pn:case En:default:return bi}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,i=Gp(n,r);if(!(i.length>0||!zg(n,r)))return Et;const o=r[r.length-1],a=n[n.length-1];return o!==a&&(o&&i.push(o),a&&i.push(a)),i}function Hg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $g(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Hg(t,i,n[i])})}return t}const yo={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Wg(t=yo,e){const{payload:n}=e;switch(e.type){case vi:case Dn:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Cn:return Fg(t.clientOffset,n.clientOffset)?t:$g({},t,{clientOffset:n.clientOffset});case Pn:case En:return yo;default:return t}}function Gg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ze(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Gg(t,i,n[i])})}return t}const qg={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Kg(t=qg,e){const{payload:n}=e;switch(e.type){case Dn:return Ze({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case yi:return Ze({},t,{isSourcePublic:!0});case Cn:return Ze({},t,{targetIds:n.targetIds});case On:return t.targetIds.indexOf(n.targetId)===-1?t:Ze({},t,{targetIds:Wp(t.targetIds,n.targetId)});case En:return Ze({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Pn:return Ze({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Xg(t=0,e){switch(e.type){case Ti:case xi:return t+1;case Si:case On:return t-1;default:return t}}function Yg(t=0){return t+1}function Zg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Zg(t,i,n[i])})}return t}function Qg(t={},e){return{dirtyHandlerIds:Ug(t.dirtyHandlerIds,{type:e.type,payload:Jg({},e.payload,{prevTargetIds:$p(t,"dragOperation.targetIds",[])})}),dragOffset:Wg(t.dragOffset,e),refCount:Xg(t.refCount,e),dragOperation:Kg(t.dragOperation,e),stateId:Yg(t.stateId)}}function em(t,e=void 0,n={},r=!1){const i=tm(r),s=new xg(i,new _g(i)),o=new mg(i,s),a=t(o,e,n);return o.receiveBackend(a),o}function tm(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return yl(Qg,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function nm(t,e){if(t==null)return{};var n=rm(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function rm(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}let bo=0;const sn=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var im=m.memo(function(e){var{children:n}=e,r=nm(e,["children"]);const[i,s]=sm(r);return m.useEffect(()=>{if(s){const o=Dl();return++bo,()=>{--bo===0&&(o[sn]=null)}}},[]),v.jsx(vl.Provider,{value:i,children:n})});function sm(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=om(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function om(t,e=Dl(),n,r){const i=e;return i[sn]||(i[sn]={dragDropManager:em(t,e,n,r)}),i[sn]}function Dl(){return typeof global<"u"?global:window}var am=Cc();const lm=ac(am),qe=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Cl(t,e,n){const[r,i]=m.useState(()=>e(t)),s=m.useCallback(()=>{const o=e(t);lm(r,o)||(i(o),n&&n())},[r,t,n]);return qe(s),[r,s]}function cm(t,e,n){const[r,i]=Cl(t,e,n);return qe(function(){const o=t.getHandlerId();if(o!=null)return t.subscribeToStateChange(i,{handlerIds:[o]})},[t,i]),r}function El(t,e,n){return cm(e,t||(()=>({})),()=>n.reconnect())}function Pl(t,e){const n=[];return typeof t!="function"&&n.push(t),m.useMemo(()=>typeof t=="function"?t():t,n)}function um(t){return m.useMemo(()=>t.hooks.dragSource(),[t])}function dm(t){return m.useMemo(()=>t.hooks.dragPreview(),[t])}let Jn=!1,Qn=!1;class hm{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){L(!Jn,"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 Jn=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Jn=!1}}isDragging(){if(!this.sourceId)return!1;L(!Qn,"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 Qn=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Qn=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}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(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let er=!1;class fm{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;L(!er,"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 er=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{er=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!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(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function pm(t,e,n){const r=n.getRegistry(),i=r.addTarget(t,e);return[i,()=>r.removeTarget(i)]}function gm(t,e,n){const r=n.getRegistry(),i=r.addSource(t,e);return[i,()=>r.removeSource(i)]}function Cr(t,e,n,r){let i;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length)return!1;const a=Object.prototype.hasOwnProperty.bind(e);for(let l=0;l<s.length;l++){const c=s[l];if(!a(c))return!1;const u=t[c],d=e[c];if(i=void 0,i===!1||i===void 0&&u!==d)return!1}return!0}function Er(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function mm(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function vm(t){return(e=null,n=null)=>{if(!m.isValidElement(e)){const s=e;return t(s,n),s}const r=e;return mm(r),ym(r,n?s=>t(s,n):t)}}function Ol(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const i=vm(r);e[n]=()=>i}}),e}function To(t,e){typeof t=="function"?t(e):t.current=e}function ym(t,e){const n=t.ref;return L(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(t,{ref:r=>{To(n,r),To(e,r)}}):m.cloneElement(t,{ref:e})}class bm{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||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!Cr(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Cr(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(e){this.hooks=Ol({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,Er(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,Er(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=e}}class Tm{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Cr(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(e){this.hooks=Ol({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,Er(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=e}}function Ce(){const{dragDropManager:t}=m.useContext(vl);return L(t!=null,"Expected drag drop context"),t}function xm(t,e){const n=Ce(),r=m.useMemo(()=>new bm(n.getBackend()),[n]);return qe(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),qe(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function Sm(){const t=Ce();return m.useMemo(()=>new hm(t),[t])}class wm{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,i=this.monitor,{isDragging:s}=r;return s?s(i):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:i}=e;i&&i(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function Dm(t,e,n){const r=m.useMemo(()=>new wm(t,e,n),[e,n]);return m.useEffect(()=>{r.spec=t},[t]),r}function Cm(t){return m.useMemo(()=>{const e=t.type;return L(e!=null,"spec.type must be defined"),e},[t])}function Em(t,e,n){const r=Ce(),i=Dm(t,e,n),s=Cm(t);qe(function(){if(s!=null){const[a,l]=gm(s,i,r);return e.receiveHandlerId(a),n.receiveHandlerId(a),l}},[r,e,n,i,s])}function Pm(t,e){const n=Pl(t);L(!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=Sm(),i=xm(n.options,n.previewOptions);return Em(n,r,i),[El(n.collect,r,i),um(i),dm(i)]}function Om(t){const n=Ce().getMonitor(),[r,i]=Cl(n,t);return m.useEffect(()=>n.subscribeToOffsetChange(i)),m.useEffect(()=>n.subscribeToStateChange(i)),r}function Im(t){return m.useMemo(()=>t.hooks.dropTarget(),[t])}function Am(t){const e=Ce(),n=m.useMemo(()=>new Tm(e.getBackend()),[e]);return qe(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function Mm(){const t=Ce();return m.useMemo(()=>new fm(t),[t])}function Rm(t){const{accept:e}=t;return m.useMemo(()=>(L(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class Nm{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function km(t,e){const n=m.useMemo(()=>new Nm(t,e),[e]);return m.useEffect(()=>{n.spec=t},[t]),n}function Lm(t,e,n){const r=Ce(),i=km(t,e),s=Rm(t);qe(function(){const[a,l]=pm(s,i,r);return e.receiveHandlerId(a),n.receiveHandlerId(a),l},[r,e,i,n,s.map(o=>o.toString()).join("|")])}function Il(t,e){const n=Pl(t),r=Mm(),i=Am(n.options);return Lm(n,r,i),[El(n.collect,r,i),Im(i)]}var Al=t=>{throw TypeError(t)},Ml=(t,e,n)=>e.has(t)||Al("Cannot "+n),N=(t,e,n)=>(Ml(t,e,"read from private field"),n?n.call(t):e.get(t)),ce=(t,e,n)=>e.has(t)?Al("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Fe=(t,e,n,r)=>(Ml(t,e,"write to private field"),e.set(t,n),n),Pe,Vm=class{constructor(){ce(this,Pe),this.register=t=>{N(this,Pe).push(t)},this.unregister=t=>{for(;N(this,Pe).indexOf(t)!==-1;)N(this,Pe).splice(N(this,Pe).indexOf(t),1)},this.backendChanged=t=>{for(let e of N(this,Pe))e.backendChanged(t)},Fe(this,Pe,[])}};Pe=new WeakMap;var re,bt,ie,xe,ze,Pr,Or,Ir,on,an,Tt,Rl=class ln{constructor(e,n,r){if(ce(this,re),ce(this,bt),ce(this,ie),ce(this,xe),ce(this,ze),ce(this,Pr,(i,s,o)=>{if(!o.backend)throw new Error(`You must specify a 'backend' property in your Backend entry: ${JSON.stringify(o)}`);let a=o.backend(i,s,o.options),l=o.id,c=!o.id&&a&&a.constructor;if(c&&(l=a.constructor.name),!l)throw new Error(`You must specify an 'id' property in your Backend entry: ${JSON.stringify(o)}
3
3
  see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx`);if(c&&console.warn(`Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.
4
4
  This might be unsupported in the future, please specify 'id' explicitely for every backend.`),N(this,ie)[l])throw new Error(`You must specify a unique 'id' property in your Backend entry: