summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteh_coderer <me@tehcoderer.com>2023-05-07 22:12:46 -0400
committerteh_coderer <me@tehcoderer.com>2023-05-07 22:12:46 -0400
commitbec3af63117a592f5109b69e20e44cad91440010 (patch)
tree70e3a18341299f49e2fdf99900a24302c067289f
parent9083183714ead0b3ad01ebcb93667b628679f365 (diff)
juan more
-rw-r--r--frontend-components/tables/src/components/Table/index.tsx2
-rw-r--r--openbb_terminal/core/plots/table.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/frontend-components/tables/src/components/Table/index.tsx b/frontend-components/tables/src/components/Table/index.tsx
index 44cc656f3a6..9a6006f292f 100644
--- a/frontend-components/tables/src/components/Table/index.tsx
+++ b/frontend-components/tables/src/components/Table/index.tsx
@@ -263,7 +263,7 @@ export default function Table({
includesPriceNames(indexValue)
) {
valueFormatted = Number(formatNumberNoMagnitude(value));
- const maxFixed = valueFormatted < 10 ? 4 : 2;
+ const maxFixed = valueFormatted < 2 ? 4 : 2;
valueFormatted = valueFormatted.toLocaleString("en-US", {
maximumFractionDigits: maxFixed,
minimumFractionDigits: 2,
diff --git a/openbb_terminal/core/plots/table.html b/openbb_terminal/core/plots/table.html
index 12be74ee952..9740d306e06 100644
--- a/openbb_terminal/core/plots/table.html
+++ b/openbb_terminal/core/plots/table.html
@@ -291,7 +291,7 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
`,l=s.charCodeAt(0),u=new RegExp((o=="|"?"\\|":o)+"+$"),c="",f=[];n.dense=Array.isArray(e);for(var d=n.skipHidden&&e["!cols"]||[],h=n.skipHidden&&e["!rows"]||[],m=i.s.c;m<=i.e.c;++m)(d[m]||{}).hidden||(f[m]=Ft(m));for(var p=0,g=i.s.r;g<=i.e.r;++g)(h[g]||{}).hidden||(c=GD(e,i,g,f,a,l,o,n),c!=null&&(n.strip&&(c=c.replace(u,"")),(c||n.blankrows!==!1)&&r.push((p++?s:"")+c)));return delete n.dense,r.join("")}function Mw(e,t){t||(t={}),t.FS=" ",t.RS=`
`;var r=jd(e,t);return r}function jD(e){var t="",r,n="";if(e==null||e["!ref"]==null)return[];var i=Ke(e["!ref"]),o="",a=[],s,l=[],u=Array.isArray(e);for(s=i.s.c;s<=i.e.c;++s)a[s]=Ft(s);for(var c=i.s.r;c<=i.e.r;++c)for(o=_t(c),s=i.s.c;s<=i.e.c;++s)if(t=a[s]+o,r=u?(e[c]||[])[s]:e[t],n="",r!==void 0){if(r.F!=null){if(t=r.F,!r.f)continue;n=r.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}l[l.length]=t+"="+n}return l}function Lw(e,t,r){var n=r||{},i=+!n.skipHeader,o=e||{},a=0,s=0;if(o&&n.origin!=null)if(typeof n.origin=="number")a=n.origin;else{var l=typeof n.origin=="string"?dt(n.origin):n.origin;a=l.r,s=l.c}var u,c={s:{c:0,r:0},e:{c:s,r:a+t.length-1+i}};if(o["!ref"]){var f=Ke(o["!ref"]);c.e.c=Math.max(c.e.c,f.e.c),c.e.r=Math.max(c.e.r,f.e.r),a==-1&&(a=f.e.r+1,c.e.r=a+t.length-1+i)}else a==-1&&(a=0,c.e.r=t.length-1+i);var d=n.header||[],h=0;t.forEach(function(p,g){Tt(p).forEach(function(x){(h=d.indexOf(x))==-1&&(d[h=d.length]=x);var w=p[x],y="z",_="",N=Ue({c:s+h,r:a+g+i});u=Ha(o,N),w&&typeof w=="object"&&!(w instanceof Date)?o[N]=w:(typeof w=="number"?y="n":typeof w=="boolean"?y="b":typeof w=="string"?y="s":w instanceof Date?(y="d",n.cellDates||(y="n",w=jt(w)),_=n.dateNF||rt[14]):w===null&&n.nullError&&(y="e",w=0),u?(u.t=y,u.v=w,delete u.w,delete u.R,_&&(u.z=_)):o[N]=u={t:y,v:w},_&&(u.z=_))})}),c.e.c=Math.max(c.e.c,s+d.length-1);var m=_t(a);if(i)for(h=0;h<d.length;++h)o[Ft(h+s)+m]={t:"s",v:d[h]};return o["!ref"]=ot(c),o}function XD(e,t){return Lw(null,e,t)}function Ha(e,t,r){if(typeof t=="string"){if(Array.isArray(e)){var n=dt(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?Ha(e,Ue(t)):Ha(e,Ue({r:t,c:r||0}))}function KD(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function YD(){return{SheetNames:[],Sheets:{}}}function qD(e,t,r,n){var i=1;if(!r)for(;i<=65535&&e.SheetNames.indexOf(r="Sheet"+i)!=-1;++i,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(r)>=0){var o=r.match(/(^.*?)(\d+)$/);i=o&&+o[2]||0;var a=o&&o[1]||r;for(++i;i<=65535&&e.SheetNames.indexOf(r=a+i)!=-1;++i);}if(Rw(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function QD(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=KD(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[n].Hidden=r}function ZD(e,t){return e.z=t,e}function Bw(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}function JD(e,t,r){return Bw(e,"#"+t,r)}function eP(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})}function tP(e,t,r,n){for(var i=typeof t!="string"?t:Ke(t),o=typeof t=="string"?t:ot(t),a=i.s.r;a<=i.e.r;++a)for(var s=i.s.c;s<=i.e.c;++s){var l=Ha(e,a,s);l.t="n",l.F=o,delete l.v,a==i.s.r&&s==i.s.c&&(l.f=r,n&&(l.D=!0))}return e}var bc={encode_col:Ft,encode_row:_t,encode_cell:Ue,encode_range:ot,decode_col:$d,decode_row:kd,split_cell:g3,decode_cell:dt,decode_range:Jt,format_cell:rn,sheet_add_aoa:Bx,sheet_add_json:Lw,sheet_add_dom:Iw,aoa_to_sheet:To,json_to_sheet:XD,table_to_sheet:bw,table_to_book:TD,sheet_to_csv:jd,sheet_to_txt:Mw,sheet_to_json:Gl,sheet_to_html:Pw,sheet_to_formulae:jD,sheet_to_row_object_array:Gl,sheet_get_cell:Ha,book_new:YD,book_append_sheet:qD,book_set_sheet_visibility:QD,cell_set_number_format:ZD,cell_set_hyperlink:Bw,cell_set_internal_link:JD,cell_add_comment:eP,sheet_set_array_formula:tP,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function Yf(e){if(typeof e=="string"){const t=e.replace(/[^a-zA-Z]/g,"").trim(),r=["","K","M","B","T"].indexOf(t.replace(/\s/g,""));e=Number(e.replace(/[^0-9.]/g,"").trim())*Math.pow(10,r*3)}return e}function rP(e,t){if(typeof e=="string"&&(e=Number(Yf(e))),e%1!==0){const r=Math.max(2,e.toString().split(".")[1].length),n=Math.min(4,r);if(e<1e3)return e.toFixed(n)||0}if(e>1e3&&!Uw(t||"")){const r=Math.min(4,Math.floor(Math.log10(Math.abs(e))/3)),n=["","K","M","B","T"][r];return`${(e/10**(r*3)).toFixed(2)} ${n}`}return e>1e3?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):e}function Xd(e){return["date","day","time","timestamp","year"].some(t=>e==null?void 0:e.toLowerCase().includes(t))}function Uw(e){return["price","open","close","high","low"].some(t=>e==null?void 0:e.toLowerCase().includes(t))}function zi(e,t){const r=window.document.getElementById("loading"),n=window.document.getElementById("loading_text");return new Promise(i=>{t?r.classList.remove("show"):(n.innerHTML=e,r.classList.add("show"));let o=setInterval(function(){(t?!r.classList.contains("show"):r.classList.contains("show"))&&(clearInterval(o),i(!0))},.01)})}function nP(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}const iP=(e,t,r,n)=>{const i=i4(e.getValue(t),r);return n(i),i},oP=async({fileHandle:e,blob:t})=>{e&&await aP({fileHandle:e,blob:t})},aP=async({fileHandle:e,blob:t})=>{const r=await e.createWritable();await r.write(t),await r.close()},sP=[{description:"PNG Image",accept:{"image/png":[".png"]}},{description:"JPEG Image",accept:{"image/jpeg":[".jpeg"]}}],Hw=({filename:e,is_image:t})=>{if("showSaveFilePicker"in window){const r={suggestedName:e,types:t?sP:[{description:"CSV File",accept:{"image/csv":[".csv"]}}],excludeAcceptAllOption:!0};return showSaveFilePicker(r)}return new Promise(r=>{r(null)})},Vw=(e,t,r)=>{try{if(r===null)throw new Error("Cannot access filesystem");oP({fileHandle:r,blob:e})}catch{const i=URL.createObjectURL(e),o=document.createElement("a");o.setAttribute("href",i),o.setAttribute("download",t),o.style.visibility="hidden",document.body.appendChild(o),o.click(),document.body.removeChild(o)}return new Promise(n=>{n(!0)})};async function e1(e,t,r,n){const i=t,o=r.map(u=>i.map(c=>u[c])),a=[i,...o];if(e==="csv"){const u=a.map(d=>d.join(",")).join(`
`),c=new Blob([u],{type:"text/csv;charset=utf-8;"}),f=`${window.title}.csv`;try{let d=await Hw({filename:f}),h="csv";d!==null&&(h=d.name.split(".").pop()),await zi(`Saving ${h.toUpperCase()}`),qf(async function(){Vw(c,f,d).then(async function(){await new Promise(m=>setTimeout(m,1500)),d||n(!0),await zi("",!0)})},2)()}catch(d){console.error(d)}return}const s=bc.book_new(),l=bc.aoa_to_sheet(a);bc.book_append_sheet(s,l,"Sheet1"),await zi("Saving XLSX"),qf(async function(){await new Promise(u=>setTimeout(u,1500)),WD(s,`${window.title}.xlsx`),await zi("",!0),n&&n(!0)},2)()}async function lP(e,t){const r=document.getElementById(e),n=`${window.title}.png`;try{let i=await Hw({filename:n,is_image:!0}),o="png";i!==null&&(o=i.name.split(".").pop()),await zi(`Saving ${o.toUpperCase()}`),qf(async function(){f4.toBlob(r).then(function(a){Vw(a,n,i).then(async function(){await new Promise(s=>setTimeout(s,1500)),i||t(!0),await zi("",!0)})})},2)()}catch(i){console.error(i)}}const qf=(e,t)=>{let r;return function(){const n=this,i=arguments;clearTimeout(r),r=setTimeout(()=>e.apply(n,i),t)}},Ww=v.createContext({dragDropManager:void 0});function rr(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var t1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),kc=function(){return Math.random().toString(36).substring(7).split("").join(".")},r1={INIT:"@@redux/INIT"+kc(),REPLACE:"@@redux/REPLACE"+kc(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+kc()}};function uP(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function zw(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(rr(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(rr(1));return r(zw)(e,t)}if(typeof e!="function")throw new Error(rr(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(){if(l)throw new Error(rr(3));return o}function f(p){if(typeof p!="function")throw new Error(rr(4));if(l)throw new Error(rr(5));var g=!0;return u(),s.push(p),function(){if(g){if(l)throw new Error(rr(6));g=!1,u();var w=s.indexOf(p);s.splice(w,1),a=null}}}function d(p){if(!uP(p))throw new Error(rr(7));if(typeof p.type>"u")throw new Error(rr(8));if(l)throw new Error(rr(9));try{l=!0,o=i(o,p)}finally{l=!1}for(var g=a=s,x=0;x<g.length;x++){var w=g[x];w()}return p}function h(p){if(typeof p!="function")throw new Error(rr(10));i=p,d({type:r1.REPLACE})}function m(){var p,g=f;return p={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(rr(11));function y(){w.next&&w.next(c())}y();var _=g(y);return{unsubscribe:_}}},p[t1]=function(){return this},p}return d({type:r1.INIT}),n={dispatch:d,subscribe:f,getState:c,replaceReducer:h},n[t1]=m,n}function Fe(e,t,...r){if(cP()&&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 cP(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function fP(e,t,r){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,e)}function dP(e,t){return e.filter(r=>r!==t)}function Gw(e){return typeof e=="object"}function hP(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 pP(e,t){return e.filter(r=>t.indexOf(r)>-1)}const Kd="dnd-core/INIT_COORDS",Ru="dnd-core/BEGIN_DRAG",Yd="dnd-core/PUBLISH_DRAG_SOURCE",Ou="dnd-core/HOVER",Fu="dnd-core/DROP",Du="dnd-core/END_DRAG";function n1(e,t){return{type:Kd,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const gP={type:Kd,payload:{clientOffset:null,sourceClientOffset:null}};function mP(e){return function(r=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:a}=n,s=e.getMonitor(),l=e.getRegistry();e.dispatch(n1(o)),vP(r,s,l);const u=yP(r,s);if(u==null){e.dispatch(gP);return}let c=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");xP(a),c=a(u)}e.dispatch(n1(o,c));const d=l.getSource(u).beginDrag(s,u);if(d==null)return;wP(d),l.pinSource(u);const h=l.getSourceType(u);return{type:Ru,payload:{itemType:h,item:d,sourceId:u,clientOffset:o||null,sourceClientOffset:c||null,isSourcePublic:!!i}}}}function vP(e,t,r){Fe(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){Fe(r.getSource(n),"Expected sourceIds to be registered.")})}function xP(e){Fe(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function wP(e){Fe(Gw(e),"Item must be an object.")}function yP(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 EP(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _P(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){EP(e,i,r[i])})}return e}function SP(e){return function(r={}){const n=e.getMonitor(),i=e.getRegistry();TP(n),RP(n).forEach((a,s)=>{const l=CP(a,s,i,n),u={type:Fu,payload:{dropResult:_P({},r,l)}};e.dispatch(u)})}}function TP(e){Fe(e.isDragging(),"Cannot call drop while not dragging."),Fe(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function CP(e,t,r,n){const i=r.getTarget(e);let o=i?i.drop(n,e):void 0;return AP(o),typeof o>"u"&&(o=t===0?{}:n.getDropResult()),o}function AP(e){Fe(typeof e>"u"||Gw(e),"Drop result must either be an object or undefined.")}function RP(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function OP(e){return function(){const r=e.getMonitor(),n=e.getRegistry();FP(r);const i=r.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(r,i),n.unpinSource()),{type:Du}}}function FP(e){Fe(e.isDragging(),"Cannot call endDrag while not dragging.")}function Qf(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function DP(e){return function(r,{clientOffset:n}={}){PP(r);const i=r.slice(0),o=e.getMonitor(),a=e.getRegistry(),s=o.getItemType();return bP(i,a,s),IP(i,o,a),kP(i,o,a),{type:Ou,payload:{targetIds:i,clientOffset:n||null}}}}function PP(e){Fe(Array.isArray(e),"Expected targetIds to be an array.")}function IP(e,t,r){Fe(t.isDragging(),"Cannot call hover while not dragging."),Fe(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){const i=e[n];Fe(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");const o=r.getTarget(i);Fe(o,"Expected targetIds to be registered.")}}function bP(e,t,r){for(let n=e.length-1;n>=0;n--){const i=e[n],o=t.getTargetType(i);Qf(o,r)||e.splice(n,1)}}function kP(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function $P(e){return function(){if(e.getMonitor().isDragging())return{type:Yd}}}function NP(e){return{beginDrag:mP(e),publishDragSource:$P(e),hover:DP(e),drop:SP(e),endDrag:OP(e)}}class MP{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=NP(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 LP(e,t){return{x:e.x+t.x,y:e.y+t.y}}function jw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function BP(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:jw(LP(t,n),r)}function UP(e){const{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:jw(t,r)}const wa=[],qd=[];wa.__IS_NONE__=!0;qd.__IS_ALL__=!0;function HP(e,t){return e===wa?!1:e===qd||typeof t>"u"?!0:pP(t,e).length>0}class VP{subscribeToStateChange(t,r={}){const{handlerIds:n}=r;Fe(typeof t=="function","listener must be a function."),Fe(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&&!HP(a.dirtyHandlerIds,n)||t()}finally{i=s}};return this.store.subscribe(o)}subscribeToOffsetChange(t){Fe(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 Fe(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(Fe(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 Qf(n,i)&&r.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const r=this.registry.getSource(t,!0);if(Fe(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&&!Qf(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 BP(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return UP(this.store.getState().dragOffset)}constructor(t,r){this.store=t,this.registry=r}}const i1=typeof global<"u"?global:self,Xw=i1.MutationObserver||i1.WebKitMutationObserver;function Kw(e){return function(){const r=setTimeout(i,0),n=setInterval(i,50);function i(){clearTimeout(r),clearInterval(n),e()}}}function WP(e){let t=1;const r=new Xw(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const zP=typeof Xw=="function"?WP:Kw;class GP{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=zP(this.flush),this.requestErrorThrow=Kw(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class jP{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 XP{create(t){const r=this.freeTasks,n=r.length?r.pop():new jP(this.onError,i=>r[r.length]=i);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const Yw=new GP,KP=new XP(Yw.registerPendingError);function YP(e){Yw.enqueueTask(KP.create(e))}const Qd="dnd-core/ADD_SOURCE",Zd="dnd-core/ADD_TARGET",Jd="dnd-core/REMOVE_SOURCE",Pu="dnd-core/REMOVE_TARGET";function qP(e){return{type:Qd,payload:{sourceId:e}}}function QP(e){return{type:Zd,payload:{targetId:e}}}function ZP(e){return{type:Jd,payload:{sourceId:e}}}function JP(e){return{type:Pu,payload:{targetId:e}}}function eI(e){Fe(typeof e.canDrag=="function","Expected canDrag to be a function."),Fe(typeof e.beginDrag=="function","Expected beginDrag to be a function."),Fe(typeof e.endDrag=="function","Expected endDrag to be a function.")}function tI(e){Fe(typeof e.canDrop=="function","Expected canDrop to be a function."),Fe(typeof e.hover=="function","Expected hover to be a function."),Fe(typeof e.drop=="function","Expected beginDrag to be a function.")}function Zf(e,t){if(t&&Array.isArray(e)){e.forEach(r=>Zf(r,!1));return}Fe(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 ar;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(ar||(ar={}));let rI=0;function nI(){return rI++}function iI(e){const t=nI().toString();switch(e){case ar.SOURCE:return`S${t}`;case ar.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function o1(e){switch(e[0]){case"S":return ar.SOURCE;case"T":return ar.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function a1(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 oI{addSource(t,r){Zf(t),eI(r);const n=this.addHandler(ar.SOURCE,t,r);return this.store.dispatch(qP(n)),n}addTarget(t,r){Zf(t,!0),tI(r);const n=this.addHandler(ar.TARGET,t,r);return this.store.dispatch(QP(n)),n}containsHandler(t){return a1(this.dragSources,t)||a1(this.dropTargets,t)}getSource(t,r=!1){return Fe(this.isSourceId(t),"Expected a valid source ID."),r&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return Fe(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return Fe(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return Fe(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return o1(t)===ar.SOURCE}isTargetId(t){return o1(t)===ar.TARGET}removeSource(t){Fe(this.getSource(t),"Expected an existing source."),this.store.dispatch(ZP(t)),YP(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){Fe(this.getTarget(t),"Expected an existing target."),this.store.dispatch(JP(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const r=this.getSource(t);Fe(r,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=r}unpinSource(){Fe(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,r,n){const i=iI(t);return this.types.set(i,r),t===ar.SOURCE?this.dragSources.set(i,n):t===ar.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 aI=(e,t)=>e===t;function sI(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function lI(e,t,r=aI){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 uI(e=wa,t){switch(t.type){case Ou:break;case Qd:case Zd:case Pu:case Jd:return wa;case Ru:case Yd:case Du:case Fu:default:return qd}const{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=hP(r,n);if(!(i.length>0||!lI(r,n)))return wa;const a=n[n.length-1],s=r[r.length-1];return a!==s&&(a&&i.push(a),s&&i.push(s)),i}function cI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fI(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){cI(e,i,r[i])})}return e}const s1={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function dI(e=s1,t){const{payload:r}=t;switch(t.type){case Kd:case Ru:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Ou:return sI(e.clientOffset,r.clientOffset)?e:fI({},e,{clientOffset:r.clientOffset});case Du:case Fu:return s1;default:return e}}function hI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ii(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){hI(e,i,r[i])})}return e}const pI={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function gI(e=pI,t){const{payload:r}=t;switch(t.type){case Ru:return Ii({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case Yd:return Ii({},e,{isSourcePublic:!0});case Ou:return Ii({},e,{targetIds:r.targetIds});case Pu:return e.targetIds.indexOf(r.targetId)===-1?e:Ii({},e,{targetIds:dP(e.targetIds,r.targetId)});case Fu:return Ii({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case Du:return Ii({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function mI(e=0,t){switch(t.type){case Qd:case Zd:return e+1;case Jd:case Pu:return e-1;default:return e}}function vI(e=0){return e+1}function xI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wI(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){xI(e,i,r[i])})}return e}function yI(e={},t){return{dirtyHandlerIds:uI(e.dirtyHandlerIds,{type:t.type,payload:wI({},t.payload,{prevTargetIds:fP(e,"dragOperation.targetIds",[])})}),dragOffset:dI(e.dragOffset,t),refCount:mI(e.refCount,t),dragOperation:gI(e.dragOperation,t),stateId:vI(e.stateId)}}function EI(e,t=void 0,r={},n=!1){const i=_I(n),o=new VP(i,new oI(i)),a=new MP(i,o),s=e(a,t,r);return a.receiveBackend(s),a}function _I(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return zw(yI,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function SI(e,t){if(e==null)return{};var r=TI(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 TI(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 l1=0;const tl=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var CI=v.memo(function(t){var{children:r}=t,n=SI(t,["children"]);const[i,o]=AI(n);return v.useEffect(()=>{if(o){const a=qw();return++l1,()=>{--l1===0&&(a[tl]=null)}}},[]),K(Ww.Provider,{value:i,children:r})});function AI(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=RI(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}function RI(e,t=qw(),r,n){const i=t;return i[tl]||(i[tl]={dragDropManager:EI(e,t,r,n)}),i[tl]}function qw(){return typeof global<"u"?global:window}var OI=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r};const li=typeof window<"u"?v.useLayoutEffect:v.useEffect;function FI(e,t,r){const[n,i]=v.useState(()=>t(e)),o=v.useCallback(()=>{const a=t(e);OI(n,a)||(i(a),r&&r())},[n,e,r]);return li(o),[n,o]}function DI(e,t,r){const[n,i]=FI(e,t,r);return li(function(){const a=e.getHandlerId();if(a!=null)return e.subscribeToStateChange(i,{handlerIds:[a]})},[e,i]),n}function Qw(e,t,r){return DI(t,e||(()=>({})),()=>r.reconnect())}function Zw(e,t){const r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),v.useMemo(()=>typeof e=="function"?e():e,r)}function PI(e){return v.useMemo(()=>e.hooks.dragSource(),[e])}function II(e){return v.useMemo(()=>e.hooks.dragPreview(),[e])}let $c=!1,Nc=!1;class bI{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Fe(!$c,"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 $c=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{$c=!1}}isDragging(){if(!this.sourceId)return!1;Fe(!Nc,"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 Nc=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Nc=!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 Mc=!1;class kI{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}canDrop(){if(!this.targetId)return!1;Fe(!Mc,"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 Mc=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Mc=!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 $I(e,t,r){const n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function NI(e,t,r){const n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function Jf(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 l=0;l<o.length;l++){const u=o[l];if(!s(u))return!1;const c=e[u],f=t[u];if(i=r?r.call(n,c,f,u):void 0,i===!1||i===void 0&&c!==f)return!1}return!0}function e0(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function MI(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 LI(e){return(t=null,r=null)=>{if(!v.isValidElement(t)){const o=t;return e(o,r),o}const n=t;return MI(n),BI(n,r?o=>e(o,r):e)}}function Jw(e){const t={};return Object.keys(e).forEach(r=>{const n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const i=LI(n);t[r]=()=>i}}),t}function u1(e,t){typeof e=="function"?e(t):e.current=t}function BI(e,t){const r=e.ref;return Fe(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?v.cloneElement(e,{ref:n=>{u1(r,n),u1(t,n)}}):v.cloneElement(e,{ref:t})}class UI{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!Jf(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Jf(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=Jw({dragSource:(r,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,e0(r)?this.dragSourceRef=r:this.dragSourceNode=r,this.reconnectDragSource()},dragPreview:(r,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,e0(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 HI{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!Jf(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=Jw({dropTarget:(r,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,e0(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 Ro(){const{dragDropManager:e}=v.useContext(Ww);return Fe(e!=null,"Expected drag drop context"),e}function VI(e,t){const r=Ro(),n=v.useMemo(()=>new UI(r.getBackend()),[r]);return li(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),li(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function WI(){const e=Ro();return v.useMemo(()=>new bI(e),[e])}class zI{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 GI(e,t,r){const n=v.useMemo(()=>new zI(e,t,r),[t,r]);return v.useEffect(()=>{n.spec=e},[e]),n}function jI(e){return v.useMemo(()=>{const t=e.type;return Fe(t!=null,"spec.type must be defined"),t},[e])}function XI(e,t,r){const n=Ro(),i=GI(e,t,r),o=jI(e);li(function(){if(o!=null){const[s,l]=NI(o,i,n);return t.receiveHandlerId(s),r.receiveHandlerId(s),l}},[n,t,r,i,o])}function KI(e,t){const r=Zw(e,t);Fe(!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=WI(),i=VI(r.options,r.previewOptions);return XI(r,n,i),[Qw(r.collect,n,i),PI(i),II(i)]}function YI(e){return v.useMemo(()=>e.hooks.dropTarget(),[e])}function qI(e){const t=Ro(),r=v.useMemo(()=>new HI(t.getBackend()),[t]);return li(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function QI(){const e=Ro();return v.useMemo(()=>new kI(e),[e])}function ZI(e){const{accept:t}=e;return v.useMemo(()=>(Fe(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class JI{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 e5(e,t){const r=v.useMemo(()=>new JI(e,t),[t]);return v.useEffect(()=>{r.spec=e},[e]),r}function t5(e,t,r){const n=Ro(),i=e5(e,t),o=ZI(e);li(function(){const[s,l]=$I(o,i,n);return t.receiveHandlerId(s),r.receiveHandlerId(s),l},[n,t,i,r,o.map(a=>a.toString()).join("|")])}function r5(e,t){const r=Zw(e,t),n=QI(),i=qI(r.options);return t5(r,n,i),[Qw(r.collect,n,i),YI(i)]}function n5(e,t){return v.useReducer((r,n)=>{const i=t[r][n];return i??r},e)}const Ei=e=>{const{present:t,children:r}=e,n=i5(t),i=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),o=Ve(n.ref,i.ref);return typeof r=="function"||n.isPresent?v.cloneElement(i,{ref:o}):null};Ei.displayName="Presence";function i5(e){const[t,r]=v.useState(),n=v.useRef({}),i=v.useRef(e),o=v.useRef("none"),a=e?"mounted":"unmounted",[s,l]=n5(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=$s(n.current);o.current=s==="mounted"?u:"none"},[s]),Et(()=>{const u=n.current,c=i.current;if(c!==e){const d=o.current,h=$s(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Et(()=>{if(t){const u=f=>{const h=$s(n.current).includes(f.animationName);f.target===t&&h&&Jr.flushSync(()=>l("ANIMATION_END"))},c=f=>{f.target===t&&(o.current=$s(n.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function $s(e){return(e==null?void 0:e.animationName)||"none"}const Lc="rovingFocusGroup.onEntryFocus",o5={bubbles:!1,cancelable:!0},eh="RovingFocusGroup",[t0,e2,a5]=uu(eh),[s5,t2]=on(eh,[a5]),[l5,u5]=s5(eh),c5=v.forwardRef((e,t)=>v.createElement(t0.Provider,{scope:e.__scopeRovingFocusGroup},v.createElement(t0.Slot,{scope:e.__scopeRovingFocusGroup},v.createElement(f5,pe({},e,{ref:t}))))),f5=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...c}=e,f=v.useRef(null),d=Ve(t,f),h=hd(o),[m=null,p]=uo({prop:a,defaultProp:s,onChange:l}),[g,x]=v.useState(!1),w=It(u),y=e2(r),_=v.useRef(!1),[N,M]=v.useState(0);return v.useEffect(()=>{const S=f.current;if(S)return S.addEventListener(Lc,w),()=>S.removeEventListener(Lc,w)},[w]),v.createElement(l5,{scope:r,orientation:n,dir:h,loop:i,currentTabStopId:m,onItemFocus:v.useCallback(S=>p(S),[p]),onItemShiftTab:v.useCallback(()=>x(!0),[]),onFocusableItemAdd:v.useCallback(()=>M(S=>S+1),[]),onFocusableItemRemove:v.useCallback(()=>M(S=>S-1),[])},v.createElement(Pe.div,pe({tabIndex:g||N===0?-1:0,"data-orientation":n},c,{ref:d,style:{outline:"none",...e.style},onMouseDown:_e(e.onMouseDown,()=>{_.current=!0}),onFocus:_e(e.onFocus,S=>{const C=!_.current;if(S.target===S.currentTarget&&C&&!g){const A=new CustomEvent(Lc,o5);if(S.currentTarget.dispatchEvent(A),!A.defaultPrevented){const L=y().filter(ne=>ne.focusable),U=L.find(ne=>ne.active),B=L.find(ne=>ne.id===m),Q=[U,B,...L].filter(Boolean).map(ne=>ne.ref.current);r2(Q)}}_.current=!1}),onBlur:_e(e.onBlur,()=>x(!1))})))}),d5="RovingFocusGroupItem",h5=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:o,...a}=e,s=Xr(),l=o||s,u=u5(d5,r),c=u.currentTabStopId===l,f=e2(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=u;return v.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),v.createElemen