@sassoftware/va-report-components
Version:
The SAS Visual Analytics SDK is a set of JavaScript APIs and web components that enable SAS Visual Analytics report content to be easily embedded in a third-party application or web page.
2 lines • 31.7 kB
JavaScript
/*! License information is available at ../../LICENSE.txt and ../../LICENSE-3RD-PARTY.txt */"use strict";(globalThis["va-report-componentsJsonp"]=globalThis["va-report-componentsJsonp"]||[]).push([[38],{776:e=>{e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)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((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},775:(e,t,r)=>{r.r(t),r.d(t,{DndContext:()=>i,DndProvider:()=>ge,DragPreviewImage:()=>fe,useDrag:()=>He,useDragDropManager:()=>Pe,useDragLayer:()=>_e,useDrop:()=>$e});var n=r(2);const i=(0,n.createContext)({dragDropManager:void 0});var o=r(132),s=r(710);function a(e,t,...r){if("undefined"!=typeof process&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let n=0;e=new Error(t.replace(/%s/g,(function(){return r[n++]}))),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function c(e){return"object"==typeof e}const u="dnd-core/INIT_COORDS",d="dnd-core/BEGIN_DRAG",l="dnd-core/PUBLISH_DRAG_SOURCE",g="dnd-core/HOVER",h="dnd-core/DROP",f="dnd-core/END_DRAG";function p(e,t){return{type:u,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const y={type:u,payload:{clientOffset:null,sourceClientOffset:null}};function O(e){return function(t=[],r={publishSource:!0}){const{publishSource:n=!0,clientOffset:i,getSourceClientOffset:o}=r,s=e.getMonitor(),u=e.getRegistry();e.dispatch(p(i)),function(e,t,r){a(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){a(r.getSource(e),"Expected sourceIds to be registered.")}))}(t,s,u);const l=function(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}(t,s);if(null==l)return void e.dispatch(y);let g=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");!function(e){a("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(o),g=o(l)}e.dispatch(p(i,g));const h=u.getSource(l).beginDrag(s,l);if(null==h)return;!function(e){a(c(e),"Item must be an object.")}(h),u.pinSource(l);const f=u.getSourceType(l);return{type:d,payload:{itemType:f,item:h,sourceId:l,clientOffset:i||null,sourceClientOffset:g||null,isSourcePublic:!!n}}}}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){b(e,t,r[t])}))}return e}function D(e){return function(t={}){const r=e.getMonitor(),n=e.getRegistry();!function(e){a(e.isDragging(),"Cannot call drop while not dragging."),a(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(r);const i=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(r);i.forEach(((i,o)=>{const s=function(e,t,r,n){const i=r.getTarget(e);let o=i?i.drop(n,e):void 0;(function(e){a(void 0===e||c(e),"Drop result must either be an object or undefined.")})(o),void 0===o&&(o=0===t?{}:n.getDropResult());return o}(i,o,n,r),u={type:h,payload:{dropResult:S({},t,s)}};e.dispatch(u)}))}}function I(e){return function(){const t=e.getMonitor(),r=e.getRegistry();!function(e){a(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const n=t.getSourceId();if(null!=n){r.getSource(n,!0).endDrag(t,n),r.unpinSource()}return{type:f}}}function v(e,t){return null===t?null===e:Array.isArray(e)?e.some((e=>e===t)):e===t}function T(e){return function(t,{clientOffset:r}={}){!function(e){a(Array.isArray(e),"Expected targetIds to be an array.")}(t);const n=t.slice(0),i=e.getMonitor(),o=e.getRegistry();return function(e,t,r){for(let n=e.length-1;n>=0;n--){const i=e[n];v(t.getTargetType(i),r)||e.splice(n,1)}}(n,o,i.getItemType()),function(e,t,r){a(t.isDragging(),"Cannot call hover while not dragging."),a(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const n=e[t];a(e.lastIndexOf(n)===t,"Expected targetIds to be unique in the passed array.");a(r.getTarget(n),"Expected targetIds to be registered.")}}(n,i,o),function(e,t,r){e.forEach((function(e){r.getTarget(e).hover(t,e)}))}(n,i,o),{type:g,payload:{targetIds:n,clientOffset:r||null}}}}function m(e){return function(){if(e.getMonitor().isDragging())return{type:l}}}class w{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const r=function(e){return{beginDrag:O(e),publishDragSource:m(e),hover:T(e),drop:D(e),endDrag:I(e)}}(this);return Object.keys(r).reduce(((n,i)=>{const o=r[i];var s;return n[i]=(s=o,(...r)=>{const n=s.apply(e,r);void 0!==n&&t(n)}),n}),{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function C(e,t){return{x:e.x-t.x,y:e.y-t.y}}const E=[],P=[];E.__IS_NONE__=!0,P.__IS_ALL__=!0;class R{subscribeToStateChange(e,t={}){const{handlerIds:r}=t;a("function"==typeof e,"listener must be a function."),a(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe((()=>{const t=this.store.getState(),i=t.stateId;try{const o=i===n||i===n+1&&!function(e,t){return e!==E&&(e===P||void 0===t||(r=e,t.filter((e=>r.indexOf(e)>-1))).length>0);var r}(t.dirtyHandlerIds,r);o||e()}finally{n=i}}))}subscribeToOffsetChange(e){a("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe((()=>{const r=this.store.getState().dragOffset;r!==t&&(t=r,e())}))}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return a(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(a(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return v(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(a(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:r}=t;if(!this.isDragging())return!1;const n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!v(n,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const s=o.indexOf(e);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(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return t&&r&&n?C((o=n,{x:(i=t).x+o.x,y:i.y+o.y}),r):null;var i,o}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:r}=e;return t&&r?C(t,r):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const M="undefined"!=typeof global?global:self,x=M.MutationObserver||M.WebKitMutationObserver;function j(e){return function(){const t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}const k="function"==typeof x?function(e){let t=1;const r=new x(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}:j;class H{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const _=new class{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,r=e.length-this.index;t<r;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=k(this.flush),this.requestErrorThrow=j((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},A=new class{create(e){const t=this.freeTasks,r=t.length?t.pop():new H(this.onError,(e=>t[t.length]=e));return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}(_.registerPendingError);const U="dnd-core/ADD_SOURCE",N="dnd-core/ADD_TARGET",G="dnd-core/REMOVE_SOURCE",q="dnd-core/REMOVE_TARGET";function B(e,t){t&&Array.isArray(e)?e.forEach((e=>B(e,!1))):a("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var $;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}($||($={}));let F=0;function L(e){const t=(F++).toString();switch(e){case $.SOURCE:return`S${t}`;case $.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function V(e){switch(e[0]){case"S":return $.SOURCE;case"T":return $.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Y(e,t){const r=e.entries();let n=!1;do{const{done:e,value:[,i]}=r.next();if(i===t)return!0;n=!!e}while(!n);return!1}class W{addSource(e,t){B(e),function(e){a("function"==typeof e.canDrag,"Expected canDrag to be a function."),a("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),a("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const r=this.addHandler($.SOURCE,e,t);return this.store.dispatch(function(e){return{type:U,payload:{sourceId:e}}}(r)),r}addTarget(e,t){B(e,!0),function(e){a("function"==typeof e.canDrop,"Expected canDrop to be a function."),a("function"==typeof e.hover,"Expected hover to be a function."),a("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const r=this.addHandler($.TARGET,e,t);return this.store.dispatch(function(e){return{type:N,payload:{targetId:e}}}(r)),r}containsHandler(e){return Y(this.dragSources,e)||Y(this.dropTargets,e)}getSource(e,t=!1){a(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return a(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return a(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return a(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return V(e)===$.SOURCE}isTargetId(e){return V(e)===$.TARGET}removeSource(e){var t;a(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:G,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},_.enqueueTask(A.create(t))}removeTarget(e){a(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:q,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);a(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){a(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){const n=L(e);return this.types.set(n,t),e===$.SOURCE?this.dragSources.set(n,r):e===$.TARGET&&this.dropTargets.set(n,r),n}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const X=(e,t)=>e===t;function J(e=E,t){switch(t.type){case g:break;case U:case N:case q:case G:return E;default:return P}const{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=function(e,t){const r=new Map,n=e=>{r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);const i=[];return r.forEach(((e,t)=>{1===e&&i.push(t)})),i}(r,n);if(!(i.length>0||!function(e,t,r=X){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}(r,n)))return E;const o=n[n.length-1],s=r[r.length-1];return o!==s&&(o&&i.push(o),s&&i.push(s)),i}function K(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const z={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Q(e=z,t){const{payload:r}=t;switch(t.type){case u:case d:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case g:return n=e.clientOffset,i=r.clientOffset,!n&&!i||n&&i&&n.x===i.x&&n.y===i.y?e:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){K(e,t,r[t])}))}return e}({},e,{clientOffset:r.clientOffset});case f:case h:return z;default:return e}var n,i}function Z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Z(e,t,r[t])}))}return e}const te={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function re(e=te,t){const{payload:r}=t;switch(t.type){case d:return ee({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case l:return ee({},e,{isSourcePublic:!0});case g:return ee({},e,{targetIds:r.targetIds});case q:return-1===e.targetIds.indexOf(r.targetId)?e:ee({},e,{targetIds:(n=e.targetIds,i=r.targetId,n.filter((e=>e!==i)))});case h:return ee({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case f:return ee({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var n,i}function ne(e=0,t){switch(t.type){case U:case N:return e+1;case G:case q:return e-1;default:return e}}function ie(e=0){return e+1}function oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){oe(e,t,r[t])}))}return e}function ae(e={},t){return{dirtyHandlerIds:J(e.dirtyHandlerIds,{type:t.type,payload:se({},t.payload,{prevTargetIds:(r=e,n="dragOperation.targetIds",i=[],n.split(".").reduce(((e,t)=>e&&e[t]?e[t]:i||null),r))})}),dragOffset:Q(e.dragOffset,t),refCount:ne(e.refCount,t),dragOperation:re(e.dragOperation,t),stateId:ie(e.stateId)};var r,n,i}function ce(e,t=void 0,r={},n=!1){const i=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return(0,s.MT)(ae,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(n),o=new R(i,new W(i)),a=new w(i,o),c=e(a,t,r);return a.receiveBackend(c),a}function ue(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}let de=0;const le=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var ge=(0,n.memo)((function(e){var{children:t}=e,r=ue(e,["children"]);const[s,a]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e,t=he(),r,n){const i=t;i[le]||(i[le]={dragDropManager:ce(e,t,r,n)});return i[le]}(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}(r);return(0,n.useEffect)((()=>{if(a){const e=he();return++de,()=>{0==--de&&(e[le]=null)}}}),[]),(0,o.jsx)(i.Provider,{value:s,children:t})}));function he(){return"undefined"!=typeof global?global:window}const fe=(0,n.memo)((function({connect:e,src:t}){return(0,n.useEffect)((()=>{if("undefined"==typeof Image)return;let r=!1;const n=new Image;return n.src=t,n.onload=()=>{e(n),r=!0},()=>{r&&e(null)}})),null}));var pe=r(776);const ye="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function Oe(e,t,r){const[i,o]=(0,n.useState)((()=>t(e))),s=(0,n.useCallback)((()=>{const n=t(e);pe(i,n)||(o(n),r&&r())}),[i,e,r]);return ye(s),[i,s]}function be(e,t,r){return function(e,t,r){const[n,i]=Oe(e,t,r);return ye((function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(i,{handlerIds:[t]})}),[e,i]),n}(t,e||(()=>({})),(()=>r.reconnect()))}function Se(e,t){const r=[...t||[]];return null==t&&"function"!=typeof e&&r.push(e),(0,n.useMemo)((()=>"function"==typeof e?e():e),r)}function De(e){return(0,n.useMemo)((()=>e.hooks.dragSource()),[e])}function Ie(e){return(0,n.useMemo)((()=>e.hooks.dragPreview()),[e])}function ve(e,t,r,n){let i=r?r.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let s=0;s<o.length;s++){const c=o[s];if(!a(c))return!1;const u=e[c],d=t[c];if(i=r?r.call(n,u,d,c):void 0,!1===i||void 0===i&&u!==d)return!1}return!0}function Te(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function me(e){return(t=null,r=null)=>{if(!(0,n.isValidElement)(t)){const n=t;return e(n,r),n}const i=t;!function(e){if("string"==typeof e.type)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.`)}(i);return function(e,t){const r=e.ref;return a("string"!=typeof r,"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?(0,n.cloneElement)(e,{ref:e=>{Ce(r,e),Ce(t,e)}}):(0,n.cloneElement)(e,{ref:t})}(i,r?t=>e(t,r):e)}}function we(e){const t={};return Object.keys(e).forEach((r=>{const n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const e=me(n);t[r]=()=>e}})),t}function Ce(e,t){"function"==typeof e?e(t):e.current=t}class Ee{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();r&&this.disconnectDragPreview(),this.handlerId&&(t?r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ve(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ve(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=we({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,Te(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,Te(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}function Pe(){const{dragDropManager:e}=(0,n.useContext)(i);return a(null!=e,"Expected drag drop context"),e}let Re=!1,Me=!1;class xe{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){a(!Re,"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 Re=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Re=!1}}isDragging(){if(!this.sourceId)return!1;a(!Me,"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 Me=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Me=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}class je{beginDrag(){const e=this.spec,t=this.monitor;let r=null;return r="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=r?r:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const r=this.spec,n=this.monitor,{isDragging:i}=r;return i?i(n):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,r=this.connector,{end:n}=e;n&&n(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}}function ke(e,t,r){const i=Pe(),o=function(e,t,r){const i=(0,n.useMemo)((()=>new je(e,t,r)),[t,r]);return(0,n.useEffect)((()=>{i.spec=e}),[e]),i}(e,t,r),s=function(e){return(0,n.useMemo)((()=>{const t=e.type;return a(null!=t,"spec.type must be defined"),t}),[e])}(e);ye((function(){if(null!=s){const[e,n]=function(e,t,r){const n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}(s,o,i);return t.receiveHandlerId(e),r.receiveHandlerId(e),n}}),[i,t,r,o,s])}function He(e,t){const r=Se(e,t);a(!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 i=function(){const e=Pe();return(0,n.useMemo)((()=>new xe(e)),[e])}(),o=function(e,t){const r=Pe(),i=(0,n.useMemo)((()=>new Ee(r.getBackend())),[r]);return ye((()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource())),[i,e]),ye((()=>(i.dragPreviewOptions=t||null,i.reconnect(),()=>i.disconnectDragPreview())),[i,t]),i}(r.options,r.previewOptions);return ke(r,i,o),[be(r.collect,i,o),De(o),Ie(o)]}function _e(e){const t=Pe().getMonitor(),[r,i]=Oe(t,e);return(0,n.useEffect)((()=>t.subscribeToOffsetChange(i))),(0,n.useEffect)((()=>t.subscribeToStateChange(i))),r}function Ae(e){return(0,n.useMemo)((()=>e.hooks.dropTarget()),[e])}class Ue{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!ve(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=we({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,Te(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}let Ne=!1;class Ge{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;a(!Ne,"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 Ne=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ne=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}class qe{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function Be(e,t,r){const i=Pe(),o=function(e,t){const r=(0,n.useMemo)((()=>new qe(e,t)),[t]);return(0,n.useEffect)((()=>{r.spec=e}),[e]),r}(e,t),s=function(e){const{accept:t}=e;return(0,n.useMemo)((()=>(a(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t])),[t])}(e);ye((function(){const[e,n]=function(e,t,r){const n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}(s,o,i);return t.receiveHandlerId(e),r.receiveHandlerId(e),n}),[i,t,o,r,s.map((e=>e.toString())).join("|")])}function $e(e,t){const r=Se(e,t),i=function(){const e=Pe();return(0,n.useMemo)((()=>new Ge(e)),[e])}(),o=function(e){const t=Pe(),r=(0,n.useMemo)((()=>new Ue(t.getBackend())),[t]);return ye((()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget())),[e]),r}(r.options);return Be(r,i,o),[be(r.collect,i,o),Ae(o)]}}}]);
//# sourceMappingURL=38.va-report-components.js.map