PageSourceSearch

https://pododesk.net/npm.dnd-core.2bb25fb33505fef1c8d6.js

js pododesk.net collected 2026-10-05 02:32:02 UTC 19,064 bytes, 2 lines download raw bytes

vendor: 17,220 bytes, line 1
1"use strict";(globalThis.webpackChunkpod001_frontend=globalThis.webpackChunkpod001_frontend||[]).push([[9898],{38334:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(14890),o=r(49610),i=r(16434),a=r(25921),u=r(84125),s=function(){function e(e,t,r){var i=this;void 0===t&&(t={}),void 0===r&&(r=!1),this.context=t,this.isSetUp=!1,this.handleRefCountChange=function(){var e=i.store.getState().refCount>0;e&&!i.isSetUp?(i.backend.setup(),i.isSetUp=!0):!e&&i.isSetUp&&(i.backend.teardown(),i.isSetUp=!1)};var s=function(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return n.createStore(o.default,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r);this.store=s,this.monitor=new a.default(s,new u.default(s)),this.backend=e(this),s.subscribe(this.handleRefCountChange)}return e.prototype.getContext=function(){return this.context},e.prototype.getMonitor=function(){return this.monitor},e.prototype.getBackend=function(){return this.backend},e.prototype.getRegistry=function(){return this.monitor.registry},e.prototype.getActions=function(){var e=this,t=this.store.dispatch,r=i.default(this);return Object.keys(r).reduce(function(n,o){var i,a=r[o];return n[o]=(i=a,function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=i.apply(e,r);void 0!==o&&t(o)}),n},{})},e.prototype.dispatch=function(e){this.store.dispatch(e)},e}();t.default=s},25921:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(40809),o=r(52705),i=r(42520),a=r(41143),u=function(){function e(e,t){this.store=e,this.registry=t}return e.prototype.subscribeToStateChange=function(e,t){var r=this;void 0===t&&(t={handlerIds:void 0});var n=t.handlerIds;a("function"==typeof e,"listener must be a function."),a(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId;return this.store.subscribe(function(){var t=r.store.getState(),a=t.stateId;try{a===o||a===o+1&&!i.areDirty(t.dirtyHandlerIds,n)||e()}finally{o=a}})},e.prototype.subscribeToOffsetChange=function(e){var t=this;a("function"==typeof e,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe(function(){var n=t.store.getState().dragOffset;n!==r&&(r=n,e())})},e.prototype.canDragSource=function(e){if(!e)return!1;var t=this.registry.getSource(e);return a(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)},e.prototype.canDropOnTarget=function(e){if(!e)return!1;var t=this.registry.getTarget(e);if(a(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var r=this.registry.getTargetType(e),o=this.getItemType();return n.default(r,o)&&t.canDrop(this,e)},e.prototype.isDragging=function(){return Boolean(this.getItemType())},e.prototype.isDraggingSource=function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return a(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)},e.prototype.isOverTarget=function(e,t){if(void 0===t&&(t={shallow:!1}),!e)return!1;var r=t.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(e),i=this.getItemType();if(i&&!n.default(o,i))return!1;var a=this.getTargetIds();if(!a.length)return!1;var u=a.indexOf(e);return r?u===a.length-1:u>-1},e.prototype.getItemType=function(){return this.store.getState().dragOperation.itemType},e.prototype.getItem=function(){return this.store.getState().dragOperation.item},e.prototype.getSourceId=function(){return this.store.getState().dragOperation.sourceId},e.prototype.getTargetIds=function(){return this.store.getState().dragOperation.targetIds},e.prototype.getDropResult=function(){return this.store.getState().dragOperation.dropResult},e.prototype.didDrop=function(){return this.store.getState().dragOperation.didDrop},e.prototype.isSourcePublic=function(){return this.store.getState().dragOperation.isSourcePublic},e.prototype.getInitialClientOffset=function(){return this.store.getState().dragOffset.initialClientOffset},e.prototype.getInitialSourceClientOffset=function(){return this.store.getState().dragOffset.initialSourceClientOffset},e.prototype.getClientOffset=function(){return this.store.getState().dragOffset.clientOffset},e.prototype.getSourceClientOffset=function(){return o.getSourceClientOffset(this.store.getState().dragOffset)},e.prototype.getDifferenceFromInitialOffset=function(){return o.getDifferenceFromInitialOffset(this.store.getState().dragOffset)},e}();t.default=u},84125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(4963),o=r(47227),i=r(56141),a=r(34314),u=r(41143),s=r(69272);function c(e){switch(e[0]){case"S":return i.HandlerRole.SOURCE;case"T":return i.HandlerRole.TARGET;default:u(!1,"Cannot parse handler ID: "+e)}}function d(e,t){var r=e.entries(),n=!1;do{var o=r.next(),i=o.done;if(o.value[1]===t)return!0;n=i}while(!n);return!1}var f=function(){function e(e){this.store=e,this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null}return e.prototype.addSource=function(e,t){a.validateType(e),a.validateSourceContract(t);var r=this.addHandler(i.HandlerRole.SOURCE,e,t);return this.store.dispatch(n.addSource(r)),r},e.prototype.addTarget=function(e,t){a.validateType(e,!0),a.validateTargetContract(t);var r=this.addHandler(i.HandlerRole.TARGET,e,t);return this.store.dispatch(n.addTarget(r)),r},e.prototype.containsHandler=function(e){return d(this.dragSources,e)||d(this.dropTargets,e)},e.prototype.getSource=function(e,t){return void 0===t&&(t=!1),u(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)},e.prototype.getTarget=function(e){return u(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)},e.prototype.getSourceType=function(e){return u(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)},e.prototype.getTargetType=function(e){return u(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)},e.prototype.isSourceId=function(e){return c(e)===i.HandlerRole.SOURCE},e.prototype.isTargetId=function(e){return c(e)===i.HandlerRole.TARGET},e.prototype.removeSource=function(e){var t=this;u(this.getSource(e),"Expected an existing source."),this.store.dispatch(n.removeSource(e)),s(function(){t.dragSources.delete(e),t.types.delete(e)})},e.prototype.removeTarget=function(e){u(this.getTarget(e),"Expected an existing target."),this.store.dispatch(n.removeTarget(e)),this.dropTargets.delete(e),this.types.delete(e)},e.prototype.pinSource=function(e){var t=this.getSource(e);u(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t},e.prototype.unpinSource=function(){u(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null},e.prototype.addHandler=function(e,t,r){var n=function(e){var t=o.default().toString();switch(e){case i.HandlerRole.SOURCE:return"S"+t;case i.HandlerRole.TARGET:return"T"+t;default:throw new Error("Unknown Handler Role: "+e)}}(e);return this.types.set(n,t),e===i.HandlerRole.SOURCE?this.dragSources.set(n,r):e===i.HandlerRole.TARGET&&this.dropTargets.set(n,r),n},e}();t.default=f},84554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(46714),o=r(15033),i=r(41143),a=r(59980),u={type:a.INIT_COORDS,payload:{clientOffset:null,sourceClientOffset:null}};t.default=function(e){return function(t,r){void 0===t&&(t=[]),void 0===r&&(r={publishSource:!0});var s=r.publishSource,c=void 0===s||s,d=r.clientOffset,f=r.getSourceClientOffset,l=e.getMonitor(),p=e.getRegistry();e.dispatch(n.setClientOffset(d)),function(e,t,r){i(!t.isDragging(),"Cannot call beginDrag while dragging.");for(var n=0,o=e;n<o.length;n++){var a=o[n];i(r.getSource(a),"Expected sourceIds to be registered.")}}(t,l,p);var g=function(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}(t,l);if(null!==g){var y=null;d&&(function(e){i("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(f),y=f(g)),e.dispatch(n.setClientOffset(d,y));var h=p.getSource(g).beginDrag(l,g);!function(e){i(o.isObject(e),"Item must be an object.")}(h),p.pinSource(g);var v=p.getSourceType(g);return{type:a.BEGIN_DRAG,payload:{itemType:v,item:h,sourceId:g,clientOffset:d||null,sourceClientOffset:y||null,isSourcePublic:!!c}}}e.dispatch(u)}}},76402:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(59980),i=r(15033),a=r(41143);t.default=function(e){return function(t){void 0===t&&(t={});var r=e.getMonitor(),u=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);var s=function(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(r);s.forEach(function(s,c){var d=function(e,t,r,n){var o=r.getTarget(e),u=o?o.drop(n,e):void 0;return function(e){a(void 0===e||i.isObject(e),"Drop result must either be an object or undefined.")}(u),void 0===u&&(u=0===t?{}:n.getDropResult()),u}(s,c,u,r),f={type:o.DROP,payload:{dropResult:n({},t,d)}};e.dispatch(f)})}}},52126:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(59980),o=r(41143);t.default=function(e){return function(){var t=e.getMonitor(),r=e.getRegistry();!function(e){o(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var i=t.getSourceId();return r.getSource(i,!0).endDrag(t,i),r.unpinSource(),{type:n.END_DRAG}}}},45140:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(40809),o=r(59980),i=r(41143);t.default=function(e){return function(t,r){var a=(void 0===r?{}:r).clientOffset;!function(e){i(Array.isArray(e),"Expected targetIds to be an array.")}(t);var u=t.slice(0),s=e.getMonitor(),c=e.getRegistry();return function(e,t,r){i(t.isDragging(),"Cannot call hover while not dragging."),i(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var o=e[n];i(e.lastIndexOf(o)===n,"Expected targetIds to be unique in the passed array.");var a=r.getTarget(o);i(a,"Expected targetIds to be registered.")}}(u,s,c),function(e,t,r){for(var o=e.length-1;o>=0;o--){var i=e[o],a=t.getTargetType(i);n.default(a,r)||e.splice(o,1)}}(u,c,s.getItemType()),function(e,t,r){for(var n=0,o=e;n<o.length;n++){var i=o[n];r.getTarget(i).hover(t,i)}}(u,s,c),{type:o.HOVER,payload:{targetIds:u,clientOffset:a||null}}}}},16434:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(84554),o=r(86045),i=r(45140),a=r(76402),u=r(52126);!function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(59980)),t.default=function(e){return{beginDrag:n.default(e),publishDragSource:o.default(e),hover:i.default(e),drop:a.default(e),endDrag:u.default(e)}}},46714:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(59980);t.setClientOffset=function(e,t){return{type:n.INIT_COORDS,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}},86045:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(59980);t.default=function(e){return function(){if(e.getMonitor().isDragging())return{type:n.PUBLISH_DRAG_SOURCE}}}},59980:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.INIT_COORDS="dnd-core/INIT_COORDS",t.BEGIN_DRAG="dnd-core/BEGIN_DRAG",t.PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",t.HOVER="dnd-core/HOVER",t.DROP="dnd-core/DROP",t.END_DRAG="dnd-core/END_DRAG"},4963:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ADD_SOURCE="dnd-core/ADD_SOURCE",t.ADD_TARGET="dnd-core/ADD_TARGET",t.REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",t.REMOVE_TARGET="dnd-core/REMOVE_TARGET",t.addSource=function(e){return{type:t.ADD_SOURCE,payload:{sourceId:e}}},t.addTarget=function(e){return{type:t.ADD_TARGET,payload:{targetId:e}}},t.removeSource=function(e){return{type:t.REMOVE_SOURCE,payload:{sourceId:e}}},t.removeTarget=function(e){return{type:t.REMOVE_TARGET,payload:{targetId:e}}}},34314:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(41143);t.validateSourceContract=function(e){n("function"==typeof e.canDrag,"Expected canDrag to be a function."),n("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),n("function"==typeof e.endDrag,"Expected endDrag to be a function.")},t.validateTargetContract=function(e){n("function"==typeof e.canDrop,"Expected canDrop to be a function."),n("function"==typeof e.hover,"Expected hover to be a function."),n("function"==typeof e.drop,"Expected beginDrag to be a function.")},t.validateType=function e(t,r){r&&Array.isArray(t)?t.forEach(function(t){return e(t,!1)}):n("string"==typeof t||"symbol"==typeof t,r?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}},94662:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(38334);t.createDragDropManager=function(e,t,r){return new n.default(e,t,r)}},20369:(e,t,r)=>{function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(56141)),n(r(94662))},56141:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),(r=t.HandlerRole||(t.HandlerRole={})).SOURCE="SOURCE",r.TARGET="TARGET"},54014:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(16434),o=r(4963),i=r(71939),a=r(42520),u=r(15033);t.default=function(e,t){switch(void 0===e&&(e=a.NONE),t.type){case n.HOVER:break;case o.ADD_SOURCE:case o.ADD_TARGET:case o.REMOVE_TARGET:case o.REMOVE_SOURCE:return a.NONE;case n.BEGIN_DRAG:case n.PUBLISH_DRAG_SOURCE:case n.END_DRAG:case n.DROP:default:return a.ALL}var r=t.payload,s=r.targetIds,c=void 0===s?[]:s,d=r.prevTargetIds,f=void 0===d?[]:d,l=u.xor(c,f);if(!(l.length>0)&&i.areArraysEqual(c,f))return a.NONE;var p=f[f.length-1],g=c[c.length-1];return p!==g&&(p&&l.push(p),g&&l.push(g)),l}},14095:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(16434),i=r(71939),a={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};t.default=function(e,t){void 0===e&&(e=a);var r=t.payload;switch(t.type){case o.INIT_COORDS:case o.BEGIN_DRAG:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case o.HOVER:return i.areCoordsEqual(e.clientOffset,r.clientOffset)?e:n({},e,{clientOffset:r.clientOffset});case o.END_DRAG:case o.DROP:return a;default:return e}}},30832:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(16434),i=r(4963),a=r(15033),u={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};t.default=function(e,t){void 0===e&&(e=u);var r=t.payload;switch(t.type){case o.BEGIN_DRAG:return n({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case o.PUBLISH_DRAG_SOURCE:return n({},e,{isSourcePublic:!0});case o.HOVER:return n({},e,{targetIds:r.targetIds});case i.REMOVE_TARGET:return-1===e.targetIds.indexOf(r.targetId)?e:n({},e,{targetIds:a.without(e.targetIds,r.targetId)});case o.DROP:return n({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case o.END_DRAG:return n({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}},49610:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(14095),i=r(30832),a=r(78508),u=r(54014),s=r(38910),c=r(15033);t.default=function(e,t){return void 0===e&&(e={}),{dirtyHandlerIds:u.default(e.dirtyHandlerIds,{type:t.type,payload:n({},t.payload,{prevTargetIds:c.get(e,"dragOperation.targetIds",[])})}),dragOffset:o.default(e.dragOffset,t),refCount:a.default(e.refCount,t),dragOperation:i.default(e.dragOperation,t),stateId:s.default(e.stateId)}}},78508:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(4963);t.default=function(e,t){switch(void 0===e&&(e=0),t.type){case n.ADD_SOURCE:case n.ADD_TARGET:return e+1;case n.REMOVE_SOURCE:case n.REMOVE_TARGET:return e-1;default:return e}}},38910:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=0),e+1}},52705:(e,t)=>{function r(e,t){return{x:e.x+t.x,y:e.y+t.y}}function n(e,t){return{x:e.x-t.x,y:e.y-t.y}}
1Object.defineProperty(t,"__esModule",{value:!0}),t.add=r,t.subtract=n,t.getSourceClientOffset=function(e){var t=e.clientOffset,o=e.initialClientOffset,i=e.initialSourceClientOffset;return t&&o&&i?n(r(t,i),o):null},t.getDifferenceFromInitialOffset=function(e){var t=e.clientOffset,r=e.initialClientOffset;return t&&r?n(t,r):null}},42520:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(15033);t.NONE=[],t.ALL=[],t.NONE.__IS_NONE__=!0,t.ALL.__IS_ALL__=!0,t.areDirty=function(e,r){return e!==t.NONE&&(e===t.ALL||void 0===r||n.intersection(r,e).length>0)}},15033:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.get=function(e,t,r){return t.split(".").reduce(function(e,t){return e&&e[t]?e[t]:r||null},e)},t.without=function(e,t){return e.filter(function(e){return e!==t})},t.isString=function(e){return"string"==typeof e},t.isObject=function(e){return"object"==typeof e},t.xor=function(e,t){var r=new Map,n=function(e){return r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);var o=[];return r.forEach(function(e,t){1===e&&o.push(t)}),o},t.intersection=function(e,t){return e.filter(function(e){return t.indexOf(e)>-1})}},71939:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.strictEquality=function(e,t){return e===t},t.areCoordsEqual=function(e,t){return!e&&!t||!(!e||!t)&&e.x===t.x&&e.y===t.y},t.areArraysEqual=function(e,r,n){if(void 0===n&&(n=t.strictEquality),e.length!==r.length)return!1;for(var o=0;o<e.length;++o)if(!n(e[o],r[o]))return!1;return!0}},47227:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=0;t.default=function(){return r++}},40809:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return null===t?null===e:Array.isArray(e)?e.some(function(e){return e===t}):e===t}}}]);
2//# sourceMappingURL=npm.dnd-core.2bb25fb33505fef1c8d6.js.map

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.