@aracna/react 1.0.50 → 1.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { ForwardedRef, ReactElement } from 'react';
1
+ import { type ForwardedRef, type ReactElement } from 'react';
2
2
  type ForwardRefRenderFunction<T, P = {}> = (props: P, ref: ForwardedRef<T>) => ReactElement<P>;
3
3
  type NullableForwardRefRenderFunction<T, P = {}> = (props: P, ref: ForwardedRef<T>) => ReactElement<P> | null;
4
4
  type ForwardRefExoticComponent<P = {}> = (props: P) => ReactElement;
@@ -1,5 +1,5 @@
1
- import { DependencyList } from 'react';
2
- import { UseDOMRectElement } from '../index.js';
1
+ import { type DependencyList } from 'react';
2
+ import type { UseDOMRectElement } from '../definitions/types.js';
3
3
  /**
4
4
  * Returns the DOMRect of an element.
5
5
  * Optionally a dependency list can be passed to refresh the DOMRect.
@@ -1 +1 @@
1
- import{StubDOMRect as r}from"@aracna/web";import{useEffect as i,useState as o}from"react";function D(e,n=[]){const[c,t]=o(new r);return i(()=>{if(e instanceof Element){t(e.getBoundingClientRect());return}e?.current instanceof Element&&t(e.current.getBoundingClientRect())},[e,...n]),c}export{D as useDOMRect};
1
+ import{StubDOMRect as i}from"@aracna/web";import{useEffect as r,useState as s}from"react";function u(e,n=[]){const[c,t]=s(new i);return r(()=>{if(e instanceof Element){t(e.getBoundingClientRect());return}e?.current instanceof Element&&t(e.current.getBoundingClientRect())},[e,...n]),c}export{u as useDOMRect};
@@ -1,4 +1,4 @@
1
- import { MutableRefObject } from 'react';
1
+ import { type MutableRefObject } from 'react';
2
2
  /**
3
3
  * Returns a mutable ref object whose `.current` property is initialized with a matching element.
4
4
  *
@@ -1 +1 @@
1
- import{isWindowDefined as n}from"@aracna/core";import{useRef as a}from"react";function f(e,t){return a(n()?document.createElement(e,t):{current:{}})}export{f as useElementRef};
1
+ import{isWindowDefined as n}from"@aracna/core";import{useRef as a}from"react";function i(e,t){return a(n()?document.createElement(e,t):{current:{}})}export{i as useElementRef};
@@ -1,5 +1,5 @@
1
- import { DependencyList } from 'react';
2
- import { UseEventListenerElement } from '../index.js';
1
+ import { type DependencyList } from 'react';
2
+ import type { UseEventListenerElement } from '../definitions/types.js';
3
3
  /**
4
4
  * Adds an event listener to the given element.
5
5
  * Optionally a list of dependencies can be passed to refresh the listener.
@@ -1 +1 @@
1
- import{useEffect as E}from"react";function d(e,n,t,s=[]){E(()=>{if(e instanceof Element)return e.addEventListener(n,t),()=>e.removeEventListener(n,t);if(e?.current instanceof Element)return e.current.addEventListener(n,t),()=>e.current?.removeEventListener(n,t)},[e,n,t,...s])}export{d as useEventListener};
1
+ import{useEffect as i}from"react";function r(e,n,t,s=[]){i(()=>{if(e instanceof Element)return e.addEventListener(n,t),()=>e.removeEventListener(n,t);if(e?.current instanceof Element)return e.current.addEventListener(n,t),()=>e.current?.removeEventListener(n,t)},[e,n,t,...s])}export{r as useEventListener};
@@ -1,6 +1,6 @@
1
- import { DependencyList } from 'react';
2
- import { UseIntersectionObserverReturn } from '../definitions/interfaces.js';
3
- import { UseIntersectionObserverElement } from '../index.js';
1
+ import { type DependencyList } from 'react';
2
+ import type { UseIntersectionObserverReturn } from '../definitions/interfaces.js';
3
+ import type { UseIntersectionObserverElement } from '../definitions/types.js';
4
4
  /**
5
5
  * Creates an IntersectionObserver and observes the given targets.
6
6
  *
@@ -1 +1 @@
1
- import{isArray as b}from"@aracna/core";import{useEffect as y,useRef as a,useState as d}from"react";function L(c,r,u=[]){const t=a(),[s,f]=d([]),o=(...e)=>{const n=b(e[0])?e[0][0]instanceof Element?e[0]:[]:e[0]instanceof Element?e:[];if(n.length>0)return s.filter(i=>n.includes(i.target));const I=b(e[0])?e[0][0]?.current instanceof Element?e[0]:[]:e[0]?.current instanceof Element?e:[];return I.length>0?s.filter(i=>I.some(O=>O.current===i.target)):s},l=(...e)=>o(...e).some(n=>n.isIntersecting),v=(...e)=>o(...e).every(n=>n.isIntersecting),E=(...e)=>l(...e),m=e=>{f(e)};return y(()=>{t.current=new IntersectionObserver(m,r);for(let e of c){if(e instanceof Element){t.current.observe(e);continue}e?.current instanceof Element&&t.current.observe(e.current)}return()=>t.current?.disconnect()},[...c,r?.root,r?.rootMargin,r?.threshold,...u]),{entries:s,observer:t,areSomeIntersecting:l,isEveryIntersecting:v,isIntersecting:E}}export{L as useIntersectionObserver};
1
+ import{isArray as b}from"@aracna/core";import{useEffect as y,useRef as a,useState as d}from"react";function g(c,r,u=[]){const t=a(),[s,f]=d([]),o=(...e)=>{const n=b(e[0])?e[0][0]instanceof Element?e[0]:[]:e[0]instanceof Element?e:[];if(n.length>0)return s.filter(i=>n.includes(i.target));const I=b(e[0])?e[0][0]?.current instanceof Element?e[0]:[]:e[0]?.current instanceof Element?e:[];return I.length>0?s.filter(i=>I.some(O=>O.current===i.target)):s},l=(...e)=>o(...e).some(n=>n.isIntersecting),v=(...e)=>o(...e).every(n=>n.isIntersecting),E=(...e)=>l(...e),m=e=>{f(e)};return y(()=>{t.current=new IntersectionObserver(m,r);for(let e of c){if(e instanceof Element){t.current.observe(e);continue}e?.current instanceof Element&&t.current.observe(e.current)}return()=>t.current?.disconnect()},[...c,r?.root,r?.rootMargin,r?.threshold,...u]),{entries:s,observer:t,areSomeIntersecting:l,isEveryIntersecting:v,isIntersecting:E}}export{g as useIntersectionObserver};
@@ -1,4 +1,4 @@
1
- import { MutableRefObject } from 'react';
1
+ import { type MutableRefObject } from 'react';
2
2
  import { ComponentLifeCycle } from '../definitions/enums.js';
3
3
  /**
4
4
  * Returns the current life cycle of the component.
@@ -1 +1 @@
1
- import{useEffect as n,useRef as o}from"react";import{ComponentLifeCycle as t}from"../definitions/enums.js";function u(){const e=o(t.CONSTRUCTED);return n(()=>(e.current=t.MOUNTED,()=>{e.current=t.UNMOUNTED}),[]),e}export{u as useLifeCycle};
1
+ import{useEffect as n,useRef as o}from"react";import{ComponentLifeCycle as t}from"../definitions/enums.js";function c(){const e=o(t.CONSTRUCTED);return n(()=>(e.current=t.MOUNTED,()=>{e.current=t.UNMOUNTED}),[]),e}export{c as useLifeCycle};
@@ -1,4 +1,4 @@
1
- import { UseObservableElementComponentOptions, UseObservableElementComponentReturn } from '../definitions/interfaces.js';
1
+ import type { UseObservableElementComponentOptions, UseObservableElementComponentReturn } from '../definitions/interfaces.js';
2
2
  /**
3
3
  * Observes a custom element that extends `BaseElement` by listening to its attribute and state changes.
4
4
  *
@@ -1 +1 @@
1
- import{useCallback as i,useEffect as c,useRef as b,useState as d}from"react";import{useDispatch as f}from"./use-dispatch.js";function k(t){const l=b(null),r=f(),[s,n]=d({}),m=i(e=>{e.detail&&(t?.blacklist&&t.blacklist.includes(e.detail.name)||t?.whitelist&&!t.whitelist.includes(e.detail.name)||n(a=>e.detail?{...a,[e.detail.name]:e.detail.value}:a))},[t?.blacklist,t?.whitelist]),u=i(e=>{e.detail&&(t?.blacklist&&t.blacklist.includes(e.detail.name)||t?.whitelist&&!t.whitelist.includes(e.detail.name)||n(a=>e.detail?{...a,[e.detail.name]:e.detail.value}:a))},[t?.blacklist,t?.whitelist]);return c(()=>r(),[l.current]),{element:l.current,onAttributeChange:m,onStateChange:u,properties:s,ref:l}}export{k as useObservableElementComponent};
1
+ import{useCallback as i,useEffect as c,useRef as d,useState as b}from"react";import{useDispatch as f}from"./use-dispatch.js";function g(t){const l=d(null),r=f(),[s,n]=b({}),m=i(e=>{e.detail&&(t?.blacklist&&t.blacklist.includes(e.detail.name)||t?.whitelist&&!t.whitelist.includes(e.detail.name)||n(a=>e.detail?{...a,[e.detail.name]:e.detail.value}:a))},[t?.blacklist,t?.whitelist]),u=i(e=>{e.detail&&(t?.blacklist&&t.blacklist.includes(e.detail.name)||t?.whitelist&&!t.whitelist.includes(e.detail.name)||n(a=>e.detail?{...a,[e.detail.name]:e.detail.value}:a))},[t?.blacklist,t?.whitelist]);return c(()=>r(),[l.current]),{element:l.current,onAttributeChange:m,onStateChange:u,properties:s,ref:l}}export{g as useObservableElementComponent};
@@ -1,4 +1,4 @@
1
- import { DependencyList } from 'react';
1
+ import { type DependencyList } from 'react';
2
2
  /**
3
3
  * Adds an event listener to the window.
4
4
  * Optionally a dependency list can be passed to refresh the listener.
@@ -1 +1 @@
1
- import{useEffect as o}from"react";function r(e,n,t=[]){o(()=>(window.addEventListener(e,n),()=>window.removeEventListener(e,n)),[e,n,...t])}export{r as useWindowEventListener};
1
+ import{useEffect as o}from"react";function i(e,n,t=[]){o(()=>(window.addEventListener(e,n),()=>window.removeEventListener(e,n)),[e,n,...t])}export{i as useWindowEventListener};
@@ -1,4 +1,4 @@
1
- import { DependencyList } from 'react';
1
+ import { type DependencyList } from 'react';
2
2
  /**
3
3
  * Returns the window size.
4
4
  * Optionally a dependency list can be passed to refresh the dimensions.
@@ -1 +1 @@
1
- import{isWindowDefined as e}from"@aracna/core";import{useState as n}from"react";import{useWindowEventListener as W}from"./use-window-event-listener.js";function p(i=[]){const[t,r]=n(e()?window.innerHeight:0),[o,d]=n(e()?window.innerWidth:0),[w,u]=n(e()?window.outerHeight:0),[h,s]=n(e()?window.outerWidth:0);return W("resize",()=>{r(window.innerHeight),d(window.innerWidth),u(window.outerHeight),s(window.outerWidth)},i),{innerHeight:t,innerWidth:o,outerHeight:w,outerWidth:h}}export{p as useWindowSize};
1
+ import{isWindowDefined as e}from"@aracna/core";import{useState as n}from"react";import{useWindowEventListener as W}from"./use-window-event-listener.js";function c(t=[]){const[i,r]=n(e()?window.innerHeight:0),[o,d]=n(e()?window.innerWidth:0),[w,u]=n(e()?window.outerHeight:0),[h,s]=n(e()?window.outerWidth:0);return W("resize",()=>{r(window.innerHeight),d(window.innerWidth),u(window.outerHeight),s(window.outerWidth)},t),{innerHeight:i,innerWidth:o,outerHeight:w,outerWidth:h}}export{c as useWindowSize};
package/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var V=Object.create;var v=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var J=(e,t)=>{for(var n in t)v(e,n,{get:t[n],enumerable:!0})},P=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of z(t))!q.call(e,s)&&s!==n&&v(e,s,{get:()=>t[s],enumerable:!(o=_(t,s))||o.enumerable});return e};var Q=(e,t,n)=>(n=e!=null?V(G(e)):{},P(t||!e||!e.__esModule?v(n,"default",{value:e,enumerable:!0}):n,e)),X=e=>P(v({},"__esModule",{value:!0}),e);var me={};J(me,{ComponentLifeCycle:()=>h,Memo:()=>Y,createBaseElementComponent:()=>l,createElementComponent:()=>g,createFloatingElementComponent:()=>Z,createFocusTrapElementComponent:()=>$,createFormControlElementComponent:()=>ee,forwardRef:()=>te,useDOMRect:()=>ne,useDispatch:()=>T,useElementRef:()=>oe,useEventListener:()=>re,useIntersectionObserver:()=>se,useLifeCycle:()=>C,useObservableElementComponent:()=>ae,useWindowEventListener:()=>O,useWindowSize:()=>ie});module.exports=X(me);var A=require("react");function Y(e){return(0,A.useMemo)(()=>e.children,e.deps??[])}var h=(o=>(o.CONSTRUCTED="CONSTRUCTED",o.MOUNTED="MOUNTED",o.UNMOUNTED="UNMOUNTED",o))(h||{});var L=require("@aracna/core"),N=require("@lit/react"),K=Q(require("react"),1);var R={onAbort:"abort",onAnimationEnd:"animationend",onAnimationIteration:"animationiteration",onAnimationStart:"animationstart",onAuxClick:"auxclick",onBeforeInput:"beforeinput",onBlur:"blur",onCanPlay:"canplay",onCanPlayThrough:"canplaythrough",onChange:"change",onClick:"click",onCompositionEnd:"compositionend",onCompositionStart:"compositionstart",onCompositionUpdate:"compositionupdate",onContextMenu:"contextmenu",onCopy:"copy",onCut:"cut",onDoubleClick:"doubleclick",onDrag:"drag",onDragEnd:"dragend",onDragEnter:"dragenter",onDragExit:"dragexit",onDragLeave:"dragleave",onDragOver:"dragover",onDragStart:"dragstart",onDrop:"drop",onDurationChange:"durationchange",onEmptied:"emptied",onEncrypted:"encrypted",onEnded:"ended",onError:"error",onEventHandler:"eventhandler",onFocus:"focus",onInput:"input",onInvalid:"invalid",onKeyDown:"keydown",onKeyPress:"keypress",onKeyUp:"keyup",onLoad:"load",onLoadStart:"loadstart",onLoadedData:"loadeddata",onLoadedMetadata:"loadedmetadata",onMouseDown:"mousedown",onMouseEnter:"mouseenter",onMouseLeave:"mouseleave",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPaste:"paste",onPause:"pause",onPlay:"play",onPlaying:"playing",onPointerCancel:"pointercancel",onPointerDown:"pointerdown",onPointerEnter:"pointerenter",onPointerLeave:"pointerleave",onPointerMove:"pointermove",onPointerOut:"pointerout",onPointerOver:"pointerover",onPointerUp:"pointerup",onProgress:"progress",onRateChange:"ratechange",onReset:"reset",onResize:"resize",onScroll:"scroll",onSeeked:"seeked",onSeeking:"seeking",onSelect:"select",onStalled:"stalled",onSubmit:"submit",onSuspend:"suspend",onTimeUpdate:"timeupdate",onTouchCancel:"touchcancel",onTouchEnd:"touchend",onTouchMove:"touchmove",onTouchStart:"touchstart",onTransitionEnd:"transitionend",onVolumeChange:"volumechange",onWaiting:"waiting",onWheel:"wheel"};function g(e,t,n=[]){return(0,N.createComponent)({elementClass:t,events:{...R,...n.reduce((o,s)=>({...o,["on"+(0,L.getPascalCaseString)(String(s))]:s}),{})},react:K.default,tagName:e})}function l(e,t,n=[]){return g(e,t,["attribute-change","state-change",...n])}function Z(e,t,n){return l(e,t,n)}function $(e,t,n=[]){return l(e,t,["focus-trap-activate","focus-trap-deactivate","focus-trap-post-activate","focus-trap-post-deactivate",...n])}function ee(e,t,n){return l(e,t,n)}var D=require("react");function te(...e){return(0,D.forwardRef)(e[0])}var I=require("react");var b=require("react");function C(){let e=(0,b.useRef)("CONSTRUCTED");return(0,b.useEffect)(()=>(e.current="MOUNTED",()=>{e.current="UNMOUNTED"}),[]),e}function T(e){let t=C(),n=(0,I.useReducer)(()=>({}),{});return()=>{switch(t.current){case"CONSTRUCTED":case"UNMOUNTED":break;case"MOUNTED":n[1](),e&&e();break}}}var k=require("@aracna/web"),y=require("react");function ne(e,t=[]){let[n,o]=(0,y.useState)(new k.StubDOMRect);return(0,y.useEffect)(()=>{if(e instanceof Element){o(e.getBoundingClientRect());return}e?.current instanceof Element&&o(e.current.getBoundingClientRect())},[e,...t]),n}var U=require("@aracna/core"),F=require("react");function oe(e,t){return(0,F.useRef)((0,U.isWindowDefined)()?document.createElement(e,t):{current:{}})}var S=require("react");function re(e,t,n,o=[]){(0,S.useEffect)(()=>{if(e instanceof Element)return e.addEventListener(t,n),()=>e.removeEventListener(t,n);if(e?.current instanceof Element)return e.current.addEventListener(t,n),()=>e.current?.removeEventListener(t,n)},[e,t,n,...o])}var x=require("@aracna/core"),E=require("react");function se(e,t,n=[]){let o=(0,E.useRef)(),[s,u]=(0,E.useState)([]),p=(...r)=>{let c=(0,x.isArray)(r[0])?r[0][0]instanceof Element?r[0]:[]:r[0]instanceof Element?r:[];if(c.length>0)return s.filter(M=>c.includes(M.target));let w=(0,x.isArray)(r[0])?r[0][0]?.current instanceof Element?r[0]:[]:r[0]?.current instanceof Element?r:[];return w.length>0?s.filter(M=>w.some(B=>B.current===M.target)):s},a=(...r)=>p(...r).some(c=>c.isIntersecting),i=(...r)=>p(...r).every(c=>c.isIntersecting),j=(...r)=>a(...r),W=r=>{u(r)};return(0,E.useEffect)(()=>{o.current=new IntersectionObserver(W,t);for(let r of e){if(r instanceof Element){o.current.observe(r);continue}r?.current instanceof Element&&o.current.observe(r.current)}return()=>o.current?.disconnect()},[...e,t?.root,t?.rootMargin,t?.threshold,...n]),{entries:s,observer:o,areSomeIntersecting:a,isEveryIntersecting:i,isIntersecting:j}}var m=require("react");function ae(e){let t=(0,m.useRef)(null),n=T(),[o,s]=(0,m.useState)({}),u=(0,m.useCallback)(a=>{a.detail&&(e?.blacklist&&e.blacklist.includes(a.detail.name)||e?.whitelist&&!e.whitelist.includes(a.detail.name)||s(i=>a.detail?{...i,[a.detail.name]:a.detail.value}:i))},[e?.blacklist,e?.whitelist]),p=(0,m.useCallback)(a=>{a.detail&&(e?.blacklist&&e.blacklist.includes(a.detail.name)||e?.whitelist&&!e.whitelist.includes(a.detail.name)||s(i=>a.detail?{...i,[a.detail.name]:a.detail.value}:i))},[e?.blacklist,e?.whitelist]);return(0,m.useEffect)(()=>n(),[t.current]),{element:t.current,onAttributeChange:u,onStateChange:p,properties:o,ref:t}}var H=require("react");function O(e,t,n=[]){(0,H.useEffect)(()=>(window.addEventListener(e,t),()=>window.removeEventListener(e,t)),[e,t,...n])}var d=require("@aracna/core"),f=require("react");function ie(e=[]){let[t,n]=(0,f.useState)((0,d.isWindowDefined)()?window.innerHeight:0),[o,s]=(0,f.useState)((0,d.isWindowDefined)()?window.innerWidth:0),[u,p]=(0,f.useState)((0,d.isWindowDefined)()?window.outerHeight:0),[a,i]=(0,f.useState)((0,d.isWindowDefined)()?window.outerWidth:0);return O("resize",()=>{n(window.innerHeight),s(window.innerWidth),p(window.outerHeight),i(window.outerWidth)},e),{innerHeight:t,innerWidth:o,outerHeight:u,outerWidth:a}}
1
+ "use strict";var V=Object.create;var y=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var J=(e,t)=>{for(var n in t)y(e,n,{get:t[n],enumerable:!0})},P=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of z(t))!q.call(e,s)&&s!==n&&y(e,s,{get:()=>t[s],enumerable:!(o=_(t,s))||o.enumerable});return e};var Q=(e,t,n)=>(n=e!=null?V(G(e)):{},P(t||!e||!e.__esModule?y(n,"default",{value:e,enumerable:!0}):n,e)),X=e=>P(y({},"__esModule",{value:!0}),e);var me={};J(me,{ComponentLifeCycle:()=>h,Memo:()=>Y,createBaseElementComponent:()=>p,createElementComponent:()=>g,createFloatingElementComponent:()=>Z,createFocusTrapElementComponent:()=>$,createFormControlElementComponent:()=>ee,forwardRef:()=>te,useDOMRect:()=>ne,useDispatch:()=>T,useElementRef:()=>oe,useEventListener:()=>re,useIntersectionObserver:()=>se,useLifeCycle:()=>C,useObservableElementComponent:()=>ie,useWindowEventListener:()=>O,useWindowSize:()=>ae});module.exports=X(me);var A=require("react");function Y(e){return(0,A.useMemo)(()=>e.children,e.deps??[])}var h=(o=>(o.CONSTRUCTED="CONSTRUCTED",o.MOUNTED="MOUNTED",o.UNMOUNTED="UNMOUNTED",o))(h||{});var L=require("@aracna/core"),N=require("@lit/react"),K=Q(require("react"),1);var R={onAbort:"abort",onAnimationEnd:"animationend",onAnimationIteration:"animationiteration",onAnimationStart:"animationstart",onAuxClick:"auxclick",onBeforeInput:"beforeinput",onBlur:"blur",onCanPlay:"canplay",onCanPlayThrough:"canplaythrough",onChange:"change",onClick:"click",onCompositionEnd:"compositionend",onCompositionStart:"compositionstart",onCompositionUpdate:"compositionupdate",onContextMenu:"contextmenu",onCopy:"copy",onCut:"cut",onDoubleClick:"doubleclick",onDrag:"drag",onDragEnd:"dragend",onDragEnter:"dragenter",onDragExit:"dragexit",onDragLeave:"dragleave",onDragOver:"dragover",onDragStart:"dragstart",onDrop:"drop",onDurationChange:"durationchange",onEmptied:"emptied",onEncrypted:"encrypted",onEnded:"ended",onError:"error",onEventHandler:"eventhandler",onFocus:"focus",onInput:"input",onInvalid:"invalid",onKeyDown:"keydown",onKeyPress:"keypress",onKeyUp:"keyup",onLoad:"load",onLoadStart:"loadstart",onLoadedData:"loadeddata",onLoadedMetadata:"loadedmetadata",onMouseDown:"mousedown",onMouseEnter:"mouseenter",onMouseLeave:"mouseleave",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPaste:"paste",onPause:"pause",onPlay:"play",onPlaying:"playing",onPointerCancel:"pointercancel",onPointerDown:"pointerdown",onPointerEnter:"pointerenter",onPointerLeave:"pointerleave",onPointerMove:"pointermove",onPointerOut:"pointerout",onPointerOver:"pointerover",onPointerUp:"pointerup",onProgress:"progress",onRateChange:"ratechange",onReset:"reset",onResize:"resize",onScroll:"scroll",onSeeked:"seeked",onSeeking:"seeking",onSelect:"select",onStalled:"stalled",onSubmit:"submit",onSuspend:"suspend",onTimeUpdate:"timeupdate",onTouchCancel:"touchcancel",onTouchEnd:"touchend",onTouchMove:"touchmove",onTouchStart:"touchstart",onTransitionEnd:"transitionend",onVolumeChange:"volumechange",onWaiting:"waiting",onWheel:"wheel"};function g(e,t,n=[]){return(0,N.createComponent)({elementClass:t,events:{...R,...n.reduce((o,s)=>({...o,["on"+(0,L.getPascalCaseString)(String(s))]:s}),{})},react:K.default,tagName:e})}function p(e,t,n=[]){return g(e,t,["attribute-change","state-change",...n])}function Z(e,t,n){return p(e,t,n)}function $(e,t,n=[]){return p(e,t,["focus-trap-activate","focus-trap-deactivate","focus-trap-post-activate","focus-trap-post-deactivate",...n])}function ee(e,t,n){return p(e,t,n)}var D=require("react");function te(...e){return(0,D.forwardRef)(e[0])}var I=require("react");var v=require("react");function C(){let e=(0,v.useRef)("CONSTRUCTED");return(0,v.useEffect)(()=>(e.current="MOUNTED",()=>{e.current="UNMOUNTED"}),[]),e}function T(e){let t=C(),n=(0,I.useReducer)(()=>({}),{});return()=>{switch(t.current){case"CONSTRUCTED":case"UNMOUNTED":break;case"MOUNTED":n[1](),e&&e();break}}}var k=require("@aracna/web"),b=require("react");function ne(e,t=[]){let[n,o]=(0,b.useState)(new k.StubDOMRect);return(0,b.useEffect)(()=>{if(e instanceof Element){o(e.getBoundingClientRect());return}e?.current instanceof Element&&o(e.current.getBoundingClientRect())},[e,...t]),n}var U=require("@aracna/core"),F=require("react");function oe(e,t){return(0,F.useRef)((0,U.isWindowDefined)()?document.createElement(e,t):{current:{}})}var S=require("react");function re(e,t,n,o=[]){(0,S.useEffect)(()=>{if(e instanceof Element)return e.addEventListener(t,n),()=>e.removeEventListener(t,n);if(e?.current instanceof Element)return e.current.addEventListener(t,n),()=>e.current?.removeEventListener(t,n)},[e,t,n,...o])}var x=require("@aracna/core"),E=require("react");function se(e,t,n=[]){let o=(0,E.useRef)(),[s,u]=(0,E.useState)([]),l=(...r)=>{let c=(0,x.isArray)(r[0])?r[0][0]instanceof Element?r[0]:[]:r[0]instanceof Element?r:[];if(c.length>0)return s.filter(M=>c.includes(M.target));let w=(0,x.isArray)(r[0])?r[0][0]?.current instanceof Element?r[0]:[]:r[0]?.current instanceof Element?r:[];return w.length>0?s.filter(M=>w.some(B=>B.current===M.target)):s},i=(...r)=>l(...r).some(c=>c.isIntersecting),a=(...r)=>l(...r).every(c=>c.isIntersecting),j=(...r)=>i(...r),W=r=>{u(r)};return(0,E.useEffect)(()=>{o.current=new IntersectionObserver(W,t);for(let r of e){if(r instanceof Element){o.current.observe(r);continue}r?.current instanceof Element&&o.current.observe(r.current)}return()=>o.current?.disconnect()},[...e,t?.root,t?.rootMargin,t?.threshold,...n]),{entries:s,observer:o,areSomeIntersecting:i,isEveryIntersecting:a,isIntersecting:j}}var m=require("react");function ie(e){let t=(0,m.useRef)(null),n=T(),[o,s]=(0,m.useState)({}),u=(0,m.useCallback)(i=>{i.detail&&(e?.blacklist&&e.blacklist.includes(i.detail.name)||e?.whitelist&&!e.whitelist.includes(i.detail.name)||s(a=>i.detail?{...a,[i.detail.name]:i.detail.value}:a))},[e?.blacklist,e?.whitelist]),l=(0,m.useCallback)(i=>{i.detail&&(e?.blacklist&&e.blacklist.includes(i.detail.name)||e?.whitelist&&!e.whitelist.includes(i.detail.name)||s(a=>i.detail?{...a,[i.detail.name]:i.detail.value}:a))},[e?.blacklist,e?.whitelist]);return(0,m.useEffect)(()=>n(),[t.current]),{element:t.current,onAttributeChange:u,onStateChange:l,properties:o,ref:t}}var H=require("react");function O(e,t,n=[]){(0,H.useEffect)(()=>(window.addEventListener(e,t),()=>window.removeEventListener(e,t)),[e,t,...n])}var d=require("@aracna/core"),f=require("react");function ae(e=[]){let[t,n]=(0,f.useState)((0,d.isWindowDefined)()?window.innerHeight:0),[o,s]=(0,f.useState)((0,d.isWindowDefined)()?window.innerWidth:0),[u,l]=(0,f.useState)((0,d.isWindowDefined)()?window.outerHeight:0),[i,a]=(0,f.useState)((0,d.isWindowDefined)()?window.outerWidth:0);return O("resize",()=>{n(window.innerHeight),s(window.innerWidth),l(window.outerHeight),a(window.outerWidth)},e),{innerHeight:t,innerWidth:o,outerHeight:u,outerWidth:i}}
package/index.iife.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var AracnaReact=(()=>{var Le=Object.create;var g=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Ue=Object.getOwnPropertyNames;var xe=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Fe=(e,t)=>{for(var n in t)g(e,n,{get:t[n],enumerable:!0})},q=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ue(t))!Ie.call(e,o)&&o!==n&&g(e,o,{get:()=>t[o],enumerable:!(r=we(t,o))||r.enumerable});return e};var T=(e,t,n)=>(n=e!=null?Le(xe(e)):{},q(t||!e||!e.__esModule?g(n,"default",{value:e,enumerable:!0}):n,e)),ke=e=>q(g({},"__esModule",{value:!0}),e);var le=I(c=>{"use strict";var C=Symbol.for("react.element"),Be=Symbol.for("react.portal"),Ke=Symbol.for("react.fragment"),He=Symbol.for("react.strict_mode"),Ge=Symbol.for("react.profiler"),je=Symbol.for("react.provider"),We=Symbol.for("react.context"),Ve=Symbol.for("react.forward_ref"),ze=Symbol.for("react.suspense"),$e=Symbol.for("react.memo"),Xe=Symbol.for("react.lazy"),Q=Symbol.iterator;function Je(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var ne={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},re=Object.assign,oe={};function h(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}h.prototype.isReactComponent={};h.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function se(){}se.prototype=h.prototype;function k(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}var B=k.prototype=new se;B.constructor=k;re(B,h.prototype);B.isPureReactComponent=!0;var ee=Array.isArray,ie=Object.prototype.hasOwnProperty,K={current:null},ae={key:!0,ref:!0,__self:!0,__source:!0};function ue(e,t,n){var r,o={},u=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(u=""+t.key),t)ie.call(t,r)&&!ae.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var a=Array(s),l=0;l<s;l++)a[l]=arguments[l+2];o.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return{$$typeof:C,type:e,key:u,ref:i,props:o,_owner:K.current}}function Ye(e,t){return{$$typeof:C,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function H(e){return typeof e=="object"&&e!==null&&e.$$typeof===C}function Ze(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var te=/\/+/g;function F(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ze(""+e.key):t.toString(36)}function M(e,t,n,r,o){var u=typeof e;(u==="undefined"||u==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(u){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case C:case Be:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+F(i,0):r,ee(o)?(n="",e!=null&&(n=e.replace(te,"$&/")+"/"),M(o,t,n,"",function(l){return l})):o!=null&&(H(o)&&(o=Ye(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(te,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",ee(e))for(var s=0;s<e.length;s++){u=e[s];var a=r+F(u,s);i+=M(u,t,n,a,o)}else if(a=Je(e),typeof a=="function")for(e=a.call(e),s=0;!(u=e.next()).done;)u=u.value,a=r+F(u,s++),i+=M(u,t,n,a,o);else if(u==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function N(e,t,n){if(e==null)return e;var r=[],o=0;return M(e,r,"","",function(u){return t.call(n,u,o++)}),r}function qe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var d={current:null},P={transition:null},Qe={ReactCurrentDispatcher:d,ReactCurrentBatchConfig:P,ReactCurrentOwner:K};function ce(){throw Error("act(...) is not supported in production builds of React.")}c.Children={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(t){return t})||[]},only:function(e){if(!H(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};c.Component=h;c.Fragment=Ke;c.Profiler=Ge;c.PureComponent=k;c.StrictMode=He;c.Suspense=ze;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qe;c.act=ce;c.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=re({},e.props),o=e.key,u=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(u=t.ref,i=K.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)ie.call(t,a)&&!ae.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&s!==void 0?s[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){s=Array(a);for(var l=0;l<a;l++)s[l]=arguments[l+2];r.children=s}return{$$typeof:C,type:e.type,key:o,ref:u,props:r,_owner:i}};c.createContext=function(e){return e={$$typeof:We,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:je,_context:e},e.Consumer=e};c.createElement=ue;c.createFactory=function(e){var t=ue.bind(null,e);return t.type=e,t};c.createRef=function(){return{current:null}};c.forwardRef=function(e){return{$$typeof:Ve,render:e}};c.isValidElement=H;c.lazy=function(e){return{$$typeof:Xe,_payload:{_status:-1,_result:e},_init:qe}};c.memo=function(e,t){return{$$typeof:$e,type:e,compare:t===void 0?null:t}};c.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}};c.unstable_act=ce;c.useCallback=function(e,t){return d.current.useCallback(e,t)};c.useContext=function(e){return d.current.useContext(e)};c.useDebugValue=function(){};c.useDeferredValue=function(e){return d.current.useDeferredValue(e)};c.useEffect=function(e,t){return d.current.useEffect(e,t)};c.useId=function(){return d.current.useId()};c.useImperativeHandle=function(e,t,n){return d.current.useImperativeHandle(e,t,n)};c.useInsertionEffect=function(e,t){return d.current.useInsertionEffect(e,t)};c.useLayoutEffect=function(e,t){return d.current.useLayoutEffect(e,t)};c.useMemo=function(e,t){return d.current.useMemo(e,t)};c.useReducer=function(e,t,n){return d.current.useReducer(e,t,n)};c.useRef=function(e){return d.current.useRef(e)};c.useState=function(e){return d.current.useState(e)};c.useSyncExternalStore=function(e,t,n){return d.current.useSyncExternalStore(e,t,n)};c.useTransition=function(){return d.current.useTransition()};c.version="18.3.1"});var y=I((gt,Ee)=>{"use strict";Ee.exports=le()});var Ae=I(W=>{"use strict";W.parse=st;W.serialize=it;var ot=Object.prototype.toString,D=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function st(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var n={},r=t||{},o=r.decode||at,u=0;u<e.length;){var i=e.indexOf("=",u);if(i===-1)break;var s=e.indexOf(";",u);if(s===-1)s=e.length;else if(s<i){u=e.lastIndexOf(";",i-1)+1;continue}var a=e.slice(u,i).trim();if(n[a]===void 0){var l=e.slice(i+1,s).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1)),n[a]=lt(l,o)}u=s+1}return n}function it(e,t,n){var r=n||{},o=r.encode||ut;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!D.test(e))throw new TypeError("argument name is invalid");var u=o(t);if(u&&!D.test(u))throw new TypeError("argument val is invalid");var i=e+"="+u;if(r.maxAge!=null){var s=r.maxAge-0;if(isNaN(s)||!isFinite(s))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(s)}if(r.domain){if(!D.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!D.test(r.path))throw new TypeError("option path is invalid");i+="; Path="+r.path}if(r.expires){var a=r.expires;if(!ct(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+a.toUTCString()}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.partitioned&&(i+="; Partitioned"),r.priority){var l=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(l){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var p=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(p){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i}function at(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function ut(e){return encodeURIComponent(e)}function ct(e){return ot.call(e)==="[object Date]"||e instanceof Date}function lt(e,t){try{return t(e)}catch{return e}}});var Ct={};Fe(Ct,{ComponentLifeCycle:()=>pe,Memo:()=>et,createBaseElementComponent:()=>v,createElementComponent:()=>X,createFloatingElementComponent:()=>ft,createFocusTrapElementComponent:()=>pt,createFormControlElementComponent:()=>mt,forwardRef:()=>dt,useDOMRect:()=>At,useDispatch:()=>Y,useElementRef:()=>_t,useEventListener:()=>Rt,useIntersectionObserver:()=>vt,useLifeCycle:()=>J,useObservableElementComponent:()=>ht,useWindowEventListener:()=>Z,useWindowSize:()=>St});var fe=T(y(),1);function et(e){return(0,fe.useMemo)(()=>e.children,e.deps??[])}var pe=(r=>(r.CONSTRUCTED="CONSTRUCTED",r.MOUNTED="MOUNTED",r.UNMOUNTED="UNMOUNTED",r))(pe||{});var me=()=>({tc:{log:!0,onCatch:()=>{}},tcp:{log:!0,onCatch:()=>{}}});var tt="abcdefghijklmnopqrstuvwxyz";var G="0123456789",nt="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Dt=G+tt+nt,Lt=G+"abcdef",wt=G+"ABCDEF";var de=/[^a-zA-Z0-9]/g;var O=class{static functions=me()};function Te(e,t=O.functions.tc.log){try{return e()}catch(n){return t&&console.error(n),O.functions.tc.onCatch(n,t),n}}function R(){return typeof window<"u"}function rt(e,t=!1){return e.charAt(0).toUpperCase()+(t?e.slice(1).toLowerCase():e.slice(1))}function ye(e){let t,n;t="",n=!1;for(let r of e){if(de.test(r)){n=!0;continue}if(n){t+=r.toUpperCase(),n=!1;continue}t+=r}return rt(t)}function j(e){return Array.isArray(e)}var V=T(Ae(),1);function _e(e,t){let n;return n=Te(()=>(0,V.parse)(e,t)),n instanceof Error?{}:n}var Re=e=>()=>[...e.entries()].map(([t,n])=>[t,n].join("=")).join(";"),ve=(e,t=_e)=>n=>{let r;if(r=t(n),!(r instanceof Error))for(let o in r){if(n.includes("Expires=Thu, 01 Jan 1970 00:00:00 GMT")){e.delete(o);continue}e.set(o,r[o])}};var z=e=>({clear:()=>e.clear(),getItem:t=>{let n;return n=e.get(t),typeof n>"u"?null:n},key:t=>{let n;return n=[...e.keys()][t],typeof n>"u"?null:n},removeItem:t=>{e.delete(t)},setItem:(t,n)=>{e.set(t,n)},get length(){return e.size}}),Qt=Object.freeze({decode:()=>"",encoding:"",fatal:!1,ignoreBOM:!1}),en=Object.freeze({encode:()=>new Uint8Array,encodeInto:()=>({read:0,written:0}),encoding:""});var Et=new Set(["children","localName","ref","style","className"]),he=new WeakMap,Se=(e,t,n,r,o)=>{let u=o?.[t];u===void 0?(e[t]=n,n==null&&t in HTMLElement.prototype&&e.removeAttribute(t)):n!==r&&((i,s,a)=>{let l=he.get(i);l===void 0&&he.set(i,l=new Map);let p=l.get(s);a!==void 0?p===void 0?(l.set(s,p={handleEvent:a}),i.addEventListener(s,p)):p.handleEvent=a:p!==void 0&&(l.delete(s),i.removeEventListener(s,p))})(e,u,n)},$=({react:e,tagName:t,elementClass:n,events:r,displayName:o})=>{let u=new Set(Object.keys(r??{})),i=e.forwardRef((s,a)=>{let l=e.useRef(new Map),p=e.useRef(null),E={},A={};for(let[f,m]of Object.entries(s))Et.has(f)?E[f==="className"?"class":f]=m:u.has(f)||f in n.prototype?A[f]=m:E[f]=m;return e.useLayoutEffect(()=>{if(p.current===null)return;let f=new Map;for(let m in A)Se(p.current,m,s[m],l.current.get(m),r),l.current.delete(m),f.set(m,s[m]);for(let[m,x]of l.current)Se(p.current,m,void 0,x,r);l.current=f}),e.useLayoutEffect(()=>{p.current?.removeAttribute("defer-hydration")},[]),E.suppressHydrationWarning=!0,e.createElement(t,{...E,ref:e.useCallback(f=>{p.current=f,typeof a=="function"?a(f):a!==null&&(a.current=f)},[a])})});return i.displayName=o??n.name,i};var Oe=T(y(),1);var Ce={onAbort:"abort",onAnimationEnd:"animationend",onAnimationIteration:"animationiteration",onAnimationStart:"animationstart",onAuxClick:"auxclick",onBeforeInput:"beforeinput",onBlur:"blur",onCanPlay:"canplay",onCanPlayThrough:"canplaythrough",onChange:"change",onClick:"click",onCompositionEnd:"compositionend",onCompositionStart:"compositionstart",onCompositionUpdate:"compositionupdate",onContextMenu:"contextmenu",onCopy:"copy",onCut:"cut",onDoubleClick:"doubleclick",onDrag:"drag",onDragEnd:"dragend",onDragEnter:"dragenter",onDragExit:"dragexit",onDragLeave:"dragleave",onDragOver:"dragover",onDragStart:"dragstart",onDrop:"drop",onDurationChange:"durationchange",onEmptied:"emptied",onEncrypted:"encrypted",onEnded:"ended",onError:"error",onEventHandler:"eventhandler",onFocus:"focus",onInput:"input",onInvalid:"invalid",onKeyDown:"keydown",onKeyPress:"keypress",onKeyUp:"keyup",onLoad:"load",onLoadStart:"loadstart",onLoadedData:"loadeddata",onLoadedMetadata:"loadedmetadata",onMouseDown:"mousedown",onMouseEnter:"mouseenter",onMouseLeave:"mouseleave",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPaste:"paste",onPause:"pause",onPlay:"play",onPlaying:"playing",onPointerCancel:"pointercancel",onPointerDown:"pointerdown",onPointerEnter:"pointerenter",onPointerLeave:"pointerleave",onPointerMove:"pointermove",onPointerOut:"pointerout",onPointerOver:"pointerover",onPointerUp:"pointerup",onProgress:"progress",onRateChange:"ratechange",onReset:"reset",onResize:"resize",onScroll:"scroll",onSeeked:"seeked",onSeeking:"seeking",onSelect:"select",onStalled:"stalled",onSubmit:"submit",onSuspend:"suspend",onTimeUpdate:"timeupdate",onTouchCancel:"touchcancel",onTouchEnd:"touchend",onTouchMove:"touchmove",onTouchStart:"touchstart",onTransitionEnd:"transitionend",onVolumeChange:"volumechange",onWaiting:"waiting",onWheel:"wheel"};function X(e,t,n=[]){return $({elementClass:t,events:{...Ce,...n.reduce((r,o)=>({...r,["on"+ye(String(o))]:o}),{})},react:Oe.default,tagName:e})}function v(e,t,n=[]){return X(e,t,["attribute-change","state-change",...n])}function ft(e,t,n){return v(e,t,n)}function pt(e,t,n=[]){return v(e,t,["focus-trap-activate","focus-trap-deactivate","focus-trap-post-activate","focus-trap-post-deactivate",...n])}function mt(e,t,n){return v(e,t,n)}var be=T(y(),1);function dt(...e){return(0,be.forwardRef)(e[0])}var ge=T(y(),1);var L=T(y(),1);function J(){let e=(0,L.useRef)("CONSTRUCTED");return(0,L.useEffect)(()=>(e.current="MOUNTED",()=>{e.current="UNMOUNTED"}),[]),e}function Y(e){let t=J(),n=(0,ge.useReducer)(()=>({}),{});return()=>{switch(t.current){case"CONSTRUCTED":case"UNMOUNTED":break;case"MOUNTED":n[1](),e&&e();break}}}var w=class e{bottom;height;left;right;top;width;x;y;constructor(t,n,r,o){this.bottom=0,this.height=o??0,this.left=0,this.right=0,this.top=0,this.width=r??0,this.x=t??0,this.y=n??0}fromRect(t){return new e(t?.x,t?.y,t?.width,t?.height)}toJSON(){return{bottom:this.bottom,height:this.height,left:this.left,right:this.right,top:this.top,width:this.width,x:this.x,y:this.y}}};var Ne=new Map,Nn={get:Re(Ne),set:ve(Ne)},Tt=new Map,Mn=z(Tt),yt=new Map,Pn=z(yt);var U=T(y(),1);function At(e,t=[]){let[n,r]=(0,U.useState)(new w);return(0,U.useEffect)(()=>{if(e instanceof Element){r(e.getBoundingClientRect());return}e?.current instanceof Element&&r(e.current.getBoundingClientRect())},[e,...t]),n}var Me=T(y(),1);function _t(e,t){return(0,Me.useRef)(R()?document.createElement(e,t):{current:{}})}var Pe=T(y(),1);function Rt(e,t,n,r=[]){(0,Pe.useEffect)(()=>{if(e instanceof Element)return e.addEventListener(t,n),()=>e.removeEventListener(t,n);if(e?.current instanceof Element)return e.current.addEventListener(t,n),()=>e.current?.removeEventListener(t,n)},[e,t,n,...r])}var S=T(y(),1);function vt(e,t,n=[]){let r=(0,S.useRef)(),[o,u]=(0,S.useState)([]),i=(...E)=>{let A=j(E[0])?E[0][0]instanceof Element?E[0]:[]:E[0]instanceof Element?E:[];if(A.length>0)return o.filter(m=>A.includes(m.target));let f=j(E[0])?E[0][0]?.current instanceof Element?E[0]:[]:E[0]?.current instanceof Element?E:[];return f.length>0?o.filter(m=>f.some(x=>x.current===m.target)):o},s=(...E)=>i(...E).some(A=>A.isIntersecting),a=(...E)=>i(...E).every(A=>A.isIntersecting),l=(...E)=>s(...E),p=E=>{u(E)};return(0,S.useEffect)(()=>{r.current=new IntersectionObserver(p,t);for(let E of e){if(E instanceof Element){r.current.observe(E);continue}E?.current instanceof Element&&r.current.observe(E.current)}return()=>r.current?.disconnect()},[...e,t?.root,t?.rootMargin,t?.threshold,...n]),{entries:o,observer:r,areSomeIntersecting:s,isEveryIntersecting:a,isIntersecting:l}}var _=T(y(),1);function ht(e){let t=(0,_.useRef)(null),n=Y(),[r,o]=(0,_.useState)({}),u=(0,_.useCallback)(s=>{s.detail&&(e?.blacklist&&e.blacklist.includes(s.detail.name)||e?.whitelist&&!e.whitelist.includes(s.detail.name)||o(a=>s.detail?{...a,[s.detail.name]:s.detail.value}:a))},[e?.blacklist,e?.whitelist]),i=(0,_.useCallback)(s=>{s.detail&&(e?.blacklist&&e.blacklist.includes(s.detail.name)||e?.whitelist&&!e.whitelist.includes(s.detail.name)||o(a=>s.detail?{...a,[s.detail.name]:s.detail.value}:a))},[e?.blacklist,e?.whitelist]);return(0,_.useEffect)(()=>n(),[t.current]),{element:t.current,onAttributeChange:u,onStateChange:i,properties:r,ref:t}}var De=T(y(),1);function Z(e,t,n=[]){(0,De.useEffect)(()=>(window.addEventListener(e,t),()=>window.removeEventListener(e,t)),[e,t,...n])}var b=T(y(),1);function St(e=[]){let[t,n]=(0,b.useState)(R()?window.innerHeight:0),[r,o]=(0,b.useState)(R()?window.innerWidth:0),[u,i]=(0,b.useState)(R()?window.outerHeight:0),[s,a]=(0,b.useState)(R()?window.outerWidth:0);return Z("resize",()=>{n(window.innerHeight),o(window.innerWidth),i(window.outerHeight),a(window.outerWidth)},e),{innerHeight:t,innerWidth:r,outerHeight:u,outerWidth:s}}return ke(Ct);})();
1
+ "use strict";var AracnaReact=(()=>{var Le=Object.create;var g=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Ue=Object.getOwnPropertyNames;var xe=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Fe=(e,t)=>{for(var n in t)g(e,n,{get:t[n],enumerable:!0})},q=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ue(t))!Ie.call(e,o)&&o!==n&&g(e,o,{get:()=>t[o],enumerable:!(r=we(t,o))||r.enumerable});return e};var y=(e,t,n)=>(n=e!=null?Le(xe(e)):{},q(t||!e||!e.__esModule?g(n,"default",{value:e,enumerable:!0}):n,e)),ke=e=>q(g({},"__esModule",{value:!0}),e);var le=I(c=>{"use strict";var C=Symbol.for("react.element"),Be=Symbol.for("react.portal"),Ke=Symbol.for("react.fragment"),He=Symbol.for("react.strict_mode"),Ge=Symbol.for("react.profiler"),je=Symbol.for("react.provider"),We=Symbol.for("react.context"),Ve=Symbol.for("react.forward_ref"),ze=Symbol.for("react.suspense"),$e=Symbol.for("react.memo"),Xe=Symbol.for("react.lazy"),Q=Symbol.iterator;function Je(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var ne={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},re=Object.assign,oe={};function h(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}h.prototype.isReactComponent={};h.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function se(){}se.prototype=h.prototype;function k(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}var B=k.prototype=new se;B.constructor=k;re(B,h.prototype);B.isPureReactComponent=!0;var ee=Array.isArray,ie=Object.prototype.hasOwnProperty,K={current:null},ae={key:!0,ref:!0,__self:!0,__source:!0};function ue(e,t,n){var r,o={},u=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(u=""+t.key),t)ie.call(t,r)&&!ae.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var a=Array(s),l=0;l<s;l++)a[l]=arguments[l+2];o.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return{$$typeof:C,type:e,key:u,ref:i,props:o,_owner:K.current}}function Ye(e,t){return{$$typeof:C,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function H(e){return typeof e=="object"&&e!==null&&e.$$typeof===C}function Ze(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var te=/\/+/g;function F(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ze(""+e.key):t.toString(36)}function M(e,t,n,r,o){var u=typeof e;(u==="undefined"||u==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(u){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case C:case Be:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+F(i,0):r,ee(o)?(n="",e!=null&&(n=e.replace(te,"$&/")+"/"),M(o,t,n,"",function(l){return l})):o!=null&&(H(o)&&(o=Ye(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(te,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",ee(e))for(var s=0;s<e.length;s++){u=e[s];var a=r+F(u,s);i+=M(u,t,n,a,o)}else if(a=Je(e),typeof a=="function")for(e=a.call(e),s=0;!(u=e.next()).done;)u=u.value,a=r+F(u,s++),i+=M(u,t,n,a,o);else if(u==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function N(e,t,n){if(e==null)return e;var r=[],o=0;return M(e,r,"","",function(u){return t.call(n,u,o++)}),r}function qe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var d={current:null},P={transition:null},Qe={ReactCurrentDispatcher:d,ReactCurrentBatchConfig:P,ReactCurrentOwner:K};function ce(){throw Error("act(...) is not supported in production builds of React.")}c.Children={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(t){return t})||[]},only:function(e){if(!H(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};c.Component=h;c.Fragment=Ke;c.Profiler=Ge;c.PureComponent=k;c.StrictMode=He;c.Suspense=ze;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qe;c.act=ce;c.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=re({},e.props),o=e.key,u=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(u=t.ref,i=K.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)ie.call(t,a)&&!ae.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&s!==void 0?s[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){s=Array(a);for(var l=0;l<a;l++)s[l]=arguments[l+2];r.children=s}return{$$typeof:C,type:e.type,key:o,ref:u,props:r,_owner:i}};c.createContext=function(e){return e={$$typeof:We,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:je,_context:e},e.Consumer=e};c.createElement=ue;c.createFactory=function(e){var t=ue.bind(null,e);return t.type=e,t};c.createRef=function(){return{current:null}};c.forwardRef=function(e){return{$$typeof:Ve,render:e}};c.isValidElement=H;c.lazy=function(e){return{$$typeof:Xe,_payload:{_status:-1,_result:e},_init:qe}};c.memo=function(e,t){return{$$typeof:$e,type:e,compare:t===void 0?null:t}};c.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}};c.unstable_act=ce;c.useCallback=function(e,t){return d.current.useCallback(e,t)};c.useContext=function(e){return d.current.useContext(e)};c.useDebugValue=function(){};c.useDeferredValue=function(e){return d.current.useDeferredValue(e)};c.useEffect=function(e,t){return d.current.useEffect(e,t)};c.useId=function(){return d.current.useId()};c.useImperativeHandle=function(e,t,n){return d.current.useImperativeHandle(e,t,n)};c.useInsertionEffect=function(e,t){return d.current.useInsertionEffect(e,t)};c.useLayoutEffect=function(e,t){return d.current.useLayoutEffect(e,t)};c.useMemo=function(e,t){return d.current.useMemo(e,t)};c.useReducer=function(e,t,n){return d.current.useReducer(e,t,n)};c.useRef=function(e){return d.current.useRef(e)};c.useState=function(e){return d.current.useState(e)};c.useSyncExternalStore=function(e,t,n){return d.current.useSyncExternalStore(e,t,n)};c.useTransition=function(){return d.current.useTransition()};c.version="18.3.1"});var T=I((gt,fe)=>{"use strict";fe.exports=le()});var Ae=I(W=>{"use strict";W.parse=st;W.serialize=it;var ot=Object.prototype.toString,D=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function st(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var n={},r=t||{},o=r.decode||at,u=0;u<e.length;){var i=e.indexOf("=",u);if(i===-1)break;var s=e.indexOf(";",u);if(s===-1)s=e.length;else if(s<i){u=e.lastIndexOf(";",i-1)+1;continue}var a=e.slice(u,i).trim();if(n[a]===void 0){var l=e.slice(i+1,s).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1)),n[a]=lt(l,o)}u=s+1}return n}function it(e,t,n){var r=n||{},o=r.encode||ut;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!D.test(e))throw new TypeError("argument name is invalid");var u=o(t);if(u&&!D.test(u))throw new TypeError("argument val is invalid");var i=e+"="+u;if(r.maxAge!=null){var s=r.maxAge-0;if(isNaN(s)||!isFinite(s))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(s)}if(r.domain){if(!D.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!D.test(r.path))throw new TypeError("option path is invalid");i+="; Path="+r.path}if(r.expires){var a=r.expires;if(!ct(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+a.toUTCString()}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.partitioned&&(i+="; Partitioned"),r.priority){var l=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(l){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var p=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(p){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i}function at(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function ut(e){return encodeURIComponent(e)}function ct(e){return ot.call(e)==="[object Date]"||e instanceof Date}function lt(e,t){try{return t(e)}catch{return e}}});var Ct={};Fe(Ct,{ComponentLifeCycle:()=>pe,Memo:()=>et,createBaseElementComponent:()=>v,createElementComponent:()=>X,createFloatingElementComponent:()=>Et,createFocusTrapElementComponent:()=>pt,createFormControlElementComponent:()=>mt,forwardRef:()=>dt,useDOMRect:()=>At,useDispatch:()=>Y,useElementRef:()=>_t,useEventListener:()=>Rt,useIntersectionObserver:()=>vt,useLifeCycle:()=>J,useObservableElementComponent:()=>ht,useWindowEventListener:()=>Z,useWindowSize:()=>St});var Ee=y(T(),1);function et(e){return(0,Ee.useMemo)(()=>e.children,e.deps??[])}var pe=(r=>(r.CONSTRUCTED="CONSTRUCTED",r.MOUNTED="MOUNTED",r.UNMOUNTED="UNMOUNTED",r))(pe||{});var me=()=>({tc:{log:!0,onCatch:()=>{}},tcp:{log:!0,onCatch:()=>{}}});var tt="abcdefghijklmnopqrstuvwxyz";var G="0123456789",nt="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Dt=G+tt+nt,Lt=G+"abcdef",wt=G+"ABCDEF";var de=/[^a-zA-Z0-9]/g;var O=class{static functions=me()};function ye(e,t=O.functions.tc.log){try{return e()}catch(n){return t&&console.error(n),O.functions.tc.onCatch(n,t),n}}function R(){return typeof window<"u"}function rt(e,t=!1){return e.charAt(0).toUpperCase()+(t?e.slice(1).toLowerCase():e.slice(1))}function Te(e){let t,n;t="",n=!1;for(let r of e){if(de.test(r)){n=!0;continue}if(n){t+=r.toUpperCase(),n=!1;continue}t+=r}return rt(t)}function j(e){return Array.isArray(e)}var V=y(Ae(),1);function _e(e,t){let n;return n=ye(()=>(0,V.parse)(e,t)),n instanceof Error?{}:n}var Re=e=>()=>[...e.entries()].map(([t,n])=>[t,n].join("=")).join(";"),ve=(e,t=_e)=>n=>{let r;if(r=t(n),!(r instanceof Error))for(let o in r){if(n.includes("Expires=Thu, 01 Jan 1970 00:00:00 GMT")){e.delete(o);continue}e.set(o,r[o])}};var z=e=>({clear:()=>e.clear(),getItem:t=>{let n;return n=e.get(t),typeof n>"u"?null:n},key:t=>{let n;return n=[...e.keys()][t],typeof n>"u"?null:n},removeItem:t=>{e.delete(t)},setItem:(t,n)=>{e.set(t,n)},get length(){return e.size}}),Qt=Object.freeze({decode:()=>"",encoding:"",fatal:!1,ignoreBOM:!1}),en=Object.freeze({encode:()=>new Uint8Array,encodeInto:()=>({read:0,written:0}),encoding:""});var ft=new Set(["children","localName","ref","style","className"]),he=new WeakMap,Se=(e,t,n,r,o)=>{let u=o?.[t];u===void 0?(e[t]=n,n==null&&t in HTMLElement.prototype&&e.removeAttribute(t)):n!==r&&((i,s,a)=>{let l=he.get(i);l===void 0&&he.set(i,l=new Map);let p=l.get(s);a!==void 0?p===void 0?(l.set(s,p={handleEvent:a}),i.addEventListener(s,p)):p.handleEvent=a:p!==void 0&&(l.delete(s),i.removeEventListener(s,p))})(e,u,n)},$=({react:e,tagName:t,elementClass:n,events:r,displayName:o})=>{let u=new Set(Object.keys(r??{})),i=e.forwardRef((s,a)=>{let l=e.useRef(new Map),p=e.useRef(null),f={},A={};for(let[E,m]of Object.entries(s))ft.has(E)?f[E==="className"?"class":E]=m:u.has(E)||E in n.prototype?A[E]=m:f[E]=m;return e.useLayoutEffect(()=>{if(p.current===null)return;let E=new Map;for(let m in A)Se(p.current,m,s[m],l.current.get(m),r),l.current.delete(m),E.set(m,s[m]);for(let[m,x]of l.current)Se(p.current,m,void 0,x,r);l.current=E}),e.useLayoutEffect(()=>{p.current?.removeAttribute("defer-hydration")},[]),f.suppressHydrationWarning=!0,e.createElement(t,{...f,ref:e.useCallback(E=>{p.current=E,typeof a=="function"?a(E):a!==null&&(a.current=E)},[a])})});return i.displayName=o??n.name,i};var Oe=y(T(),1);var Ce={onAbort:"abort",onAnimationEnd:"animationend",onAnimationIteration:"animationiteration",onAnimationStart:"animationstart",onAuxClick:"auxclick",onBeforeInput:"beforeinput",onBlur:"blur",onCanPlay:"canplay",onCanPlayThrough:"canplaythrough",onChange:"change",onClick:"click",onCompositionEnd:"compositionend",onCompositionStart:"compositionstart",onCompositionUpdate:"compositionupdate",onContextMenu:"contextmenu",onCopy:"copy",onCut:"cut",onDoubleClick:"doubleclick",onDrag:"drag",onDragEnd:"dragend",onDragEnter:"dragenter",onDragExit:"dragexit",onDragLeave:"dragleave",onDragOver:"dragover",onDragStart:"dragstart",onDrop:"drop",onDurationChange:"durationchange",onEmptied:"emptied",onEncrypted:"encrypted",onEnded:"ended",onError:"error",onEventHandler:"eventhandler",onFocus:"focus",onInput:"input",onInvalid:"invalid",onKeyDown:"keydown",onKeyPress:"keypress",onKeyUp:"keyup",onLoad:"load",onLoadStart:"loadstart",onLoadedData:"loadeddata",onLoadedMetadata:"loadedmetadata",onMouseDown:"mousedown",onMouseEnter:"mouseenter",onMouseLeave:"mouseleave",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPaste:"paste",onPause:"pause",onPlay:"play",onPlaying:"playing",onPointerCancel:"pointercancel",onPointerDown:"pointerdown",onPointerEnter:"pointerenter",onPointerLeave:"pointerleave",onPointerMove:"pointermove",onPointerOut:"pointerout",onPointerOver:"pointerover",onPointerUp:"pointerup",onProgress:"progress",onRateChange:"ratechange",onReset:"reset",onResize:"resize",onScroll:"scroll",onSeeked:"seeked",onSeeking:"seeking",onSelect:"select",onStalled:"stalled",onSubmit:"submit",onSuspend:"suspend",onTimeUpdate:"timeupdate",onTouchCancel:"touchcancel",onTouchEnd:"touchend",onTouchMove:"touchmove",onTouchStart:"touchstart",onTransitionEnd:"transitionend",onVolumeChange:"volumechange",onWaiting:"waiting",onWheel:"wheel"};function X(e,t,n=[]){return $({elementClass:t,events:{...Ce,...n.reduce((r,o)=>({...r,["on"+Te(String(o))]:o}),{})},react:Oe.default,tagName:e})}function v(e,t,n=[]){return X(e,t,["attribute-change","state-change",...n])}function Et(e,t,n){return v(e,t,n)}function pt(e,t,n=[]){return v(e,t,["focus-trap-activate","focus-trap-deactivate","focus-trap-post-activate","focus-trap-post-deactivate",...n])}function mt(e,t,n){return v(e,t,n)}var be=y(T(),1);function dt(...e){return(0,be.forwardRef)(e[0])}var ge=y(T(),1);var L=y(T(),1);function J(){let e=(0,L.useRef)("CONSTRUCTED");return(0,L.useEffect)(()=>(e.current="MOUNTED",()=>{e.current="UNMOUNTED"}),[]),e}function Y(e){let t=J(),n=(0,ge.useReducer)(()=>({}),{});return()=>{switch(t.current){case"CONSTRUCTED":case"UNMOUNTED":break;case"MOUNTED":n[1](),e&&e();break}}}var w=class e{bottom;height;left;right;top;width;x;y;constructor(t,n,r,o){this.bottom=0,this.height=o??0,this.left=0,this.right=0,this.top=0,this.width=r??0,this.x=t??0,this.y=n??0}fromRect(t){return new e(t?.x,t?.y,t?.width,t?.height)}toJSON(){return{bottom:this.bottom,height:this.height,left:this.left,right:this.right,top:this.top,width:this.width,x:this.x,y:this.y}}};var Ne=new Map,On={get:Re(Ne),set:ve(Ne)},yt=new Map,bn=z(yt),Tt=new Map,gn=z(Tt);var U=y(T(),1);function At(e,t=[]){let[n,r]=(0,U.useState)(new w);return(0,U.useEffect)(()=>{if(e instanceof Element){r(e.getBoundingClientRect());return}e?.current instanceof Element&&r(e.current.getBoundingClientRect())},[e,...t]),n}var Me=y(T(),1);function _t(e,t){return(0,Me.useRef)(R()?document.createElement(e,t):{current:{}})}var Pe=y(T(),1);function Rt(e,t,n,r=[]){(0,Pe.useEffect)(()=>{if(e instanceof Element)return e.addEventListener(t,n),()=>e.removeEventListener(t,n);if(e?.current instanceof Element)return e.current.addEventListener(t,n),()=>e.current?.removeEventListener(t,n)},[e,t,n,...r])}var S=y(T(),1);function vt(e,t,n=[]){let r=(0,S.useRef)(),[o,u]=(0,S.useState)([]),i=(...f)=>{let A=j(f[0])?f[0][0]instanceof Element?f[0]:[]:f[0]instanceof Element?f:[];if(A.length>0)return o.filter(m=>A.includes(m.target));let E=j(f[0])?f[0][0]?.current instanceof Element?f[0]:[]:f[0]?.current instanceof Element?f:[];return E.length>0?o.filter(m=>E.some(x=>x.current===m.target)):o},s=(...f)=>i(...f).some(A=>A.isIntersecting),a=(...f)=>i(...f).every(A=>A.isIntersecting),l=(...f)=>s(...f),p=f=>{u(f)};return(0,S.useEffect)(()=>{r.current=new IntersectionObserver(p,t);for(let f of e){if(f instanceof Element){r.current.observe(f);continue}f?.current instanceof Element&&r.current.observe(f.current)}return()=>r.current?.disconnect()},[...e,t?.root,t?.rootMargin,t?.threshold,...n]),{entries:o,observer:r,areSomeIntersecting:s,isEveryIntersecting:a,isIntersecting:l}}var _=y(T(),1);function ht(e){let t=(0,_.useRef)(null),n=Y(),[r,o]=(0,_.useState)({}),u=(0,_.useCallback)(s=>{s.detail&&(e?.blacklist&&e.blacklist.includes(s.detail.name)||e?.whitelist&&!e.whitelist.includes(s.detail.name)||o(a=>s.detail?{...a,[s.detail.name]:s.detail.value}:a))},[e?.blacklist,e?.whitelist]),i=(0,_.useCallback)(s=>{s.detail&&(e?.blacklist&&e.blacklist.includes(s.detail.name)||e?.whitelist&&!e.whitelist.includes(s.detail.name)||o(a=>s.detail?{...a,[s.detail.name]:s.detail.value}:a))},[e?.blacklist,e?.whitelist]);return(0,_.useEffect)(()=>n(),[t.current]),{element:t.current,onAttributeChange:u,onStateChange:i,properties:r,ref:t}}var De=y(T(),1);function Z(e,t,n=[]){(0,De.useEffect)(()=>(window.addEventListener(e,t),()=>window.removeEventListener(e,t)),[e,t,...n])}var b=y(T(),1);function St(e=[]){let[t,n]=(0,b.useState)(R()?window.innerHeight:0),[r,o]=(0,b.useState)(R()?window.innerWidth:0),[u,i]=(0,b.useState)(R()?window.outerHeight:0),[s,a]=(0,b.useState)(R()?window.outerWidth:0);return Z("resize",()=>{n(window.innerHeight),o(window.innerWidth),i(window.outerHeight),a(window.outerWidth)},e),{innerHeight:t,innerWidth:r,outerHeight:u,outerWidth:s}}return ke(Ct);})();
2
2
  /*! Bundled license information:
3
3
 
4
4
  react/cjs/react.production.min.js:
package/package.json CHANGED
@@ -51,7 +51,7 @@
51
51
  "sideEffects": false,
52
52
  "type": "module",
53
53
  "types": "index.d.ts",
54
- "version": "1.0.50",
54
+ "version": "1.0.51",
55
55
  "scripts": {
56
56
  "build": "rm -rf dist && node esbuild.mjs && pnpm tsc && pnpm api-extractor run --local",
57
57
  "prepublish": "pnpm test && pnpm build && pnpm version patch && cp LICENSE package.json README.md dist",