vendor: 5,214 bytes, line 1
1import{r as t,p as e,g as r,a as n,j as i,e as o,b as s,t as a,d as c,s as u,f as l,m as d,R as h}from"./vendor.BneZ12fQ.js";const g=t.createContext({dragDropManager:void 0});function p(t,r,...n){if(void 0!==e&&void 0===r)throw new Error("invariant requires an error message argument");if(!t){let t;if(void 0===r)t=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let e=0;t=new Error(r.replace(/%s/g,(function(){return n[e++]}))),t.name="Invariant Violation"}throw t.framesToPop=1,t}}function f(t){return"object"==typeof t}const v="dnd-core/INIT_COORDS",m="dnd-core/BEGIN_DRAG",y="dnd-core/PUBLISH_DRAG_SOURCE",S="dnd-core/HOVER",D="dnd-core/DROP",O="dnd-core/END_DRAG";function I(t,e){return{type:v,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const b={type:v,payload:{clientOffset:null,sourceClientOffset:null}};function E(t){return function(e=[],r={publishSource:!0}){const{publishSource:n=!0,clientOffset:i,getSourceClientOffset:o}=r,s=t.getMonitor(),a=t.getRegistry();t.dispatch(I(i)),function(t,e,r){p(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach((function(t){p(r.getSource(t),"Expected sourceIds to be registered.")}))}(e,s,a);const c=function(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}(e,s);if(null==c)return void t.dispatch(b);let u=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");!function(t){p("function"==typeof t,"When clientOffset is provided, getSourceClientOffset must be a function.")}(o),u=o(c)}t.dispatch(I(i,u));const l=a.getSource(c).beginDrag(s,c);if(null==l)return;!function(t){p(f(t),"Item must be an object.")}(l),a.pinSource(c);const d=a.getSourceType(c);return{type:m,payload:{itemType:d,item:l,sourceId:c,clientOffset:i||null,sourceClientOffset:u||null,isSourcePublic:!!n}}}}function T(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){T(t,e,r[e])}))}return t}function C(t){return function(e={}){const r=t.getMonitor(),n=t.getRegistry();!function(t){p(t.isDragging(),"Cannot call drop while not dragging."),p(!t.didDrop(),"Cannot call drop twice during one drag operation.")}(r);const i=function(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}(r);i.forEach(((i,o)=>{const s=function(t,e,r,n){const i=r.getTarget(t);let o=i?i.drop(n,t):void 0;(function(t){p(void 0===t||f(t),"Drop result must either be an object or undefined.")})(o),void 0===o&&(o=0===e?{}:n.getDropResult());return o}(i,o,n,r),a={type:D,payload:{dropResult:w({},e,s)}};t.dispatch(a)}))}}function _(t){return function(){const e=t.getMonitor(),r=t.getRegistry();!function(t){p(t.isDragging(),"Cannot call endDrag while not dragging.")}(e);const n=e.getSourceId();if(null!=n){r.getSource(n,!0).endDrag(e,n),r.unpinSource()}return{type:O}}}function P(t,e){return null===e?null===t:Array.isArray(t)?t.some((t=>t===e)):t===e}function x(t){return function(e,{clientOffset:r}={}){!function(t){p(Array.isArray(t),"Expected targetIds to be an array.")}(e);const n=e.slice(0),i=t.getMonitor(),o=t.getRegistry();return function(t,e,r){for(let n=t.length-1;n>=0;n--){const i=t[n];P(e.getTargetType(i),r)||t.splice(n,1)}}(n,o,i.getItemType()),function(t,e,r){p(e.isDragging(),"Cannot call hover while not dragging."),p(!e.didDrop(),"Cannot call hover after drop.");for(let n=0;n<t.length;n++){const e=t[n];p(t.lastIndexOf(e)===n,"Expected targetIds to be unique in the passed array.");p(r.getTarget(e),"Expected targetIds to be registered.")}}(n,i,o),function(t,e,r){t.forEach((function(t){r.getTarget(t).hover(e,t)}))}(n,i,o),{type:S,payload:{targetIds:n,clientOffset:r||null}}}}function R(t){return function(){if(t.getMonitor().isDragging())return{type:y}}}class A{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:e}=this.store;const r=function(t){return{beginDrag:E(t),publishDragSource:R(t),hover:x(t),drop:C(t),endDrag:_(t)}}(this);return Object.keys(r).reduce(((n,i)=>{const o=r[i];var s;return n[i]=(s=o,(...r)=>{const n=s.apply(t,r);void 0!==n&&e(n)}),n}),{})}dispatch(t){this.store.dispatch(t)}constructor(t,e){this.isSetUp=!1,this.handleRefCountChange=()=>{const t=this.store.getState().refCount>0;this.backend&&(t&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!t&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=e,t.subscribe(this.handleRefCountChange)}}function N(t,e){return{x:t.x-e.x,y:t.y-e.y}}const M=[],j=[];M.__IS_NONE__=!0,j.__IS_ALL__=!0;class k{subscribeToStateChange(t,e={}){const{handlerIds:r}=e;p("function"==typeof t,"listener must be a function."),p(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of str
1ings.");let n=this.store.getState().stateId;return this.store.subscribe((()=>{const e=this.store.getState(),i=e.stateId;try{const o=i===n||i===n+1&&!function(t,e){return t!==M&&(t===j||void 0===e||(r=t,e.filter((t=>r.indexOf(t)>-1))).length>0);var r}(e.dirtyHandlerIds,r);o||t()}finally{n=i}}))}subscribeToOffsetChange(t){p("function"==typeof t,"listener must be a function.");let e=this.store.getState().dragOffset;return this.store.subscribe((()=>{const r=this.store.getState().dragOffset;r!==e&&(e=r,t())}))}canDragSource(t){if(!t)return!1;const e=this.registry.getSource(t);return p(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()&&e.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const e=this.registry.getTarget(t);if(p(e,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;return P(this.registry.getTargetType(t),this.getItemType())&&e.canDrop(this,t)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(t){if(!t)return!1;const e=this.registry.getSource(t,!0);if(p(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(t)===this.getItemType()&&e.isDragging(this,t)}isOverTarget(t,e={shallow:!1}){if(!t)return!1;const{shallow:r}=e;if(!this.isDragging())return!1;const n=this.registry.getTargetType(t),i=this.getItemType();if(i&&!P(n,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const s=o.indexOf(t);return r?s===o.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 Boolean(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 function(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return e&&r&&n?N((o=n,{x:(i=e).x+o.x,y:i.y+o.y}),r):null;var i,o}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(t){const{clientOffset:e,initialClientOffset:r}=t;return e&&r?N(e,r):null}(this.store.getState().dragOffset)}constructor(t,e){this.store=t,this.registry=e}}const U=void 0!==r?r:self,L=U.MutationObserver||U.WebKitMutationObserver;function H(t){return function(){const e=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(e),clearInterval(r),t()}}}const F="function"==typeof L?function(t){let e=1;const r=new L(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}:H;class V{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,e){this.onError=t,this.release=e,this.task=null}}const B=new class{enqueueTask(t){const{queue:e,requestFlush:r}=this;e.length||(r(),this.flushing=!0),e[e.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 e=this.index;if(this.index++,t[e].call(),this.index>this.capacity){for(let e=0,r=t.length-this.index;e<r;e++)t[e]=t[e+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=F(this.flush),this.requestErrorThrow=H((()=>
vendor: 4,629 bytes, line 1
1{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},K=new class{create(t){const e=this.freeTasks,r=e.length?e.pop():new V(this.onError,(t=>e[e.length]=t));return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}(B.registerPendingError);const q="dnd-core/ADD_SOURCE",X="dnd-core/ADD_TARGET",Y="dnd-core/REMOVE_SOURCE",W="dnd-core/REMOVE_TARGET";function G(t,e){e&&Array.isArray(t)?t.forEach((t=>G(t,!1))):p("string"==typeof t||"symbol"==typeof t,e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var $,z;(z=$||($={})).SOURCE="SOURCE",z.TARGET="TARGET";let J=0;function Q(t){const e=(J++).toString();switch(t){case $.SOURCE:return`S${e}`;case $.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Z(t){switch(t[0]){case"S":return $.SOURCE;case"T":return $.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function tt(t,e){const r=t.entries();let n=!1;do{const{done:t,value:[,i]}=r.next();if(i===e)return!0;n=!!t}while(!n);return!1}class et{addSource(t,e){G(t),function(t){p("function"==typeof t.canDrag,"Expected canDrag to be a function."),p("function"==typeof t.beginDrag,"Expected beginDrag to be a function."),p("function"==typeof t.endDrag,"Expected endDrag to be a function.")}(e);const r=this.addHandler($.SOURCE,t,e);return this.store.dispatch(function(t){return{type:q,payload:{sourceId:t}}}(r)),r}addTarget(t,e){G(t,!0),function(t){p("function"==typeof t.canDrop,"Expected canDrop to be a function."),p("function"==typeof t.hover,"Expected hover to be a function."),p("function"==typeof t.drop,"Expected beginDrag to be a function.")}(e);const r=this.addHandler($.TARGET,t,e);return this.store.dispatch(function(t){return{type:X,payload:{targetId:t}}}(r)),r}containsHandler(t){return tt(this.dragSources,t)||tt(this.dropTargets,t)}getSource(t,e=!1){p(this.isSourceId(t),"Expected a valid source ID.");return e&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return p(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return p(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return p(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Z(t)===$.SOURCE}isTargetId(t){return Z(t)===$.TARGET}removeSource(t){var e;p(this.getSource(t),"Expected an existing source."),this.store.dispatch(function(t){return{type:Y,payload:{sourceId:t}}}(t)),e=()=>{this.dragSources.delete(t),this.types.delete(t)},B.enqueueTask(K.create(e))}removeTarget(t){p(this.getTarget(t),"Expected an existing target."),this.store.dispatch(function(t){return{type:W,payload:{targetId:t}}}(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const e=this.getSource(t);p(e,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=e}unpinSource(){p(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,e,r){const n=Q(t);return this.types.set(n,e),t===$.SOURCE?this.dragSources.set(n,r):t===$.TARGET&&this.dropTargets.set(n,r),n}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const rt=(t,e)=>t===e;function nt(t=M,e){switch(e.type){case S:break;case q:case X:case W:case Y:return M;default:return j}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,i=function(t,e){const r=new Map,n=t=>{r.set(t,r.has(t)?r.get(t)+1:1)};t.forEach(n),e.forEach(n);const i=[];return r.forEach(((t,e)=>{1===t&&i.push(e)})),i}(r,n);if(!(i.length>0||!function(t,e,r=rt){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!r(t[n],e[n]))return!1;return!0}(r,n)))return M;const o=n[n.length-1],s=r[r.length-1];return o!==s&&(o&&i.push(o),s&&i.push(s)),i}function it(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const ot={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function st(t=ot,e){const{payload:r}=e;switch(e.type){case v:case m:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case S:return n=t.clientOffset,i=r.clientOffset,!n&&!i||n&&i&&n.x===i.x&&n.y===i.y?t:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}
1)))),n.forEach((function(e){it(t,e,r[e])}))}return t}({},t,{clientOffset:r.clientOffset});case O:case D:return ot;default:return t}var n,i}function at(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){at(t,e,r[e])}))}return t}const ut={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function lt(t=ut,e){const{payload:r}=e;switch(e.type){case m:return ct({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case y:return ct({},t,{isSourcePublic:!0});case S:return ct({},t,{targetIds:r.targetIds});case W:return-1===t.targetIds.indexOf(r.targetId)?t:ct({},t,{targetIds:(n=t.targetIds,i=r.targetId,n.filter((t=>t!==i)))});case D:return ct({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case O:return ct({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}var n,i}function dt(t=0,e){switch(e.type){case q:case X:return t+1;case Y:case W:return t-1;default:return t}}function ht(t=0){return t+1}function gt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){gt(t,e,r[e])}))}return t}function ft(t={},e){return{dirtyHandlerIds:nt(t.dirtyHandlerIds,{type:e.type,payload:pt({},e.payload,{prevTargetIds:(r=t,n="dragOperation.targetIds",i=[],n.split(".").reduce(((t,e)=>t&&t[e]?t[e]:i||null),r))})}),dragOffset:st(t.dragOffset,e),refCount:dt(t.refCount,e),dragOperation:lt(t.dragOperation,e),stateId:ht(t.stateId)};var r,n,i}function vt(t,e=void 0,r={},i=!1){const o=function(t){const e="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return n(ft,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}(i),s=new k(o,new et(o)),a=new A(o,s),c=t(a,e,r);return a.receiveBackend(c),a}function mt(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}let yt=0;const St=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Dt=t.memo((function(e){var{children:r}=e,n=mt(e,["children"]);const[o,s]=function(t){if("manager"in t){return[{dragDropManager:t.manager},!1]}const e=function(t,e=Ot(),r,n){const i=e;i[St]||(i[St]={dragDropManager:vt(t,e,r,n)});return i[St]}(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[e,r]}(n);return t.useEffect((()=>{if(s){const t=Ot();return++yt,()=>{0==--yt&&(t[St]=null)}}}),[]),i.jsx(g.Provider,{value:o,children:r})}));function Ot(){return void 0!==r?r:window}const It="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function bt(e,r,n){const[i,s]=function(e,r,n){const[i,s]=t.useState((()=>r(e))),a=t.useCallback((()=>{const t=r(e);o(i,t)||(s(t),n&&n())}),[i,e,n]);return It(a),[i,a]}(e,r,n);return It((function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(s,{handlerIds:[t]})}),[e,s]),i}function Et(t,e,r){return bt(e,t||(()=>({})),(()=>r.reconnect()))}function Tt(e,r){const n=[...r||[]];return null==r&&"function"!=typeof e&&n.push(e),t.useMemo((()=>"function"==typeof e?e():e),n)}function wt(e){return t.useMemo((()=>e.hooks.dragSource()),[e])}function Ct(e){return t.useMemo((()=>e.hooks.dragPreview()),[e])}let _t=!1,Pt=!1;class xt{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){p(!_t,"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 _t=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{_t=!1}}isDragging(){if(!this.sourceId)return!1;p(!Pt,"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 Pt=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Pt=!1}}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,e){return this.internalMonitor.isOverTarget(t,e)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}
vendor: 9,370 bytes, line 1
1canDragSource(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 Rt=!1;class At{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}canDrop(){if(!this.targetId)return!1;p(!Rt,"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 Rt=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Rt=!1}}isOver(t){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,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.targetId=null,this.internalMonitor=t.getMonitor()}}function Nt(t,e,r,n){let i;if(void 0!==i)return!!i;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;const o=Object.keys(t),s=Object.keys(e);if(o.length!==s.length)return!1;const a=Object.prototype.hasOwnProperty.bind(e);for(let c=0;c<o.length;c++){const r=o[c];if(!a(r))return!1;const n=t[r],s=e[r];if(i=void 0,!1===i||void 0===i&&n!==s)return!1}return!0}function Mt(t){return null!==t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function jt(e){return(r=null,n=null)=>{if(!t.isValidElement(r)){const t=r;return e(t,n),t}const i=r;!function(t){if("string"==typeof t.type)return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}(i);return function(e,r){const n=e.ref;return p("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?t.cloneElement(e,{ref:t=>{Ut(n,t),Ut(r,t)}}):t.cloneElement(e,{ref:r})}(i,n?t=>e(t,n):e)}}function kt(t){const e={};return Object.keys(t).forEach((r=>{const n=t[r];if(r.endsWith("Ref"))e[r]=t[r];else{const t=jt(n);e[r]=()=>t}})),e}function Ut(t,e){"function"==typeof t?t(e):t.current=e}class Lt{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,e=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return e&&this.disconnectDragSource(),this.handlerId?t?(e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),e):(this.lastConnectedDragSource=t,e):e}reconnectDragPreview(t=!1){const e=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();r&&this.disconnectDragPreview(),this.handlerId&&(e?r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Nt(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Nt(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=kt({dragSource:(t,e)=>{this.clearDragSource(),this.dragSourceOptions=e||null,Mt(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,e)=>{this.clearDragPreview(),this.dragPreviewOptions=e||null,Mt(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,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 Ht{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const e=this.dropTarget;this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=e,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,e,this.dropTargetOptions)):this.lastConnectedDropTarget=e)}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!Nt(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=kt({dropTarget:(t,e)=>{this.clearDropTarget(),this.dropTargetOptions=e,Mt(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function Ft(){const{dragDropManager:e}=t.useContext(g);return p(null!=e,"Expected drag drop context"),e}class Vt{beginDrag(){const t=this.spec,e=this.monitor;let r=null;return r="object"==typeof t.item?t.item:"function"==typeof t.item?t.item(e):{},null!=r?r:null}canDrag(){const t=this.spec,e=this.monitor;return"boolean"==typeof t.canDrag?t.canDrag:"function"!=typeof t.canDrag||t.canDrag(e)}isDragging(t,e){const r=this.spec,n=this.monitor,{isDragging:i}=r;return i?i(n):e===t.getSourceId()}endDrag(){const t=this.spec,e=this.monitor,r=this.connector,{end:n}=t;n&&n(e.getItem(),e),r.reconnect()}constructor(t,e,r){this.spec=t,this.monitor=e,this.connector=r}}function Bt(e,r,n){const i=Ft(),o=function(e,r,n){const i=t.useMemo((()=>new Vt(e,r,n)),[r,n]);return t.useEffect((()=>{i.spec=e}),[e]),i}(e,r,n),s=function(e){return t.useMemo((()=>{const t=e.type;return p(null!=t,"spec.type must be defined"),t}),[e])}(e);It((function(){if(null!=s){const[t,e]=function(t,e,r){const n=r.getRegistry(),i=n.addSource(t,e);return[i,()=>n.removeSource(i)]}(s,o,i);return r.receiveHandlerId(t),n.receiveHandlerId(t),e}}),[i,r,n,o,s])}function Kt(e,r){const n=Tt(e,r);
1p(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const i=function(){const e=Ft();return t.useMemo((()=>new xt(e)),[e])}(),o=function(e,r){const n=Ft(),i=t.useMemo((()=>new Lt(n.getBackend())),[n]);return It((()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource())),[i,e]),It((()=>(i.dragPreviewOptions=r||null,i.reconnect(),()=>i.disconnectDragPreview())),[i,r]),i}(n.options,n.previewOptions);return Bt(n,i,o),[Et(n.collect,i,o),wt(o),Ct(o)]}function qt(e){return t.useMemo((()=>e.hooks.dropTarget()),[e])}class Xt{canDrop(){const t=this.spec,e=this.monitor;return!t.canDrop||t.canDrop(e.getItem(),e)}hover(){const t=this.spec,e=this.monitor;t.hover&&t.hover(e.getItem(),e)}drop(){const t=this.spec,e=this.monitor;if(t.drop)return t.drop(e.getItem(),e)}constructor(t,e){this.spec=t,this.monitor=e}}function Yt(e,r,n){const i=Ft(),o=function(e,r){const n=t.useMemo((()=>new Xt(e,r)),[r]);return t.useEffect((()=>{n.spec=e}),[e]),n}(e,r),s=function(e){const{accept:r}=e;return t.useMemo((()=>(p(null!=e.accept,"accept must be defined"),Array.isArray(r)?r:[r])),[r])}(e);It((function(){const[t,e]=function(t,e,r){const n=r.getRegistry(),i=n.addTarget(t,e);return[i,()=>n.removeTarget(i)]}(s,o,i);return r.receiveHandlerId(t),n.receiveHandlerId(t),e}),[i,r,o,n,s.map((t=>t.toString())).join("|")])}function Wt(e,r){const n=Tt(e,r),i=function(){const e=Ft();return t.useMemo((()=>new At(e)),[e])}(),o=function(e){const r=Ft(),n=t.useMemo((()=>new Ht(r.getBackend())),[r]);return It((()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget())),[e]),n}(n.options);return Yt(n,i,o),[Et(n.collect,i,o),qt(o)]}function Gt(t){let e=null;return()=>(null==e&&(e=t()),e)}class $t{enter(t){const e=this.entered.length;return this.entered=function(t,e){const r=new Set,n=t=>r.add(t);t.forEach(n),e.forEach(n);const i=[];return r.forEach((t=>i.push(t))),i}(this.entered.filter((e=>this.isNodeInDocument(e)&&(!e.contains||e.contains(t)))),[t]),0===e&&this.entered.length>0}leave(t){const e=this.entered.length;var r,n;return this.entered=(r=this.entered.filter(this.isNodeInDocument),n=t,r.filter((t=>t!==n))),e>0&&0===this.entered.length}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class zt{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach((t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null)})}))}loadDataTransfer(t){if(t){const e={};Object.keys(this.config.exposeProperties).forEach((r=>{const n=this.config.exposeProperties[r];null!=n&&(e[r]={value:n(t,this.config.matchesTypes),configurable:!0,enumerable:!0})})),Object.defineProperties(this.item,e)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,e){return e===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Jt="__NATIVE_FILE__",Qt="__NATIVE_URL__",Zt="__NATIVE_TEXT__",te="__NATIVE_HTML__",ee=Object.freeze(Object.defineProperty({__proto__:null,FILE:Jt,HTML:te,TEXT:Zt,URL:Qt},Symbol.toStringTag,{value:"Module"}));function re(t,e,r){const n=e.reduce(((e,r)=>e||t.getData(r)),"");return null!=n?n:r}const ne={[Jt]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[te]:{exposeProperties:{html:(t,e)=>re(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Qt]:{exposeProperties:{urls:(t,e)=>re(t,e,"").split("\n"),dataTransfer:t=>t}
vendor: 13,349 bytes, line 1
1,matchesTypes:["Url","text/uri-list"]},[Zt]:{exposeProperties:{text:(t,e)=>re(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function ie(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(ne).filter((t=>{const r=ne[t];return!!(null==r?void 0:r.matchesTypes)&&r.matchesTypes.some((t=>e.indexOf(t)>-1))}))[0]||null}const oe=Gt((()=>/firefox/i.test(navigator.userAgent))),se=Gt((()=>Boolean(window.safari)));class ae{interpolate(t){const{xs:e,ys:r,c1s:n,c2s:i,c3s:o}=this;let s=e.length-1;if(t===e[s])return r[s];let a,c=0,u=o.length-1;for(;c<=u;){a=Math.floor(.5*(c+u));const n=e[a];if(n<t)c=a+1;else{if(!(n>t))return r[a];u=a-1}}s=Math.max(0,u);const l=t-e[s],d=l*l;return r[s]+n[s]*l+i[s]*d+o[s]*l*d}constructor(t,e){const{length:r}=t,n=[];for(let h=0;h<r;h++)n.push(h);n.sort(((e,r)=>t[e]<t[r]?-1:1));const i=[],o=[];let s,a;for(let h=0;h<r-1;h++)s=t[h+1]-t[h],a=e[h+1]-e[h],i.push(s),o.push(a/s);const c=[o[0]];for(let h=0;h<i.length-1;h++){const t=o[h],e=o[h+1];if(t*e<=0)c.push(0);else{s=i[h];const r=i[h+1],n=s+r;c.push(3*n/((n+r)/t+(n+s)/e))}}c.push(o[o.length-1]);const u=[],l=[];let d;for(let h=0;h<c.length-1;h++){d=o[h];const t=c[h],e=1/i[h],r=t+c[h+1]-d-d;u.push((d-t-r)*e),l.push(r*e*e)}this.xs=t,this.ys=e,this.c1s=c,this.c2s=u,this.c3s=l}}const ce=1;function ue(t){const e=t.nodeType===ce?t:t.parentElement;if(!e)return null;const{top:r,left:n}=e.getBoundingClientRect();return{x:n,y:r}}function le(t){return{x:t.clientX,y:t.clientY}}function de(t,e,r,n,i){const o="IMG"===(s=e).nodeName&&(oe()||!(null===(a=document.documentElement)||void 0===a?void 0:a.contains(s)));var s,a;const c=ue(o?t:e),u={x:r.x-c.x,y:r.y-c.y},{offsetWidth:l,offsetHeight:d}=t,{anchorX:h,anchorY:g}=n,{dragPreviewWidth:p,dragPreviewHeight:f}=function(t,e,r,n){let i=t?e.width:r,o=t?e.height:n;return se()&&t&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}(o,e,l,d),{offsetX:v,offsetY:m}=i,y=0===m||m;return{x:0===v||v?v:new ae([0,.5,1],[u.x,u.x/l*p,u.x+p-l]).interpolate(h),y:y?m:(()=>{let t=new ae([0,.5,1],[u.y,u.y/d*f,u.y+f-d]).interpolate(g);return se()&&o&&(t+=(window.devicePixelRatio-1)*f),t})()}}class he{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var t;return(null===(t=this.globalContext)||void 0===t?void 0:t.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return(null===(t=this.optionsArgs)||void 0===t?void 0:t.rootElement)||this.window}constructor(t,e){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=e}}function ge(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pe(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){ge(t,e,r[e])}))}return t}class fe{profile(){var t,e;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(t=this.dragStartSourceIds)||void 0===t?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.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(void 0!==t){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;var e;void 0!==t&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(e=this.window)||void 0===e||e.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(t,e,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,e),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,e,r){this.sourceNodes.set(t,e),this.sourceNodeOptions.set(t,r);const n=e=>this.handleDragStart(e,t),i=t=>this.handleSelectStart(t);return e.setAttribute("draggable","true"),e.addEventListener("dragstart",n),e.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),e.removeEventListener("dragstart",n),e.removeEventListener("selectstart",i),e.setAttribute("draggable","false")}}connectDropTarget(t,e){const r=e=>this.handleDragEnter(e,t),n=e=>this.handleDragOver(e,t),i=e=>this.handleDrop(e,t);return e.addEventListener("dragenter",r),e.addEventListener("dragover",n),e.addEventListener("drop",i),()=>{e.removeEventListener("dragenter",r),e.removeEventListener("dragover",n),e.removeEventListener("drop",i)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),e=this.sourceNodeOptions.get(t);return pe({dropEffect:this.altKeyPressed?"copy":"move"},e||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId();return pe({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(t)||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(ee).some((e=>ee[e]===t))}beginDragNativeItem(t,e){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(t,e){const r=ne[t];if(!r)throw new Error(`native type ${t} has no configuration`);const n=new zt(r);return n.loadDataTransfer(e),n}(t,e),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;this.mouseMoveTimeoutTimer=setTimeout((()=>{var t;return null===(t=this.rootElement)||void 0===t?void 0:t.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var t;if(this.currentDragSourceNode=null,this.rootElement)null===(t=this.window)||void 0===t||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,e){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e))}handleDragEnter(t,e){this.dragEnterTargetIds.unshift(e)}handleDragOver(t,e){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)}handleDrop(t,e){this.dropTargetIds.unshift(e)}constructor(t,e,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=t=>{const e=this.sourceNodes.get(t);return e&&ue(e)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=t=>Boolean(t&&this.document&&this.document.body&&this.document.body.contains(t)),this.endDragIfSourceWasRemovedFromDOM=()=>{const t=this.currentDragSourceNode;null==t||this.isNodeInDocument(t)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=t=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame((()=>{this.monitor.isDragging()&&this.actions.hover(t||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null})))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=t=>{if(t.defaultPrevented)return;const{dragStartSourceIds:e}=this;this.dragStartSourceIds=null;const r=le(t);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(e||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:n}=t,i=ie(n);if(this.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){const t=this.monitor.getSourceId(),e=this.sourceNodes.get(t),i=this.sourcePreviewNodes.get(t)||e;if(i){const{anchorX:t,anchorY:o,offsetX:s,offsetY:a}=this.getCurrentSourcePreviewNodeOptions(),c=de(e,i,r,{anchorX:t,anchorY:o},{offsetX:s,offsetY:a});n.setDragImage(i,c.x,c.y)}}try{null==n||n.setData("application/json",{})}catch(o){}this.setCurrentDragSourceNode(t.target);const{captureDraggingState:e}=this.getCurrentSourcePreviewNodeOptions();e?this.actions.publishDragSource():setTimeout((()=>this.actions.publishDragSource()),0)}else if(i)this.beginDragNativeItem(i);else{if(n&&!n.types&&(t.target&&!t.target.hasAttribute||!t.target.hasAttribute("draggable")))return;t.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=t=>{var e;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer));if(!this.enterLeaveCounter.enter(t.target)||this.monitor.isDragging())return;const{dataTransfer:r}=t,n=ie(r);n&&this.beginDragNativeItem(n,r)},this.handleTopDragEnter=t=>{const{dragEnterTargetIds:e}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=t.altKey,e.length>0&&this.actions.hover(e,{clientOffset:le(t)});e.some((t=>this.monitor.canDropOnTarget(t)))&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=t=>{var e;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer))},this.handleTopDragOver=t=>{const{dragOverTargetIds:e}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return t.preventDefault(),void(t.dataTransfer&&(t.dataTransfer.dropEffect="none"));this.altKeyPressed=t.altKey,this.lastClientOffset=le(t),this.scheduleHover(e);(e||[]).some((t=>this.monitor.canDropOnTarget(t)))?(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?t.preventDefault():(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=t=>{this.isDraggingNativeItem()&&t.preventDefault();this.enterLeaveCounter.leave(t.target)&&(this.isDraggingNativeItem()&&setTimeout((()=>this.endDragNativeItem()),0),this.cancelHover())},this.handleTopDropCapture=t=>{var e;(this.dropTargetIds=[],this.isDraggingNativeItem())?(t.preventDefault(),null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer)):ie(t.dataTransfer)&&t.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=t=>{const{dropTargetIds:e}=this;this.dropTargetIds=[],this.actions.hover(e,{clientOffset:le(t)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(
1),this.cancelHover()},this.handleSelectStart=t=>{const e=t.target;"function"==typeof e.dragDrop&&("INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable||(t.preventDefault(),e.dragDrop()))},this.options=new he(e,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new $t(this.isNodeInDocument)}}const ve=function(t,e,r){return new fe(t,e,r)};var me=function(t){return"number"==typeof t},ye=function(t){return"function"==typeof t},Se=function(t){return"[object Object]"===Object.prototype.toString.call(t)},De=function(t){return Array.prototype.slice.apply(t)},Oe=function(t){var e=t.reduce((function(t,e){return t[e]=(t[e]||0)+1,t}),{});return Object.keys(e).filter((function(t){return e[t]>1}))};function Ie(t){return[].slice.call(arguments,1).forEach((function(e){if(e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})),t}var be,Ee=function(t,e,r){return t+(e-t)*r},Te={__proto__:null,isNumber:me,isFunction:ye,isObject:Se,toArray:De,getDuplicateValsAsStrings:Oe,assign:Ie,tweenProp:Ee},we="data-flip-id",Ce="data-inverse-flip-id",_e="data-portal-key",Pe=we,xe=Ce,Re="data-flip-config",Ae=_e,Ne={noWobble:{stiffness:200,damping:26},gentle:{stiffness:120,damping:14},veryGentle:{stiffness:130,damping:17},wobbly:{stiffness:180,damping:12},stiff:{stiffness:260,damping:26}},Me=function(t){return Se(t)?t:Object.keys(Ne).indexOf(t)>-1?Ne[t]:{}};"undefined"!=typeof window&&(be=window.requestAnimationFrame);var je=be=be||function(t){window.setTimeout(t,1e3/60)},ke=Date.now(),Ue="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()-ke};function Le(t,e){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}var He=function(){function t(){}return t.prototype.run=function(){var t=this;je((function(){t.springSystem.loop(Ue())}))},t}(),Fe=function(){this.position=0,this.velocity=0},Ve=0,Be=.001,Ke=function(){function t(t){this._id="s"+Ve++,this._springSystem=t,this.listeners=[],this._startValue=0,this._currentState=new Fe,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new Fe,this._restSpeedThreshold=.001,this._tempState=new Fe,this._timeAccumulator=0,this._wasAtRest=!0,this._cachedSpringConfig={}}var e=t.prototype;return e.getId=function(){return this._id},e.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this)},e.setSpringConfig=function(t){return this._springConfig=t,this},e.getCurrentValue=function(){return this._currentState.position},e.getDisplacementDistanceForState=function(t){return Math.abs(this._endValue-t.position)},e.setEndValue=function(t){if(t===this._endValue)return this;if(this.prevEndValue=t,this._endValue===t&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=t,this._springSystem.activateSpring(this.getId());for(var e=0,r=this.listeners.length;e<r;e++){var n=this.listeners[e].onSpringEndStateChange;n&&n(this)}return this},e.setVelocity=function(t){return t===this._currentState.velocity||(this._currentState.velocity=t,this._springSystem.activateSpring(this.getId())),this},e.setCurrentValue=function(t){this._startValue=t,this._currentState.position=t;for(var e=0,r=this.listeners.length;e<r;e++){var n=this.listeners[e];n.onSpringUpdate&&n.onSpringUpdate(this)}return this},e.setAtRest=function(){return this._endValue=this._currentState.position,this._tempState.position=this._currentState.position,this._currentState.velocity=0,this},e.setOvershootClampingEnabled=function(t){return this._overshootClampingEnabled=t,this},e.isOvershooting=function(){var t=this._startValue,e=this._endValue;return this._springConfig.tension>0&&(t<e&&this.getCurrentValue()>e||t>e&&this.getCurrentValue()<e)},e.advance=function(t,e){var r=this.isAtRest();if(!r||!this._wasAtRest){var n=e;e>.064&&(n=.064),this._timeAccumulator+=n;for(var i,o,s,a,c,u,l=this._springConfig.tension,d=this._springConfig.friction,h=this._currentState.position,g=this._currentState.velocity,p=this._tempState.position,f=this._tempState.velocity;this._timeAccumulator>=Be;)this._timeAccumulator-=Be,this._timeAccumulator<Be&&(this._previousState.position=h,this._previousState.velocity=g),o=l*(this._endValue-p)-d*g,a=l*(this._endValue-(p=h+(i=g)*Be*.5))-d*(f=g+o*Be*.5),u=l*(this._endValue-(p=h+(s=f)*Be*.5))-d*(f=g+a*Be*.5),p=h+(c=f)*Be,h+=1/6*(i+2*(s+c)+(f=g+u*Be))*Be,g+=1/6*(o+2*(a+u)+(l*(this._endValue-p)-d*f))*Be;this._tempState.position=p,this._tempState.velocity=f,this._currentState.position=h,this._currentState.velocity=g,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/Be),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&
1(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),r=!0);var v=!1;this._wasAtRest&&(this._wasAtRest=!1,v=!0);var m=!1;r&&(this._wasAtRest=!0,m=!0),this.notifyPositionUpdated(v,m)}},e.notifyPositionUpdated=function(t,e){var r=this;this.listeners.filter(Boolean).forEach((function(n){t&&n.onSpringActivate&&!r._onActivateCalled&&(n.onSpringActivate(r),r._onActivateCalled=!0),n.onSpringUpdate&&n.onSpringUpdate(r),e&&n.onSpringAtRest&&n.onSpringAtRest(r)}))},e.systemShouldAdvance=function(){return!this.isAtRest()||!this.wasAtRest()},e.wasAtRest=function(){return this._wasAtRest},e.isAtRest=function(){return Math.abs(this._currentState.velocity)<this._restSpeedThreshold&&(this.getDisplacementDistanceForState(this._currentState)<=this._displacementFromRestThreshold||0===this._springConfig.tension)},e._interpolate=function(t){this._currentState.position=this._currentState.position*t+this._previousState.position*(1-t),this._currentState.velocity=this._currentState.velocity*t+this._previousState.velocity*(1-t)},e.addListener=function(t){return this.listeners.push(t),this},e.addOneTimeListener=function(t){var e=this;return Object.keys(t).forEach((function(r){var n;t[r]=(n=t[r],function(){n.apply(void 0,[].slice.call(arguments)),e.removeListener(t)})})),this.listeners.push(t),this},e.removeListener=function(t){return Le(this.listeners,t),this},t}(),qe=function(){function t(t){this.looper=t||new He,this.looper.springSystem=this,this.listeners=[],this._activeSprings=[],this._idleSpringIndices=[],this._isIdle=!0,this._lastTimeMillis=-1,this._springRegistry={}}var e=t.prototype;return e.createSpring=function(t,e){return this.createSpringWithConfig({tension:t,friction:e})},e.createSpringWithConfig=function(t){var e=new Ke(this);return this.registerSpring(e),e.setSpringConfig(t),e},e.getIsIdle=function(){return this._isIdle},e.registerSpring=function(t){this._springRegistry[t.getId()]=t},e.deregisterSpring=function(t){Le(this._activeSprings,t),delete this._springRegistry[t.getId()]},e.advance=function(t,e){for(var r=this;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(this._activeSprings.filter(Boolean).forEach((function(n){n.systemShouldAdvance()?n.advance(t/1e3,e/1e3):r._idleSpringIndices.push(r._activeSprings.indexOf(n))}));this._idleSpringIndices.length>0;){var n=this._idleSpringIndices.pop();n>=0&&this._activeSprings.splice(n,1)}},e.loop=function(t){var e;-1===this._lastTimeMillis&&(this._lastTimeMillis=t-1);var r=t-this._lastTimeMillis;this._lastTimeMillis=t;var n=0,i=this.listeners.length;for(n=0;n<i;n++)(e=this.listeners[n]).onBeforeIntegrate&&e.onBeforeIntegrate(this);for(this.advance(t,r),0===this._activeSprings.length&&(this._isIdle=!0,this._lastTimeMillis=-1),n=0;n<i;n++)(e=this.listeners[n]).onAfterIntegrate&&e.onAfterIntegrate(this);this._isIdle||this.looper.run()},e.activateSpring=function(t){var e=this._springRegistry[t];-1===this._activeSprings.indexOf(e)&&this._activeSprings.push(e),this.getIsIdle()&&(this._isIdle=!1,this.looper.run())},t}(),Xe=new qe,Ye=function(t){var e=t.springConfig,r=e.overshootClamping,n=t.getOnUpdateFunc,i=t.onAnimationEnd,o=t.onSpringActivate,s=Xe.createSpring(e.stiffness,e.damping);s.setOvershootClampingEnabled(!!r);var a={onSpringActivate:o,onSpringAtRest:function(){s.destroy(),i()},onSpringUpdate:n({spring:s,onAnimationEnd:i})};return s.addListener(a),s},We=function(t){var e=Ye(t);return e.setEndValue(1),e},Ge=function(t,e){if(void 0===e&&(e={}),t&&t.length){e.reverse&&t.reverse();var r,n="number"!=typeof(r=e.speed)?1.1:1+Math.min(Math.max(5*r,0),5),i=1/Math.max(Math.min(t.length,100),10),o=t.map((function(t,e){var r=t.getOnUpdateFunc;return t.getOnUpdateFunc=function(t){var s=r(t);return function(t){var r=t.getCurrentValue();(r=r<.01?0:r>.99?1:r)>=i&&o[e+1]&&o[e+1](Math.max(Math.min(r*n,1),0)),s(t)}},t})).map((function(t){var e=Ye(t);if(e)return e.setEndValue.bind(e)})).filter(Boolean);o[0]&&o[0](1)}},$e=function(t){return[0,1,4,5,12,13].map((function(e){return t[e]}))},ze=function(t){return t.top<window.innerHeight&&t.bottom>0&&t.left<window.innerWidth&&t.right>0};function Je(t){return JSON.parse(t.dataset.flipConfig||"{}")}var Qe=function(t,e){var r;return Ie(t,((r={})[e[0]]=e[1],r))}
1,Ze=function(t,e){return De(e?document.querySelectorAll("["+_e+'="'+e+'"]'):t.querySelectorAll("["+we+"]"))},tr=function(t){return t.map((function(t){return[t,t.getBoundingClientRect()]}))};function er(t,e){return(er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rr(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)e.indexOf(r=o[n])>=0||(i[r]=t[r]);return i}new qe;var nr=t.createContext({}),ir=t.createContext("portal"),or=function(t){var e,r;function n(){var e;return(e=t.apply(this,arguments)||this).inProgressAnimations={},e.flipCallbacks={},e.el=void 0,e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,er(e,r);var i=n.prototype;return i.getSnapshotBeforeUpdate=function(t){return t.flipKey!==this.props.flipKey&&this.el?function(t){var e=t.element,r=t.flipCallbacks,n=void 0===r?{}:r,i=t.inProgressAnimations,o=void 0===i?{}:i,s=Ze(e,t.portalKey),a=De(e.querySelectorAll("["+Ce+"]")),c={},u=[],l={};s.filter((function(t){return n&&n[t.dataset.flipId]&&n[t.dataset.flipId].onExit})).forEach((function(t){var e=t.parentNode;if(t.closest){var r=t.closest("[data-exit-container]");r&&(e=r)}var n=u.findIndex((function(t){return t[0]===e}));-1===n&&(u.push([e,e.getBoundingClientRect()]),n=u.length-1),c[t.dataset.flipId]=u[n][1],l[t.dataset.flipId]=e}));var d,h,g=tr(s),p=g.map((function(t){var e=t[0],r=t[1],i={};if(n&&n[e.dataset.flipId]&&n[e.dataset.flipId].onExit){var o=c[e.dataset.flipId];Ie(i,{element:e,parent:l[e.dataset.flipId],childPosition:{top:r.top-o.top,left:r.left-o.left,width:r.width,height:r.height}})}return[e.dataset.flipId,{rect:r,opacity:parseFloat(window.getComputedStyle(e).opacity||"1"),domDataForExitAnimations:i}]})).reduce(Qe,{});return d=o,h=s.concat(a),Object.keys(d).forEach((function(t){d[t].destroy&&d[t].destroy(),d[t].onAnimationEnd&&d[t].onAnimationEnd(!0),delete d[t]})),h.forEach((function(t){t.style.transform="",t.style.opacity=""})),{flippedElementPositions:p,cachedOrderedFlipIds:g.map((function(t){return t[0].dataset.flipId}))}}({element:this.el,flipCallbacks:this.flipCallbacks,inProgressAnimations:this.inProgressAnimations,portalKey:this.props.portalKey}):null},i.componentDidUpdate=function(t,e,r){this.props.flipKey!==t.flipKey&&this.el&&function(t){var e,r,n,i,o,h=t.cachedOrderedFlipIds,g=void 0===h?[]:h,p=t.inProgressAnimations,f=void 0===p?{}:p,v=t.flippedElementPositionsBeforeUpdate,m=void 0===v?{}:v,y=t.flipCallbacks,S=void 0===y?{}:y,D=t.containerEl,O=t.applyTransformOrigin,I=t.spring,b=t.debug,E=t.portalKey,T=t.staggerConfig,w=void 0===T?{}:T,C=t.decisionData,_=void 0===C?{}:C,P=t.handleEnterUpdateDelete,x=t.onComplete,R=t.onStart;if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var A,N=tr(Ze((A={element:D,portalKey:E}).element,A.portalKey)).map((function(t){var e=t[0],r=t[1],n=window.getComputedStyle(e);return[e.dataset.flipId,{element:e,rect:r,opacity:parseFloat(n.opacity),transform:n.transform}]})).reduce(Qe,{}),M=(i=(e={containerEl:D,portalKey:E}).containerEl,(o=e.portalKey)?function(t){return function(e){return De(document.querySelectorAll("["+_e+'="'+t+'"]'+e))}}(o):i?(r=i,n=Math.random().toFixed(5),r.dataset.flipperId=n,function(t){return De(r.querySelectorAll('[data-flipper-id="'+n+'"] '+t))}):function(){return[]}),j=function(t){return function(e){return t("["+we+'="'+e+'"]')[0]}}(M),k=function(t){return m[t]&&N[t]},U=Object.keys(m).concat(Object.keys(N)).filter((function(t){return!k(t)})),L={flipCallbacks:S,getElement:j,flippedElementPositionsBeforeUpdate:m,flippedElementPositionsAfterUpdate:N,inProgressAnimations:f,decisionData:_},H=function(t){var e,r=t.unflippedIds,n=t.flipCallbacks,i=t.getElement,o=t.flippedElementPositionsBeforeUpdate,s=t.flippedElementPositionsAfterUpdate,a=t.inProgressAnimations,c=t.decisionData,u=r.filter((function(t){return s[t]})).filter((function(t){return n[t]&&n[t].onAppear})),l=r.filter((function(t){return o[t]&&n[t]&&n[t].onExit})),d=new Promise((function(t){e=t})),h=[],g=0,p=l.map((function(t,r){var i=o[t].domDataForExitAnimations,s=i.element,u=i.parent,l=i.childPosition,d=l.top,p=l.left,f=l.width,v=l.height;"static"===getComputedStyle(u).position&&(u.style.position="relative"),s.style.transform="matrix(1, 0, 0, 1, 0, 0)",s.style.position="absolute",s.style.top=d+"px",s.style.left=p+"px",s.style.height=v+"px",s.style.width=f+"px";var m=h.filter((function(t){return t[0]===u}))[0];m||(m=[u,document.createDocumentFragment()],h.push(m)),m[1].appendChild(s),g+=1;var y=function(){try{u.removeChild(s)}catch(t){}finally{0==(g-=1)&&e()}};return a[t]={stop:y},function(){return n[t].onExit(s,r,y,c)}}));return h.forEach((function(t){t[0].appendChild(t[1])})),p.length||e(),{hideEnteringElements:function(){u.forEach((function(t){var e=i(t);e&&(e.style.opacity="0")}))},animateEnteringElements:function(){u.forEach((function(t,e){var r=i(t);r&&n[t].onAppear(r,e,c)}))},animateExitingElements:function(){return p.forEach((function(t){return t()})),d}}}(Ie({},L,{unflippedIds:U})),F=H.hideEnteringElements,V=H.animateEnteringElements,B=H.animateExitingElements,K=Ie({},L,{containerEl:D,flippedIds:g.filter(k),applyTransformOrigin:O,spring:I,debug:b,staggerConfig:w,scopedSelector:M,onComplete:x});R&&R(D,_);var q=function(t){var e,r=t.flippedIds,n=t.flipCallbacks,i=t.inProgressAnimations,o=t.flippedElementPositionsBeforeUpdate,h=t.flippedElementPositionsAfterUpdate,g=t.applyTransformOrigin,p=t.spring,f=t.getElement,v=t.debug,m=t.staggerConfig,y=void 0===m?{}:m,S=t.decisionData,D=void 0===S?{}:S,O=t.onComplete,I=t.containerEl,b=new Promise((function(t){e=t}));if(O&&b.then((function(){return O(I,D)})),!r.length)return function(){return e([]),b};var E=[],T=f(r[0]),w=T?T.ownerDocument.querySelector("body"):document.querySelector("body");Oe(r);var C=r.map((function(t){var r=o[t].rect,f=h[t].rect,v=o[t].opacity,m=h[t].opacity,y=f.width<1||f.height<1,S=h[t].element;if(!ze(r)&&!ze(f))return!1;if(!S)return!1;var O,I,b,T=Je(S),_=(b=(I=void 0===(O={flipperSpring:p,flippedSpring:T.spring})?{}:O).flippedSpring,Ie({},Ne.noWobble,Me(I.flipperSpring),Me(b))),P=!0===T.stagger?"default":T.stagger,x={element:S,id:t,stagger:P,springConfig:_};if(n[t]&&n[t].shouldFlip&&!n[t].shouldFlip(D.previous,D.current))return!1;
1var R=Math.abs(r.left-f.left)+Math.abs(r.top-f.top),A=Math.abs(r.width-f.width)+Math.abs(r.height-f.height),N=Math.abs(m-v);if(0===r.height&&0===f.height||0===r.width&&0===f.width||R<.5&&A<.5&&N<.01)return!1;var M=s(h[t].transform),j={matrix:M},k={matrix:[]},U=[M];T.translate&&(U.push(a(r.left-f.left)),U.push(c(r.top-f.top))),T.scale&&(U.push(u(Math.max(r.width,1)/Math.max(f.width,1))),U.push(l(Math.max(r.height,1)/Math.max(f.height,1)))),T.opacity&&(k.opacity=v,j.opacity=m);var L=[];if(!n[t]||!n[t].shouldInvert||n[t].shouldInvert(D.previous,D.current)){var H=function(t,e){return De(t.querySelectorAll("["+Ce+'="'+e+'"]'))}(S,t);L=H.map((function(t){return[t,Je(t)]}))}k.matrix=$e(U.reduce(d)),j.matrix=$e(j.matrix);var F,V=function(t){var e=t.element,r=t.invertedChildren,n=t.body;return function(t){var i=t.matrix,o=t.opacity,s=t.forceMinVals;if(me(o)&&(e.style.opacity=o+""),s&&(e.style.minHeight="1px",e.style.minWidth="1px"),i){var a="matrix("+i.join(", ")+")";e.style.transform=a,r&&function(t){var e=t.matrix,r=t.body;t.invertedChildren.forEach((function(t){var n=t[0],i=t[1];if(r.contains(n)){var o=e[0],s=e[3],a=e[5],c={translateX:0,translateY:0,scaleX:1,scaleY:1},u="";i.translate&&(c.translateX=-e[4]/o,c.translateY=-a/s,u+="translate("+c.translateX+"px, "+c.translateY+"px)"),i.scale&&(c.scaleX=1/o,c.scaleY=1/s,u+=" scale("+c.scaleX+", "+c.scaleY+")"),n.style.transform=u}}))}({invertedChildren:r,matrix:i,body:n})}}}({element:S,invertedChildren:L,body:w});if(n[t]&&n[t].onComplete){var B=n[t].onComplete;F=function(){return B(S,D)}}var K=me(k.opacity)&&me(j.opacity)&&k.opacity!==j.opacity,q=!1;return Ie({},x,{stagger:P,springConfig:_,getOnUpdateFunc:function(e){var r=e.spring,o=e.onAnimationEnd;return i[t]={destroy:r.destroy.bind(r),onAnimationEnd:o},function(e){n[t]&&n[t].onSpringUpdate&&n[t].onSpringUpdate(e.getCurrentValue()),q||(q=!0,n[t]&&n[t].onStart&&n[t].onStart(S,D));var r=e.getCurrentValue();if(w.contains(S)){var i={matrix:[]};i.matrix=k.matrix.map((function(t,e){return Ee(t,j.matrix[e],r)})),K&&(i.opacity=Ee(k.opacity,j.opacity,r)),V(i)}else e.destroy()}},initializeFlip:function(){V({matrix:k.matrix,opacity:K?k.opacity:void 0,forceMinVals:y}),n[t]&&n[t].onStartImmediate&&n[t].onStartImmediate(S,D),T.transformOrigin?S.style.transformOrigin=T.transformOrigin:g&&(S.style.transformOrigin="0 0"),L.forEach((function(t){var e=t[0],r=t[1];r.transformOrigin?e.style.transformOrigin=r.transformOrigin:g&&(e.style.transformOrigin="0 0")}))},onAnimationEnd:function(r){delete i[t],ye(F)&&F(),S.style.transform="",L.forEach((function(t){t[0].style.transform=""})),y&&S&&(S.style.minHeight="",S.style.minWidth=""),r||(E.push(t),E.length>=C.length&&e(E))},delayUntil:T.delayUntil})})).filter(Boolean);if(C.forEach((function(t){return(0,t.initializeFlip)()})),v)return function(){};var _=C.filter((function(t){return t.delayUntil&&(e=t.delayUntil,C.filter((function(t){return t.id===e})).length);var e})),P={},x={},R={};_.forEach((function(t){t.stagger?(R[t.stagger]=!0,x[t.delayUntil]?x[t.delayUntil].push(t.stagger):x[t.delayUntil]=[t.stagger]):P[t.delayUntil]?P[t.delayUntil].push(t):P[t.delayUntil]=[t]}));var A=C.filter((function(t){return t.stagger})).reduce((function(t,e){return t[e.stagger]?t[e.stagger].push(e):t[e.stagger]=[e],t}),{}),N=C.filter((function(t){return-1===_.indexOf(t)}));return N.forEach((function(t){t.onSpringActivate=function(){P[t.id]&&P[t.id].forEach(We),x[t.id]&&Object.keys(x[t.id].reduce((function(t,e){var r;return Ie(t,((r={})[e]=!0,r))}),{})).forEach((function(t){Ge(A[t],y[t])}))}})),function(){return C.length||e([]),N.filter((function(t){return!t.stagger})).forEach(We),Object.keys(A).forEach((function(t){R[t]||Ge(A[t],y[t])})),b}}(K);P?P({hideEnteringElements:F,animateEnteringElements:V,animateExitingElements:B,animateFlippedElements:q}):(F(),B().then(V),q())}}({flippedElementPositionsBeforeUpdate:r.flippedElementPositions,cachedOrderedFlipIds:r.cachedOrderedFlipIds,containerEl:this.el,inProgressAnimations:this.inProgressAnimations,flipCallbacks:this.flipCallbacks,applyTransformOrigin:this.props.applyTransformOrigin,spring:this.props.spring,debug:this.props.debug,portalKey:this.props.portalKey,staggerConfig:this.props.staggerConfig,handleEnterUpdateDelete:this.props.handleEnterUpdateDelete,decisionData:{previous:t.decisionData,current:this.props.decisionData},onComplete:this.props.onComplete,onStart:this.props.onStart})},i.render=function(){var t=this,e=this.props,r=e.portalKey,n=h.createElement(nr.Provider,{value:this.flipCallbacks},h.createElement(e.element,{className:e.className,ref:function(e){return t.el=e}},this.props.children));return r&&(n=h.createElement(ir.Provider,{value:r},n)),n},n}(t.Component);or.defaultProps={applyTransformOrigin:!0,element:"div"};var sr=function(e){var r,n=e.children,i=e.flipId,o=e.inverseFlipId,s=e.portalKey,a=rr(e,["children","flipId","inverseFlipId","portalKey"]),c=n,u=function(t){return"function"==typeof t}(c);if(!u)try{c=t.Children.only(n)}
1catch(d){throw new Error("Each Flipped component must wrap a single child")}a.scale||a.translate||a.opacity||Te.assign(a,{translate:!0,scale:!0,opacity:!0});var l=((r={})[Re]=JSON.stringify(a),r);return void 0!==i?l[Pe]=String(i):o&&(l[xe]=String(o)),void 0!==s&&(l[Ae]=s),u?c(l):t.cloneElement(c,l)},ar=function(t){var e=t.children,r=t.flipId,n=t.shouldFlip,i=t.shouldInvert,o=t.onAppear,s=t.onStart,a=t.onStartImmediate,c=t.onComplete,u=t.onExit,l=t.onSpringUpdate,d=rr(t,["children","flipId","shouldFlip","shouldInvert","onAppear","onStart","onStartImmediate","onComplete","onExit","onSpringUpdate"]);return e?d.inverseFlipId?h.createElement(sr,Object.assign({},d),e):h.createElement(ir.Consumer,null,(function(t){return h.createElement(nr.Consumer,null,(function(g){return Te.isObject(g)&&r&&(g[r]={shouldFlip:n,shouldInvert:i,onAppear:o,onStart:s,onStartImmediate:a,onComplete:c,onExit:u,onSpringUpdate:l}),h.createElement(sr,Object.assign({flipId:r},d,{portalKey:t}),e)}))})):null};ar.displayName="Flipped";export{Dt as D,Jt as F,ve as H,Kt as a,or as h,Wt as u,ar as y};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.