react-loadly 2.3.2 → 2.4.0

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.
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import e,{useMemo as t,useRef as a,useState as r,useEffect as n,cloneElement as l,useCallback as i}from"react";function o(e,t){const a={...e};for(const r in t){const e=t[r];void 0!==e&&(a[r]=e)}return a}function s(e,t="40px"){return void 0===e?t:"number"==typeof e?`${e}px`:e}function d(e){const t={};return Object.entries(e).forEach(([e,a])=>{void 0!==a&&(t[e]=a)}),t}function c(e,t=1){return`${e/Math.max(t,.1)}ms`}function u(e){return`react-loadly-${e}`}function y(){if("undefined"==typeof window||!window.matchMedia)return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch(e){return!1}}function m(e=1,t=!0){if("undefined"!=typeof process&&"test"===process.env.NODE_ENV)return{duration:"0ms",playState:"paused",iterationCount:1};const a=t&&y();return{duration:a?"0ms":c(1e3,e),playState:a?"paused":"running",iterationCount:a?1:"infinite"}}function p(e="normal"){return e}function g(e="ease"){return e}function h(e,t,a="ease",r="normal",n="infinite"){return`${e} ${t} ${a} ${r} ${n}`}function f(e,t,a){return Math.min(Math.max(e,t),a)}function v(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function x(e,t){const a=v(e);return a?`rgba(${a.r}, ${a.g}, ${a.b}, ${f(t,0,1)})`:e}function b(e="loader"){return`${e}-${Math.random().toString(36).substr(2,9)}`}function $(e){if(null!=e)return"number"==typeof e?`${e}px`:"string"==typeof e?e.replace(/[<>'"]/g,""):void 0}function w(...e){return e.flat().filter(e=>"string"==typeof e&&e.trim()).join(" ")}const C=({size:t=8,color:a="var(--react-loadly-color)",opacity:r=1,className:n="",style:l={},animation:i,animationDuration:o,animationDelay:d,glowIntensity:c=0,"data-testid":u,...y})=>{const m=s(t),p={width:m,height:m,borderRadius:"50%",backgroundColor:a,opacity:r,animation:i?`${i} ${o||"1s"} infinite`:void 0,animationDelay:d,display:"inline-block",boxShadow:c>0?`0 0 ${10*c}px ${a}`:void 0,...l};return e.createElement("div",{className:`react-loadly-dot ${n}`.trim(),style:p,"data-testid":u,...y})},E=({width:t=30,height:a=4,color:r="var(--react-loadly-color)",opacity:n=1,borderRadius:l=2,className:i="",style:o={},animation:d,animationDuration:c,animationDelay:u,orientation:y="horizontal","data-testid":m,...p})=>{const g=s(t),h=s(a),f={width:"vertical"===y?h:g,height:"vertical"===y?g:h,backgroundColor:r,opacity:n,borderRadius:$(l),animation:d?`${d} ${c||"1s"} infinite`:void 0,animationDelay:u,display:"inline-block",...o};return e.createElement("div",{className:`react-loadly-line react-loadly-line-${y} ${i}`.trim(),style:f,"data-testid":m,...p})},k=({width:t=20,height:a=20,color:r="var(--react-loadly-color)",borderColor:n,borderWidth:l=0,borderRadius:i=0,opacity:o=1,className:d="",style:c={},animation:u,animationDuration:y,animationDelay:m,"data-testid":p,...g})=>{const h=s(t),f=s(a),v=$(l),x={width:h,height:f,backgroundColor:n?"transparent":r,border:n?`${v} solid ${n}`:void 0,borderRadius:$(i),opacity:o,animation:u?`${u} ${y||"1s"} infinite`:void 0,animationDelay:m,display:"inline-block",...c};return e.createElement("div",{className:`react-loadly-rectangle ${d}`.trim(),style:x,"data-testid":p,...g})},N=({size:t=20,color:a="var(--react-loadly-color)",borderColor:r,borderWidth:n=0,opacity:l=1,className:i="",style:o={},animation:d,animationDuration:c,animationDelay:u,"data-testid":y,...m})=>{const p=s(t),g=$(n),h={width:p,height:p,borderRadius:"50%",backgroundColor:r?"transparent":a,border:r?`${g} solid ${r}`:void 0,opacity:l,animation:d?`${d} ${c||"1s"} infinite`:void 0,animationDelay:u,display:"inline-block",...o};return e.createElement("div",{className:`react-loadly-circle ${i}`.trim(),style:h,"data-testid":y,...m})},I=({count:t=3,dotSize:a=8,color:r="var(--react-loadly-color)",secondaryColor:n,spacing:l=8,speed:i=1,arrangement:o="linear",className:d="",style:u={},animationType:y="wave","data-testid":m,...p})=>{const g=s(l),h=c(1200,i),f=e=>{if("circular"===o){const a=e/t*2*Math.PI,r=parseInt(g);return{position:"absolute",left:"50%",top:"50%",transform:`translate(-50%, -50%) translate(${Math.cos(a)*r}px, ${Math.sin(a)*r}px)`}}return{}},v=e=>.1*e/i+"s",x={...(()=>{switch(o){case"circular":return{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",width:2*(parseInt(s(a))+parseInt(g))+"px",height:2*(parseInt(s(a))+parseInt(g))+"px"};case"grid":return{display:"grid",gridTemplateColumns:`repeat(${Math.ceil(Math.sqrt(t))}, 1fr)`,gap:g};default:return{display:"flex",alignItems:"center",gap:g}}})(),...u};return e.createElement("div",{className:`react-loadly-dot-cluster react-loadly-dot-cluster-${o} ${d}`.trim(),style:x,"data-testid":m,...p},Array.from({length:t},(t,l)=>e.createElement(C,{key:l,size:a,color:n&&l%2==1?n:r,animation:`react-loadly-${y}`,animationDuration:h,animationDelay:v(l),style:f(l),"data-testid":m?`${m}-dot-${l}`:void 0})))},z=({count:t=5,lineWidth:a=4,lineHeight:r=35,color:n="var(--react-loadly-color)",secondaryColor:l,spacing:i=6,speed:o=1,arrangement:d="parallel",orientation:u="vertical",className:y="",style:m={},animationType:p="wave","data-testid":g,...h})=>{const f=s(i),v=c(1e3,o),x=e=>{if("radial"===d){return{position:"absolute",left:"50%",top:"50%",transformOrigin:"center",transform:`translate(-50%, -50%) rotate(${e/t*2*Math.PI}rad)`}}if("staggered"===d){const a=.3+.7*Math.sin(e/t*Math.PI);return{height:"vertical"===u?parseInt(s(r))*a+"px":s(r)}}return{}},b=e=>.1*e/o+"s",$={...(()=>{switch(d){case"radial":return{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",width:1.5*parseInt(s(r))+"px",height:1.5*parseInt(s(r))+"px"};case"staggered":return{display:"flex",alignItems:"flex-end",justifyContent:"center",gap:f};default:return{display:"flex",alignItems:"center",justifyContent:"center",gap:f}}})(),...m};return e.createElement("div",{className:`react-loadly-line-group react-loadly-line-group-${d} ${y}`.trim(),style:$,"data-testid":g,...h},Array.from({length:t},(t,i)=>e.createElement(E,{key:i,width:"horizontal"===u?a:r,height:"horizontal"===u?r:a,color:l&&i%2==1?l:n,orientation:u,animation:`react-loadly-${p}`,animationDuration:v,animationDelay:b(i),style:x(i),"data-testid":g?`${g}-line-${i}`:void 0})))},L=({count:t=4,shapeSize:a=16,color:r="var(--react-loadly-color)",secondaryColor:n,spacing:l=8,speed:i=1,arrangement:o="linear",shapeTypes:d=["circle","rectangle"],className:u="",style:y={},animationType:m="pulse",borderWidth:p=0,"data-testid":g,...h})=>{const f=s(l),v=c(800,i),x=e=>{if("circular"===o){const a=e/t*2*Math.PI,r=2*parseInt(f);return{position:"absolute",left:"50%",top:"50%",transform:`translate(-50%, -50%) translate(${Math.cos(a)*r}px, ${Math.sin(a)*r}px)`}}if("spiral"===o){const a=e/t*4*Math.PI,r=(e+1)*parseInt(f)/2;return{position:"absolute",left:"50%",top:"50%",transform:`translate(-50%, -50%) translate(${Math.cos(a)*r}px, ${Math.sin(a)*r}px)`}}return{}},b=e=>.15*e/i+"s",$={...(()=>{switch(o){case"circular":return{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",width:2.5*(parseInt(s(a))+parseInt(f))+"px",height:2.5*(parseInt(s(a))+parseInt(f))+"px"};case"spiral":return{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",width:3*(parseInt(s(a))+parseInt(f))+"px",height:3*(parseInt(s(a))+parseInt(f))+"px"};default:return{display:"flex",alignItems:"center",gap:f}}})(),...y},w=t=>{const l=(e=>d[e%d.length])(t),i=n&&t%2==1?n:r,o={key:t,color:p>0?void 0:i,borderColor:p>0?i:void 0,borderWidth:p>0?p:void 0,animation:`react-loadly-${m}`,animationDuration:v,animationDelay:b(t),style:x(t),"data-testid":g?`${g}-shape-${t}`:void 0};return"circle"===l?e.createElement(N,{...o,size:a}):e.createElement(k,{...o,width:a,height:a})};return e.createElement("div",{className:`react-loadly-shape-group react-loadly-shape-group-${o} ${u}`.trim(),style:$,"data-testid":g,...h},Array.from({length:t},(e,t)=>w(t)))},M={size:20,color:"var(--react-loadly-color)",speed:1,loading:!0,count:5,"aria-label":"Loading..."},T=a=>{const r=o(M,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},count:p=5,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("bars-loader"),[]),z=s(n),L=m(d);if(!c)return null;const T={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},D={width:"4px",height:z,backgroundColor:l,borderRadius:"2px",animation:`react-loadly-bars ${L.duration} ease-in-out infinite`,animationPlayState:L.playState},j=Array.from({length:p}).map((t,a)=>{const r=.1*a+"s",n=.5+a%3*.25,o=i&&a%2==1?i:l;return e.createElement("div",{key:a,style:{...D,animationDelay:r,height:parseFloat(z)*n+"px",backgroundColor:o},"data-testid":v?`${v}-bar-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-bars",u),style:T,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":v,...N},e.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"4px"}},j),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},D={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,fluidity:1,amplitude:1,"aria-label":"Loading..."},j=a=>{const r=o(D,a),{size:n,color:l,secondaryColor:i,speed:d,loading:u,fluidity:y,amplitude:m,className:p="",style:g={},showText:h,loadingText:f="Loading...","aria-label":v,"data-testid":x,...$}=r,C=t(()=>b("blob-loader"),[]),E=s(n),k=c(2500,d);if(!u)return null;const N={display:"inline-flex",flexDirection:"column",alignItems:"center",...g},I={width:E,height:E,background:`linear-gradient(45deg, ${l}, ${i||l})`,borderRadius:"30% 70% 70% 30% / 30% 30% 70% 70%",animation:`blob-morph ${k} ease-in-out infinite`,filter:"blur(1px)",position:"relative"},z={position:"absolute",top:"20%",left:"20%",width:"60%",height:"60%",background:`radial-gradient(circle, ${i||l}, transparent)`,borderRadius:"40% 60% 60% 40% / 40% 40% 60% 60%",animation:`blob-inner ${k} ease-in-out infinite reverse`,opacity:.7};return e.createElement(e.Fragment,null,e.createElement("style",null,`\n @keyframes blob-morph {\n 0%, 100% {\n border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;\n transform: scale(1) rotate(0deg);\n }\n 25% {\n border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;\n transform: scale(${1+.1*(m??1)}) rotate(90deg);\n }\n 50% {\n border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;\n transform: scale(${1-.05*(m??1)}) rotate(180deg);\n }\n 75% {\n border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;\n transform: scale(${1+.08*(m??1)}) rotate(270deg);\n }\n }\n \n @keyframes blob-inner {\n 0%, 100% {\n border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;\n transform: scale(1) rotate(0deg);\n }\n 33% {\n border-radius: 70% 30% 50% 50% / 30% 70% 30% 70%;\n transform: scale(${1.1+.1*(y??1)}) rotate(-120deg);\n }\n 66% {\n border-radius: 30% 70% 40% 60% / 70% 30% 70% 30%;\n transform: scale(${.9+.05*(y??1)}) rotate(-240deg);\n }\n }\n `),e.createElement("div",{className:w("react-loadly react-loadly-blob",p),style:N,role:"status","aria-label":v,"aria-live":"polite","aria-busy":u,"data-testid":x,...$},e.createElement("div",{style:I,"data-testid":x?`${x}-blob`:void 0},e.createElement("div",{style:z})),h&&e.createElement("div",{className:"react-loadly-text",id:`${C}-text`,"aria-live":"polite"},f),e.createElement("span",{className:"react-loadly-sr-only"},v)))},R={size:15,color:"var(--react-loadly-color)",speed:1,loading:!0,count:3,"aria-label":"Loading..."},S=a=>{const r=o(R,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},count:p=3,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("bounce-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={width:z,height:z,borderRadius:"50%",backgroundColor:l,animation:`react-loadly-bounce ${L.duration} ease-in-out infinite`,animationPlayState:L.playState},D=Array.from({length:p}).map((t,a)=>{const r=.1*a+"s",n=i&&a%2==1?i:l;return e.createElement("div",{key:a,style:{...T,animationDelay:r,backgroundColor:n},"data-testid":v?`${v}-ball-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-bounce",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":v,...N},e.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"8px"}},D),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},W={size:12,color:"var(--react-loadly-color)",speed:1,loading:!0,count:3,"aria-label":"Loading..."},B=a=>{const r=o(W,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},count:p=3,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("dots-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={width:z,height:z,borderRadius:"50%",backgroundColor:l,animation:`react-loadly-dots ${L.duration} ease-in-out infinite`,animationPlayState:L.playState},D=Array.from({length:p}).map((t,a)=>{const r=.2*a+"s",n=i&&a%2==1?i:l;return e.createElement("div",{key:a,style:{...T,animationDelay:r,backgroundColor:n},"data-testid":v?`${v}-dot-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-dots",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":v,...N},e.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"6px"}},D),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},H={size:60,speed:1,loading:!0,animationType:"spin",glowIntensity:.3,"aria-label":"Loading..."},P=t=>{const a=o(H,t),{size:r,width:n,height:l,speed:i=1,loading:s,animationType:d,glowIntensity:u,className:y="",style:m={},color:p="var(--react-loadly-color)","aria-label":g,loadingText:h,showText:f,"data-testid":v,fullscreen:x,screenWidth:b,screenHeight:$,loaderCenter:C,screenBackground:E,children:k,...N}=a;if(!s)return null;const I={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...x&&{position:"fixed",top:0,left:0,width:b||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}},z=n||r,L=l||r,M={width:"number"==typeof z?`${z}px`:z,height:"number"==typeof L?`${L}px`:L,animation:(()=>{switch(d){case"pulse":return`react-loadly-pulse ${c(2e3,i)} infinite`;case"glow":return`react-loadly-glow ${c(2e3,i)} infinite`;case"bounce":return`react-loadly-bounce ${c(2e3,i)} infinite`;case"flip":return`react-loadly-flip ${c(2e3,i)} infinite`;default:return`react-loadly-spin ${c(2e3,i)} infinite`}})(),filter:(u??0)>0?`drop-shadow(0 0 ${20*(u??0)}px ${p})`:void 0,transformStyle:"preserve-3d",willChange:"transform",display:"flex",alignItems:"center",justifyContent:"center",transformOrigin:"center center"};return e.createElement("div",{className:w("react-loadly react-loadly-element-loader",y),style:I,role:"status","aria-label":g,"aria-live":"polite","aria-busy":s,"data-testid":v,...N},e.createElement("div",{style:M,className:"react-loadly-element","data-testid":v?`${v}-element`:void 0},k),f&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite"},h||g),e.createElement("span",{className:"react-loadly-sr-only"},g))},A=({className:t=""})=>e.createElement("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e.createElement("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z"})),F=({className:t=""})=>e.createElement("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e.createElement("path",{fillRule:"evenodd",d:"M9.243 3.03a1 1 0 01.727 1.213L9.53 6h2.94l.56-2.243a1 1 0 111.94.486L14.53 6H16a1 1 0 110 2h-1.97l-1 4H15a1 1 0 110 2h-2.47l-.56 2.242a1 1 0 11-1.94-.485L10.47 14H7.53l-.56 2.242a1 1 0 11-1.94-.485L5.47 14H4a1 1 0 110-2h1.97l1-4H5a1 1 0 110-2h2.47l.56-2.243a1 1 0 011.213-.727zM9.03 8l-1 4h2.94l1-4H9.03z",clipRule:"evenodd"})),q=({className:t=""})=>e.createElement("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z",clipRule:"evenodd"})),Y=({error:t="Something went wrong",onRetry:a,retryLabel:r,showRetry:n=!0,children:l,type:i="error",className:o="",style:s={},fullscreen:d,screenWidth:c,screenHeight:u,loaderCenter:y,screenBackground:m,...p})=>{const g={...s,...d&&{position:"fixed",top:0,left:0,width:c||"100vw",height:u||"100vh",backgroundColor:m||"var(--react-loadly-error-background)",zIndex:9999,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:y?"center":s.justifyContent}};return l?e.createElement("div",{className:`react-loadly-fallback ${o}`.trim(),style:g,...p},l):e.createElement("div",{className:`react-loadly-error ${o}`.trim(),style:g,role:"alert","aria-live":"polite",...p},(()=>{switch(i){case"network":return e.createElement(F,{className:"react-loadly-error-icon"});case"timeout":return e.createElement(q,{className:"react-loadly-error-icon"});default:return e.createElement(A,{className:"react-loadly-error-icon"})}})(),e.createElement("p",{className:"react-loadly-error-message"},(()=>{switch(i){case"network":return t||"Network connection failed. Please check your internet connection.";case"timeout":return t||"Loading timeout. The operation took too long to complete.";default:return t||"Something went wrong. Please try again."}})()),n&&a&&e.createElement("button",{className:"react-loadly-retry-button",onClick:a,type:"button","aria-label":"Retry loading"},r||"Try Again"))},X={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,fluidity:1,amplitude:1,"aria-label":"Loading..."},O=a=>{const r=o(X,a),{size:n,color:l,secondaryColor:i,speed:d,loading:u,amplitude:y,className:m="",style:p={},showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("flow-loader"),[]),z=s(n),L=parseInt(z),M=Math.max(.4*L,10),T=c(1500,d);if(!u)return null;const D={display:"inline-flex",flexDirection:"column",alignItems:"center",...p,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":p.justifyContent}},j={width:z,height:`${M}px`,position:"relative",overflow:"hidden",borderRadius:`${Math.max(.2*L,4)}px`,backgroundColor:"rgba(0, 0, 0, 0.1)"},R=Math.max(Math.floor(L/15),3);return e.createElement(e.Fragment,null,e.createElement("style",null,`\n @keyframes flow-particle-${I} {\n 0% {\n transform: translateX(0) translateY(0) scale(0);\n opacity: 0;\n }\n 10% {\n transform: translateX(${Math.min(.1*L,10)}px) translateY(${Math.sin(.1)*(y??Math.min(5,M/4))}px) scale(1);\n opacity: 0.8;\n }\n 50% {\n transform: translateX(${Math.min(.5*L,.7*L)}px) translateY(${Math.sin(.5)*(y??Math.min(5,M/4))}px) scale(1);\n opacity: 0.8;\n }\n 90% {\n transform: translateX(${Math.min(.9*L,L-10)}px) translateY(${Math.sin(.9)*(y??Math.min(5,M/4))}px) scale(1);\n opacity: 0.8;\n }\n 100% {\n transform: translateX(${L}px) translateY(${Math.sin(1)*(y??Math.min(5,M/4))}px) scale(0);\n opacity: 0;\n }\n }\n `),e.createElement("div",{className:w("react-loadly react-loadly-flow",m),style:D,role:"status","aria-label":f,"aria-live":"polite","aria-busy":u,"data-testid":v,...N},e.createElement("div",{style:j,"data-testid":v?`${v}-container`:void 0},Array.from({length:R},(t,a)=>(t=>{const a=.2*t/(d??1),r=parseFloat(T)+100*t,n=Math.max(L/10,4),o=n+t%3*(n/2);return e.createElement("div",{key:t,style:{position:"absolute",width:`${o}px`,height:`${o}px`,borderRadius:"50%",background:t%2==0?l:i||l,animation:`flow-particle-${I} ${r}ms ease-in-out infinite`,animationDelay:`${a}s`,opacity:.8-.1*t,left:"0px",top:(M-o)/2+t%3*(M/(R+1))+"px"},"data-testid":v?`${v}-particle-${t}`:void 0})})(a))),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f)))},Z={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,count:4,"aria-label":"Loading..."},V=a=>{const r=o(Z,a),{size:n,color:l,secondaryColor:i,speed:d=1,loading:c,count:u,className:y="",style:m={},showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:v,screenWidth:x,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=t(()=>b("grid-loader"),[]),I=t(()=>{const e="number"==typeof n?n:parseInt(s(n)),t=Math.ceil(Math.sqrt(u||4));return Math.max(e/(1.5*t),8)},[n,u]);if(!c)return null;const z={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...v&&{position:"fixed",top:0,left:0,width:x||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}};return e.createElement("div",{className:w("react-loadly react-loadly-grid",y),style:z,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...k},e.createElement("div",{className:"react-loadly-grid-container",style:{display:"grid",gridTemplateColumns:`repeat(${Math.ceil(Math.sqrt(u||4))}, 1fr)`,gap:I/3+"px"},"data-testid":f?`${f}-grid`:void 0},Array.from({length:u||4}).map((t,a)=>e.createElement("div",{key:a,className:"react-loadly-grid-item",style:{width:`${I}px`,height:`${I}px`,backgroundColor:a%2==0?l:i||l,borderRadius:"20%",animation:`react-loadly-scale ${1.2/(d||1)}s ease-in-out infinite`,animationDelay:.1*a/(d||1)+"s"}}))),p&&e.createElement("div",{className:"react-loadly-text",id:`${N}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},U={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,fluidity:1,amplitude:1,"aria-label":"Loading..."},_=a=>{const r=o(U,a),{size:n,color:l,secondaryColor:i,speed:d,loading:u,amplitude:y,className:m="",style:p={},showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("liquid-loader"),[]),z=s(n),L=c(2e3,d);if(!u)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...p,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":p.justifyContent}},T={width:z,height:z,position:"relative",overflow:"hidden",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.1)"},D=50-10*(y??1),j={position:"absolute",bottom:0,left:0,width:"200%",height:"200%",background:`linear-gradient(180deg, ${l} 0%, ${i||l} 100%)`,borderRadius:"40%",animation:`react-loadly-liquid-wave ${L} ease-in-out infinite`,transform:"translate(-25%, 50%) rotate(0deg)",animationTimingFunction:"cubic-bezier(0.36, 0.45, 0.63, 0.53)"},R={...j,background:`linear-gradient(180deg, ${i||l} 0%, ${l} 100%)`,animation:`react-loadly-liquid-wave ${L} ease-in-out infinite reverse`,animationDelay:-.5/(d??1)+"s",opacity:.8};return e.createElement(e.Fragment,null,e.createElement("style",null,`\n @keyframes react-loadly-liquid-wave {\n 0%, 100% {\n transform: translate(-25%, 50%) rotate(0deg);\n }\n 50% {\n transform: translate(-25%, ${D}%) rotate(180deg);\n }\n }\n `),e.createElement("div",{className:w("react-loadly react-loadly-liquid",m),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":u,"data-testid":v,...N},e.createElement("div",{style:T,"data-testid":v?`${v}-container`:void 0},e.createElement("div",{style:j}),e.createElement("div",{style:R})),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f)))},G={size:60,speed:1,loading:!0,animationType:"spin",glowIntensity:.3,"aria-label":"Loading...",alt:"Loading"},J=t=>{const a=o(G,t),{src:r,alt:n,size:l,speed:i,loading:s,animationType:d,glowIntensity:u,className:y="",style:m={},color:p="var(--react-loadly-color)","aria-label":g,loadingText:h,showText:f,"data-testid":v,fullscreen:x,screenWidth:b,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=a;if(!s)return null;const N={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...x&&{position:"fixed",top:0,left:0,width:b||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}},I={width:"number"==typeof l?`${l}px`:l,height:"number"==typeof l?`${l}px`:l,animation:`react-loadly-${d} ${c(2e3,i)} infinite`,filter:(u??0)>0?`drop-shadow(0 0 ${20*(u??0)}px ${p})`:void 0};return e.createElement("div",{className:w("`react-loadly react-loadly-logo-spin",y),style:N,role:"status","aria-label":g,"aria-live":"polite","aria-busy":s,"data-testid":v,...k},e.createElement("img",{src:r,alt:n,style:I,className:"react-loadly-logo","data-testid":v?`${v}-logo`:void 0}),f&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite"},h||g),e.createElement("span",{className:"react-loadly-sr-only"},g))},K={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,count:3,"aria-label":"Loading..."},Q=a=>{const r=o(K,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,count:u,className:y="",style:m={},showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:v,screenWidth:x,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=t(()=>b("pulse-loader"),[]),z=t(()=>{const e="number"==typeof n?n:parseInt(s(n));return Math.max(e/5,6)},[n]);if(!c)return null;const L={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...v&&{position:"fixed",top:0,left:0,width:x||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}};return e.createElement("div",{className:w("react-loadly react-loadly-pulse",y),style:L,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...k},e.createElement(I,{count:u,dotSize:z,color:l,secondaryColor:i,speed:d,arrangement:"linear",animationType:"pulse",spacing:z/2,"data-testid":f?`${f}-dots`:void 0}),p&&e.createElement("div",{className:"react-loadly-text",id:`${N}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},ee={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,borderWidth:4,"aria-label":"Loading..."},te=t=>{const r=o(ee,t),{size:n,color:l,speed:i,loading:d,className:c="",style:u={},borderWidth:y,showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:v,screenWidth:x,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=a(b("ring-loader")),I=s(n),z=m(i);if(!d)return null;const L={display:"inline-flex",flexDirection:"column",alignItems:"center",...u,...v&&{position:"fixed",top:0,left:0,width:x||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":u.justifyContent}},M={position:"relative",width:I,height:I},T={boxSizing:"border-box",display:"block",position:"absolute",width:I,height:I,border:`${y}px solid transparent`,borderTop:`${y}px solid ${l}`,borderBottom:`${y}px solid ${l}`,borderRadius:"50%",animation:`react-loadly-ring ${z.duration} cubic-bezier(0.5, 0, 0.5, 1) infinite`,animationPlayState:z.playState},D=Array.from({length:4}).map((t,a)=>{const r=90*a+"deg",n=-.15*a+"s";return e.createElement("div",{key:a,style:{...T,transform:`rotate(${r})`,animationDelay:n},"data-testid":f?`${f}-segment-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-ring",c),style:L,role:"status","aria-label":h,"aria-live":"polite","aria-busy":d,"data-testid":f,...k},e.createElement("div",{style:M},D),p&&e.createElement("div",{className:"react-loadly-text",id:`${N.current}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},ae={size:15,color:"var(--react-loadly-color)",speed:1,loading:!0,count:2,"aria-label":"Loading..."},re=a=>{const r=o(ae,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},count:p=2,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("rotate-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={position:"relative",width:z,height:z},D={position:"absolute",width:z,height:z,border:"2px solid transparent",borderTopColor:l,borderBottomColor:l,borderRadius:"50%",animation:`react-loadly-ring ${L.duration} cubic-bezier(0.5, 0, 0.5, 1) infinite`,animationPlayState:L.playState,transform:"rotate(0deg)"},j=Array.from({length:p}).map((t,a)=>{const r=1-.2*a,n=2+a,o=-.15*a+"s",s=i&&a%2==1?i:l;return e.createElement("div",{key:a,style:{...D,width:parseFloat(z)*r+"px",height:parseFloat(z)*r+"px",borderWidth:`${n}px`,borderTopColor:s,borderBottomColor:s,animationDuration:parseFloat(L.duration)*(1+.5*a)+"ms",animationDelay:o},"data-testid":v?`${v}-element-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-rotate",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":v,...N},e.createElement("div",{style:T},j),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},ne={size:40,speed:1,loading:!0,lines:1,variant:"card",shimmer:!0,color:"#e2e8f0",highlightColor:"#f1f5f9",shimmerColor:"rgba(255, 255, 255, 0.6)",borderRadius:"4px",spacing:"8px",waveWidth:"200px",waveDirection:"left-to-right","aria-label":"Loading content..."},le=t=>{const a=o(ne,t),{size:r,width:n,height:l,speed:i,loading:d,className:c="",style:u={},lines:y=1,variant:m,borderRadius:p,spacing:g,shimmer:h,color:f,highlightColor:v,shimmerColor:x,waveWidth:b,waveDirection:$,showText:C,loadingText:E="Loading content...","aria-label":k,"data-testid":N,fullscreen:I,screenWidth:z,screenHeight:L,loaderCenter:M,screenBackground:T,...D}=a;if(!d)return null;const j={display:"inline-flex",flexDirection:"column",alignItems:"center",...u,...I&&{position:"fixed",top:0,left:0,width:z||"100vw",height:L||"100vh",backgroundColor:T||"var(--react-loadly-background)",zIndex:9999,justifyContent:M?"center":u.justifyContent}},R=(()=>{switch(m){case"avatar":return{width:n||r||"40px",height:l||r||"40px",borderRadius:p||"50%"};case"card":return{width:n||r||"300px",height:l||r||"200px",borderRadius:p||"8px"};default:return{width:n||r||"100%",height:l||r||"16px",borderRadius:p||"4px"}}})(),S=s(g,"8px"),W=s(b,"200px"),B={...{width:s(R.width),height:s(R.height),backgroundColor:f,borderRadius:s(R.borderRadius),position:"relative",overflow:"hidden"},...h&&{background:`linear-gradient(${"left-to-right"===$?"90deg":"right-to-left"===$?"270deg":"top-to-bottom"===$?"180deg":"0deg"}, ${f} 0%, ${v} 50%, ${f} 100%)`,backgroundSize:`${W} 100%`,animation:`react-loadly-shimmer ${1.5/(i||1)}s ease-in-out infinite`}};return e.createElement("div",{className:w("react-loadly react-loadly-skeleton",c),style:j,role:"status","aria-label":k,"aria-live":"polite","aria-busy":d,"data-testid":N,...D},e.createElement("div",{style:{display:"flex",flexDirection:"column",width:"100%"}},"card"===m?e.createElement("div",{style:B,"data-testid":N?`${N}-skeleton`:void 0},h&&e.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:`linear-gradient(90deg, transparent, ${x}, transparent)`,animation:`react-loadly-shimmer-overlay ${1.5/(i||1)}s ease-in-out infinite`}})):"avatar"===m?e.createElement("div",{style:B,"data-testid":N?`${N}-skeleton`:void 0},h&&e.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:"50%",background:`linear-gradient(90deg, transparent, ${x}, transparent)`,animation:`react-loadly-shimmer-overlay ${1.5/(i||1)}s ease-in-out infinite`}})):Array.from({length:y},(t,a)=>{const r=a===y-1&&y>1?"60%":"100%";return e.createElement("div",{key:a,style:{...B,width:r,marginBottom:a<y-1?S:0},"data-testid":N?`${N}-skeleton-${a}`:void 0},h&&e.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:`linear-gradient(90deg, transparent, ${x}, transparent)`,animation:`react-loadly-shimmer-overlay ${1.5/(i||1)}s ease-in-out infinite`,animationDelay:.1*a+"s"}}))})),C&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite"},E),e.createElement("span",{className:"react-loadly-sr-only"},k))},ie={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,borderWidth:4,"aria-label":"Loading..."},oe=t=>{const r=o(ie,t),{size:n,color:l,speed:i,loading:d,className:c="",style:u={},borderWidth:y,showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:v,screenWidth:x,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=a(b("spin-loader")),I=s(n),z=m(i);if(!d)return null;const L={display:"inline-flex",flexDirection:"column",alignItems:"center",...u,...v&&{position:"fixed",top:0,left:0,width:x||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":u.justifyContent}},M={width:I,height:I,border:`${y}px solid transparent`,borderTop:`${y}px solid ${l}`,borderRadius:"50%",animation:`react-loadly-spin ${z.duration} linear infinite`,animationPlayState:z.playState};return e.createElement("div",{className:w("react-loadly react-loadly-spin",c),style:L,role:"status","aria-label":h,"aria-live":"polite","aria-busy":d,"data-testid":f,...k},e.createElement("div",{style:M,"data-testid":f?`${f}-spinner`:void 0}),p&&e.createElement("div",{className:"react-loadly-text",id:`${N.current}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},se={speed:1,loading:!0,charDelay:100,"aria-label":"Loading...",loop:!0},de=t=>{const l=o(se,t),{loadingText:i="loading...",speed:s=1,loading:d,charDelay:c=100,loop:u,className:y="",style:m={},color:p="var(--react-loadly-text-color)",fontFamily:g,fontWeight:h=500,"aria-label":f,"data-testid":v,fullscreen:x,screenWidth:b,screenHeight:$,loaderCenter:C,screenBackground:E,size:k=18,...N}=l,[I,z]=r(""),[L,M]=r(!1),T=a(null);if(n(()=>{if(T.current&&(clearTimeout(T.current),T.current=null),!d||!i)return void z("");M(!0),z("");const e=(t=0)=>{t<i.length?(z(i.substring(0,t+1)),T.current=setTimeout(()=>e(t+1),c/s)):u?T.current=setTimeout(()=>{z(""),e(0)},2*c):M(!1)};return e(0),()=>{T.current&&clearTimeout(T.current)}},[d,i,c,s,u]),!d)return null;const D={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...x&&{position:"fixed",top:0,left:0,width:b||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}},j={color:p,fontFamily:g,fontWeight:h,fontSize:k,whiteSpace:"pre"};return e.createElement("div",{className:w("react-loadly react-loadly-typing",y),style:D,role:"status","aria-label":f,"aria-live":"polite","aria-busy":d,"data-testid":v,...N},e.createElement("div",{style:j,"data-testid":v?`${v}-text`:void 0},I,e.createElement("span",{className:"react-loadly-typing-cursor",style:{display:L?"inline-block":"none",animation:`react-loadly-blink ${1/s}s step-end infinite`,marginLeft:"2px",verticalAlign:"baseline"}},"|")),e.createElement("span",{className:"react-loadly-sr-only"},f))},ce={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,count:5,"aria-label":"Loading..."},ue=a=>{const r=o(ce,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,count:u,className:y="",style:m={},showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:v,screenWidth:x,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=t(()=>b("wave-loader"),[]),I=t(()=>{const e="number"==typeof n?n:parseInt(s(n));return{width:Math.max(e/10,3),height:e,spacing:Math.max(e/8,4)}},[n]);if(!c)return null;const L={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...v&&{position:"fixed",top:0,left:0,width:x||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}};return e.createElement("div",{className:w("react-loadly react-loadly-wave",y),style:L,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...k},e.createElement(z,{count:u,lineWidth:I.width,lineHeight:I.height,color:l,secondaryColor:i,speed:d,arrangement:"staggered",orientation:"vertical",animationType:"wave",spacing:I.spacing,"data-testid":f?`${f}-lines`:void 0}),p&&e.createElement("div",{className:"react-loadly-text",id:`${N}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},ye={loading:!0,inheritStyles:!1,shimmer:!0,color:"#e2e8f0",highlightColor:"#f1f5f9",shimmerColor:"rgba(255, 255, 255, 0.6)",waveWidthValue:"200px",waveDirection:"left-to-right","aria-label":"Loading content...",speed:1},me=a=>{const r=o(ye,a),{component:n,loading:i,inheritStyles:s,styless:d={},shimmer:c,highlightColor:u,waveWidthValue:y,waveDirection:m,color:p,"aria-label":g,className:h="",style:f={},speed:v,...x}=r,b=e=>{const{type:t,props:a}=e,r="100%",n="16px",l="6px";if("string"==typeof t)switch(t){case"h1":return{width:"100%",height:"2.2em",borderRadius:"6px"};case"h2":return{width:"100%",height:"1.8em",borderRadius:"6px"};case"h3":return{width:"100%",height:"1.6em",borderRadius:"6px"};case"p":case"span":if("string"==typeof a.children){const e=a.children.length;return{width:`${Math.min(100,Math.max(30,.5*e))}%`,height:"1em",borderRadius:"6px"}}return{width:"90%",height:"1em",borderRadius:"6px"};case"img":return{width:a.width||"100%",height:a.height||"200px",borderRadius:a.style?.borderRadius||"8px"};case"button":if("string"==typeof a.children){const e=a.children.length;return{width:`${Math.max(80,8*e)}px`,height:"40px",borderRadius:a.style?.borderRadius||"8px"}}return{width:"120px",height:"40px",borderRadius:"8px"};default:return{width:a.style?.width||r,height:a.style?.height||n,borderRadius:a.style?.borderRadius||l}}return{width:e.props?.style?.width||r,height:e.props?.style?.height||n,borderRadius:e.props?.style?.borderRadius||l}},$=(t,a)=>{const r=!t.display||"inline"!==t.display,n=c?{background:`linear-gradient(${"left-to-right"===m?"90deg":"right-to-left"===m?"270deg":"top-to-bottom"===m?"180deg":"0deg"}, ${p} 0%, ${u} 50%, ${p} 100%)`,backgroundSize:`${y} 100%`,animation:`react-loadly-shimmer ${1.5/(v||1)}s ease-in-out infinite`}:{backgroundColor:p},l={display:r?"block":"inline-block",width:t.width,height:t.height,borderRadius:t.borderRadius,margin:t.margin||"6px 0",...n,position:"relative",overflow:"hidden"};return e.createElement("div",{key:String(a),style:l,"aria-hidden":"true",className:"react-loadly-skeleton-block"})},C=(t,a=0)=>{if(null==t||"string"==typeof t||"number"==typeof t)return null;if(Array.isArray(t))return e.createElement(e.Fragment,null,t.map((e,t)=>C(e,t)));if(t.type===e.Fragment){const r=t;return e.createElement(e.Fragment,{key:a},e.Children.map(r.props.children,(e,t)=>C(e,t)))}const r=t,{type:n,props:l}=r;if("string"==typeof n){if(["div","section","article","header","footer","nav","main","ul","ol","li","figure"].includes(n)){const t=s&&l.style?{...l.style}:{};return e.createElement(n,{key:a,...l,style:t},e.Children.map(l.children,(e,t)=>C(e,t)))}let t={...b(r)};return s&&l.style&&(t={...t,...l.style}),d[n]&&(t={...t,...d[n]}),$(t,`${a}-${n}`)}if("function"==typeof n)try{const t=n(l);if(e.isValidElement(t)||Array.isArray(t))return C(t,a)}catch(o){}if(l&&l.children)return e.createElement(e.Fragment,{key:a},e.Children.map(l.children,(e,t)=>C(e,t)));const i=b(r);return $(i,`${a}-fallback`)},E=t(()=>C(n),[n,d,s,c,u,y,m,p]);if(!i)try{return l(n)}catch{return e.createElement(e.Fragment,null,n)}return e.createElement("div",{className:w("react-loadly react-loadly-auto-skeleton",h),style:{...f,transition:"opacity 0.2s ease-in-out"},role:"status","aria-label":g,"aria-live":"polite","aria-busy":i,...x},E)},pe={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,"aria-label":"Loading...",showText:!1,loadingText:"Loading...",fullscreen:!1};let ge={...pe};function he(){return{...ge}}function fe(e){ge={...ge,...e}}function ve(){ge={...pe}}const xe={progress:null,thickness:4},be=a=>{const r=o(pe,a),{progress:n=1,thickness:l=4,size:i=40,color:d="var(--react-loadly-color)",secondaryColor:c,speed:u=1,loading:y=!0,className:p="",style:g={},showText:h,loadingText:f="Loading...","aria-label":v="Loading...","data-testid":x,fullscreen:b,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=o(xe,r),I=m(u),z=s(i),L=t(()=>{if("number"==typeof i)return i;const e=parseFloat(z);return isNaN(e)?40:e},[i,z]),M=t(()=>(L-l)/2,[L,l]),T=t(()=>2*Math.PI*M,[M]),D=t(()=>{if(null==n)return T;const e=Math.max(0,Math.min(100,n));return T-e/100*T},[n,T]);if(!y)return null;const j={display:"inline-flex",flexDirection:"column",alignItems:"center",...g,...b&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":g.justifyContent}},R={width:z,height:z,transform:"rotate(-90deg)",willChange:"transform"},S={fill:"none",stroke:d,strokeWidth:l,strokeLinecap:"round",transformOrigin:"center",willChange:"transform, opacity"},W={...S,stroke:c||"var(--react-loadly-secondary-color, rgba(0,0,0,0.1))",opacity:.2},B={...S,strokeDasharray:T,strokeDashoffset:D||0,transition:null!==n?"stroke-dashoffset 0.3s ease":void 0,animationPlayState:I.playState};return e.createElement("div",{className:w("react-loadly react-loadly-progress-ring",p),style:j,role:"status","aria-label":v,"aria-live":"polite","aria-busy":y,"aria-valuemin":null!==n?0:void 0,"aria-valuemax":null!==n?100:void 0,"aria-valuenow":null!==n?n:void 0,"data-testid":x,...N},e.createElement("svg",{style:R,viewBox:`0 0 ${L} ${L}`,"data-testid":x?`${x}-svg`:void 0,className:"react-loadly-progress-ring-svg"},e.createElement("circle",{cx:L/2,cy:L/2,r:M,style:W,"data-testid":x?`${x}-background-circle`:void 0,className:"react-loadly-progress-ring-background"}),e.createElement("circle",{cx:L/2,cy:L/2,r:M,style:B,"data-testid":x?`${x}-progress-circle`:void 0,className:"react-loadly-progress-ring-progress"})),h&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite","data-testid":x?`${x}-text`:void 0},f),e.createElement("span",{className:"react-loadly-sr-only"},v))},$e={variant:"blob",speed:1},we=a=>{const r=o(pe,a),{variant:n="blob",speed:l=1,size:i=40,color:d="var(--react-loadly-color)",loading:c=!0,className:u="",style:y={},showText:p,loadingText:g="Loading...","aria-label":h="Loading...","data-testid":f,fullscreen:v,screenWidth:x,screenHeight:b,loaderCenter:$,screenBackground:C,...E}=o($e,r),k=m(l),N=s(i),I=t(()=>{const e="number"==typeof i?i:parseInt(s(i)),t=e/2,a=e/2-4;switch(n){case"soft":return`M ${t},${t-a} \n C ${t+.8*a},${t-a} ${t+a},${t-.8*a} ${t+a},${t}\n C ${t+a},${t+.8*a} ${t+.8*a},${t+a} ${t},${t+a}\n C ${t-.8*a},${t+a} ${t-a},${t+.8*a} ${t-a},${t}\n C ${t-a},${t-.8*a} ${t-.8*a},${t-a} ${t},${t-a}\n Z`;case"sharp":return`M ${t},${t-a} \n L ${t+.7*a},${t-.7*a}\n L ${t+a},${t}\n L ${t+.7*a},${t+.7*a}\n L ${t},${t+a}\n L ${t-.7*a},${t+.7*a}\n L ${t-a},${t}\n L ${t-.7*a},${t-.7*a}\n Z`;default:return`M ${t},${t-a} \n C ${t+.5*a},${t-a} ${t+a},${t-.5*a} ${t+a},${t}\n C ${t+a},${t+.5*a} ${t+.5*a},${t+a} ${t},${t+a}\n C ${t-.5*a},${t+a} ${t-a},${t+.5*a} ${t-a},${t}\n C ${t-a},${t-.5*a} ${t-.5*a},${t-a} ${t},${t-a}\n Z`}},[n,i]);if(!c)return null;const z={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:x||"100vw",height:b||"100vh",backgroundColor:C||"var(--react-loadly-background)",zIndex:9999,justifyContent:$?"center":y.justifyContent}},L={width:N,height:N,willChange:"transform"},M={transformOrigin:"center",willChange:"transform",animation:`react-loadly-morph ${k.duration} ease-in-out infinite`,animationPlayState:k.playState};return e.createElement("div",{className:w("react-loadly react-loadly-morph",u),style:z,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...E},e.createElement("svg",{style:L,viewBox:`0 0 ${N} ${N}`,"data-testid":f?`${f}-svg`:void 0},e.createElement("path",{d:I,fill:d,style:M,"data-testid":f?`${f}-shape`:void 0})),p&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite","data-testid":f?`${f}-text`:void 0},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},Ce={dots:3,gap:8},Ee=a=>{const r=o(pe,a),{dots:n=3,gap:l=8,size:i=40,color:d="var(--react-loadly-color)",speed:c=1,loading:u=!0,className:y="",style:p={},showText:g,loadingText:h="Loading...","aria-label":f="Loading...","data-testid":v,fullscreen:x,screenWidth:b,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=o(Ce,r),N=m(c),I=s(i),z=t(()=>{const e="number"==typeof i?i:parseInt(s(i));return Math.max((e-(n-1)*l)/n,4)},[i,n,l]),L=t(()=>Array.from({length:n}).map((t,a)=>{const r=a/n*2*Math.PI,l=(parseInt(I)-z)/2,i=l*Math.cos(r),o=l*Math.sin(r),s={position:"absolute",width:`${z}px`,height:`${z}px`,backgroundColor:d,borderRadius:"50%",willChange:"transform, opacity",transform:"translateZ(0)",left:`calc(50% + ${i}px - ${z/2}px)`,top:`calc(50% + ${o}px - ${z/2}px)`,animation:`react-loadly-dots ${N.duration} ease-in-out infinite`,animationDelay:.2*a/c+"s",animationPlayState:N.playState};return e.createElement("div",{key:a,style:s,"data-testid":v?`${v}-dot-${a}`:void 0})}),[n,I,z,d,N,c,v]);if(!u)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...p,...x&&{position:"fixed",top:0,left:0,width:b||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":p.justifyContent}},T={position:"relative",width:I,height:I,willChange:"transform"};return e.createElement("div",{className:w("react-loadly react-loadly-spin-dots",y),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":u,"data-testid":v,...k},e.createElement("div",{style:T,"data-testid":v?`${v}-spinner`:void 0},L),g&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite","data-testid":v?`${v}-text`:void 0},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},ke={rows:3,cols:5},Ne=a=>{const r=o(pe,a),{rows:n=3,cols:l=5,size:i=40,color:d="var(--react-loadly-color)",speed:c=1,loading:u=!0,className:y="",style:p={},showText:g,loadingText:h="Loading...","aria-label":f="Loading...","data-testid":v,fullscreen:x,screenWidth:b,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=o(ke,r),N=m(c),I=s(i),z=t(()=>{const e="number"==typeof i?i:parseInt(s(i));return Math.max(e/l-2,8)},[i,l]),L=t(()=>{const e="number"==typeof i?i:parseInt(s(i));return Math.max(e/n-2,8)},[i,n]),M=t(()=>Array.from({length:n*l}).map((t,a)=>{const r=Math.floor(a/l),n=a%l,i={width:`${z}px`,height:`${L}px`,backgroundColor:d,margin:"1px",opacity:.3,willChange:"opacity",animation:`react-loadly-pulse ${N.duration} ease-in-out infinite`,animationDelay:.1*(r+n)/c+"s",animationPlayState:N.playState};return e.createElement("div",{key:a,style:i,"data-testid":v?`${v}-cell-${a}`:void 0})}),[n,l,z,L,d,N,c,v]);if(!u)return null;const T={display:"inline-flex",flexDirection:"column",alignItems:"center",...p,...x&&{position:"fixed",top:0,left:0,width:b||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":p.justifyContent}},D={display:"grid",gridTemplateColumns:`repeat(${l}, 1fr)`,gap:"2px",width:I,height:I,willChange:"transform"};return e.createElement("div",{className:w("react-loadly react-loadly-heatmap",y),style:T,role:"status","aria-label":f,"aria-live":"polite","aria-busy":u,"data-testid":v,...k},e.createElement("div",{style:D,"data-testid":v?`${v}-grid`:void 0},M),g&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite","data-testid":v?`${v}-text`:void 0},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},Ie={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,count:4,"aria-label":"Loading..."},ze=a=>{const r=o(Ie,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},count:p=4,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("squares-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={display:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",gap:"6px",width:parseFloat(z)*Math.ceil(Math.sqrt(p))+"px",height:parseFloat(z)*Math.ceil(Math.sqrt(p))+"px"},D={width:z,height:z,backgroundColor:l,borderRadius:"8px",animation:`react-loadly-squares-rotate ${L.duration} ease-in-out infinite`,animationPlayState:L.playState},j=Array.from({length:p}).map((t,a)=>{const r=.15*a+"s",n=.7+a%3*.15,o=i&&a%2==1?i:l;return e.createElement("div",{key:a,style:{...D,animationDelay:r,backgroundColor:o,transform:`scale(${n})`},"data-testid":v?`${v}-square-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-squares",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":v,...N},e.createElement("div",{style:T},j),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},Le={size:50,color:"var(--react-loadly-color)",speed:1,loading:!0,count:3,"aria-label":"Loading..."},Me=a=>{const r=o(Le,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},count:p=3,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,borderWidth:N=2,...I}=r,z=t(()=>b("ripple-loader"),[]),L=s(n),M=m(d);if(!c)return null;const T={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},D={position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",width:L,height:L},j={position:"absolute",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:l,zIndex:10},R=Array.from({length:p}).map((t,a)=>{const r=.2*a+"s",n=i&&a%2==1?i:l;return e.createElement("div",{key:a,style:{position:"absolute",width:L,height:L,border:`${N}px solid ${n}`,borderRadius:"50%",animation:`react-loadly-ripple ${M.duration} ease-out infinite`,animationDelay:r,animationPlayState:M.playState},"data-testid":v?`${v}-ripple-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-ripple",u),style:T,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":v,...I},e.createElement("div",{style:D},e.createElement("div",{style:j}),R),g&&e.createElement("div",{className:"react-loadly-text",id:`${z}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},Te={size:35,color:"var(--react-loadly-color)",speed:1,loading:!0,count:5,"aria-label":"Loading..."},De=a=>{const r=o(Te,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},count:p=5,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("stair-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T=parseFloat(z),D=.57*T,j=.23*T,R=.17*T,S={display:"flex",flexDirection:"column",alignItems:"flex-end",gap:`${.11*T}px`},W=Array.from({length:p}).map((t,a)=>{const r=.1*a+"s",n=`${D+a*j}px`,o=i&&a%2==1?i:l;return e.createElement("div",{key:a,style:{width:n,height:`${R}px`,backgroundColor:o,borderRadius:"4px",animation:`react-loadly-stair-cascade ${L.duration} ease-in-out infinite`,animationDelay:r,animationPlayState:L.playState},"data-testid":v?`${v}-step-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-stair",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":v,...N},e.createElement("div",{style:S},W),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},je={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,count:3,"aria-label":"Loading..."},Re=a=>{const r=o(je,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},count:p=3,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("orbit-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",width:z,height:z},D={position:"absolute",width:"10px",height:"10px",borderRadius:"50%",backgroundColor:l,zIndex:10,boxShadow:`0 0 8px ${l}`},j=Array.from({length:p}).map((t,a)=>{const r=.25*parseFloat(z),n=8+2*a,o=i&&a%2==1?i:l,s=360/p*a;return e.createElement("div",{key:a,style:{position:"absolute",width:2*r+"px",height:2*r+"px",top:`calc(50% - ${r}px)`,left:`calc(50% - ${r}px)`,animation:`react-loadly-spin ${L.duration} linear infinite`,animationDelay:.2*a+"s",animationPlayState:L.playState,transform:`rotate(${s}deg)`},"data-testid":v?`${v}-orbit-${a}`:void 0},e.createElement("div",{style:{position:"absolute",width:`${n}px`,height:`${n}px`,borderRadius:"50%",backgroundColor:o,top:0,left:"50%",marginLeft:`-${n/2}px`,boxShadow:`0 0 6px ${o}`}}))});return e.createElement("div",{className:w("react-loadly react-loadly-orbit",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":v,...N},e.createElement("div",{style:T},e.createElement("div",{style:D}),j),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},Se={size:50,color:"var(--react-loadly-color)",speed:1,loading:!0,"aria-label":"Loading..."},We=a=>{const r=o(Se,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:v,screenWidth:x,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=t(()=>b("plane-loader"),[]),I=s(n),z=m(d);if(!c)return null;const L={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:x||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":y.justifyContent}},M={perspective:"200px",display:"inline-flex",justifyContent:"center",alignItems:"center",width:I,height:I},T={width:I,height:I,position:"relative",transformStyle:"preserve-3d",animation:`react-loadly-plane-rotate ${z.duration} ease-in-out infinite`,animationPlayState:z.playState},D={position:"absolute",width:"100%",height:"100%",borderRadius:"8px",border:`2px solid ${l}`,backgroundColor:i||"transparent"};return e.createElement("div",{className:w("react-loadly react-loadly-plane",u),style:L,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...k},e.createElement("div",{style:M},e.createElement("div",{style:T},e.createElement("div",{style:{...D,transform:"rotateY(0deg) translateZ(10px)"}}),e.createElement("div",{style:{...D,transform:"rotateY(180deg) translateZ(10px)"}}),e.createElement("div",{style:{...D,transform:"rotateY(90deg) translateZ(10px)"}}),e.createElement("div",{style:{...D,transform:"rotateY(-90deg) translateZ(10px)"}}),e.createElement("div",{style:{...D,transform:"rotateX(90deg) translateZ(10px)"}}),e.createElement("div",{style:{...D,transform:"rotateX(-90deg) translateZ(10px)"}}))),p&&e.createElement("div",{className:"react-loadly-text",id:`${N}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},Be={size:50,color:"var(--react-loadly-color)",speed:1,loading:!0,"aria-label":"Loading..."},He=a=>{const r=o(Be,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:v,screenWidth:x,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=t(()=>b("hashtag-loader"),[]),I=s(n),z=m(d),L=parseFloat(I),M=Math.max(L/10,3),T=t(()=>{const e=.8*L;return[{d:`M ${e/3} 0 L ${e/3} ${e}`,dashArray:e,dashOffset:2*e},{d:`M 0 ${e/3} L ${e} ${e/3}`,dashArray:e,dashOffset:2*e},{d:`M ${2*e/3} 0 L ${2*e/3} ${e}`,dashArray:e,dashOffset:2*e},{d:`M 0 ${2*e/3} L ${e} ${2*e/3}`,dashArray:e,dashOffset:2*e}]},[L]);if(!c)return null;const D={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:x||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":y.justifyContent}},j={position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",width:I,height:I};return e.createElement(e.Fragment,null,e.createElement("style",null,`\n @keyframes react-loadly-hashtag-draw-${N} {\n 0% {\n stroke-dashoffset: ${2*L}px;\n opacity: 0;\n }\n 10% {\n opacity: 1;\n }\n 90% {\n opacity: 1;\n }\n 100% {\n stroke-dashoffset: 0;\n opacity: 0.7;\n }\n }\n `),e.createElement("div",{className:w("react-loadly react-loadly-hashtag",u),style:D,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...k},e.createElement("div",{style:j},e.createElement("svg",{width:L,height:L,viewBox:`0 0 ${L} ${L}`},T.map((t,a)=>e.createElement("path",{key:a,d:t.d,stroke:i&&a%2==1?i:l,strokeWidth:M,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",style:{strokeDasharray:t.dashArray,strokeDashoffset:t.dashOffset,animation:`react-loadly-hashtag-draw-${N} ${z.duration} ease-in-out infinite`,animationDelay:.2*a+"s",animationPlayState:z.playState},"data-testid":f?`${f}-path-${a}`:void 0})))),p&&e.createElement("div",{className:"react-loadly-text",id:`${N}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h)))},Pe={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,count:6,"aria-label":"Loading..."},Ae=a=>{const r=o(Pe,a),{size:n,color:l,secondaryColor:i,speed:d,loading:c,className:u="",style:y={},count:p=6,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":v,fullscreen:x,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("snake-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",width:z,height:z},D=.15*parseFloat(z),j=.7*parseFloat(z),R=Array.from({length:p}).map((t,a)=>{const r=.1*a/(d??1),n=i&&a%2==1?i:l;return e.createElement("div",{key:a,style:{position:"absolute",width:`${D}px`,height:`${D}px`,borderRadius:"50%",backgroundColor:n,boxShadow:`0 0 ${D/2}px ${n}`,left:"50%",top:"50%",animation:`react-loadly-snake-slither-${I} ${L.duration} ease-in-out infinite`,animationDelay:`${r}s`,animationPlayState:L.playState,transform:"translate(-50%, -50%)"},"data-testid":v?`${v}-segment-${a}`:void 0})});return e.createElement(e.Fragment,null,e.createElement("style",null,`\n @keyframes react-loadly-snake-slither-${I} {\n 0% {\n transform: translate(-50%, -50%) translateX(${-j}px) translateY(${20*Math.sin(0*Math.PI*4)}px);\n opacity: 0.3;\n }\n 25% {\n transform: translate(-50%, -50%) translateX(${.5*-j}px) translateY(${20*Math.sin(.25*Math.PI*4)}px);\n opacity: 0.7;\n }\n 50% {\n transform: translate(-50%, -50%) translateX(0px) translateY(${20*Math.sin(.5*Math.PI*4)}px);\n opacity: 1;\n }\n 75% {\n transform: translate(-50%, -50%) translateX(${.5*j}px) translateY(${20*Math.sin(.75*Math.PI*4)}px);\n opacity: 0.7;\n }\n 100% {\n transform: translate(-50%, -50%) translateX(${j}px) translateY(${20*Math.sin(1*Math.PI*4)}px);\n opacity: 0.3;\n }\n }\n `),e.createElement("div",{className:w("react-loadly react-loadly-snake",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":v,...N},e.createElement("div",{style:T},R),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f)))},Fe=(e={})=>{const{initialLoading:t=!1,timeout:l,maxRetries:o=3,onLoadingChange:s,onError:d,onProgress:c}=e,[u,y]=r({isLoading:t,progress:0,error:null,retryCount:0}),m=a(null),p=a(null);n(()=>()=>{m.current&&clearTimeout(m.current),p.current&&clearTimeout(p.current)},[]),n(()=>(u.isLoading&&l?m.current=setTimeout(()=>{y(e=>({...e,isLoading:!1,error:"Loading timeout exceeded"})),d?.("Loading timeout exceeded")},l):m.current&&clearTimeout(m.current),()=>{m.current&&clearTimeout(m.current)}),[u.isLoading,l,d]),n(()=>{s?.(u.isLoading)},[u.isLoading,s]),n(()=>{void 0!==u.progress&&c?.(u.progress)},[u.progress,c]);const g=i(e=>{y(t=>({...t,isLoading:e,error:e?null:t.error,progress:e?0:t.progress}))},[]),h=i(e=>{const t=Math.min(Math.max(e,0),100);y(e=>({...e,progress:t,isLoading:!(t>=100)&&e.isLoading}))},[]),f=i(e=>{y(t=>({...t,error:e,isLoading:!1})),e&&d?.(e)},[d]),v=i(()=>{y(e=>{const t=(e.retryCount||0)+1;return t>o?(d?.("Maximum retry attempts exceeded"),{...e,error:"Maximum retry attempts exceeded",isLoading:!1}):{...e,retryCount:t,isLoading:!0,error:null,progress:0}});const e=Math.min(1e3*Math.pow(2,u.retryCount||0),3e4);p.current=setTimeout(()=>{y(e=>({...e,isLoading:!0}))},e)},[u.retryCount,o,d]),x=i(()=>{y({isLoading:!1,progress:0,error:null,retryCount:0}),m.current&&clearTimeout(m.current),p.current&&clearTimeout(p.current)},[]);return{state:u,setLoading:g,setProgress:h,setError:f,retry:v,reset:x}},qe=(e,t={})=>e.reduce((e,a)=>(e[a]=Fe(t),e),{}),Ye=(e,t=[],a={})=>{const l=Fe(a),[o,s]=r(null),d=i(async()=>{try{l.setLoading(!0),l.setError(null);const t=await e();return s(t),l.setProgress(100),t}catch(t){const e=t instanceof Error?t.message:"Unknown error occurred";return l.setError(e),null}},[e,l]);return n(()=>{d()},t),{...l,data:o,execute:d}};export{me as AutoSkeletonLoader,T as BarsLoader,j as BlobLoader,S as BounceLoader,N as Circle,C as Dot,I as DotCluster,B as DotsLoader,P as ElementLoader,Y as FallbackLoader,O as FlowLoader,V as GridLoader,He as HashtagLoader,Ne as HeatmapLoader,pe as LIB_DEFAULTS,E as Line,z as LineGroup,_ as LiquidLoader,J as LogoSpinLoader,we as MorphLoader,Re as OrbitLoader,We as PlaneLoader,be as ProgressRingLoader,Q as PulseLoader,k as Rectangle,te as RingLoader,Me as RippleLoader,re as RotateLoader,L as ShapeGroup,le as SkeletonLoader,Ae as SnakeLoader,Ee as SpinDotsLoader,oe as SpinLoader,ze as SquaresLoader,De as StairLoader,de as TypingLoader,ue as WaveLoader,f as clamp,w as classNameGen,u as createAnimationName,h as createAnimationString,d as generateCSSVariables,b as generateId,p as getAnimationDirection,c as getAnimationDuration,g as getAnimationEasing,he as getGlobalDefaults,m as getOptimizedAnimationSettings,s as getSizeValue,v as hexToRgb,o as mergeProps,y as prefersReducedMotion,ve as resetGlobalDefaults,x as rgba,$ as sanitizeCSSValue,fe as setGlobalDefaults,Ye as useAsyncLoader,Fe as useLoaderState,qe as useMultipleLoaderStates};
1
+ import e,{useMemo as t,useRef as a,useState as r,useEffect as n,cloneElement as i,useCallback as l}from"react";function o(e,t){const a={...e};for(const r in t){const e=t[r];void 0!==e&&(a[r]=e)}return a}function s(e,t="40px"){return void 0===e?t:"number"==typeof e?`${e}px`:e}function d(e){const t={};return Object.entries(e).forEach(([e,a])=>{void 0!==a&&(t[e]=a)}),t}function c(e,t=1){return`${e/Math.max(t,.1)}ms`}function u(e){return`react-loadly-${e}`}function y(){if("undefined"==typeof window||!window.matchMedia)return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch(e){return!1}}function m(e=1,t=!0){if("undefined"!=typeof process&&"test"===process.env.NODE_ENV)return{duration:"0ms",playState:"paused",iterationCount:1};const a=t&&y();return{duration:a?"0ms":c(1e3,e),playState:a?"paused":"running",iterationCount:a?1:"infinite"}}function p(e="normal"){return e}function g(e="ease"){return e}function h(e,t,a="ease",r="normal",n="infinite"){return`${e} ${t} ${a} ${r} ${n}`}function f(e,t,a){return Math.min(Math.max(e,t),a)}function x(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function v(e,t){const a=x(e);return a?`rgba(${a.r}, ${a.g}, ${a.b}, ${f(t,0,1)})`:e}function b(e="loader"){return`${e}-${Math.random().toString(36).substr(2,9)}`}function $(e){if(null!=e)return"number"==typeof e?`${e}px`:"string"==typeof e?e.replace(/[<>'"]/g,""):void 0}function w(...e){return e.flat().filter(e=>"string"==typeof e&&e.trim()).join(" ")}const C=({size:t=8,color:a="var(--react-loadly-color)",opacity:r=1,className:n="",style:i={},animation:l,animationDuration:o,animationDelay:d,glowIntensity:c=0,"data-testid":u,...y})=>{const m=s(t),p={width:m,height:m,borderRadius:"50%",backgroundColor:a,opacity:r,animation:l?`${l} ${o||"1s"} infinite`:void 0,animationDelay:d,display:"inline-block",boxShadow:c>0?`0 0 ${10*c}px ${a}`:void 0,...i};return e.createElement("div",{className:`react-loadly-dot ${n}`.trim(),style:p,"data-testid":u,...y})},E=({width:t=30,height:a=4,color:r="var(--react-loadly-color)",opacity:n=1,borderRadius:i=2,className:l="",style:o={},animation:d,animationDuration:c,animationDelay:u,orientation:y="horizontal","data-testid":m,...p})=>{const g=s(t),h=s(a),f={width:"vertical"===y?h:g,height:"vertical"===y?g:h,backgroundColor:r,opacity:n,borderRadius:$(i),animation:d?`${d} ${c||"1s"} infinite`:void 0,animationDelay:u,display:"inline-block",...o};return e.createElement("div",{className:`react-loadly-line react-loadly-line-${y} ${l}`.trim(),style:f,"data-testid":m,...p})},k=({width:t=20,height:a=20,color:r="var(--react-loadly-color)",borderColor:n,borderWidth:i=0,borderRadius:l=0,opacity:o=1,className:d="",style:c={},animation:u,animationDuration:y,animationDelay:m,"data-testid":p,...g})=>{const h=s(t),f=s(a),x=$(i),v={width:h,height:f,backgroundColor:n?"transparent":r,border:n?`${x} solid ${n}`:void 0,borderRadius:$(l),opacity:o,animation:u?`${u} ${y||"1s"} infinite`:void 0,animationDelay:m,display:"inline-block",...c};return e.createElement("div",{className:`react-loadly-rectangle ${d}`.trim(),style:v,"data-testid":p,...g})},N=({size:t=20,color:a="var(--react-loadly-color)",borderColor:r,borderWidth:n=0,opacity:i=1,className:l="",style:o={},animation:d,animationDuration:c,animationDelay:u,"data-testid":y,...m})=>{const p=s(t),g=$(n),h={width:p,height:p,borderRadius:"50%",backgroundColor:r?"transparent":a,border:r?`${g} solid ${r}`:void 0,opacity:i,animation:d?`${d} ${c||"1s"} infinite`:void 0,animationDelay:u,display:"inline-block",...o};return e.createElement("div",{className:`react-loadly-circle ${l}`.trim(),style:h,"data-testid":y,...m})},I=({count:t=3,dotSize:a=8,color:r="var(--react-loadly-color)",secondaryColor:n,spacing:i=8,speed:l=1,arrangement:o="linear",className:d="",style:u={},animationType:y="wave","data-testid":m,...p})=>{const g=s(i),h=c(1200,l),f=e=>{if("circular"===o){const a=e/t*2*Math.PI,r=parseInt(g);return{position:"absolute",left:"50%",top:"50%",transform:`translate(-50%, -50%) translate(${Math.cos(a)*r}px, ${Math.sin(a)*r}px)`}}return{}},x=e=>.1*e/l+"s",v={...(()=>{switch(o){case"circular":return{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",width:2*(parseInt(s(a))+parseInt(g))+"px",height:2*(parseInt(s(a))+parseInt(g))+"px"};case"grid":return{display:"grid",gridTemplateColumns:`repeat(${Math.ceil(Math.sqrt(t))}, 1fr)`,gap:g};default:return{display:"flex",alignItems:"center",gap:g}}})(),...u};return e.createElement("div",{className:`react-loadly-dot-cluster react-loadly-dot-cluster-${o} ${d}`.trim(),style:v,"data-testid":m,...p},Array.from({length:t},(t,i)=>e.createElement(C,{key:i,size:a,color:n&&i%2==1?n:r,animation:`react-loadly-${y}`,animationDuration:h,animationDelay:x(i),style:f(i),"data-testid":m?`${m}-dot-${i}`:void 0})))},z=({count:t=5,lineWidth:a=4,lineHeight:r=35,color:n="var(--react-loadly-color)",secondaryColor:i,spacing:l=6,speed:o=1,arrangement:d="parallel",orientation:u="vertical",className:y="",style:m={},animationType:p="wave","data-testid":g,...h})=>{const f=s(l),x=c(1e3,o),v=e=>{if("radial"===d){return{position:"absolute",left:"50%",top:"50%",transformOrigin:"center",transform:`translate(-50%, -50%) rotate(${e/t*2*Math.PI}rad)`}}if("staggered"===d){const a=.3+.7*Math.sin(e/t*Math.PI);return{height:"vertical"===u?parseInt(s(r))*a+"px":s(r)}}return{}},b=e=>.1*e/o+"s",$={...(()=>{switch(d){case"radial":return{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",width:1.5*parseInt(s(r))+"px",height:1.5*parseInt(s(r))+"px"};case"staggered":return{display:"flex",alignItems:"flex-end",justifyContent:"center",gap:f};default:return{display:"flex",alignItems:"center",justifyContent:"center",gap:f}}})(),...m};return e.createElement("div",{className:`react-loadly-line-group react-loadly-line-group-${d} ${y}`.trim(),style:$,"data-testid":g,...h},Array.from({length:t},(t,l)=>e.createElement(E,{key:l,width:"horizontal"===u?a:r,height:"horizontal"===u?r:a,color:i&&l%2==1?i:n,orientation:u,animation:`react-loadly-${p}`,animationDuration:x,animationDelay:b(l),style:v(l),"data-testid":g?`${g}-line-${l}`:void 0})))},L=({count:t=4,shapeSize:a=16,color:r="var(--react-loadly-color)",secondaryColor:n,spacing:i=8,speed:l=1,arrangement:o="linear",shapeTypes:d=["circle","rectangle"],className:u="",style:y={},animationType:m="pulse",borderWidth:p=0,"data-testid":g,...h})=>{const f=s(i),x=c(800,l),v=e=>{if("circular"===o){const a=e/t*2*Math.PI,r=2*parseInt(f);return{position:"absolute",left:"50%",top:"50%",transform:`translate(-50%, -50%) translate(${Math.cos(a)*r}px, ${Math.sin(a)*r}px)`}}if("spiral"===o){const a=e/t*4*Math.PI,r=(e+1)*parseInt(f)/2;return{position:"absolute",left:"50%",top:"50%",transform:`translate(-50%, -50%) translate(${Math.cos(a)*r}px, ${Math.sin(a)*r}px)`}}return{}},b=e=>.15*e/l+"s",$={...(()=>{switch(o){case"circular":return{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",width:2.5*(parseInt(s(a))+parseInt(f))+"px",height:2.5*(parseInt(s(a))+parseInt(f))+"px"};case"spiral":return{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",width:3*(parseInt(s(a))+parseInt(f))+"px",height:3*(parseInt(s(a))+parseInt(f))+"px"};default:return{display:"flex",alignItems:"center",gap:f}}})(),...y},w=t=>{const i=(e=>d[e%d.length])(t),l=n&&t%2==1?n:r,o={key:t,color:p>0?void 0:l,borderColor:p>0?l:void 0,borderWidth:p>0?p:void 0,animation:`react-loadly-${m}`,animationDuration:x,animationDelay:b(t),style:v(t),"data-testid":g?`${g}-shape-${t}`:void 0};return"circle"===i?e.createElement(N,{...o,size:a}):e.createElement(k,{...o,width:a,height:a})};return e.createElement("div",{className:`react-loadly-shape-group react-loadly-shape-group-${o} ${u}`.trim(),style:$,"data-testid":g,...h},Array.from({length:t},(e,t)=>w(t)))},M={size:20,color:"var(--react-loadly-color)",speed:1,loading:!0,count:5,"aria-label":"Loading..."},T=a=>{const r=o(M,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},count:p=5,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("bars-loader"),[]),z=s(n),L=m(d);if(!c)return null;const T={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},j={width:"4px",height:z,backgroundColor:i,borderRadius:"2px",animation:`react-loadly-bars ${L.duration} ease-in-out infinite`,animationPlayState:L.playState},D=Array.from({length:p}).map((t,a)=>{const r=.1*a+"s",n=.5+a%3*.25,o=l&&a%2==1?l:i;return e.createElement("div",{key:a,style:{...j,animationDelay:r,height:parseFloat(z)*n+"px",backgroundColor:o},"data-testid":x?`${x}-bar-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-bars",u),style:T,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":x,...N},e.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"4px"}},D),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},j={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,fluidity:1,amplitude:1,"aria-label":"Loading..."},D=a=>{const r=o(j,a),{size:n,color:i,secondaryColor:l,speed:d,loading:u,fluidity:y,amplitude:m,className:p="",style:g={},showText:h,loadingText:f="Loading...","aria-label":x,"data-testid":v,...$}=r,C=t(()=>b("blob-loader"),[]),E=s(n),k=c(2500,d);if(!u)return null;const N={display:"inline-flex",flexDirection:"column",alignItems:"center",...g},I={width:E,height:E,background:`linear-gradient(45deg, ${i}, ${l||i})`,borderRadius:"30% 70% 70% 30% / 30% 30% 70% 70%",animation:`blob-morph ${k} ease-in-out infinite`,filter:"blur(1px)",position:"relative"},z={position:"absolute",top:"20%",left:"20%",width:"60%",height:"60%",background:`radial-gradient(circle, ${l||i}, transparent)`,borderRadius:"40% 60% 60% 40% / 40% 40% 60% 60%",animation:`blob-inner ${k} ease-in-out infinite reverse`,opacity:.7};return e.createElement(e.Fragment,null,e.createElement("style",null,`\n @keyframes blob-morph {\n 0%, 100% {\n border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;\n transform: scale(1) rotate(0deg);\n }\n 25% {\n border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;\n transform: scale(${1+.1*(m??1)}) rotate(90deg);\n }\n 50% {\n border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;\n transform: scale(${1-.05*(m??1)}) rotate(180deg);\n }\n 75% {\n border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;\n transform: scale(${1+.08*(m??1)}) rotate(270deg);\n }\n }\n \n @keyframes blob-inner {\n 0%, 100% {\n border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;\n transform: scale(1) rotate(0deg);\n }\n 33% {\n border-radius: 70% 30% 50% 50% / 30% 70% 30% 70%;\n transform: scale(${1.1+.1*(y??1)}) rotate(-120deg);\n }\n 66% {\n border-radius: 30% 70% 40% 60% / 70% 30% 70% 30%;\n transform: scale(${.9+.05*(y??1)}) rotate(-240deg);\n }\n }\n `),e.createElement("div",{className:w("react-loadly react-loadly-blob",p),style:N,role:"status","aria-label":x,"aria-live":"polite","aria-busy":u,"data-testid":v,...$},e.createElement("div",{style:I,"data-testid":v?`${v}-blob`:void 0},e.createElement("div",{style:z})),h&&e.createElement("div",{className:"react-loadly-text",id:`${C}-text`,"aria-live":"polite"},f),e.createElement("span",{className:"react-loadly-sr-only"},x)))},R={size:15,color:"var(--react-loadly-color)",speed:1,loading:!0,count:3,"aria-label":"Loading..."},S=a=>{const r=o(R,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},count:p=3,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("bounce-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={width:z,height:z,borderRadius:"50%",backgroundColor:i,animation:`react-loadly-bounce ${L.duration} ease-in-out infinite`,animationPlayState:L.playState},j=Array.from({length:p}).map((t,a)=>{const r=.1*a+"s",n=l&&a%2==1?l:i;return e.createElement("div",{key:a,style:{...T,animationDelay:r,backgroundColor:n},"data-testid":x?`${x}-ball-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-bounce",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":x,...N},e.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"8px"}},j),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},W={size:12,color:"var(--react-loadly-color)",speed:1,loading:!0,count:3,"aria-label":"Loading..."},B=a=>{const r=o(W,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},count:p=3,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("dots-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={width:z,height:z,borderRadius:"50%",backgroundColor:i,animation:`react-loadly-dots ${L.duration} ease-in-out infinite`,animationPlayState:L.playState},j=Array.from({length:p}).map((t,a)=>{const r=.2*a+"s",n=l&&a%2==1?l:i;return e.createElement("div",{key:a,style:{...T,animationDelay:r,backgroundColor:n},"data-testid":x?`${x}-dot-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-dots",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":x,...N},e.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"6px"}},j),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},H={size:60,speed:1,loading:!0,animationType:"spin",glowIntensity:.3,"aria-label":"Loading..."},P=t=>{const a=o(H,t),{size:r,width:n,height:i,speed:l=1,loading:s,animationType:d,glowIntensity:u,className:y="",style:m={},color:p="var(--react-loadly-color)","aria-label":g,loadingText:h,showText:f,"data-testid":x,fullscreen:v,screenWidth:b,screenHeight:$,loaderCenter:C,screenBackground:E,children:k,...N}=a;if(!s)return null;const I={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...v&&{position:"fixed",top:0,left:0,width:b||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}},z=n||r,L=i||r,M={width:"number"==typeof z?`${z}px`:z,height:"number"==typeof L?`${L}px`:L,animation:(()=>{switch(d){case"pulse":return`react-loadly-pulse ${c(2e3,l)} infinite`;case"glow":return`react-loadly-glow ${c(2e3,l)} infinite`;case"bounce":return`react-loadly-bounce ${c(2e3,l)} infinite`;case"flip":return`react-loadly-flip ${c(2e3,l)} infinite`;default:return`react-loadly-spin ${c(2e3,l)} infinite`}})(),filter:(u??0)>0?`drop-shadow(0 0 ${20*(u??0)}px ${p})`:void 0,transformStyle:"preserve-3d",willChange:"transform",display:"flex",alignItems:"center",justifyContent:"center",transformOrigin:"center center"};return e.createElement("div",{className:w("react-loadly react-loadly-element-loader",y),style:I,role:"status","aria-label":g,"aria-live":"polite","aria-busy":s,"data-testid":x,...N},e.createElement("div",{style:M,className:"react-loadly-element","data-testid":x?`${x}-element`:void 0},k),f&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite"},h||g),e.createElement("span",{className:"react-loadly-sr-only"},g))},A=({className:t=""})=>e.createElement("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e.createElement("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z"})),F=({className:t=""})=>e.createElement("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e.createElement("path",{fillRule:"evenodd",d:"M9.243 3.03a1 1 0 01.727 1.213L9.53 6h2.94l.56-2.243a1 1 0 111.94.486L14.53 6H16a1 1 0 110 2h-1.97l-1 4H15a1 1 0 110 2h-2.47l-.56 2.242a1 1 0 11-1.94-.485L10.47 14H7.53l-.56 2.242a1 1 0 11-1.94-.485L5.47 14H4a1 1 0 110-2h1.97l1-4H5a1 1 0 110-2h2.47l.56-2.243a1 1 0 011.213-.727zM9.03 8l-1 4h2.94l1-4H9.03z",clipRule:"evenodd"})),q=({className:t=""})=>e.createElement("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z",clipRule:"evenodd"})),Y=({error:t="Something went wrong",onRetry:a,retryLabel:r,showRetry:n=!0,children:i,type:l="error",className:o="",style:s={},fullscreen:d,screenWidth:c,screenHeight:u,loaderCenter:y,screenBackground:m,...p})=>{const g={...s,...d&&{position:"fixed",top:0,left:0,width:c||"100vw",height:u||"100vh",backgroundColor:m||"var(--react-loadly-error-background)",zIndex:9999,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:y?"center":s.justifyContent}};return i?e.createElement("div",{className:`react-loadly-fallback ${o}`.trim(),style:g,...p},i):e.createElement("div",{className:`react-loadly-error ${o}`.trim(),style:g,role:"alert","aria-live":"polite",...p},(()=>{switch(l){case"network":return e.createElement(F,{className:"react-loadly-error-icon"});case"timeout":return e.createElement(q,{className:"react-loadly-error-icon"});default:return e.createElement(A,{className:"react-loadly-error-icon"})}})(),e.createElement("p",{className:"react-loadly-error-message"},(()=>{switch(l){case"network":return t||"Network connection failed. Please check your internet connection.";case"timeout":return t||"Loading timeout. The operation took too long to complete.";default:return t||"Something went wrong. Please try again."}})()),n&&a&&e.createElement("button",{className:"react-loadly-retry-button",onClick:a,type:"button","aria-label":"Retry loading"},r||"Try Again"))},X={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,fluidity:1,amplitude:1,"aria-label":"Loading..."},O=a=>{const r=o(X,a),{size:n,color:i,secondaryColor:l,speed:d,loading:u,amplitude:y,className:m="",style:p={},showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("flow-loader"),[]),z=s(n),L=parseInt(z),M=Math.max(.4*L,10),T=c(1500,d);if(!u)return null;const j={display:"inline-flex",flexDirection:"column",alignItems:"center",...p,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":p.justifyContent}},D={width:z,height:`${M}px`,position:"relative",overflow:"hidden",borderRadius:`${Math.max(.2*L,4)}px`,backgroundColor:"rgba(0, 0, 0, 0.1)"},R=Math.max(Math.floor(L/15),3);return e.createElement(e.Fragment,null,e.createElement("style",null,`\n @keyframes flow-particle-${I} {\n 0% {\n transform: translateX(0) translateY(0) scale(0);\n opacity: 0;\n }\n 10% {\n transform: translateX(${Math.min(.1*L,10)}px) translateY(${Math.sin(.1)*(y??Math.min(5,M/4))}px) scale(1);\n opacity: 0.8;\n }\n 50% {\n transform: translateX(${Math.min(.5*L,.7*L)}px) translateY(${Math.sin(.5)*(y??Math.min(5,M/4))}px) scale(1);\n opacity: 0.8;\n }\n 90% {\n transform: translateX(${Math.min(.9*L,L-10)}px) translateY(${Math.sin(.9)*(y??Math.min(5,M/4))}px) scale(1);\n opacity: 0.8;\n }\n 100% {\n transform: translateX(${L}px) translateY(${Math.sin(1)*(y??Math.min(5,M/4))}px) scale(0);\n opacity: 0;\n }\n }\n `),e.createElement("div",{className:w("react-loadly react-loadly-flow",m),style:j,role:"status","aria-label":f,"aria-live":"polite","aria-busy":u,"data-testid":x,...N},e.createElement("div",{style:D,"data-testid":x?`${x}-container`:void 0},Array.from({length:R},(t,a)=>(t=>{const a=.2*t/(d??1),r=parseFloat(T)+100*t,n=Math.max(L/10,4),o=n+t%3*(n/2);return e.createElement("div",{key:t,style:{position:"absolute",width:`${o}px`,height:`${o}px`,borderRadius:"50%",background:t%2==0?i:l||i,animation:`flow-particle-${I} ${r}ms ease-in-out infinite`,animationDelay:`${a}s`,opacity:.8-.1*t,left:"0px",top:(M-o)/2+t%3*(M/(R+1))+"px"},"data-testid":x?`${x}-particle-${t}`:void 0})})(a))),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f)))},Z={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,count:4,"aria-label":"Loading..."},V=a=>{const r=o(Z,a),{size:n,color:i,secondaryColor:l,speed:d=1,loading:c,count:u,className:y="",style:m={},showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:x,screenWidth:v,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=t(()=>b("grid-loader"),[]),I=t(()=>{const e="number"==typeof n?n:parseInt(s(n)),t=Math.ceil(Math.sqrt(u||4));return Math.max(e/(1.5*t),8)},[n,u]);if(!c)return null;const z={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...x&&{position:"fixed",top:0,left:0,width:v||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}};return e.createElement("div",{className:w("react-loadly react-loadly-grid",y),style:z,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...k},e.createElement("div",{className:"react-loadly-grid-container",style:{display:"grid",gridTemplateColumns:`repeat(${Math.ceil(Math.sqrt(u||4))}, 1fr)`,gap:I/3+"px"},"data-testid":f?`${f}-grid`:void 0},Array.from({length:u||4}).map((t,a)=>e.createElement("div",{key:a,className:"react-loadly-grid-item",style:{width:`${I}px`,height:`${I}px`,backgroundColor:a%2==0?i:l||i,borderRadius:"20%",animation:`react-loadly-scale ${1.2/(d||1)}s ease-in-out infinite`,animationDelay:.1*a/(d||1)+"s"}}))),p&&e.createElement("div",{className:"react-loadly-text",id:`${N}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},U={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,fluidity:1,amplitude:1,"aria-label":"Loading..."},_=a=>{const r=o(U,a),{size:n,color:i,secondaryColor:l,speed:d,loading:u,amplitude:y,className:m="",style:p={},showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("liquid-loader"),[]),z=s(n),L=c(2e3,d);if(!u)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...p,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":p.justifyContent}},T={width:z,height:z,position:"relative",overflow:"hidden",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.1)"},j=50-10*(y??1),D={position:"absolute",bottom:0,left:0,width:"200%",height:"200%",background:`linear-gradient(180deg, ${i} 0%, ${l||i} 100%)`,borderRadius:"40%",animation:`react-loadly-liquid-wave ${L} ease-in-out infinite`,transform:"translate(-25%, 50%) rotate(0deg)",animationTimingFunction:"cubic-bezier(0.36, 0.45, 0.63, 0.53)"},R={...D,background:`linear-gradient(180deg, ${l||i} 0%, ${i} 100%)`,animation:`react-loadly-liquid-wave ${L} ease-in-out infinite reverse`,animationDelay:-.5/(d??1)+"s",opacity:.8};return e.createElement(e.Fragment,null,e.createElement("style",null,`\n @keyframes react-loadly-liquid-wave {\n 0%, 100% {\n transform: translate(-25%, 50%) rotate(0deg);\n }\n 50% {\n transform: translate(-25%, ${j}%) rotate(180deg);\n }\n }\n `),e.createElement("div",{className:w("react-loadly react-loadly-liquid",m),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":u,"data-testid":x,...N},e.createElement("div",{style:T,"data-testid":x?`${x}-container`:void 0},e.createElement("div",{style:D}),e.createElement("div",{style:R})),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f)))},G={size:60,speed:1,loading:!0,animationType:"spin",glowIntensity:.3,"aria-label":"Loading...",alt:"Loading"},J=t=>{const a=o(G,t),{src:r,alt:n,size:i,speed:l,loading:s,animationType:d,glowIntensity:u,className:y="",style:m={},color:p="var(--react-loadly-color)","aria-label":g,loadingText:h,showText:f,"data-testid":x,fullscreen:v,screenWidth:b,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=a;if(!s)return null;const N={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...v&&{position:"fixed",top:0,left:0,width:b||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}},I={width:"number"==typeof i?`${i}px`:i,height:"number"==typeof i?`${i}px`:i,animation:`react-loadly-${d} ${c(2e3,l)} infinite`,filter:(u??0)>0?`drop-shadow(0 0 ${20*(u??0)}px ${p})`:void 0};return e.createElement("div",{className:w("`react-loadly react-loadly-logo-spin",y),style:N,role:"status","aria-label":g,"aria-live":"polite","aria-busy":s,"data-testid":x,...k},e.createElement("img",{src:r,alt:n,style:I,className:"react-loadly-logo","data-testid":x?`${x}-logo`:void 0}),f&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite"},h||g),e.createElement("span",{className:"react-loadly-sr-only"},g))},K={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,count:3,"aria-label":"Loading..."},Q=a=>{const r=o(K,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,count:u,className:y="",style:m={},showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:x,screenWidth:v,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=t(()=>b("pulse-loader"),[]),z=t(()=>{const e="number"==typeof n?n:parseInt(s(n));return Math.max(e/5,6)},[n]);if(!c)return null;const L={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...x&&{position:"fixed",top:0,left:0,width:v||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}};return e.createElement("div",{className:w("react-loadly react-loadly-pulse",y),style:L,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...k},e.createElement(I,{count:u,dotSize:z,color:i,secondaryColor:l,speed:d,arrangement:"linear",animationType:"pulse",spacing:z/2,"data-testid":f?`${f}-dots`:void 0}),p&&e.createElement("div",{className:"react-loadly-text",id:`${N}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},ee={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,borderWidth:4,"aria-label":"Loading..."},te=t=>{const r=o(ee,t),{size:n,color:i,speed:l,loading:d,className:c="",style:u={},borderWidth:y,showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:x,screenWidth:v,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=a(b("ring-loader")),I=s(n),z=m(l);if(!d)return null;const L={display:"inline-flex",flexDirection:"column",alignItems:"center",...u,...x&&{position:"fixed",top:0,left:0,width:v||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":u.justifyContent}},M={position:"relative",width:I,height:I},T={boxSizing:"border-box",display:"block",position:"absolute",width:I,height:I,border:`${y}px solid transparent`,borderTop:`${y}px solid ${i}`,borderBottom:`${y}px solid ${i}`,borderRadius:"50%",animation:`react-loadly-ring ${z.duration} cubic-bezier(0.5, 0, 0.5, 1) infinite`,animationPlayState:z.playState},j=Array.from({length:4}).map((t,a)=>{const r=90*a+"deg",n=-.15*a+"s";return e.createElement("div",{key:a,style:{...T,transform:`rotate(${r})`,animationDelay:n},"data-testid":f?`${f}-segment-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-ring",c),style:L,role:"status","aria-label":h,"aria-live":"polite","aria-busy":d,"data-testid":f,...k},e.createElement("div",{style:M},j),p&&e.createElement("div",{className:"react-loadly-text",id:`${N.current}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},ae={size:15,color:"var(--react-loadly-color)",speed:1,loading:!0,count:2,"aria-label":"Loading..."},re=a=>{const r=o(ae,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},count:p=2,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("rotate-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={position:"relative",width:z,height:z},j={position:"absolute",width:z,height:z,border:"2px solid transparent",borderTopColor:i,borderBottomColor:i,borderRadius:"50%",animation:`react-loadly-ring ${L.duration} cubic-bezier(0.5, 0, 0.5, 1) infinite`,animationPlayState:L.playState,transform:"rotate(0deg)"},D=Array.from({length:p}).map((t,a)=>{const r=1-.2*a,n=2+a,o=-.15*a+"s",s=l&&a%2==1?l:i;return e.createElement("div",{key:a,style:{...j,width:parseFloat(z)*r+"px",height:parseFloat(z)*r+"px",borderWidth:`${n}px`,borderTopColor:s,borderBottomColor:s,animationDuration:parseFloat(L.duration)*(1+.5*a)+"ms",animationDelay:o},"data-testid":x?`${x}-element-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-rotate",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":x,...N},e.createElement("div",{style:T},D),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},ne={size:40,speed:1,loading:!0,lines:1,variant:"card",shimmer:!0,color:"#e2e8f0",highlightColor:"#f1f5f9",shimmerColor:"rgba(255, 255, 255, 0.6)",borderRadius:"4px",spacing:"8px",waveWidth:"200px",waveDirection:"left-to-right","aria-label":"Loading content..."},ie=t=>{const a=o(ne,t),{size:r,width:n,height:i,speed:l,loading:d,className:c="",style:u={},lines:y=1,variant:m,borderRadius:p,spacing:g,shimmer:h,color:f,highlightColor:x,shimmerColor:v,waveWidth:b,waveDirection:$,showText:C,loadingText:E="Loading content...","aria-label":k,"data-testid":N,fullscreen:I,screenWidth:z,screenHeight:L,loaderCenter:M,screenBackground:T,...j}=a;if(!d)return null;const D={display:"inline-flex",flexDirection:"column",alignItems:"center",...u,...I&&{position:"fixed",top:0,left:0,width:z||"100vw",height:L||"100vh",backgroundColor:T||"var(--react-loadly-background)",zIndex:9999,justifyContent:M?"center":u.justifyContent}},R=(()=>{switch(m){case"avatar":return{width:n||r||"40px",height:i||r||"40px",borderRadius:p||"50%"};case"card":return{width:n||r||"300px",height:i||r||"200px",borderRadius:p||"8px"};default:return{width:n||r||"100%",height:i||r||"16px",borderRadius:p||"4px"}}})(),S=s(g,"8px"),W=s(b,"200px"),B={...{width:s(R.width),height:s(R.height),backgroundColor:f,borderRadius:s(R.borderRadius),position:"relative",overflow:"hidden"},...h&&{background:`linear-gradient(${"left-to-right"===$?"90deg":"right-to-left"===$?"270deg":"top-to-bottom"===$?"180deg":"0deg"}, ${f} 0%, ${x} 50%, ${f} 100%)`,backgroundSize:`${W} 100%`,animation:`react-loadly-shimmer ${1.5/(l||1)}s ease-in-out infinite`}};return e.createElement("div",{className:w("react-loadly react-loadly-skeleton",c),style:D,role:"status","aria-label":k,"aria-live":"polite","aria-busy":d,"data-testid":N,...j},e.createElement("div",{style:{display:"flex",flexDirection:"column",width:"100%"}},"card"===m?e.createElement("div",{style:B,"data-testid":N?`${N}-skeleton`:void 0},h&&e.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:`linear-gradient(90deg, transparent, ${v}, transparent)`,animation:`react-loadly-shimmer-overlay ${1.5/(l||1)}s ease-in-out infinite`}})):"avatar"===m?e.createElement("div",{style:B,"data-testid":N?`${N}-skeleton`:void 0},h&&e.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:"50%",background:`linear-gradient(90deg, transparent, ${v}, transparent)`,animation:`react-loadly-shimmer-overlay ${1.5/(l||1)}s ease-in-out infinite`}})):Array.from({length:y},(t,a)=>{const r=a===y-1&&y>1?"60%":"100%";return e.createElement("div",{key:a,style:{...B,width:r,marginBottom:a<y-1?S:0},"data-testid":N?`${N}-skeleton-${a}`:void 0},h&&e.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:`linear-gradient(90deg, transparent, ${v}, transparent)`,animation:`react-loadly-shimmer-overlay ${1.5/(l||1)}s ease-in-out infinite`,animationDelay:.1*a+"s"}}))})),C&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite"},E),e.createElement("span",{className:"react-loadly-sr-only"},k))},le={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,borderWidth:4,"aria-label":"Loading..."},oe=t=>{const r=o(le,t),{size:n,color:i,speed:l,loading:d,className:c="",style:u={},borderWidth:y,showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:x,screenWidth:v,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=a(b("spin-loader")),I=s(n),z=m(l);if(!d)return null;const L={display:"inline-flex",flexDirection:"column",alignItems:"center",...u,...x&&{position:"fixed",top:0,left:0,width:v||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":u.justifyContent}},M={width:I,height:I,border:`${y}px solid transparent`,borderTop:`${y}px solid ${i}`,borderRadius:"50%",animation:`react-loadly-spin ${z.duration} linear infinite`,animationPlayState:z.playState};return e.createElement("div",{className:w("react-loadly react-loadly-spin",c),style:L,role:"status","aria-label":h,"aria-live":"polite","aria-busy":d,"data-testid":f,...k},e.createElement("div",{style:M,"data-testid":f?`${f}-spinner`:void 0}),p&&e.createElement("div",{className:"react-loadly-text",id:`${N.current}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},se={speed:1,loading:!0,charDelay:100,"aria-label":"Loading...",loop:!0},de=t=>{const i=o(se,t),{loadingText:l="loading...",speed:s=1,loading:d,charDelay:c=100,loop:u,className:y="",style:m={},color:p="var(--react-loadly-text-color)",fontFamily:g,fontWeight:h=500,"aria-label":f,"data-testid":x,fullscreen:v,screenWidth:b,screenHeight:$,loaderCenter:C,screenBackground:E,size:k=18,...N}=i,[I,z]=r(""),[L,M]=r(!1),T=a(null);if(n(()=>{if(T.current&&(clearTimeout(T.current),T.current=null),!d||!l)return void z("");M(!0),z("");const e=(t=0)=>{t<l.length?(z(l.substring(0,t+1)),T.current=setTimeout(()=>e(t+1),c/s)):u?T.current=setTimeout(()=>{z(""),e(0)},2*c):M(!1)};return e(0),()=>{T.current&&clearTimeout(T.current)}},[d,l,c,s,u]),!d)return null;const j={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...v&&{position:"fixed",top:0,left:0,width:b||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}},D={color:p,fontFamily:g,fontWeight:h,fontSize:k,whiteSpace:"pre"};return e.createElement("div",{className:w("react-loadly react-loadly-typing",y),style:j,role:"status","aria-label":f,"aria-live":"polite","aria-busy":d,"data-testid":x,...N},e.createElement("div",{style:D,"data-testid":x?`${x}-text`:void 0},I,e.createElement("span",{className:"react-loadly-typing-cursor",style:{display:L?"inline-block":"none",animation:`react-loadly-blink ${1/s}s step-end infinite`,marginLeft:"2px",verticalAlign:"baseline"}},"|")),e.createElement("span",{className:"react-loadly-sr-only"},f))},ce={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,count:5,"aria-label":"Loading..."},ue=a=>{const r=o(ce,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,count:u,className:y="",style:m={},showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:x,screenWidth:v,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=t(()=>b("wave-loader"),[]),I=t(()=>{const e="number"==typeof n?n:parseInt(s(n));return{width:Math.max(e/10,3),height:e,spacing:Math.max(e/8,4)}},[n]);if(!c)return null;const L={display:"inline-flex",flexDirection:"column",alignItems:"center",...m,...x&&{position:"fixed",top:0,left:0,width:v||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":m.justifyContent}};return e.createElement("div",{className:w("react-loadly react-loadly-wave",y),style:L,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...k},e.createElement(z,{count:u,lineWidth:I.width,lineHeight:I.height,color:i,secondaryColor:l,speed:d,arrangement:"staggered",orientation:"vertical",animationType:"wave",spacing:I.spacing,"data-testid":f?`${f}-lines`:void 0}),p&&e.createElement("div",{className:"react-loadly-text",id:`${N}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},ye={loading:!0,inheritStyles:!1,shimmer:!0,color:"#e2e8f0",highlightColor:"#f1f5f9",shimmerColor:"rgba(255, 255, 255, 0.6)",waveWidthValue:"200px",waveDirection:"left-to-right","aria-label":"Loading content...",speed:1},me=a=>{const r=o(ye,a),{component:n,loading:l,inheritStyles:s,styless:d={},shimmer:c,highlightColor:u,waveWidthValue:y,waveDirection:m,color:p,"aria-label":g,className:h="",style:f={},speed:x,...v}=r,b=e=>{if("function"==typeof e)return e;if("object"==typeof e&&e?.$$typeof){if(e.type)return b(e.type);if(e.render)return b(e.render)}return e},$=(e,t)=>{const{type:a,props:r}=e,n={width:"100%",height:"16px",borderRadius:"6px"};if(t){const e=t.toLowerCase();if(e.includes("button"))return{width:"100px",height:"40px",borderRadius:"8px"};if(e.includes("badge"))return{width:"80px",height:"24px",borderRadius:"12px"};if(e.includes("text")||e.includes("label"))return{width:"120px",height:"1em",borderRadius:"4px"};if(e.includes("image")||e.includes("avatar")||e.includes("photo"))return{width:"56px",height:"56px",borderRadius:"8px"};if(e.includes("card"))return{width:"100%",height:"200px",borderRadius:"12px"}}if("string"==typeof a)switch(a){case"h1":return{width:"100%",height:"2.2em",borderRadius:"6px"};case"h2":return{width:"100%",height:"1.8em",borderRadius:"6px"};case"h3":return{width:"100%",height:"1.6em",borderRadius:"6px"};case"p":case"span":if("string"==typeof r.children){const e=r.children.length;return{width:`${Math.min(100,Math.max(30,.5*e))}%`,height:"1em",borderRadius:"6px"}}return{width:"90%",height:"1em",borderRadius:"6px"};case"img":return{width:r.width||"100%",height:r.height||"200px",borderRadius:r.style?.borderRadius||"8px"};case"button":return{width:"120px",height:"40px",borderRadius:"8px"};default:return n}return n},C=(t,a,r=!1)=>{const n=!t.display||"inline"!==t.display,i={display:n?"block":"inline-block",width:t.width,height:t.height,borderRadius:t.borderRadius,margin:t.margin||"6px 0",backgroundColor:p,position:"relative",overflow:"hidden",...r&&n?{marginLeft:"auto",marginRight:"auto"}:{}},l=c?{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:`linear-gradient(${"left-to-right"===m?"90deg":"right-to-left"===m?"270deg":"top-to-bottom"===m?"180deg":"0deg"}, ${p} 0%, ${u} 50%, ${p} 100%)`,backgroundSize:`${y} 100%`,animation:`react-loadly-shimmer ${1.5/(x||1)}s linear infinite`,pointerEvents:"none"}:{};return e.createElement("div",{key:a,style:i,"aria-hidden":"true",className:"react-loadly-skeleton-block"},c&&e.createElement("div",{style:l,className:"react-loadly-skeleton-shimmer"}))},E=(e,t,a)=>`skeleton-${e.join("-")}-${"string"==typeof t?t:a||"component"}`,k=(t,a=["0"],r=!1)=>{if(null==t||"string"==typeof t||"number"==typeof t)return null;if(Array.isArray(t))return e.createElement(e.Fragment,null,t.map((e,t)=>k(e,[...a,String(t)],r)));if(t.type===e.Fragment){const n=t;return e.createElement(e.Fragment,{key:E(a,"fragment")},e.Children.map(n.props.children,(e,t)=>k(e,[...a,"frag",String(t)],r)))}const n=t,{type:i,props:l}=n,o=l?.className||"",c=l?.style||{},u=r||o.includes("text-center")||o.includes("items-center")||o.includes("justify-center")||"center"===c.textAlign||"center"===c.alignItems||"center"===c.justifyContent;if("string"==typeof i){if(["div","section","article","header","footer","nav","main","ul","ol","li","figure"].includes(i)){const t=s?{...c}:{};return"flex"!==c.display&&"grid"!==c.display||(t.display=c.display,t.flexDirection=c.flexDirection,t.alignItems=c.alignItems,t.justifyContent=c.justifyContent,t.gap=c.gap),e.createElement(i,{key:E(a,i),className:o,style:t},e.Children.map(l.children,(e,t)=>k(e,[...a,i,String(t)],u)))}let t={...$(n)};return s&&(t={...t,...c}),d[i]&&(t={...t,...d[i]}),c.display&&(t.display=c.display),C(t,E(a,i),u)}const y=b(i);if("function"==typeof y){const t=((t,a)=>{try{const r=t(a);return e.isValidElement(r)?r:null}catch(r){return null}})(y,l);if(t){const e=y.displayName||y.name||"comp";return k(t,[...a,e],u)}const r=y.displayName||y.name||"component",i=$(n,r);return C(i,E(a,y,r),u)}return l&&l.children?e.createElement(e.Fragment,{key:E(a,"children")},e.Children.map(l.children,(e,t)=>k(e,[...a,"child",String(t)],u))):C($(n),E(a,"fallback"),u)},N=t(()=>k(n),[n,n?.type,d,s,c,u,y,m,p,x]);if(!l)try{return i(n)}catch{return e.createElement(e.Fragment,null,n)}return e.createElement("div",{className:w("react-loadly react-loadly-auto-skeleton",h),style:{...f,transition:"opacity 0.2s ease-in-out"},role:"status","aria-label":g,"aria-live":"polite","aria-busy":l,...v},N)},pe={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,"aria-label":"Loading...",showText:!1,loadingText:"Loading...",fullscreen:!1};let ge={...pe};function he(){return{...ge}}function fe(e){ge={...ge,...e}}function xe(){ge={...pe}}const ve={progress:null,thickness:4},be=a=>{const r=o(pe,a),{progress:n=1,thickness:i=4,size:l=40,color:d="var(--react-loadly-color)",secondaryColor:c,speed:u=1,loading:y=!0,className:p="",style:g={},showText:h,loadingText:f="Loading...","aria-label":x="Loading...","data-testid":v,fullscreen:b,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=o(ve,r),I=m(u),z=s(l),L=t(()=>{if("number"==typeof l)return l;const e=parseFloat(z);return isNaN(e)?40:e},[l,z]),M=t(()=>(L-i)/2,[L,i]),T=t(()=>2*Math.PI*M,[M]),j=t(()=>{if(null==n)return T;const e=Math.max(0,Math.min(100,n));return T-e/100*T},[n,T]);if(!y)return null;const D={display:"inline-flex",flexDirection:"column",alignItems:"center",...g,...b&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":g.justifyContent}},R={width:z,height:z,transform:"rotate(-90deg)",willChange:"transform"},S={fill:"none",stroke:d,strokeWidth:i,strokeLinecap:"round",transformOrigin:"center",willChange:"transform, opacity"},W={...S,stroke:c||"var(--react-loadly-secondary-color, rgba(0,0,0,0.1))",opacity:.2},B={...S,strokeDasharray:T,strokeDashoffset:j||0,transition:null!==n?"stroke-dashoffset 0.3s ease":void 0,animationPlayState:I.playState};return e.createElement("div",{className:w("react-loadly react-loadly-progress-ring",p),style:D,role:"status","aria-label":x,"aria-live":"polite","aria-busy":y,"aria-valuemin":null!==n?0:void 0,"aria-valuemax":null!==n?100:void 0,"aria-valuenow":null!==n?n:void 0,"data-testid":v,...N},e.createElement("svg",{style:R,viewBox:`0 0 ${L} ${L}`,"data-testid":v?`${v}-svg`:void 0,className:"react-loadly-progress-ring-svg"},e.createElement("circle",{cx:L/2,cy:L/2,r:M,style:W,"data-testid":v?`${v}-background-circle`:void 0,className:"react-loadly-progress-ring-background"}),e.createElement("circle",{cx:L/2,cy:L/2,r:M,style:B,"data-testid":v?`${v}-progress-circle`:void 0,className:"react-loadly-progress-ring-progress"})),h&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite","data-testid":v?`${v}-text`:void 0},f),e.createElement("span",{className:"react-loadly-sr-only"},x))},$e={variant:"blob",speed:1},we=a=>{const r=o(pe,a),{variant:n="blob",speed:i=1,size:l=40,color:d="var(--react-loadly-color)",loading:c=!0,className:u="",style:y={},showText:p,loadingText:g="Loading...","aria-label":h="Loading...","data-testid":f,fullscreen:x,screenWidth:v,screenHeight:b,loaderCenter:$,screenBackground:C,...E}=o($e,r),k=m(i),N=s(l),I=t(()=>{const e="number"==typeof l?l:parseInt(s(l)),t=e/2,a=e/2-4;switch(n){case"soft":return`M ${t},${t-a} \n C ${t+.8*a},${t-a} ${t+a},${t-.8*a} ${t+a},${t}\n C ${t+a},${t+.8*a} ${t+.8*a},${t+a} ${t},${t+a}\n C ${t-.8*a},${t+a} ${t-a},${t+.8*a} ${t-a},${t}\n C ${t-a},${t-.8*a} ${t-.8*a},${t-a} ${t},${t-a}\n Z`;case"sharp":return`M ${t},${t-a} \n L ${t+.7*a},${t-.7*a}\n L ${t+a},${t}\n L ${t+.7*a},${t+.7*a}\n L ${t},${t+a}\n L ${t-.7*a},${t+.7*a}\n L ${t-a},${t}\n L ${t-.7*a},${t-.7*a}\n Z`;default:return`M ${t},${t-a} \n C ${t+.5*a},${t-a} ${t+a},${t-.5*a} ${t+a},${t}\n C ${t+a},${t+.5*a} ${t+.5*a},${t+a} ${t},${t+a}\n C ${t-.5*a},${t+a} ${t-a},${t+.5*a} ${t-a},${t}\n C ${t-a},${t-.5*a} ${t-.5*a},${t-a} ${t},${t-a}\n Z`}},[n,l]);if(!c)return null;const z={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:v||"100vw",height:b||"100vh",backgroundColor:C||"var(--react-loadly-background)",zIndex:9999,justifyContent:$?"center":y.justifyContent}},L={width:N,height:N,willChange:"transform"},M={transformOrigin:"center",willChange:"transform",animation:`react-loadly-morph ${k.duration} ease-in-out infinite`,animationPlayState:k.playState};return e.createElement("div",{className:w("react-loadly react-loadly-morph",u),style:z,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...E},e.createElement("svg",{style:L,viewBox:`0 0 ${N} ${N}`,"data-testid":f?`${f}-svg`:void 0},e.createElement("path",{d:I,fill:d,style:M,"data-testid":f?`${f}-shape`:void 0})),p&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite","data-testid":f?`${f}-text`:void 0},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},Ce={dots:3,gap:8},Ee=a=>{const r=o(pe,a),{dots:n=3,gap:i=8,size:l=40,color:d="var(--react-loadly-color)",speed:c=1,loading:u=!0,className:y="",style:p={},showText:g,loadingText:h="Loading...","aria-label":f="Loading...","data-testid":x,fullscreen:v,screenWidth:b,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=o(Ce,r),N=m(c),I=s(l),z=t(()=>{const e="number"==typeof l?l:parseInt(s(l));return Math.max((e-(n-1)*i)/n,4)},[l,n,i]),L=t(()=>Array.from({length:n}).map((t,a)=>{const r=a/n*2*Math.PI,i=(parseInt(I)-z)/2,l=i*Math.cos(r),o=i*Math.sin(r),s={position:"absolute",width:`${z}px`,height:`${z}px`,backgroundColor:d,borderRadius:"50%",willChange:"transform, opacity",transform:"translateZ(0)",left:`calc(50% + ${l}px - ${z/2}px)`,top:`calc(50% + ${o}px - ${z/2}px)`,animation:`react-loadly-dots ${N.duration} ease-in-out infinite`,animationDelay:.2*a/c+"s",animationPlayState:N.playState};return e.createElement("div",{key:a,style:s,"data-testid":x?`${x}-dot-${a}`:void 0})}),[n,I,z,d,N,c,x]);if(!u)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...p,...v&&{position:"fixed",top:0,left:0,width:b||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":p.justifyContent}},T={position:"relative",width:I,height:I,willChange:"transform"};return e.createElement("div",{className:w("react-loadly react-loadly-spin-dots",y),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":u,"data-testid":x,...k},e.createElement("div",{style:T,"data-testid":x?`${x}-spinner`:void 0},L),g&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite","data-testid":x?`${x}-text`:void 0},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},ke={rows:3,cols:5},Ne=a=>{const r=o(pe,a),{rows:n=3,cols:i=5,size:l=40,color:d="var(--react-loadly-color)",speed:c=1,loading:u=!0,className:y="",style:p={},showText:g,loadingText:h="Loading...","aria-label":f="Loading...","data-testid":x,fullscreen:v,screenWidth:b,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=o(ke,r),N=m(c),I=s(l),z=t(()=>{const e="number"==typeof l?l:parseInt(s(l));return Math.max(e/i-2,8)},[l,i]),L=t(()=>{const e="number"==typeof l?l:parseInt(s(l));return Math.max(e/n-2,8)},[l,n]),M=t(()=>Array.from({length:n*i}).map((t,a)=>{const r=Math.floor(a/i),n=a%i,l={width:`${z}px`,height:`${L}px`,backgroundColor:d,margin:"1px",opacity:.3,willChange:"opacity",animation:`react-loadly-pulse ${N.duration} ease-in-out infinite`,animationDelay:.1*(r+n)/c+"s",animationPlayState:N.playState};return e.createElement("div",{key:a,style:l,"data-testid":x?`${x}-cell-${a}`:void 0})}),[n,i,z,L,d,N,c,x]);if(!u)return null;const T={display:"inline-flex",flexDirection:"column",alignItems:"center",...p,...v&&{position:"fixed",top:0,left:0,width:b||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":p.justifyContent}},j={display:"grid",gridTemplateColumns:`repeat(${i}, 1fr)`,gap:"2px",width:I,height:I,willChange:"transform"};return e.createElement("div",{className:w("react-loadly react-loadly-heatmap",y),style:T,role:"status","aria-label":f,"aria-live":"polite","aria-busy":u,"data-testid":x,...k},e.createElement("div",{style:j,"data-testid":x?`${x}-grid`:void 0},M),g&&e.createElement("div",{className:"react-loadly-text","aria-live":"polite","data-testid":x?`${x}-text`:void 0},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},Ie={size:40,color:"var(--react-loadly-color)",speed:1,loading:!0,count:4,"aria-label":"Loading..."},ze=a=>{const r=o(Ie,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},count:p=4,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("squares-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={display:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",gap:"6px",width:parseFloat(z)*Math.ceil(Math.sqrt(p))+"px",height:parseFloat(z)*Math.ceil(Math.sqrt(p))+"px"},j={width:z,height:z,backgroundColor:i,borderRadius:"8px",animation:`react-loadly-squares-rotate ${L.duration} ease-in-out infinite`,animationPlayState:L.playState},D=Array.from({length:p}).map((t,a)=>{const r=.15*a+"s",n=.7+a%3*.15,o=l&&a%2==1?l:i;return e.createElement("div",{key:a,style:{...j,animationDelay:r,backgroundColor:o,transform:`scale(${n})`},"data-testid":x?`${x}-square-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-squares",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":x,...N},e.createElement("div",{style:T},D),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},Le={size:50,color:"var(--react-loadly-color)",speed:1,loading:!0,count:3,"aria-label":"Loading..."},Me=a=>{const r=o(Le,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},count:p=3,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,borderWidth:N=2,...I}=r,z=t(()=>b("ripple-loader"),[]),L=s(n),M=m(d);if(!c)return null;const T={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},j={position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",width:L,height:L},D={position:"absolute",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:i,zIndex:10},R=Array.from({length:p}).map((t,a)=>{const r=.2*a+"s",n=l&&a%2==1?l:i;return e.createElement("div",{key:a,style:{position:"absolute",width:L,height:L,border:`${N}px solid ${n}`,borderRadius:"50%",animation:`react-loadly-ripple ${M.duration} ease-out infinite`,animationDelay:r,animationPlayState:M.playState},"data-testid":x?`${x}-ripple-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-ripple",u),style:T,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":x,...I},e.createElement("div",{style:j},e.createElement("div",{style:D}),R),g&&e.createElement("div",{className:"react-loadly-text",id:`${z}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},Te={size:35,color:"var(--react-loadly-color)",speed:1,loading:!0,count:5,"aria-label":"Loading..."},je=a=>{const r=o(Te,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},count:p=5,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("stair-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T=parseFloat(z),j=.57*T,D=.23*T,R=.17*T,S={display:"flex",flexDirection:"column",alignItems:"flex-end",gap:`${.11*T}px`},W=Array.from({length:p}).map((t,a)=>{const r=.1*a+"s",n=`${j+a*D}px`,o=l&&a%2==1?l:i;return e.createElement("div",{key:a,style:{width:n,height:`${R}px`,backgroundColor:o,borderRadius:"4px",animation:`react-loadly-stair-cascade ${L.duration} ease-in-out infinite`,animationDelay:r,animationPlayState:L.playState},"data-testid":x?`${x}-step-${a}`:void 0})});return e.createElement("div",{className:w("react-loadly react-loadly-stair",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":x,...N},e.createElement("div",{style:S},W),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},De={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,count:3,"aria-label":"Loading..."},Re=a=>{const r=o(De,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},count:p=3,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("orbit-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",width:z,height:z},j={position:"absolute",width:"10px",height:"10px",borderRadius:"50%",backgroundColor:i,zIndex:10,boxShadow:`0 0 8px ${i}`},D=Array.from({length:p}).map((t,a)=>{const r=.25*parseFloat(z),n=8+2*a,o=l&&a%2==1?l:i,s=360/p*a;return e.createElement("div",{key:a,style:{position:"absolute",width:2*r+"px",height:2*r+"px",top:`calc(50% - ${r}px)`,left:`calc(50% - ${r}px)`,animation:`react-loadly-spin ${L.duration} linear infinite`,animationDelay:.2*a+"s",animationPlayState:L.playState,transform:`rotate(${s}deg)`},"data-testid":x?`${x}-orbit-${a}`:void 0},e.createElement("div",{style:{position:"absolute",width:`${n}px`,height:`${n}px`,borderRadius:"50%",backgroundColor:o,top:0,left:"50%",marginLeft:`-${n/2}px`,boxShadow:`0 0 6px ${o}`}}))});return e.createElement("div",{className:w("react-loadly react-loadly-orbit",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":x,...N},e.createElement("div",{style:T},e.createElement("div",{style:j}),D),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f))},Se={size:50,color:"var(--react-loadly-color)",speed:1,loading:!0,"aria-label":"Loading..."},We=a=>{const r=o(Se,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:x,screenWidth:v,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=t(()=>b("plane-loader"),[]),I=s(n),z=m(d);if(!c)return null;const L={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:v||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":y.justifyContent}},M={perspective:"200px",display:"inline-flex",justifyContent:"center",alignItems:"center",width:I,height:I},T={width:I,height:I,position:"relative",transformStyle:"preserve-3d",animation:`react-loadly-plane-rotate ${z.duration} ease-in-out infinite`,animationPlayState:z.playState},j={position:"absolute",width:"100%",height:"100%",borderRadius:"8px",border:`2px solid ${i}`,backgroundColor:l||"transparent"};return e.createElement("div",{className:w("react-loadly react-loadly-plane",u),style:L,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...k},e.createElement("div",{style:M},e.createElement("div",{style:T},e.createElement("div",{style:{...j,transform:"rotateY(0deg) translateZ(10px)"}}),e.createElement("div",{style:{...j,transform:"rotateY(180deg) translateZ(10px)"}}),e.createElement("div",{style:{...j,transform:"rotateY(90deg) translateZ(10px)"}}),e.createElement("div",{style:{...j,transform:"rotateY(-90deg) translateZ(10px)"}}),e.createElement("div",{style:{...j,transform:"rotateX(90deg) translateZ(10px)"}}),e.createElement("div",{style:{...j,transform:"rotateX(-90deg) translateZ(10px)"}}))),p&&e.createElement("div",{className:"react-loadly-text",id:`${N}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h))},Be={size:50,color:"var(--react-loadly-color)",speed:1,loading:!0,"aria-label":"Loading..."},He=a=>{const r=o(Be,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},showText:p,loadingText:g="Loading...","aria-label":h,"data-testid":f,fullscreen:x,screenWidth:v,screenHeight:$,loaderCenter:C,screenBackground:E,...k}=r,N=t(()=>b("hashtag-loader"),[]),I=s(n),z=m(d),L=parseFloat(I),M=Math.max(L/10,3),T=t(()=>{const e=.8*L;return[{d:`M ${e/3} 0 L ${e/3} ${e}`,dashArray:e,dashOffset:2*e},{d:`M 0 ${e/3} L ${e} ${e/3}`,dashArray:e,dashOffset:2*e},{d:`M ${2*e/3} 0 L ${2*e/3} ${e}`,dashArray:e,dashOffset:2*e},{d:`M 0 ${2*e/3} L ${e} ${2*e/3}`,dashArray:e,dashOffset:2*e}]},[L]);if(!c)return null;const j={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...x&&{position:"fixed",top:0,left:0,width:v||"100vw",height:$||"100vh",backgroundColor:E||"var(--react-loadly-background)",zIndex:9999,justifyContent:C?"center":y.justifyContent}},D={position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",width:I,height:I};return e.createElement(e.Fragment,null,e.createElement("style",null,`\n @keyframes react-loadly-hashtag-draw-${N} {\n 0% {\n stroke-dashoffset: ${2*L}px;\n opacity: 0;\n }\n 10% {\n opacity: 1;\n }\n 90% {\n opacity: 1;\n }\n 100% {\n stroke-dashoffset: 0;\n opacity: 0.7;\n }\n }\n `),e.createElement("div",{className:w("react-loadly react-loadly-hashtag",u),style:j,role:"status","aria-label":h,"aria-live":"polite","aria-busy":c,"data-testid":f,...k},e.createElement("div",{style:D},e.createElement("svg",{width:L,height:L,viewBox:`0 0 ${L} ${L}`},T.map((t,a)=>e.createElement("path",{key:a,d:t.d,stroke:l&&a%2==1?l:i,strokeWidth:M,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",style:{strokeDasharray:t.dashArray,strokeDashoffset:t.dashOffset,animation:`react-loadly-hashtag-draw-${N} ${z.duration} ease-in-out infinite`,animationDelay:.2*a+"s",animationPlayState:z.playState},"data-testid":f?`${f}-path-${a}`:void 0})))),p&&e.createElement("div",{className:"react-loadly-text",id:`${N}-text`,"aria-live":"polite"},g),e.createElement("span",{className:"react-loadly-sr-only"},h)))},Pe={size:60,color:"var(--react-loadly-color)",speed:1,loading:!0,count:6,"aria-label":"Loading..."},Ae=a=>{const r=o(Pe,a),{size:n,color:i,secondaryColor:l,speed:d,loading:c,className:u="",style:y={},count:p=6,showText:g,loadingText:h="Loading...","aria-label":f,"data-testid":x,fullscreen:v,screenWidth:$,screenHeight:C,loaderCenter:E,screenBackground:k,...N}=r,I=t(()=>b("snake-loader"),[]),z=s(n),L=m(d);if(!c)return null;const M={display:"inline-flex",flexDirection:"column",alignItems:"center",...y,...v&&{position:"fixed",top:0,left:0,width:$||"100vw",height:C||"100vh",backgroundColor:k||"var(--react-loadly-background)",zIndex:9999,justifyContent:E?"center":y.justifyContent}},T={position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",width:z,height:z},j=.15*parseFloat(z),D=.7*parseFloat(z),R=Array.from({length:p}).map((t,a)=>{const r=.1*a/(d??1),n=l&&a%2==1?l:i;return e.createElement("div",{key:a,style:{position:"absolute",width:`${j}px`,height:`${j}px`,borderRadius:"50%",backgroundColor:n,boxShadow:`0 0 ${j/2}px ${n}`,left:"50%",top:"50%",animation:`react-loadly-snake-slither-${I} ${L.duration} ease-in-out infinite`,animationDelay:`${r}s`,animationPlayState:L.playState,transform:"translate(-50%, -50%)"},"data-testid":x?`${x}-segment-${a}`:void 0})});return e.createElement(e.Fragment,null,e.createElement("style",null,`\n @keyframes react-loadly-snake-slither-${I} {\n 0% {\n transform: translate(-50%, -50%) translateX(${-D}px) translateY(${20*Math.sin(0*Math.PI*4)}px);\n opacity: 0.3;\n }\n 25% {\n transform: translate(-50%, -50%) translateX(${.5*-D}px) translateY(${20*Math.sin(.25*Math.PI*4)}px);\n opacity: 0.7;\n }\n 50% {\n transform: translate(-50%, -50%) translateX(0px) translateY(${20*Math.sin(.5*Math.PI*4)}px);\n opacity: 1;\n }\n 75% {\n transform: translate(-50%, -50%) translateX(${.5*D}px) translateY(${20*Math.sin(.75*Math.PI*4)}px);\n opacity: 0.7;\n }\n 100% {\n transform: translate(-50%, -50%) translateX(${D}px) translateY(${20*Math.sin(1*Math.PI*4)}px);\n opacity: 0.3;\n }\n }\n `),e.createElement("div",{className:w("react-loadly react-loadly-snake",u),style:M,role:"status","aria-label":f,"aria-live":"polite","aria-busy":c,"data-testid":x,...N},e.createElement("div",{style:T},R),g&&e.createElement("div",{className:"react-loadly-text",id:`${I}-text`,"aria-live":"polite"},h),e.createElement("span",{className:"react-loadly-sr-only"},f)))},Fe=(e={})=>{const{initialLoading:t=!1,timeout:i,maxRetries:o=3,onLoadingChange:s,onError:d,onProgress:c}=e,[u,y]=r({isLoading:t,progress:0,error:null,retryCount:0}),m=a(null),p=a(null);n(()=>()=>{m.current&&clearTimeout(m.current),p.current&&clearTimeout(p.current)},[]),n(()=>(u.isLoading&&i?m.current=setTimeout(()=>{y(e=>({...e,isLoading:!1,error:"Loading timeout exceeded"})),d?.("Loading timeout exceeded")},i):m.current&&clearTimeout(m.current),()=>{m.current&&clearTimeout(m.current)}),[u.isLoading,i,d]),n(()=>{s?.(u.isLoading)},[u.isLoading,s]),n(()=>{void 0!==u.progress&&c?.(u.progress)},[u.progress,c]);const g=l(e=>{y(t=>({...t,isLoading:e,error:e?null:t.error,progress:e?0:t.progress}))},[]),h=l(e=>{const t=Math.min(Math.max(e,0),100);y(e=>({...e,progress:t,isLoading:!(t>=100)&&e.isLoading}))},[]),f=l(e=>{y(t=>({...t,error:e,isLoading:!1})),e&&d?.(e)},[d]),x=l(()=>{y(e=>{const t=(e.retryCount||0)+1;return t>o?(d?.("Maximum retry attempts exceeded"),{...e,error:"Maximum retry attempts exceeded",isLoading:!1}):{...e,retryCount:t,isLoading:!0,error:null,progress:0}});const e=Math.min(1e3*Math.pow(2,u.retryCount||0),3e4);p.current=setTimeout(()=>{y(e=>({...e,isLoading:!0}))},e)},[u.retryCount,o,d]),v=l(()=>{y({isLoading:!1,progress:0,error:null,retryCount:0}),m.current&&clearTimeout(m.current),p.current&&clearTimeout(p.current)},[]);return{state:u,setLoading:g,setProgress:h,setError:f,retry:x,reset:v}},qe=(e,t={})=>e.reduce((e,a)=>(e[a]=Fe(t),e),{}),Ye=(e,t=[],a={})=>{const i=Fe(a),[o,s]=r(null),d=l(async()=>{try{i.setLoading(!0),i.setError(null);const t=await e();return s(t),i.setProgress(100),t}catch(t){const e=t instanceof Error?t.message:"Unknown error occurred";return i.setError(e),null}},[e,i]);return n(()=>{d()},t),{...i,data:o,execute:d}};export{me as AutoSkeletonLoader,T as BarsLoader,D as BlobLoader,S as BounceLoader,N as Circle,C as Dot,I as DotCluster,B as DotsLoader,P as ElementLoader,Y as FallbackLoader,O as FlowLoader,V as GridLoader,He as HashtagLoader,Ne as HeatmapLoader,pe as LIB_DEFAULTS,E as Line,z as LineGroup,_ as LiquidLoader,J as LogoSpinLoader,we as MorphLoader,Re as OrbitLoader,We as PlaneLoader,be as ProgressRingLoader,Q as PulseLoader,k as Rectangle,te as RingLoader,Me as RippleLoader,re as RotateLoader,L as ShapeGroup,ie as SkeletonLoader,Ae as SnakeLoader,Ee as SpinDotsLoader,oe as SpinLoader,ze as SquaresLoader,je as StairLoader,de as TypingLoader,ue as WaveLoader,f as clamp,w as classNameGen,u as createAnimationName,h as createAnimationString,d as generateCSSVariables,b as generateId,p as getAnimationDirection,c as getAnimationDuration,g as getAnimationEasing,he as getGlobalDefaults,m as getOptimizedAnimationSettings,s as getSizeValue,x as hexToRgb,o as mergeProps,y as prefersReducedMotion,xe as resetGlobalDefaults,v as rgba,$ as sanitizeCSSValue,fe as setGlobalDefaults,Ye as useAsyncLoader,Fe as useLoaderState,qe as useMultipleLoaderStates};
2
2
  //# sourceMappingURL=index.esm.js.map