@oliasoft-open-source/react-ui-library 4.2.1 → 4.3.0-beta-1

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 (91) hide show
  1. package/dist/storybook/assets/{Color-6VNJS4EI-11a1508d.js → Color-6VNJS4EI-caa8bffa.js} +1 -1
  2. package/dist/storybook/assets/{DocsRenderer-NNNQARDV-8f214a0a.js → DocsRenderer-NNNQARDV-e463e8a5.js} +1 -1
  3. package/dist/storybook/assets/{WithTooltip-4HIR6TLV-bcdb019a.js → WithTooltip-4HIR6TLV-9514f93a.js} +1 -1
  4. package/dist/storybook/assets/accordion-with-default-toggle-0b4845c8.js +1 -0
  5. package/dist/storybook/assets/accordion.stories-ad491954.js +170 -0
  6. package/dist/storybook/assets/{afe.stories-afb9be07.js → afe.stories-49904fdb.js} +1 -1
  7. package/dist/storybook/assets/breadcrumb-f8742fbd.js +1 -0
  8. package/dist/storybook/assets/breadcrumb.stories-b5582cfb.js +1 -0
  9. package/dist/storybook/assets/buttons-and-links-6c701fa6.js +14 -0
  10. package/dist/storybook/assets/{casing-loads.stories-cfbab702.js → casing-loads.stories-dff0b8fc.js} +1 -1
  11. package/dist/storybook/assets/{chunk-HLWAVYOI-6a96cff0.js → chunk-HLWAVYOI-d8be29f3.js} +1 -1
  12. package/dist/storybook/assets/{color-9bdf643a.js → color-9e78f280.js} +1 -1
  13. package/dist/storybook/assets/{drawer.stories-39625e91.js → drawer.stories-59cd794a.js} +1 -1
  14. package/dist/storybook/assets/empty-2d83d50b.js +1 -0
  15. package/dist/storybook/assets/empty.stories-c98807b8.js +1 -0
  16. package/dist/storybook/assets/file-input-a3594635.js +1 -0
  17. package/dist/storybook/assets/file-input.stories-3d2e95e7.js +55 -0
  18. package/dist/storybook/assets/{formatter-SWP5E3XI-06c7911e.js → formatter-SWP5E3XI-c42be4d9.js} +1 -1
  19. package/dist/storybook/assets/{preview-d47a2f40.css → global-aa71ac9c.css} +1 -1
  20. package/dist/storybook/assets/iframe-8d80f428.js +1 -0
  21. package/dist/storybook/assets/{index-97b8789c.js → index-56f304c1.js} +4 -4
  22. package/dist/storybook/assets/{input-validation-64e7abcc.js → input-validation-1b895773.js} +1 -1
  23. package/dist/storybook/assets/{inputs-e48e1acb.js → inputs-e51c1c31.js} +2 -2
  24. package/dist/storybook/assets/{layout-forms-289235b9.js → layout-forms-29ceb520.js} +1 -1
  25. package/dist/storybook/assets/{layout-general-545e69b0.js → layout-general-245ef20f.js} +1 -1
  26. package/dist/storybook/assets/{list-0dc3df85.js → list-e6e7e5ed.js} +1 -1
  27. package/dist/storybook/assets/{list.stories-5715452e.js → list.stories-e2d00aea.js} +1 -1
  28. package/dist/storybook/assets/{message-7e627e60.js → message-dabd76a8.js} +1 -1
  29. package/dist/storybook/assets/{message.stories-f41a0c22.js → message.stories-6f612f7c.js} +1 -1
  30. package/dist/storybook/assets/meta-content-6f132e03.js +1 -0
  31. package/dist/storybook/assets/modal-ad69eee9.js +1 -0
  32. package/dist/storybook/assets/modal-f1e8e468.css +1 -0
  33. package/dist/storybook/assets/{modal.stories-0e068cc1.js → modal.stories-448cc75d.js} +1 -1
  34. package/dist/storybook/assets/option-dropdown-fbe54c09.js +1 -0
  35. package/dist/storybook/assets/option-dropdown.stories-8b7ee529.js +21 -0
  36. package/dist/storybook/assets/{padding-and-spacing-7aefd342.js → padding-and-spacing-27e63c65.js} +1 -1
  37. package/dist/storybook/assets/page.stories-4ad3bea8.js +57 -0
  38. package/dist/storybook/assets/pop-confirm-e6b7cc0c.js +1 -0
  39. package/dist/storybook/assets/pop-confirm.stories-27da1975.js +7 -0
  40. package/dist/storybook/assets/preview-608a4ee9.js +1 -0
  41. package/dist/storybook/assets/{preview-88cc5d68.js → preview-72d84988.js} +3 -3
  42. package/dist/storybook/assets/preview-a5b25924.css +1 -0
  43. package/dist/storybook/assets/print-header-bd013690.js +1 -0
  44. package/dist/storybook/assets/{projects.stories-3884a80c.js → projects.stories-c383cdce.js} +1 -1
  45. package/dist/storybook/assets/{reservoirs.stories-6b14a37f.js → reservoirs.stories-b4549b91.js} +1 -1
  46. package/dist/storybook/assets/{rich-text-input.stories-661f34f1.js → rich-text-input-977847ce.js} +52 -127
  47. package/dist/storybook/assets/rich-text-input.stories-b770908d.js +76 -0
  48. package/dist/storybook/assets/{site.stories-dee8ce1c.js → site.stories-80a441ea.js} +1 -1
  49. package/dist/storybook/assets/{syntaxhighlighter-NMPM6SWI-5e884b35.js → syntaxhighlighter-NMPM6SWI-73149e16.js} +1 -1
  50. package/dist/storybook/assets/text-link-f4589768.js +1 -0
  51. package/dist/storybook/assets/text-link.stories-6b7c8329.js +1 -0
  52. package/dist/storybook/assets/{toaster-541ce85b.js → toaster-3fba1dd3.js} +1 -1
  53. package/dist/storybook/assets/{toaster.stories-5e4d95b1.js → toaster.stories-4cdefe35.js} +1 -1
  54. package/dist/storybook/assets/tree-a5de7d3a.js +6 -0
  55. package/dist/storybook/assets/tree.stories-b16724d6.js +123 -0
  56. package/dist/storybook/assets/unit-input-9bf08434.js +1 -0
  57. package/dist/storybook/assets/unit-input.stories-65646cf3.js +273 -0
  58. package/dist/storybook/assets/unit-table.stories-4706910f.js +229 -0
  59. package/dist/storybook/iframe.html +1 -1
  60. package/dist/storybook/index.json +1 -1
  61. package/dist/storybook/project.json +1 -1
  62. package/dist/storybook/stories.json +1 -1
  63. package/package.json +1 -1
  64. package/dist/404.html +0 -1
  65. package/dist/storybook/assets/accordion.stories-0f8af16e.js +0 -170
  66. package/dist/storybook/assets/breadcrumb.stories-e4334a75.js +0 -1
  67. package/dist/storybook/assets/buttons-and-links-72daa9ae.js +0 -14
  68. package/dist/storybook/assets/dialog-8e840c50.css +0 -1
  69. package/dist/storybook/assets/dialog-cd58dd09.js +0 -1
  70. package/dist/storybook/assets/empty.stories-e0e3ac78.js +0 -1
  71. package/dist/storybook/assets/file-input.stories-1c6ce0ea.js +0 -55
  72. package/dist/storybook/assets/iframe-c1fab5c5.js +0 -1
  73. package/dist/storybook/assets/list-heading-88cc8a9b.js +0 -1
  74. package/dist/storybook/assets/option-dropdown.stories-5030bdb8.js +0 -21
  75. package/dist/storybook/assets/page.stories-7cb68fed.js +0 -57
  76. package/dist/storybook/assets/pop-confirm.stories-81b30901.js +0 -7
  77. package/dist/storybook/assets/preview-5405e1e8.js +0 -1
  78. package/dist/storybook/assets/text-link.stories-c1227c6f.js +0 -1
  79. package/dist/storybook/assets/tree.stories-590bdd69.js +0 -128
  80. package/dist/storybook/assets/unit-input.stories-50ac8b0f.js +0 -257
  81. /package/dist/storybook/assets/{accordion.stories-e92bccf3.css → accordion-with-default-toggle-e92bccf3.css} +0 -0
  82. /package/dist/storybook/assets/{breadcrumb.stories-a644544e.css → breadcrumb-a644544e.css} +0 -0
  83. /package/dist/storybook/assets/{empty.stories-9914c767.css → empty-9914c767.css} +0 -0
  84. /package/dist/storybook/assets/{file-input.stories-f40408e6.css → file-input-f40408e6.css} +0 -0
  85. /package/dist/storybook/assets/{list-heading-d7e578fa.css → meta-content-d7e578fa.css} +0 -0
  86. /package/dist/storybook/assets/{option-dropdown.stories-ddc96b15.css → option-dropdown-ddc96b15.css} +0 -0
  87. /package/dist/storybook/assets/{pop-confirm.stories-c9faec6b.css → pop-confirm-c9faec6b.css} +0 -0
  88. /package/dist/storybook/assets/{page.stories-dd8c1b35.css → print-header-dd8c1b35.css} +0 -0
  89. /package/dist/storybook/assets/{rich-text-input.stories-023a1c99.css → rich-text-input-023a1c99.css} +0 -0
  90. /package/dist/storybook/assets/{tree.stories-3406c5f6.css → tree-3406c5f6.css} +0 -0
  91. /package/dist/storybook/assets/{unit-input.stories-c251e2c8.css → unit-input-c251e2c8.css} +0 -0
@@ -0,0 +1,6 @@
1
+ import{j as k}from"./jsx-runtime-f961835c.js";import{r as m,R as N,g as js}from"./index-f80c8c95.js";import{e as Hs}from"./index-54f0d271.js";import{a as S,b as j,c as Io,d as ee,_ as ue}from"./tslib.es6-dfef685f.js";import{c as zs}from"./index-a80ed1cf.js";import{C as Us,I as Tr}from"./common-types-2c81813f.js";import{l as fe,M as $s,L as qs}from"./meta-content-6f132e03.js";import{A as Ws}from"./actions-2d4e1c8e.js";import{B as Gs}from"./button-74c97e4a.js";import{I as Ys}from"./icon-e9cbb4d7.js";import{c as Xs}from"./redux-10ee6be7.js";const Mo=m.createContext({dragDropManager:void 0});function I(e,t,...r){if(Ks()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=new Error(t.replace(/%s/g,function(){return r[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function Ks(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function Zs(e,t,r){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,e)}function Js(e,t){return e.filter(r=>r!==t)}function Ro(e){return typeof e=="object"}function Qs(e,t){const r=new Map,n=o=>{r.set(o,r.has(o)?r.get(o)+1:1)};e.forEach(n),t.forEach(n);const i=[];return r.forEach((o,a)=>{o===1&&i.push(a)}),i}function eu(e,t){return e.filter(r=>t.indexOf(r)>-1)}const yn="dnd-core/INIT_COORDS",ir="dnd-core/BEGIN_DRAG",bn="dnd-core/PUBLISH_DRAG_SOURCE",or="dnd-core/HOVER",ar="dnd-core/DROP",sr="dnd-core/END_DRAG";function Yn(e,t){return{type:yn,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const tu={type:yn,payload:{clientOffset:null,sourceClientOffset:null}};function ru(e){return function(r=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:a}=n,s=e.getMonitor(),u=e.getRegistry();e.dispatch(Yn(o)),nu(r,s,u);const l=au(r,s);if(l==null){e.dispatch(tu);return}let c=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");iu(a),c=a(l)}e.dispatch(Yn(o,c));const h=u.getSource(l).beginDrag(s,l);if(h==null)return;ou(h),u.pinSource(l);const f=u.getSourceType(l);return{type:ir,payload:{itemType:f,item:h,sourceId:l,clientOffset:o||null,sourceClientOffset:c||null,isSourcePublic:!!i}}}}function nu(e,t,r){I(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){I(r.getSource(n),"Expected sourceIds to be registered.")})}function iu(e){I(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function ou(e){I(Ro(e),"Item must be an object.")}function au(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function su(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){su(e,i,r[i])})}return e}function lu(e){return function(r={}){const n=e.getMonitor(),i=e.getRegistry();cu(n),hu(n).forEach((a,s)=>{const u=du(a,s,i,n),l={type:ar,payload:{dropResult:uu({},r,u)}};e.dispatch(l)})}}function cu(e){I(e.isDragging(),"Cannot call drop while not dragging."),I(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function du(e,t,r,n){const i=r.getTarget(e);let o=i?i.drop(n,e):void 0;return fu(o),typeof o>"u"&&(o=t===0?{}:n.getDropResult()),o}function fu(e){I(typeof e>"u"||Ro(e),"Drop result must either be an object or undefined.")}function hu(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function vu(e){return function(){const r=e.getMonitor(),n=e.getRegistry();pu(r);const i=r.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(r,i),n.unpinSource()),{type:sr}}}function pu(e){I(e.isDragging(),"Cannot call endDrag while not dragging.")}function zr(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function gu(e){return function(r,{clientOffset:n}={}){mu(r);const i=r.slice(0),o=e.getMonitor(),a=e.getRegistry(),s=o.getItemType();return bu(i,a,s),yu(i,o,a),Tu(i,o,a),{type:or,payload:{targetIds:i,clientOffset:n||null}}}}function mu(e){I(Array.isArray(e),"Expected targetIds to be an array.")}function yu(e,t,r){I(t.isDragging(),"Cannot call hover while not dragging."),I(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){const i=e[n];I(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");const o=r.getTarget(i);I(o,"Expected targetIds to be registered.")}}function bu(e,t,r){for(let n=e.length-1;n>=0;n--){const i=e[n],o=t.getTargetType(i);zr(o,r)||e.splice(n,1)}}function Tu(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function Su(e){return function(){if(e.getMonitor().isDragging())return{type:bn}}}function Du(e){return{beginDrag:ru(e),publishDragSource:Su(e),hover:gu(e),drop:lu(e),endDrag:vu(e)}}class wu{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:r}=this.store;function n(o){return(...a)=>{const s=o.apply(t,a);typeof s<"u"&&r(s)}}const i=Du(this);return Object.keys(i).reduce((o,a)=>{const s=i[a];return o[a]=n(s),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}}function Eu(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ao(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ou(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:Ao(Eu(t,n),r)}function Cu(e){const{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:Ao(t,r)}const rt=[],Tn=[];rt.__IS_NONE__=!0;Tn.__IS_ALL__=!0;function xu(e,t){return e===rt?!1:e===Tn||typeof t>"u"?!0:eu(t,e).length>0}class Pu{subscribeToStateChange(t,r={}){const{handlerIds:n}=r;I(typeof t=="function","listener must be a function."),I(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const a=this.store.getState(),s=a.stateId;try{s===i||s===i+1&&!xu(a.dirtyHandlerIds,n)||t()}finally{i=s}};return this.store.subscribe(o)}subscribeToOffsetChange(t){I(typeof t=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const i=this.store.getState().dragOffset;i!==r&&(r=i,t())};return this.store.subscribe(n)}canDragSource(t){if(!t)return!1;const r=this.registry.getSource(t);return I(r,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:r.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const r=this.registry.getTarget(t);if(I(r,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(t),i=this.getItemType();return zr(n,i)&&r.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const r=this.registry.getSource(t,!0);if(I(r,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(t),i=this.getItemType();return n!==i?!1:r.isDragging(this,t)}isOverTarget(t,r={shallow:!1}){if(!t)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();if(o&&!zr(i,o))return!1;const a=this.getTargetIds();if(!a.length)return!1;const s=a.indexOf(t);return n?s===a.length-1:s>-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 Ou(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Cu(this.store.getState().dragOffset)}constructor(t,r){this.store=t,this.registry=r}}const Xn=typeof global<"u"?global:self,Lo=Xn.MutationObserver||Xn.WebKitMutationObserver;function Vo(e){return function(){const r=setTimeout(i,0),n=setInterval(i,50);function i(){clearTimeout(r),clearInterval(n),e()}}}function Iu(e){let t=1;const r=new Lo(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Mu=typeof Lo=="function"?Iu:Vo;class Ru{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,i=t.length-this.index;n<i;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Mu(this.flush),this.requestErrorThrow=Vo(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Au{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class Lu{create(t){const r=this.freeTasks,n=r.length?r.pop():new Au(this.onError,i=>r[r.length]=i);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const No=new Ru,Vu=new Lu(No.registerPendingError);function Nu(e){No.enqueueTask(Vu.create(e))}const Sn="dnd-core/ADD_SOURCE",Dn="dnd-core/ADD_TARGET",wn="dnd-core/REMOVE_SOURCE",ur="dnd-core/REMOVE_TARGET";function _u(e){return{type:Sn,payload:{sourceId:e}}}function Fu(e){return{type:Dn,payload:{targetId:e}}}function Bu(e){return{type:wn,payload:{sourceId:e}}}function ku(e){return{type:ur,payload:{targetId:e}}}function ju(e){I(typeof e.canDrag=="function","Expected canDrag to be a function."),I(typeof e.beginDrag=="function","Expected beginDrag to be a function."),I(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Hu(e){I(typeof e.canDrop=="function","Expected canDrop to be a function."),I(typeof e.hover=="function","Expected hover to be a function."),I(typeof e.drop=="function","Expected beginDrag to be a function.")}function Ur(e,t){if(t&&Array.isArray(e)){e.forEach(r=>Ur(r,!1));return}I(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var J;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(J||(J={}));let zu=0;function Uu(){return zu++}function $u(e){const t=Uu().toString();switch(e){case J.SOURCE:return`S${t}`;case J.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Kn(e){switch(e[0]){case"S":return J.SOURCE;case"T":return J.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Zn(e,t){const r=e.entries();let n=!1;do{const{done:i,value:[,o]}=r.next();if(o===t)return!0;n=!!i}while(!n);return!1}class qu{addSource(t,r){Ur(t),ju(r);const n=this.addHandler(J.SOURCE,t,r);return this.store.dispatch(_u(n)),n}addTarget(t,r){Ur(t,!0),Hu(r);const n=this.addHandler(J.TARGET,t,r);return this.store.dispatch(Fu(n)),n}containsHandler(t){return Zn(this.dragSources,t)||Zn(this.dropTargets,t)}getSource(t,r=!1){return I(this.isSourceId(t),"Expected a valid source ID."),r&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return I(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return I(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return I(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Kn(t)===J.SOURCE}isTargetId(t){return Kn(t)===J.TARGET}removeSource(t){I(this.getSource(t),"Expected an existing source."),this.store.dispatch(Bu(t)),Nu(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){I(this.getTarget(t),"Expected an existing target."),this.store.dispatch(ku(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const r=this.getSource(t);I(r,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=r}unpinSource(){I(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,r,n){const i=$u(t);return this.types.set(i,r),t===J.SOURCE?this.dragSources.set(i,n):t===J.TARGET&&this.dropTargets.set(i,n),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const Wu=(e,t)=>e===t;function Gu(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Yu(e,t,r=Wu){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function Xu(e=rt,t){switch(t.type){case or:break;case Sn:case Dn:case ur:case wn:return rt;case ir:case bn:case sr:case ar:default:return Tn}const{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=Qs(r,n);if(!(i.length>0||!Yu(r,n)))return rt;const a=n[n.length-1],s=r[r.length-1];return a!==s&&(a&&i.push(a),s&&i.push(s)),i}function Ku(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ku(e,i,r[i])})}return e}const Jn={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ju(e=Jn,t){const{payload:r}=t;switch(t.type){case yn:case ir:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case or:return Gu(e.clientOffset,r.clientOffset)?e:Zu({},e,{clientOffset:r.clientOffset});case sr:case ar:return Jn;default:return e}}function Qu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Qu(e,i,r[i])})}return e}const el={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function tl(e=el,t){const{payload:r}=t;switch(t.type){case ir:return Fe({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case bn:return Fe({},e,{isSourcePublic:!0});case or:return Fe({},e,{targetIds:r.targetIds});case ur:return e.targetIds.indexOf(r.targetId)===-1?e:Fe({},e,{targetIds:Js(e.targetIds,r.targetId)});case ar:return Fe({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case sr:return Fe({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function rl(e=0,t){switch(t.type){case Sn:case Dn:return e+1;case wn:case ur:return e-1;default:return e}}function nl(e=0){return e+1}function il(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ol(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){il(e,i,r[i])})}return e}function al(e={},t){return{dirtyHandlerIds:Xu(e.dirtyHandlerIds,{type:t.type,payload:ol({},t.payload,{prevTargetIds:Zs(e,"dragOperation.targetIds",[])})}),dragOffset:Ju(e.dragOffset,t),refCount:rl(e.refCount,t),dragOperation:tl(e.dragOperation,t),stateId:nl(e.stateId)}}function sl(e,t=void 0,r={},n=!1){const i=ul(n),o=new Pu(i,new qu(i)),a=new wu(i,o),s=e(a,t,r);return a.receiveBackend(s),a}function ul(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Xs(al,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function ll(e,t){if(e==null)return{};var r=cl(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cl(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}let Qn=0;const Ht=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var dl=m.memo(function(t){var{children:r}=t,n=ll(t,["children"]);const[i,o]=fl(n);return m.useEffect(()=>{if(o){const a=_o();return++Qn,()=>{--Qn===0&&(a[Ht]=null)}}},[]),k.jsx(Mo.Provider,{value:i,children:r})});function fl(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=hl(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}function hl(e,t=_o(),r,n){const i=t;return i[Ht]||(i[Ht]={dragDropManager:sl(e,t,r,n)}),i[Ht]}function _o(){return typeof global<"u"?global:window}const Le=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Fo(e,t,r){const[n,i]=m.useState(()=>t(e)),o=m.useCallback(()=>{const a=t(e);Hs(n,a)||(i(a),r&&r())},[n,e,r]);return Le(o),[n,o]}function vl(e,t,r){const[n,i]=Fo(e,t,r);return Le(function(){const a=e.getHandlerId();if(a!=null)return e.subscribeToStateChange(i,{handlerIds:[a]})},[e,i]),n}function Bo(e,t,r){return vl(t,e||(()=>({})),()=>r.reconnect())}function ko(e,t){const r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),m.useMemo(()=>typeof e=="function"?e():e,r)}function pl(e){return m.useMemo(()=>e.hooks.dragSource(),[e])}function gl(e){return m.useMemo(()=>e.hooks.dragPreview(),[e])}let Sr=!1,Dr=!1;class ml{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){I(!Sr,"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 Sr=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Sr=!1}}isDragging(){if(!this.sourceId)return!1;I(!Dr,"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 Dr=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Dr=!1}}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,r){return this.internalMonitor.isOverTarget(t,r)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let wr=!1;class yl{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}canDrop(){if(!this.targetId)return!1;I(!wr,"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 wr=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{wr=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function bl(e,t,r){const n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function Tl(e,t,r){const n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function $r(e,t,r,n){let i=r?r.call(n,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u<o.length;u++){const l=o[u];if(!s(l))return!1;const c=e[l],d=t[l];if(i=r?r.call(n,c,d,l):void 0,i===!1||i===void 0&&c!==d)return!1}return!0}function qr(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Sl(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function Dl(e){return(t=null,r=null)=>{if(!m.isValidElement(t)){const o=t;return e(o,r),o}const n=t;return Sl(n),wl(n,r?o=>e(o,r):e)}}function jo(e){const t={};return Object.keys(e).forEach(r=>{const n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const i=Dl(n);t[r]=()=>i}}),t}function ei(e,t){typeof e=="function"?e(t):e.current=t}function wl(e,t){const r=e.ref;return I(typeof r!="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"),r?m.cloneElement(e,{ref:n=>{ei(r,n),ei(t,n)}}):m.cloneElement(e,{ref:t})}class El{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return r&&this.disconnectDragSource(),this.handlerId?t?(r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),r):(this.lastConnectedDragSource=t,r):r}reconnectDragPreview(t=!1){const r=this.dragPreview,n=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!r){this.lastConnectedDragPreview=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=r,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,r,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!$r(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!$r(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=jo({dragSource:(r,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,qr(r)?this.dragSourceRef=r:this.dragSourceNode=r,this.reconnectDragSource()},dragPreview:(r,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,qr(r)?this.dragPreviewRef=r:this.dragPreviewNode=r,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class Ol{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!$r(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=jo({dropTarget:(r,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,qr(r)?this.dropTargetRef=r:this.dropTargetNode=r,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function ge(){const{dragDropManager:e}=m.useContext(Mo);return I(e!=null,"Expected drag drop context"),e}function Cl(e,t){const r=ge(),n=m.useMemo(()=>new El(r.getBackend()),[r]);return Le(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),Le(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function xl(){const e=ge();return m.useMemo(()=>new ml(e),[e])}class Pl{beginDrag(){const t=this.spec,r=this.monitor;let n=null;return typeof t.item=="object"?n=t.item:typeof t.item=="function"?n=t.item(r):n={},n??null}canDrag(){const t=this.spec,r=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(r):!0}isDragging(t,r){const n=this.spec,i=this.monitor,{isDragging:o}=n;return o?o(i):r===t.getSourceId()}endDrag(){const t=this.spec,r=this.monitor,n=this.connector,{end:i}=t;i&&i(r.getItem(),r),n.reconnect()}constructor(t,r,n){this.spec=t,this.monitor=r,this.connector=n}}function Il(e,t,r){const n=m.useMemo(()=>new Pl(e,t,r),[t,r]);return m.useEffect(()=>{n.spec=e},[e]),n}function Ml(e){return m.useMemo(()=>{const t=e.type;return I(t!=null,"spec.type must be defined"),t},[e])}function Rl(e,t,r){const n=ge(),i=Il(e,t,r),o=Ml(e);Le(function(){if(o!=null){const[s,u]=Tl(o,i,n);return t.receiveHandlerId(s),r.receiveHandlerId(s),u}},[n,t,r,i,o])}function Al(e,t){const r=ko(e,t);I(!r.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 n=xl(),i=Cl(r.options,r.previewOptions);return Rl(r,n,i),[Bo(r.collect,n,i),pl(i),gl(i)]}function Ll(e){const r=ge().getMonitor(),[n,i]=Fo(r,e);return m.useEffect(()=>r.subscribeToOffsetChange(i)),m.useEffect(()=>r.subscribeToStateChange(i)),n}function Vl(e){return m.useMemo(()=>e.hooks.dropTarget(),[e])}function Nl(e){const t=ge(),r=m.useMemo(()=>new Ol(t.getBackend()),[t]);return Le(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function _l(){const e=ge();return m.useMemo(()=>new yl(e),[e])}function Fl(e){const{accept:t}=e;return m.useMemo(()=>(I(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class Bl{canDrop(){const t=this.spec,r=this.monitor;return t.canDrop?t.canDrop(r.getItem(),r):!0}hover(){const t=this.spec,r=this.monitor;t.hover&&t.hover(r.getItem(),r)}drop(){const t=this.spec,r=this.monitor;if(t.drop)return t.drop(r.getItem(),r)}constructor(t,r){this.spec=t,this.monitor=r}}function kl(e,t){const r=m.useMemo(()=>new Bl(e,t),[t]);return m.useEffect(()=>{r.spec=e},[e]),r}function jl(e,t,r){const n=ge(),i=kl(e,t),o=Fl(e);Le(function(){const[s,u]=bl(o,i,n);return t.receiveHandlerId(s),r.receiveHandlerId(s),u},[n,t,i,r,o.map(a=>a.toString()).join("|")])}function Ho(e,t){const r=ko(e,t),n=_l(),i=Nl(r.options);return jl(r,n,i),[Bo(r.collect,n,i),Vl(i)]}function zo(e){let t=null;return()=>(t==null&&(t=e()),t)}function Hl(e,t){return e.filter(r=>r!==t)}function zl(e,t){const r=new Set,n=o=>r.add(o);e.forEach(n),t.forEach(n);const i=[];return r.forEach(o=>i.push(o)),i}class Ul{enter(t){const r=this.entered.length,n=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=zl(this.entered.filter(n),[t]),r===0&&this.entered.length>0}leave(t){const r=this.entered.length;return this.entered=Hl(this.entered.filter(this.isNodeInDocument),t),r>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class $l{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const r={};Object.keys(this.config.exposeProperties).forEach(n=>{const i=this.config.exposeProperties[n];i!=null&&(r[n]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,r)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,r){return r===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Uo="__NATIVE_FILE__",$o="__NATIVE_URL__",qo="__NATIVE_TEXT__",Wo="__NATIVE_HTML__",ti=Object.freeze(Object.defineProperty({__proto__:null,FILE:Uo,HTML:Wo,TEXT:qo,URL:$o},Symbol.toStringTag,{value:"Module"}));function Er(e,t,r){const n=t.reduce((i,o)=>i||e.getData(o),"");return n??r}const Wr={[Uo]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Wo]:{exposeProperties:{html:(e,t)=>Er(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[$o]:{exposeProperties:{urls:(e,t)=>Er(e,t,"").split(`
2
+ `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[qo]:{exposeProperties:{text:(e,t)=>Er(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function ql(e,t){const r=Wr[e];if(!r)throw new Error(`native type ${e} has no configuration`);const n=new $l(r);return n.loadDataTransfer(t),n}function Or(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Wr).filter(r=>{const n=Wr[r];return n!=null&&n.matchesTypes?n.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const Wl=zo(()=>/firefox/i.test(navigator.userAgent)),Go=zo(()=>!!window.safari);class ri{interpolate(t){const{xs:r,ys:n,c1s:i,c2s:o,c3s:a}=this;let s=r.length-1;if(t===r[s])return n[s];let u=0,l=a.length-1,c;for(;u<=l;){c=Math.floor(.5*(u+l));const f=r[c];if(f<t)u=c+1;else if(f>t)l=c-1;else return n[c]}s=Math.max(0,l);const d=t-r[s],h=d*d;return n[s]+i[s]*d+o[s]*h+a[s]*d*h}constructor(t,r){const{length:n}=t,i=[];for(let f=0;f<n;f++)i.push(f);i.sort((f,v)=>t[f]<t[v]?-1:1);const o=[],a=[];let s,u;for(let f=0;f<n-1;f++)s=t[f+1]-t[f],u=r[f+1]-r[f],o.push(s),a.push(u/s);const l=[a[0]];for(let f=0;f<o.length-1;f++){const v=a[f],p=a[f+1];if(v*p<=0)l.push(0);else{s=o[f];const g=o[f+1],y=s+g;l.push(3*y/((y+g)/v+(y+s)/p))}}l.push(a[a.length-1]);const c=[],d=[];let h;for(let f=0;f<l.length-1;f++){h=a[f];const v=l[f],p=1/o[f],g=v+l[f+1]-h-h;c.push((h-v-g)*p),d.push(g*p*p)}this.xs=t,this.ys=r,this.c1s=l,this.c2s=c,this.c3s=d}}const Gl=1;function Yo(e){const t=e.nodeType===Gl?e:e.parentElement;if(!t)return null;const{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function Ct(e){return{x:e.clientX,y:e.clientY}}function Yl(e){var t;return e.nodeName==="IMG"&&(Wl()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function Xl(e,t,r,n){let i=e?t.width:r,o=e?t.height:n;return Go()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function Kl(e,t,r,n,i){const o=Yl(t),s=Yo(o?e:t),u={x:r.x-s.x,y:r.y-s.y},{offsetWidth:l,offsetHeight:c}=e,{anchorX:d,anchorY:h}=n,{dragPreviewWidth:f,dragPreviewHeight:v}=Xl(o,t,l,c),p=()=>{let x=new ri([0,.5,1],[u.y,u.y/c*v,u.y+v-c]).interpolate(h);return Go()&&o&&(x+=(window.devicePixelRatio-1)*v),x},g=()=>new ri([0,.5,1],[u.x,u.x/l*f,u.x+f-l]).interpolate(d),{offsetX:y,offsetY:b}=i,T=y===0||y,D=b===0||b;return{x:T?y:g(),y:D?b:p()}}let Zl=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,r){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=r}};function Jl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ni(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Jl(e,i,r[i])})}return e}class Ql{profile(){var t,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,r,n){return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,r),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,r,n){this.sourceNodes.set(t,r),this.sourceNodeOptions.set(t,n);const i=a=>this.handleDragStart(a,t),o=a=>this.handleSelectStart(a);return r.setAttribute("draggable","true"),r.addEventListener("dragstart",i),r.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),r.removeEventListener("dragstart",i),r.removeEventListener("selectstart",o),r.setAttribute("draggable","false")}}connectDropTarget(t,r){const n=a=>this.handleDragEnter(a,t),i=a=>this.handleDragOver(a,t),o=a=>this.handleDrop(a,t);return r.addEventListener("dragenter",n),r.addEventListener("dragover",i),r.addEventListener("drop",o),()=>{r.removeEventListener("dragenter",n),r.removeEventListener("dragover",i),r.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(t);return ni({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(t);return ni({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(ti).some(r=>ti[r]===t)}beginDragNativeItem(t,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=ql(t,r),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const r=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},r)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,r){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}handleDragEnter(t,r){this.dragEnterTargetIds.unshift(r)}handleDragOver(t,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}handleDrop(t,r){this.dropTargetIds.unshift(r)}constructor(t,r,n){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 o=this.sourceNodes.get(i);return o&&Yo(o)||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:o}=this;this.dragStartSourceIds=null;const a=Ct(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:s}=i,u=Or(s);if(this.monitor.isDragging()){if(s&&typeof s.setDragImage=="function"){const c=this.monitor.getSourceId(),d=this.sourceNodes.get(c),h=this.sourcePreviewNodes.get(c)||d;if(h){const{anchorX:f,anchorY:v,offsetX:p,offsetY:g}=this.getCurrentSourcePreviewNodeOptions(),T=Kl(d,h,a,{anchorX:f,anchorY:v},{offsetX:p,offsetY:g});s.setDragImage(h,T.x,T.y)}}try{s==null||s.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:l}=this.getCurrentSourcePreviewNodeOptions();l?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(s&&!s.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 o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:s}=i,u=Or(s);u&&this.beginDragNativeItem(u,s)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,o.length>0&&this.actions.hover(o,{clientOffset:Ct(i)}),o.some(s=>this.monitor.canDropOnTarget(s))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=Ct(i),this.scheduleHover(o),(o||[]).some(s=>this.monitor.canDropOnTarget(s))?(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 o;i.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}else Or(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:Ct(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const o=i.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(i.preventDefault(),o.dragDrop()))},this.options=new Zl(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new Ul(this.isNodeInDocument)}}let xt;function ec(){return xt||(xt=new Image,xt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),xt}const tc=function(t,r,n){return new Ql(t,r,n)};var Re=[],rc=function(){return Re.some(function(e){return e.activeTargets.length>0})},nc=function(){return Re.some(function(e){return e.skippedTargets.length>0})},ii="ResizeObserver loop completed with undelivered notifications.",ic=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:ii}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=ii),window.dispatchEvent(e)},ft;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ft||(ft={}));var Ae=function(e){return Object.freeze(e)},oc=function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Ae(this)}return e}(),Xo=function(){function e(t,r,n,i){return this.x=t,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ae(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,o=t.right,a=t.bottom,s=t.left,u=t.width,l=t.height;return{x:r,y:n,top:i,right:o,bottom:a,left:s,width:u,height:l}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),En=function(e){return e instanceof SVGElement&&"getBBox"in e},Ko=function(e){if(En(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},oi=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},ac=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},nt=typeof window<"u"?window:{},Pt=new WeakMap,ai=/auto|scroll/,sc=/^tb|vertical/,uc=/msie|trident/i.test(nt.navigator&&nt.navigator.userAgent),oe=function(e){return parseFloat(e||"0")},Ue=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new oc((r?t:e)||0,(r?e:t)||0)},si=Ae({devicePixelContentBoxSize:Ue(),borderBoxSize:Ue(),contentBoxSize:Ue(),contentRect:new Xo(0,0,0,0)}),Zo=function(e,t){if(t===void 0&&(t=!1),Pt.has(e)&&!t)return Pt.get(e);if(Ko(e))return Pt.set(e,si),si;var r=getComputedStyle(e),n=En(e)&&e.ownerSVGElement&&e.getBBox(),i=!uc&&r.boxSizing==="border-box",o=sc.test(r.writingMode||""),a=!n&&ai.test(r.overflowY||""),s=!n&&ai.test(r.overflowX||""),u=n?0:oe(r.paddingTop),l=n?0:oe(r.paddingRight),c=n?0:oe(r.paddingBottom),d=n?0:oe(r.paddingLeft),h=n?0:oe(r.borderTopWidth),f=n?0:oe(r.borderRightWidth),v=n?0:oe(r.borderBottomWidth),p=n?0:oe(r.borderLeftWidth),g=d+l,y=u+c,b=p+f,T=h+v,D=s?e.offsetHeight-T-e.clientHeight:0,w=a?e.offsetWidth-b-e.clientWidth:0,x=i?g+b:0,R=i?y+T:0,A=n?n.width:oe(r.width)-x-w,P=n?n.height:oe(r.height)-R-D,V=A+g+w+b,B=P+y+D+T,H=Ae({devicePixelContentBoxSize:Ue(Math.round(A*devicePixelRatio),Math.round(P*devicePixelRatio),o),borderBoxSize:Ue(V,B,o),contentBoxSize:Ue(A,P,o),contentRect:new Xo(d,u,A,P)});return Pt.set(e,H),H},Jo=function(e,t,r){var n=Zo(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case ft.DEVICE_PIXEL_CONTENT_BOX:return a;case ft.BORDER_BOX:return i;default:return o}},lc=function(){function e(t){var r=Zo(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Ae([r.borderBoxSize]),this.contentBoxSize=Ae([r.contentBoxSize]),this.devicePixelContentBoxSize=Ae([r.devicePixelContentBoxSize])}return e}(),Qo=function(e){if(Ko(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},cc=function(){var e=1/0,t=[];Re.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(l){var c=new lc(l.target),d=Qo(l.target);s.push(c),l.lastReportedSize=Jo(l.target,l.observedBox),d<e&&(e=d)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var i=n[r];i()}return e},ui=function(e){Re.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(Qo(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},dc=function(){var e=0;for(ui(e);rc();)e=cc(),ui(e);return nc()&&ic(),e>0},Cr,ea=[],fc=function(){return ea.splice(0).forEach(function(e){return e()})},hc=function(e){if(!Cr){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return fc()}).observe(r,n),Cr=function(){r.textContent="".concat(t?t--:t++)}}ea.push(e),Cr()},vc=function(e){hc(function(){requestAnimationFrame(e)})},zt=0,pc=function(){return!!zt},gc=250,mc={attributes:!0,characterData:!0,childList:!0,subtree:!0},li=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ci=function(e){return e===void 0&&(e=0),Date.now()+e},xr=!1,yc=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=gc),!xr){xr=!0;var n=ci(t);vc(function(){var i=!1;try{i=dc()}finally{if(xr=!1,t=n-ci(),!pc())return;i?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,mc)};document.body?r():nt.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),li.forEach(function(r){return nt.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),li.forEach(function(r){return nt.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e}(),Gr=new yc,di=function(e){!zt&&e>0&&Gr.start(),zt+=e,!zt&&Gr.stop()},bc=function(e){return!En(e)&&!ac(e)&&getComputedStyle(e).display==="inline"},Tc=function(){function e(t,r){this.target=t,this.observedBox=r||ft.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Jo(this.target,this.observedBox,!0);return bc(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Sc=function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e}(),It=new WeakMap,fi=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Mt=function(){function e(){}return e.connect=function(t,r){var n=new Sc(t,r);It.set(t,n)},e.observe=function(t,r,n){var i=It.get(t),o=i.observationTargets.length===0;fi(i.observationTargets,r)<0&&(o&&Re.push(i),i.observationTargets.push(new Tc(r,n&&n.box)),di(1),Gr.schedule())},e.unobserve=function(t,r){var n=It.get(t),i=fi(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&Re.splice(Re.indexOf(n),1),n.observationTargets.splice(i,1),di(-1))},e.disconnect=function(t){var r=this,n=It.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Dc=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Mt.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oi(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Mt.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oi(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Mt.unobserve(this,t)},e.prototype.disconnect=function(){Mt.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),wc="production",ta=typeof process>"u"||process.env===void 0?wc:"production",de=function(e){return{isEnabled:function(t){return e.some(function(r){return!!t[r]})}}},ht={measureLayout:de(["layout","layoutId","drag"]),animation:de(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:de(["exit"]),drag:de(["drag","dragControls"]),focus:de(["whileFocus"]),hover:de(["whileHover","onHoverStart","onHoverEnd"]),tap:de(["whileTap","onTap","onTapStart","onTapCancel"]),pan:de(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:de(["whileInView","onViewportEnter","onViewportLeave"])};function Ec(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?ht.projectionNodeConstructor=e[t]:ht[t].Component=e[t])}var Oc=function(){},Gt=function(){},ra=m.createContext({strict:!1}),na=Object.keys(ht),Cc=na.length;function xc(e,t,r){var n=[],i=m.useContext(ra);if(!t)return null;ta!=="production"&&r&&i.strict;for(var o=0;o<Cc;o++){var a=na[o],s=ht[a],u=s.isEnabled,l=s.Component;u(e)&&l&&n.push(m.createElement(l,S({key:a},e,{visualElement:t})))}return n}var On=m.createContext({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),lr=m.createContext({});function Pc(){return m.useContext(lr).visualElement}var cr=m.createContext(null),Xe=typeof document<"u",hi=Xe?m.useLayoutEffect:m.useEffect,Yr={current:null},ia=!1;function Ic(){if(ia=!0,!!Xe)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return Yr.current=e.matches};e.addListener(t),t()}else Yr.current=!1}function Mc(){!ia&&Ic();var e=j(m.useState(Yr.current),1),t=e[0];return t}function Rc(){var e=Mc(),t=m.useContext(On).reducedMotion;return t==="never"?!1:t==="always"?!0:e}function Ac(e,t,r,n){var i=m.useContext(ra),o=Pc(),a=m.useContext(cr),s=Rc(),u=m.useRef(void 0);n||(n=i.renderer),!u.current&&n&&(u.current=n(e,{visualState:t,parent:o,props:r,presenceId:a==null?void 0:a.id,blockInitialAnimation:(a==null?void 0:a.initial)===!1,shouldReduceMotion:s}));var l=u.current;return hi(function(){l==null||l.syncRender()}),m.useEffect(function(){var c;(c=l==null?void 0:l.animationState)===null||c===void 0||c.animateChanges()}),hi(function(){return function(){return l==null?void 0:l.notifyUnmount()}},[]),l}function je(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Lc(e,t,r){return m.useCallback(function(n){var i;n&&((i=e.mount)===null||i===void 0||i.call(e,n)),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):je(r)&&(r.current=n))},[t])}function oa(e){return Array.isArray(e)}function ie(e){return typeof e=="string"||oa(e)}function Vc(e){var t={};return e.forEachValue(function(r,n){return t[n]=r.get()}),t}function Nc(e){var t={};return e.forEachValue(function(r,n){return t[n]=r.getVelocity()}),t}function aa(e,t,r,n,i){var o;return n===void 0&&(n={}),i===void 0&&(i={}),typeof t=="function"&&(t=t(r??e.custom,n,i)),typeof t=="string"&&(t=(o=e.variants)===null||o===void 0?void 0:o[t]),typeof t=="function"&&(t=t(r??e.custom,n,i)),t}function dr(e,t,r){var n=e.getProps();return aa(n,t,r??n.custom,Vc(e),Nc(e))}function fr(e){var t;return typeof((t=e.animate)===null||t===void 0?void 0:t.start)=="function"||ie(e.initial)||ie(e.animate)||ie(e.whileHover)||ie(e.whileDrag)||ie(e.whileTap)||ie(e.whileFocus)||ie(e.exit)}function sa(e){return!!(fr(e)||e.variants)}function _c(e,t){if(fr(e)){var r=e.initial,n=e.animate;return{initial:r===!1||ie(r)?r:void 0,animate:ie(n)?n:void 0}}return e.inherit!==!1?t:{}}function Fc(e){var t=_c(e,m.useContext(lr)),r=t.initial,n=t.animate;return m.useMemo(function(){return{initial:r,animate:n}},[vi(r),vi(n)])}function vi(e){return Array.isArray(e)?e.join(" "):e}function hr(e){var t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}var it={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Bc=1;function kc(){return hr(function(){if(it.hasEverUpdated)return Bc++})}var ua=m.createContext({}),la=m.createContext({});function jc(e,t,r,n){var i,o=t.layoutId,a=t.layout,s=t.drag,u=t.dragConstraints,l=t.layoutScroll,c=m.useContext(la);!n||!r||r!=null&&r.projection||(r.projection=new n(e,r.getLatestValues(),(i=r.parent)===null||i===void 0?void 0:i.projection),r.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!s||u&&je(u),visualElement:r,scheduleRender:function(){return r.scheduleRender()},animationType:typeof a=="string"?a:"both",initialPromotionConfig:c,layoutScroll:l}))}var Hc=function(e){Io(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},t.prototype.componentDidUpdate=function(){},t.prototype.updateProps=function(){var r=this.props,n=r.visualElement,i=r.props;n&&n.setProps(i)},t.prototype.render=function(){return this.props.children},t}(N.Component);function zc(e){var t=e.preloadedFeatures,r=e.createVisualElement,n=e.projectionNodeConstructor,i=e.useRender,o=e.useVisualState,a=e.Component;t&&Ec(t);function s(u,l){var c=Uc(u);u=S(S({},u),{layoutId:c});var d=m.useContext(On),h=null,f=Fc(u),v=d.isStatic?void 0:kc(),p=o(u,d.isStatic);return!d.isStatic&&Xe&&(f.visualElement=Ac(a,p,S(S({},d),u),r),jc(v,u,f.visualElement,n||ht.projectionNodeConstructor),h=xc(u,f.visualElement,t)),m.createElement(Hc,{visualElement:f.visualElement,props:S(S({},d),u)},h,m.createElement(lr.Provider,{value:f},i(a,u,v,Lc(p,f.visualElement,l),p,d.isStatic,f.visualElement)))}return m.forwardRef(s)}function Uc(e){var t,r=e.layoutId,n=(t=m.useContext(ua))===null||t===void 0?void 0:t.id;return n&&r!==void 0?n+"-"+r:r}function $c(e){function t(n,i){return i===void 0&&(i={}),zc(e(n,i))}if(typeof Proxy>"u")return t;var r=new Map;return new Proxy(t,{get:function(n,i){return r.has(i)||r.set(i,t(i)),r.get(i)}})}var qc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Cn(e){return typeof e!="string"||e.includes("-")?!1:!!(qc.indexOf(e)>-1||/[A-Z]/.test(e))}var Yt={};function Wc(e){Object.assign(Yt,e)}var Xr=["","X","Y","Z"],Gc=["translate","scale","rotate","skew"],vt=["transformPerspective","x","y","z"];Gc.forEach(function(e){return Xr.forEach(function(t){return vt.push(e+t)})});function Yc(e,t){return vt.indexOf(e)-vt.indexOf(t)}var Xc=new Set(vt);function bt(e){return Xc.has(e)}var Kc=new Set(["originX","originY","originZ"]);function ca(e){return Kc.has(e)}function da(e,t){var r=t.layout,n=t.layoutId;return bt(e)||ca(e)||(r||n!==void 0)&&(!!Yt[e]||e==="opacity")}var he=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},Zc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Jc(e,t,r,n){var i=e.transform,o=e.transformKeys,a=t.enableHardwareAcceleration,s=a===void 0?!0:a,u=t.allowTransformNone,l=u===void 0?!0:u,c="";o.sort(Yc);for(var d=!1,h=o.length,f=0;f<h;f++){var v=o[f];c+="".concat(Zc[v]||v,"(").concat(i[v],") "),v==="z"&&(d=!0)}return!d&&s?c+="translateZ(0)":c=c.trim(),n?c=n(i,r?"":c):l&&r&&(c="none"),c}function Qc(e){var t=e.originX,r=t===void 0?"50%":t,n=e.originY,i=n===void 0?"50%":n,o=e.originZ,a=o===void 0?0:o;return"".concat(r," ").concat(i," ").concat(a)}function fa(e){return e.startsWith("--")}var ed=function(e,t){return t&&typeof e=="number"?t.transform(e):e};const ha=(e,t)=>r=>Math.max(Math.min(r,t),e),ot=e=>e%1?Number(e.toFixed(5)):e,pt=/(-)?([\d]*\.?[\d])+/g,Kr=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,td=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Tt(e){return typeof e=="string"}const Ve={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},at=Object.assign(Object.assign({},Ve),{transform:ha(0,1)}),Rt=Object.assign(Object.assign({},Ve),{default:1}),St=e=>({test:t=>Tt(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),be=St("deg"),le=St("%"),C=St("px"),rd=St("vh"),nd=St("vw"),pi=Object.assign(Object.assign({},le),{parse:e=>le.parse(e)/100,transform:e=>le.transform(e*100)}),xn=(e,t)=>r=>!!(Tt(r)&&td.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),va=(e,t,r)=>n=>{if(!Tt(n))return n;const[i,o,a,s]=n.match(pt);return{[e]:parseFloat(i),[t]:parseFloat(o),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Me={test:xn("hsl","hue"),parse:va("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+le.transform(ot(t))+", "+le.transform(ot(r))+", "+ot(at.transform(n))+")"},id=ha(0,255),Pr=Object.assign(Object.assign({},Ve),{transform:e=>Math.round(id(e))}),De={test:xn("rgb","red"),parse:va("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Pr.transform(e)+", "+Pr.transform(t)+", "+Pr.transform(r)+", "+ot(at.transform(n))+")"};function od(e){let t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const Zr={test:xn("#"),parse:od,transform:De.transform},$={test:e=>De.test(e)||Zr.test(e)||Me.test(e),parse:e=>De.test(e)?De.parse(e):Me.test(e)?Me.parse(e):Zr.parse(e),transform:e=>Tt(e)?e:e.hasOwnProperty("red")?De.transform(e):Me.transform(e)},pa="${c}",ga="${n}";function ad(e){var t,r,n,i;return isNaN(e)&&Tt(e)&&((r=(t=e.match(pt))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((i=(n=e.match(Kr))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function ma(e){typeof e=="number"&&(e=`${e}`);const t=[];let r=0;const n=e.match(Kr);n&&(r=n.length,e=e.replace(Kr,pa),t.push(...n.map($.parse)));const i=e.match(pt);return i&&(e=e.replace(pt,ga),t.push(...i.map(Ve.parse))),{values:t,numColors:r,tokenised:e}}function ya(e){return ma(e).values}function ba(e){const{values:t,numColors:r,tokenised:n}=ma(e),i=t.length;return o=>{let a=n;for(let s=0;s<i;s++)a=a.replace(s<r?pa:ga,s<r?$.transform(o[s]):ot(o[s]));return a}}const sd=e=>typeof e=="number"?0:e;function ud(e){const t=ya(e);return ba(e)(t.map(sd))}const ve={test:ad,parse:ya,createTransformer:ba,getAnimatableNone:ud},ld=new Set(["brightness","contrast","saturate","opacity"]);function cd(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(pt)||[];if(!n)return e;const i=r.replace(n,"");let o=ld.has(t)?1:0;return n!==r&&(o*=100),t+"("+o+i+")"}const dd=/([a-z-]*)\(.*?\)/g,Jr=Object.assign(Object.assign({},ve),{getAnimatableNone:e=>{const t=e.match(dd);return t?t.map(cd).join(" "):e}});var gi=S(S({},Ve),{transform:Math.round}),Ta={borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,radius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,size:C,top:C,right:C,bottom:C,left:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,rotate:be,rotateX:be,rotateY:be,rotateZ:be,scale:Rt,scaleX:Rt,scaleY:Rt,scaleZ:Rt,skew:be,skewX:be,skewY:be,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:at,originX:pi,originY:pi,originZ:C,zIndex:gi,fillOpacity:at,strokeOpacity:at,numOctaves:gi};function Pn(e,t,r,n){var i,o=e.style,a=e.vars,s=e.transform,u=e.transformKeys,l=e.transformOrigin;u.length=0;var c=!1,d=!1,h=!0;for(var f in t){var v=t[f];if(fa(f)){a[f]=v;continue}var p=Ta[f],g=ed(v,p);if(bt(f)){if(c=!0,s[f]=g,u.push(f),!h)continue;v!==((i=p.default)!==null&&i!==void 0?i:0)&&(h=!1)}else ca(f)?(l[f]=g,d=!0):o[f]=g}c?o.transform=Jc(e,r,h,n):n?o.transform=n({},""):!t.transform&&o.transform&&(o.transform="none"),d&&(o.transformOrigin=Qc(l))}var In=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Sa(e,t,r){for(var n in t)!he(t[n])&&!da(n,r)&&(e[n]=t[n])}function fd(e,t,r){var n=e.transformTemplate;return m.useMemo(function(){var i=In();Pn(i,t,{enableHardwareAcceleration:!r},n);var o=i.vars,a=i.style;return S(S({},o),a)},[t])}function hd(e,t,r){var n=e.style||{},i={};return Sa(i,n,e),Object.assign(i,fd(e,t,r)),e.transformValues&&(i=e.transformValues(i)),i}function vd(e,t,r){var n={},i=hd(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),n.style=i,n}var pd=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function Xt(e){return pd.has(e)}var Da=function(e){return!Xt(e)};function gd(e){e&&(Da=function(t){return t.startsWith("on")?!Xt(t):e(t)})}try{gd(require("@emotion/is-prop-valid").default)}catch{}function md(e,t,r){var n={};for(var i in e)(Da(i)||r===!0&&Xt(i)||!t&&!Xt(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function mi(e,t,r){return typeof e=="string"?e:C.transform(t+r*e)}function yd(e,t,r){var n=mi(t,e.x,e.width),i=mi(r,e.y,e.height);return"".concat(n," ").concat(i)}var bd={offset:"stroke-dashoffset",array:"stroke-dasharray"},Td={offset:"strokeDashoffset",array:"strokeDasharray"};function Sd(e,t,r,n,i){r===void 0&&(r=1),n===void 0&&(n=0),i===void 0&&(i=!0),e.pathLength=1;var o=i?bd:Td;e[o.offset]=C.transform(-n);var a=C.transform(t),s=C.transform(r);e[o.array]="".concat(a," ").concat(s)}function Mn(e,t,r,n){var i=t.attrX,o=t.attrY,a=t.originX,s=t.originY,u=t.pathLength,l=t.pathSpacing,c=l===void 0?1:l,d=t.pathOffset,h=d===void 0?0:d,f=ee(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);Pn(e,f,r,n),e.attrs=e.style,e.style={};var v=e.attrs,p=e.style,g=e.dimensions;v.transform&&(g&&(p.transform=v.transform),delete v.transform),g&&(a!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=yd(g,a!==void 0?a:.5,s!==void 0?s:.5)),i!==void 0&&(v.x=i),o!==void 0&&(v.y=o),u!==void 0&&Sd(v,u,c,h,!1)}var wa=function(){return S(S({},In()),{attrs:{}})};function Dd(e,t){var r=m.useMemo(function(){var i=wa();return Mn(i,t,{enableHardwareAcceleration:!1},e.transformTemplate),S(S({},i.attrs),{style:S({},i.style)})},[t]);if(e.style){var n={};Sa(n,e.style,e),r.style=S(S({},n),r.style)}return r}function wd(e){e===void 0&&(e=!1);var t=function(r,n,i,o,a,s){var u=a.latestValues,l=Cn(r)?Dd:vd,c=l(n,u,s),d=md(n,typeof r=="string",e),h=S(S(S({},d),c),{ref:o});return i&&(h["data-projection-id"]=i),m.createElement(r,h)};return t}var Ed=/([a-z])([A-Z])/g,Od="$1-$2",Ea=function(e){return e.replace(Ed,Od).toLowerCase()};function Oa(e,t,r,n){var i=t.style,o=t.vars;Object.assign(e.style,i,n&&n.getProjectionStyles(r));for(var a in o)e.style.setProperty(a,o[a])}var Ca=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function xa(e,t,r,n){Oa(e,t,void 0,n);for(var i in t.attrs)e.setAttribute(Ca.has(i)?i:Ea(i),t.attrs[i])}function Rn(e){var t=e.style,r={};for(var n in t)(he(t[n])||da(n,e))&&(r[n]=t[n]);return r}function Pa(e){var t=Rn(e);for(var r in e)if(he(e[r])){var n=r==="x"||r==="y"?"attr"+r.toUpperCase():r;t[n]=e[r]}return t}function An(e){return typeof e=="object"&&typeof e.start=="function"}var gt=function(e){return Array.isArray(e)},Cd=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},Ia=function(e){return gt(e)?e[e.length-1]||0:e};function Ut(e){var t=he(e)?e.get():e;return Cd(t)?t.toValue():t}function yi(e,t,r,n){var i=e.scrapeMotionValuesFromProps,o=e.createRenderState,a=e.onMount,s={latestValues:xd(t,r,n,i),renderState:o()};return a&&(s.mount=function(u){return a(t,u,s)}),s}var Ma=function(e){return function(t,r){var n=m.useContext(lr),i=m.useContext(cr);return r?yi(e,t,n,i):hr(function(){return yi(e,t,n,i)})}};function xd(e,t,r,n){var i={},o=(r==null?void 0:r.initial)===!1,a=n(e);for(var s in a)i[s]=Ut(a[s]);var u=e.initial,l=e.animate,c=fr(e),d=sa(e);t&&d&&!c&&e.inherit!==!1&&(u??(u=t.initial),l??(l=t.animate));var h=o||u===!1,f=h?l:u;if(f&&typeof f!="boolean"&&!An(f)){var v=Array.isArray(f)?f:[f];v.forEach(function(p){var g=aa(e,p);if(g){var y=g.transitionEnd;g.transition;var b=ee(g,["transitionEnd","transition"]);for(var T in b){var D=b[T];if(Array.isArray(D)){var w=h?D.length-1:0;D=D[w]}D!==null&&(i[T]=D)}for(var T in y)i[T]=y[T]}})}return i}var Pd={useVisualState:Ma({scrapeMotionValuesFromProps:Pa,createRenderState:wa,onMount:function(e,t,r){var n=r.renderState,i=r.latestValues;try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Mn(n,i,{enableHardwareAcceleration:!1},e.transformTemplate),xa(t,n)}})},Id={useVisualState:Ma({scrapeMotionValuesFromProps:Rn,createRenderState:In})};function Md(e,t,r,n,i){var o=t.forwardMotionProps,a=o===void 0?!1:o,s=Cn(e)?Pd:Id;return S(S({},s),{preloadedFeatures:r,useRender:wd(a),createVisualElement:n,projectionNodeConstructor:i,Component:e})}var _;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(_||(_={}));function vr(e,t,r,n){return n===void 0&&(n={passive:!0}),e.addEventListener(t,r,n),function(){return e.removeEventListener(t,r)}}function Qr(e,t,r,n){m.useEffect(function(){var i=e.current;if(r&&i)return vr(i,t,r,n)},[e,t,r,n])}function Rd(e){var t=e.whileFocus,r=e.visualElement,n=function(){var o;(o=r.animationState)===null||o===void 0||o.setActive(_.Focus,!0)},i=function(){var o;(o=r.animationState)===null||o===void 0||o.setActive(_.Focus,!1)};Qr(r,"focus",t?n:void 0),Qr(r,"blur",t?i:void 0)}function Ra(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function Aa(e){var t=!!e.touches;return t}function Ad(e){return function(t){var r=t instanceof MouseEvent,n=!r||r&&t.button===0;n&&e(t)}}var Ld={pageX:0,pageY:0};function Vd(e,t){t===void 0&&(t="page");var r=e.touches[0]||e.changedTouches[0],n=r||Ld;return{x:n[t+"X"],y:n[t+"Y"]}}function Nd(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function Ln(e,t){return t===void 0&&(t="page"),{point:Aa(e)?Vd(e,t):Nd(e,t)}}var La=function(e,t){t===void 0&&(t=!1);var r=function(n){return e(n,Ln(n))};return t?Ad(r):r},_d=function(){return Xe&&window.onpointerdown===null},Fd=function(){return Xe&&window.ontouchstart===null},Bd=function(){return Xe&&window.onmousedown===null},kd={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},jd={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Va(e){return _d()?e:Fd()?jd[e]:Bd()?kd[e]:e}function $e(e,t,r,n){return vr(e,Va(t),La(r,t==="pointerdown"),n)}function Kt(e,t,r,n){return Qr(e,Va(t),r&&La(r,t==="pointerdown"),n)}function Na(e){var t=null;return function(){var r=function(){t=null};return t===null?(t=e,r):!1}}var bi=Na("dragHorizontal"),Ti=Na("dragVertical");function _a(e){var t=!1;if(e==="y")t=Ti();else if(e==="x")t=bi();else{var r=bi(),n=Ti();r&&n?t=function(){r(),n()}:(r&&r(),n&&n())}return t}function Fa(){var e=_a(!0);return e?(e(),!1):!0}function Si(e,t,r){return function(n,i){var o;!Ra(n)||Fa()||((o=e.animationState)===null||o===void 0||o.setActive(_.Hover,t),r==null||r(n,i))}}function Hd(e){var t=e.onHoverStart,r=e.onHoverEnd,n=e.whileHover,i=e.visualElement;Kt(i,"pointerenter",t||n?Si(i,!0,t):void 0,{passive:!t}),Kt(i,"pointerleave",r||n?Si(i,!1,r):void 0,{passive:!r})}var Ba=function(e,t){return t?e===t?!0:Ba(e,t.parentElement):!1};function ka(e){return m.useEffect(function(){return function(){return e()}},[])}const Zt=(e,t,r)=>Math.min(Math.max(r,e),t),Ir=.001,zd=.01,Di=10,Ud=.05,$d=1;function qd({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,o;Oc(e<=Di*1e3);let a=1-t;a=Zt(Ud,$d,a),e=Zt(zd,Di,e/1e3),a<1?(i=l=>{const c=l*a,d=c*e,h=c-r,f=en(l,a),v=Math.exp(-d);return Ir-h/f*v},o=l=>{const d=l*a*e,h=d*r+r,f=Math.pow(a,2)*Math.pow(l,2)*e,v=Math.exp(-d),p=en(Math.pow(l,2),a);return(-i(l)+Ir>0?-1:1)*((h-f)*v)/p}):(i=l=>{const c=Math.exp(-l*e),d=(l-r)*e+1;return-Ir+c*d},o=l=>{const c=Math.exp(-l*e),d=(r-l)*(e*e);return c*d});const s=5/e,u=Gd(i,o,s);if(e=e*1e3,isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:e}}}const Wd=12;function Gd(e,t,r){let n=r;for(let i=1;i<Wd;i++)n=n-e(n)/t(n);return n}function en(e,t){return e*Math.sqrt(1-t*t)}const Yd=["duration","bounce"],Xd=["stiffness","damping","mass"];function wi(e,t){return t.some(r=>e[r]!==void 0)}function Kd(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!wi(e,Xd)&&wi(e,Yd)){const r=qd(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Vn(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:i}=e,o=ee(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:u,mass:l,velocity:c,duration:d,isResolvedFromDuration:h}=Kd(o),f=Ei,v=Ei;function p(){const g=c?-(c/1e3):0,y=r-t,b=u/(2*Math.sqrt(s*l)),T=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-t)/100,.4)),b<1){const D=en(T,b);f=w=>{const x=Math.exp(-b*T*w);return r-x*((g+b*T*y)/D*Math.sin(D*w)+y*Math.cos(D*w))},v=w=>{const x=Math.exp(-b*T*w);return b*T*x*(Math.sin(D*w)*(g+b*T*y)/D+y*Math.cos(D*w))-x*(Math.cos(D*w)*(g+b*T*y)-D*y*Math.sin(D*w))}}else if(b===1)f=D=>r-Math.exp(-T*D)*(y+(g+T*y)*D);else{const D=T*Math.sqrt(b*b-1);f=w=>{const x=Math.exp(-b*T*w),R=Math.min(D*w,300);return r-x*((g+b*T*y)*Math.sinh(R)+D*y*Math.cosh(R))/D}}}return p(),{next:g=>{const y=f(g);if(h)a.done=g>=d;else{const b=v(g)*1e3,T=Math.abs(b)<=n,D=Math.abs(r-y)<=i;a.done=T&&D}return a.value=a.done?r:y,a},flipTarget:()=>{c=-c,[t,r]=[r,t],p()}}}Vn.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const Ei=e=>0,mt=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},F=(e,t,r)=>-r*e+r*t+e;function Mr(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Oi({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,o=0,a=0;if(!t)i=o=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,u=2*r-s;i=Mr(u,s,e+1/3),o=Mr(u,s,e),a=Mr(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:n}}const Zd=(e,t,r)=>{const n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},Jd=[Zr,De,Me],Ci=e=>Jd.find(t=>t.test(e)),ja=(e,t)=>{let r=Ci(e),n=Ci(t),i=r.parse(e),o=n.parse(t);r===Me&&(i=Oi(i),r=De),n===Me&&(o=Oi(o),n=De);const a=Object.assign({},i);return s=>{for(const u in a)u!=="alpha"&&(a[u]=Zd(i[u],o[u],s));return a.alpha=F(i.alpha,o.alpha,s),r.transform(a)}},tn=e=>typeof e=="number",Qd=(e,t)=>r=>t(e(r)),pr=(...e)=>e.reduce(Qd);function Ha(e,t){return tn(e)?r=>F(e,t,r):$.test(e)?ja(e,t):Ua(e,t)}const za=(e,t)=>{const r=[...e],n=r.length,i=e.map((o,a)=>Ha(o,t[a]));return o=>{for(let a=0;a<n;a++)r[a]=i[a](o);return r}},ef=(e,t)=>{const r=Object.assign(Object.assign({},e),t),n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=Ha(e[i],t[i]));return i=>{for(const o in n)r[o]=n[o](i);return r}};function xi(e){const t=ve.parse(e),r=t.length;let n=0,i=0,o=0;for(let a=0;a<r;a++)n||typeof t[a]=="number"?n++:t[a].hue!==void 0?o++:i++;return{parsed:t,numNumbers:n,numRGB:i,numHSL:o}}const Ua=(e,t)=>{const r=ve.createTransformer(t),n=xi(e),i=xi(t);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?pr(za(n.parsed,i.parsed),r):a=>`${a>0?t:e}`},tf=(e,t)=>r=>F(e,t,r);function rf(e){if(typeof e=="number")return tf;if(typeof e=="string")return $.test(e)?ja:Ua;if(Array.isArray(e))return za;if(typeof e=="object")return ef}function nf(e,t,r){const n=[],i=r||rf(e[0]),o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]:t;s=pr(u,s)}n.push(s)}return n}function of([e,t],[r]){return n=>r(mt(e,t,n))}function af(e,t){const r=e.length,n=r-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[n]&&(o=n-1,a=!0),!a){let u=1;for(;u<r&&!(e[u]>i||u===n);u++);o=u-1}const s=mt(e[o],e[o+1],i);return t[o](s)}}function $a(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const o=e.length;Gt(o===t.length),Gt(!n||!Array.isArray(n)||n.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=nf(t,n,i),s=o===2?of(e,a):af(e,a);return r?u=>s(Zt(e[0],e[o-1],u)):s}const gr=e=>t=>1-e(1-t),Nn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sf=e=>t=>Math.pow(t,e),qa=e=>t=>t*t*((e+1)*t-e),uf=e=>{const t=qa(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))},Wa=1.525,lf=4/11,cf=8/11,df=9/10,_n=e=>e,Fn=sf(2),ff=gr(Fn),Ga=Nn(Fn),Ya=e=>1-Math.sin(Math.acos(e)),Bn=gr(Ya),hf=Nn(Bn),kn=qa(Wa),vf=gr(kn),pf=Nn(kn),gf=uf(Wa),mf=4356/361,yf=35442/1805,bf=16061/1805,Jt=e=>{if(e===1||e===0)return e;const t=e*e;return e<lf?7.5625*t:e<cf?9.075*t-9.9*e+3.4:e<df?mf*t-yf*e+bf:10.8*e*e-20.52*e+10.72},Tf=gr(Jt),Sf=e=>e<.5?.5*(1-Jt(1-e*2)):.5*Jt(e*2-1)+.5;function Df(e,t){return e.map(()=>t||Ga).splice(0,e.length-1)}function wf(e){const t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function Ef(e,t){return e.map(r=>r*t)}function $t({from:e=0,to:t=1,ease:r,offset:n,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Ef(n&&n.length===a.length?n:wf(a),i);function u(){return $a(s,a,{ease:Array.isArray(r)?r:Df(a,r)})}let l=u();return{next:c=>(o.value=l(c),o.done=c>=i,o),flipTarget:()=>{a.reverse(),l=u()}}}function Of({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=r*e;const u=t+s,l=o===void 0?u:o(u);return l!==u&&(s=l-t),{next:c=>{const d=-s*Math.exp(-c/n);return a.done=!(d>i||d<-i),a.value=a.done?l:l+d,a},flipTarget:()=>{}}}const Pi={keyframes:$t,spring:Vn,decay:Of};function Cf(e){if(Array.isArray(e.to))return $t;if(Pi[e.type])return Pi[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?$t:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Vn:$t}const Xa=1/60*1e3,xf=typeof performance<"u"?()=>performance.now():()=>Date.now(),Ka=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(xf()),Xa);function Pf(e){let t=[],r=[],n=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const d=c&&i,h=d?t:r;return l&&a.add(u),h.indexOf(u)===-1&&(h.push(u),d&&i&&(n=t.length)),u},cancel:u=>{const l=r.indexOf(u);l!==-1&&r.splice(l,1),a.delete(u)},process:u=>{if(i){o=!0;return}if(i=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let l=0;l<n;l++){const c=t[l];c(u),a.has(c)&&(s.schedule(c),e())}i=!1,o&&(o=!1,s.process(u))}};return s}const If=40;let rn=!0,yt=!1,nn=!1;const qe={delta:0,timestamp:0},Dt=["read","update","preRender","render","postRender"],mr=Dt.reduce((e,t)=>(e[t]=Pf(()=>yt=!0),e),{}),ce=Dt.reduce((e,t)=>{const r=mr[t];return e[t]=(n,i=!1,o=!1)=>(yt||Rf(),r.schedule(n,i,o)),e},{}),Ge=Dt.reduce((e,t)=>(e[t]=mr[t].cancel,e),{}),Rr=Dt.reduce((e,t)=>(e[t]=()=>mr[t].process(qe),e),{}),Mf=e=>mr[e].process(qe),Za=e=>{yt=!1,qe.delta=rn?Xa:Math.max(Math.min(e-qe.timestamp,If),1),qe.timestamp=e,nn=!0,Dt.forEach(Mf),nn=!1,yt&&(rn=!1,Ka(Za))},Rf=()=>{yt=!0,rn=!0,nn||Ka(Za)},Qt=()=>qe;function Ja(e,t,r=0){return e-t-r}function Af(e,t,r=0,n=!0){return n?Ja(t+-e,t,r):t-(e-t)+r}function Lf(e,t,r,n){return n?e>=t+r:e<=-r}const Vf=e=>{const t=({delta:r})=>e(r);return{start:()=>ce.update(t,!0),stop:()=>Ge.update(t)}};function Qa(e){var t,r,{from:n,autoplay:i=!0,driver:o=Vf,elapsed:a=0,repeat:s=0,repeatType:u="loop",repeatDelay:l=0,onPlay:c,onStop:d,onComplete:h,onRepeat:f,onUpdate:v}=e,p=ee(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=p,y,b=0,T=p.duration,D,w=!1,x=!0,R;const A=Cf(p);!((r=(t=A).needsInterpolation)===null||r===void 0)&&r.call(t,n,g)&&(R=$a([0,100],[n,g],{clamp:!1}),n=0,g=100);const P=A(Object.assign(Object.assign({},p),{from:n,to:g}));function V(){b++,u==="reverse"?(x=b%2===0,a=Af(a,T,l,x)):(a=Ja(a,T,l),u==="mirror"&&P.flipTarget()),w=!1,f&&f()}function B(){y.stop(),h&&h()}function H(Y){if(x||(Y=-Y),a+=Y,!w){const te=P.next(Math.max(0,a));D=te.value,R&&(D=R(D)),w=x?te.done:a<=0}v==null||v(D),w&&(b===0&&(T??(T=a)),b<s?Lf(a,T,l,x)&&V():B())}function G(){c==null||c(),y=o(H),y.start()}return i&&G(),{stop:()=>{d==null||d(),y.stop()}}}function es(e,t){return t?e*(1e3/t):0}function Nf({from:e=0,velocity:t=0,min:r,max:n,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:d,onComplete:h,onStop:f}){let v;function p(T){return r!==void 0&&T<r||n!==void 0&&T>n}function g(T){return r===void 0?n:n===void 0||Math.abs(r-T)<Math.abs(n-T)?r:n}function y(T){v==null||v.stop(),v=Qa(Object.assign(Object.assign({},T),{driver:c,onUpdate:D=>{var w;d==null||d(D),(w=T.onUpdate)===null||w===void 0||w.call(T,D)},onComplete:h,onStop:f}))}function b(T){y(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},T))}if(p(e))b({from:e,velocity:t,to:g(e)});else{let T=i*t+e;typeof l<"u"&&(T=l(T));const D=g(T),w=D===r?-1:1;let x,R;const A=P=>{x=R,R=P,t=es(P-x,Qt().delta),(w===1&&P>D||w===-1&&P<D)&&b({from:P,to:D,velocity:t})};y({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:u,modifyTarget:l,onUpdate:p(T)?A:void 0})}return{stop:()=>v==null?void 0:v.stop()}}const on=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),Ii=e=>on(e)&&e.hasOwnProperty("z"),At=(e,t)=>Math.abs(e-t);function ts(e,t){if(tn(e)&&tn(t))return At(e,t);if(on(e)&&on(t)){const r=At(e.x,t.x),n=At(e.y,t.y),i=Ii(e)&&Ii(t)?At(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(i,2))}}const rs=(e,t)=>1-3*t+3*e,ns=(e,t)=>3*t-6*e,is=e=>3*e,er=(e,t,r)=>((rs(t,r)*e+ns(t,r))*e+is(t))*e,os=(e,t,r)=>3*rs(t,r)*e*e+2*ns(t,r)*e+is(t),_f=1e-7,Ff=10;function Bf(e,t,r,n,i){let o,a,s=0;do a=t+(r-t)/2,o=er(a,n,i)-e,o>0?r=a:t=a;while(Math.abs(o)>_f&&++s<Ff);return a}const kf=8,jf=.001;function Hf(e,t,r,n){for(let i=0;i<kf;++i){const o=os(t,r,n);if(o===0)return t;const a=er(t,r,n)-e;t-=a/o}return t}const qt=11,Lt=1/(qt-1);function zf(e,t,r,n){if(e===t&&r===n)return _n;const i=new Float32Array(qt);for(let a=0;a<qt;++a)i[a]=er(a*Lt,e,r);function o(a){let s=0,u=1;const l=qt-1;for(;u!==l&&i[u]<=a;++u)s+=Lt;--u;const c=(a-i[u])/(i[u+1]-i[u]),d=s+c*Lt,h=os(d,e,r);return h>=jf?Hf(a,d,e,r):h===0?d:Bf(a,s,s+Lt,e,r)}return a=>a===0||a===1?a:er(o(a),t,n)}function Uf(e){var t=e.onTap,r=e.onTapStart,n=e.onTapCancel,i=e.whileTap,o=e.visualElement,a=t||r||n||i,s=m.useRef(!1),u=m.useRef(null),l={passive:!(r||t||n||v)};function c(){var p;(p=u.current)===null||p===void 0||p.call(u),u.current=null}function d(){var p;return c(),s.current=!1,(p=o.animationState)===null||p===void 0||p.setActive(_.Tap,!1),!Fa()}function h(p,g){d()&&(Ba(o.getInstance(),p.target)?t==null||t(p,g):n==null||n(p,g))}function f(p,g){d()&&(n==null||n(p,g))}function v(p,g){var y;c(),!s.current&&(s.current=!0,u.current=pr($e(window,"pointerup",h,l),$e(window,"pointercancel",f,l)),(y=o.animationState)===null||y===void 0||y.setActive(_.Tap,!0),r==null||r(p,g))}Kt(o,"pointerdown",a?v:void 0,l),ka(c)}var Mi=new Set;function $f(e,t,r){e||Mi.has(t)||(console.warn(t),r&&console.warn(r),Mi.add(t))}var an=new WeakMap,Ar=new WeakMap,qf=function(e){var t;(t=an.get(e.target))===null||t===void 0||t(e)},Wf=function(e){e.forEach(qf)};function Gf(e){var t=e.root,r=ee(e,["root"]),n=t||document;Ar.has(n)||Ar.set(n,{});var i=Ar.get(n),o=JSON.stringify(r);return i[o]||(i[o]=new IntersectionObserver(Wf,S({root:t},r))),i[o]}function Yf(e,t,r){var n=Gf(t);return an.set(e,r),n.observe(e),function(){an.delete(e),n.unobserve(e)}}function Xf(e){var t=e.visualElement,r=e.whileInView,n=e.onViewportEnter,i=e.onViewportLeave,o=e.viewport,a=o===void 0?{}:o,s=m.useRef({hasEnteredView:!1,isInView:!1}),u=!!(r||n||i);a.once&&s.current.hasEnteredView&&(u=!1);var l=typeof IntersectionObserver>"u"?Jf:Zf;l(u,s.current,t,a)}var Kf={some:0,all:1};function Zf(e,t,r,n){var i=n.root,o=n.margin,a=n.amount,s=a===void 0?"some":a,u=n.once;m.useEffect(function(){if(e){var l={root:i==null?void 0:i.current,rootMargin:o,threshold:typeof s=="number"?s:Kf[s]},c=function(d){var h,f=d.isIntersecting;if(t.isInView!==f&&(t.isInView=f,!(u&&!f&&t.hasEnteredView))){f&&(t.hasEnteredView=!0),(h=r.animationState)===null||h===void 0||h.setActive(_.InView,f);var v=r.getProps(),p=f?v.onViewportEnter:v.onViewportLeave;p==null||p(d)}};return Yf(r.getInstance(),l,c)}},[e,i,o,s])}function Jf(e,t,r,n){var i=n.fallback,o=i===void 0?!0:i;m.useEffect(function(){!e||!o||(ta!=="production"&&$f(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var a;t.hasEnteredView=!0;var s=r.getProps().onViewportEnter;s==null||s(null),(a=r.animationState)===null||a===void 0||a.setActive(_.InView,!0)}))},[e])}var we=function(e){return function(t){return e(t),null}},Qf={inView:we(Xf),tap:we(Uf),focus:we(Rd),hover:we(Hd)},eh=0,th=function(){return eh++},rh=function(){return hr(th)};function as(){var e=m.useContext(cr);if(e===null)return[!0,null];var t=e.isPresent,r=e.onExitComplete,n=e.register,i=rh();m.useEffect(function(){return n(i)},[]);var o=function(){return r==null?void 0:r(i)};return!t&&r?[!1,o]:[!0]}function ss(e,t){if(!Array.isArray(t))return!1;var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var tr=function(e){return e*1e3},nh={linear:_n,easeIn:Fn,easeInOut:Ga,easeOut:ff,circIn:Ya,circInOut:hf,circOut:Bn,backIn:kn,backInOut:pf,backOut:vf,anticipate:gf,bounceIn:Tf,bounceInOut:Sf,bounceOut:Jt},Ri=function(e){if(Array.isArray(e)){Gt(e.length===4);var t=j(e,4),r=t[0],n=t[1],i=t[2],o=t[3];return zf(r,n,i,o)}else if(typeof e=="string")return nh[e];return e},ih=function(e){return Array.isArray(e)&&typeof e[0]!="number"},Ai=function(e,t){return e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ve.test(t)&&!t.startsWith("url("))},xe=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Vt=function(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}},Lr=function(){return{type:"keyframes",ease:"linear",duration:.3}},oh=function(e){return{type:"keyframes",duration:.8,values:e}},Li={x:xe,y:xe,z:xe,rotate:xe,rotateX:xe,rotateY:xe,rotateZ:xe,scaleX:Vt,scaleY:Vt,scale:Vt,opacity:Lr,backgroundColor:Lr,color:Lr,default:Vt},ah=function(e,t){var r;return gt(t)?r=oh:r=Li[e]||Li.default,S({to:t},r(t))},sh=S(S({},Ta),{color:$,backgroundColor:$,outlineColor:$,fill:$,stroke:$,borderColor:$,borderTopColor:$,borderRightColor:$,borderBottomColor:$,borderLeftColor:$,filter:Jr,WebkitFilter:Jr}),jn=function(e){return sh[e]};function Hn(e,t){var r,n=jn(e);return n!==Jr&&(n=ve),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,t)}function uh(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=ee(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}function lh(e){var t=e.ease,r=e.times,n=e.yoyo,i=e.flip,o=e.loop,a=ee(e,["ease","times","yoyo","flip","loop"]),s=S({},a);return r&&(s.offset=r),a.duration&&(s.duration=tr(a.duration)),a.repeatDelay&&(s.repeatDelay=tr(a.repeatDelay)),t&&(s.ease=ih(t)?t.map(Ri):Ri(t)),a.type==="tween"&&(s.type="keyframes"),(n||o||i)&&(n?s.repeatType="reverse":o?s.repeatType="loop":i&&(s.repeatType="mirror"),s.repeat=o||n||i||a.repeat),a.type!=="spring"&&(s.type="keyframes"),s}function ch(e,t){var r,n,i=zn(e,t)||{};return(n=(r=i.delay)!==null&&r!==void 0?r:e.delay)!==null&&n!==void 0?n:0}function dh(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=ue([],j(e.to),!1),e.to[0]=e.from),e}function fh(e,t,r){var n;return Array.isArray(t.to)&&((n=e.duration)!==null&&n!==void 0||(e.duration=.8)),dh(t),uh(e)||(e=S(S({},e),ah(r,t.to))),S(S({},t),lh(e))}function hh(e,t,r,n,i){var o,a=zn(n,e),s=(o=a.from)!==null&&o!==void 0?o:t.get(),u=Ai(e,r);s==="none"&&u&&typeof r=="string"?s=Hn(e,r):Vi(s)&&typeof r=="string"?s=Ni(r):!Array.isArray(r)&&Vi(r)&&typeof s=="string"&&(r=Ni(s));var l=Ai(e,s);function c(){var h={from:s,to:r,velocity:t.getVelocity(),onComplete:i,onUpdate:function(f){return t.set(f)}};return a.type==="inertia"||a.type==="decay"?Nf(S(S({},h),a)):Qa(S(S({},fh(a,h,e)),{onUpdate:function(f){var v;h.onUpdate(f),(v=a.onUpdate)===null||v===void 0||v.call(a,f)},onComplete:function(){var f;h.onComplete(),(f=a.onComplete)===null||f===void 0||f.call(a)}}))}function d(){var h,f,v=Ia(r);return t.set(v),i(),(h=a==null?void 0:a.onUpdate)===null||h===void 0||h.call(a,v),(f=a==null?void 0:a.onComplete)===null||f===void 0||f.call(a),{stop:function(){}}}return!l||!u||a.type===!1?d:c}function Vi(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function Ni(e){return typeof e=="number"?0:Hn("",e)}function zn(e,t){return e[t]||e.default||e}function Un(e,t,r,n){return n===void 0&&(n={}),t.start(function(i){var o,a,s=hh(e,t,r,n,i),u=ch(n,e),l=function(){return a=s()};return u?o=window.setTimeout(l,tr(u)):l(),function(){clearTimeout(o),a==null||a.stop()}})}var vh=function(e){return/^\-?\d*\.?\d+$/.test(e)},ph=function(e){return/^0[^.\s]+$/.test(e)};function $n(e,t){e.indexOf(t)===-1&&e.push(t)}function qn(e,t){var r=e.indexOf(t);r>-1&&e.splice(r,1)}var st=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var r=this;return $n(this.subscriptions,t),function(){return qn(r.subscriptions,t)}},e.prototype.notify=function(t,r,n){var i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(var o=0;o<i;o++){var a=this.subscriptions[o];a&&a(t,r,n)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),gh=function(e){return!isNaN(parseFloat(e))},mh=function(){function e(t){var r=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new st,this.velocityUpdateSubscribers=new st,this.renderSubscribers=new st,this.canTrackVelocity=!1,this.updateAndNotify=function(n,i){i===void 0&&(i=!0),r.prev=r.current,r.current=n;var o=Qt(),a=o.delta,s=o.timestamp;r.lastUpdated!==s&&(r.timeDelta=a,r.lastUpdated=s,ce.postRender(r.scheduleVelocityCheck)),r.prev!==r.current&&r.updateSubscribers.notify(r.current),r.velocityUpdateSubscribers.getSize()&&r.velocityUpdateSubscribers.notify(r.getVelocity()),i&&r.renderSubscribers.notify(r.current)},this.scheduleVelocityCheck=function(){return ce.postRender(r.velocityCheck)},this.velocityCheck=function(n){var i=n.timestamp;i!==r.lastUpdated&&(r.prev=r.current,r.velocityUpdateSubscribers.notify(r.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=gh(this.current)}return e.prototype.onChange=function(t){return this.updateSubscribers.add(t)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},e.prototype.attach=function(t){this.passiveEffect=t},e.prototype.set=function(t,r){r===void 0&&(r=!0),!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?es(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(t){var r=this;return this.stop(),new Promise(function(n){r.hasAnimated=!0,r.stopAnimation=t(n)}).then(function(){return r.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function Ye(e){return new mh(e)}var us=function(e){return function(t){return t.test(e)}},yh={test:function(e){return e==="auto"},parse:function(e){return e}},ls=[Ve,C,le,be,nd,rd,yh],Je=function(e){return ls.find(us(e))},bh=ue(ue([],j(ls),!1),[$,ve],!1),Th=function(e){return bh.find(us(e))};function Sh(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Ye(r))}function Dh(e,t){var r=dr(e,t),n=r?e.makeTargetAnimatable(r,!1):{},i=n.transitionEnd,o=i===void 0?{}:i;n.transition;var a=ee(n,["transitionEnd","transition"]);a=S(S({},a),o);for(var s in a){var u=Ia(a[s]);Sh(e,s,u)}}function wh(e,t,r){var n,i,o,a,s=Object.keys(t).filter(function(f){return!e.hasValue(f)}),u=s.length;if(u)for(var l=0;l<u;l++){var c=s[l],d=t[c],h=null;Array.isArray(d)&&(h=d[0]),h===null&&(h=(i=(n=r[c])!==null&&n!==void 0?n:e.readValue(c))!==null&&i!==void 0?i:t[c]),h!=null&&(typeof h=="string"&&(vh(h)||ph(h))?h=parseFloat(h):!Th(h)&&ve.test(d)&&(h=Hn(c,d)),e.addValue(c,Ye(h)),(o=(a=r)[c])!==null&&o!==void 0||(a[c]=h),e.setBaseTarget(c,h))}}function Eh(e,t){if(t){var r=t[e]||t.default||t;return r.from}}function Oh(e,t,r){var n,i,o={};for(var a in e)o[a]=(n=Eh(a,t))!==null&&n!==void 0?n:(i=r.getValue(a))===null||i===void 0?void 0:i.get();return o}function Ch(e,t,r){r===void 0&&(r={}),e.notifyAnimationStart(t);var n;if(Array.isArray(t)){var i=t.map(function(a){return sn(e,a,r)});n=Promise.all(i)}else if(typeof t=="string")n=sn(e,t,r);else{var o=typeof t=="function"?dr(e,t,r.custom):t;n=cs(e,o,r)}return n.then(function(){return e.notifyAnimationComplete(t)})}function sn(e,t,r){var n;r===void 0&&(r={});var i=dr(e,t,r.custom),o=(i||{}).transition,a=o===void 0?e.getDefaultTransition()||{}:o;r.transitionOverride&&(a=r.transitionOverride);var s=i?function(){return cs(e,i,r)}:function(){return Promise.resolve()},u=!((n=e.variantChildren)===null||n===void 0)&&n.size?function(f){f===void 0&&(f=0);var v=a.delayChildren,p=v===void 0?0:v,g=a.staggerChildren,y=a.staggerDirection;return xh(e,t,p+f,g,y,r)}:function(){return Promise.resolve()},l=a.when;if(l){var c=j(l==="beforeChildren"?[s,u]:[u,s],2),d=c[0],h=c[1];return d().then(h)}else return Promise.all([s(),u(r.delay)])}function cs(e,t,r){var n,i=r===void 0?{}:r,o=i.delay,a=o===void 0?0:o,s=i.transitionOverride,u=i.type,l=e.makeTargetAnimatable(t),c=l.transition,d=c===void 0?e.getDefaultTransition():c,h=l.transitionEnd,f=ee(l,["transition","transitionEnd"]);s&&(d=s);var v=[],p=u&&((n=e.animationState)===null||n===void 0?void 0:n.getState()[u]);for(var g in f){var y=e.getValue(g),b=f[g];if(!(!y||b===void 0||p&&Ih(p,g))){var T=S({delay:a},d);e.shouldReduceMotion&&bt(g)&&(T=S(S({},T),{type:!1,delay:0}));var D=Un(g,y,b,T);v.push(D)}}return Promise.all(v).then(function(){h&&Dh(e,h)})}function xh(e,t,r,n,i,o){r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=1);var a=[],s=(e.variantChildren.size-1)*n,u=i===1?function(l){return l===void 0&&(l=0),l*n}:function(l){return l===void 0&&(l=0),s-l*n};return Array.from(e.variantChildren).sort(Ph).forEach(function(l,c){a.push(sn(l,t,S(S({},o),{delay:r+u(c)})).then(function(){return l.notifyAnimationComplete(t)}))}),Promise.all(a)}function Ph(e,t){return e.sortNodePosition(t)}function Ih(e,t){var r=e.protectedKeys,n=e.needsAnimating,i=r.hasOwnProperty(t)&&n[t]!==!0;return n[t]=!1,i}var Wn=[_.Animate,_.InView,_.Focus,_.Hover,_.Tap,_.Drag,_.Exit],Mh=ue([],j(Wn),!1).reverse(),Rh=Wn.length;function Ah(e){return function(t){return Promise.all(t.map(function(r){var n=r.animation,i=r.options;return Ch(e,n,i)}))}}function Lh(e){var t=Ah(e),r=Nh(),n={},i=!0,o=function(c,d){var h=dr(e,d);if(h){h.transition;var f=h.transitionEnd,v=ee(h,["transition","transitionEnd"]);c=S(S(S({},c),v),f)}return c};function a(c){return n[c]!==void 0}function s(c){t=c(e)}function u(c,d){for(var h,f=e.getProps(),v=e.getVariantContext(!0)||{},p=[],g=new Set,y={},b=1/0,T=function(R){var A=Mh[R],P=r[A],V=(h=f[A])!==null&&h!==void 0?h:v[A],B=ie(V),H=A===d?P.isActive:null;H===!1&&(b=R);var G=V===v[A]&&V!==f[A]&&B;if(G&&i&&e.manuallyAnimateOnMount&&(G=!1),P.protectedKeys=S({},y),!P.isActive&&H===null||!V&&!P.prevProp||An(V)||typeof V=="boolean")return"continue";var Y=Vh(P.prevProp,V),te=Y||A===d&&P.isActive&&!G&&B||R>b&&B,me=Array.isArray(V)?V:[V],X=me.reduce(o,{});H===!1&&(X={});var Ke=P.prevResolvedValues,Ne=Ke===void 0?{}:Ke,Et=S(S({},Ne),X),_e=function(O){te=!0,g.delete(O),P.needsAnimating[O]=!0};for(var W in Et){var L=X[W],E=Ne[W];y.hasOwnProperty(W)||(L!==E?gt(L)&&gt(E)?!ss(L,E)||Y?_e(W):P.protectedKeys[W]=!0:L!==void 0?_e(W):g.add(W):L!==void 0&&g.has(W)?_e(W):P.protectedKeys[W]=!0)}P.prevProp=V,P.prevResolvedValues=X,P.isActive&&(y=S(S({},y),X)),i&&e.blockInitialAnimation&&(te=!1),te&&!G&&p.push.apply(p,ue([],j(me.map(function(O){return{animation:O,options:S({type:A},c)}})),!1))},D=0;D<Rh;D++)T(D);if(n=S({},y),g.size){var w={};g.forEach(function(R){var A=e.getBaseTarget(R);A!==void 0&&(w[R]=A)}),p.push({animation:w})}var x=!!p.length;return i&&f.initial===!1&&!e.manuallyAnimateOnMount&&(x=!1),i=!1,x?t(p):Promise.resolve()}function l(c,d,h){var f;if(r[c].isActive===d)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(function(g){var y;return(y=g.animationState)===null||y===void 0?void 0:y.setActive(c,d)}),r[c].isActive=d;var v=u(h,c);for(var p in r)r[p].protectedKeys={};return v}return{isAnimated:a,animateChanges:u,setActive:l,setAnimateFunction:s,getState:function(){return r}}}function Vh(e,t){return typeof t=="string"?t!==e:oa(t)?!ss(t,e):!1}function Pe(e){return e===void 0&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nh(){var e;return e={},e[_.Animate]=Pe(!0),e[_.InView]=Pe(),e[_.Hover]=Pe(),e[_.Tap]=Pe(),e[_.Drag]=Pe(),e[_.Focus]=Pe(),e[_.Exit]=Pe(),e}var _h={animation:we(function(e){var t=e.visualElement,r=e.animate;t.animationState||(t.animationState=Lh(t)),An(r)&&m.useEffect(function(){return r.subscribe(t)},[r])}),exit:we(function(e){var t=e.custom,r=e.visualElement,n=j(as(),2),i=n[0],o=n[1],a=m.useContext(cr);m.useEffect(function(){var s,u;r.isPresent=i;var l=(s=r.animationState)===null||s===void 0?void 0:s.setActive(_.Exit,!i,{custom:(u=a==null?void 0:a.custom)!==null&&u!==void 0?u:t});!i&&(l==null||l.then(o))},[i])})},ds=function(){function e(t,r,n){var i=this,o=n===void 0?{}:n,a=o.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var h=Nr(i.lastMoveEventInfo,i.history),f=i.startEvent!==null,v=ts(h.offset,{x:0,y:0})>=3;if(!(!f&&!v)){var p=h.point,g=Qt().timestamp;i.history.push(S(S({},p),{timestamp:g}));var y=i.handlers,b=y.onStart,T=y.onMove;f||(b&&b(i.lastMoveEvent,h),i.startEvent=i.lastMoveEvent),T&&T(i.lastMoveEvent,h)}}},this.handlePointerMove=function(h,f){if(i.lastMoveEvent=h,i.lastMoveEventInfo=Vr(f,i.transformPagePoint),Ra(h)&&h.buttons===0){i.handlePointerUp(h,f);return}ce.update(i.updatePoint,!0)},this.handlePointerUp=function(h,f){i.end();var v=i.handlers,p=v.onEnd,g=v.onSessionEnd,y=Nr(Vr(f,i.transformPagePoint),i.history);i.startEvent&&p&&p(h,y),g&&g(h,y)},!(Aa(t)&&t.touches.length>1)){this.handlers=r,this.transformPagePoint=a;var s=Ln(t),u=Vr(s,this.transformPagePoint),l=u.point,c=Qt().timestamp;this.history=[S(S({},l),{timestamp:c})];var d=r.onSessionStart;d&&d(t,Nr(u,this.history)),this.removeListeners=pr($e(window,"pointermove",this.handlePointerMove),$e(window,"pointerup",this.handlePointerUp),$e(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),Ge.update(this.updatePoint)},e}();function Vr(e,t){return t?{point:t(e.point)}:e}function _i(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nr(e,t){var r=e.point;return{point:r,delta:_i(r,fs(t)),offset:_i(r,Fh(t)),velocity:Bh(t,.1)}}function Fh(e){return e[0]}function fs(e){return e[e.length-1]}function Bh(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,i=fs(e);r>=0&&(n=e[r],!(i.timestamp-n.timestamp>tr(t)));)r--;if(!n)return{x:0,y:0};var o=(i.timestamp-n.timestamp)/1e3;if(o===0)return{x:0,y:0};var a={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function pe(e){return e.max-e.min}function Fi(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=.01),ts(e,t)<r}function Bi(e,t,r,n){n===void 0&&(n=.5),e.origin=n,e.originPoint=F(t.min,t.max,e.origin),e.scale=pe(r)/pe(t),(Fi(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=F(r.min,r.max,e.origin)-e.originPoint,(Fi(e.translate)||isNaN(e.translate))&&(e.translate=0)}function ut(e,t,r,n){Bi(e.x,t.x,r.x,n==null?void 0:n.originX),Bi(e.y,t.y,r.y,n==null?void 0:n.originY)}function ki(e,t,r){e.min=r.min+t.min,e.max=e.min+pe(t)}function kh(e,t,r){ki(e.x,t.x,r.x),ki(e.y,t.y,r.y)}function ji(e,t,r){e.min=t.min-r.min,e.max=e.min+pe(t)}function lt(e,t,r){ji(e.x,t.x,r.x),ji(e.y,t.y,r.y)}function jh(e,t,r){var n=t.min,i=t.max;return n!==void 0&&e<n?e=r?F(n,e,r.min):Math.max(e,n):i!==void 0&&e>i&&(e=r?F(i,e,r.max):Math.min(e,i)),e}function Hi(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Hh(e,t){var r=t.top,n=t.left,i=t.bottom,o=t.right;return{x:Hi(e.x,n,o),y:Hi(e.y,r,i)}}function zi(e,t){var r,n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(r=j([i,n],2),n=r[0],i=r[1]),{min:n,max:i}}function zh(e,t){return{x:zi(e.x,t.x),y:zi(e.y,t.y)}}function Uh(e,t){var r=.5,n=pe(e),i=pe(t);return i>n?r=mt(t.min,t.max-n,e.min):n>i&&(r=mt(e.min,e.max-i,t.min)),Zt(0,1,r)}function $h(e,t){var r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var un=.35;function qh(e){return e===void 0&&(e=un),e===!1?e=0:e===!0&&(e=un),{x:Ui(e,"left","right"),y:Ui(e,"top","bottom")}}function Ui(e,t,r){return{min:$i(e,t),max:$i(e,r)}}function $i(e,t){var r;return typeof e=="number"?e:(r=e[t])!==null&&r!==void 0?r:0}var qi=function(){return{translate:0,scale:1,origin:0,originPoint:0}},ct=function(){return{x:qi(),y:qi()}},Wi=function(){return{min:0,max:0}},z=function(){return{x:Wi(),y:Wi()}};function se(e){return[e("x"),e("y")]}function hs(e){var t=e.top,r=e.left,n=e.right,i=e.bottom;return{x:{min:r,max:n},y:{min:t,max:i}}}function Wh(e){var t=e.x,r=e.y;return{top:r.min,right:t.max,bottom:r.max,left:t.min}}function Gh(e,t){if(!t)return e;var r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function _r(e){return e===void 0||e===1}function vs(e){var t=e.scale,r=e.scaleX,n=e.scaleY;return!_r(t)||!_r(r)||!_r(n)}function Te(e){return vs(e)||Gi(e.x)||Gi(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function Gi(e){return e&&e!=="0%"}function rr(e,t,r){var n=e-r,i=t*n;return r+i}function Yi(e,t,r,n,i){return i!==void 0&&(e=rr(e,i,n)),rr(e,r,n)+t}function ln(e,t,r,n,i){t===void 0&&(t=0),r===void 0&&(r=1),e.min=Yi(e.min,t,r,n,i),e.max=Yi(e.max,t,r,n,i)}function ps(e,t){var r=t.x,n=t.y;ln(e.x,r.translate,r.scale,r.originPoint),ln(e.y,n.translate,n.scale,n.originPoint)}function Yh(e,t,r,n){var i,o;n===void 0&&(n=!1);var a=r.length;if(a){t.x=t.y=1;for(var s,u,l=0;l<a;l++)s=r[l],u=s.projectionDelta,((o=(i=s.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(n&&s.options.layoutScroll&&s.scroll&&s!==s.root&&He(e,{x:-s.scroll.x,y:-s.scroll.y}),u&&(t.x*=u.x.scale,t.y*=u.y.scale,ps(e,u)),n&&Te(s.latestValues)&&He(e,s.latestValues))}}function Se(e,t){e.min=e.min+t,e.max=e.max+t}function Xi(e,t,r){var n=j(r,3),i=n[0],o=n[1],a=n[2],s=t[a]!==void 0?t[a]:.5,u=F(e.min,e.max,s);ln(e,t[i],t[o],u,t.scale)}var Xh=["x","scaleX","originX"],Kh=["y","scaleY","originY"];function He(e,t){Xi(e.x,t,Xh),Xi(e.y,t,Kh)}function gs(e,t){return hs(Gh(e.getBoundingClientRect(),t))}function Zh(e,t,r){var n=gs(e,r),i=t.scroll;return i&&(Se(n.x,i.x),Se(n.y,i.y)),n}var Jh=new WeakMap,Qh=function(){function e(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=z(),this.visualElement=t}return e.prototype.start=function(t,r){var n=this,i=r===void 0?{}:r,o=i.snapToCursor,a=o===void 0?!1:o;if(this.visualElement.isPresent!==!1){var s=function(d){n.stopAnimation(),a&&n.snapToCursor(Ln(d,"page").point)},u=function(d,h){var f,v=n.getProps(),p=v.drag,g=v.dragPropagation,y=v.onDragStart;p&&!g&&(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=_a(p),!n.openGlobalLock)||(n.isDragging=!0,n.currentDirection=null,n.resolveConstraints(),n.visualElement.projection&&(n.visualElement.projection.isAnimationBlocked=!0,n.visualElement.projection.target=void 0),se(function(b){var T,D,w=n.getAxisMotionValue(b).get()||0;if(le.test(w)){var x=(D=(T=n.visualElement.projection)===null||T===void 0?void 0:T.layout)===null||D===void 0?void 0:D.actual[b];if(x){var R=pe(x);w=R*(parseFloat(w)/100)}}n.originPoint[b]=w}),y==null||y(d,h),(f=n.visualElement.animationState)===null||f===void 0||f.setActive(_.Drag,!0))},l=function(d,h){var f=n.getProps(),v=f.dragPropagation,p=f.dragDirectionLock,g=f.onDirectionLock,y=f.onDrag;if(!(!v&&!n.openGlobalLock)){var b=h.offset;if(p&&n.currentDirection===null){n.currentDirection=ev(b),n.currentDirection!==null&&(g==null||g(n.currentDirection));return}n.updateAxis("x",h.point,b),n.updateAxis("y",h.point,b),n.visualElement.syncRender(),y==null||y(d,h)}},c=function(d,h){return n.stop(d,h)};this.panSession=new ds(t,{onSessionStart:s,onStart:u,onMove:l,onSessionEnd:c},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(t,r){var n=this.isDragging;if(this.cancel(),!!n){var i=r.velocity;this.startAnimation(i);var o=this.getProps().onDragEnd;o==null||o(t,r)}},e.prototype.cancel=function(){var t,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;var n=this.getProps().dragPropagation;!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(_.Drag,!1)},e.prototype.updateAxis=function(t,r,n){var i=this.getProps().drag;if(!(!n||!Nt(t,i,this.currentDirection))){var o=this.getAxisMotionValue(t),a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=jh(a,this.constraints[t],this.elastic[t])),o.set(a)}},e.prototype.resolveConstraints=function(){var t=this,r=this.getProps(),n=r.dragConstraints,i=r.dragElastic,o=(this.visualElement.projection||{}).layout,a=this.constraints;n&&je(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=Hh(o.actual,n):this.constraints=!1,this.elastic=qh(i),a!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&se(function(s){t.getAxisMotionValue(s)&&(t.constraints[s]=$h(o.actual[s],t.constraints[s]))})},e.prototype.resolveRefConstraints=function(){var t=this.getProps(),r=t.dragConstraints,n=t.onMeasureDragConstraints;if(!r||!je(r))return!1;var i=r.current,o=this.visualElement.projection;if(!o||!o.layout)return!1;var a=Zh(i,o.root,this.visualElement.getTransformPagePoint()),s=zh(o.layout.actual,a);if(n){var u=n(Wh(s));this.hasMutatedConstraints=!!u,u&&(s=hs(u))}return s},e.prototype.startAnimation=function(t){var r=this,n=this.getProps(),i=n.drag,o=n.dragMomentum,a=n.dragElastic,s=n.dragTransition,u=n.dragSnapToOrigin,l=n.onDragTransitionEnd,c=this.constraints||{},d=se(function(h){var f;if(Nt(h,i,r.currentDirection)){var v=(f=c==null?void 0:c[h])!==null&&f!==void 0?f:{};u&&(v={min:0,max:0});var p=a?200:1e6,g=a?40:1e7,y=S(S({type:"inertia",velocity:o?t[h]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10},s),v);return r.startAxisValueAnimation(h,y)}});return Promise.all(d).then(l)},e.prototype.startAxisValueAnimation=function(t,r){var n=this.getAxisMotionValue(t);return Un(t,n,0,r)},e.prototype.stopAnimation=function(){var t=this;se(function(r){return t.getAxisMotionValue(r).stop()})},e.prototype.getAxisMotionValue=function(t){var r,n,i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(n=(r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[t])!==null&&n!==void 0?n:0)},e.prototype.snapToCursor=function(t){var r=this;se(function(n){var i=r.getProps().drag;if(Nt(n,i,r.currentDirection)){var o=r.visualElement.projection,a=r.getAxisMotionValue(n);if(o&&o.layout){var s=o.layout.actual[n],u=s.min,l=s.max;a.set(t[n]-F(u,l,.5))}}})},e.prototype.scalePositionWithinConstraints=function(){var t=this,r,n=this.getProps(),i=n.drag,o=n.dragConstraints,a=this.visualElement.projection;if(!(!je(o)||!a||!this.constraints)){this.stopAnimation();var s={x:0,y:0};se(function(l){var c=t.getAxisMotionValue(l);if(c){var d=c.get();s[l]=Uh({min:d,max:d},t.constraints[l])}});var u=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=u?u({},""):"none",(r=a.root)===null||r===void 0||r.updateScroll(),a.updateLayout(),this.resolveConstraints(),se(function(l){if(Nt(l,i,null)){var c=t.getAxisMotionValue(l),d=t.constraints[l],h=d.min,f=d.max;c.set(F(h,f,s[l]))}})}},e.prototype.addListeners=function(){var t=this,r;Jh.set(this.visualElement,this);var n=this.visualElement.getInstance(),i=$e(n,"pointerdown",function(l){var c=t.getProps(),d=c.drag,h=c.dragListener,f=h===void 0?!0:h;d&&f&&t.start(l)}),o=function(){var l=t.getProps().dragConstraints;je(l)&&(t.constraints=t.resolveRefConstraints())},a=this.visualElement.projection,s=a.addEventListener("measure",o);a&&!a.layout&&((r=a.root)===null||r===void 0||r.updateScroll(),a.updateLayout()),o();var u=vr(window,"resize",function(){return t.scalePositionWithinConstraints()});return a.addEventListener("didUpdate",function(l){var c=l.delta,d=l.hasLayoutChanged;t.isDragging&&d&&(se(function(h){var f=t.getAxisMotionValue(h);f&&(t.originPoint[h]+=c[h].translate,f.set(f.get()+c[h].translate))}),t.visualElement.syncRender())}),function(){u(),i(),s()}},e.prototype.getProps=function(){var t=this.visualElement.getProps(),r=t.drag,n=r===void 0?!1:r,i=t.dragDirectionLock,o=i===void 0?!1:i,a=t.dragPropagation,s=a===void 0?!1:a,u=t.dragConstraints,l=u===void 0?!1:u,c=t.dragElastic,d=c===void 0?un:c,h=t.dragMomentum,f=h===void 0?!0:h;return S(S({},t),{drag:n,dragDirectionLock:o,dragPropagation:s,dragConstraints:l,dragElastic:d,dragMomentum:f})},e}();function Nt(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function ev(e,t){t===void 0&&(t=10);var r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}function tv(e){var t=e.dragControls,r=e.visualElement,n=hr(function(){return new Qh(r)});m.useEffect(function(){return t&&t.subscribe(n)},[n,t]),m.useEffect(function(){return n.addListeners()},[n])}function rv(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,i=e.onPanSessionStart,o=e.visualElement,a=t||r||n||i,s=m.useRef(null),u=m.useContext(On).transformPagePoint,l={onSessionStart:i,onStart:r,onMove:t,onEnd:function(d,h){s.current=null,n&&n(d,h)}};m.useEffect(function(){s.current!==null&&s.current.updateHandlers(l)});function c(d){s.current=new ds(d,l,{transformPagePoint:u})}Kt(o,"pointerdown",a&&c),ka(function(){return s.current&&s.current.end()})}var nv={pan:we(rv),drag:we(tv)},_t=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function iv(){var e=_t.map(function(){return new st}),t={},r={clearAllListeners:function(){return e.forEach(function(n){return n.clear()})},updatePropListeners:function(n){_t.forEach(function(i){var o,a="on"+i,s=n[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=r[a](s))})}};return e.forEach(function(n,i){r["on"+_t[i]]=function(o){return n.add(o)},r["notify"+_t[i]]=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.notify.apply(n,ue([],j(o),!1))}}),r}function ov(e,t,r){var n;for(var i in t){var o=t[i],a=r[i];if(he(o))e.addValue(i,o);else if(he(a))e.addValue(i,Ye(o));else if(a!==o)if(e.hasValue(i)){var s=e.getValue(i);!s.hasAnimated&&s.set(o)}else e.addValue(i,Ye((n=e.getStaticValue(i))!==null&&n!==void 0?n:o))}for(var i in r)t[i]===void 0&&e.removeValue(i);return t}var ms=function(e){var t=e.treeType,r=t===void 0?"":t,n=e.build,i=e.getBaseTarget,o=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,u=e.readValueFromInstance,l=e.removeValueFromRenderState,c=e.sortNodePosition,d=e.scrapeMotionValuesFromProps;return function(h,f){var v=h.parent,p=h.props,g=h.presenceId,y=h.blockInitialAnimation,b=h.visualState,T=h.shouldReduceMotion;f===void 0&&(f={});var D=!1,w=b.latestValues,x=b.renderState,R,A=iv(),P=new Map,V=new Map,B={},H=S({},w),G;function Y(){!R||!D||(te(),s(R,x,p.style,L.projection))}function te(){n(L,x,w,f,p)}function me(){A.notifyUpdate(w)}function X(E,O){var U=O.onChange(function(Ot){w[E]=Ot,p.onUpdate&&ce.update(me,!1,!0)}),Ze=O.onRenderRequest(L.scheduleRender);V.set(E,function(){U(),Ze()})}var Ke=d(p);for(var Ne in Ke){var Et=Ke[Ne];w[Ne]!==void 0&&he(Et)&&Et.set(w[Ne],!1)}var _e=fr(p),W=sa(p),L=S(S({treeType:r,current:null,depth:v?v.depth+1:0,parent:v,children:new Set,presenceId:g,shouldReduceMotion:T,variantChildren:W?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(v!=null&&v.isMounted()),blockInitialAnimation:y,isMounted:function(){return!!R},mount:function(E){D=!0,R=L.current=E,L.projection&&L.projection.mount(E),W&&v&&!_e&&(G=v==null?void 0:v.addVariantChild(L)),P.forEach(function(O,U){return X(U,O)}),v==null||v.children.add(L),L.setProps(p)},unmount:function(){var E;(E=L.projection)===null||E===void 0||E.unmount(),Ge.update(me),Ge.render(Y),V.forEach(function(O){return O()}),G==null||G(),v==null||v.children.delete(L),A.clearAllListeners(),R=void 0,D=!1},addVariantChild:function(E){var O,U=L.getClosestVariantNode();if(U)return(O=U.variantChildren)===null||O===void 0||O.add(E),function(){return U.variantChildren.delete(E)}},sortNodePosition:function(E){return!c||r!==E.treeType?0:c(L.getInstance(),E.getInstance())},getClosestVariantNode:function(){return W?L:v==null?void 0:v.getClosestVariantNode()},getLayoutId:function(){return p.layoutId},getInstance:function(){return R},getStaticValue:function(E){return w[E]},setStaticValue:function(E,O){return w[E]=O},getLatestValues:function(){return w},setVisibility:function(E){L.isVisible!==E&&(L.isVisible=E,L.scheduleRender())},makeTargetAnimatable:function(E,O){return O===void 0&&(O=!0),o(L,E,p,O)},measureViewportBox:function(){return a(R,p)},addValue:function(E,O){L.hasValue(E)&&L.removeValue(E),P.set(E,O),w[E]=O.get(),X(E,O)},removeValue:function(E){var O;P.delete(E),(O=V.get(E))===null||O===void 0||O(),V.delete(E),delete w[E],l(E,x)},hasValue:function(E){return P.has(E)},getValue:function(E,O){var U=P.get(E);return U===void 0&&O!==void 0&&(U=Ye(O),L.addValue(E,U)),U},forEachValue:function(E){return P.forEach(E)},readValue:function(E){var O;return(O=w[E])!==null&&O!==void 0?O:u(R,E,f)},setBaseTarget:function(E,O){H[E]=O},getBaseTarget:function(E){if(i){var O=i(p,E);if(O!==void 0&&!he(O))return O}return H[E]}},A),{build:function(){return te(),x},scheduleRender:function(){ce.render(Y,!1,!0)},syncRender:Y,setProps:function(E){(E.transformTemplate||p.transformTemplate)&&L.scheduleRender(),p=E,A.updatePropListeners(E),B=ov(L,d(p),B)},getProps:function(){return p},getVariant:function(E){var O;return(O=p.variants)===null||O===void 0?void 0:O[E]},getDefaultTransition:function(){return p.transition},getTransformPagePoint:function(){return p.transformPagePoint},getVariantContext:function(E){if(E===void 0&&(E=!1),E)return v==null?void 0:v.getVariantContext();if(!_e){var O=(v==null?void 0:v.getVariantContext())||{};return p.initial!==void 0&&(O.initial=p.initial),O}for(var U={},Ze=0;Ze<av;Ze++){var Ot=ys[Ze],br=p[Ot];(ie(br)||br===!1)&&(U[Ot]=br)}return U}});return L}},ys=ue(["initial"],j(Wn),!1),av=ys.length;function cn(e){return typeof e=="string"&&e.startsWith("var(--")}var bs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function sv(e){var t=bs.exec(e);if(!t)return[,];var r=j(t,3),n=r[1],i=r[2];return[n,i]}function dn(e,t,r){var n=j(sv(e),2),i=n[0],o=n[1];if(i){var a=window.getComputedStyle(t).getPropertyValue(i);return a?a.trim():cn(o)?dn(o,t):o}}function uv(e,t,r){var n,i=ee(t,[]),o=e.getInstance();if(!(o instanceof Element))return{target:i,transitionEnd:r};r&&(r=S({},r)),e.forEachValue(function(l){var c=l.get();if(cn(c)){var d=dn(c,o);d&&l.set(d)}});for(var a in i){var s=i[a];if(cn(s)){var u=dn(s,o);u&&(i[a]=u,r&&((n=r[a])!==null&&n!==void 0||(r[a]=s)))}}return{target:i,transitionEnd:r}}var lv=new Set(["width","height","top","left","right","bottom","x","y"]),Ts=function(e){return lv.has(e)},cv=function(e){return Object.keys(e).some(Ts)},Ss=function(e,t){e.set(t,!1),e.set(t)},Ki=function(e){return e===Ve||e===C},Zi;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(Zi||(Zi={}));var Ji=function(e,t){return parseFloat(e.split(", ")[t])},Qi=function(e,t){return function(r,n){var i=n.transform;if(i==="none"||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return Ji(o[1],t);var a=i.match(/^matrix\((.+)\)$/);return a?Ji(a[1],e):0}},dv=new Set(["x","y","z"]),fv=vt.filter(function(e){return!dv.has(e)});function hv(e){var t=[];return fv.forEach(function(r){var n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}var eo={width:function(e,t){var r=e.x,n=t.paddingLeft,i=n===void 0?"0":n,o=t.paddingRight,a=o===void 0?"0":o;return r.max-r.min-parseFloat(i)-parseFloat(a)},height:function(e,t){var r=e.y,n=t.paddingTop,i=n===void 0?"0":n,o=t.paddingBottom,a=o===void 0?"0":o;return r.max-r.min-parseFloat(i)-parseFloat(a)},top:function(e,t){var r=t.top;return parseFloat(r)},left:function(e,t){var r=t.left;return parseFloat(r)},bottom:function(e,t){var r=e.y,n=t.top;return parseFloat(n)+(r.max-r.min)},right:function(e,t){var r=e.x,n=t.left;return parseFloat(n)+(r.max-r.min)},x:Qi(4,13),y:Qi(5,14)},vv=function(e,t,r){var n=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),a=o.display,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),r.forEach(function(l){s[l]=eo[l](n,o)}),t.syncRender();var u=t.measureViewportBox();return r.forEach(function(l){var c=t.getValue(l);Ss(c,s[l]),e[l]=eo[l](u,o)}),e},pv=function(e,t,r,n){r===void 0&&(r={}),n===void 0&&(n={}),t=S({},t),n=S({},n);var i=Object.keys(t).filter(Ts),o=[],a=!1,s=[];if(i.forEach(function(c){var d=e.getValue(c);if(e.hasValue(c)){var h=r[c],f=Je(h),v=t[c],p;if(gt(v)){var g=v.length,y=v[0]===null?1:0;h=v[y],f=Je(h);for(var b=y;b<g;b++)p?Gt(Je(v[b])===p):p=Je(v[b])}else p=Je(v);if(f!==p)if(Ki(f)&&Ki(p)){var T=d.get();typeof T=="string"&&d.set(parseFloat(T)),typeof v=="string"?t[c]=parseFloat(v):Array.isArray(v)&&p===C&&(t[c]=v.map(parseFloat))}else f!=null&&f.transform&&(p!=null&&p.transform)&&(h===0||v===0)?h===0?d.set(p.transform(h)):t[c]=f.transform(v):(a||(o=hv(e),a=!0),s.push(c),n[c]=n[c]!==void 0?n[c]:t[c],Ss(d,v))}}),s.length){var u=s.indexOf("height")>=0?window.pageYOffset:null,l=vv(t,e,s);return o.length&&o.forEach(function(c){var d=j(c,2),h=d[0],f=d[1];e.getValue(h).set(f)}),e.syncRender(),u!==null&&window.scrollTo({top:u}),{target:l,transitionEnd:n}}else return{target:t,transitionEnd:n}};function gv(e,t,r,n){return cv(t)?pv(e,t,r,n):{target:t,transitionEnd:n}}var mv=function(e,t,r,n){var i=uv(e,t,n);return t=i.target,n=i.transitionEnd,gv(e,t,r,n)};function yv(e){return window.getComputedStyle(e)}var Ds={treeType:"dom",readValueFromInstance:function(e,t){if(bt(t)){var r=jn(t);return r&&r.default||0}else{var n=yv(e);return(fa(t)?n.getPropertyValue(t):n[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var r;return(r=e.style)===null||r===void 0?void 0:r[t]},measureViewportBox:function(e,t){var r=t.transformPagePoint;return gs(e,r)},resetTransform:function(e,t,r){var n=r.transformTemplate;t.style.transform=n?n({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var r=t.vars,n=t.style;delete r[e],delete n[e]},makeTargetAnimatable:function(e,t,r,n){var i=r.transformValues;n===void 0&&(n=!0);var o=t.transition,a=t.transitionEnd,s=ee(t,["transition","transitionEnd"]),u=Oh(s,o||{},e);if(i&&(a&&(a=i(a)),s&&(s=i(s)),u&&(u=i(u))),n){wh(e,s,u);var l=mv(e,s,u,a);a=l.transitionEnd,s=l.target}return S({transition:o,transitionEnd:a},s)},scrapeMotionValuesFromProps:Rn,build:function(e,t,r,n,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),Pn(t,r,n,i.transformTemplate)},render:Oa},bv=ms(Ds),Tv=ms(S(S({},Ds),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var r;return bt(t)?((r=jn(t))===null||r===void 0?void 0:r.default)||0:(t=Ca.has(t)?t:Ea(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Pa,build:function(e,t,r,n,i){Mn(t,r,n,i.transformTemplate)},render:xa})),Sv=function(e,t){return Cn(e)?Tv(t,{enableHardwareAcceleration:!1}):bv(t,{enableHardwareAcceleration:!0})};function to(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Qe={correct:function(e,t){if(!t.target)return e;if(typeof e=="string")if(C.test(e))e=parseFloat(e);else return e;var r=to(e,t.target.x),n=to(e,t.target.y);return"".concat(r,"% ").concat(n,"%")}},ro="_$css",Dv={correct:function(e,t){var r=t.treeScale,n=t.projectionDelta,i=e,o=e.includes("var("),a=[];o&&(e=e.replace(bs,function(p){return a.push(p),ro}));var s=ve.parse(e);if(s.length>5)return i;var u=ve.createTransformer(e),l=typeof s[0]!="number"?1:0,c=n.x.scale*r.x,d=n.y.scale*r.y;s[0+l]/=c,s[1+l]/=d;var h=F(c,d,.5);typeof s[2+l]=="number"&&(s[2+l]/=h),typeof s[3+l]=="number"&&(s[3+l]/=h);var f=u(s);if(o){var v=0;f=f.replace(ro,function(){var p=a[v];return v++,p})}return f}},wv=function(e){Io(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var r=this,n=this.props,i=n.visualElement,o=n.layoutGroup,a=n.switchLayoutGroup,s=n.layoutId,u=i.projection;Wc(Ov),u&&(o!=null&&o.group&&o.group.add(u),a!=null&&a.register&&s&&a.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",function(){r.safeToRemove()}),u.setOptions(S(S({},u.options),{onExitComplete:function(){return r.safeToRemove()}}))),it.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(r){var n=this,i=this.props,o=i.layoutDependency,a=i.visualElement,s=i.drag,u=i.isPresent,l=a.projection;return l&&(l.isPresent=u,s||r.layoutDependency!==o||o===void 0?l.willUpdate():this.safeToRemove(),r.isPresent!==u&&(u?l.promote():l.relegate()||ce.postRender(function(){var c;!((c=l.getStack())===null||c===void 0)&&c.members.length||n.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var r=this.props.visualElement.projection;r&&(r.root.didUpdate(),!r.currentAnimation&&r.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var r=this.props,n=r.visualElement,i=r.layoutGroup,o=r.switchLayoutGroup,a=n.projection;a&&(a.scheduleCheckAfterUnmount(),i!=null&&i.group&&i.group.remove(a),o!=null&&o.deregister&&o.deregister(a))},t.prototype.safeToRemove=function(){var r=this.props.safeToRemove;r==null||r()},t.prototype.render=function(){return null},t}(N.Component);function Ev(e){var t=j(as(),2),r=t[0],n=t[1],i=m.useContext(ua);return N.createElement(wv,S({},e,{layoutGroup:i,switchLayoutGroup:m.useContext(la),isPresent:r,safeToRemove:n}))}var Ov={borderRadius:S(S({},Qe),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Qe,borderTopRightRadius:Qe,borderBottomLeftRadius:Qe,borderBottomRightRadius:Qe,boxShadow:Dv},Cv={measureLayout:Ev};function xv(e,t,r){r===void 0&&(r={});var n=he(e)?e:Ye(e);return Un("",n,t,r),{stop:function(){return n.stop()},isAnimating:function(){return n.isAnimating()}}}var ws=["TopLeft","TopRight","BottomLeft","BottomRight"],Pv=ws.length,no=function(e){return typeof e=="string"?parseFloat(e):e},io=function(e){return typeof e=="number"||C.test(e)};function Iv(e,t,r,n,i,o){var a,s,u,l;i?(e.opacity=F(0,(a=r.opacity)!==null&&a!==void 0?a:1,Mv(n)),e.opacityExit=F((s=t.opacity)!==null&&s!==void 0?s:1,0,Rv(n))):o&&(e.opacity=F((u=t.opacity)!==null&&u!==void 0?u:1,(l=r.opacity)!==null&&l!==void 0?l:1,n));for(var c=0;c<Pv;c++){var d="border".concat(ws[c],"Radius"),h=oo(t,d),f=oo(r,d);if(!(h===void 0&&f===void 0)){h||(h=0),f||(f=0);var v=h===0||f===0||io(h)===io(f);v?(e[d]=Math.max(F(no(h),no(f),n),0),(le.test(f)||le.test(h))&&(e[d]+="%")):e[d]=f}}(t.rotate||r.rotate)&&(e.rotate=F(t.rotate||0,r.rotate||0,n))}function oo(e,t){var r;return(r=e[t])!==null&&r!==void 0?r:e.borderRadius}var Mv=Es(0,.5,Bn),Rv=Es(.5,.95,_n);function Es(e,t,r){return function(n){return n<e?0:n>t?1:r(mt(e,t,n))}}function ao(e,t){e.min=t.min,e.max=t.max}function re(e,t){ao(e.x,t.x),ao(e.y,t.y)}function so(e,t,r,n,i){return e-=t,e=rr(e,1/r,n),i!==void 0&&(e=rr(e,1/i,n)),e}function Av(e,t,r,n,i,o,a){if(t===void 0&&(t=0),r===void 0&&(r=1),n===void 0&&(n=.5),o===void 0&&(o=e),a===void 0&&(a=e),le.test(t)){t=parseFloat(t);var s=F(a.min,a.max,t/100);t=s-a.min}if(typeof t=="number"){var u=F(o.min,o.max,n);e===o&&(u-=t),e.min=so(e.min,t,r,u,i),e.max=so(e.max,t,r,u,i)}}function uo(e,t,r,n,i){var o=j(r,3),a=o[0],s=o[1],u=o[2];Av(e,t[a],t[s],t[u],t.scale,n,i)}var Lv=["x","scaleX","originX"],Vv=["y","scaleY","originY"];function lo(e,t,r,n){uo(e.x,t,Lv,r==null?void 0:r.x,n==null?void 0:n.x),uo(e.y,t,Vv,r==null?void 0:r.y,n==null?void 0:n.y)}function co(e){return e.translate===0&&e.scale===1}function Os(e){return co(e.x)&&co(e.y)}function Cs(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var Nv=function(){function e(){this.members=[]}return e.prototype.add=function(t){$n(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(qn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var r=this.members[this.members.length-1];r&&this.promote(r)}},e.prototype.relegate=function(t){var r=this.members.findIndex(function(a){return t===a});if(r===0)return!1;for(var n,i=r;i>=0;i--){var o=this.members[i];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1},e.prototype.promote=function(t,r){var n,i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,r&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((n=t.root)===null||n===void 0)&&n.isUpdating&&(t.isLayoutDirty=!0);var o=t.options.crossfade;o===!1&&i.hide()}},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(t){var r,n,i,o,a;(n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})},e.prototype.scheduleRender=function(){this.members.forEach(function(t){t.instance&&t.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),_v="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function fo(e,t,r){var n=e.x.translate/t.x,i=e.y.translate/t.y,o="translate3d(".concat(n,"px, ").concat(i,"px, 0) ");if(o+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),r){var a=r.rotate,s=r.rotateX,u=r.rotateY;a&&(o+="rotate(".concat(a,"deg) ")),s&&(o+="rotateX(".concat(s,"deg) ")),u&&(o+="rotateY(".concat(u,"deg) "))}var l=e.x.scale*t.x,c=e.y.scale*t.y;return o+="scale(".concat(l,", ").concat(c,")"),o===_v?"none":o}var Fv=function(e,t){return e.depth-t.depth},Bv=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){$n(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){qn(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(Fv),this.isDirty=!1,this.children.forEach(t)},e}(),ho=1e3;function xs(e){var t=e.attachResizeListener,r=e.defaultParent,n=e.measureScroll,i=e.checkIsScrollRoot,o=e.resetTransform;return function(){function a(s,u,l){var c=this;u===void 0&&(u={}),l===void 0&&(l=r==null?void 0:r()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){c.isUpdating&&(c.isUpdating=!1,c.clearAllSnapshots())},this.updateProjection=function(){c.nodes.forEach($v),c.nodes.forEach(qv)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=s,this.latestValues=u,this.root=l?l.root||l:this,this.path=l?ue(ue([],j(l.path),!1),[l],!1):[],this.parent=l,this.depth=l?l.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(var d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new Bv)}return a.prototype.addEventListener=function(s,u){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new st),this.eventHandlers.get(s).add(u)},a.prototype.notifyListeners=function(s){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var c=this.eventHandlers.get(s);c==null||c.notify.apply(c,ue([],j(u),!1))},a.prototype.hasListeners=function(s){return this.eventHandlers.has(s)},a.prototype.registerPotentialNode=function(s,u){this.potentialNodes.set(s,u)},a.prototype.mount=function(s,u){var l=this,c;if(u===void 0&&(u=!1),!this.instance){this.isSVG=s instanceof SVGElement&&s.tagName!=="svg",this.instance=s;var d=this.options,h=d.layoutId,f=d.layout,v=d.visualElement;if(v&&!v.getInstance()&&v.mount(s),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),u&&(f||h)&&(this.isLayoutDirty=!0),t){var p,g=function(){return l.root.updateBlockedByResize=!1};t(s,function(){l.root.updateBlockedByResize=!0,clearTimeout(p),p=window.setTimeout(g,250),it.hasAnimatedSinceResize&&(it.hasAnimatedSinceResize=!1,l.nodes.forEach(Uv))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&v&&(h||f)&&this.addEventListener("didUpdate",function(y){var b,T,D,w,x,R=y.delta,A=y.hasLayoutChanged,P=y.hasRelativeTargetChanged,V=y.layout;if(l.isTreeAnimationBlocked()){l.target=void 0,l.relativeTarget=void 0;return}var B=(T=(b=l.options.transition)!==null&&b!==void 0?b:v.getDefaultTransition())!==null&&T!==void 0?T:Kv,H=v.getProps(),G=H.onLayoutAnimationStart,Y=H.onLayoutAnimationComplete,te=!l.targetLayout||!Cs(l.targetLayout,V)||P,me=!A&&P;if(!((D=l.resumeFrom)===null||D===void 0)&&D.instance||me||A&&(te||!l.currentAnimation)){l.resumeFrom&&(l.resumingFrom=l.resumeFrom,l.resumingFrom.resumingFrom=void 0),l.setAnimationOrigin(R,me);var X=S(S({},zn(B,"layout")),{onPlay:G,onComplete:Y});v.shouldReduceMotion&&(X.delay=0,X.type=!1),l.startAnimation(X)}else!A&&l.animationProgress===0&&l.finishAnimation(),l.isLead()&&((x=(w=l.options).onExitComplete)===null||x===void 0||x.call(w));l.targetLayout=V})}},a.prototype.unmount=function(){var s,u;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(s=this.getStack())===null||s===void 0||s.remove(this),(u=this.parent)===null||u===void 0||u.children.delete(this),this.instance=void 0,Ge.preRender(this.updateProjection)},a.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},a.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},a.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},a.prototype.isTreeAnimationBlocked=function(){var s;return this.isAnimationBlocked||((s=this.parent)===null||s===void 0?void 0:s.isTreeAnimationBlocked())||!1},a.prototype.startUpdate=function(){var s;this.isUpdateBlocked()||(this.isUpdating=!0,(s=this.nodes)===null||s===void 0||s.forEach(Wv))},a.prototype.willUpdate=function(s){var u,l,c;if(s===void 0&&(s=!0),this.root.isUpdateBlocked()){(l=(u=this.options).onExitComplete)===null||l===void 0||l.call(u);return}if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var d=0;d<this.path.length;d++){var h=this.path[d];h.shouldResetTransform=!0,h.updateScroll()}var f=this.options,v=f.layoutId,p=f.layout;if(!(v===void 0&&!p)){var g=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate;this.prevTransformTemplateValue=g==null?void 0:g(this.latestValues,""),this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}}},a.prototype.didUpdate=function(){var s=this.isUpdateBlocked();if(s){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(vo);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Zv),this.potentialNodes.clear()),this.nodes.forEach(zv),this.nodes.forEach(kv),this.nodes.forEach(jv),this.clearAllSnapshots(),Rr.update(),Rr.preRender(),Rr.render())},a.prototype.clearAllSnapshots=function(){this.nodes.forEach(Hv),this.sharedNodes.forEach(Gv)},a.prototype.scheduleUpdateProjection=function(){ce.preRender(this.updateProjection,!1,!0)},a.prototype.scheduleCheckAfterUnmount=function(){var s=this;ce.postRender(function(){s.isLayoutDirty?s.root.didUpdate():s.root.checkUpdateFailed()})},a.prototype.updateSnapshot=function(){if(!(this.snapshot||!this.instance)){var s=this.measure(),u=this.removeTransform(this.removeElementScroll(s));yo(u),this.snapshot={measured:s,layout:u,latestValues:{}}}},a.prototype.updateLayout=function(){var s;if(this.instance&&(this.updateScroll(),!(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))){if(this.resumeFrom&&!this.resumeFrom.instance)for(var u=0;u<this.path.length;u++){var l=this.path[u];l.updateScroll()}var c=this.measure();yo(c);var d=this.layout;this.layout={measured:c,actual:this.removeElementScroll(c)},this.layoutCorrected=z(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(s=this.options.visualElement)===null||s===void 0||s.notifyLayoutMeasure(this.layout.actual,d==null?void 0:d.actual)}},a.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=i(this.instance),this.scroll=n(this.instance))},a.prototype.resetTransform=function(){var s;if(o){var u=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!Os(this.projectionDelta),c=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate,d=c==null?void 0:c(this.latestValues,""),h=d!==this.prevTransformTemplateValue;u&&(l||Te(this.latestValues)||h)&&(o(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}},a.prototype.measure=function(){var s=this.options.visualElement;if(!s)return z();var u=s.measureViewportBox(),l=this.root.scroll;return l&&(Se(u.x,l.x),Se(u.y,l.y)),u},a.prototype.removeElementScroll=function(s){var u=z();re(u,s);for(var l=0;l<this.path.length;l++){var c=this.path[l],d=c.scroll,h=c.options,f=c.isScrollRoot;if(c!==this.root&&d&&h.layoutScroll){if(f){re(u,s);var v=this.root.scroll;v&&(Se(u.x,-v.x),Se(u.y,-v.y))}Se(u.x,d.x),Se(u.y,d.y)}}return u},a.prototype.applyTransform=function(s,u){u===void 0&&(u=!1);var l=z();re(l,s);for(var c=0;c<this.path.length;c++){var d=this.path[c];!u&&d.options.layoutScroll&&d.scroll&&d!==d.root&&He(l,{x:-d.scroll.x,y:-d.scroll.y}),Te(d.latestValues)&&He(l,d.latestValues)}return Te(this.latestValues)&&He(l,this.latestValues),l},a.prototype.removeTransform=function(s){var u,l=z();re(l,s);for(var c=0;c<this.path.length;c++){var d=this.path[c];if(d.instance&&Te(d.latestValues)){vs(d.latestValues)&&d.updateSnapshot();var h=z(),f=d.measure();re(h,f),lo(l,d.latestValues,(u=d.snapshot)===null||u===void 0?void 0:u.layout,h)}}return Te(this.latestValues)&&lo(l,this.latestValues),l},a.prototype.setTargetDelta=function(s){this.targetDelta=s,this.root.scheduleUpdateProjection()},a.prototype.setOptions=function(s){var u;this.options=S(S(S({},this.options),s),{crossfade:(u=s.crossfade)!==null&&u!==void 0?u:!0})},a.prototype.clearMeasurements=function(){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},a.prototype.resolveTargetDelta=function(){var s,u=this.options,l=u.layout,c=u.layoutId;!this.layout||!(l||c)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=z(),this.relativeTargetOrigin=z(),lt(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),re(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&(!((s=this.relativeParent)===null||s===void 0)&&s.target)?kh(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):re(this.target,this.layout.actual),ps(this.target,this.targetDelta)):re(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=z(),this.relativeTargetOrigin=z(),lt(this.relativeTargetOrigin,this.target,this.relativeParent.target),re(this.relativeTarget,this.relativeTargetOrigin)))))},a.prototype.getClosestProjectingParent=function(){if(!(!this.parent||Te(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},a.prototype.calcProjection=function(){var s,u=this.options,l=u.layout,c=u.layoutId;if(this.isTreeAnimating=!!(!((s=this.parent)===null||s===void 0)&&s.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!(!this.layout||!(l||c))){var d=this.getLead();re(this.layoutCorrected,this.layout.actual),Yh(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==d);var h=d.target;if(h){this.projectionDelta||(this.projectionDelta=ct(),this.projectionDeltaWithTransform=ct());var f=this.treeScale.x,v=this.treeScale.y,p=this.projectionTransform;ut(this.projectionDelta,this.layoutCorrected,h,this.latestValues),this.projectionTransform=fo(this.projectionDelta,this.treeScale),(this.projectionTransform!==p||this.treeScale.x!==f||this.treeScale.y!==v)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}}},a.prototype.hide=function(){this.isVisible=!1},a.prototype.show=function(){this.isVisible=!0},a.prototype.scheduleRender=function(s){var u,l,c;s===void 0&&(s=!0),(l=(u=this.options).scheduleRender)===null||l===void 0||l.call(u),s&&((c=this.getStack())===null||c===void 0||c.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},a.prototype.setAnimationOrigin=function(s,u){var l=this,c;u===void 0&&(u=!1);var d=this.snapshot,h=(d==null?void 0:d.latestValues)||{},f=S({},this.latestValues),v=ct();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!u;var p=z(),g=d==null?void 0:d.isShared,y=(((c=this.getStack())===null||c===void 0?void 0:c.members.length)||0)<=1,b=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Xv));this.animationProgress=0,this.mixTargetDelta=function(T){var D,w=T/1e3;po(v.x,s.x,w),po(v.y,s.y,w),l.setTargetDelta(v),l.relativeTarget&&l.relativeTargetOrigin&&l.layout&&(!((D=l.relativeParent)===null||D===void 0)&&D.layout)&&(lt(p,l.layout.actual,l.relativeParent.layout.actual),Yv(l.relativeTarget,l.relativeTargetOrigin,p,w)),g&&(l.animationValues=f,Iv(f,h,l.latestValues,w,b,y)),l.root.scheduleUpdateProjection(),l.scheduleRender(),l.animationProgress=w},this.mixTargetDelta(0)},a.prototype.startAnimation=function(s){var u=this,l,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)===null||l===void 0||l.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(Ge.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ce.update(function(){it.hasAnimatedSinceResize=!0,u.currentAnimation=xv(0,ho,S(S({},s),{onUpdate:function(d){var h;u.mixTargetDelta(d),(h=s.onUpdate)===null||h===void 0||h.call(s,d)},onComplete:function(){var d;(d=s.onComplete)===null||d===void 0||d.call(s),u.completeAnimation()}})),u.resumingFrom&&(u.resumingFrom.currentAnimation=u.currentAnimation),u.pendingAnimation=void 0})},a.prototype.completeAnimation=function(){var s;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(s=this.getStack())===null||s===void 0||s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},a.prototype.finishAnimation=function(){var s;this.currentAnimation&&((s=this.mixTargetDelta)===null||s===void 0||s.call(this,ho),this.currentAnimation.stop()),this.completeAnimation()},a.prototype.applyTransformsToTarget=function(){var s=this.getLead(),u=s.targetWithTransforms,l=s.target,c=s.layout,d=s.latestValues;!u||!l||!c||(re(u,l),He(u,d),ut(this.projectionDeltaWithTransform,this.layoutCorrected,u,d))},a.prototype.registerSharedNode=function(s,u){var l,c,d;this.sharedNodes.has(s)||this.sharedNodes.set(s,new Nv);var h=this.sharedNodes.get(s);h.add(u),u.promote({transition:(l=u.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(d=(c=u.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||d===void 0?void 0:d.call(c,u)})},a.prototype.isLead=function(){var s=this.getStack();return s?s.lead===this:!0},a.prototype.getLead=function(){var s,u=this.options.layoutId;return u?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this},a.prototype.getPrevLead=function(){var s,u=this.options.layoutId;return u?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0},a.prototype.getStack=function(){var s=this.options.layoutId;if(s)return this.root.sharedNodes.get(s)},a.prototype.promote=function(s){var u=s===void 0?{}:s,l=u.needsReset,c=u.transition,d=u.preserveFollowOpacity,h=this.getStack();h&&h.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})},a.prototype.relegate=function(){var s=this.getStack();return s?s.relegate(this):!1},a.prototype.resetRotation=function(){var s=this.options.visualElement;if(s){for(var u=!1,l={},c=0;c<Xr.length;c++){var d=Xr[c],h="rotate"+d;s.getStaticValue(h)&&(u=!0,l[h]=s.getStaticValue(h),s.setStaticValue(h,0))}if(u){s==null||s.syncRender();for(var h in l)s.setStaticValue(h,l[h]);s.scheduleRender()}}},a.prototype.getProjectionStyles=function(s){var u,l,c,d,h,f;s===void 0&&(s={});var v={};if(!this.instance||this.isSVG)return v;if(this.isVisible)v.visibility="";else return{visibility:"hidden"};var p=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Ut(s.pointerEvents)||"",v.transform=p?p(this.latestValues,""):"none",v;var g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){var y={};return this.options.layoutId&&(y.opacity=(l=this.latestValues.opacity)!==null&&l!==void 0?l:1,y.pointerEvents=Ut(s.pointerEvents)||""),this.hasProjected&&!Te(this.latestValues)&&(y.transform=p?p({},""):"none",this.hasProjected=!1),y}var b=g.animationValues||g.latestValues;this.applyTransformsToTarget(),v.transform=fo(this.projectionDeltaWithTransform,this.treeScale,b),p&&(v.transform=p(b,v.transform));var T=this.projectionDelta,D=T.x,w=T.y;v.transformOrigin="".concat(D.origin*100,"% ").concat(w.origin*100,"% 0"),g.animationValues?v.opacity=g===this?(d=(c=b.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:v.opacity=g===this?(h=b.opacity)!==null&&h!==void 0?h:"":(f=b.opacityExit)!==null&&f!==void 0?f:0;for(var x in Yt)if(b[x]!==void 0){var R=Yt[x],A=R.correct,P=R.applyTo,V=A(b[x],g);if(P)for(var B=P.length,H=0;H<B;H++)v[P[H]]=V;else v[x]=V}return this.options.layoutId&&(v.pointerEvents=g===this?Ut(s.pointerEvents)||"":"none"),v},a.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},a.prototype.resetTree=function(){this.root.nodes.forEach(function(s){var u;return(u=s.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(vo),this.root.sharedNodes.clear()},a}()}function kv(e){e.updateLayout()}function jv(e){var t,r,n,i,o=(r=(t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)!==null&&r!==void 0?r:e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){var a=e.layout,s=a.actual,u=a.measured;e.options.animationType==="size"?se(function(b){var T=o.isShared?o.measured[b]:o.layout[b],D=pe(T);T.min=s[b].min,T.max=T.min+D}):e.options.animationType==="position"&&se(function(b){var T=o.isShared?o.measured[b]:o.layout[b],D=pe(s[b]);T.max=T.min+D});var l=ct();ut(l,s,o.layout);var c=ct();o.isShared?ut(c,e.applyTransform(u,!0),o.measured):ut(c,s,o.layout);var d=!Os(l),h=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){var f=e.relativeParent,v=f.snapshot,p=f.layout;if(v&&p){var g=z();lt(g,o.layout,v.layout);var y=z();lt(y,s,p.actual),Cs(g,y)||(h=!0)}}e.notifyListeners("didUpdate",{layout:s,snapshot:o,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeTargetChanged:h})}else e.isLead()&&((i=(n=e.options).onExitComplete)===null||i===void 0||i.call(n));e.options.transition=void 0}function Hv(e){e.clearSnapshot()}function vo(e){e.clearMeasurements()}function zv(e){var t=e.options.visualElement;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function Uv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function $v(e){e.resolveTargetDelta()}function qv(e){e.calcProjection()}function Wv(e){e.resetRotation()}function Gv(e){e.removeLeadSnapshot()}function po(e,t,r){e.translate=F(t.translate,0,r),e.scale=F(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function go(e,t,r,n){e.min=F(t.min,r.min,n),e.max=F(t.max,r.max,n)}function Yv(e,t,r,n){go(e.x,t.x,r.x,n),go(e.y,t.y,r.y,n)}function Xv(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Kv={duration:.45,ease:[.4,0,.1,1]};function Zv(e,t){for(var r=e.root,n=e.path.length-1;n>=0;n--)if(e.path[n].instance){r=e.path[n];break}var i=r&&r!==e.root?r.instance:document,o=i.querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function mo(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function yo(e){mo(e.x),mo(e.y)}var Jv=xs({attachResizeListener:function(e,t){return vr(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Fr={current:void 0},Qv=xs({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!Fr.current){var e=new Jv(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Fr.current=e}return Fr.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),ep=S(S(S(S({},_h),Qf),nv),Cv),tp=$c(function(e,t){return Md(e,t,ep,Sv,Qv)});function fn(e,t,r){var n,i,o,a,s;t==null&&(t=100);function u(){var c=Date.now()-a;c<t&&c>=0?n=setTimeout(u,t-c):(n=null,r||(s=e.apply(o,i),o=i=null))}var l=function(){o=this,i=arguments,a=Date.now();var c=r&&!n;return n||(n=setTimeout(u,t)),c&&(s=e.apply(o,i),o=i=null),s};return l.clear=function(){n&&(clearTimeout(n),n=null)},l.flush=function(){n&&(s=e.apply(o,i),o=i=null,clearTimeout(n),n=null)},l}fn.debounce=fn;var rp=fn;const bo=js(rp);function np(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:i}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const o=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)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[a,s]=m.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),u=m.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),l=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,d=m.useRef(!1);m.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[h,f,v]=m.useMemo(()=>{const b=()=>{if(!u.current.element)return;const{left:T,top:D,width:w,height:x,bottom:R,right:A,x:P,y:V}=u.current.element.getBoundingClientRect(),B={left:T,top:D,width:w,height:x,bottom:R,right:A,x:P,y:V};u.current.element instanceof HTMLElement&&i&&(B.height=u.current.element.offsetHeight,B.width=u.current.element.offsetWidth),Object.freeze(B),d.current&&!sp(u.current.lastBounds,B)&&s(u.current.lastBounds=B)};return[b,c?bo(b,c):b,l?bo(b,l):b]},[s,i,l,c]);function p(){u.current.scrollContainers&&(u.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",v,!0)),u.current.scrollContainers=null),u.current.resizeObserver&&(u.current.resizeObserver.disconnect(),u.current.resizeObserver=null)}function g(){u.current.element&&(u.current.resizeObserver=new o(v),u.current.resizeObserver.observe(u.current.element),r&&u.current.scrollContainers&&u.current.scrollContainers.forEach(b=>b.addEventListener("scroll",v,{capture:!0,passive:!0})))}const y=b=>{!b||b===u.current.element||(p(),u.current.element=b,u.current.scrollContainers=Ps(b),g())};return op(v,!!r),ip(f),m.useEffect(()=>{p(),g()},[r,v,f]),m.useEffect(()=>p,[]),[y,a,h]}function ip(e){m.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function op(e,t){m.useEffect(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Ps(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(e);return[r,n,i].some(o=>o==="auto"||o==="scroll")&&t.push(e),[...t,...Ps(e.parentElement)]}const ap=["x","y","top","bottom","left","right","width","height"],sp=(e,t)=>ap.every(r=>e[r]===t[r]);function Br(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function up(e,t,r){lp(e,t),t.set(e,r)}function lp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ft(e,t){var r=Is(e,t,"get");return cp(e,r)}function cp(e,t){return t.get?t.get.call(e):t.value}function dp(e,t,r){var n=Is(e,t,"set");return fp(e,n,r),r}function Is(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function fp(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}var Be=new WeakMap;class hp{constructor(){up(this,Be,{writable:!0,value:void 0}),Br(this,"register",t=>{Ft(this,Be).push(t)}),Br(this,"unregister",t=>{let r;for(;(r=Ft(this,Be).indexOf(t))!==-1;)Ft(this,Be).splice(r,1)}),Br(this,"backendChanged",t=>{for(const r of Ft(this,Be))r.backendChanged(t)}),dp(this,Be,[])}}function ne(e,t,r){vp(e,t),t.set(e,r)}function vp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M(e,t){var r=Ms(e,t,"get");return pp(e,r)}function pp(e,t){return t.get?t.get.call(e):t.value}function ke(e,t,r){var n=Ms(e,t,"set");return gp(e,n,r),r}function Ms(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function gp(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}var K=new WeakMap,Bt=new WeakMap,Z=new WeakMap,ye=new WeakMap,Ie=new WeakMap,To=new WeakMap,So=new WeakMap,Do=new WeakMap,kr=new WeakMap,jr=new WeakMap,kt=new WeakMap;class We{constructor(t,r,n){if(ne(this,K,{writable:!0,value:void 0}),ne(this,Bt,{writable:!0,value:void 0}),ne(this,Z,{writable:!0,value:void 0}),ne(this,ye,{writable:!0,value:void 0}),ne(this,Ie,{writable:!0,value:void 0}),ne(this,To,{writable:!0,value:(i,o,a)=>{var s,u;if(!a.backend)throw new Error("You must specify a 'backend' property in your Backend entry: ".concat(JSON.stringify(a)));const l=a.backend(i,o,a.options);let c=a.id;const d=!a.id&&l&&l.constructor;if(d&&(c=l.constructor.name),c)d&&console.warn(`Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.
3
+ This might be unsupported in the future, please specify 'id' explicitely for every backend.`);else throw new Error("You must specify an 'id' property in your Backend entry: ".concat(JSON.stringify(a),`
4
+ see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx`));if(M(this,Z)[c])throw new Error(`You must specify a unique 'id' property in your Backend entry:
5
+ `.concat(JSON.stringify(a)," (conflicts with: ").concat(JSON.stringify(M(this,Z)[c]),")"));return{id:c,instance:l,preview:(s=a.preview)!==null&&s!==void 0?s:!1,transition:a.transition,skipDispatchOnTransition:(u=a.skipDispatchOnTransition)!==null&&u!==void 0?u:!1}}}),ae(this,"setup",()=>{if(!(typeof window>"u")){if(We.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");We.isSetUp=!0,M(this,So).call(this,window),M(this,Z)[M(this,K)].instance.setup()}}),ae(this,"teardown",()=>{typeof window>"u"||(We.isSetUp=!1,M(this,Do).call(this,window),M(this,Z)[M(this,K)].instance.teardown())}),ae(this,"connectDragSource",(i,o,a)=>M(this,kt).call(this,"connectDragSource",i,o,a)),ae(this,"connectDragPreview",(i,o,a)=>M(this,kt).call(this,"connectDragPreview",i,o,a)),ae(this,"connectDropTarget",(i,o,a)=>M(this,kt).call(this,"connectDropTarget",i,o,a)),ae(this,"profile",()=>M(this,Z)[M(this,K)].instance.profile()),ae(this,"previewEnabled",()=>M(this,Z)[M(this,K)].preview),ae(this,"previewsList",()=>M(this,Bt)),ae(this,"backendsList",()=>M(this,ye)),ne(this,So,{writable:!0,value:i=>{M(this,ye).forEach(o=>{o.transition&&i.addEventListener(o.transition.event,M(this,kr))})}}),ne(this,Do,{writable:!0,value:i=>{M(this,ye).forEach(o=>{o.transition&&i.removeEventListener(o.transition.event,M(this,kr))})}}),ne(this,kr,{writable:!0,value:i=>{const o=M(this,K);if(M(this,ye).some(s=>s.id!==M(this,K)&&s.transition&&s.transition.check(i)?(ke(this,K,s.id),!0):!1),M(this,K)!==o){var a;M(this,Z)[o].instance.teardown(),Object.keys(M(this,Ie)).forEach(c=>{const d=M(this,Ie)[c];d.unsubscribe(),d.unsubscribe=M(this,jr).call(this,d.func,...d.args)}),M(this,Bt).backendChanged(this);const s=M(this,Z)[M(this,K)];if(s.instance.setup(),s.skipDispatchOnTransition)return;const u=i.constructor,l=new u(i.type,i);(a=i.target)===null||a===void 0||a.dispatchEvent(l)}}}),ne(this,jr,{writable:!0,value:(i,o,a,s)=>M(this,Z)[M(this,K)].instance[i](o,a,s)}),ne(this,kt,{writable:!0,value:(i,o,a,s)=>{const u="".concat(i,"_").concat(o),l=M(this,jr).call(this,i,o,a,s);return M(this,Ie)[u]={func:i,args:[o,a,s],unsubscribe:l},()=>{M(this,Ie)[u].unsubscribe(),delete M(this,Ie)[u]}}}),!n||!n.backends||n.backends.length<1)throw new Error(`You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)
6
+ see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx`);ke(this,Bt,new hp),ke(this,Z,{}),ke(this,ye,[]),n.backends.forEach(i=>{const o=M(this,To).call(this,t,r,i);M(this,Z)[o.id]=o,M(this,ye).push(o)}),ke(this,K,M(this,ye)[0].id),ke(this,Ie,{})}}ae(We,"isSetUp",!1);const mp=(e,t,r)=>new We(e,t,r),Rs=(e,t)=>({event:e,check:t}),yp=Rs("touchstart",e=>{const t=e;return t.touches!==null&&t.touches!==void 0}),bp=Rs("pointerdown",e=>e.pointerType=="mouse");var Ee;(function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"})(Ee||(Ee={}));class Tp{get delay(){var t;return(t=this.args.delay)!==null&&t!==void 0?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return(t=this.args.ignoreContextMenu)!==null&&t!==void 0?t:!1}get enableHoverOutsideTarget(){var t;return(t=this.args.enableHoverOutsideTarget)!==null&&t!==void 0?t:!1}get enableKeyboardEvents(){var t;return(t=this.args.enableKeyboardEvents)!==null&&t!==void 0?t:!1}get enableMouseEvents(){var t;return(t=this.args.enableMouseEvents)!==null&&t!==void 0?t:!1}get enableTouchEvents(){var t;return(t=this.args.enableTouchEvents)!==null&&t!==void 0?t:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,r,n,i;return(i=(n=(t=this.args)===null||t===void 0?void 0:t.delayTouchStart)!==null&&n!==void 0?n:(r=this.args)===null||r===void 0?void 0:r.delay)!==null&&i!==void 0?i:0}get delayMouseStart(){var t,r,n,i;return(i=(n=(t=this.args)===null||t===void 0?void 0:t.delayMouseStart)!==null&&n!==void 0?n:(r=this.args)===null||r===void 0?void 0:r.delay)!==null&&i!==void 0?i:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var t;if(!((t=this.context)===null||t===void 0)&&t.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var t;return((t=this.args)===null||t===void 0?void 0:t.rootElement)||this.document}constructor(t,r){this.args=t,this.context=r}}function Sp(e,t,r,n){return Math.sqrt(Math.pow(Math.abs(r-e),2)+Math.pow(Math.abs(n-t),2))}function Dp(e,t,r,n,i){if(!i)return!1;const o=Math.atan2(n-t,r-e)*180/Math.PI+180;for(let a=0;a<i.length;++a){const s=i[a];if(s&&(s.start==null||o>=s.start)&&(s.end==null||o<=s.end))return!0}return!1}const wp={Left:1,Right:2,Center:4},Ep={Left:0,Center:1,Right:2};function Hr(e){return e.button===void 0||e.button===Ep.Left}function Op(e){return e.buttons===void 0||(e.buttons&wp.Left)===0}function As(e){return!!e.targetTouches}const Cp=1;function xp(e){const t=e.nodeType===Cp?e:e.parentElement;if(!t)return;const{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function Pp(e,t){if(e.targetTouches.length===1)return nr(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return nr(e.touches[0])}function nr(e,t){return As(e)?Pp(e,t):{x:e.clientX,y:e.clientY}}const wo=(()=>{let e=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return e=!0,!0}}))}catch{}return e})(),et={[Ee.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[Ee.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[Ee.keyboard]:{keydown:"keydown"}};class dt{profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;t&&(I(!dt.isSetUp,"Cannot have two Touch backends at the same time."),dt.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;t&&(dt.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,r,n,i=!1){const o=wo?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(a){const s=et[a][r];s&&t.addEventListener(s,n,o)})}removeEventListener(t,r,n,i=!1){const o=wo?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(a){const s=et[a][r];s&&t.removeEventListener(s,n,o)})}connectDragSource(t,r){const n=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,r),this.addEventListener(r,"start",n),()=>{this.sourceNodes.delete(t),this.removeEventListener(r,"start",n)}}connectDragPreview(t,r,n){return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,r),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,r){const n=this.options.rootElement;if(!this.document||!n)return()=>{};const i=o=>{if(!this.document||!n||!this.monitor.isDragging())return;let a;switch(o.type){case et.mouse.move:a={x:o.clientX,y:o.clientY};break;case et.touch.move:var s,u;a={x:((s=o.touches[0])===null||s===void 0?void 0:s.clientX)||0,y:((u=o.touches[0])===null||u===void 0?void 0:u.clientY)||0};break}const l=a!=null?this.document.elementFromPoint(a.x,a.y):void 0,c=l&&r.contains(l);if(l===r||c)return this.handleMove(o,t)};return this.addEventListener(this.document.body,"move",i),this.targetNodes.set(t,r),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",i))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!t||!t.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,r,n){this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&xp(o)},this.handleTopMoveStartCapture=i=>{Hr(i)&&(this.moveStartSourceIds=[])},this.handleMoveStart=i=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(i)},this.handleTopMoveStart=i=>{if(!Hr(i))return;const o=nr(i);o&&(As(i)&&(this.lastTargetTouchFallback=i.targetTouches[0]),this._mouseClientOffset=o),this.waitingForDelay=!1},this.handleTopMoveStartDelay=i=>{if(!Hr(i))return;const o=i.type===et.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,i),o),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(i,o)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(o)},this.handleTopMove=i=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:o,dragOverTargetIds:a}=this,s=this.options.enableHoverOutsideTarget,u=nr(i,this.lastTargetTouchFallback);if(!u)return;if(this._isScrolling||!this.monitor.isDragging()&&Dp(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,u.x,u.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&o&&Sp(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,u.x,u.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(o,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const l=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(l),this.actions.publishDragSource(),i.cancelable&&i.preventDefault();const c=(a||[]).map(v=>this.targetNodes.get(v)).filter(v=>!!v),d=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(u.x,u.y,c):this.document.elementsFromPoint(u.x,u.y),h=[];for(const v in d){if(!d.hasOwnProperty(v))continue;let p=d[v];for(p!=null&&h.push(p);p;)p=p.parentElement,p&&h.indexOf(p)===-1&&h.push(p)}const f=h.filter(v=>c.indexOf(v)>-1).map(v=>this._getDropTargetId(v)).filter(v=>!!v).filter((v,p,g)=>g.indexOf(v)===p);if(s)for(const v in this.targetNodes){const p=this.targetNodes.get(v);if(l&&p&&p.contains(l)&&f.indexOf(v)===-1){f.unshift(v);break}}f.reverse(),this.actions.hover(f,{clientOffset:u})},this._getDropTargetId=i=>{const o=this.targetNodes.keys();let a=o.next();for(;a.done===!1;){const s=a.value;if(i===this.targetNodes.get(s))return s;a=o.next()}},this.handleTopMoveEndCapture=i=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!Op(i)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}i.cancelable&&i.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=i=>{i.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new Tp(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Ee.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Ee.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Ee.keyboard)}}const Ip=function(t,r={},n={}){return new dt(t,r,n)};var Q=function(){return Q=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Q.apply(this,arguments)};function q(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function Mp(e){var t=e.isVisible,r=e.ease,n=r===void 0?"easeIn":r,i=e.duration,o=e.variants,a=o===void 0?{open:{opacity:1,height:"auto"},close:{opacity:0,height:0}}:o,s=e.children,u=np({polyfill:Dc}),l=u[0],c=u[1].height,d=m.useState(t),h=d[0],f=d[1],v=m.useState(t),p=v[0],g=v[1],y=m.useState(!1),b=y[0],T=y[1],D=function(){T(!1),t||f(!1)};return m.useEffect(function(){T(!0),t?f(!0):g(!1)},[t]),m.useEffect(function(){h&&g(!0)},[c]),N.createElement(tp.div,{style:b?{overflow:"hidden"}:void 0,onAnimationComplete:D,initial:p?"open":"close",animate:p?"open":"close",inherit:!1,variants:a,transition:{ease:n,duration:Rp(c,i)}},N.createElement("div",{ref:l},h&&s))}function Rp(e,t){if(t)return t;if(!e)return 0;var r=e/36;return Math.round((4+10*Math.pow(r,.25)+r/5)*10)/1500}var Ap=function(e,t){return e.text>t.text?1:e.text<t.text?-1:0},tt=function(e,t){return e.find(function(r){return r.id===t})},Ls=function(e,t,r){if(r===0)return!1;var n=e.find(function(i){return i.id===r});return n===void 0?!1:n.parent===t?!0:Ls(e,t,n.parent)},Gn=function(e){return e.id!==void 0&&e.parent!==void 0&&e.text!==void 0},Oe=function(e,t,r){var n=r.tree,i=r.rootId,o=r.canDrop;if(e===null){if(t===i)return!0;var a=n.find(function(c){return c.id===t});return!!(a&&a.droppable)}else{var s=Gn(e)?e.id:null;if(o){var u=o(s,t);if(u!==void 0)return u}if(s===t)return!1;var l=n.find(function(d){return d.id===s}),a=n.find(function(d){return d.id===t});return l===void 0||s===null?t===i||!!(a!=null&&a.droppable):a===void 0?l.parent!==0:l.parent===t||!a.droppable?!1:!Ls(n,s,t)}},Lp=function(e,t,r){return e.map(function(n){return n.id===t?Q(Q({},n),{parent:r}):n})},Vs=function(e,t,r){if(r===0)return 0;var n=e.filter(function(i){return i.parent===t});return n[r]?e.findIndex(function(i){return i.id===n[r].id}):e.findIndex(function(i){return i.id===n[r-1].id})+1},Vp=function(e,t){return e.findIndex(function(r){return r.id===t})},Ns=function(e,t,r,n){var i=Vp(e,t),o=Vs(e,r,n);return o=o>i?o-1:o,[i,o]},Np=function(e,t,r){var n=t<0?e.length+t:t;if(n>=0&&n<e.length){var i=r<0?e.length+r:r,o=e.splice(t,1)[0];e.splice(i,0,o)}},_p=function(e,t,r,n){var i=Ns(e,t,r,n),o=i[0],a=i[1],s=q([],e,!0);return Np(s,o,a),s.map(function(u){return u.id===t?Q(Q({},u),{parent:r}):u})},Fp=function(e,t){var r=e.getBoundingClientRect(),n=r.top+r.height/2;return t>n?"down":"up"},hn=function(e,t){var r="",n=0;return e.forEach(function(i,o){var a,s=Fp(i,((a=t.getClientOffset())===null||a===void 0?void 0:a.y)||0);r===""?r=s:r!==s&&(r=s,n=o),o===e.length-1&&s==="down"&&(n=o+1)}),n},Eo=function(e,t,r){var n=t.closest('[role="list"]'),i=n==null?void 0:n.querySelectorAll(':scope > [role="listitem"]');return i?hn(i,r):null},Bp=function(e,t,r){var n=e.getBoundingClientRect(),i=r.dropTargetOffset,o=n.top+i,a=n.bottom-i;return t>a?"lower":t<o?"upper":"middle"},vn=function(e,t,r,n){var i;if(!t)return null;if(e===null){var o=t.querySelectorAll(':scope > [role="listitem"]');return{id:n.rootId,index:hn(o,r)}}var a=r.getItem(),s=t.querySelector('[role="list"]'),u=Bp(t,((i=r.getClientOffset())===null||i===void 0?void 0:i.y)||0,n);if(s){if(u==="upper")if(Oe(a,e.parent,n)){var l=Eo(e,t,r);return l===null?null:{id:e.parent,index:l}}else return{id:e.id,index:0};var o=s.querySelectorAll(':scope > [role="listitem"]');return{id:e.id,index:hn(o,r)}}else{if(u==="middle")return{id:e.id,index:0};if(Oe(a,e.parent,n)){var l=Eo(e,t,r);return l===null?null:{id:e.parent,index:l}}return null}},kp=function(e){return e===void 0&&(e={}),{backends:[{id:"html5",backend:tc,options:e.html5,transition:bp},{id:"touch",backend:Ip,options:e.touch||{enableMouseEvents:!0},preview:!0,transition:yp}]}},Wt=function(e,t){return e.some(function(r){return r.parent===t})},_s=m.createContext({}),jp=function(e){var t=Xp(e.tree,e.initialOpen),r=t[0],n=t[1],i=n.handleToggle,o=n.handleCloseAll,a=n.handleOpenAll,s=n.handleOpen,u=n.handleClose;m.useImperativeHandle(e.treeRef,function(){return{open:function(f){return s(f,e.onChangeOpen)},close:function(f){return u(f,e.onChangeOpen)},openAll:function(){return a(e.onChangeOpen)},closeAll:function(){return o(e.onChangeOpen)}}});var l=ge().getMonitor(),c=e.canDrop,d=e.canDrag,h=Q(Q({extraAcceptTypes:[],listComponent:"ul",listItemComponent:"li",placeholderComponent:"li",sort:!0,insertDroppableFirst:!0,enableAnimateExpand:!1,dropTargetOffset:0,initialOpen:!1},e),{openIds:r,onDrop:function(f,v,p){if(f){var g={dragSourceId:f.id,dropTargetId:v,dragSource:f,dropTarget:tt(e.tree,v),monitor:l},y=e.tree;if(tt(y,f.id)||(y=q(q([],y,!0),[f],!1)),e.sort===!1){var b=Ns(y,f.id,v,p),T=b[1];g.destinationIndex=T,g.relativeIndex=p,e.onDrop(_p(y,f.id,v,p),g);return}e.onDrop(Lp(y,f.id,v),g)}else{var g={dropTargetId:v,dropTarget:tt(e.tree,v),monitor:l};e.sort===!1&&(g.destinationIndex=Vs(e.tree,v,p),g.relativeIndex=p),e.onDrop(e.tree,g)}},canDrop:c?function(f,v){return c(e.tree,{dragSourceId:f??void 0,dropTargetId:v,dragSource:l.getItem(),dropTarget:tt(e.tree,v),monitor:l})}:void 0,canDrag:d?function(f){return d(tt(e.tree,f))}:void 0,onToggle:function(f){return i(f,e.onChangeOpen)}});return N.createElement(_s.Provider,{value:h},e.children)},Fs=m.createContext({}),Hp={isLock:!1},zp=function(e){var t=m.useState(Hp.isLock),r=t[0],n=t[1];return N.createElement(Fs.Provider,{value:{isLock:r,lock:function(){return n(!0)},unlock:function(){return n(!1)}}},e.children)},wt=m.createContext({}),jt={dropTargetId:void 0,index:void 0},Up=function(e){var t=m.useState(jt.dropTargetId),r=t[0],n=t[1],i=m.useState(jt.index),o=i[0],a=i[1],s=function(l,c){n(l),a(c)},u=function(){n(jt.dropTargetId),a(jt.index)};return N.createElement(wt.Provider,{value:{dropTargetId:r,index:o,showPlaceholder:s,hidePlaceholder:u}},e.children)},$p=function(e){return N.createElement(jp,Q({},e),N.createElement(zp,null,N.createElement(Up,null,e.children)))},qp=function(e){var t=m.useContext(Fs);m.useEffect(function(){if(e.current){var r=e.current,n=function(c){var d=c.target;(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)&&t.lock()},i=function(c){var d=c.target;(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)&&t.unlock()},o=function(c){return n(c)},a=function(c){return i(c)},s=function(c){return n(c)},u=function(c){return i(c)},l=new MutationObserver(function(){document.activeElement===document.body&&t.unlock()});return l.observe(r,{subtree:!0,childList:!0}),r.addEventListener("mouseover",o),r.addEventListener("mouseout",a),r.addEventListener("focusin",s),r.addEventListener("focusout",u),function(){l.disconnect(),r.removeEventListener("mouseover",o),r.removeEventListener("mouseout",a),r.removeEventListener("focusin",s),r.removeEventListener("focusout",u)}}},[e,t]),m.useEffect(function(){var r;(r=e.current)===null||r===void 0||r.setAttribute("draggable",t.isLock?"false":"true")},[e,t.isLock])},yr={TREE_ITEM:Symbol()},Bs=null,ks=function(e){var t=e.target;if(t instanceof HTMLElement){var r=t.closest('[role="listitem"]');e.currentTarget===r&&(Bs=r)}},Oo=function(e){return ks(e)},Co=function(e){return ks(e)},Wp=function(e,t){var r=Ce();m.useEffect(function(){var s=t.current;return s==null||s.addEventListener("dragstart",Oo),s==null||s.addEventListener("touchstart",Co,{passive:!0}),function(){s==null||s.removeEventListener("dragstart",Oo),s==null||s.removeEventListener("touchstart",Co)}},[t]);var n=Al({type:yr.TREE_ITEM,item:function(s){var u=Q({ref:t},e);return r.onDragStart&&r.onDragStart(u,s),u},end:function(s,u){var l=s;r.onDragEnd&&r.onDragEnd(l,u)},canDrag:function(){var s=r.canDrag;return Bs!==t.current?!1:s?s(e.id):!0},collect:function(s){return{isDragging:s.isDragging()}}}),i=n[0].isDragging,o=n[1],a=n[2];return[i,o,a]},Gp=function(e){var t=Ce(),r=m.useContext(wt),n=Ho({accept:q([yr.TREE_ITEM],t.extraAcceptTypes,!0),drop:function(u,l){var c=t.rootId,d=t.onDrop,h=r.dropTargetId,f=r.index;l.isOver({shallow:!0})&&h!==void 0&&f!==void 0&&d(Gn(u)?u:null,c,f),r.hidePlaceholder()},canDrop:function(u,l){var c=t.rootId;return l.isOver({shallow:!0})?u===void 0?!1:Oe(u,c,t):!1},hover:function(u,l){if(l.isOver({shallow:!0})){var c=t.rootId,d=r.dropTargetId,h=r.index,f=r.showPlaceholder,v=r.hidePlaceholder,p=vn(null,e.current,l,t);if(p===null||!Oe(u,c,t)){v();return}(p.id!==d||p.index!==h)&&f(p.id,p.index)}},collect:function(u){var l=u.getItem();return{isOver:u.isOver({shallow:!0})&&u.canDrop(),dragSource:l}}}),i=n[0],o=i.isOver,a=i.dragSource,s=n[1];return[o,a,s]},Yp=function(e,t){var r=Ce(),n=m.useContext(wt),i=Ho({accept:q([yr.TREE_ITEM],r.extraAcceptTypes,!0),drop:function(l,c){var d=n.dropTargetId,h=n.index;c.isOver({shallow:!0})&&d!==void 0&&h!==void 0&&r.onDrop(Gn(l)?l:null,d,h),n.hidePlaceholder()},canDrop:function(l,c){if(c.isOver({shallow:!0})){var d=vn(e,t.current,c,r);return d===null?!1:Oe(l,d.id,r)}return!1},hover:function(l,c){if(c.isOver({shallow:!0})){var d=n.dropTargetId,h=n.index,f=n.showPlaceholder,v=n.hidePlaceholder,p=vn(e,t.current,c,r);if(p===null||!Oe(l,p.id,r)){v();return}(p.id!==d||p.index!==h)&&f(p.id,p.index)}},collect:function(l){var c=l.getItem();return{isOver:l.isOver({shallow:!0})&&l.canDrop(),dragSource:c}}}),o=i[0],a=o.isOver,s=o.dragSource,u=i[1];return[a,s,u]},Xp=function(e,t){var r=m.useMemo(function(){return t===!0?e.filter(function(d){return Wt(e,d.id)}).map(function(d){return d.id}):Array.isArray(t)?t:[]},[t]),n=m.useState(r),i=n[0],o=n[1];m.useEffect(function(){return o(r)},[t]);var a=function(d,h){var f=i.includes(d)?i.filter(function(v){return v!==d}):q(q([],i,!0),[d],!1);o(f),h&&h(f)},s=function(d){o([]),d&&d([])},u=function(d){var h=e.filter(function(f){return Wt(e,f.id)}).map(function(f){return f.id});o(h),d&&d(h)},l=function(d,h){var f=[];if(Array.isArray(d)){var v=e.filter(function(p){return d.includes(p.id)&&Wt(e,p.id)});f=q(q([],i,!0),v.map(function(p){return p.id}),!0).filter(function(p,g,y){return y.indexOf(p)===g})}else f=i.includes(d)?i:q(q([],i,!0),[d],!1);o(f),h&&h(f)},c=function(d,h){var f=i.filter(function(v){return Array.isArray(d)?!d.includes(v):v!==d});o(f),h&&h(f)};return[i,{handleToggle:a,handleCloseAll:s,handleOpenAll:u,handleOpen:l,handleClose:c}]},Kp=function(){return Ll(function(e){var t=e.getItemType();return{item:e.getItem(),clientOffset:e.getClientOffset(),isDragging:e.isDragging()&&t===yr.TREE_ITEM}})},Ce=function(){var e=m.useContext(_s);if(!e)throw new Error("useTreeContext must be used under TreeProvider");return e},Zp=function(e,t){var r=Ce(),n=r.rootId,i=r.rootProps,o=r.classes,a=(o==null?void 0:o.container)||"";return t&&(o!=null&&o.dropTarget)&&(a="".concat(a," ").concat(o.dropTarget)),e===n&&(o!=null&&o.root)&&(a="".concat(a," ").concat(o.root)),e===n&&(i!=null&&i.className)&&(a="".concat(a," ").concat(i.className)),a=a.trim(),a},Jp=function(e,t,r){t.current?r(t):r(e),m.useEffect(function(){t.current?r(t):r(e)},[t.current])},Qp=function(e){var t=Ce(),r=m.useContext(wt),n=m.useRef(null),i=m.useRef(null),o=t.tree.find(function(A){return A.id===e.id}),a=t.openIds,s=t.classes,u=t.enableAnimateExpand,l=a.includes(e.id),c=Wp(o,n),d=c[0],h=c[1],f=c[2],v=Yp(o,n),p=v[0],g=v[1],y=v[2];Jp(n,i,h),Oe(g,e.id,t)&&y(n),m.useEffect(function(){t.dragPreviewRender?f(ec(),{captureDraggingState:!0}):i.current&&f(n)},[f,t.dragPreviewRender]),qp(n);var b=function(){return t.onToggle(o.id)},T=t.listItemComponent,D=(s==null?void 0:s.listItem)||"";p&&(s!=null&&s.dropTarget)&&(D="".concat(D," ").concat(s.dropTarget)),d&&(s!=null&&s.draggingSource)&&(D="".concat(D," ").concat(s.draggingSource));var w=t.canDrag?t.canDrag(e.id):!0,x=r.dropTargetId===e.id,R={depth:e.depth,isOpen:l,isDragging:d,isDropTarget:x,draggable:w,hasChild:Wt(t.tree,e.id),containerRef:n,handleRef:i,onToggle:b};return N.createElement(T,{ref:n,className:D,role:"listitem"},t.render(o,R),u&&R.hasChild&&N.createElement(Mp,{isVisible:l},N.createElement(pn,{parentId:e.id,depth:e.depth+1})),!u&&R.hasChild&&l&&N.createElement(pn,{parentId:e.id,depth:e.depth+1}))},xo=function(e){var t=Ce(),r=t.placeholderRender,n=t.placeholderComponent,i=t.classes,o=m.useContext(wt),a=ge(),s=a.getMonitor(),u=s.getItem();if(!r||!u)return null;var l=e.dropTargetId===o.dropTargetId&&(e.index===o.index||e.index===void 0&&e.listCount===o.index);return l?N.createElement(n,{className:(i==null?void 0:i.placeholder)||""},r(u,{depth:e.depth})):null},pn=function(e){var t=Ce(),r=m.useRef(null),n=t.tree.filter(function(p){return p.parent===e.parentId}),i=n,o=typeof t.sort=="function"?t.sort:Ap;if(t.insertDroppableFirst){var a=n.filter(function(p){return p.droppable}),s=n.filter(function(p){return!p.droppable});t.sort===!1?i=q(q([],a,!0),s,!0):(a=a.sort(o),s=s.sort(o),i=q(q([],a,!0),s,!0))}else t.sort!==!1&&(i=n.sort(o));var u=Gp(r),l=u[0],c=u[1],d=u[2];e.parentId===t.rootId&&Oe(c,t.rootId,t)&&d(r);var h=Zp(e.parentId,l),f=t.rootProps||{},v=t.listComponent;return N.createElement(v,Q({ref:r,role:"list"},f,{className:h}),i.map(function(p,g){return N.createElement(N.Fragment,{key:p.id},N.createElement(xo,{depth:e.depth,listCount:i.length,dropTargetId:e.parentId,index:g}),N.createElement(Qp,{id:p.id,depth:e.depth}))}),N.createElement(xo,{depth:e.depth,listCount:i.length,dropTargetId:e.parentId}))},eg={height:"100%",left:0,pointerEvents:"none",position:"fixed",top:0,width:"100%",zIndex:100},tg=function(e){var t=e.clientOffset;if(!t)return{};var r=t.x,n=t.y,i="translate(".concat(r,"px, ").concat(n,"px)");return{pointerEvents:"none",transform:i}},rg=function(){var e=Ce(),t=Kp(),r=t.isDragging,n=t.clientOffset;return!r||!n?null:N.createElement("div",{style:eg},N.createElement("div",{style:tg(t)},e.dragPreviewRender&&e.dragPreviewRender(t)))};function ng(e,t){return N.createElement($p,Q({},e,{treeRef:t}),e.dragPreviewRender&&N.createElement(rg,null),N.createElement(pn,{parentId:e.rootId,depth:0}))}var ig=m.forwardRef(ng);const og="_tree_1lv9u_1",ag="_toggle_1lv9u_4",sg="_dropTarget_1lv9u_11",ug="_draggingSource_1lv9u_14",lg="_placeholderContainer_1lv9u_17",cg="_placeholder_1lv9u_17",ze={tree:og,toggle:ag,dropTarget:sg,draggingSource:ug,placeholderContainer:lg,placeholder:cg},gn=({node:e,depth:t,isOpen:r,onToggle:n,hasChild:i,draggable:o,icons:a})=>{const{id:s,data:u}=e,{active:l,testId:c,onClick:d,actions:h=[]}=u,f=v=>{v.stopPropagation(),n(s)};return k.jsx("div",{className:zs(fe.item,fe.action,l?fe.active:"",t>0?fe.indented:""),style:{marginInlineStart:t*24},"data-testid":c,onClick:v=>{d?d(v):i&&f(v)},children:k.jsxs("div",{className:fe.itemHeader,children:[i&&k.jsx("div",{className:ze.toggle,children:k.jsx(Gs,{basic:!0,colored:r?!0:Us.MUTED,small:!0,round:!0,icon:r?(a==null?void 0:a.collapse)||Tr.COLLAPSE:(a==null?void 0:a.expand)||Tr.EXPAND,onClick:f})}),o&&k.jsx("div",{className:fe.drag,children:k.jsx(Ys,{icon:Tr.DRAG})}),k.jsx($s,{item:u}),k.jsx("div",{className:fe.right,children:k.jsx("div",{className:fe.actions,children:k.jsx(Ws,{actions:h})})})]})})};try{gn.displayName="TreeItem",gn.__docgenInfo={description:"",displayName:"TreeItem",props:{node:{defaultValue:null,description:"",name:"node",required:!0,type:{name:"NodeModel<any>"}},depth:{defaultValue:null,description:"",name:"depth",required:!0,type:{name:"number"}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!0,type:{name:"boolean"}},onToggle:{defaultValue:null,description:"",name:"onToggle",required:!0,type:{name:"(id: TStringOrNumber) => void"}},hasChild:{defaultValue:null,description:"",name:"hasChild",required:!0,type:{name:"boolean"}},draggable:{defaultValue:null,description:"",name:"draggable",required:!1,type:{name:"boolean"}},icons:{defaultValue:null,description:"",name:"icons",required:!1,type:{name:"{ expand: ReactNode; collapse: ReactNode; }"}}}}}catch{}const mn=({depth:e})=>k.jsx("div",{className:ze.placeholder,style:{left:e*24}});try{mn.displayName="TreePlaceholder",mn.__docgenInfo={description:"",displayName:"TreePlaceholder",props:{depth:{defaultValue:null,description:"",name:"depth",required:!0,type:{name:"number"}}}}}catch{}const Po=({list:e,draggable:t=!1,onListReorder:r,onChangeOpen:n,testId:i,isInitialOpen:o=!1,treeRef:a,itemHasChild:s,onItemToggle:u,icons:l})=>{var f;const c=v=>{if(r){const p=v.map(({id:g,parent:y,droppable:b,data:T})=>({id:g,parent:y,droppable:b,...T}));r(p)}},d=v=>{n&&n(v)},h=(f=e==null?void 0:e.items)==null?void 0:f.map(({id:v,droppable:p,parent:g,name:y,...b})=>({id:v,text:y,droppable:p,parent:g,data:{name:y,...b}}));return k.jsxs("div",{"data-testid":i,children:[e.name&&!e.noHeader&&k.jsx(qs,{name:e.name,actions:e.actions}),k.jsx("div",{className:fe.list,children:k.jsx(dl,{backend:mp,options:kp(),context:window,children:k.jsx(ig,{ref:a,tree:h,sort:!1,insertDroppableFirst:!1,canDrag:()=>t,canDrop:(v,{dragSource:p,dropTargetId:g})=>{if((p==null?void 0:p.parent)===g)return!0},rootId:0,render:(v,{depth:p,isOpen:g,onToggle:y,hasChild:b})=>k.jsx(gn,{hasChild:s?s(v):b,node:v,depth:p,isOpen:g,onToggle:()=>{u==null||u(v,!g),y()},draggable:t,icons:l}),onDrop:c,onChangeOpen:d,dropTargetOffset:5,placeholderRender:(v,{depth:p})=>k.jsx(mn,{depth:p}),placeholderComponent:"div",listComponent:"div",listItemComponent:"div",classes:{root:ze.tree,draggingSource:ze.draggingSource,dropTarget:ze.dropTarget,placeholder:ze.placeholderContainer},initialOpen:o})})})]})};try{Po.displayName="Tree",Po.__docgenInfo={description:"",displayName:"Tree",props:{list:{defaultValue:null,description:"",name:"list",required:!0,type:{name:"ITreeListProps"}},draggable:{defaultValue:{value:"false"},description:"",name:"draggable",required:!1,type:{name:"boolean"}},onListReorder:{defaultValue:null,description:"",name:"onListReorder",required:!1,type:{name:"((newList: any[]) => void)"}},onChangeOpen:{defaultValue:null,description:"",name:"onChangeOpen",required:!1,type:{name:"((id: TStringOrNumber[]) => void)"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}},isInitialOpen:{defaultValue:{value:"false"},description:"",name:"isInitialOpen",required:!1,type:{name:"boolean | string[] | number[]"}},treeRef:{defaultValue:null,description:"",name:"treeRef",required:!1,type:{name:"RefObject<any>"}},itemHasChild:{defaultValue:null,description:"",name:"itemHasChild",required:!1,type:{name:"((node: NodeModel<any>) => boolean)"}},onItemToggle:{defaultValue:null,description:"",name:"onItemToggle",required:!1,type:{name:"((node: NodeModel<any>, isOpen: boolean) => void)"}},icons:{defaultValue:null,description:"",name:"icons",required:!1,type:{name:"{ expand: ReactNode; collapse: ReactNode; }"}}}}}catch{}export{Po as T};