"use strict";(self["webpackChunktutor"]=self["webpackChunktutor"]||[]).push([["4"],{67618:function(t,e,n){n.d(e,{EW:()=>b,O8:()=>a,QZ:()=>E,vA:()=>s,vP:()=>p});var r=Symbol.for("preact-signals");function i(){if(!(c>1)){var t,e=!1;while(void 0!==l){var n=l;l=void 0;u++;while(void 0!==n){var r=n.o;n.o=void 0;n.f&=-3;if(!(8&n.f)&&v(n))try{n.c()}catch(n){if(!e){t=n;e=!0}}n=r}}u=0;c--;if(e)throw t}else c--}function s(t){if(c>0)return t();c++;try{return t()}finally{i()}}var o=void 0;function a(t){var e=o;o=void 0;try{return t()}finally{o=e}}var l=void 0,c=0,u=0,h=0;function d(t){if(void 0!==o){var e=t.n;if(void 0===e||e.t!==o){e={i:0,S:t,p:o.s,n:void 0,t:o,e:void 0,x:void 0,r:e};if(void 0!==o.s)o.s.n=e;o.s=e;t.n=e;if(32&o.f)t.S(e);return e}else if(-1===e.i){e.i=0;if(void 0!==e.n){e.n.p=e.p;if(void 0!==e.p)e.p.n=e.n;e.p=o.s;e.n=void 0;o.s.n=e;o.s=e}return e}}}function f(t,e){this.v=t;this.i=0;this.n=void 0;this.t=void 0;this.W=null==e?void 0:e.watched;this.Z=null==e?void 0:e.unwatched;this.name=null==e?void 0:e.name}f.prototype.brand=r;f.prototype.h=function(){return!0};f.prototype.S=function(t){var e=this,n=this.t;if(n!==t&&void 0===t.e){t.x=n;this.t=t;if(void 0!==n)n.e=t;else a(function(){var t;null==(t=e.W)||t.call(e)})}};f.prototype.U=function(t){var e=this;if(void 0!==this.t){var n=t.e,r=t.x;if(void 0!==n){n.x=r;t.e=void 0}if(void 0!==r){r.e=n;t.x=void 0}if(t===this.t){this.t=r;if(void 0===r)a(function(){var t;null==(t=e.Z)||t.call(e)})}}};f.prototype.subscribe=function(t){var e=this;return E(function(){var n=e.value,r=o;o=void 0;try{t(n)}finally{o=r}},{name:"sub"})};f.prototype.valueOf=function(){return this.value};f.prototype.toString=function(){return this.value+""};f.prototype.toJSON=function(){return this.value};f.prototype.peek=function(){var t=o;o=void 0;try{return this.value}finally{o=t}};Object.defineProperty(f.prototype,"value",{get:function(){var t=d(this);if(void 0!==t)t.i=this.i;return this.v},set:function(t){if(t!==this.v){if(u>100)throw new Error("Cycle detected");this.v=t;this.i++;h++;c++;try{for(var e=this.t;void 0!==e;e=e.x)e.t.N()}finally{i()}}}});function p(t,e){return new f(t,e)}function v(t){for(var e=t.s;void 0!==e;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function g(t){for(var e=t.s;void 0!==e;e=e.n){var n=e.S.n;if(void 0!==n)e.r=n;e.S.n=e;e.i=-1;if(void 0===e.n){t.s=e;break}}}function y(t){var e=t.s,n=void 0;while(void 0!==e){var r=e.p;if(-1===e.i){e.S.U(e);if(void 0!==r)r.n=e.n;if(void 0!==e.n)e.n.p=r}else n=e;e.S.n=e.r;if(void 0!==e.r)e.r=void 0;e=r}t.s=n}function m(t,e){f.call(this,void 0);this.x=t;this.s=void 0;this.g=h-1;this.f=4;this.W=null==e?void 0:e.watched;this.Z=null==e?void 0:e.unwatched;this.name=null==e?void 0:e.name}m.prototype=new f;m.prototype.h=function(){this.f&=-3;if(1&this.f)return!1;if(32==(36&this.f))return!0;this.f&=-5;if(this.g===h)return!0;this.g=h;this.f|=1;if(this.i>0&&!v(this)){this.f&=-2;return!0}var t=o;try{g(this);o=this;var e=this.x();if(16&this.f||this.v!==e||0===this.i){this.v=e;this.f&=-17;this.i++}}catch(t){this.v=t;this.f|=16;this.i++}o=t;y(this);this.f&=-2;return!0};m.prototype.S=function(t){if(void 0===this.t){this.f|=36;for(var e=this.s;void 0!==e;e=e.n)e.S.S(e)}f.prototype.S.call(this,t)};m.prototype.U=function(t){if(void 0!==this.t){f.prototype.U.call(this,t);if(void 0===this.t){this.f&=-33;for(var e=this.s;void 0!==e;e=e.n)e.S.U(e)}}};m.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;void 0!==t;t=t.x)t.t.N()}};Object.defineProperty(m.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=d(this);this.h();if(void 0!==t)t.i=this.i;if(16&this.f)throw this.v;return this.v}});function b(t,e){return new m(t,e)}function w(t){var e=t.u;t.u=void 0;if("function"==typeof e){c++;var n=o;o=void 0;try{e()}catch(e){t.f&=-2;t.f|=8;k(t);throw e}finally{o=n;i()}}}function k(t){for(var e=t.s;void 0!==e;e=e.n)e.S.U(e);t.x=void 0;t.s=void 0;w(t)}function O(t){if(o!==this)throw new Error("Out-of-order effect");y(this);o=t;this.f&=-2;if(8&this.f)k(this);i()}function S(t,e){this.x=t;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32;this.name=null==e?void 0:e.name}S.prototype.c=function(){var t=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var e=this.x();if("function"==typeof e)this.u=e}finally{t()}};S.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1;this.f&=-9;w(this);g(this);c++;var t=o;o=this;return O.bind(this,t)};S.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=l;l=this}};S.prototype.d=function(){this.f|=8;if(!(1&this.f))k(this)};S.prototype.dispose=function(){this.d()};function E(t,e){var n=new S(t,e);try{n.c()}catch(t){n.d();throw t}var r=n.d.bind(n);r[Symbol.dispose]=r;return r}//# sourceMappingURL=signals-core.module.js.map
},58585:function(t,e,n){n.d(e,{$A:()=>tQ,Bp:()=>tn,Zm:()=>tG,_l:()=>t0,cD:()=>z,e6:()=>t1,gL:()=>tB,k_:()=>Y,pT:()=>ep,rV:()=>F,sx:()=>tz,ti:()=>ev,yu:()=>T,zY:()=>te});/* import */var r=n(42467);/* import */var i=n(67618);/* import */var s=n(43261);var o=Object.create;var a=Object.defineProperty;var l=Object.defineProperties;var c=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty;var f=Object.prototype.propertyIsEnumerable;var p=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t);var v=t=>{throw TypeError(t)};var g=(t,e,n)=>e in t?a(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var y=(t,e)=>{for(var n in e||(e={}))if(d.call(e,n))g(t,n,e[n]);if(h)for(var n of h(e)){if(f.call(e,n))g(t,n,e[n])}return t};var m=(t,e)=>l(t,u(e));var b=(t,e)=>a(t,"name",{value:e,configurable:true});var w=(t,e)=>{var n={};for(var r in t)if(d.call(t,r)&&e.indexOf(r)<0)n[r]=t[r];if(t!=null&&h)for(var r of h(t)){if(e.indexOf(r)<0&&f.call(t,r))n[r]=t[r]}return n};var k=t=>{var e;return[,,,o((e=t==null?void 0:t[p("metadata")])!=null?e:null)]};var O=["class","method","getter","setter","accessor","field","value","get","set"];var S=t=>t!==void 0&&typeof t!=="function"?v("Function expected"):t;var E=(t,e,n,r,i)=>({kind:O[t],name:e,metadata:r,addInitializer:t=>n._?v("Already initialized"):i.push(S(t||null))});var M=(t,e)=>g(e,p("metadata"),t[3]);var A=(t,e,n,r)=>{for(var i=0,s=t[e>>1],o=s&&s.length;i<o;i++)e&1?s[i].call(n):r=s[i].call(n,r);return r};var P=(t,e,n,r,i,s)=>{var o,l,u,h,d,f=e&7,p=!!(e&8),g=!!(e&16);var y=f>3?t.length+1:f?p?1:2:0,m=O[f+5];var w=f>3&&(t[y-1]=[]),k=t[y]||(t[y]=[]);var A=f&&(!g&&!p&&(i=i.prototype),f<5&&(f>3||!g)&&c(f<4?i:{get[n](){return C(this,s)},set[n](x){return $(this,s,x)}},n));f?g&&f<4&&b(s,(f>2?"set ":f>1?"get ":"")+n):b(i,n);for(var P=r.length-1;P>=0;P--){h=E(f,n,u={},t[3],k);if(f){h.static=p,h.private=g,d=h.access={has:g?t=>W(i,t):t=>n in t};if(f^3)d.get=g?t=>(f^1?C:I)(t,i,f^4?s:A.get):t=>t[n];if(f>2)d.set=g?(t,e)=>$(t,i,e,f^4?s:A.set):(t,e)=>t[n]=e}l=(0,r[P])(f?f<4?g?s:A[m]:f>4?void 0:{get:A.get,set:A.set}:i,h),u._=1;if(f^4||l===void 0)S(l)&&(f>4?w.unshift(l):f?g?s=l:A[m]=l:i=l);else if(typeof l!=="object"||l===null)v("Object expected");else S(o=l.get)&&(A.get=o),S(o=l.set)&&(A.set=o),S(o=l.init)&&w.unshift(o)}return f||M(t,i),A&&a(i,n,A),g?f^4?s:A:i};var D=(t,e,n)=>e.has(t)||v("Cannot "+n);var W=(t,e)=>Object(e)!==e?v('Cannot use the "in" operator on this value'):t.has(e);var C=(t,e,n)=>(D(t,e,"read from private field"),n?n.call(t):e.get(t));var R=(t,e,n)=>e.has(t)?v("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);var $=(t,e,n,r)=>(D(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var I=(t,e,n)=>(D(t,e,"access private method"),n);// src/core/plugins/utilities.ts
function j(t,e){return{plugin:t,options:e}}function z(t){return e=>{return j(t,e)}}function T(t){if(typeof t==="function"){return{plugin:t,options:void 0}}return t}// src/core/plugins/plugin.ts
var L,_,N,K;L=[r/* .reactive */.Kh];var Y=class{/**
   * Creates a new plugin instance.
   *
   * @param manager - The drag and drop manager that owns this plugin
   * @param options - Optional configuration for the plugin
   */constructor(t,e){this.manager=t;this.options=e;R(this,N,A(_,8,this,false)),A(_,11,this);R(this,K,/* @__PURE__ */new Set)}/**
   * Enables a disabled plugin instance.
   *
   * @remarks
   * This method triggers effects when called.
   */enable(){this.disabled=false}/**
   * Disables an enabled plugin instance.
   *
   * @remarks
   * This method triggers effects when called.
   */disable(){this.disabled=true}/**
   * Checks if the plugin instance is disabled.
   *
   * @returns true if the plugin is disabled
   * @remarks
   * This method does not trigger effects when accessed.
   */isDisabled(){return(0,i/* .untracked */.O8)(()=>{return this.disabled})}/**
   * Configures a plugin instance with new options.
   *
   * @param options - The new options to apply
   */configure(t){this.options=t}/**
   * Registers an effect that will be cleaned up when the plugin is destroyed.
   *
   * @param callback - The effect callback to register
   * @returns A function to dispose of the effect
   */registerEffect(t){const e=(0,i/* .effect */.QZ)(t.bind(this));C(this,K).add(e);return e}/**
   * Destroys a plugin instance and cleans up its resources.
   *
   * @remarks
   * This method:
   * - Calls all registered cleanup functions
   * - Should be overridden by subclasses to clean up additional resources
   */destroy(){C(this,K).forEach(t=>t())}/**
   * Configures a plugin constructor with options.
   *
   * @param options - The options to configure the constructor with
   * @returns The configured plugin constructor
   *
   * @remarks
   * This method is used to configure the options that the
   * plugin constructor will use to create plugin instances.
   */static configure(t){return j(this,t)}};_=k(null);N=new WeakMap;K=new WeakMap;P(_,4,"disabled",L,Y,N);M(_,Y);var F=class extends Y{};// src/core/plugins/registry.ts
var q;var V=class{/**
   * Creates a new plugin registry.
   *
   * @param manager - The drag and drop manager that owns this registry
   */constructor(t){this.manager=t;this.instances=/* @__PURE__ */new Map;R(this,q,[])}/**
   * Gets all registered plugin instances.
   *
   * @returns An array of all active plugin instances
   */get values(){return Array.from(this.instances.values())}/**
   * Sets the list of plugins to be used by the registry.
   *
   * @param entries - Array of plugin constructors or descriptors
   * @remarks
   * This method:
   * - Filters out duplicate plugins
   * - Unregisters plugins that are no longer in use
   * - Registers new plugins with their options
   */set values(t){const e=t.map(T).reduceRight((t,e)=>{if(t.some(({plugin:t})=>t===e.plugin)){return t}return[e,...t]},[]);const n=e.map(({plugin:t})=>t);for(const t of C(this,q)){if(!n.includes(t)){if(t.prototype instanceof F){continue}this.unregister(t)}}for(const{plugin:t,options:n}of e){this.register(t,n)}$(this,q,n)}/**
   * Gets a plugin instance by its constructor.
   *
   * @param plugin - The plugin constructor to look up
   * @returns The plugin instance or undefined if not found
   */get(t){const e=this.instances.get(t);return e}/**
   * Registers a new plugin instance.
   *
   * @param plugin - The plugin constructor to register
   * @param options - Optional configuration for the plugin
   * @returns The registered plugin instance
   * @remarks
   * If the plugin is already registered, its options will be updated
   * and the existing instance will be returned.
   */register(t,e){const n=this.instances.get(t);if(n){if(n.options!==e){n.options=e}return n}const r=new t(this.manager,e);this.instances.set(t,r);return r}/**
   * Unregisters a plugin instance.
   *
   * @param plugin - The plugin constructor to unregister
   * @remarks
   * This method:
   * - Destroys the plugin instance
   * - Removes it from the registry
   */unregister(t){const e=this.instances.get(t);if(e){e.destroy();this.instances.delete(t)}}/**
   * Destroys all registered plugin instances.
   *
   * @remarks
   * This method:
   * - Calls destroy() on all plugin instances
   * - Clears the registry
   */destroy(){for(const t of this.instances.values()){t.destroy()}this.instances.clear()}};q=new WeakMap;// src/core/collision/utilities.ts
function X(t,e){if(t.priority===e.priority){if(t.type===e.type){return e.value-t.value}return e.type-t.type}return e.priority-t.priority}// src/core/collision/observer.ts
var H=[];var Z,U;var B=class extends Y{/**
   * Creates a new CollisionObserver instance.
   *
   * @param manager - The drag drop manager instance
   */constructor(t){super(t);R(this,Z);R(this,U);this.computeCollisions=this.computeCollisions.bind(this);$(this,U,(0,i/* .signal */.vP)(H));this.destroy=(0,r/* .effects */.zb)(()=>{const t=this.computeCollisions();const e=(0,i/* .untracked */.O8)(()=>this.manager.dragOperation.position.current);if(t!==H){const t=C(this,Z);$(this,Z,e);if(t&&e.x==t.x&&e.y==t.y){return}}else{$(this,Z,void 0)}C(this,U).value=t},()=>{const{dragOperation:t}=this.manager;if(t.status.initialized){this.forceUpdate()}})}/**
   * Forces an immediate update of collision detection.
   *
   * @param immediate - If true, updates collisions immediately. If false, resets previous coordinates.
   */forceUpdate(t=true){(0,i/* .untracked */.O8)(()=>{if(t){C(this,U).value=this.computeCollisions()}else{$(this,Z,void 0)}})}/**
   * Computes collisions between draggable and droppable elements.
   *
   * @param entries - Optional array of droppable elements to check. If not provided, uses all registered droppables.
   * @param collisionDetector - Optional custom collision detector function
   * @returns Array of detected collisions, sorted by priority
   */computeCollisions(t,e){const{registry:n,dragOperation:r}=this.manager;const{source:s,shape:o,status:a}=r;if(!a.initialized||!o){return H}const l=[];const c=[];for(const o of t!=null?t:n.droppables){if(o.disabled){continue}if(s&&!o.accepts(s)){continue}const t=e!=null?e:o.collisionDetector;if(!t){continue}c.push(o);void o.shape;const n=(0,i/* .untracked */.O8)(()=>t({droppable:o,dragOperation:r}));if(n){if(o.collisionPriority!=null){n.priority=o.collisionPriority}l.push(n)}}if(c.length===0){return H}l.sort(X);return l}/**
   * Gets the current collisions signal value.
   */get collisions(){return C(this,U).value}};Z=new WeakMap;U=new WeakMap;// src/core/manager/events.ts
var Q=class{constructor(){this.registry=/* @__PURE__ */new Map}/**
   * Adds an event listener for the specified event type.
   *
   * @param name - The name of the event to listen for
   * @param handler - The function to call when the event occurs
   * @returns A function to remove the event listener
   */addEventListener(t,e){const{registry:n}=this;const r=new Set(n.get(t));r.add(e);n.set(t,r);return()=>this.removeEventListener(t,e)}/**
   * Removes an event listener for the specified event type.
   *
   * @param name - The name of the event
   * @param handler - The function to remove
   */removeEventListener(t,e){const{registry:n}=this;const r=new Set(n.get(t));r.delete(e);n.set(t,r)}/**
   * Dispatches an event to all registered listeners.
   *
   * @param name - The name of the event to dispatch
   * @param args - Arguments to pass to the event handlers
   */dispatch(t,...e){const{registry:n}=this;const r=n.get(t);if(!r){return}for(const t of r){t(...e)}}};var G=class extends Q{/**
   * Creates a new drag and drop monitor.
   *
   * @param manager - The drag and drop manager to monitor
   */constructor(t){super();this.manager=t}/**
   * Dispatches a drag and drop event.
   *
   * @param type - The type of event to dispatch
   * @param event - The event data to dispatch
   */dispatch(t,e){const n=[e,this.manager];super.dispatch(t,...n)}};function J(t,e=true){let n=false;return m(y({},t),{cancelable:e,get defaultPrevented(){return n},preventDefault(){if(!e){return}n=true}})}// src/core/collision/notifier.ts
var tt=class extends F{constructor(t){super(t);const e=(t,e)=>t.map(({id:t})=>t).join("")===e.map(({id:t})=>t).join("");let n=[];this.destroy=(0,r/* .effects */.zb)(()=>{const{dragOperation:e,collisionObserver:r}=t;if(e.status.initializing){n=[];r.enable()}},()=>{const{collisionObserver:r,monitor:s}=t;const{collisions:o}=r;if(r.isDisabled()){return}const a=J({collisions:o});s.dispatch("collision",a);if(a.defaultPrevented){return}if(e(o,n)){return}else{n=o}const[l]=o;(0,i/* .untracked */.O8)(()=>{var e;if((l==null?void 0:l.id)!==((e=t.dragOperation.target)==null?void 0:e.id)){r.disable();t.actions.setDropTarget(l==null?void 0:l.id).then(()=>{r.enable()})}})})}};// src/core/collision/types.ts
var te=/* @__PURE__ */(t=>{t[t["Lowest"]=0]="Lowest";t[t["Low"]=1]="Low";t[t["Normal"]=2]="Normal";t[t["High"]=3]="High";t[t["Highest"]=4]="Highest";return t})(te||{});var tn=/* @__PURE__ */(t=>{t[t["Collision"]=0]="Collision";t[t["ShapeIntersection"]=1]="ShapeIntersection";t[t["PointerIntersection"]=2]="PointerIntersection";return t})(tn||{});var tr,ti,ts,to,ta,tl,tc,tu,th;tc=[r/* .reactive */.Kh],tl=[r/* .derived */.un],ta=[r/* .derived */.un],to=[r/* .derived */.un],ts=[r/* .derived */.un],ti=[r/* .derived */.un],tr=[r/* .derived */.un];var td=class{constructor(){A(tu,5,this);R(this,th,A(tu,8,this,"idle"/* Idle */)),A(tu,11,this)}get current(){return this.value}get idle(){return this.value==="idle"/* Idle */}get initializing(){return this.value==="initializing"/* Initializing */}get initialized(){const{value:t}=this;return t!=="idle"/* Idle */&&t!=="initialization-pending"/* InitializationPending */}get dragging(){return this.value==="dragging"/* Dragging */}get dropped(){return this.value==="dropped"/* Dropped */}/**
   * Sets the current status value.
   *
   * @param value - The new status value
   */set(t){this.value=t}};tu=k(null);th=new WeakMap;P(tu,4,"value",tc,td,th);P(tu,2,"current",tl,td);P(tu,2,"idle",ta,td);P(tu,2,"initializing",to,td);P(tu,2,"initialized",ts,td);P(tu,2,"dragging",ti,td);P(tu,2,"dropped",tr,td);M(tu,td);// src/core/manager/actions.ts
var tf=class{/**
   * Creates a new instance of drag actions.
   *
   * @param manager - The drag and drop manager instance
   */constructor(t){this.manager=t}/**
   * Sets the source of the drag operation.
   *
   * @param source - The draggable entity or its unique identifier
   */setDragSource(t){const{dragOperation:e}=this.manager;e.sourceIdentifier=typeof t==="string"||typeof t==="number"?t:t.id}/**
   * Sets the target of the drop operation.
   *
   * @param identifier - The unique identifier of the droppable entity or null/undefined
   * @returns A promise that resolves to true if the drop was prevented
   */setDropTarget(t){return(0,i/* .untracked */.O8)(()=>{const{dragOperation:e}=this.manager;const n=t!=null?t:null;if(e.targetIdentifier===n){return Promise.resolve(false)}e.targetIdentifier=n;const r=J({operation:e.snapshot()});if(e.status.dragging){this.manager.monitor.dispatch("dragover",r)}return this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}/**
   * Starts a new drag operation.
   *
   * @param args - Configuration for the drag operation
   * @param args.event - The event that initiated the drag
   * @param args.source - The source draggable entity or its identifier
   * @param args.coordinates - The initial coordinates of the drag
   * @returns true if the drag operation started successfully
   * @throws {Error} If there is no drag source or another operation is active
   */start(t){return(0,i/* .untracked */.O8)(()=>{const{dragOperation:e}=this.manager;if(t.source!=null){this.setDragSource(t.source)}const n=e.source;if(!n){throw new Error("Cannot start a drag operation without a drag source")}if(!e.status.idle){throw new Error("Cannot start a drag operation while another is active")}const r=new AbortController;const{event:s,coordinates:o}=t;(0,i/* .batch */.vA)(()=>{e.status.set("initialization-pending"/* InitializationPending */);e.shape=null;e.canceled=false;e.activatorEvent=s!=null?s:null;e.position.reset(o)});const a=J({operation:e.snapshot()});this.manager.monitor.dispatch("beforedragstart",a);if(a.defaultPrevented){e.reset();r.abort();return r}e.status.set("initializing"/* Initializing */);e.controller=r;this.manager.renderer.rendering.then(()=>{if(r.signal.aborted)return;const{status:t}=e;if(t.current!=="initializing"/* Initializing */)return;e.status.set("dragging"/* Dragging */);this.manager.monitor.dispatch("dragstart",{nativeEvent:s,operation:e.snapshot(),cancelable:false})});return r})}/**
   * Moves the dragged entity to a new position.
   *
   * @param args - Configuration for the move operation
   * @param args.by - Relative coordinates to move by
   * @param args.to - Absolute coordinates to move to
   * @param args.event - The event that triggered the move
   * @param args.cancelable - Whether the move can be canceled
   * @param args.propagate - Whether to dispatch dragmove events
   */move(t){return(0,i/* .untracked */.O8)(()=>{var e,n;const{dragOperation:r}=this.manager;const{status:i,controller:s}=r;if(!i.dragging||!s||s.signal.aborted){return}const o=J({nativeEvent:t.event,operation:r.snapshot(),by:t.by,to:t.to},(e=t.cancelable)!=null?e:true);if((n=t.propagate)!=null?n:true){this.manager.monitor.dispatch("dragmove",o)}queueMicrotask(()=>{var e,n,i,s,a;if(o.defaultPrevented){return}const l=(a=t.to)!=null?a:{x:r.position.current.x+((n=(e=t.by)==null?void 0:e.x)!=null?n:0),y:r.position.current.y+((s=(i=t.by)==null?void 0:i.y)!=null?s:0)};r.position.current=l})})}/**
   * Stops the current drag operation.
   *
   * @param args - Configuration for stopping the operation
   * @param args.event - The event that triggered the stop
   * @param args.canceled - Whether the operation was canceled
   * @remarks
   * This method:
   * - Dispatches a dragend event
   * - Allows suspension of the operation
   * - Handles cleanup of the operation state
   */stop(t={}){return(0,i/* .untracked */.O8)(()=>{var e,n;const{dragOperation:r}=this.manager;const{controller:s}=r;if(!s||s.signal.aborted)return;let o;const a=()=>{const t={resume:()=>{},abort:()=>{}};o=new Promise((e,n)=>{t.resume=e;t.abort=n});return t};s.abort();const l=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped"/* Dropped */);const t=(0,i/* .untracked */.O8)(()=>{var t;return((t=r.source)==null?void 0:t.status)==="dropping"});const e=()=>{if(r.controller===s){r.controller=void 0}r.reset()};if(t){const{source:t}=r;const n=(0,i/* .effect */.QZ)(()=>{if((t==null?void 0:t.status)==="idle"){n();e()}})}else{this.manager.renderer.rendering.then(e)}})};r.canceled=(e=t.canceled)!=null?e:false;this.manager.monitor.dispatch("dragend",{nativeEvent:t.event,operation:r.snapshot(),canceled:(n=t.canceled)!=null?n:false,suspend:a});if(o){o.then(l).catch(()=>r.reset())}else{l()}})}};var tp,tv,tg,ty,tm,tb,tw,tx,tk;ty=[r/* .reactive */.Kh],tg=[r/* .reactive */.Kh],tv=[r/* .reactive */.Kh],tp=[r/* .reactive */.Kh];var tO=class{/**
   * Creates a new instance of the `Entity` class.
   *
   * @param input - An object containing the initial properties of the entity.
   * @param manager - The manager that controls the drag and drop operations.
   */constructor(t,e){R(this,tb,A(tm,8,this)),A(tm,11,this);R(this,tw,A(tm,12,this)),A(tm,15,this);R(this,tx,A(tm,16,this)),A(tm,19,this);R(this,tk,A(tm,20,this)),A(tm,23,this);const{effects:n,id:r,data:i={},disabled:s=false,register:o=true}=t;let a=r;this.manager=e;this.id=r;this.data=i;this.disabled=s;this.effects=()=>{var t;return[()=>{const{id:t,manager:e}=this;if(t===a){return}e==null?void 0:e.registry.register(this);return()=>e==null?void 0:e.registry.unregister(this)},...(t=n==null?void 0:n())!=null?t:[]]};this.register=this.register.bind(this);this.unregister=this.unregister.bind(this);this.destroy=this.destroy.bind(this);if(e&&o){queueMicrotask(this.register)}}/**
   * A method that registers the entity with the manager.
   * @returns CleanupFunction | void
   */register(){var t;return(t=this.manager)==null?void 0:t.registry.register(this)}/**
   * A method that unregisters the entity from the manager.
   * @returns void
   */unregister(){var t;(t=this.manager)==null?void 0:t.registry.unregister(this)}/**
   * A method that cleans up the entity when it is no longer needed.
   * @returns void
   */destroy(){var t;(t=this.manager)==null?void 0:t.registry.unregister(this)}};tm=k(null);tb=new WeakMap;tw=new WeakMap;tx=new WeakMap;tk=new WeakMap;P(tm,4,"manager",ty,tO,tb);P(tm,4,"id",tg,tO,tw);P(tm,4,"data",tv,tO,tx);P(tm,4,"disabled",tp,tO,tk);M(tm,tO);var tS=class{constructor(){this.map=(0,i/* .signal */.vP)(/* @__PURE__ */new Map);this.cleanupFunctions=/* @__PURE__ */new WeakMap;/**
     * Registers a entity in the registry.
     * @param key - The unique identifier of the entity.
     * @param value - The entity to register.
     * @returns A function that unregisters the entity.
     */this.register=(t,e)=>{const n=this.map.peek();const i=n.get(t);const s=()=>this.unregister(t,e);if(i===e)return s;if(i){const t=this.cleanupFunctions.get(i);t==null?void 0:t();this.cleanupFunctions.delete(i)}const o=new Map(n);o.set(t,e);this.map.value=o;const a=(0,r/* .effects */.zb)(...e.effects());this.cleanupFunctions.set(e,a);return s};/**
     * Unregisters an entity from the registry.
     * @param key - The unique identifier of the entity.
     * @param value - The entity instance to unregister.
     */this.unregister=(t,e)=>{const n=this.map.peek();if(n.get(t)!==e){return}const r=this.cleanupFunctions.get(e);r==null?void 0:r();this.cleanupFunctions.delete(e);const i=new Map(n);i.delete(t);this.map.value=i}}/**
   * Iterator for the EntityRegistry class.
   * @returns An iterator for the values in the map.
   */[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}/**
   * Checks if a entity with the given identifier exists in the registry.
   * @param identifier - The unique identifier of the entity.
   * @returns True if the entity exists, false otherwise.
   */has(t){return this.map.value.has(t)}/**
   * Retrieves a entity from the registry using its identifier.
   * @param identifier - The unique identifier of the entity.
   * @returns The entity if it exists, undefined otherwise.
   */get(t){return this.map.value.get(t)}/**
   * Destroys all entries in the registry and clears the registry.
   */destroy(){for(const t of this){const e=this.cleanupFunctions.get(t);e==null?void 0:e();t.destroy()}this.map.value=/* @__PURE__ */new Map}};var tE,tM,tA,tP,tD,tW,tC,tR,t$,tI,tj;var tz=class extends(tC=tO,tW=[r/* .reactive */.Kh],tD=[r/* .reactive */.Kh],tP=[r/* .reactive */.Kh],tA=[r/* .derived */.un],tM=[r/* .derived */.un],tE=[r/* .derived */.un],tC){constructor(t,e){var n=t,{modifiers:r,type:i,sensors:s}=n,o=w(n,["modifiers","type","sensors"]);super(o,e);A(tR,5,this);R(this,t$,A(tR,8,this)),A(tR,11,this);R(this,tI,A(tR,12,this)),A(tR,15,this);R(this,tj,A(tR,16,this,this.isDragSource?"dragging":"idle")),A(tR,19,this);this.type=i;this.sensors=s;this.modifiers=r;this.alignment=o.alignment}get isDropping(){return this.status==="dropping"&&this.isDragSource}get isDragging(){return this.status==="dragging"&&this.isDragSource}get isDragSource(){var t,e;return((e=(t=this.manager)==null?void 0:t.dragOperation.source)==null?void 0:e.id)===this.id}};tR=k(tC);t$=new WeakMap;tI=new WeakMap;tj=new WeakMap;P(tR,4,"type",tW,tz,t$);P(tR,4,"modifiers",tD,tz,tI);P(tR,4,"status",tP,tz,tj);P(tR,2,"isDropping",tA,tz);P(tR,2,"isDragging",tM,tz);P(tR,2,"isDragSource",tE,tz);M(tR,tz);var tT,tL,t_,tN,tK,tY,tF,tq,tV,tX,tH,tZ,tU;var tB=class extends(tF=tO,tY=[r/* .reactive */.Kh],tK=[r/* .reactive */.Kh],tN=[r/* .reactive */.Kh],t_=[r/* .reactive */.Kh],tL=[r/* .reactive */.Kh],tT=[r/* .derived */.un],tF){constructor(t,e){var n=t,{accept:r,collisionDetector:i,collisionPriority:s,type:o}=n,a=w(n,["accept","collisionDetector","collisionPriority","type"]);super(a,e);A(tq,5,this);R(this,tV,A(tq,8,this)),A(tq,11,this);R(this,tX,A(tq,12,this)),A(tq,15,this);R(this,tH,A(tq,16,this)),A(tq,19,this);R(this,tZ,A(tq,20,this)),A(tq,23,this);R(this,tU,A(tq,24,this)),A(tq,27,this);this.accept=r;this.collisionDetector=i;this.collisionPriority=s;this.type=o}/**
   * Checks whether or not the droppable accepts a given draggable.
   *
   * @param draggable - The draggable to check
   * @returns true if the draggable can be dropped here
   */accepts(t){const{accept:e}=this;if(!e){return true}if(typeof e==="function"){return e(t)}if(!t.type){return false}if(Array.isArray(e)){return e.includes(t.type)}return t.type===e}get isDropTarget(){var t,e;return((e=(t=this.manager)==null?void 0:t.dragOperation.target)==null?void 0:e.id)===this.id}};tq=k(tF);tV=new WeakMap;tX=new WeakMap;tH=new WeakMap;tZ=new WeakMap;tU=new WeakMap;P(tq,4,"accept",tY,tB,tV);P(tq,4,"type",tK,tB,tX);P(tq,4,"collisionDetector",tN,tB,tH);P(tq,4,"collisionPriority",t_,tB,tZ);P(tq,4,"shape",tL,tB,tU);P(tq,2,"isDropTarget",tT,tB);M(tq,tB);// src/core/sensors/sensor.ts
var tQ=class extends Y{/**
   * Creates a new sensor instance.
   *
   * @param manager - The drag drop manager instance
   * @param options - Optional sensor configuration
   */constructor(t,e){super(t,e);this.manager=t;this.options=e}};// src/core/sensors/activation.ts
var tG=class extends AbortController{constructor(t,e){super();this.constraints=t;this.onActivate=e;this.activated=false;for(const e of t!=null?t:[]){e.controller=this}}onEvent(t){var e;if(this.activated)return;if((e=this.constraints)==null?void 0:e.length){for(const e of this.constraints){e.onEvent(t)}}else{this.activate(t)}}activate(t){if(this.activated)return;this.activated=true;this.onActivate(t)}abort(t){this.activated=false;super.abort(t)}};var tJ;var t0=class{constructor(t){this.options=t;R(this,tJ)}set controller(t){$(this,tJ,t);t.signal.addEventListener("abort",()=>this.abort())}/**
   * Called when the activation is triggered.
   */activate(t){var e;(e=C(this,tJ))==null?void 0:e.activate(t)}};tJ=new WeakMap;// src/core/modifiers/modifier.ts
var t1=class extends Y{/**
   * Creates a new modifier instance.
   *
   * @param manager - The drag and drop manager that owns this modifier
   * @param options - Optional configuration for the modifier
   */constructor(t,e){super(t,e);this.manager=t;this.options=e}/**
   * Applies the modifier to the current drag operation.
   *
   * @param operation - The current state of the drag operation
   * @returns The transformed coordinates
   *
   * @remarks
   * Override this method to implement custom transformation logic.
   * The default implementation returns the original transform unchanged.
   */apply(t){return t.transform}};// src/core/manager/registry.ts
var t2=class{/**
   * Creates a new registry instance.
   *
   * @param manager - The drag and drop manager that owns this registry
   */constructor(t){/** Registry for draggable entities */this.draggables=new tS;/** Registry for droppable entities */this.droppables=new tS;this.plugins=new V(t);this.sensors=new V(t);this.modifiers=new V(t)}register(t,e){if(t instanceof tz){return this.draggables.register(t.id,t)}if(t instanceof tB){return this.droppables.register(t.id,t)}if(t.prototype instanceof t1){return this.modifiers.register(t,e)}if(t.prototype instanceof tQ){return this.sensors.register(t,e)}if(t.prototype instanceof Y){return this.plugins.register(t,e)}throw new Error("Invalid instance type")}unregister(t){if(t instanceof tO){if(t instanceof tz){return this.draggables.unregister(t.id,t)}if(t instanceof tB){return this.droppables.unregister(t.id,t)}return()=>{}}if(t.prototype instanceof t1){return this.modifiers.unregister(t)}if(t.prototype instanceof tQ){return this.sensors.unregister(t)}if(t.prototype instanceof Y){return this.plugins.unregister(t)}throw new Error("Invalid instance type")}/**
   * Destroys all registered entities and cleans up resources.
   *
   * @remarks
   * This method:
   * - Destroys all draggable and droppable entities
   * - Destroys all plugins, sensors, and modifiers
   * - Cleans up any associated resources
   */destroy(){this.draggables.destroy();this.droppables.destroy();this.plugins.destroy();this.sensors.destroy();this.modifiers.destroy()}};var t4,t5,t8,t6,t3,t7,t9,et,ee,en,er,ei,es,eo,ea,el,ec,eu,eh;ee=[r/* .derived */.un],et=[r/* .reactive */.Kh],t9=[r/* .reactive */.Kh],t7=[r/* .reactive */.Kh],t3=[r/* .reactive */.Kh],t6=[r/* .reactive */.Kh],t8=[r/* .derived */.un],t5=[r/* .derived */.un],t4=[r/* .derived */.un];var ed=class{/**
   * Creates a new drag operation instance.
   *
   * @param manager - The drag and drop manager that owns this operation
   */constructor(t){A(es,5,this);R(this,en);R(this,er);R(this,ei,new r/* .ValueHistory */.Wf(void 0,(t,e)=>t&&e?t.equals(e):t===e));/** Current status of the drag operation */this.status=new td;R(this,eo,A(es,8,this,false)),A(es,11,this);R(this,ea,A(es,12,this,null)),A(es,15,this);R(this,el,A(es,16,this,null)),A(es,19,this);R(this,ec,A(es,20,this,null)),A(es,23,this);R(this,eu,A(es,24,this,[])),A(es,27,this);/** Current position of the dragged entity */this.position=new s/* .Position */.yX({x:0,y:0});R(this,eh,{x:0,y:0});$(this,en,t)}get shape(){const{current:t,initial:e,previous:n}=C(this,ei);if(!t||!e){return null}return{current:t,initial:e,previous:n}}/**
   * Sets the shape of the dragged entity.
   *
   * @param value - The new shape or null to reset
   */set shape(t){if(!t){C(this,ei).reset()}else{C(this,ei).current=t}}get source(){var t;const e=this.sourceIdentifier;if(e==null)return null;const n=C(this,en).registry.draggables.get(e);if(n){$(this,er,n)}return(t=n!=null?n:C(this,er))!=null?t:null}get target(){var t;const e=this.targetIdentifier;return e!=null?(t=C(this,en).registry.droppables.get(e))!=null?t:null:null}get transform(){const{x:t,y:e}=this.position.delta;let n={x:t,y:e};for(const t of this.modifiers){n=t.apply(m(y({},this.snapshot()),{transform:n}))}$(this,eh,n);return n}/**
   * Creates a snapshot of the current drag operation state.
   *
   * @returns An immutable snapshot of the current operation state
   */snapshot(){return(0,i/* .untracked */.O8)(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:C(this,eh),shape:this.shape?(0,r/* .snapshot */.P9)(this.shape):null,position:(0,r/* .snapshot */.P9)(this.position),status:(0,r/* .snapshot */.P9)(this.status),canceled:this.canceled}))}/**
   * Resets the drag operation to its initial state.
   *
   * @remarks
   * This method:
   * - Sets status to idle
   * - Clears source and target identifiers
   * - Resets shape history
   * - Resets position and transform
   * - Clears modifiers
   */reset(){(0,i/* .batch */.vA)(()=>{this.status.set("idle"/* Idle */);this.sourceIdentifier=null;this.targetIdentifier=null;C(this,ei).reset();this.position.reset({x:0,y:0});$(this,eh,{x:0,y:0});this.modifiers=[]})}};es=k(null);en=new WeakMap;er=new WeakMap;ei=new WeakMap;eo=new WeakMap;ea=new WeakMap;el=new WeakMap;ec=new WeakMap;eu=new WeakMap;eh=new WeakMap;P(es,2,"shape",ee,ed);P(es,4,"canceled",et,ed,eo);P(es,4,"activatorEvent",t9,ed,ea);P(es,4,"sourceIdentifier",t7,ed,el);P(es,4,"targetIdentifier",t3,ed,ec);P(es,4,"modifiers",t6,ed,eu);P(es,2,"source",t8,ed);P(es,2,"target",t5,ed);P(es,2,"transform",t4,ed);M(es,ed);// src/core/manager/renderer.ts
var ef={get rendering(){return Promise.resolve()}};// src/core/manager/manager.ts
function ep(t,e){if(typeof t==="function"){return t(e)}return t!=null?t:e}var ev=class{/**
   * Creates a new drag and drop manager instance.
   *
   * @param config - Optional configuration for plugins, sensors, modifiers, and renderer
   */constructor(t){/**
     * Cleans up resources and stops any active drag operations.
     */this.destroy=()=>{if(!this.dragOperation.status.idle){this.actions.stop({canceled:true})}this.dragOperation.modifiers.forEach(t=>t.destroy());this.registry.destroy();this.collisionObserver.destroy()};var e;const n=t!=null?t:{};const s=ep(n.plugins,[]);const o=ep(n.sensors,[]);const a=ep(n.modifiers,[]);const l=(e=n.renderer)!=null?e:ef;const c=new G(this);const u=new t2(this);this.registry=u;this.monitor=c;this.renderer=l;this.actions=new tf(this);this.dragOperation=new ed(this);this.collisionObserver=new B(this);this.plugins=[tt,...s];this.modifiers=a;this.sensors=o;const{destroy:h}=this;const d=(0,r/* .effects */.zb)(()=>{var t,e,n;const r=(0,i/* .untracked */.O8)(()=>this.dragOperation.modifiers);const s=this.modifiers;for(const t of r){if(!s.includes(t)){t.destroy()}}this.dragOperation.modifiers=(n=(e=(t=this.dragOperation.source)==null?void 0:t.modifiers)==null?void 0:e.map(t=>{const{plugin:e,options:n}=T(t);return new e(this,n)}))!=null?n:s});this.destroy=()=>{d();h()}}/**
   * Gets the list of active plugins.
   *
   * @returns Array of active plugin instances
   */get plugins(){return this.registry.plugins.values}/**
   * Sets the list of plugins to be used by the manager.
   *
   * @param plugins - Array of plugin constructors or instances
   */set plugins(t){this.registry.plugins.values=t}/**
   * Gets the list of active modifiers.
   *
   * @returns Array of active modifier instances
   */get modifiers(){return this.registry.modifiers.values}/**
   * Sets the list of modifiers to be used by the manager.
   *
   * @param modifiers - Array of modifier constructors or instances
   */set modifiers(t){this.registry.modifiers.values=t}/**
   * Gets the list of active sensors.
   *
   * @returns Array of active sensor instances
   */get sensors(){return this.registry.sensors.values}/**
   * Sets the list of sensors to be used by the manager.
   *
   * @param sensors - Array of sensor constructors or instances
   */set sensors(t){this.registry.sensors.values=t}};//# sourceMappingURL=index.js.map
//# sourceMappingURL=index.js.map
},21116:function(t,e,n){n.d(e,{V6:()=>a,y$:()=>l});/* import */var r=n(58585);/* import */var i=n(43261);// src/algorithms/pointerIntersection.ts
var s=({dragOperation:t,droppable:e})=>{const n=t.position.current;if(!n){return null}const{id:s}=e;if(!e.shape){return null}if(e.shape.containsPoint(n)){const t=i/* .Point.distance */.bR.distance(e.shape.center,n);return{id:s,value:1/t,type:r/* .CollisionType.PointerIntersection */.Bp.PointerIntersection,priority:r/* .CollisionPriority.High */.zY.High}}return null};// src/algorithms/shapeIntersection.ts
var o=({dragOperation:t,droppable:e})=>{const{shape:n}=t;if(!e.shape||!(n==null?void 0:n.current)){return null}const s=n.current.intersectionArea(e.shape);if(s){const{position:o}=t;const a=i/* .Point.distance */.bR.distance(e.shape.center,o.current);const l=s/(n.current.area+e.shape.area-s);const c=l/a;return{id:e.id,value:c,type:r/* .CollisionType.ShapeIntersection */.Bp.ShapeIntersection,priority:r/* .CollisionPriority.Normal */.zY.Normal}}return null};// src/algorithms/default.ts
var a=t=>{var e;return(e=s(t))!=null?e:o(t)};// src/algorithms/closestCorners.ts
var l=t=>{const{dragOperation:e,droppable:n}=t;const{shape:s,position:o}=e;if(!n.shape){return null}const a=s?i/* .Rectangle.from */.M_.from(s.current.boundingRectangle).corners:void 0;const l=i/* .Rectangle.from */.M_.from(n.shape.boundingRectangle).corners.reduce((t,e,n)=>{var r;return t+i/* .Point.distance */.bR.distance(i/* .Point.from */.bR.from(e),(r=a==null?void 0:a[n])!=null?r:o.current)},0);const c=l/4;return{id:n.id,value:1/c,type:r/* .CollisionType.Collision */.Bp.Collision,priority:r/* .CollisionPriority.Normal */.zY.Normal}};// src/algorithms/closestCenter.ts
var c=t=>{var e;const{dragOperation:n,droppable:r}=t;const{shape:i,position:s}=n;if(!r.shape){return null}const o=a(t);if(o){return o}const l=Point4.distance(r.shape.center,(e=i==null?void 0:i.current.center)!=null?e:s.current);const c=1/l;return{id:r.id,value:c,type:CollisionType4.Collision,priority:CollisionPriority4.Normal}};// src/algorithms/directionBiased.ts
var u=({dragOperation:t,droppable:e})=>{if(!e.shape){return null}const{position:n,shape:r}=t;const{direction:i}=n;if(!r){return null}if(i===null){return a({dragOperation:t,droppable:e})}const{center:s}=r.current;const o=e.shape.boundingRectangle;const l=o.bottom>=s.y;const c=o.top<=s.y;const u=o.left<=s.x;const h=o.right>=s.x;if(i==="down"&&l||i==="up"&&c||i==="left"&&u||i==="right"&&h){const t=Point5.distance(e.shape.center,s);const n=t===0?1:1/t;return{id:e.id,value:n,type:CollisionType5.Collision,priority:CollisionPriority5.Normal}}return null};// src/algorithms/pointerDistance.ts
var h=t=>{const{dragOperation:e,droppable:n}=t;const{position:r}=e;if(!n.shape){return null}const i=Point6.distance(n.shape.center,r.current);const s=1/i;return{id:n.id,value:s,type:CollisionType6.Collision,priority:CollisionPriority6.Normal}}},8679:function(t,e,n){n.r(e);n.d(e,{Accessibility:()=>H,AutoScroller:()=>en,Cursor:()=>U,DragDropManager:()=>eD,Draggable:()=>eL,Droppable:()=>eU,Feedback:()=>tN,KeyboardSensor:()=>eh,PointerActivationConstraints:()=>em,PointerSensor:()=>ek,PreventSelection:()=>eo,ScrollListener:()=>es,Scroller:()=>t3,StyleSheetManager:()=>tu,defaultPreset:()=>eP,resolveCustomizable:()=>/* reexport safe */r.pT});/* import */var r=n(58585);/* import */var i=n(30455);/* import */var s=n(42467);/* import */var o=n(67618);/* import */var a=n(43261);/* import */var l=n(21116);var c=Object.create;var u=Object.defineProperty;var h=Object.defineProperties;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty;var g=Object.prototype.propertyIsEnumerable;var y=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t);var m=t=>{throw TypeError(t)};var b=(t,e,n)=>e in t?u(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var w=(t,e)=>{for(var n in e||(e={}))if(v.call(e,n))b(t,n,e[n]);if(p)for(var n of p(e)){if(g.call(e,n))b(t,n,e[n])}return t};var k=(t,e)=>h(t,f(e));var O=(t,e)=>u(t,"name",{value:e,configurable:true});var S=(t,e)=>{var n={};for(var r in t)if(v.call(t,r)&&e.indexOf(r)<0)n[r]=t[r];if(t!=null&&p)for(var r of p(t)){if(e.indexOf(r)<0&&g.call(t,r))n[r]=t[r]}return n};var E=t=>{var e;return[,,,c((e=t==null?void 0:t[y("metadata")])!=null?e:null)]};var M=["class","method","getter","setter","accessor","field","value","get","set"];var A=t=>t!==void 0&&typeof t!=="function"?m("Function expected"):t;var P=(t,e,n,r,i)=>({kind:M[t],name:e,metadata:r,addInitializer:t=>n._?m("Already initialized"):i.push(A(t||null))});var D=(t,e)=>b(e,y("metadata"),t[3]);var W=(t,e,n,r)=>{for(var i=0,s=t[e>>1],o=s&&s.length;i<o;i++)e&1?s[i].call(n):r=s[i].call(n,r);return r};var C=(t,e,n,r,i,s)=>{var o,a,l,c,h,f=e&7,p=!!(e&8),v=!!(e&16);var g=f>3?t.length+1:f?p?1:2:0,y=M[f+5];var b=f>3&&(t[g-1]=[]),w=t[g]||(t[g]=[]);var k=f&&(!v&&!p&&(i=i.prototype),f<5&&(f>3||!v)&&d(f<4?i:{get[n](){return I(this,s)},set[n](x){return z(this,s,x)}},n));f?v&&f<4&&O(s,(f>2?"set ":f>1?"get ":"")+n):O(i,n);for(var S=r.length-1;S>=0;S--){c=P(f,n,l={},t[3],w);if(f){c.static=p,c.private=v,h=c.access={has:v?t=>$(i,t):t=>n in t};if(f^3)h.get=v?t=>(f^1?I:T)(t,i,f^4?s:k.get):t=>t[n];if(f>2)h.set=v?(t,e)=>z(t,i,e,f^4?s:k.set):(t,e)=>t[n]=e}a=(0,r[S])(f?f<4?v?s:k[y]:f>4?void 0:{get:k.get,set:k.set}:i,c),l._=1;if(f^4||a===void 0)A(a)&&(f>4?b.unshift(a):f?v?s=a:k[y]=a:i=a);else if(typeof a!=="object"||a===null)m("Object expected");else A(o=a.get)&&(k.get=o),A(o=a.set)&&(k.set=o),A(o=a.init)&&b.unshift(o)}return f||D(t,i),k&&u(i,n,k),v?f^4?s:k:i};var R=(t,e,n)=>e.has(t)||m("Cannot "+n);var $=(t,e)=>Object(e)!==e?m('Cannot use the "in" operator on this value'):t.has(e);var I=(t,e,n)=>(R(t,e,"read from private field"),n?n.call(t):e.get(t));var j=(t,e,n)=>e.has(t)?m("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);var z=(t,e,n,r)=>(R(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var T=(t,e,n)=>(R(t,e,"access private method"),n);// src/core/plugins/accessibility/defaults.ts
var L={role:"button",roleDescription:"draggable"};var _=`dnd-kit-description`;var N=`dnd-kit-announcement`;var K={draggable:`To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel.`};var Y={dragstart({operation:{source:t}}){if(!t)return;return`Picked up draggable item ${t.id}.`},dragover({operation:{source:t,target:e}}){if(!t||t.id===(e==null?void 0:e.id))return;if(e){return`Draggable item ${t.id} was moved over droppable target ${e.id}.`}return`Draggable item ${t.id} is no longer over a droppable target.`},dragend({operation:{source:t,target:e},canceled:n}){if(!t)return;if(n){return`Dragging was cancelled. Draggable item ${t.id} was dropped.`}if(e){return`Draggable item ${t.id} was dropped over droppable target ${e.id}`}return`Draggable item ${t.id} was dropped.`}};// src/core/plugins/accessibility/utilities.ts
function F(t){const e=t.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(e)}// src/core/plugins/accessibility/HiddenText.ts
function q(t,e){const n=document.createElement("div");n.id=t;n.style.setProperty("display","none");n.textContent=e;return n}// src/core/plugins/accessibility/LiveRegion.ts
function V(t){const e=document.createElement("div");e.id=t;e.setAttribute("role","status");e.setAttribute("aria-live","polite");e.setAttribute("aria-atomic","true");e.style.setProperty("position","fixed");e.style.setProperty("width","1px");e.style.setProperty("height","1px");e.style.setProperty("margin","-1px");e.style.setProperty("border","0");e.style.setProperty("padding","0");e.style.setProperty("overflow","hidden");e.style.setProperty("clip","rect(0 0 0 0)");e.style.setProperty("clip-path","inset(100%)");e.style.setProperty("white-space","nowrap");return e}// src/core/plugins/accessibility/Accessibility.ts
var X=["dragover","dragmove"];var H=class extends r/* .Plugin */.k_{constructor(t,e){super(t);const{id:n,idPrefix:{description:r=_,announcement:s=N}={},announcements:o=Y,screenReaderInstructions:a=K,debounce:l=500}=e!=null?e:{};const c=n?`${r}-${n}`:(0,i/* .generateUniqueId */.Ij)(r);const u=n?`${s}-${n}`:(0,i/* .generateUniqueId */.Ij)(s);let h;let d;let f;let p;const v=(t=p)=>{if(!f||!t)return;if((f==null?void 0:f.nodeValue)!==t){f.nodeValue=t}};const g=()=>i/* .scheduler.schedule */.ck.schedule(v);const y=Z(g,l);const m=Object.entries(o).map(([t,e])=>{return this.manager.monitor.addEventListener(t,(n,r)=>{const i=f;if(!i)return;const s=e==null?void 0:e(n,r);if(s&&i.nodeValue!==s){p=s;if(X.includes(t)){y()}else{g();y.cancel()}}})});const b=()=>{let t=[];if(!(h==null?void 0:h.isConnected)){h=q(c,a.draggable);t.push(h)}if(!(d==null?void 0:d.isConnected)){d=V(u);f=document.createTextNode("");d.appendChild(f);t.push(d)}if(t.length>0){document.body.append(...t)}};const w=/* @__PURE__ */new Set;function k(){for(const t of w){t()}}this.registerEffect(()=>{var t;w.clear();for(const e of this.manager.registry.draggables.value){const n=(t=e.handle)!=null?t:e.element;if(n){if(!h||!d){w.add(b)}if((!F(n)||(0,i/* .isSafari */.nr)())&&!n.hasAttribute("tabindex")){w.add(()=>n.setAttribute("tabindex","0"))}if(!n.hasAttribute("role")&&!(n.tagName.toLowerCase()==="button")){w.add(()=>n.setAttribute("role",L.role))}if(!n.hasAttribute("aria-roledescription")){w.add(()=>n.setAttribute("aria-roledescription",L.roleDescription))}if(!n.hasAttribute("aria-describedby")){w.add(()=>n.setAttribute("aria-describedby",c))}for(const t of["aria-pressed","aria-grabbed"]){const r=String(e.isDragging);if(n.getAttribute(t)!==r){w.add(()=>n.setAttribute(t,r))}}const t=String(e.disabled);if(n.getAttribute("aria-disabled")!==t){w.add(()=>n.setAttribute("aria-disabled",t))}}}if(w.size>0){i/* .scheduler.schedule */.ck.schedule(k)}});this.destroy=()=>{super.destroy();h==null?void 0:h.remove();d==null?void 0:d.remove();m.forEach(t=>t())}}};function Z(t,e){let n;const r=()=>{clearTimeout(n);n=setTimeout(t,e)};r.cancel=()=>clearTimeout(n);return r}var U=class extends r/* .Plugin */.k_{constructor(t,e){super(t,e);this.manager=t;const n=(0,s/* .computed */.EW)(()=>{var t;return(0,i/* .getDocument */.YE)((t=this.manager.dragOperation.source)==null?void 0:t.element)});this.destroy=(0,o/* .effect */.QZ)(()=>{var t;const{dragOperation:e}=this.manager;const{cursor:r="grabbing",nonce:i}=(t=this.options)!=null?t:{};if(e.status.initialized){const t=n.value;const e=t.createElement("style");if(i){e.setAttribute("nonce",i)}e.textContent=`* { cursor: ${r} !important; }`;t.head.appendChild(e);return()=>e.remove()}})}};var B=/* @__PURE__ */new Map;var Q,G,J,tt,te,tn,tr,ti,ts,to,ta,tl,tc;var tu=class extends(te=r/* .CorePlugin */.rV,tt=[s/* .reactive */.Kh],J=[s/* .derived */.un],G=[s/* .derived */.un],Q=[s/* .derived */.un],te){constructor(t){super(t);W(tr,5,this);j(this,ts);j(this,tn,/* @__PURE__ */new Set);j(this,ti,W(tr,8,this,/* @__PURE__ */new Set)),W(tr,11,this);this.registerEffect(T(this,ts,to))}/**
   * Registers CSS rules to be injected into the active drag operation's
   * document and shadow roots. The StyleSheetManager handles tracking
   * which roots need the styles and cleaning up when they're no longer needed.
   *
   * Returns a cleanup function that unregisters the rules.
   */register(t){I(this,tn).add(t);return()=>{I(this,tn).delete(t)}}/**
   * Adds an additional root to track for style injection.
   * Returns a cleanup function that removes the root.
   */addRoot(t){(0,o/* .untracked */.O8)(()=>{const e=new Set(this.additionalRoots);e.add(t);this.additionalRoots=e});return()=>{(0,o/* .untracked */.O8)(()=>{const e=new Set(this.additionalRoots);e.delete(t);this.additionalRoots=e})}}get sourceRoot(){var t;const{source:e}=this.manager.dragOperation;return(0,i/* .getRoot */.Zn)((t=e==null?void 0:e.element)!=null?t:null)}get targetRoot(){var t;const{target:e}=this.manager.dragOperation;return(0,i/* .getRoot */.Zn)((t=e==null?void 0:e.element)!=null?t:null)}get roots(){const{status:t}=this.manager.dragOperation;if(t.initializing||t.initialized){const t=[this.sourceRoot,this.targetRoot].filter(t=>t!=null);return /* @__PURE__ */new Set([...t,...this.additionalRoots])}return /* @__PURE__ */new Set}};tr=E(te);tn=new WeakMap;ti=new WeakMap;ts=new WeakSet;to=function(){const{roots:t}=this;const e=[];for(const n of t){for(const t of I(this,tn)){e.push(T(this,ts,ta).call(this,n,t))}}return()=>{for(const t of e){t()}}};ta=function(t,e){let n=B.get(t);if(!n){n=/* @__PURE__ */new Map;B.set(t,n)}let r=n.get(e);if(!r){const s=(0,i/* .isDocument */.wz)(t)?T(this,ts,tl).call(this,t,n,e):T(this,ts,tc).call(this,t,n,e);if(!s){return()=>{}}r=s;n.set(e,r)}r.refCount++;let s=false;return()=>{if(s)return;s=true;r.refCount--;if(r.refCount===0){r.cleanup()}}};/**
 * For Document roots, prepend a <style> element to <head> so that any
 * @layer declarations appear before layers from regular stylesheets,
 * giving them the lowest cascade priority.
 */tl=function(t,e,n){const r=t.createElement("style");r.textContent=n;t.head.prepend(r);const i=new MutationObserver(e=>{for(const n of e){for(const e of Array.from(n.removedNodes)){if(e===r){t.head.prepend(r);return}}}});i.observe(t.head,{childList:true});return{refCount:0,cleanup:()=>{i.disconnect();r.remove();e.delete(n);if(e.size===0){B.delete(t)}}}};/**
 * For ShadowRoot roots, use adoptedStyleSheets to avoid DOM side effects
 * like interfering with :first-child or :nth-child selectors.
 */tc=function(t,e,n){if(!("adoptedStyleSheets"in t&&Array.isArray(t.adoptedStyleSheets))&&"production"!=="production"){}const r=t.ownerDocument.defaultView;const{CSSStyleSheet:s}=r!=null?r:{};if(!s){if(false){}return null}const o=new s;o.replaceSync(n);t.adoptedStyleSheets.push(o);return{refCount:0,cleanup:()=>{var r;if((0,i/* .isShadowRoot */.Ng)(t)&&((r=t.host)==null?void 0:r.isConnected)){const e=t.adoptedStyleSheets.indexOf(o);if(e!==-1){t.adoptedStyleSheets.splice(e,1)}}e.delete(n);if(e.size===0){B.delete(t)}}}};C(tr,4,"additionalRoots",tt,tu,ti);C(tr,2,"sourceRoot",J,tu);C(tr,2,"targetRoot",G,tu);C(tr,2,"roots",Q,tu);D(tr,tu);// src/core/plugins/feedback/constants.ts
var th="data-dnd-";var td=`${th}dropping`;var tf="--dnd-";var tp=`${th}dragging`;var tv=`${th}placeholder`;var tg=[tp,tv,"popover","aria-pressed","aria-grabbing"];var ty=["view-transition-name"];var tm=`
  :is(:root,:host) [${tp}] {
    position: fixed !important;
    pointer-events: none !important;
    touch-action: none;
    z-index: calc(infinity);
    will-change: translate;
    top: var(${tf}top, 0px) !important;
    left: var(${tf}left, 0px) !important;
    right: unset !important;
    bottom: unset !important;
    width: var(${tf}width, auto);
    max-width: var(${tf}width, auto);
    height: var(${tf}height, auto);
    max-height: var(${tf}height, auto);
    transition: var(${tf}transition) !important;
  }

  :is(:root,:host) [${tv}] {
    transition: none;
  }

  :is(:root,:host) [${tv}='hidden'] {
    visibility: hidden;
  }

  [${tp}] * {
    pointer-events: none !important;
  }

  [${tp}]:not([${td}]) {
    translate: var(${tf}translate) !important;
  }

  [${tp}][style*='${tf}scale'] {
    scale: var(${tf}scale) !important;
    transform-origin: var(${tf}transform-origin) !important;
  }

  @layer dnd-kit {
    :where([${tp}][popover]) {
      overflow: visible;
      background: unset;
      border: unset;
      margin: unset;
      padding: unset;
      color: inherit;

      &:is(input, button) {
        border: revert;
        background: revert;
      }
    }
  }
  [${tp}]::backdrop, [${th}overlay]:not([${tp}]) {
    display: none;
    visibility: hidden;
  }
`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function tb(t,e="hidden"){return(0,o/* .untracked */.O8)(()=>{const{element:n,manager:r}=t;if(!n||!r)return;const s=tw(n,r.registry.droppables);const o=[];const a=(0,i/* .cloneElement */.Ob)(n);const{remove:l}=a;tx(s,a,o);tk(a,e);a.remove=()=>{o.forEach(t=>t());l.call(a)};return a})}function tw(t,e){const n=/* @__PURE__ */new Map;for(const r of e){if(!r.element)continue;if(t===r.element||t.contains(r.element)){const t=`${th}${(0,i/* .generateUniqueId */.Ij)("dom-id")}`;r.element.setAttribute(t,"");n.set(r,t)}}return n}function tx(t,e,n){for(const[r,s]of t){if(!r.element)continue;const t=`[${s}]`;const o=e.matches(t)?e:e.querySelector(t);r.element.removeAttribute(s);if(!o)continue;const a=r.element;r.proxy=o;o.removeAttribute(s);i/* .ProxiedElements.set */.hZ.set(a,o);n.push(()=>{i/* .ProxiedElements["delete"] */.hZ["delete"](a);r.proxy=void 0})}}function tk(t,e="hidden"){t.setAttribute("inert","true");t.setAttribute("tab-index","-1");t.setAttribute("aria-hidden","true");t.setAttribute(tv,e)}function tO(t,e){if(t===e)return true;return(0,i/* .getFrameElement */._m)(t)===(0,i/* .getFrameElement */._m)(e)}function tS(t){const{target:e}=t;if("newState"in t&&t.newState==="closed"&&(0,i/* .isElement */.vq)(e)&&e.hasAttribute("popover")){requestAnimationFrame(()=>(0,i/* .showPopover */.dO)(e))}}function tE(t){return t.tagName==="TR"}function tM(t,e,n){const r=new MutationObserver(r=>{let s=false;for(const n of r){if(n.target!==t){s=true;continue}if(n.type!=="attributes"){continue}const r=n.attributeName;if(r.startsWith("aria-")||tg.includes(r)){continue}const o=t.getAttribute(r);if(r==="style"){if((0,i/* .supportsStyle */.o8)(t)&&(0,i/* .supportsStyle */.o8)(e)){const n=t.style;for(const t of Array.from(e.style)){if(n.getPropertyValue(t)===""){e.style.removeProperty(t)}}for(const t of Array.from(n)){if(ty.includes(t)||t.startsWith(tf)){continue}const r=n.getPropertyValue(t);e.style.setProperty(t,r)}}}else if(o!==null){e.setAttribute(r,o)}else{e.removeAttribute(r)}}if(s&&n){e.innerHTML=t.innerHTML}});r.observe(t,{attributes:true,subtree:true,childList:true});return r}function tA(t,e,n){const r=new MutationObserver(r=>{for(const s of r){if(s.addedNodes.length===0)continue;for(const r of Array.from(s.addedNodes)){if(r.contains(t)&&t.nextElementSibling!==e){t.insertAdjacentElement("afterend",e);(0,i/* .showPopover */.dO)(n);return}if(r.contains(e)&&e.previousElementSibling!==t){e.insertAdjacentElement("beforebegin",t);(0,i/* .showPopover */.dO)(n);return}}}});r.observe(t.ownerDocument.body,{childList:true,subtree:true});return r}function tP(t){return new ResizeObserver(()=>{var e,n;const r=new i/* .DOMRectangle */.yS(t.placeholder,{frameTransform:t.frameTransform,ignoreTransforms:true});const s=(e=t.transformOrigin)!=null?e:{x:1,y:1};const o=(t.width-r.width)*s.x+t.delta.x;const a=(t.height-r.height)*s.y+t.delta.y;const l=(0,i/* .getFixedPositionOffset */.hl)();t.styles.set({width:r.width-t.widthOffset,height:r.height-t.heightOffset,top:t.top+a+l.y,left:t.left+o+l.x},tf);(n=t.getElementMutationObserver())==null?void 0:n.takeRecords();if(tE(t.element)&&tE(t.placeholder)){const e=Array.from(t.element.cells);const n=Array.from(t.placeholder.cells);if(!t.getSavedCellWidths()){t.setSavedCellWidths(e.map(t=>t.style.width))}for(const[t,r]of e.entries()){const e=n[t];r.style.width=`${e.getBoundingClientRect().width}px`}}t.dragOperation.shape=new i/* .DOMRectangle */.yS(t.feedbackElement)})}var tD=250;var tW="ease";function tC(t){var e,n,r,s;const{animation:o}=t;if(typeof o==="function"){const e=o({element:t.element,feedbackElement:t.feedbackElement,placeholder:t.placeholder,translate:t.translate,moved:t.moved});Promise.resolve(e).then(()=>{t.cleanup();requestAnimationFrame(t.restoreFocus)});return}const{duration:l=tD,easing:c=tW}=o!=null?o:{};(0,i/* .showPopover */.dO)(t.feedbackElement);const[,u]=(e=(0,i/* .getFinalKeyframe */.XZ)(t.feedbackElement,t=>"translate"in t))!=null?e:[];u==null?void 0:u.pause();const h=(n=t.placeholder)!=null?n:t.element;const d={frameTransform:tO(t.feedbackElement,h)?null:void 0};const f=new i/* .DOMRectangle */.yS(t.feedbackElement,d);const p=(r=(0,i/* .parseTranslate */.g)((0,i/* .getComputedStyles */.qt)(t.feedbackElement).translate))!=null?r:t.translate;const v=new i/* .DOMRectangle */.yS(h,d);const g=a/* .Rectangle.delta */.M_.delta(f,v,t.alignment);const y={x:p.x-g.x,y:p.y-g.y};const m=Math.round(f.intrinsicHeight)!==Math.round(v.intrinsicHeight)?{minHeight:[`${f.intrinsicHeight}px`,`${v.intrinsicHeight}px`],maxHeight:[`${f.intrinsicHeight}px`,`${v.intrinsicHeight}px`]}:{};const b=Math.round(f.intrinsicWidth)!==Math.round(v.intrinsicWidth)?{minWidth:[`${f.intrinsicWidth}px`,`${v.intrinsicWidth}px`],maxWidth:[`${f.intrinsicWidth}px`,`${v.intrinsicWidth}px`]}:{};t.styles.set({transition:t.transition},tf);t.feedbackElement.setAttribute(td,"");(s=t.getElementMutationObserver())==null?void 0:s.takeRecords();(0,i/* .animateTransform */.A$)({element:t.feedbackElement,keyframes:k(w(w({},m),b),{translate:[`${p.x}px ${p.y}px 0`,`${y.x}px ${y.y}px 0`]}),options:{duration:(0,i/* .prefersReducedMotion */.Oe)((0,i/* .getWindow */.zk)(t.feedbackElement))?0:t.moved||t.feedbackElement!==t.element?l:0,easing:c}}).then(()=>{t.feedbackElement.removeAttribute(td);u==null?void 0:u.finish();t.cleanup();requestAnimationFrame(t.restoreFocus)})}// src/core/plugins/feedback/Feedback.ts
var tR,t$,tI,tj,tz,tT,tL;var t_=class t extends(t$=r/* .Plugin */.k_,tR=[s/* .reactive */.Kh],t$){constructor(t,e){super(t,e);j(this,tz);j(this,tj,W(tI,8,this)),W(tI,11,this);this.state={initial:{},current:{}};const n=t.registry.plugins.get(tu);const r=n==null?void 0:n.register(tm);if(r){const t=this.destroy.bind(this);this.destroy=()=>{r();t()}}this.registerEffect(T(this,tz,tT).bind(this,n));this.registerEffect(T(this,tz,tL))}};tI=E(t$);tj=new WeakMap;tz=new WeakSet;tT=function(t){const{overlay:e}=this;if(!e||!t)return;const n=(0,i/* .getRoot */.Zn)(e);if(!n)return;return t.addRoot(n)};tL=function(){var t,e,n;const{state:r,manager:l,options:c}=this;const{dragOperation:u}=l;const{position:h,source:d,status:f}=u;if(f.idle){r.current={};r.initial={};return}if(!d)return;const{element:p,feedback:v}=d;if(!p||v==="none"||!f.initialized||f.initializing){return}const{initial:g}=r;const y=(t=this.overlay)!=null?t:p;const m=(0,i/* .getFrameTransform */.y4)(y);const b=(0,i/* .getFrameTransform */.y4)(p);const w=!tO(p,y);const k=new i/* .DOMRectangle */.yS(p,{frameTransform:w?b:null,ignoreTransforms:!w});const O={x:b.scaleX/m.scaleX,y:b.scaleY/m.scaleY};let{width:S,height:E,top:M,left:A}=k;if(w){S=S/O.x;E=E/O.y}const P=new i/* .Styles */.P_(y);const{transition:D,translate:W,boxSizing:C,paddingBlockStart:R,paddingBlockEnd:$,paddingInlineStart:I,paddingInlineEnd:j,borderInlineStartWidth:z,borderInlineEndWidth:T,borderBlockStartWidth:L,borderBlockEndWidth:_}=(0,i/* .getComputedStyles */.qt)(p);const N=v==="clone";const K=C==="content-box";const Y=K?parseInt(I)+parseInt(j)+parseInt(z)+parseInt(T):0;const F=K?parseInt(R)+parseInt($)+parseInt(L)+parseInt(_):0;const q=v!=="move"&&!this.overlay?tb(d,N?"clone":"hidden"):null;const V=(0,o/* .untracked */.O8)(()=>(0,i/* .isKeyboardEvent */.kx)(l.dragOperation.activatorEvent));if(W!=="none"){const t=(0,i/* .parseTranslate */.g)(W);if(t&&!g.translate){g.translate=t}}if(!g.transformOrigin){const t=(0,o/* .untracked */.O8)(()=>h.current);g.transformOrigin={x:(t.x-A*m.scaleX-m.x)/(S*m.scaleX),y:(t.y-M*m.scaleY-m.y)/(E*m.scaleY)}}const{transformOrigin:X}=g;const H=M*m.scaleY+m.y;const Z=A*m.scaleX+m.x;if(!g.coordinates){g.coordinates={x:Z,y:H};if(O.x!==1||O.y!==1){const{scaleX:t,scaleY:e}=b;const{x:n,y:r}=X;g.coordinates.x+=(S*t-S)*n;g.coordinates.y+=(E*e-E)*r}}if(!g.dimensions){g.dimensions={width:S,height:E}}if(!g.frameTransform){g.frameTransform=m}const U={x:g.coordinates.x-Z,y:g.coordinates.y-H};const B={width:(g.dimensions.width*g.frameTransform.scaleX-S*m.scaleX)*X.x,height:(g.dimensions.height*g.frameTransform.scaleY-E*m.scaleY)*X.y};const Q={x:U.x/m.scaleX+B.width,y:U.y/m.scaleY+B.height};const G={left:A+Q.x,top:M+Q.y};y.setAttribute(tp,"true");const J=(0,o/* .untracked */.O8)(()=>u.transform);const tt=(e=g.translate)!=null?e:{x:0,y:0};const te=J.x*m.scaleX+tt.x;const tn=J.y*m.scaleY+tt.y;const tr=(0,i/* .getFixedPositionOffset */.hl)();P.set({width:S-Y,height:E-F,top:G.top+tr.y,left:G.left+tr.x,translate:`${te}px ${tn}px 0`,transition:D?`${D}, translate 0ms linear`:"",scale:w?`${O.x} ${O.y}`:"","transform-origin":`${X.x*100}% ${X.y*100}%`},tf);if(q){p.insertAdjacentElement("afterend",q);if(c==null?void 0:c.rootElement){const t=typeof c.rootElement==="function"?c.rootElement(d):c.rootElement;t.appendChild(p)}}if((0,i/* .supportsPopover */.Ot)(y)){if(!y.hasAttribute("popover")){y.setAttribute("popover","manual")}(0,i/* .showPopover */.dO)(y);y.addEventListener("beforetoggle",tS)}let ti;let ts;let to;const ta=tP({placeholder:q,element:p,feedbackElement:y,frameTransform:m,transformOrigin:X,width:S,height:E,top:M,left:A,widthOffset:Y,heightOffset:F,delta:Q,styles:P,dragOperation:u,getElementMutationObserver:()=>ti,getSavedCellWidths:()=>to,setSavedCellWidths:t=>{to=t}});const tl=new i/* .DOMRectangle */.yS(y);(0,o/* .untracked */.O8)(()=>u.shape=tl);const tc=(0,i/* .getWindow */.zk)(y);const tu=t=>{this.manager.actions.stop({event:t})};const th=(0,i/* .prefersReducedMotion */.Oe)(tc);if(V){tc.addEventListener("resize",tu)}if((0,o/* .untracked */.O8)(()=>d.status)==="idle"){requestAnimationFrame(()=>d.status="dragging")}if(q){ta.observe(q);ti=tM(p,q,N);ts=tA(p,q,y)}const td=(n=l.dragOperation.source)==null?void 0:n.id;const tv=()=>{var t;if(!V||td==null)return;const e=l.registry.draggables.get(td);const n=(t=e==null?void 0:e.handle)!=null?t:e==null?void 0:e.element;if((0,i/* .isHTMLElement */.sb)(n)){n.focus()}};const tg=()=>{var t;ti==null?void 0:ti.disconnect();ts==null?void 0:ts.disconnect();ta.disconnect();tc.removeEventListener("resize",tu);if((0,i/* .supportsPopover */.Ot)(y)){y.removeEventListener("beforetoggle",tS);y.removeAttribute("popover")}y.removeAttribute(tp);P.reset();if(to&&tE(p)){const e=Array.from(p.cells);for(const[n,r]of e.entries()){r.style.width=(t=to[n])!=null?t:""}}d.status="idle";const e=r.current.translate!=null;if(q&&(e||q.parentElement!==y.parentElement)&&y.isConnected){q.replaceWith(y)}q==null?void 0:q.remove()};const ty=c==null?void 0:c.dropAnimation;const tm=this;const tw=(0,s/* .effects */.zb)(// Update transform on move
()=>{var t;const{transform:e,status:n}=u;if(!e.x&&!e.y&&!r.current.translate){return}if(n.dragging){const n=(t=g.translate)!=null?t:{x:0,y:0};const s={x:e.x/m.scaleX+n.x,y:e.y/m.scaleY+n.y};const l=r.current.translate;const c=(0,o/* .untracked */.O8)(()=>u.modifiers);const h=(0,o/* .untracked */.O8)(()=>{var t;return(t=u.shape)==null?void 0:t.current});const d=V&&!th?"250ms cubic-bezier(0.25, 1, 0.5, 1)":"0ms linear";P.set({transition:`${D}, translate ${d}`,translate:`${s.x}px ${s.y}px 0`},tf);ti==null?void 0:ti.takeRecords();if(h&&h!==tl&&l&&!c.length){const t=a/* .Point.delta */.bR.delta(s,l);u.shape=a/* .Rectangle.from */.M_.from(h.boundingRectangle).translate(t.x*m.scaleX,t.y*m.scaleY)}else{u.shape=new i/* .DOMRectangle */.yS(y)}r.current.translate=s}},// Drop animation
function(){if(u.status.dropped){this.dispose();d.status="dropping";const t=tm.dropAnimation!==void 0?tm.dropAnimation:ty;let e=r.current.translate;const n=e!=null;if(!e&&p!==y){e={x:0,y:0}}if(!e||t===null){tg();return}l.renderer.rendering.then(()=>{tC({element:p,feedbackElement:y,placeholder:q,translate:e,moved:n,transition:D,alignment:d.alignment,styles:P,animation:t!=null?t:void 0,getElementMutationObserver:()=>ti,cleanup:tg,restoreFocus:tv})})}});return()=>{tg();tw()}};C(tI,4,"overlay",tR,t_,tj);D(tI,t_);t_.configure=(0,r/* .configurator */.cD)(t_);var tN=t_;var tK=true;var tY=false;var tF,tq,tV,tX,tH,tZ,tU;tX=(tV=[s/* .reactive */.Kh],i/* .ScrollDirection.Forward */.Dh.Forward),tq=(tF=[s/* .reactive */.Kh],i/* .ScrollDirection.Reverse */.Dh.Reverse);var tB=class{constructor(){j(this,tZ,W(tH,8,this,tK)),W(tH,11,this);j(this,tU,W(tH,12,this,tK)),W(tH,15,this)}isLocked(t){if(t===i/* .ScrollDirection.Idle */.Dh.Idle){return false}if(t==null){return this[i/* .ScrollDirection.Forward */.Dh.Forward]===tK&&this[i/* .ScrollDirection.Reverse */.Dh.Reverse]===tK}return this[t]===tK}unlock(t){if(t===i/* .ScrollDirection.Idle */.Dh.Idle){return}this[t]=tY}};tH=E(null);tZ=new WeakMap;tU=new WeakMap;C(tH,4,tX,tV,tB,tZ);C(tH,4,tq,tF,tB,tU);D(tH,tB);// src/core/plugins/scrolling/ScrollIntent.ts
var tQ=[i/* .ScrollDirection.Forward */.Dh.Forward,i/* .ScrollDirection.Reverse */.Dh.Reverse];var tG=class{constructor(){this.x=new tB;this.y=new tB}isLocked(){return this.x.isLocked()&&this.y.isLocked()}};var tJ=class extends r/* .Plugin */.k_{constructor(t){super(t);const e=(0,o/* .signal */.vP)(new tG);let n=null;this.signal=e;(0,o/* .effect */.QZ)(()=>{const{status:r}=t.dragOperation;if(!r.initialized){n=null;e.value=new tG;return}const{delta:i}=t.dragOperation.position;if(n){const t={x:t0(i.x,n.x),y:t0(i.y,n.y)};const r=e.peek();(0,o/* .batch */.vA)(()=>{for(const e of a/* .Axes */.Y5){for(const n of tQ){if(t[e]===n){r[e].unlock(n)}}}e.value=r})}n=i})}get current(){return this.signal.peek()}};function t0(t,e){return Math.sign(t-e)}// src/core/plugins/scrolling/Scroller.ts
var t1,t2,t4,t5,t8,t6;var t3=class extends(t2=r/* .CorePlugin */.rV,t1=[s/* .reactive */.Kh],t2){constructor(t){super(t);j(this,t5,W(t4,8,this,false)),W(t4,11,this);j(this,t8);j(this,t6,()=>{if(!I(this,t8)){return}const{element:t,by:e}=I(this,t8);if(e.y)t.scrollTop+=e.y;if(e.x)t.scrollLeft+=e.x});this.scroll=t=>{var e;if(this.disabled){return false}const n=this.getScrollableElements();if(!n){z(this,t8,void 0);return false}const{position:r}=this.manager.dragOperation;const s=r==null?void 0:r.current;if(s){const{by:r}=t!=null?t:{};const o=r?{x:t7(r.x),y:t7(r.y)}:void 0;const l=o?void 0:this.scrollIntentTracker.current;if(l==null?void 0:l.isLocked()){return false}for(const t of n){const n=(0,i/* .canScroll */.a_)(t,r);if(n.x||n.y){const{speed:n,direction:c}=(0,i/* .detectScrollIntent */.Fk)(t,s,o);if(l){for(const t of a/* .Axes */.Y5){if(l[t].isLocked(c[t])){n[t]=0;c[t]=0}}}if(c.x||c.y){const{x:s,y:o}=r!=null?r:c;const a=s*n.x;const l=o*n.y;if(a||l){const n=(e=I(this,t8))==null?void 0:e.by;if(this.autoScrolling&&n){const t=n.x&&!a||n.y&&!l;if(t)continue}z(this,t8,{element:t,by:{x:a,y:l}});i/* .scheduler.schedule */.ck.schedule(I(this,t6));return true}}}}}z(this,t8,void 0);return false};let e=null;let n=null;const r=(0,s/* .computed */.EW)(()=>{const{position:n,source:r}=t.dragOperation;if(!n){return null}const s=(0,i/* .getElementFromPoint */.Fm)((0,i/* .getRoot */.Zn)(r==null?void 0:r.element),n.current);if(s){e=s}return s!=null?s:e});const o=(0,s/* .computed */.EW)(()=>{const e=r.value;const{documentElement:s}=(0,i/* .getDocument */.YE)(e);if(!e||e===s){const{target:e}=t.dragOperation;const r=e==null?void 0:e.element;if(r){const t=(0,i/* .getScrollableAncestors */.sl)(r,{excludeElement:false});n=t;return t}}if(e){const t=(0,i/* .getScrollableAncestors */.sl)(e,{excludeElement:false});if(this.autoScrolling&&n&&t.size<(n==null?void 0:n.size)){return n}n=t;return t}n=null;return null},s/* .deepEqual */.bD);this.getScrollableElements=()=>{return o.value};this.scrollIntentTracker=new tJ(t);this.destroy=t.monitor.addEventListener("dragmove",e=>{if(this.disabled||e.defaultPrevented||!(0,i/* .isKeyboardEvent */.kx)(t.dragOperation.activatorEvent)||!e.by){return}if(this.scroll({by:e.by})){e.preventDefault()}})}};t4=E(t2);t5=new WeakMap;t8=new WeakMap;t6=new WeakMap;C(t4,4,"autoScrolling",t1,t3,t5);D(t4,t3);function t7(t){if(t>0){return i/* .ScrollDirection.Forward */.Dh.Forward}if(t<0){return i/* .ScrollDirection.Reverse */.Dh.Reverse}return i/* .ScrollDirection.Idle */.Dh.Idle}// src/utilities/scheduling/scheduler.ts
var t9=class{constructor(t){this.scheduler=t;this.pending=false;this.tasks=/* @__PURE__ */new Set;this.resolvers=/* @__PURE__ */new Set;this.flush=()=>{const{tasks:t,resolvers:e}=this;this.pending=false;this.tasks=/* @__PURE__ */new Set;this.resolvers=/* @__PURE__ */new Set;for(const e of t){e()}for(const t of e){t()}}}schedule(t){this.tasks.add(t);if(!this.pending){this.pending=true;this.scheduler(this.flush)}return new Promise(t=>this.resolvers.add(t))}};var et=new t9(t=>{if(typeof requestAnimationFrame==="function"){requestAnimationFrame(t)}else{t()}});// src/core/plugins/scrolling/AutoScroller.ts
var ee=10;var en=class extends r/* .Plugin */.k_{constructor(t,e){super(t);const n=t.registry.plugins.get(t3);if(!n){throw new Error("AutoScroller plugin depends on Scroller plugin")}this.destroy=(0,o/* .effect */.QZ)(()=>{if(this.disabled){return}const{position:e,status:r}=t.dragOperation;if(r.dragging){const t=n.scroll();if(t){n.autoScrolling=true;const t=setInterval(()=>et.schedule(n.scroll),ee);return()=>{clearInterval(t)}}else{n.autoScrolling=false}}})}};var er={capture:true,passive:true};var ei;var es=class extends r/* .CorePlugin */.rV{constructor(t){super(t);j(this,ei);this.handleScroll=()=>{if(I(this,ei)==null){z(this,ei,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(false);z(this,ei,void 0)},50))}};const{dragOperation:e}=this.manager;this.destroy=(0,o/* .effect */.QZ)(()=>{var t,n,r;const i=e.status.dragging;if(i){const i=(r=(n=(t=e.source)==null?void 0:t.element)==null?void 0:n.ownerDocument)!=null?r:document;i.addEventListener("scroll",this.handleScroll,er);return()=>{i.removeEventListener("scroll",this.handleScroll,er)}}})}};ei=new WeakMap;var eo=class extends r/* .Plugin */.k_{constructor(t,e){super(t,e);this.manager=t;this.destroy=(0,o/* .effect */.QZ)(()=>{var t;const{dragOperation:e}=this.manager;const{nonce:n}=(t=this.options)!=null?t:{};if(e.status.initialized){const t=document.createElement("style");if(n){t.setAttribute("nonce",n)}t.textContent=`* { user-select: none !important; -webkit-user-select: none !important; }`;document.head.appendChild(t);ea();document.addEventListener("selectionchange",ea,{capture:true});return()=>{document.removeEventListener("selectionchange",ea,{capture:true});t.remove()}}})}};function ea(){var t;(t=document.getSelection())==null?void 0:t.removeAllRanges()}var el=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(t,e){var n;const r=(n=e.handle)!=null?n:e.element;return t.target!==r}});var ec;var eu=class t extends r/* .Sensor */.$A{constructor(t,e){super(t);this.manager=t;this.options=e;j(this,ec,[]);this.listeners=new i/* .Listeners */.qR;this.handleSourceKeyDown=(t,e,n)=>{if(this.disabled||t.defaultPrevented){return}if(!(0,i/* .isElement */.vq)(t.target)){return}if(e.disabled){return}const{keyboardCodes:r=el.keyboardCodes,preventActivation:s=el.preventActivation}=n!=null?n:{};if(!r.start.includes(t.code)){return}if(!this.manager.dragOperation.status.idle){return}if(s==null?void 0:s(t,e))return;this.handleStart(t,e,n)}}bind(t,e=this.options){const n=(0,o/* .effect */.QZ)(()=>{var n;const r=(n=t.handle)!=null?n:t.element;const s=n=>{if((0,i/* .isKeyboardEvent */.kx)(n)){this.handleSourceKeyDown(n,t,e)}};if(r){r.addEventListener("keydown",s);return()=>{r.removeEventListener("keydown",s)}}});return n}handleStart(t,e,n){const{element:r}=e;if(!r){throw new Error("Source draggable does not have an associated element")}t.preventDefault();t.stopImmediatePropagation();(0,i/* .scrollIntoViewIfNeeded */.$v)(r);const{center:s}=new i/* .DOMRectangle */.yS(r);const o=this.manager.actions.start({event:t,coordinates:{x:s.x,y:s.y},source:e});if(o.signal.aborted)return this.cleanup();this.sideEffects();const a=(0,i/* .getDocument */.YE)(r);const l=[this.listeners.bind(a,[{type:"keydown",listener:t=>this.handleKeyDown(t,e,n),options:{capture:true}}])];I(this,ec).push(...l)}handleKeyDown(t,e,n){const{keyboardCodes:r=el.keyboardCodes}=n!=null?n:{};if(ed(t,[...r.end,...r.cancel])){t.preventDefault();const e=ed(t,r.cancel);this.handleEnd(t,e);return}if(ed(t,r.up)){this.handleMove("up",t)}else if(ed(t,r.down)){this.handleMove("down",t)}if(ed(t,r.left)){this.handleMove("left",t)}else if(ed(t,r.right)){this.handleMove("right",t)}}handleEnd(t,e){this.manager.actions.stop({event:t,canceled:e});this.cleanup()}handleMove(t,e){var n,r;const{shape:i}=this.manager.dragOperation;const s=e.shiftKey?5:1;let o={x:0,y:0};let a=(r=(n=this.options)==null?void 0:n.offset)!=null?r:el.offset;if(typeof a==="number"){a={x:a,y:a}}if(!i){return}switch(t){case"up":o={x:0,y:-a.y*s};break;case"down":o={x:0,y:a.y*s};break;case"left":o={x:-a.x*s,y:0};break;case"right":o={x:a.x*s,y:0};break}if(o.x||o.y){e.preventDefault();this.manager.actions.move({event:e,by:o})}}sideEffects(){const t=this.manager.registry.plugins.get(en);if((t==null?void 0:t.disabled)===false){t.disable();I(this,ec).push(()=>{t.enable()})}}cleanup(){I(this,ec).forEach(t=>t());z(this,ec,[])}destroy(){this.cleanup();this.listeners.clear()}};ec=new WeakMap;eu.configure=(0,r/* .configurator */.cD)(eu);eu.defaults=el;var eh=eu;function ed(t,e){return e.includes(t.code)}var ef;var ep=class extends r/* .ActivationConstraint */._l{constructor(){super(...arguments);j(this,ef)}onEvent(t){switch(t.type){case"pointerdown":z(this,ef,(0,i/* .getEventCoordinates */.e_)(t));break;case"pointermove":if(!I(this,ef))return;const{x:e,y:n}=(0,i/* .getEventCoordinates */.e_)(t);const r={x:e-I(this,ef).x,y:n-I(this,ef).y};const{tolerance:s}=this.options;if(s&&(0,a/* .exceedsDistance */.dq)(r,s)){this.abort();return}if((0,a/* .exceedsDistance */.dq)(r,this.options.value)){this.activate(t)}break;case"pointerup":this.abort();break}}abort(){z(this,ef,void 0)}};ef=new WeakMap;var ev,eg;var ey=class extends r/* .ActivationConstraint */._l{constructor(){super(...arguments);j(this,ev);j(this,eg)}onEvent(t){switch(t.type){case"pointerdown":z(this,eg,(0,i/* .getEventCoordinates */.e_)(t));z(this,ev,setTimeout(()=>this.activate(t),this.options.value));break;case"pointermove":if(!I(this,eg))return;const{x:e,y:n}=(0,i/* .getEventCoordinates */.e_)(t);const r={x:e-I(this,eg).x,y:n-I(this,eg).y};if((0,a/* .exceedsDistance */.dq)(r,this.options.tolerance)){this.abort()}break;case"pointerup":this.abort();break}}abort(){if(I(this,ev)){clearTimeout(I(this,ev));z(this,eg,void 0);z(this,ev,void 0)}}};ev=new WeakMap;eg=new WeakMap;// src/core/sensors/pointer/PointerActivationConstraints.ts
var em=class{};em.Delay=ey;em.Distance=ep;// src/core/sensors/pointer/PointerSensor.ts
var eb=Object.freeze({activationConstraints(t,e){var n;const{pointerType:r,target:s}=t;if(r==="mouse"&&(0,i/* .isElement */.vq)(s)&&(e.handle===s||((n=e.handle)==null?void 0:n.contains(s)))){return void 0}if(r==="touch"){return[new em.Delay({value:250,tolerance:5})]}if((0,i/* .isTextInput */.AI)(s)&&!t.defaultPrevented){return[new em.Delay({value:200,tolerance:0})]}return[new em.Delay({value:200,tolerance:10}),new em.Distance({value:5})]},preventActivation(t,e){var n;const{target:r}=t;if(r===e.element)return false;if(r===e.handle)return false;if(!(0,i/* .isElement */.vq)(r))return false;if((n=e.handle)==null?void 0:n.contains(r))return false;return(0,i/* .isInteractiveElement */.H5)(r)}});var ew;var ex=class t extends r/* .Sensor */.$A{constructor(t,e){super(t);this.manager=t;this.options=e;j(this,ew,/* @__PURE__ */new Set);this.listeners=new i/* .Listeners */.qR;this.latest={event:void 0,coordinates:void 0};this.handleMove=()=>{const{event:t,coordinates:e}=this.latest;if(!t||!e){return}this.manager.actions.move({event:t,to:e})};this.handleCancel=this.handleCancel.bind(this);this.handlePointerUp=this.handlePointerUp.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(t,e,n=this.options){const{activationConstraints:r=eb.activationConstraints}=n!=null?n:{};const i=typeof r==="function"?r(t,e):r;return i}bind(t,e=this.options){const n=(0,o/* .effect */.QZ)(()=>{var n;const r=new AbortController;const{signal:s}=r;const o=n=>{if((0,i/* .isPointerEvent */.EE)(n)){this.handlePointerDown(n,t,e)}};let a=[(n=t.handle)!=null?n:t.element];if(e==null?void 0:e.activatorElements){if(Array.isArray(e.activatorElements)){a=e.activatorElements}else{a=e.activatorElements(t)}}for(const t of a){if(!t)continue;eA(t.ownerDocument.defaultView);t.addEventListener("pointerdown",o,{signal:s})}return()=>r.abort()});return n}handlePointerDown(t,e,n){if(this.disabled||!t.isPrimary||t.button!==0||!(0,i/* .isElement */.vq)(t.target)||e.disabled||eO(t)||!this.manager.dragOperation.status.idle){return}const{preventActivation:s=eb.preventActivation}=n!=null?n:{};if(s==null?void 0:s(t,e)){return}const{target:o}=t;const a=(0,i/* .isHTMLElement */.sb)(o)&&o.draggable&&o.getAttribute("draggable")==="true";const l=(0,i/* .getFrameTransform */.y4)(e.element);const{x:c,y:u}=(0,i/* .getEventCoordinates */.e_)(t);this.initialCoordinates={x:c*l.scaleX+l.x,y:u*l.scaleY+l.y};const h=this.activationConstraints(t,e,n);t.sensor=this;const d=new r/* .ActivationController */.Zm(h,t=>this.handleStart(e,t));d.signal.onabort=()=>this.handleCancel(t);d.onEvent(t);this.controller=d;const f=(0,i/* .getDocuments */.HK)();const p=this.listeners.bind(f,[{type:"pointermove",listener:t=>this.handlePointerMove(t,e)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:true}},{type:"pointercancel",listener:this.handleCancel},{// Cancel activation if there is a competing Drag and Drop interaction
type:"dragstart",listener:a?this.handleCancel:eS,options:{capture:true}}]);const v=()=>{p();this.initialCoordinates=void 0};I(this,ew).add(v)}handlePointerMove(t,e){var n,r;if(((n=this.controller)==null?void 0:n.activated)===false){(r=this.controller)==null?void 0:r.onEvent(t);return}if(this.manager.dragOperation.status.dragging){const n=(0,i/* .getEventCoordinates */.e_)(t);const r=(0,i/* .getFrameTransform */.y4)(e.element);n.x=n.x*r.scaleX+r.x;n.y=n.y*r.scaleY+r.y;t.preventDefault();t.stopPropagation();this.latest.event=t;this.latest.coordinates=n;i/* .scheduler.schedule */.ck.schedule(this.handleMove)}}handlePointerUp(t){const{status:e}=this.manager.dragOperation;if(!e.idle){t.preventDefault();t.stopPropagation();const n=!e.initialized;this.manager.actions.stop({event:t,canceled:n})}this.cleanup()}handleKeyDown(t){if(t.key==="Escape"){t.preventDefault();this.handleCancel(t)}}handleStart(t,e){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle){return}if(e.defaultPrevented){return}const s=n.actions.start({coordinates:r,event:e,source:t});if(s.signal.aborted)return this.cleanup();e.preventDefault();const o=(0,i/* .getDocument */.YE)(e.target);const a=o.body;a.setPointerCapture(e.pointerId);const l=(0,i/* .isElement */.vq)(e.target)?[e.target,a]:a;const c=this.listeners.bind(l,[{// Prevent scrolling on touch devices
type:"touchmove",listener:eS,options:{passive:false}},{// Prevent click events
type:"click",listener:eS},{type:"contextmenu",listener:eS},{type:"keydown",listener:this.handleKeyDown}]);I(this,ew).add(c)}handleCancel(t){const{dragOperation:e}=this.manager;if(e.status.initialized){this.manager.actions.stop({event:t,canceled:true})}this.cleanup()}cleanup(){this.latest={event:void 0,coordinates:void 0};I(this,ew).forEach(t=>t());I(this,ew).clear()}destroy(){this.cleanup();this.listeners.clear()}};ew=new WeakMap;ex.configure=(0,r/* .configurator */.cD)(ex);ex.defaults=eb;var ek=ex;function eO(t){return"sensor"in t}function eS(t){t.preventDefault()}function eE(){}var eM=/* @__PURE__ */new WeakSet;function eA(t){if(!t||eM.has(t)){return}t.addEventListener("touchmove",eE,{capture:false,passive:false});eM.add(t)}// src/core/manager/manager.ts
var eP={modifiers:[],plugins:[H,en,U,tN,eo],sensors:[ek,eh]};var eD=class extends r/* .DragDropManager */.ti{constructor(t={}){const e=(0,r/* .resolveCustomizable */.pT)(t.plugins,eP.plugins);const n=(0,r/* .resolveCustomizable */.pT)(t.sensors,eP.sensors);const i=(0,r/* .resolveCustomizable */.pT)(t.modifiers,eP.modifiers);super(k(w({},t),{plugins:[es,t3,tu,...e],sensors:n,modifiers:i}))}};var eW,eC,eR,e$,eI,ej,ez,eT;var eL=class extends(e$=r/* .Draggable */.sx,eR=[s/* .reactive */.Kh],eC=[s/* .reactive */.Kh],eW=[s/* .reactive */.Kh],e$){constructor(t,e){var n=t,{element:i,effects:s=()=>[],handle:o,feedback:a="default"}=n,l=S(n,["element","effects","handle","feedback"]);super(w({effects:()=>[...s(),()=>{var t,e;const{manager:n}=this;if(!n)return;const i=(e=(t=this.sensors)==null?void 0:t.map(r/* .descriptor */.yu))!=null?e:[...n.sensors];const s=i.map(t=>{const e=t instanceof r/* .Sensor */.$A?t:n.registry.register(t.plugin);const i=t instanceof r/* .Sensor */.$A?void 0:t.options;const s=e.bind(this,i);return s});return function t(){s.forEach(t=>t())}}]},l),e);j(this,ej,W(eI,8,this)),W(eI,11,this);j(this,ez,W(eI,12,this)),W(eI,15,this);j(this,eT,W(eI,16,this)),W(eI,19,this);this.element=i;this.handle=o;this.feedback=a}};eI=E(e$);ej=new WeakMap;ez=new WeakMap;eT=new WeakMap;C(eI,4,"handle",eR,eL,ej);C(eI,4,"element",eC,eL,ez);C(eI,4,"feedback",eW,eL,eT);D(eI,eL);var e_,eN,eK,eY,eF,eq,eV,eX,eH,eZ;var eU=class extends(eK=r/* .Droppable */.gL,eN=[s/* .reactive */.Kh],e_=[s/* .reactive */.Kh],eK){constructor(t,e){var n=t,{element:r,effects:s=()=>[]}=n,a=S(n,["element","effects"]);const{collisionDetector:c=l/* .defaultCollisionDetection */.V6}=a;const u=t=>{const{manager:e,element:n}=this;if(!n||t===null){this.shape=void 0;return void 0}if(!e)return;const r=new i/* .DOMRectangle */.yS(n);const s=(0,o/* .untracked */.O8)(()=>this.shape);if(r&&(s==null?void 0:s.equals(r))){return s}this.shape=r;return r};const h=(0,o/* .signal */.vP)(false);super(k(w({},a),{collisionDetector:c,effects:()=>[...s(),()=>{const{element:t,manager:e}=this;if(!e)return;const{dragOperation:n}=e;const{source:r}=n;h.value=Boolean(r&&n.status.initialized&&t&&!this.disabled&&this.accepts(r))},()=>{const{element:t}=this;if(h.value&&t){const e=new i/* .PositionObserver */.UX(t,u);return()=>{e.disconnect();this.shape=void 0}}},()=>{var t;if((t=this.manager)==null?void 0:t.dragOperation.status.initialized){return()=>{this.shape=void 0}}}]}),e);j(this,eH);j(this,eF,W(eY,8,this)),W(eY,11,this);j(this,eZ,W(eY,12,this)),W(eY,15,this);this.element=r;this.refreshShape=()=>u()}set element(t){z(this,eH,t,eX)}get element(){var t;return(t=this.proxy)!=null?t:I(this,eH,eV)}};eY=E(eK);eF=new WeakMap;eH=new WeakSet;eZ=new WeakMap;eq=C(eY,20,"#element",eN,eH,eF),eV=eq.get,eX=eq.set;C(eY,4,"proxy",e_,eU,eZ);D(eY,eU);//# sourceMappingURL=index.js.map
//# sourceMappingURL=index.js.map
},92945:function(t,e,n){// ESM COMPAT FLAG
n.r(e);// EXPORTS
n.d(e,{RestrictToElement:()=>/* binding */M,RestrictToWindow:()=>/* binding */S});// EXTERNAL MODULE: ./node_modules/.pnpm/@preact+signals-core@1.12.1/node_modules/@preact/signals-core/dist/signals-core.module.js
var r=n(67618);// EXTERNAL MODULE: ./node_modules/.pnpm/@dnd-kit+abstract@0.3.2/node_modules/@dnd-kit/abstract/index.js
var i=n(58585);// CONCATENATED MODULE: ./node_modules/.pnpm/@dnd-kit+abstract@0.3.2/node_modules/@dnd-kit/abstract/modifiers.js
var s=Object.defineProperty;var o=Object.defineProperties;var a=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var c=Object.prototype.hasOwnProperty;var u=Object.prototype.propertyIsEnumerable;var h=(t,e,n)=>e in t?s(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var d=(t,e)=>{for(var n in e||(e={}))if(c.call(e,n))h(t,n,e[n]);if(l)for(var n of l(e)){if(u.call(e,n))h(t,n,e[n])}return t};var f=(t,e)=>o(t,a(e));var p=class t extends i/* .Modifier */.e6{/**
   * Applies the axis restriction to the drag operation.
   *
   * @param operation - The current drag operation
   * @returns The modified transform with the axis restriction applied
   */apply({transform:t}){if(!this.options){return t}const{axis:e,value:n}=this.options;return f(d({},t),{[e]:n})}};/**
 * Creates a configured instance of the AxisModifier.
 *
 * @param options - The axis restriction options
 * @returns A configured AxisModifier instance
 */p.configure=(0,i/* .configurator */.cD)(p);var v=p;var g=v.configure({axis:"x",value:0});var y=v.configure({axis:"y",value:0});// src/modifiers/boundingRectangle.ts
function m(t,e,n){const r=d({},e);if(t.boundingRectangle.top+e.y<=n.top){r.y=n.top-t.boundingRectangle.top}else if(t.boundingRectangle.bottom+e.y>=n.top+n.height){r.y=n.top+n.height-t.boundingRectangle.bottom}if(t.boundingRectangle.left+e.x<=n.left){r.x=n.left-t.boundingRectangle.left}else if(t.boundingRectangle.right+e.x>=n.left+n.width){r.x=n.left+n.width-t.boundingRectangle.right}return r}var b=class t extends i/* .Modifier */.e6{/**
   * Applies the snap grid to the drag operation.
   *
   * @param operation - The current drag operation
   * @returns The modified transform with coordinates snapped to the grid
   */apply({transform:t}){var e;const{size:n=20}=(e=this.options)!=null?e:{};const r=typeof n==="number"?n:n.x;const i=typeof n==="number"?n:n.y;return f(d({},t),{x:Math.ceil(t.x/r)*r,y:Math.ceil(t.y/i)*i})}};/**
 * Creates a configured instance of the SnapModifier.
 *
 * @param options - The snap grid options
 * @returns A configured SnapModifier instance
 */b.configure=(0,i/* .configurator */.cD)(b);var w=/* unused pure expression or super */null&&b;//# sourceMappingURL=modifiers.js.map
//# sourceMappingURL=modifiers.js.map
// EXTERNAL MODULE: ./node_modules/.pnpm/@dnd-kit+geometry@0.3.2/node_modules/@dnd-kit/geometry/dist/index.mjs
var k=n(43261);// EXTERNAL MODULE: ./node_modules/.pnpm/@dnd-kit+dom@0.3.2/node_modules/@dnd-kit/dom/utilities.js
var O=n(30455);// CONCATENATED MODULE: ./node_modules/.pnpm/@dnd-kit+dom@0.3.2/node_modules/@dnd-kit/dom/modifiers.js
// src/modifiers/RestrictToWindow.ts
var S=class extends i/* .Modifier */.e6{constructor(t){super(t);const{dragOperation:e}=t;const n=()=>(0,r/* .untracked */.O8)(()=>{var t;const{source:n}=e;this.windowBoundingRectangle=(0,O/* .getViewportBoundingRectangle */.A)((t=n==null?void 0:n.element)!=null?t:document.documentElement)});this.destroy=(0,r/* .effect */.QZ)(()=>{if(e.status.idle){return}n();window.addEventListener("resize",n);return()=>{window.removeEventListener("resize",n)}})}apply({shape:t,transform:e}){if(!this.windowBoundingRectangle||!t){return e}const{initial:n,current:r}=t;const{height:i,width:s}=r.boundingRectangle;const o=n.center.x-s/2;const a=n.center.y-i/2;const l=m(new k/* .Rectangle */.M_(o,a,s,i),e,this.windowBoundingRectangle);return l}};var E=class t extends i/* .Modifier */.e6{constructor(t,e){super(t,e);this.boundingRectangle=(0,r/* .signal */.vP)(null);this.destroy=(0,r/* .effect */.QZ)(()=>{if(!this.options){return}const{dragOperation:e}=t;const{status:n}=e;if(n.initialized){const{element:t}=this.options;const n=typeof t==="function"?t(e):t;if(!n){return}let r;const i=()=>{this.boundingRectangle.value=(0,O/* .getBoundingRectangle */.Ks)(n)};const s=()=>{if(r){return}r=setTimeout(()=>{i();r=void 0},25)};const o=new ResizeObserver(i);o.observe(n);document.addEventListener("scroll",s,{passive:true,capture:true});return()=>{document.removeEventListener("scroll",s,{capture:true});o.disconnect();this.boundingRectangle.value=null}}})}apply(t){const{shape:e,transform:n}=t;if(!e){return n}const r=this.boundingRectangle.value;if(!r){return n}const{initial:i,current:s}=e;const{height:o,width:a}=s.boundingRectangle;const l=i.center.x-a/2;const c=i.center.y-o/2;const u=m(new k/* .Rectangle */.M_(l,c,a,o),n,r);return u}};E.configure=(0,i/* .configurator */.cD)(E);var M=E;//# sourceMappingURL=modifiers.js.map
//# sourceMappingURL=modifiers.js.map
},99375:function(t,e,n){n.r(e);n.d(e,{OptimisticSortingPlugin:()=>te,Sortable:()=>tg,SortableDraggable:()=>ty,SortableDroppable:()=>tm,SortableKeyboardPlugin:()=>_,defaultSortableTransition:()=>to,isSortable:()=>z,isSortableOperation:()=>T});/* import */var r=n(67618);/* import */var i=n(42467);/* import */var s=n(21116);/* import */var o=n(8679);/* import */var a=n(30455);/* import */var l=n(58585);/* import */var c=n(43261);var u=Object.create;var h=Object.defineProperty;var d=Object.defineProperties;var f=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty;var y=Object.prototype.propertyIsEnumerable;var m=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t);var b=t=>{throw TypeError(t)};var w=(t,e,n)=>e in t?h(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var k=(t,e)=>{for(var n in e||(e={}))if(g.call(e,n))w(t,n,e[n]);if(v)for(var n of v(e)){if(y.call(e,n))w(t,n,e[n])}return t};var O=(t,e)=>d(t,p(e));var S=(t,e)=>{var n={};for(var r in t)if(g.call(t,r)&&e.indexOf(r)<0)n[r]=t[r];if(t!=null&&v)for(var r of v(t)){if(e.indexOf(r)<0&&y.call(t,r))n[r]=t[r]}return n};var E=t=>{var e;return[,,,u((e=void 0)!=null?e:null)]};var M=["class","method","getter","setter","accessor","field","value","get","set"];var A=t=>t!==void 0&&typeof t!=="function"?b("Function expected"):t;var P=(t,e,n,r,i)=>({kind:M[t],name:e,metadata:r,addInitializer:t=>n._?b("Already initialized"):i.push(A(t||null))});var D=(t,e)=>w(e,m("metadata"),t[3]);var W=(t,e,n,r)=>{for(var i=0,s=t[e>>1],o=s&&s.length;i<o;i++)e&1?s[i].call(n):r=s[i].call(n,r);return r};var C=(t,e,n,r,i,s)=>{var o,a,l,c,u,d=e&7,p=false,v=false;var g=t.length+1,y=M[d+5];var m=t[g-1]=[],w=t[g]||(t[g]=[]);var k=(i=i.prototype,f({get[n](){return $(this,s)},set[n](x){return j(this,s,x)}},n));for(var O=r.length-1;O>=0;O--){c=P(d,n,l={},t[3],w);{c.static=p,c.private=v,u=c.access={has:t=>n in t};u.get=t=>t[n];u.set=(t,e)=>t[n]=e}a=(0,r[O])({get:k.get,set:k.set},c),l._=1;if(a===void 0)A(a)&&(k[y]=a);else if(typeof a!=="object"||a===null)b("Object expected");else A(o=a.get)&&(k.get=o),A(o=a.set)&&(k.set=o),A(o=a.init)&&m.unshift(o)}return k&&h(i,n,k),i};var R=(t,e,n)=>e.has(t)||b("Cannot "+n);var $=(t,e,n)=>(R(t,e,"read from private field"),e.get(t));var I=(t,e,n)=>e.has(t)?b("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);var j=(t,e,n,r)=>(R(t,e,"write to private field"),e.set(t,n),n);// src/sortable/utilities.ts
function z(t){return t instanceof tm||t instanceof ty}function T(t){return z(t.source)&&z(t.target)}// src/sortable/plugins/SortableKeyboardPlugin.ts
var L=10;var _=class extends l/* .Plugin */.k_{constructor(t){super(t);const e=(0,r/* .effect */.QZ)(()=>{const{dragOperation:e}=t;if(!(0,a/* .isKeyboardEvent */.kx)(e.activatorEvent)){return}if(!z(e.source)){return}if(e.status.initialized){const e=t.registry.plugins.get(o.Scroller);if(e){e.disable();return()=>e.enable()}}});const n=t.monitor.addEventListener("dragmove",(t,e)=>{queueMicrotask(()=>{if(this.disabled||t.defaultPrevented||!t.nativeEvent){return}const{dragOperation:n}=e;if(!(0,a/* .isKeyboardEvent */.kx)(t.nativeEvent)){return}if(!z(n.source)){return}if(!n.shape){return}const{actions:i,collisionObserver:o,registry:l}=e;const{by:u}=t;if(!u){return}const h=N(u);const{source:d,target:f}=n;const{center:p}=n.shape.current;const v=[];const g=[];(0,r/* .batch */.vA)(()=>{for(const t of l.droppables){const{id:e}=t;if(!t.accepts(d)||e===(f==null?void 0:f.id)&&z(t)||!t.element){continue}let n=t.shape;const r=new a/* .DOMRectangle */.yS(t.element,{getBoundingClientRect:t=>(0,a/* .getVisibleBoundingRectangle */.k$)(t,void 0,.2)});if(!r.height||!r.width)continue;if(h=="down"&&p.y+L<r.center.y||h=="up"&&p.y-L>r.center.y||h=="left"&&p.x-L>r.center.x||h=="right"&&p.x+L<r.center.x){v.push(t);t.shape=r;g.push(()=>t.shape=n)}}});t.preventDefault();o.disable();const y=o.computeCollisions(v,s/* .closestCorners */.y$);(0,r/* .batch */.vA)(()=>g.forEach(t=>t()));const[m]=y;if(!m){return}const{id:b}=m;const{index:w,group:k}=d.sortable;i.setDropTarget(b).then(()=>{const{source:t,target:e,shape:r}=n;if(!t||!z(t)||!r){return}const{index:s,group:l,target:u}=t.sortable;const h=w!==s||k!==l;const d=h?u:e==null?void 0:e.element;if(!d)return;(0,a/* .scrollIntoViewIfNeeded */.$v)(d);const f=new a/* .DOMRectangle */.yS(d);if(!f){return}const p=c/* .Rectangle.delta */.M_.delta(f,c/* .Rectangle.from */.M_.from(r.current.boundingRectangle),t.alignment);i.move({by:p});if(h){i.setDropTarget(t.id).then(()=>o.enable())}else{o.enable()}})})});this.destroy=()=>{n();e()}}};function N(t){const{x:e,y:n}=t;if(e>0){return"right"}else if(e<0){return"left"}else if(n>0){return"down"}else if(n<0){return"up"}}// ../helpers/dist/index.js
var K=Object.defineProperty;var Y=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty;var X=Object.prototype.propertyIsEnumerable;var H=(t,e,n)=>e in t?K(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var Z=(t,e)=>{for(var n in e||(e={}))if(V.call(e,n))H(t,n,e[n]);if(q)for(var n of q(e)){if(X.call(e,n))H(t,n,e[n])}return t};var U=(t,e)=>Y(t,F(e));function B(t,e,n){if(e===n){return t}const r=t.slice();r.splice(n,0,r.splice(e,1)[0]);return r}function Q(t){return"initialIndex"in t&&typeof t.initialIndex==="number"&&"index"in t&&typeof t.index==="number"}function G(t,e,n){var r,i,s;const{source:o,target:a,canceled:l}=e.operation;if(!o||!a||l){if("preventDefault"in e)e.preventDefault();return t}const c=(t,e)=>t===e||typeof t==="object"&&"id"in t&&t.id===e;if(Array.isArray(t)){const r=t.findIndex(t=>c(t,o.id));const i=t.findIndex(t=>c(t,a.id));if(r===-1||i===-1){if(Q(o)){const r=o.initialIndex;const i=o.index;if(r===i||r<0||r>=t.length){if("preventDefault"in e)e.preventDefault();return t}return n(t,r,i)}return t}if(!l&&"index"in o&&typeof o.index==="number"){const e=o.index;if(e!==r){return n(t,r,e)}}return n(t,r,i)}const u=Object.entries(t);let h=-1;let d;let f=-1;let p;for(const[t,e]of u){if(h===-1){h=e.findIndex(t=>c(t,o.id));if(h!==-1){d=t}}if(f===-1){f=e.findIndex(t=>c(t,a.id));if(f!==-1){p=t}}if(h!==-1&&f!==-1){break}}if(h===-1&&Q(o)){const r=o.initialGroup;const i=o.initialIndex;const s=o.group;const a=o.index;if(r==null||s==null||!(r in t)||!(s in t)){if("preventDefault"in e)e.preventDefault();return t}if(r===s&&i===a){if("preventDefault"in e)e.preventDefault();return t}if(r===s){return U(Z({},t),{[r]:n(t[r],i,a)})}const l=t[r][i];return U(Z({},t),{[r]:[...t[r].slice(0,i),...t[r].slice(i+1)],[s]:[...t[s].slice(0,a),l,...t[s].slice(a)]})}if(!o.manager)return t;const{dragOperation:v}=o.manager;const g=(i=(r=v.shape)==null?void 0:r.current.center)!=null?i:v.position.current;if(p==null){if(a.id in t){const e=a.shape&&g.y>a.shape.center.y?t[a.id].length:0;p=a.id;f=e}}if(d==null||p==null||d===p&&h===f){if(d!=null&&d===p&&h===f&&Q(o)){const e=o.group!=null&&o.group!==d;const r=o.index!==h;if(e||r){const e=(s=o.group)!=null?s:d;if(e in t){if(d===e){return U(Z({},t),{[d]:n(t[d],h,o.index)})}const r=t[d][h];return U(Z({},t),{[d]:[...t[d].slice(0,h),...t[d].slice(h+1)],[e]:[...t[e].slice(0,o.index),r,...t[e].slice(o.index)]})}}}if("preventDefault"in e)e.preventDefault();return t}if(d===p){return U(Z({},t),{[d]:n(t[d],h,f)})}const y=a.shape&&Math.round(g.y)>Math.round(a.shape.center.y);const m=y?1:0;const b=t[d][h];return U(Z({},t),{[d]:[...t[d].slice(0,h),...t[d].slice(h+1)],[p]:[...t[p].slice(0,f+m),b,...t[p].slice(f+m)]})}function J(t,e){return G(t,e,B)}var tt="__default__";var te=class extends l/* .Plugin */.k_{constructor(t){super(t);const e=()=>{const e=/* @__PURE__ */new Map;for(const n of t.registry.droppables){if(n instanceof tm){const{sortable:t}=n;const{group:r}=t;let i=e.get(r);if(!i){i=/* @__PURE__ */new Set;e.set(r,i)}i.add(t)}}for(const[t,n]of e){e.set(t,new Set(ti(n)))}return e};const n=[t.monitor.addEventListener("dragover",(t,n)=>{if(this.disabled){return}const{dragOperation:i}=n;const{source:s,target:o}=i;if(!z(s)||!z(o)){return}if(s.sortable===o.sortable){return}const a=e();const l=s.sortable.group===o.sortable.group;const c=a.get(s.sortable.group);const u=l?c:a.get(o.sortable.group);if(!c||!u)return;queueMicrotask(()=>{if(t.defaultPrevented)return;n.renderer.rendering.then(()=>{var i,h,d;const f=e();for(const[t,e]of a.entries()){const n=Array.from(e).entries();for(const[e,r]of n){if(r.index!==e||r.group!==t||!((i=f.get(t))==null?void 0:i.has(r))){return}}}const p=s.sortable.element;const v=o.sortable.element;if(!v||!p){return}if(!l&&o.id===s.sortable.group){return}const g=ti(c);const y=l?g:ti(u);const m=(h=s.sortable.group)!=null?h:tt;const b=(d=o.sortable.group)!=null?d:tt;const w={[m]:g,[b]:y};const k=J(w,t);if(w===k)return;const O=k[b].indexOf(s.sortable);const S=k[b].indexOf(o.sortable);n.collisionObserver.disable();tn(p,O,v,S);(0,r/* .batch */.vA)(()=>{for(const[t,e]of k[m].entries()){e.index=t}if(!l){for(const[t,e]of k[b].entries()){e.group=o.sortable.group;e.index=t}}});n.actions.setDropTarget(s.id).then(()=>n.collisionObserver.enable())})})}),t.monitor.addEventListener("dragend",(t,n)=>{if(!t.canceled){return}const{dragOperation:i}=n;const{source:s}=i;if(!z(s)){return}if(s.sortable.initialIndex===s.sortable.index&&s.sortable.initialGroup===s.sortable.group){return}queueMicrotask(()=>{const t=e();const i=t.get(s.sortable.initialGroup);if(!i)return;n.renderer.rendering.then(()=>{for(const[e,n]of t.entries()){const t=Array.from(n).entries();for(const[n,r]of t){if(r.index!==n||r.group!==e){return}}}const e=ti(i);const n=s.sortable.element;const o=e[s.sortable.initialIndex];const a=o==null?void 0:o.element;if(!o||!a||!n){return}tn(n,o.index,a,s.index);(0,r/* .batch */.vA)(()=>{for(const[e,n]of t.entries()){const t=Array.from(n).values();for(const e of t){e.index=e.initialIndex;e.group=e.initialGroup}}})})})})];this.destroy=()=>{for(const t of n){t()}}}};function tn(t,e,n,r){const i=r<e?"afterend":"beforebegin";n.insertAdjacentElement(i,t)}function tr(t,e){return t.index-e.index}function ti(t){return Array.from(t).sort(tr)}// src/sortable/sortable.ts
var ts=[_,te];var to={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:false};var ta=new i/* .WeakStore */._Z;var tl,tc,tu,th,td,tf,tp,tv;tc=[i/* .reactive */.Kh],tl=[i/* .reactive */.Kh];var tg=class{constructor(t,e){I(this,th,W(tu,8,this)),W(tu,11,this);I(this,td);I(this,tf);I(this,tp,W(tu,12,this)),W(tu,15,this);I(this,tv);this.register=()=>{(0,r/* .batch */.vA)(()=>{var t,e;(t=this.manager)==null?void 0:t.registry.register(this.droppable);(e=this.manager)==null?void 0:e.registry.register(this.draggable)});return()=>this.unregister()};this.unregister=()=>{(0,r/* .batch */.vA)(()=>{var t,e;(t=this.manager)==null?void 0:t.registry.unregister(this.droppable);(e=this.manager)==null?void 0:e.registry.unregister(this.draggable)})};this.destroy=()=>{(0,r/* .batch */.vA)(()=>{this.droppable.destroy();this.draggable.destroy()})};var n=t,{effects:i=()=>[],group:s,index:o,sensors:a,type:l,transition:c=to,plugins:u=ts}=n,h=S(n,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new tm(h,e,this);this.draggable=new ty(O(k({},h),{effects:()=>[()=>{var t,e,n;const i=(t=this.manager)==null?void 0:t.dragOperation.status;if((i==null?void 0:i.initializing)&&this.id===((n=(e=this.manager)==null?void 0:e.dragOperation.source)==null?void 0:n.id)){ta.clear(this.manager)}if(i==null?void 0:i.dragging){ta.set(this.manager,this.id,(0,r/* .untracked */.O8)(()=>({initialIndex:this.index,initialGroup:this.group})))}},()=>{const{index:t,group:e,manager:n}=this;const r=$(this,tf);const i=$(this,td);if(t!==r||e!==i){j(this,tf,t);j(this,td,e);this.animate()}},()=>{const{target:t}=this;const{feedback:e,isDragSource:n}=this.draggable;if(e=="move"&&n){this.droppable.disabled=!t}},()=>{const{manager:t}=this;for(const e of u){t==null?void 0:t.registry.register(e)}},...i()],type:l,sensors:a}),e,this);j(this,tv,h.element);this.manager=e;this.index=o;j(this,tf,o);this.group=s;j(this,td,s);this.type=l;this.transition=c}get initialIndex(){var t,e;return(e=(t=ta.get(this.manager,this.id))==null?void 0:t.initialIndex)!=null?e:this.index}get initialGroup(){var t,e;return(e=(t=ta.get(this.manager,this.id))==null?void 0:t.initialGroup)!=null?e:this.group}animate(){(0,r/* .untracked */.O8)(()=>{const{manager:t,transition:e}=this;const{shape:n}=this.droppable;if(!t)return;const{idle:r}=t.dragOperation.status;if(!n||!e||r&&!e.idle){return}t.renderer.rendering.then(()=>{const{element:r}=this;if(!r){return}const i=this.refreshShape();if(!i){return}const s={x:n.boundingRectangle.left-i.boundingRectangle.left,y:n.boundingRectangle.top-i.boundingRectangle.top};const{translate:o}=(0,a/* .getComputedStyles */.qt)(r);const l=(0,a/* .computeTranslate */.We)(r,o,false);const c=(0,a/* .computeTranslate */.We)(r,o);if(s.x||s.y){const n=(0,a/* .prefersReducedMotion */.Oe)((0,a/* .getWindow */.zk)(r))?O(k({},e),{duration:0}):e;(0,a/* .animateTransform */.A$)({element:r,keyframes:{translate:[`${l.x+s.x}px ${l.y+s.y}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:n}).then(()=>{if(!t.dragOperation.status.dragging){this.droppable.shape=void 0}})}})})}get manager(){return this.draggable.manager}set manager(t){(0,r/* .batch */.vA)(()=>{this.draggable.manager=t;this.droppable.manager=t})}set element(t){(0,r/* .batch */.vA)(()=>{const e=$(this,tv);const n=this.droppable.element;const r=this.draggable.element;if(!n||n===e){this.droppable.element=t}if(!r||r===e){this.draggable.element=t}j(this,tv,t)})}get element(){var t,e;const n=$(this,tv);if(!n)return;return(e=(t=a/* .ProxiedElements.get */.hZ.get(n))!=null?t:n)!=null?e:this.droppable.element}set target(t){this.droppable.element=t}get target(){return this.droppable.element}set source(t){this.draggable.element=t}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set feedback(t){this.draggable.feedback=t}set disabled(t){(0,r/* .batch */.vA)(()=>{this.droppable.disabled=t;this.draggable.disabled=t})}set data(t){(0,r/* .batch */.vA)(()=>{this.droppable.data=t;this.draggable.data=t})}set handle(t){this.draggable.handle=t}set id(t){(0,r/* .batch */.vA)(()=>{this.droppable.id=t;this.draggable.id=t})}get id(){return this.droppable.id}set sensors(t){this.draggable.sensors=t}set modifiers(t){this.draggable.modifiers=t}set collisionPriority(t){this.droppable.collisionPriority=t}set collisionDetector(t){this.droppable.collisionDetector=t!=null?t:s/* .defaultCollisionDetection */.V6}set alignment(t){this.draggable.alignment=t}get alignment(){return this.draggable.alignment}set type(t){(0,r/* .batch */.vA)(()=>{this.droppable.type=t;this.draggable.type=t})}get type(){return this.draggable.type}set accept(t){this.droppable.accept=t}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}/**
   * A boolean indicating whether the sortable item is the source of a drag operation.
   */get isDragSource(){return this.draggable.isDragSource}/**
   * A boolean indicating whether the sortable item is being dragged.
   */get isDragging(){return this.draggable.isDragging}/**
   * A boolean indicating whether the sortable item is being dropped.
   */get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(t){return this.droppable.accepts(t)}};tu=E();th=new WeakMap;td=new WeakMap;tf=new WeakMap;tp=new WeakMap;tv=new WeakMap;C(tu,4,"index",tc,tg,th);C(tu,4,"group",tl,tg,tp);D(tu,tg);var ty=class extends o.Draggable{constructor(t,e,n){super(t,e);this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}};var tm=class extends o.Droppable{constructor(t,e,n){super(t,e);this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}};//# sourceMappingURL=sortable.js.map
//# sourceMappingURL=sortable.js.map
},30455:function(t,e,n){n.d(e,{$v:()=>tU,A:()=>w,A$:()=>tG,AI:()=>er,Dh:()=>tq,EE:()=>ee,Fk:()=>tH,Fm:()=>z,H5:()=>_,HK:()=>A,Ij:()=>eo,Ks:()=>d,Ng:()=>W,Ob:()=>$,Oe:()=>R,Ot:()=>tw,P_:()=>t7,UX:()=>tb,We:()=>tJ,XZ:()=>h,YE:()=>b,Zn:()=>C,_m:()=>K,a_:()=>tE,ck:()=>tA,dO:()=>tx,e_:()=>E,g:()=>tK,hZ:()=>L,hl:()=>D,k$:()=>S,kx:()=>et,nr:()=>P,o8:()=>t3,qR:()=>N,qt:()=>tC,sb:()=>y,sl:()=>tz,vq:()=>t9,wz:()=>g,y4:()=>tL,yS:()=>t8,zk:()=>v});/* import */var r=n(43261);var i=t=>{throw TypeError(t)};var s=(t,e,n)=>e.has(t)||i("Cannot "+n);var o=(t,e,n)=>(s(t,e,"read from private field"),e.get(t));var a=(t,e,n)=>e.has(t)?i("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);var l=(t,e,n,r)=>(s(t,e,"write to private field"),e.set(t,n),n);var c=(t,e,n)=>(s(t,e,"access private method"),n);// src/utilities/type-guards/isKeyframeEffect.ts
function u(t){if(!t)return false;if(t instanceof KeyframeEffect)return true;return"getKeyframes"in t&&typeof t.getKeyframes==="function"}// src/utilities/animations/getFinalKeyframe.ts
function h(t,e){const n=t.getAnimations();if(n.length>0){for(const t of n){if(t.playState!=="running")continue;const{effect:n}=t;const r=u(n)?n.getKeyframes():[];const i=r.filter(e);if(i.length>0){return[i[i.length-1],t]}}}return null}// src/utilities/bounding-rectangle/getBoundingRectangle.ts
function d(t){const{width:e,height:n,top:r,left:i,bottom:s,right:o}=t.getBoundingClientRect();return{width:e,height:n,top:r,left:i,bottom:s,right:o}}// src/utilities/type-guards/isWindow.ts
function f(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||// In Electron context the Window object serializes to [object global]
e==="[object global]"}// src/utilities/type-guards/isNode.ts
function p(t){return"nodeType"in t}// src/utilities/execution-context/getWindow.ts
function v(t){var e,n,r;if(!t){return window}if(f(t)){return t}if(!p(t)){return window}if("defaultView"in t){return(e=t.defaultView)!=null?e:window}return(r=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}// src/utilities/type-guards/isDocument.ts
function g(t){const{Document:e}=v(t);return t instanceof e||"nodeType"in t&&t.nodeType===Node.DOCUMENT_NODE}// src/utilities/type-guards/isHTMLElement.ts
function y(t){if(!t||f(t))return false;return t instanceof v(t).HTMLElement||"namespaceURI"in t&&typeof t.namespaceURI==="string"&&t.namespaceURI.endsWith("html")}// src/utilities/type-guards/isSVGElement.ts
function m(t){return t instanceof v(t).SVGElement||"namespaceURI"in t&&typeof t.namespaceURI==="string"&&t.namespaceURI.endsWith("svg")}// src/utilities/execution-context/getDocument.ts
function b(t){if(!t){return document}if(f(t)){return t.document}if(!p(t)){return document}if(g(t)){return t}if(y(t)||m(t)){return t.ownerDocument}return document}// src/utilities/bounding-rectangle/getViewportBoundingRectangle.ts
function w(t){var e,n,r,i;const{documentElement:s}=b(t);const o=v(t).visualViewport;const a=(e=o==null?void 0:o.width)!=null?e:s.clientWidth;const l=(n=o==null?void 0:o.height)!=null?n:s.clientHeight;const c=(r=o==null?void 0:o.offsetTop)!=null?r:0;const u=(i=o==null?void 0:o.offsetLeft)!=null?i:0;return{top:c,left:u,right:u+a,bottom:c+l,width:a,height:l}}// src/utilities/bounding-rectangle/isOverflowVisible.ts
function k(t,e){if(O(t)&&t.open===false){return false}const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(t);return n==="visible"&&r==="visible"&&i==="visible"}function O(t){return t.tagName==="DETAILS"}// src/utilities/bounding-rectangle/getVisibleBoundingRectangle.ts
function S(t,e=t.getBoundingClientRect(),n=0){var r,i,s,o,a;let l=e;const{ownerDocument:c}=t;const u=(r=c.defaultView)!=null?r:window;let h=t.parentElement;while(h&&h!==c.documentElement){if(!k(h)){const t=h.getBoundingClientRect();const e=n*(t.bottom-t.top);const r=n*(t.right-t.left);const i=n*(t.bottom-t.top);const s=n*(t.right-t.left);l={top:Math.max(l.top,t.top-e),right:Math.min(l.right,t.right+r),bottom:Math.min(l.bottom,t.bottom+i),left:Math.max(l.left,t.left-s),width:0,// Will be calculated next
height:0};l.width=l.right-l.left;l.height=l.bottom-l.top}h=h.parentElement}const d=u.visualViewport;const f=(i=d==null?void 0:d.offsetTop)!=null?i:0;const p=(s=d==null?void 0:d.offsetLeft)!=null?s:0;const v=(o=d==null?void 0:d.width)!=null?o:u.innerWidth;const g=(a=d==null?void 0:d.height)!=null?a:u.innerHeight;const y=n*g;const m=n*v;l={top:Math.max(l.top,f-y),right:Math.min(l.right,p+v+m),bottom:Math.min(l.bottom,f+g+y),left:Math.max(l.left,p-m),width:0,// Will be calculated next
height:0};l.width=l.right-l.left;l.height=l.bottom-l.top;if(l.width<0){l.width=0}if(l.height<0){l.height=0}return l}// src/utilities/coordinates/getEventCoordinates.ts
function E(t){return{x:t.clientX,y:t.clientY}}// src/utilities/execution-context/canUseDOM.ts
var M=typeof window!=="undefined"&&typeof window.document!=="undefined"&&typeof window.document.createElement!=="undefined";// src/utilities/execution-context/getDocuments.ts
function A(t=document,e=/* @__PURE__ */new Set){if(e.has(t))return[];e.add(t);const n=[t];for(const r of Array.from(t.querySelectorAll("iframe, frame"))){try{const t=r.contentDocument;if(t&&!e.has(t)){n.push(...A(t,e))}}catch(t){}}try{const r=t.defaultView;if(r&&r!==window.top){const i=r.parent;if(i&&i.document&&i.document!==t){n.push(...A(i.document,e))}}}catch(t){}return n}// src/utilities/execution-context/isSafari.ts
function P(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}// src/utilities/execution-context/getFixedPositionOffset.ts
function D(){var t,e;const n=P()?window.visualViewport:null;return{x:(t=n==null?void 0:n.offsetLeft)!=null?t:0,y:(e=n==null?void 0:n.offsetTop)!=null?e:0}}// src/utilities/type-guards/isShadowRoot.ts
function W(t){if(!t||!p(t))return false;return t instanceof v(t).ShadowRoot}// src/utilities/execution-context/getRoot.ts
function C(t){if(t&&p(t)){let e=t.getRootNode();if(W(e)){return e}else if(e instanceof Document){return e}}return b(t)}// src/utilities/execution-context/prefersReducedMotion.ts
function R(t){return t.matchMedia("(prefers-reduced-motion: reduce)").matches}// src/utilities/element/cloneElement.ts
function $(t){const e="input, textarea, select, canvas, [contenteditable]";const n=t.cloneNode(true);const r=Array.from(t.querySelectorAll(e));const i=Array.from(n.querySelectorAll(e));i.forEach((t,e)=>{const n=r[e];if(I(t)&&I(n)){if(t.type!=="file"){t.value=n.value}if(t.type==="radio"&&t.name){t.name=`Cloned__${t.name}`}}if(j(t)&&j(n)&&n.width>0&&n.height>0){const e=t.getContext("2d");e==null?void 0:e.drawImage(n,0,0)}});return n}function I(t){return"value"in t}function j(t){return t.tagName==="CANVAS"}// src/utilities/element/getElementFromPoint.ts
function z(t,{x:e,y:n}){const r=t.elementFromPoint(e,n);if(T(r)){const{contentDocument:t}=r;if(t){const{left:i,top:s}=r.getBoundingClientRect();return z(t,{x:e-i,y:n-s})}}return r}function T(t){return(t==null?void 0:t.tagName)==="IFRAME"}// src/utilities/element/proxiedElements.ts
var L=/* @__PURE__ */new WeakMap;// src/utilities/element/isInteractiveElement.ts
function _(t){return Boolean(t.closest(`
      input:not([disabled]),
      select:not([disabled]),
      textarea:not([disabled]),
      button:not([disabled]),
      a[href],
      [contenteditable]:not([contenteditable="false"])
    `))}// src/utilities/event-listeners/Listeners.ts
var N=class{constructor(){this.entries=/* @__PURE__ */new Set;this.clear=()=>{for(const t of this.entries){const[e,{type:n,listener:r,options:i}]=t;e.removeEventListener(n,r,i)}this.entries.clear()}}bind(t,e){const n=Array.isArray(t)?t:[t];const r=Array.isArray(e)?e:[e];const i=[];for(const t of n){for(const e of r){const{type:n,listener:r,options:s}=e;const o=[t,e];t.addEventListener(n,r,s);this.entries.add(o);i.push(o)}}return function t(){for(const[t,{type:e,listener:n,options:r}]of i){t.removeEventListener(e,n,r)}}}};// src/utilities/frame/getFrameElement.ts
function K(t){const e=t==null?void 0:t.ownerDocument.defaultView;if(e&&e.self!==e.parent){return e.frameElement}}// src/utilities/frame/getFrameElements.ts
function Y(t){const e=/* @__PURE__ */new Set;let n=K(t);while(n){e.add(n);n=K(n)}return e}// src/utilities/scheduling/timeout.ts
function F(t,e){const n=setTimeout(t,e);return()=>clearTimeout(n)}// src/utilities/scheduling/throttle.ts
function q(t,e){const n=()=>performance.now();let r;let i;return function(...s){const o=this;if(!i){t.apply(o,s);i=n()}else{r==null?void 0:r();r=F(()=>{t.apply(o,s);i=n()},e-(n()-i))}}}// src/utilities/bounding-rectangle/isRectEqual.ts
function V(t,e){if(t===e)return true;if(!t||!e)return false;return t.top==e.top&&t.left==e.left&&t.right==e.right&&t.bottom==e.bottom}// src/utilities/bounding-rectangle/isVisible.ts
function X(t,e=t.getBoundingClientRect()){const{width:n,height:r}=S(t,e);return n>0&&r>0}// src/utilities/observers/ResizeNotifier.ts
var H=M?ResizeObserver:class t{observe(){}unobserve(){}disconnect(){}};var Z;var U=class extends H{constructor(t){super(e=>{if(!o(this,Z)){l(this,Z,true);return}t(e,this)});a(this,Z,false)}};Z=new WeakMap;// src/utilities/observers/PositionObserver.ts
var B=Array.from({length:100},(t,e)=>e/100);var Q=75;var G,J,tt,te,tn,tr,ti,ts,to,ta,tl;var tc=class{constructor(t,e,n={debug:false,skipInitial:false}){this.element=t;this.callback=e;a(this,to);this.disconnect=()=>{var t,e,n;l(this,ti,true);(t=o(this,tt))==null?void 0:t.disconnect();(e=o(this,te))==null?void 0:e.disconnect();o(this,tn).disconnect();(n=o(this,tr))==null?void 0:n.remove()};a(this,G,true);a(this,J);a(this,tt);a(this,te);a(this,tn);a(this,tr);a(this,ti,false);a(this,ts,q(()=>{var t,e,n;const{element:i}=this;(t=o(this,te))==null?void 0:t.disconnect();if(o(this,ti)||!o(this,G)||!i.isConnected){return}const s=(e=i.ownerDocument)!=null?e:document;const{innerHeight:a,innerWidth:u}=(n=s.defaultView)!=null?n:window;const h=i.getBoundingClientRect();const d=S(i,h);const{top:f,left:p,bottom:v,right:g}=d;const y=-Math.floor(f);const m=-Math.floor(p);const b=-Math.floor(u-g);const w=-Math.floor(a-v);const k=`${y}px ${b}px ${w}px ${m}px`;this.boundingClientRect=h;l(this,te,new IntersectionObserver(t=>{const[e]=t;const{intersectionRect:n}=e;const s=e.intersectionRatio!==1?e.intersectionRatio:r/* .Rectangle.intersectionRatio */.M_.intersectionRatio(n,S(i));if(s!==1){o(this,ts).call(this)}},{threshold:B,rootMargin:k,root:s}));o(this,te).observe(i);c(this,to,ta).call(this)},Q));this.boundingClientRect=t.getBoundingClientRect();l(this,G,X(t,this.boundingClientRect));let i=true;this.callback=t=>{if(i){i=false;if(n.skipInitial)return}e(t)};const s=t.ownerDocument;if(n==null?void 0:n.debug){l(this,tr,document.createElement("div"));o(this,tr).style.background="rgba(0,0,0,0.15)";o(this,tr).style.position="fixed";o(this,tr).style.pointerEvents="none";s.body.appendChild(o(this,tr))}l(this,tn,new IntersectionObserver(e=>{var n,r;const i=e[e.length-1];const{boundingClientRect:s,isIntersecting:a}=i;const{width:c,height:u}=s;const h=o(this,G);l(this,G,a);if(!c&&!u)return;if(h&&!a){(n=o(this,te))==null?void 0:n.disconnect();this.callback(null);(r=o(this,tt))==null?void 0:r.disconnect();l(this,tt,void 0);if(o(this,tr))o(this,tr).style.visibility="hidden"}else{o(this,ts).call(this)}if(a&&!o(this,tt)){l(this,tt,new U(o(this,ts)));o(this,tt).observe(t)}},{threshold:B,root:s}));if(o(this,G)&&!n.skipInitial){this.callback(this.boundingClientRect)}o(this,tn).observe(t)}};G=new WeakMap;J=new WeakMap;tt=new WeakMap;te=new WeakMap;tn=new WeakMap;tr=new WeakMap;ti=new WeakMap;ts=new WeakMap;to=new WeakSet;ta=function(){if(o(this,ti))return;c(this,to,tl).call(this);if(V(this.boundingClientRect,o(this,J)))return;this.callback(this.boundingClientRect);l(this,J,this.boundingClientRect)};tl=function(){if(o(this,tr)){const{top:t,left:e,width:n,height:r}=S(this.element);o(this,tr).style.overflow="hidden";o(this,tr).style.visibility="visible";o(this,tr).style.top=`${Math.floor(t)}px`;o(this,tr).style.left=`${Math.floor(e)}px`;o(this,tr).style.width=`${Math.floor(n)}px`;o(this,tr).style.height=`${Math.floor(r)}px`}};// src/utilities/observers/FrameObserver.ts
var tu=/* @__PURE__ */new WeakMap;var th=/* @__PURE__ */new WeakMap;function td(t,e){let n=tu.get(t);if(!n){const e=new tc(t,e=>{const n=tu.get(t);if(!n)return;n.callbacks.forEach(t=>t(e))},{skipInitial:true});n={disconnect:e.disconnect,callbacks:/* @__PURE__ */new Set}}n.callbacks.add(e);tu.set(t,n);return()=>{n.callbacks.delete(e);if(n.callbacks.size===0){tu.delete(t);n.disconnect()}}}function tf(t,e){const n=/* @__PURE__ */new Set;for(const r of t){const t=td(r,e);n.add(t)}return()=>n.forEach(t=>t())}function tp(t,e){var n;const r=t.ownerDocument;if(!th.has(r)){const t=new AbortController;const e=/* @__PURE__ */new Set;document.addEventListener("scroll",t=>e.forEach(e=>e(t)),{capture:true,passive:true,signal:t.signal});th.set(r,{disconnect:()=>t.abort(),listeners:e})}const{listeners:i,disconnect:s}=(n=th.get(r))!=null?n:{};if(!i||!s)return()=>{};i.add(e);return()=>{i.delete(e);if(i.size===0){s();th.delete(r)}}}var tv,tg,ty,tm;var tb=class{constructor(t,e,n){this.callback=e;a(this,tv);a(this,tg,false);a(this,ty);a(this,tm,q(t=>{if(o(this,tg))return;if(!t.target)return;if("contains"in t.target&&typeof t.target.contains==="function"){for(const e of o(this,ty)){if(t.target.contains(e)){this.callback(o(this,tv).boundingClientRect);break}}}},Q));const r=Y(t);const i=tf(r,e);const s=tp(t,o(this,tm));l(this,ty,r);l(this,tv,new tc(t,e,n));this.disconnect=()=>{if(o(this,tg))return;l(this,tg,true);i();s();o(this,tv).disconnect()}}};tv=new WeakMap;tg=new WeakMap;ty=new WeakMap;tm=new WeakMap;// src/utilities/popover/supportsPopover.ts
function tw(t){return"showPopover"in t&&"hidePopover"in t&&typeof t.showPopover==="function"&&typeof t.hidePopover==="function"}// src/utilities/popover/showPopover.ts
function tx(t){try{if(tw(t)&&t.isConnected&&t.hasAttribute("popover")&&// This selector can throw an error in browsers that don't support it
!t.matches(":popover-open")){t.showPopover()}}catch(t){}}// src/utilities/popover/hidePopover.ts
function tk(t){try{if(tw(t)&&t.isConnected&&t.hasAttribute("popover")&&// This selector can throw an error in browsers that don't support it
t.matches(":popover-open")){t.hidePopover()}}catch(t){}}// src/utilities/scroll/documentScrollingElement.ts
function tO(t){if(!M||!t){return false}return t===b(t).scrollingElement}// src/utilities/scroll/getScrollPosition.ts
function tS(t){var e,n;const r=v(t);const i=tO(t)?w(t):d(t);const s=r.visualViewport;const o=tO(t)?{height:(e=s==null?void 0:s.height)!=null?e:r.innerHeight,width:(n=s==null?void 0:s.width)!=null?n:r.innerWidth}:{height:t.clientHeight,width:t.clientWidth};const a={current:{x:t.scrollLeft,y:t.scrollTop},max:{x:t.scrollWidth-o.width,y:t.scrollHeight-o.height}};const l=a.current.y<=0;const c=a.current.x<=0;const u=a.current.y>=a.max.y;const h=a.current.x>=a.max.x;return{rect:i,position:a,isTop:l,isLeft:c,isBottom:u,isRight:h}}// src/utilities/scroll/canScroll.ts
function tE(t,e){const{isTop:n,isBottom:r,isLeft:i,isRight:s,position:o}=tS(t);const{x:a,y:l}=e!=null?e:{x:0,y:0};const c=!n&&o.current.y+l>0;const u=!r&&o.current.y+l<o.max.y;const h=!i&&o.current.x+a>0;const d=!s&&o.current.x+a<o.max.x;return{top:c,bottom:u,left:h,right:d,x:h||d,y:c||u}}// src/utilities/scheduling/scheduler.ts
var tM=class{constructor(t){this.scheduler=t;this.pending=false;this.tasks=/* @__PURE__ */new Set;this.resolvers=/* @__PURE__ */new Set;this.flush=()=>{const{tasks:t,resolvers:e}=this;this.pending=false;this.tasks=/* @__PURE__ */new Set;this.resolvers=/* @__PURE__ */new Set;for(const e of t){e()}for(const t of e){t()}}}schedule(t){this.tasks.add(t);if(!this.pending){this.pending=true;this.scheduler(this.flush)}return new Promise(t=>this.resolvers.add(t))}};var tA=new tM(t=>{if(typeof requestAnimationFrame==="function"){requestAnimationFrame(t)}else{t()}});// src/utilities/styles/getComputedStyles.ts
var tP=new tM(t=>setTimeout(t,50));var tD=/* @__PURE__ */new Map;var tW=tD.clear.bind(tD);function tC(t,e=false){if(!e)return tR(t);let n=tD.get(t);if(n)return n;n=tR(t);tD.set(t,n);tP.schedule(tW);return n}function tR(t){return v(t).getComputedStyle(t)}// src/utilities/scroll/isFixed.ts
function t$(t,e=tC(t,true)){return e.position==="fixed"||e.position==="sticky"}// src/utilities/scroll/isScrollable.ts
function tI(t,e=tC(t,true)){const n=/(auto|scroll|overlay)/;const r=["overflow","overflowX","overflowY"];return r.some(t=>{const r=e[t];return typeof r==="string"?n.test(r):false})}// src/utilities/scroll/getScrollableAncestors.ts
var tj={excludeElement:true,escapeShadowDOM:true};function tz(t,e=tj){const{limit:n,excludeElement:r,escapeShadowDOM:i}=e;const s=/* @__PURE__ */new Set;function o(e){if(n!=null&&s.size>=n){return s}if(!e){return s}if(g(e)&&e.scrollingElement!=null&&!s.has(e.scrollingElement)){s.add(e.scrollingElement);return s}if(i&&W(e)){return o(e.host)}if(!y(e)){if(m(e)){return o(e.parentElement)}return s}if(s.has(e)){return s}const a=tC(e,true);if(r&&e===t);else if(tI(e,a)){s.add(e)}if(t$(e,a)){const{scrollingElement:t}=e.ownerDocument;if(t)s.add(t);return s}return o(e.parentNode)}if(!t){return s}return o(t)}function tT(t){const[e]=tz(t,{limit:1});return e!=null?e:null}// src/utilities/frame/getFrameTransform.ts
function tL(t,e=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!t)return n;let r=K(t);while(r){if(r===e){return n}const t=d(r);const{x:i,y:s}=t_(r,t);n.x=n.x+t.left;n.y=n.y+t.top;n.scaleX=n.scaleX*i;n.scaleY=n.scaleY*s;r=K(r)}return n}function t_(t,e=d(t)){const n=Math.round(e.width);const r=Math.round(e.height);if(y(t)){return{x:n/t.offsetWidth,y:r/t.offsetHeight}}const i=tC(t,true);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}// src/utilities/transform/parseScale.ts
function tN(t){if(t==="none"){return null}const e=t.split(" ");const n=parseFloat(e[0]);const r=parseFloat(e[1]);if(isNaN(n)&&isNaN(r)){return null}return{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}// src/utilities/transform/parseTranslate.ts
function tK(t){if(t==="none"){return null}const[e,n,r="0"]=t.split(" ");const i={x:parseFloat(e),y:parseFloat(n),z:parseInt(r,10)};if(isNaN(i.x)&&isNaN(i.y)){return null}return{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}// src/utilities/transform/parseTransform.ts
function tY(t){var e,n,r,i,s,o,a,l,c;const{scale:u,transform:h,translate:d}=t;const f=tN(u);const p=tK(d);const v=tF(h);if(!v&&!f&&!p){return null}const g={x:(e=f==null?void 0:f.x)!=null?e:1,y:(n=f==null?void 0:f.y)!=null?n:1};const y={x:(r=p==null?void 0:p.x)!=null?r:0,y:(i=p==null?void 0:p.y)!=null?i:0};const m={x:(s=v==null?void 0:v.x)!=null?s:0,y:(o=v==null?void 0:v.y)!=null?o:0,scaleX:(a=v==null?void 0:v.scaleX)!=null?a:1,scaleY:(l=v==null?void 0:v.scaleY)!=null?l:1};return{x:y.x+m.x,y:y.y+m.y,z:(c=p==null?void 0:p.z)!=null?c:0,scaleX:g.x*m.scaleX,scaleY:g.y*m.scaleY}}function tF(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}// src/utilities/scroll/detectScrollIntent.ts
var tq=/* @__PURE__ */(t=>{t[t["Idle"]=0]="Idle";t[t["Forward"]=1]="Forward";t[t["Reverse"]=-1]="Reverse";return t})(tq||{});var tV={x:.2,y:.2};var tX={x:10,y:10};function tH(t,e,n,i=25,s=tV,o=tX){const{x:a,y:l}=e;const{rect:c,isTop:u,isBottom:h,isLeft:d,isRight:f}=tS(t);const p=tL(t);const v=tC(t,true);const g=tY(v);const y=g!==null?(g==null?void 0:g.scaleX)<0:false;const m=g!==null?(g==null?void 0:g.scaleY)<0:false;const b=new r/* .Rectangle */.M_(c.left*p.scaleX+p.x,c.top*p.scaleY+p.y,c.width*p.scaleX,c.height*p.scaleY);const w={x:0/* Idle */,y:0/* Idle */};const k={x:0,y:0};const O={height:b.height*s.y,width:b.width*s.x};if((!u||m&&!h)&&l<=b.top+O.height&&(n==null?void 0:n.y)!==1/* Forward */&&a>=b.left-o.x&&a<=b.right+o.x){w.y=m?1/* Forward */:-1/* Reverse */;k.y=i*Math.abs((b.top+O.height-l)/O.height)}else if((!h||m&&!u)&&l>=b.bottom-O.height&&(n==null?void 0:n.y)!==-1/* Reverse */&&a>=b.left-o.x&&a<=b.right+o.x){w.y=m?-1/* Reverse */:1/* Forward */;k.y=i*Math.abs((b.bottom-O.height-l)/O.height)}if((!f||y&&!d)&&a>=b.right-O.width&&(n==null?void 0:n.x)!==-1/* Reverse */&&l>=b.top-o.y&&l<=b.bottom+o.y){w.x=y?-1/* Reverse */:1/* Forward */;k.x=i*Math.abs((b.right-O.width-a)/O.width)}else if((!d||y&&!f)&&a<=b.left+O.width&&(n==null?void 0:n.x)!==1/* Forward */&&l>=b.top-o.y&&l<=b.bottom+o.y){w.x=y?1/* Forward */:-1/* Reverse */;k.x=i*Math.abs((b.left+O.width-a)/O.width)}return{direction:w,speed:k}}// src/utilities/scroll/scrollIntoViewIfNeeded.ts
function tZ(t){return"scrollIntoViewIfNeeded"in t&&typeof t.scrollIntoViewIfNeeded==="function"}function tU(t,e=false){if(tZ(t)){t.scrollIntoViewIfNeeded(e);return}if(!y(t)){return t.scrollIntoView()}var n=tT(t);if(!y(n)){return}const r=tC(n,true),i=parseInt(r.getPropertyValue("border-top-width")),s=parseInt(r.getPropertyValue("border-left-width")),o=t.offsetTop-n.offsetTop<n.scrollTop,a=t.offsetTop-n.offsetTop+t.clientHeight-i>n.scrollTop+n.clientHeight,l=t.offsetLeft-n.offsetLeft<n.scrollLeft,c=t.offsetLeft-n.offsetLeft+t.clientWidth-s>n.scrollLeft+n.clientWidth,u=o&&!a;if((o||a)&&e){n.scrollTop=t.offsetTop-n.offsetTop-n.clientHeight/2-i+t.clientHeight/2}if((l||c)&&e){n.scrollLeft=t.offsetLeft-n.offsetLeft-n.clientWidth/2-s+t.clientWidth/2}if((o||a||l||c)&&!e){t.scrollIntoView(u)}}// src/utilities/transform/applyTransform.ts
function tB(t,e,n){const{scaleX:r,scaleY:i,x:s,y:o}=e;const a=t.left+s+(1-r)*parseFloat(n);const l=t.top+o+(1-i)*parseFloat(n.slice(n.indexOf(" ")+1));const c=r?t.width*r:t.width;const u=i?t.height*i:t.height;return{width:c,height:u,top:l,right:a+c,bottom:l+u,left:a}}// src/utilities/transform/inverseTransform.ts
function tQ(t,e,n){const{scaleX:r,scaleY:i,x:s,y:o}=e;const a=t.left-s-(1-r)*parseFloat(n);const l=t.top-o-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1));const c=r?t.width/r:t.width;const u=i?t.height/i:t.height;return{width:c,height:u,top:l,right:a+c,bottom:l+u,left:a}}// src/utilities/transform/animateTransform.ts
function tG({element:t,keyframes:e,options:n}){return t.animate(e,n).finished}// src/utilities/transform/computeTranslate.ts
function tJ(t,e=tC(t).translate,n=true){if(n){const e=h(t,t=>"translate"in t);if(e){const{translate:t=""}=e[0];if(typeof t==="string"){const e=tK(t);if(e){return e}}}}if(e){const t=tK(e);if(t){return t}}return{x:0,y:0,z:0}}// src/utilities/animations/forceFinishAnimations.ts
var t0=new tM(t=>setTimeout(t,0));var t1=/* @__PURE__ */new Map;var t2=t1.clear.bind(t1);function t4(t){const e=t.ownerDocument;let n=t1.get(e);if(n)return n;n=e.getAnimations();t1.set(e,n);t0.schedule(t2);const r=n.filter(e=>u(e.effect)&&e.effect.target===t);t1.set(t,r);return n}function t5(t,e){const n=t4(t).filter(t=>{var n,r;if(u(t.effect)){const{target:i}=t.effect;const s=(r=i&&((n=e.isValidTarget)==null?void 0:n.call(e,i)))!=null?r:true;if(s){return t.effect.getKeyframes().some(t=>{for(const n of e.properties){if(t[n])return true}})}}}).map(t=>{const{effect:e,currentTime:n}=t;const r=e==null?void 0:e.getComputedTiming().duration;if(t.pending||t.playState==="finished")return;if(typeof r=="number"&&typeof n=="number"&&n<r){t.currentTime=r;return()=>{t.currentTime=n}}});if(n.length>0){return()=>n.forEach(t=>t==null?void 0:t())}}// src/utilities/shapes/DOMRectangle.ts
var t8=class extends r/* .Rectangle */.M_{constructor(t,e={}){var n,r,i,s;const{frameTransform:o=tL(t),ignoreTransforms:a,getBoundingClientRect:l=d}=e;const c=t5(t,{properties:["transform","translate","scale","width","height"],isValidTarget:e=>(e!==t||P())&&e.contains(t)});const u=l(t);let{top:h,left:f,width:p,height:v}=u;let g;const y=tC(t);const m=tY(y);const b={x:(n=m==null?void 0:m.scaleX)!=null?n:1,y:(r=m==null?void 0:m.scaleY)!=null?r:1};const w=t6(t,y);c==null?void 0:c();if(m){g=tQ(u,m,y.transformOrigin);if(a||w){h=g.top;f=g.left;p=g.width;v=g.height}}const k={width:(i=g==null?void 0:g.width)!=null?i:p,height:(s=g==null?void 0:g.height)!=null?s:v};if(w&&!a&&g){const t=tB(g,w,y.transformOrigin);h=t.top;f=t.left;p=t.width;v=t.height;b.x=w.scaleX;b.y=w.scaleY}if(o){if(!a){f*=o.scaleX;p*=o.scaleX;h*=o.scaleY;v*=o.scaleY}f+=o.x;h+=o.y}super(f,h,p,v);this.scale=b;this.intrinsicWidth=k.width;this.intrinsicHeight=k.height}};function t6(t,e){var n;const r=t.getAnimations();let i=null;if(!r.length)return null;for(const t of r){if(t.playState!=="running")continue;const r=u(t.effect)?t.effect.getKeyframes():[];const s=r[r.length-1];if(!s)continue;const{transform:o,translate:a,scale:l}=s;if(o||a||l){const t=tY({transform:typeof o==="string"&&o?o:e.transform,translate:typeof a==="string"&&a?a:e.translate,scale:typeof l==="string"&&l?l:e.scale});if(t){i=i?{x:i.x+t.x,y:i.y+t.y,z:(n=i.z)!=null?n:t.z,scaleX:i.scaleX*t.scaleX,scaleY:i.scaleY*t.scaleY}:t}}}return i}// src/utilities/type-guards/supportsStyle.ts
function t3(t){return"style"in t&&typeof t.style==="object"&&t.style!==null&&"setProperty"in t.style&&"removeProperty"in t.style&&typeof t.style.setProperty==="function"&&typeof t.style.removeProperty==="function"}// src/utilities/styles/Styles.ts
var t7=class{constructor(t){this.element=t;this.initial=/* @__PURE__ */new Map}set(t,e=""){const{element:n}=this;if(!t3(n)){return}for(const[r,i]of Object.entries(t)){const t=`${e}${r}`;if(!this.initial.has(t)){this.initial.set(t,n.style.getPropertyValue(t))}n.style.setProperty(t,typeof i==="string"?i:`${i}px`)}}remove(t,e=""){const{element:n}=this;if(!t3(n)){return}for(const r of t){const t=`${e}${r}`;n.style.removeProperty(t)}}reset(){const{element:t}=this;if(!t3(t)){return}for(const[e,n]of this.initial){t.style.setProperty(e,n)}if(t.getAttribute("style")===""){t.removeAttribute("style")}}};// src/utilities/type-guards/isElement.ts
function t9(t){if(!t)return false;return t instanceof v(t).Element||p(t)&&t.nodeType===Node.ELEMENT_NODE}// src/utilities/type-guards/isKeyboardEvent.ts
function et(t){if(!t)return false;const{KeyboardEvent:e}=v(t.target);return t instanceof e}// src/utilities/type-guards/isPointerEvent.ts
function ee(t){if(!t)return false;const{PointerEvent:e}=v(t.target);return t instanceof e}// src/utilities/type-guards/supportsViewTransition.ts
function en(t){return"startViewTransition"in t}// src/utilities/type-guards/isTextInput.ts
function er(t){if(!t9(t))return false;const{tagName:e}=t;return e==="INPUT"||e==="TEXTAREA"||ei(t)}function ei(t){return t.hasAttribute("contenteditable")&&t.getAttribute("contenteditable")!=="false"}// src/utilities/misc/generateUniqueId.ts
var es={};function eo(t){const e=es[t]==null?0:es[t]+1;es[t]=e;return`${t}-${e}`}//# sourceMappingURL=utilities.js.map
//# sourceMappingURL=utilities.js.map
},43261:function(t,e,n){n.d(e,{M_:()=>R,Y5:()=>Y,bR:()=>C,dq:()=>N,yX:()=>_});/* import */var r=n(42467);/* import */var i=n(67618);var s=Object.create;var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertySymbols;var c=Object.prototype.hasOwnProperty;var u=Object.prototype.propertyIsEnumerable;var h=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t);var d=t=>{throw TypeError(t)};var f=Math.pow;var p=(t,e,n)=>e in t?o(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var v=(t,e)=>{for(var n in e||(e={}))if(c.call(e,n))p(t,n,e[n]);if(l)for(var n of l(e)){if(u.call(e,n))p(t,n,e[n])}return t};var g=(t,e)=>o(t,"name",{value:e,configurable:true});var y=t=>{var e;return[,,,s((e=t==null?void 0:t[h("metadata")])!=null?e:null)]};var m=["class","method","getter","setter","accessor","field","value","get","set"];var b=t=>t!==void 0&&typeof t!=="function"?d("Function expected"):t;var w=(t,e,n,r,i)=>({kind:m[t],name:e,metadata:r,addInitializer:t=>n._?d("Already initialized"):i.push(b(t||null))});var k=(t,e)=>p(e,h("metadata"),t[3]);var O=(t,e,n,r)=>{for(var i=0,s=t[e>>1],o=s&&s.length;i<o;i++)e&1?s[i].call(n):r=s[i].call(n,r);return r};var S=(t,e,n,r,i,s)=>{var l,c,u,h,f,p=e&7,v=!!(e&8),y=!!(e&16);var O=p>3?t.length+1:p?v?1:2:0,S=m[p+5];var E=p>3&&(t[O-1]=[]),P=t[O]||(t[O]=[]);var C=p&&(!y&&!v&&(i=i.prototype),p<5&&(p>3||!y)&&a(p<4?i:{get[n](){return A(this,s)},set[n](x){return D(this,s,x)}},n));p?y&&p<4&&g(s,(p>2?"set ":p>1?"get ":"")+n):g(i,n);for(var R=r.length-1;R>=0;R--){h=w(p,n,u={},t[3],P);if(p){h.static=v,h.private=y,f=h.access={has:y?t=>M(i,t):t=>n in t};if(p^3)f.get=y?t=>(p^1?A:W)(t,i,p^4?s:C.get):t=>t[n];if(p>2)f.set=y?(t,e)=>D(t,i,e,p^4?s:C.set):(t,e)=>t[n]=e}c=(0,r[R])(p?p<4?y?s:C[S]:p>4?void 0:{get:C.get,set:C.set}:i,h),u._=1;if(p^4||c===void 0)b(c)&&(p>4?E.unshift(c):p?y?s=c:C[S]=c:i=c);else if(typeof c!=="object"||c===null)d("Object expected");else b(l=c.get)&&(C.get=l),b(l=c.set)&&(C.set=l),b(l=c.init)&&E.unshift(l)}return p||k(t,i),C&&o(i,n,C),y?p^4?s:C:i};var E=(t,e,n)=>e.has(t)||d("Cannot "+n);var M=(t,e)=>Object(e)!==e?d('Cannot use the "in" operator on this value'):t.has(e);var A=(t,e,n)=>(E(t,e,"read from private field"),n?n.call(t):e.get(t));var P=(t,e,n)=>e.has(t)?d("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);var D=(t,e,n,r)=>(E(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var W=(t,e,n)=>(E(t,e,"access private method"),n);// src/point/Point.ts
var C=class t{/**
   * @param {number} Coordinate of the point on the horizontal axis
   * @param {number} Coordinate of the point on the vertical axis
   */constructor(t,e){this.x=t;this.y=e}/**
   * Returns the delta between this point and another point.
   *
   * @param {Point} a - A point
   * @param {Point} b - Another point
   */static delta(e,n){return new t(e.x-n.x,e.y-n.y)}/**
   * Returns the distance (hypotenuse) between this point and another point.
   *
   * @param {Point} a - A point
   * @param {Point} b - Another point
   */static distance(t,e){return Math.hypot(t.x-e.x,t.y-e.y)}/**
   * Returns true if both points are equal.
   *
   * @param {Point} a - A point
   * @param {Point} b - Another point
   */static equals(t,e){return t.x===e.x&&t.y===e.y}static from({x:e,y:n}){return new t(e,n)}};// src/shapes/Rectangle.ts
var R=class t{constructor(t,e,n,r){this.left=t;this.top=e;this.width=n;this.height=r;this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(e,n){const{top:r,left:i,width:s,height:o,scale:a}=this;const l=new t(i+e,r+n,s,o);l.scale=v({},a);return l}get boundingRectangle(){const{width:t,height:e,left:n,top:r,right:i,bottom:s}=this;return{width:t,height:e,left:n,top:r,right:i,bottom:s}}get center(){const{left:t,top:e,right:n,bottom:r}=this;return new C((t+n)/2,(e+r)/2)}get area(){const{width:t,height:e}=this;return t*e}equals(e){if(!(e instanceof t)){return false}const{left:n,top:r,width:i,height:s}=this;return n===e.left&&r===e.top&&i===e.width&&s===e.height}containsPoint(t){const{top:e,left:n,bottom:r,right:i}=this;return e<=t.y&&t.y<=r&&n<=t.x&&t.x<=i}intersectionArea(e){if(e instanceof t){return $(this,e)}return 0}intersectionRatio(t){const{area:e}=this;const n=this.intersectionArea(t);const r=n/(t.area+e-n);return r}get bottom(){const{top:t,height:e}=this;return t+e}get right(){const{left:t,width:e}=this;return t+e}get aspectRatio(){const{width:t,height:e}=this;return t/e}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:e,left:n,width:r,height:i}){return new t(n,e,r,i)}static delta(t,e,n={x:"center",y:"center"}){const r=(t,e)=>{const r=n[e];const i=e==="x"?t.left:t.top;const s=e==="x"?t.width:t.height;if(r=="start")return i;if(r=="end")return i+s;return i+s/2};return C.delta({x:r(t,"x"),y:r(t,"y")},{x:r(e,"x"),y:r(e,"y")})}static intersectionRatio(e,n){return t.from(e).intersectionRatio(t.from(n))}};function $(t,e){const n=Math.max(e.top,t.top);const r=Math.max(e.left,t.left);const i=Math.min(e.left+e.width,t.left+t.width);const s=Math.min(e.top+e.height,t.top+t.height);const o=i-r;const a=s-n;if(r<i&&n<s){const t=o*a;return t}return 0}// src/position/position.ts
var I,j,z,T,L;var _=class extends(z=r/* .ValueHistory */.Wf,j=[r/* .derived */.un],I=[r/* .derived */.un],z){constructor(t){const e=C.from(t);super(e,(t,e)=>C.equals(t,e));O(L,5,this);P(this,T,0);this.velocity={x:0,y:0}}get delta(){return C.delta(this.current,this.initial)}get direction(){const{current:t,previous:e}=this;if(!e)return null;const n={x:t.x-e.x,y:t.y-e.y};if(!n.x&&!n.y){return null}if(Math.abs(n.x)>Math.abs(n.y)){return n.x>0?"right":"left"}return n.y>0?"down":"up"}get current(){return super.current}set current(t){const{current:e}=this;const n=C.from(t);const r={x:n.x-e.x,y:n.y-e.y};const s=Date.now();const o=s-A(this,T);const a=t=>Math.round(t/o*100);(0,i/* .batch */.vA)(()=>{D(this,T,s);this.velocity={x:a(r.x),y:a(r.y)};super.current=n})}reset(t=this.defaultValue){super.reset(C.from(t));this.velocity={x:0,y:0}}};L=y(z);T=new WeakMap;S(L,2,"delta",j,_);S(L,2,"direction",I,_);k(L,_);// src/distance/distance.ts
function N({x:t,y:e},n){const r=Math.abs(t);const i=Math.abs(e);if(typeof n==="number"){return Math.sqrt(f(r,2)+f(i,2))>n}if("x"in n&&"y"in n){return r>n.x&&i>n.y}if("x"in n){return r>n.x}if("y"in n){return i>n.y}return false}// src/types/axis.ts
var K=/* @__PURE__ */(t=>{t["Horizontal"]="x";t["Vertical"]="y";return t})(K||{});var Y=Object.values(K)},42467:function(t,e,n){n.d(e,{EW:()=>R,Kh:()=>I,P9:()=>ts,Wf:()=>ti,_Z:()=>ta,bD:()=>$,un:()=>j,zb:()=>T});/* import */var r=n(67618);var i=Object.create;var s=Object.defineProperty;var o=Object.defineProperties;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty;var h=Object.prototype.propertyIsEnumerable;var d=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t);var f=t=>{throw TypeError(t)};var p=(t,e,n)=>e in t?s(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var v=(t,e)=>{for(var n in e||(e={}))if(u.call(e,n))p(t,n,e[n]);if(c)for(var n of c(e)){if(h.call(e,n))p(t,n,e[n])}return t};var g=(t,e)=>o(t,l(e));var y=(t,e)=>s(t,"name",{value:e,configurable:true});var m=t=>{var e;return[,,,i((e=t==null?void 0:t[d("metadata")])!=null?e:null)]};var b=["class","method","getter","setter","accessor","field","value","get","set"];var w=t=>t!==void 0&&typeof t!=="function"?f("Function expected"):t;var k=(t,e,n,r,i)=>({kind:b[t],name:e,metadata:r,addInitializer:t=>n._?f("Already initialized"):i.push(w(t||null))});var O=(t,e)=>p(e,d("metadata"),t[3]);var S=(t,e,n,r)=>{for(var i=0,s=t[e>>1],o=s&&s.length;i<o;i++)e&1?s[i].call(n):r=s[i].call(n,r);return r};var E=(t,e,n,r,i,o)=>{var l,c,u,h,d,p=e&7,v=!!(e&8),g=!!(e&16);var m=p>3?t.length+1:p?v?1:2:0,S=b[p+5];var E=p>3&&(t[m-1]=[]),M=t[m]||(t[m]=[]);var D=p&&(!g&&!v&&(i=i.prototype),p<5&&(p>3||!g)&&a(p<4?i:{get[n](){return P(this,o)},set[n](x){return W(this,o,x)}},n));p?g&&p<4&&y(o,(p>2?"set ":p>1?"get ":"")+n):y(i,n);for(var R=r.length-1;R>=0;R--){h=k(p,n,u={},t[3],M);if(p){h.static=v,h.private=g,d=h.access={has:g?t=>A(i,t):t=>n in t};if(p^3)d.get=g?t=>(p^1?P:C)(t,i,p^4?o:D.get):t=>t[n];if(p>2)d.set=g?(t,e)=>W(t,i,e,p^4?o:D.set):(t,e)=>t[n]=e}c=(0,r[R])(p?p<4?g?o:D[S]:p>4?void 0:{get:D.get,set:D.set}:i,h),u._=1;if(p^4||c===void 0)w(c)&&(p>4?E.unshift(c):p?g?o=c:D[S]=c:i=c);else if(typeof c!=="object"||c===null)f("Object expected");else w(l=c.get)&&(D.get=l),w(l=c.set)&&(D.set=l),w(l=c.init)&&E.unshift(l)}return p||O(t,i),D&&s(i,n,D),g?p^4?o:D:i};var M=(t,e,n)=>e.has(t)||f("Cannot "+n);var A=(t,e)=>Object(e)!==e?f('Cannot use the "in" operator on this value'):t.has(e);var P=(t,e,n)=>(M(t,e,"read from private field"),n?n.call(t):e.get(t));var D=(t,e,n)=>e.has(t)?f("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);var W=(t,e,n,r)=>(M(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var C=(t,e,n)=>(M(t,e,"access private method"),n);// src/index.ts
// src/computed.ts
function R(t,e){if(e){let n;return(0,r/* .computed */.EW)(()=>{const r=t();if(r&&n&&e(n,r)){return n}n=r;return r})}return(0,r/* .computed */.EW)(t)}// src/comparators.ts
function $(t,e){if(Object.is(t,e)){return true}if(t===null||e===null)return false;if(typeof t==="function"&&typeof e==="function"){return t===e}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size){return false}for(const n of t){if(!e.has(n)){return false}}return true}if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length){return false}const n=t.some((t,n)=>!$(t,e[n]));return!n}if(typeof t==="object"&&typeof e==="object"){const n=Object.keys(t);const r=Object.keys(e);if(n.length!==r.length)return false;const i=n.some(n=>!$(t[n],e[n]));return!i}return false}// src/decorators.ts
function I({get:t},e){return{init(t){return(0,r/* .signal */.vP)(t)},get(){const e=t.call(this);return e.value},set(e){const n=t.call(this);if(n.peek()===e){return}n.value=e}}}function j(t,e){const n=/* @__PURE__ */new WeakMap;return function(){let e=n.get(this);if(!e){e=R(t.bind(this));n.set(this,e)}return e.value}}function z(t=true){return function(e,n){n.addInitializer(function(){const e=n.kind==="field"?this:n.static?this:Object.getPrototypeOf(this);const r=Object.getOwnPropertyDescriptor(e,n.name);if(r){Object.defineProperty(e,n.name,g(v({},r),{enumerable:t}))}})}}// src/effects.ts
function T(...t){const e=t.map(t=>(0,r/* .effect */.QZ)(t));return()=>e.forEach(t=>t())}// src/history.ts
var L,_,N,K,Y,F,q,V,X,H,Z,U,B,Q,G,J,tt,te,tn,tr;F=[I],Y=[I],K=[I],N=[z()],_=[z()],L=[z()];var ti=class{constructor(t,e=Object.is){this.defaultValue=t;this.equals=e;S(q,5,this);D(this,U);// @ts-ignore
D(this,V,S(q,8,this)),S(q,11,this);// @ts-ignore
D(this,B,S(q,12,this)),S(q,15,this);// @ts-ignore
D(this,tt,S(q,16,this)),S(q,19,this);this.reset=this.reset.bind(this);this.reset()}get current(){return P(this,U,tn)}get initial(){return P(this,U,H)}get previous(){return P(this,U,G)}/** Set the current value */set current(t){const e=(0,r/* .untracked */.O8)(()=>P(this,U,tn));if(t&&e&&this.equals(e,t)){return}(0,r/* .batch */.vA)(()=>{if(!P(this,U,H)){W(this,U,t,Z)}W(this,U,e,J);W(this,U,t,tr)})}/** Reset the state to the initial value */reset(t=this.defaultValue){(0,r/* .batch */.vA)(()=>{W(this,U,void 0,J);W(this,U,t,Z);W(this,U,t,tr)})}};q=m(null);V=new WeakMap;U=new WeakSet;B=new WeakMap;tt=new WeakMap;X=E(q,20,"#initial",F,U,V),H=X.get,Z=X.set;Q=E(q,20,"#previous",Y,U,B),G=Q.get,J=Q.set;te=E(q,20,"#current",K,U,tt),tn=te.get,tr=te.set;E(q,2,"current",N,ti);E(q,2,"initial",_,ti);E(q,2,"previous",L,ti);O(q,ti);// src/snapshot.ts
function ts(t){return(0,r/* .untracked */.O8)(()=>{const e={};for(const n in t){e[n]=t[n]}return e})}// src/store.ts
var to;var ta=class{constructor(){D(this,to,/* @__PURE__ */new WeakMap)}get(t,e){var n;return t?(n=P(this,to).get(t))==null?void 0:n.get(e):void 0}set(t,e,n){var r;if(!t)return;if(!P(this,to).has(t))P(this,to).set(t,/* @__PURE__ */new Map);return(r=P(this,to).get(t))==null?void 0:r.set(e,n)}clear(t){var e;return t?(e=P(this,to).get(t))==null?void 0:e.clear():void 0}};to=new WeakMap}}]);