@vanelsas/baredom 1.3.0 → 1.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.
Files changed (83) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +6 -4
  3. package/dist/base.js +397 -373
  4. package/dist/x-alert.js +19 -19
  5. package/dist/x-avatar-group.js +11 -11
  6. package/dist/x-avatar.js +15 -15
  7. package/dist/x-badge.js +11 -11
  8. package/dist/x-bento-grid.js +5 -5
  9. package/dist/x-bento-item.js +4 -4
  10. package/dist/x-breadcrumbs.js +14 -14
  11. package/dist/x-button.js +16 -16
  12. package/dist/x-cancel-dialogue.js +17 -17
  13. package/dist/x-card.js +7 -7
  14. package/dist/x-chart.js +47 -47
  15. package/dist/x-checkbox.js +11 -11
  16. package/dist/x-chip.js +8 -8
  17. package/dist/x-collapse.js +10 -10
  18. package/dist/x-command-palette.js +31 -31
  19. package/dist/x-container.js +6 -6
  20. package/dist/x-context-menu.js +19 -19
  21. package/dist/x-copy.js +23 -23
  22. package/dist/x-currency-field.js +22 -22
  23. package/dist/x-date-picker.js +41 -41
  24. package/dist/x-divider.js +13 -13
  25. package/dist/x-drawer.js +11 -11
  26. package/dist/x-dropdown.js +9 -9
  27. package/dist/x-fieldset.js +6 -6
  28. package/dist/x-file-download.js +7 -7
  29. package/dist/x-form-field.js +15 -15
  30. package/dist/x-form.js +10 -10
  31. package/dist/x-gaussian-blur.js +18 -18
  32. package/dist/x-grid.js +6 -6
  33. package/dist/x-kinetic-font.js +29 -0
  34. package/dist/x-kinetic-typography.js +39 -61
  35. package/dist/x-liquid-dock.js +40 -0
  36. package/dist/x-liquid-fill.js +45 -0
  37. package/dist/x-liquid-glass.js +48 -0
  38. package/dist/x-menu-item.js +10 -10
  39. package/dist/x-menu.js +11 -11
  40. package/dist/x-metaball-cursor.js +28 -27
  41. package/dist/x-modal.js +12 -12
  42. package/dist/x-morph-stack.js +41 -0
  43. package/dist/x-navbar.js +13 -13
  44. package/dist/x-neural-glow.js +34 -34
  45. package/dist/x-notification-center.js +9 -10
  46. package/dist/x-organic-divider.js +19 -19
  47. package/dist/x-organic-progress.js +38 -38
  48. package/dist/x-organic-shape.js +14 -14
  49. package/dist/x-pagination.js +16 -16
  50. package/dist/x-popover.js +14 -14
  51. package/dist/x-progress-circle.js +9 -9
  52. package/dist/x-progress.js +10 -10
  53. package/dist/x-radio.js +11 -11
  54. package/dist/x-ripple-effect.js +12 -13
  55. package/dist/x-scroll-parallax.js +19 -19
  56. package/dist/x-scroll-stack.js +18 -18
  57. package/dist/x-scroll-story.js +36 -36
  58. package/dist/x-scroll-timeline.js +50 -50
  59. package/dist/x-scroll.js +41 -41
  60. package/dist/x-search-field.js +14 -14
  61. package/dist/x-select.js +9 -9
  62. package/dist/x-sidebar.js +16 -16
  63. package/dist/x-skeleton.js +6 -6
  64. package/dist/x-slider.js +16 -16
  65. package/dist/x-soft-body.js +22 -0
  66. package/dist/x-spacer.js +5 -5
  67. package/dist/x-spinner.js +5 -5
  68. package/dist/x-splash.js +13 -13
  69. package/dist/x-stat.js +11 -11
  70. package/dist/x-stepper.js +16 -16
  71. package/dist/x-switch.js +10 -10
  72. package/dist/x-tab.js +7 -7
  73. package/dist/x-table-cell.js +22 -22
  74. package/dist/x-table-row.js +10 -10
  75. package/dist/x-table.js +16 -16
  76. package/dist/x-tabs.js +11 -11
  77. package/dist/x-text-area.js +18 -18
  78. package/dist/x-timeline-item.js +24 -24
  79. package/dist/x-timeline.js +9 -9
  80. package/dist/x-toast.js +24 -24
  81. package/dist/x-toaster.js +8 -8
  82. package/dist/x-typography.js +10 -10
  83. package/package.json +25 -1
@@ -0,0 +1,48 @@
1
+ import { $APP, shadow$provide } from "./base.js";
2
+ var RP=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.D.i(a,""))return b;a=parseFloat(a);return $APP.r(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},SP=function(a){if(typeof a==="string"){a=a.trim();if($APP.D.i(a,""))return 5;a=parseInt(a,10);return $APP.r(isNaN(a))?5:Math.min(8,Math.max(3,a))}return 5},TP=function(a){return typeof a==="string"?(a=a.trim(),$APP.O(a,"")?a:null):null},UP=function(a){return typeof a==="string"?(a=a.trim(),$APP.O(a,"")?a:null):null},XP=function(a){a=$APP.G(VP,
3
+ typeof a==="string"?a.trim().toLowerCase():null);return $APP.r(a)?a:WP},pQ=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.Ai);var c=$APP.G(b,YP),d=$APP.G(b,ZP),e=$APP.G(b,$APP.pl),g=$APP.G(b,$P),h=$APP.G(b,aQ),k=$APP.G(b,$APP.Bk),m=$APP.G(b,bQ),p=$APP.G(b,cQ),q=$APP.G(b,dQ),w=$APP.G(b,eQ),x=$APP.G(b,fQ),y=$APP.G(b,gQ);b=$APP.G(b,hQ);return $APP.Q([iQ,jQ,kQ,$APP.Yi,$APP.Ri,lQ,mQ,nQ,$APP.pk,$APP.Jh,$APP.ok,$APP.Fl,oQ,$APP.W],[RP(q,.5,0,1),RP(y,10,4,20),RP(h,.15,.05,.4),RP(p,.3,.05,2),XP(k),TP(d),RP(c,
4
+ .4,.1,1),b!=null,function(){var A=UP(w);return $APP.r(A)?A:"rgba(244,114,182,0.35)"}(),RP(e,12,0,40),function(){var A=UP(x);return $APP.r(A)?A:"rgba(99,102,241,0.4)"}(),SP(g),RP(m,.3,0,1),a!=null])},qQ=function(a,b,c){return Math.sin(a*1.7+c*.3)*Math.cos(b*2.3+c*.5)*.5+Math.sin(a*3.1-c*.7)*Math.cos(b*1.3+c*.2)*.25+Math.sin(a*5.3+c*.4)*Math.cos(b*4.7-c*.6)*.125},sQ=function(){var a=$APP.l(rQ,"v");rQ.v=a+1;return a},tQ=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},
5
+ BQ=function(a){var b=sQ(),c=a.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElementNS("http://www.w3.org/2000/svg","svg"),g=document.createElementNS("http://www.w3.org/2000/svg","defs"),h=document.createElementNS("http://www.w3.org/2000/svg","filter"),k=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),m=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix"),p=document.createElementNS("http://www.w3.org/2000/svg","g"),q=document.createElementNS("http://www.w3.org/2000/svg",
6
+ "ellipse"),w=document.createElement("div"),x=document.createElement("div"),y=document.createElement("div"),A=document.createElement("div"),C=document.createElement("div"),E=document.createElement("slot"),H="lg-goo-"+$APP.S.g(b);a.__xLiquidGlassUID=b;d.textContent=":host{display:block;position:relative;isolation:isolate;min-width:120px;min-height:80px;"+$APP.S.g("--x-liquid-glass-padding")+":1.5rem;"+$APP.S.g("--x-liquid-glass-specular-color")+":rgba(255,255,255,0.6);"+$APP.S.g("--x-liquid-glass-spring")+
7
+ ":"+$APP.S.g("linear(0, 0.006, 0.025, 0.058, 0.104, 0.163, 0.234, 0.315, 0.403, 0.496, 0.591, 0.685, 0.774, 0.856, 0.926, 0.983, 1.025, 1.052, 1.065, 1.063, 1.049, 1.025, 0.995, 0.961, 0.927, 0.896, 0.870, 0.850, 0.837, 0.831, 0.832, 0.839, 0.851, 0.867, 0.885, 0.903, 0.921, 0.937, 0.951, 0.962, 0.970, 0.976, 0.979, 0.981, 0.981, 0.980, 0.979, 0.977, 0.976, 0.975, 0.975, 0.976, 0.977, 0.979, 0.981, 0.983, 0.986, 0.989, 0.992, 0.995, 0.998, 1)")+";"+$APP.S.g("--x-liquid-glass-spring-duration")+":"+
8
+ $APP.S.g("600ms")+";}[part\x3dsvg]{display:block;width:100%;height:100%;position:absolute;inset:0;overflow:visible;pointer-events:none;z-index:1;}[part\x3dglass]{position:absolute;inset:0;backdrop-filter:blur(var("+$APP.S.g("--x-liquid-glass-blur")+",12px)) saturate(180%);-webkit-backdrop-filter:blur(var("+$APP.S.g("--x-liquid-glass-blur")+",12px)) saturate(180%);z-index:0;}[part\x3dgrain]{position:absolute;inset:0;z-index:2;opacity:0.4;pointer-events:none;}[part\x3dgradient]{position:absolute;inset:0;z-index:1;pointer-events:none;}[part\x3dspecular]{position:absolute;inset:0;z-index:1;opacity:0;pointer-events:none;transition:background var("+
9
+ $APP.S.g("--x-liquid-glass-spring-duration")+","+$APP.S.g("600ms")+") var("+$APP.S.g("--x-liquid-glass-spring")+","+$APP.S.g("linear(0, 0.006, 0.025, 0.058, 0.104, 0.163, 0.234, 0.315, 0.403, 0.496, 0.591, 0.685, 0.774, 0.856, 0.926, 0.983, 1.025, 1.052, 1.065, 1.063, 1.049, 1.025, 0.995, 0.961, 0.927, 0.896, 0.870, 0.850, 0.837, 0.831, 0.832, 0.839, 0.851, 0.867, 0.885, 0.903, 0.921, 0.937, 0.951, 0.962, 0.970, 0.976, 0.979, 0.981, 0.981, 0.980, 0.979, 0.977, 0.976, 0.975, 0.975, 0.976, 0.977, 0.979, 0.981, 0.983, 0.986, 0.989, 0.992, 0.995, 0.998, 1)")+
10
+ "),opacity var("+$APP.S.g("--x-liquid-glass-spring-duration")+","+$APP.S.g("600ms")+") var("+$APP.S.g("--x-liquid-glass-spring")+","+$APP.S.g("linear(0, 0.006, 0.025, 0.058, 0.104, 0.163, 0.234, 0.315, 0.403, 0.496, 0.591, 0.685, 0.774, 0.856, 0.926, 0.983, 1.025, 1.052, 1.065, 1.063, 1.049, 1.025, 0.995, 0.961, 0.927, 0.896, 0.870, 0.850, 0.837, 0.831, 0.832, 0.839, 0.851, 0.867, 0.885, 0.903, 0.921, 0.937, 0.951, 0.962, 0.970, 0.976, 0.979, 0.981, 0.981, 0.980, 0.979, 0.977, 0.976, 0.975, 0.975, 0.976, 0.977, 0.979, 0.981, 0.983, 0.986, 0.989, 0.992, 0.995, 0.998, 1)")+
11
+ ");}[part\x3dcontent]{position:relative;padding:var("+$APP.S.g("--x-liquid-glass-padding")+",1.5rem);z-index:3;}@keyframes lg-enter{from{opacity:0;transform:scale(0.92);}to{opacity:1;transform:scale(1);}}:host([data-entering]) [part\x3dglass],:host([data-entering]) [part\x3dsvg]{animation:lg-enter var("+$APP.S.g("--x-liquid-glass-spring-duration")+","+$APP.S.g("600ms")+") var("+$APP.S.g("--x-liquid-glass-spring")+","+$APP.S.g("linear(0, 0.006, 0.025, 0.058, 0.104, 0.163, 0.234, 0.315, 0.403, 0.496, 0.591, 0.685, 0.774, 0.856, 0.926, 0.983, 1.025, 1.052, 1.065, 1.063, 1.049, 1.025, 0.995, 0.961, 0.927, 0.896, 0.870, 0.850, 0.837, 0.831, 0.832, 0.839, 0.851, 0.867, 0.885, 0.903, 0.921, 0.937, 0.951, 0.962, 0.970, 0.976, 0.979, 0.981, 0.981, 0.980, 0.979, 0.977, 0.976, 0.975, 0.975, 0.976, 0.977, 0.979, 0.981, 0.983, 0.986, 0.989, 0.992, 0.995, 0.998, 1)")+
12
+ ") both;}@media(prefers-color-scheme:dark){:host{"+$APP.S.g("--x-liquid-glass-specular-color")+":rgba(255,255,255,0.3);}}@media(prefers-reduced-motion:reduce){:host([data-entering]) [part\x3dglass],:host([data-entering]) [part\x3dsvg]{animation:none;}[part\x3dspecular]{transition:none!important;}}";e.setAttribute("part","svg");e.setAttribute("viewBox","0 0 300 200");e.setAttribute("preserveAspectRatio","none");e.setAttribute("aria-hidden","true");h.setAttribute("id",H);k.setAttribute("in","SourceGraphic");
13
+ k.setAttribute("stdDeviation","10");k.setAttribute("result","blur");m.setAttribute("in","blur");m.setAttribute("mode","matrix");m.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9");h.appendChild(k);h.appendChild(m);g.appendChild(h);e.appendChild(g);p.setAttribute("filter","url(#"+$APP.S.g(H)+")");p.setAttribute("opacity","0.35");q.setAttribute("class","blob-core");p.appendChild(q);e.appendChild(p);m=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");var F="lg-edge-"+
14
+ $APP.S.g(b),K=document.createElementNS("http://www.w3.org/2000/svg","stop"),X=document.createElementNS("http://www.w3.org/2000/svg","stop"),da=document.createElementNS("http://www.w3.org/2000/svg","stop");m.setAttribute("id",F);m.setAttribute("x1","0");m.setAttribute("y1","0");m.setAttribute("x2","1");m.setAttribute("y2","1");K.setAttribute("offset","0%");K.setAttribute("stop-color","white");K.setAttribute("stop-opacity","0.9");X.setAttribute("offset","50%");X.setAttribute("stop-color","white");X.setAttribute("stop-opacity",
15
+ "0.15");da.setAttribute("offset","100%");da.setAttribute("stop-color","white");da.setAttribute("stop-opacity","0.5");m.appendChild(K);m.appendChild(X);m.appendChild(da);g.appendChild(m);a.__xLiquidGlassEdgeId=F;m=document.createElementNS("http://www.w3.org/2000/svg","g");F=document.createElementNS("http://www.w3.org/2000/svg","ellipse");K=$APP.l(a,"__xLiquidGlassEdgeId");m.setAttribute("filter","url(#"+$APP.S.g(H)+")");m.setAttribute("opacity","0.7");F.setAttribute("class","blob-border");F.setAttribute("fill",
16
+ "none");F.setAttribute("stroke","url(#"+$APP.S.g(K)+")");F.setAttribute("stroke-width","2.5");m.appendChild(F);e.appendChild(m);a.__xLiquidGlassBorderG=m;a.__xLiquidGlassBorderCore=F;m=document.createElementNS("http://www.w3.org/2000/svg","filter");F="lg-grain-"+$APP.S.g(b);K=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence");X=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix");m.setAttribute("id",F);K.setAttribute("type","fractalNoise");K.setAttribute("baseFrequency",
17
+ "0.6");K.setAttribute("numOctaves","3");K.setAttribute("stitchTiles","stitch");X.setAttribute("type","matrix");X.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0");m.appendChild(K);m.appendChild(X);g.appendChild(m);a.__xLiquidGlassGrainId=F;m=document.createElementNS("http://www.w3.org/2000/svg","mask");b="lg-mask-"+$APP.S.g(b);F=document.createElementNS("http://www.w3.org/2000/svg","g");K=document.createElementNS("http://www.w3.org/2000/svg","ellipse");m.setAttribute("id",b);
18
+ m.setAttribute("maskUnits","userSpaceOnUse");m.setAttribute("maskContentUnits","userSpaceOnUse");F.setAttribute("filter","url(#"+$APP.S.g(H)+")");K.setAttribute("fill","white");F.appendChild(K);m.appendChild(F);g.appendChild(m);a.__xLiquidGlassMaskG=F;a.__xLiquidGlassMaskCore=K;$APP.n(a,"__xLiquidGlassMaskSats",[]);a.__xLiquidGlassMaskId=b;w.setAttribute("part","glass");g="url(#"+$APP.S.g($APP.l(a,"__xLiquidGlassMaskId"))+")";w.style.mask=g;w.style.webkitMask=g;x.setAttribute("part","grain");x.style.filter=
19
+ "url(#"+$APP.S.g($APP.l(a,"__xLiquidGlassGrainId"))+")";g="url(#"+$APP.S.g($APP.l(a,"__xLiquidGlassMaskId"))+")";x.style.mask=g;x.style.webkitMask=g;y.setAttribute("part","gradient");g="url(#"+$APP.S.g($APP.l(a,"__xLiquidGlassMaskId"))+")";y.style.mask=g;y.style.webkitMask=g;A.setAttribute("part","specular");g="url(#"+$APP.S.g($APP.l(a,"__xLiquidGlassMaskId"))+")";A.style.mask=g;A.style.webkitMask=g;C.setAttribute("part","content");C.appendChild(E);c.appendChild(d);c.appendChild(w);c.appendChild(e);
20
+ c.appendChild(x);c.appendChild(y);c.appendChild(A);c.appendChild(C);a.setAttribute("data-entering","");setTimeout(function(){return a.removeAttribute("data-entering")},700);$APP.n(a,"__xLiquidGlassRefs",$APP.Q([$APP.Vh,$APP.wk,uQ,vQ,wQ,xQ,$APP.Jh,$APP.bi,yQ,$APP.xj,zQ,AQ],[C,A,w,p,h,[],k,c,y,e,q,x]))},CQ=function(a,b,c){var d=$APP.Fl.g($APP.l(a,"__xLiquidGlassModel")),e=b/2,g=c/2,h=b*.32,k=c*.32,m=h*.55,p=k*.55;var q=h*.9;for(var w=k*.9,x=new Float64Array(d),y=new Float64Array(d),A=0;;)if(A<d){var C=
21
+ 2*Math.PI*(A/d);x[A]=e+q*Math.cos(C);y[A]=g+w*Math.sin(C);A+=1}else break;q=[x,y];w=$APP.N($APP.l(a,"__xLiquidGlassRefs"));w=$APP.G(w,zQ);w.setAttribute("cx",""+$APP.S.g(e));w.setAttribute("cy",""+$APP.S.g(g));w.setAttribute("rx",""+$APP.S.g(h));w.setAttribute("ry",""+$APP.S.g(k));w=$APP.l(a,"__xLiquidGlassMaskCore");$APP.r(w)&&(w.setAttribute("cx",""+$APP.S.g(e)),w.setAttribute("cy",""+$APP.S.g(g)),w.setAttribute("rx",""+$APP.S.g(h)),w.setAttribute("ry",""+$APP.S.g(k)));b*=.44;c*=.44;h=$APP.l(a,
22
+ "__xLiquidGlassBorderCore");$APP.r(h)&&(h.setAttribute("cx",""+$APP.S.g(e)),h.setAttribute("cy",""+$APP.S.g(g)),h.setAttribute("rx",""+$APP.S.g(b)),h.setAttribute("ry",""+$APP.S.g(c)));g=$APP.l(a,"__xLiquidGlassRefs");e=vQ.g(g);g=xQ.g(g);c=$APP.l(a,"__xLiquidGlassMaskG");b=$APP.l(a,"__xLiquidGlassMaskSats");for(h=g.length-1;;)if(h>=d)e.removeChild(g[h]),$APP.r(c)&&c.removeChild(b[h]),--h;else break;g.length>d&&(g.length=d,$APP.r(b)&&(b.length=d));for(h=g.length;;)if(h<d)k=document.createElementNS("http://www.w3.org/2000/svg",
23
+ "ellipse"),k.setAttribute("class","blob-sat-"+$APP.S.g(h)),k.setAttribute("fill","#ffffff"),e.appendChild(k),g.push(k),$APP.r(c)&&(k=document.createElementNS("http://www.w3.org/2000/svg","ellipse"),k.setAttribute("fill","white"),c.appendChild(k),b.push(k)),h+=1;else break;e=$APP.N($APP.l(a,"__xLiquidGlassRefs"));e=$APP.G(e,xQ);g=$APP.l(a,"__xLiquidGlassMaskSats");for(c=0;;)if(c<d)b=e[c],b.setAttribute("rx",""+$APP.S.g(m)),b.setAttribute("ry",""+$APP.S.g(p)),$APP.r($APP.r(g)?c<g.length:g)&&(b=g[c],
24
+ b.setAttribute("rx",""+$APP.S.g(m)),b.setAttribute("ry",""+$APP.S.g(p))),c+=1;else break;a.__xLiquidGlassRX=q[0];a.__xLiquidGlassRY=q[1]},EQ=function(a){var b=$APP.l(a,"__xLiquidGlassModel"),c=$APP.l(a,"__xLiquidGlassRefs"),d=$APP.Jh.g(c),e=uQ.g(c),g=$APP.wk.g(c),h=zQ.g(c),k=vQ.g(c);d.setAttribute("stdDeviation",""+$APP.S.g(jQ.g(b)));e.style.setProperty("--x-liquid-glass-blur",""+$APP.S.g($APP.Jh.g(b))+"px");h.setAttribute("fill","#ffffff");d=xQ.g(c);e=d.length;for(h=0;;)if(h<e)d[h].setAttribute("fill",
25
+ "#ffffff"),h+=1;else break;h=$APP.D.i(DQ,$APP.Ri.g(b));d=$APP.Vh.g(c);c=AQ.g(c);e="url(#"+$APP.S.g($APP.l(a,"__xLiquidGlassMaskId"))+")";if(h){d.style.position="relative";d.style.zIndex="0";h=iQ.g(b);var m=1-h*.5,p=h*.35,q=h*.2;d.style.filter="blur("+$APP.S.g((h*2).toFixed(1))+"px)";d.style.opacity=""+$APP.S.g(m.toFixed(2));d.style.mask=e;d.style.webkitMask=e;k.setAttribute("opacity",p.toFixed(2));$APP.r(c)&&(c.style.opacity=q.toFixed(2));a.style.contain="layout style"}else d.style.position="relative",
26
+ d.style.zIndex="3",d.style.filter="",d.style.opacity="",d.style.mask="",d.style.webkitMask="",k.setAttribute("opacity","0.35"),$APP.r(c)&&(c.style.opacity="0.4"),a.style.contain="";$APP.r(nQ.g(b))||(g.style.opacity="0")},FQ=function(a,b){var c=$APP.l(a,"__xLiquidGlassModel"),d=$APP.Fl.g(c),e=$APP.Yi.g(c);c=kQ.g(c)*(Math.min($APP.l(a,"__xLiquidGlassW"),$APP.l(a,"__xLiquidGlassH"))*.32)*.6;var g=$APP.l(a,"__xLiquidGlassRX"),h=$APP.l(a,"__xLiquidGlassRY"),k=$APP.N($APP.l(a,"__xLiquidGlassRefs"));k=$APP.G(k,
27
+ xQ);a=$APP.l(a,"__xLiquidGlassMaskSats");for(var m=0;;)if(m<d){var p=m*2.39996;var q=[g[m]+c*qQ(p,0,b*e),h[m]+c*qQ(0,p,b*e)];p=q[0].toFixed(2);q=q[1].toFixed(2);var w=k[m];w.setAttribute("cx",p);w.setAttribute("cy",q);$APP.r($APP.r(a)?m<a.length:a)&&(w=a[m],w.setAttribute("cx",p),w.setAttribute("cy",q));m+=1}else break},GQ=function(a){var b=$APP.l(a,"__xLiquidGlassModel"),c=$APP.wk.g($APP.l(a,"__xLiquidGlassRefs"));if($APP.r(nQ.g(b))){var d=$APP.l(a,"__xLiquidGlassPA"),e=$APP.l(a,"__xLiquidGlassPX"),
28
+ g=$APP.l(a,"__xLiquidGlassPY"),h=$APP.l(a,"__xLiquidGlassW");a=$APP.l(a,"__xLiquidGlassH");h=mQ.g(b)*Math.min(h,a);a="var("+$APP.S.g("--x-liquid-glass-specular-color")+",rgba(255,255,255,0.6))";$APP.r(d)?(c.style.opacity=""+$APP.S.g(oQ.g(b)),c.style.background="radial-gradient(ellipse "+$APP.S.g(h)+"px "+$APP.S.g(h)+"px at "+$APP.S.g(e.toFixed(1))+"px "+$APP.S.g(g.toFixed(1))+"px,"+$APP.S.g(a)+" 0%,transparent 100%)"):c.style.opacity="0"}},HQ=function(a,b){var c=$APP.l(a,"__xLiquidGlassModel");a=
29
+ yQ.g($APP.l(a,"__xLiquidGlassRefs"));var d=$APP.ok.g(c);c=$APP.pk.g(c);var e=20+8*Math.cos(b*.09),g=70+12*Math.cos(b*.05),h=80+10*Math.sin(b*.06);a.style.background="radial-gradient(ellipse at "+$APP.S.g((30+10*Math.sin(b*.07)).toFixed(1))+"% "+$APP.S.g(e.toFixed(1))+"%,"+$APP.S.g(d)+" 0%,transparent 70%),radial-gradient(ellipse at "+$APP.S.g(g.toFixed(1))+"% "+$APP.S.g(h.toFixed(1))+"%,"+$APP.S.g(c)+" 0%,transparent 70%)"},JQ=function(a){$APP.r($APP.l(a,"__xLiquidGlassRaf"))||($APP.n(a,"__xLiquidGlassLF",
30
+ performance.now()),$APP.n(a,"__xLiquidGlassRaf",requestAnimationFrame(function(){return IQ(a)})))},KQ=function(a){var b=$APP.l(a,"__xLiquidGlassRaf");$APP.r(b)&&(cancelAnimationFrame(b),a.__xLiquidGlassRaf=null)},LQ=function(a){var b=$APP.Fl.g($APP.l(a,"__xLiquidGlassModel")),c=$APP.l(a,"__xLiquidGlassRX"),d=$APP.l(a,"__xLiquidGlassRY"),e=$APP.N($APP.l(a,"__xLiquidGlassRefs"));e=$APP.G(e,xQ);a=$APP.l(a,"__xLiquidGlassMaskSats");for(var g=0;;)if(g<b){var h=c[g].toFixed(2),k=d[g].toFixed(2);if(g<e.length){var m=
31
+ e[g];m.setAttribute("cx",h);m.setAttribute("cy",k)}$APP.r($APP.r(a)?g<a.length:a)&&(m=a[g],m.setAttribute("cx",h),m.setAttribute("cy",k));g+=1}else break},MQ=function(a,b){if(b.length>0){var c=b[0].contentRect;b=c.width;c=c.height;if(b>0&&c>0){a.__xLiquidGlassW=b;a.__xLiquidGlassH=c;var d=$APP.N($APP.l(a,"__xLiquidGlassRefs"));d=$APP.G(d,$APP.xj);d.setAttribute("viewBox","0 0 "+$APP.S.g(b)+" "+$APP.S.g(c));d=d.querySelector("#"+$APP.S.g($APP.l(a,"__xLiquidGlassMaskId")));$APP.r(d)&&(d.setAttribute("x",
32
+ "0"),d.setAttribute("y","0"),d.setAttribute("width",""+$APP.S.g(b)),d.setAttribute("height",""+$APP.S.g(c)));CQ(a,b,c);EQ(a);var e=$APP.l(a,"__xLiquidGlassModel");$APP.r(function(){var g=$APP.W.g(e);return $APP.r(g)?g:tQ()}())?LQ(a):(FQ(a,function(){var g=$APP.l(a,"__xLiquidGlassTime");return $APP.r(g)?g:0}()),JQ(a))}}return null},NQ=function(a){function b(){a.__xLiquidGlassPA=!1;return null}function c(){a.__xLiquidGlassPA=!0;return null}function d(e){var g=a.getBoundingClientRect();a.__xLiquidGlassPX=
33
+ e.clientX-g.left;a.__xLiquidGlassPY=e.clientY-g.top;return null}$APP.n(a,"__xLiquidGlassHdl",{move:d,enter:c,leave:b});a.addEventListener("pointermove",d,{passive:!0});a.addEventListener("pointerenter",c);a.addEventListener("pointerleave",b)},OQ=function(a){var b=$APP.l(a,"__xLiquidGlassHdl");$APP.r(b)&&(a.removeEventListener("pointermove",$APP.l(b,"move")),a.removeEventListener("pointerenter",$APP.l(b,"enter")),a.removeEventListener("pointerleave",$APP.l(b,"leave")),a.__xLiquidGlassHdl=null)},PQ=
34
+ function(a){return pQ($APP.Q([$APP.pl,$P,aQ,$APP.Bk,bQ,cQ,dQ,eQ,fQ,gQ,hQ,$APP.Ai,YP,ZP],[a.getAttribute("blur"),a.getAttribute("blobs"),a.getAttribute("amplitude"),a.getAttribute("mode"),a.getAttribute("specular-intensity"),a.getAttribute("speed"),a.getAttribute("frost"),a.getAttribute("color-2"),a.getAttribute("color-1"),a.getAttribute("goo"),a.getAttribute("specular"),a.getAttribute("disabled"),a.getAttribute("specular-size"),a.getAttribute("tint")]))},QQ=function(a){var b=PQ(a);a.__xLiquidGlassModel=
35
+ b;var c=$APP.l(a,"__xLiquidGlassW"),d=$APP.l(a,"__xLiquidGlassH");$APP.r($APP.r(c)?$APP.r(d)?c>0&&d>0:d:c)&&(CQ(a,c,d),EQ(a),$APP.r(function(){var e=$APP.W.g(b);return $APP.r(e)?e:tQ()}())?(KQ(a),LQ(a)):(FQ(a,function(){var e=$APP.l(a,"__xLiquidGlassTime");return $APP.r(e)?e:0}()),JQ(a)))},RQ=function(a){Object.defineProperty(a,"blobs",{get:function(){var b=this.getAttribute("blobs");return SP(b)},set:function(b){return b==null?this.removeAttribute("blobs"):this.setAttribute("blobs",""+$APP.S.g(b))},
36
+ enumerable:!0,configurable:!0});Object.defineProperty(a,"speed",{get:function(){var b=this.getAttribute("speed");return RP(b,.3,.05,2)},set:function(b){return b==null?this.removeAttribute("speed"):this.setAttribute("speed",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"amplitude",{get:function(){var b=this.getAttribute("amplitude");return RP(b,.15,.05,.4)},set:function(b){return b==null?this.removeAttribute("amplitude"):this.setAttribute("amplitude",""+$APP.S.g(b))},enumerable:!0,
37
+ configurable:!0});Object.defineProperty(a,"blur",{get:function(){var b=this.getAttribute("blur");return RP(b,12,0,40)},set:function(b){return b==null?this.removeAttribute("blur"):this.setAttribute("blur",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"goo",{get:function(){var b=this.getAttribute("goo");return RP(b,10,4,20)},set:function(b){return b==null?this.removeAttribute("goo"):this.setAttribute("goo",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
38
+ "tint",{get:function(){return this.getAttribute("tint")},set:function(b){return b==null?this.removeAttribute("tint"):this.setAttribute("tint",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"specular",{get:function(){return this.hasAttribute("specular")},set:function(b){return $APP.r(b)?this.setAttribute("specular",""):this.removeAttribute("specular")},enumerable:!0,configurable:!0});Object.defineProperty(a,"specularSize",{get:function(){var b=this.getAttribute("specular-size");
39
+ return RP(b,.4,.1,1)},set:function(b){return b==null?this.removeAttribute("specular-size"):this.setAttribute("specular-size",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"specularIntensity",{get:function(){var b=this.getAttribute("specular-intensity");return RP(b,.3,0,1)},set:function(b){return b==null?this.removeAttribute("specular-intensity"):this.setAttribute("specular-intensity",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},
40
+ set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"mode",{get:function(){var b=this.getAttribute("mode");return $APP.D.i(b,"submerged")?"submerged":"surface"},set:function(b){return b==null?this.removeAttribute("mode"):this.setAttribute("mode",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"frost",{get:function(){var b=this.getAttribute("frost");return RP(b,.5,0,1)},
41
+ set:function(b){return b==null?this.removeAttribute("frost"):this.setAttribute("frost",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"color1",{get:function(){return this.getAttribute("color-1")},set:function(b){return b==null?this.removeAttribute("color-1"):this.setAttribute("color-1",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"color2",{get:function(){return this.getAttribute("color-2")},set:function(b){return b==null?this.removeAttribute("color-2"):
42
+ this.setAttribute("color-2",""+$APP.S.g(b))},enumerable:!0,configurable:!0})},TQ=function(){var a=class extends HTMLElement{};a.observedAttributes=SQ;a.prototype.connectedCallback=function(){var b=this,c=PQ(b);b.__xLiquidGlassModel=c;b.__xLiquidGlassTime=0;b.__xLiquidGlassPA=!1;b.__xLiquidGlassPX=0;b.__xLiquidGlassPY=0;b.__xLiquidGlassGT=0;$APP.r($APP.l(b,"__xLiquidGlassRefs"))||BQ(b);EQ(b);c=new ResizeObserver(function(d){return MQ(b,d)});b.__xLiquidGlassRO=c;c.observe(b);OQ(b);NQ(b);return null};
43
+ a.prototype.disconnectedCallback=function(){KQ(this);OQ(this);var b=$APP.l(this,"__xLiquidGlassRO");$APP.r(b)&&(b.disconnect(),this.__xLiquidGlassRO=null);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.r($APP.l(this,"__xLiquidGlassRefs"))&&QQ(this);return null};RQ(a.prototype);return a},UQ=function(){$APP.r(customElements.get("x-liquid-glass"))||customElements.define("x-liquid-glass",TQ());return null},WP=new $APP.M(null,"surface","surface",699915646),zQ=new $APP.M(null,
44
+ "core","core",-86019209),oQ=new $APP.M(null,"specular-intensity","specular-intensity",437849876),aQ=new $APP.M(null,"amplitude-raw","amplitude-raw",-673525115),jQ=new $APP.M(null,"goo","goo",-1253057564),uQ=new $APP.M(null,"glass","glass",1652756718),wQ=new $APP.M(null,"filter","filter",-948537934),iQ=new $APP.M(null,"frost","frost",-3478780),mQ=new $APP.M(null,"specular-size","specular-size",757318993),DQ=new $APP.M(null,"submerged","submerged",1636004473),lQ=new $APP.M(null,"tint","tint",-1286736913),
45
+ AQ=new $APP.M(null,"grain","grain",2007662171),ZP=new $APP.M(null,"tint-raw","tint-raw",-653441954),eQ=new $APP.M(null,"color-2-raw","color-2-raw",-1440423537),hQ=new $APP.M(null,"specular-attr","specular-attr",-716021610),bQ=new $APP.M(null,"specular-intensity-raw","specular-intensity-raw",109079177),cQ=new $APP.M(null,"speed-raw","speed-raw",1756460778),gQ=new $APP.M(null,"goo-raw","goo-raw",59658675),YP=new $APP.M(null,"specular-size-raw","specular-size-raw",592980345),fQ=new $APP.M(null,"color-1-raw",
46
+ "color-1-raw",-1322552111),vQ=new $APP.M(null,"g","g",1738089905),kQ=new $APP.M(null,"amplitude","amplitude",-1387734203),yQ=new $APP.M(null,"gradient","gradient",-1983908971),dQ=new $APP.M(null,"frost-raw","frost-raw",1383732749),nQ=new $APP.M(null,"specular?","specular?",964138290),$P=new $APP.M(null,"blobs-raw","blobs-raw",1729393761),xQ=new $APP.M(null,"satellites","satellites",644765266);var SQ="blobs speed amplitude blur goo tint specular specular-size specular-intensity disabled mode frost color-1 color-2".split(" ");
47
+ $APP.Q([iQ,jQ,kQ,new $APP.M(null,"specularSize","specularSize",-1757715579),$APP.gj,$APP.Yi,$APP.Ri,$APP.wk,lQ,new $APP.M(null,"color2","color2",1248091856),$APP.Jh,$APP.Fl,new $APP.M(null,"color1","color1",306558619),new $APP.M(null,"specularIntensity","specularIntensity",138075)],[new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,
48
+ 1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.V],null)]);var VP=new $APP.P(null,2,["surface",WP,"submerged",DQ],null);var rQ={v:0},IQ=function IQ(a){if($APP.r(a.isConnected)){var c=performance.now(),d=$APP.l(a,"__xLiquidGlassTime")+Math.min(c-$APP.l(a,"__xLiquidGlassLF"),100)/1E3;a.__xLiquidGlassLF=c;a.__xLiquidGlassTime=d;FQ(a,d);GQ(a);HQ(a,d);$APP.n(a,"__xLiquidGlassRaf",requestAnimationFrame(function(){return IQ.g?IQ.g(a):IQ.call(null,a)}))}return null};$APP.ka("baredom.exports.x_liquid_glass.init",UQ);export const init=UQ;
@@ -1,11 +1,11 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var pM=function(a){var b=$APP.N(a);a=$APP.I(b,$APP.Xh);var c=$APP.I(b,$APP.Di),d=$APP.I(b,$APP.jh);b=$APP.I(b,$APP.Z);a=$APP.n(a)?a:"";c=$APP.J(c);d=$APP.n(d)?d:"";d=$APP.K(nM,d)?d:"";b=$APP.n(b)?b:"";b=$APP.K(oM,b)?b:"";return new $APP.R(null,4,[$APP.Xh,a,$APP.Di,c,$APP.jh,d,$APP.Z,b],null)},qM=function(a){return $APP.l(a,"__xMenuItemInit")===!0},rM=function(a){return new $APP.R(null,4,[$APP.Xh,a.getAttribute("value"),$APP.Di,a.hasAttribute("disabled"),$APP.jh,a.getAttribute("variant"),$APP.Z,a.getAttribute("type")],
3
- null)},sM=function(a){var b=a.getAttribute("value");return a.dispatchEvent(new CustomEvent("x-menu-item-select",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))},tM=function(a){var b=$APP.l(a,"__xMenuItemRefs");b=$APP.n(b)?$APP.l(b,"base"):null;var c=pM(rM(a));if($APP.n(b)){if($APP.C.h($APP.Z.g(c),"divider"))return a.setAttribute("role","separator"),a.removeAttribute("tabindex"),a.removeAttribute("aria-disabled"),b.setAttribute("data-type","divider"),b.setAttribute("data-variant",""),b.setAttribute("data-disabled",
4
- "false");a.setAttribute("role","menuitem");a.setAttribute("tabindex","-1");b.setAttribute("data-type","");b.setAttribute("data-variant",$APP.jh.g(c));b.setAttribute("data-disabled",$APP.n($APP.Di.g(c))?"true":"false");return $APP.n($APP.Di.g(c))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")}return null},uM=function(a){function b(){return e.assignedNodes().length>0?a.setAttribute("has-icon",""):a.removeAttribute("has-icon")}function c(h){var k=h.key,m=pM(rM(a));($APP.C.h(k,
5
- "Enter")||$APP.C.h(k," "))&&$APP.r($APP.Di.g(m))&&$APP.O($APP.Z.g(m),"divider")?(h.preventDefault(),h=sM(a)):h=null;return h}function d(h){var k=pM(rM(a));var m=$APP.Di.g(k);m=$APP.n(m)?m:$APP.C.h($APP.Z.g(k),"divider");$APP.n(m)&&h.preventDefault();return $APP.r($APP.Di.g(k))&&$APP.O($APP.Z.g(k),"divider")?sM(a):null}var e=$APP.l($APP.l(a,"__xMenuItemRefs"),"icon-slot"),g={};a.addEventListener("click",d);a.addEventListener("keydown",c);e.addEventListener("slotchange",b);g.click=d;g.keydown=c;g["icon-slotchange"]=
6
- b;a.__xMenuItemHandlers=g},vM=function(a){Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.n(b)?this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,
7
- "variant",{get:function(){return this.getAttribute("variant")},set:function(b){return $APP.n(b)?this.setAttribute("variant",b):this.removeAttribute("variant")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"type",{get:function(){return this.getAttribute("type")},set:function(b){return $APP.n(b)?this.setAttribute("type",b):this.removeAttribute("type")},configurable:!0,enumerable:!0})},xM=function(){var a=class extends HTMLElement{};a.observedAttributes=wM;a.prototype.connectedCallback=
8
- function(){if(qM(this)){uM(this);var b=tM(this)}else{if(!qM(this)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style");b=document.createElement("div");var e=document.createElement("span"),g=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("slot"),m=document.createElement("hr");d.textContent=":host{display:block;outline:none;color-scheme:light dark;--x-menu-item-color:#111827;--x-menu-item-hover-bg:#f3f4f6;--x-menu-item-focus-bg:#eff6ff;--x-menu-item-focus-color:#1d4ed8;--x-menu-item-disabled-opacity:0.45;--x-menu-item-danger-color:#dc2626;--x-menu-item-danger-hover-bg:#fef2f2;--x-menu-item-padding:8px 12px;--x-menu-item-border-radius:4px;--x-menu-item-font-size:0.9375rem;--x-menu-item-icon-gap:8px;--x-menu-item-divider-color:#e5e7eb;}:host([disabled]){pointer-events:none;}@media (prefers-color-scheme:dark){:host{--x-menu-item-color:#f9fafb;--x-menu-item-hover-bg:#1f2937;--x-menu-item-focus-bg:#1e3a5f;--x-menu-item-focus-color:#60a5fa;--x-menu-item-danger-color:#f87171;--x-menu-item-danger-hover-bg:#2d1515;--x-menu-item-divider-color:#374151;}}.base{display:flex;align-items:center;gap:var(--x-menu-item-icon-gap);padding:var(--x-menu-item-padding);border-radius:var(--x-menu-item-border-radius);font-size:var(--x-menu-item-font-size);color:var(--x-menu-item-color);cursor:pointer;user-select:none;transition:background 100ms ease,color 100ms ease;}.base:hover{background:var(--x-menu-item-hover-bg);}:host(:focus) .base{background:var(--x-menu-item-focus-bg);color:var(--x-menu-item-focus-color);}.base[data-variant\x3d'danger']{color:var(--x-menu-item-danger-color);}.base[data-variant\x3d'danger']:hover{background:var(--x-menu-item-danger-hover-bg);}:host(:focus) .base[data-variant\x3d'danger']{background:var(--x-menu-item-danger-hover-bg);}.base[data-disabled\x3d'true']{opacity:var(--x-menu-item-disabled-opacity);cursor:default;pointer-events:none;}.base[data-type\x3d'divider']{padding:0;cursor:default;pointer-events:none;}.icon-span{display:none;flex-shrink:0;align-items:center;}:host([has-icon]) .icon-span{display:flex;}.divider-hr{display:none;}.base[data-type\x3d'divider'] .icon-span,.base[data-type\x3d'divider'] .label-span{display:none;}.base[data-type\x3d'divider'] .divider-hr{display:block;width:100%;border:none;border-top:1px solid var(--x-menu-item-divider-color);margin:4px 0;}@media (prefers-reduced-motion:reduce){.base{transition:none;}}";
9
- b.setAttribute("part","base");b.className="base";e.setAttribute("part","icon");e.className="icon-span";g.setAttribute("name","icon");e.appendChild(g);h.className="label-span";h.appendChild(k);m.className="divider-hr";b.appendChild(e);b.appendChild(h);b.appendChild(m);c.appendChild(d);c.appendChild(b);c={};c.base=b;c["icon-span"]=e;c["icon-slot"]=g;this.__xMenuItemRefs=c;uM(this);this.__xMenuItemInit=!0}tM(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMenuItemHandlers");
10
- var c=$APP.l(this,"__xMenuItemRefs");if($APP.n(b)){var d=$APP.l(b,"keydown"),e=$APP.l(b,"icon-slotchange");c=$APP.n(c)?$APP.l(c,"icon-slot"):null;this.removeEventListener("click",$APP.l(b,"click"));this.removeEventListener("keydown",d);b=$APP.n(c)?c.removeEventListener("slotchange",e):null}else b=null;return b};a.prototype.attributeChangedCallback=function(){return qM(this)?tM(this):null};vM(a);return a},yM=function(){return $APP.n(customElements.get("x-menu-item"))?null:customElements.define("x-menu-item",
11
- xM())};var wM=["value","disabled","variant","type"],nM=new $APP.S(null,new $APP.R(null,2,["",null,"danger",null],null),null),oM=new $APP.S(null,new $APP.R(null,2,["",null,"divider",null],null),null);$APP.Ed(["x-menu-item-select",new $APP.R(null,1,[$APP.V,new $APP.R(null,1,[$APP.Xh,$APP.Y],null)],null)]);$APP.ja("baredom.exports.x_menu_item.init",yM);export const init=yM;
2
+ var eP=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.ui);var c=$APP.G(b,$APP.gj),d=$APP.G(b,$APP.Fh);b=$APP.G(b,$APP.Z);a=$APP.r(a)?a:"";c=$APP.I(c);d=$APP.r(d)?d:"";d=$APP.J(cP,d)?d:"";b=$APP.r(b)?b:"";b=$APP.J(dP,b)?b:"";return new $APP.P(null,4,[$APP.ui,a,$APP.gj,c,$APP.Fh,d,$APP.Z,b],null)},fP=function(a){return $APP.l(a,"__xMenuItemInit")===!0},gP=function(a){return new $APP.P(null,4,[$APP.ui,a.getAttribute("value"),$APP.gj,a.hasAttribute("disabled"),$APP.Fh,a.getAttribute("variant"),$APP.Z,a.getAttribute("type")],
3
+ null)},hP=function(a){var b=a.getAttribute("value");return a.dispatchEvent(new CustomEvent("x-menu-item-select",{detail:{value:$APP.r(b)?b:""},bubbles:!0,composed:!0}))},iP=function(a){var b=$APP.l(a,"__xMenuItemRefs");b=$APP.r(b)?$APP.l(b,"base"):null;var c=eP(gP(a));if($APP.r(b)){if($APP.D.i($APP.Z.g(c),"divider"))return a.setAttribute("role","separator"),a.removeAttribute("tabindex"),a.removeAttribute("aria-disabled"),b.setAttribute("data-type","divider"),b.setAttribute("data-variant",""),b.setAttribute("data-disabled",
4
+ "false");a.setAttribute("role","menuitem");a.setAttribute("tabindex","-1");b.setAttribute("data-type","");b.setAttribute("data-variant",$APP.Fh.g(c));b.setAttribute("data-disabled",$APP.r($APP.gj.g(c))?"true":"false");return $APP.r($APP.gj.g(c))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")}return null},jP=function(a){function b(){return e.assignedNodes().length>0?a.setAttribute("has-icon",""):a.removeAttribute("has-icon")}function c(h){var k=h.key,m=eP(gP(a));($APP.D.i(k,
5
+ "Enter")||$APP.D.i(k," "))&&$APP.t($APP.gj.g(m))&&$APP.O($APP.Z.g(m),"divider")?(h.preventDefault(),h=hP(a)):h=null;return h}function d(h){var k=eP(gP(a));var m=$APP.gj.g(k);m=$APP.r(m)?m:$APP.D.i($APP.Z.g(k),"divider");$APP.r(m)&&h.preventDefault();return $APP.t($APP.gj.g(k))&&$APP.O($APP.Z.g(k),"divider")?hP(a):null}var e=$APP.l($APP.l(a,"__xMenuItemRefs"),"icon-slot"),g={};a.addEventListener("click",d);a.addEventListener("keydown",c);e.addEventListener("slotchange",b);g.click=d;g.keydown=c;g["icon-slotchange"]=
6
+ b;a.__xMenuItemHandlers=g},kP=function(a){Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.r(b)?this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,
7
+ "variant",{get:function(){return this.getAttribute("variant")},set:function(b){return $APP.r(b)?this.setAttribute("variant",b):this.removeAttribute("variant")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"type",{get:function(){return this.getAttribute("type")},set:function(b){return $APP.r(b)?this.setAttribute("type",b):this.removeAttribute("type")},configurable:!0,enumerable:!0})},mP=function(){var a=class extends HTMLElement{};a.observedAttributes=lP;a.prototype.connectedCallback=
8
+ function(){if(fP(this)){jP(this);var b=iP(this)}else{if(!fP(this)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style");b=document.createElement("div");var e=document.createElement("span"),g=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("slot"),m=document.createElement("hr");d.textContent=":host{display:block;outline:none;color-scheme:light dark;--x-menu-item-color:#111827;--x-menu-item-hover-bg:#f3f4f6;--x-menu-item-focus-bg:#eff6ff;--x-menu-item-focus-color:#1d4ed8;--x-menu-item-disabled-opacity:0.45;--x-menu-item-danger-color:#dc2626;--x-menu-item-danger-hover-bg:#fef2f2;--x-menu-item-padding:8px 12px;--x-menu-item-border-radius:4px;--x-menu-item-font-size:0.9375rem;--x-menu-item-icon-gap:8px;--x-menu-item-divider-color:#e5e7eb;}:host([disabled]){pointer-events:none;}@media (prefers-color-scheme:dark){:host{--x-menu-item-color:#f9fafb;--x-menu-item-hover-bg:#1f2937;--x-menu-item-focus-bg:#1e3a5f;--x-menu-item-focus-color:#60a5fa;--x-menu-item-danger-color:#f87171;--x-menu-item-danger-hover-bg:#2d1515;--x-menu-item-divider-color:#374151;}}.base{display:flex;align-items:center;gap:var(--x-menu-item-icon-gap);padding:var(--x-menu-item-padding);border-radius:var(--x-menu-item-border-radius);font-size:var(--x-menu-item-font-size);color:var(--x-menu-item-color);cursor:pointer;user-select:none;transition:background 100ms ease,color 100ms ease;}.base:hover{background:var(--x-menu-item-hover-bg);}:host(:focus) .base{background:var(--x-menu-item-focus-bg);color:var(--x-menu-item-focus-color);}.base[data-variant\x3d'danger']{color:var(--x-menu-item-danger-color);}.base[data-variant\x3d'danger']:hover{background:var(--x-menu-item-danger-hover-bg);}:host(:focus) .base[data-variant\x3d'danger']{background:var(--x-menu-item-danger-hover-bg);}.base[data-disabled\x3d'true']{opacity:var(--x-menu-item-disabled-opacity);cursor:default;pointer-events:none;}.base[data-type\x3d'divider']{padding:0;cursor:default;pointer-events:none;}.icon-span{display:none;flex-shrink:0;align-items:center;}:host([has-icon]) .icon-span{display:flex;}.divider-hr{display:none;}.base[data-type\x3d'divider'] .icon-span,.base[data-type\x3d'divider'] .label-span{display:none;}.base[data-type\x3d'divider'] .divider-hr{display:block;width:100%;border:none;border-top:1px solid var(--x-menu-item-divider-color);margin:4px 0;}@media (prefers-reduced-motion:reduce){.base{transition:none;}}";
9
+ b.setAttribute("part","base");b.className="base";e.setAttribute("part","icon");e.className="icon-span";g.setAttribute("name","icon");e.appendChild(g);h.className="label-span";h.appendChild(k);m.className="divider-hr";b.appendChild(e);b.appendChild(h);b.appendChild(m);c.appendChild(d);c.appendChild(b);c={};c.base=b;c["icon-span"]=e;c["icon-slot"]=g;this.__xMenuItemRefs=c;jP(this);this.__xMenuItemInit=!0}iP(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMenuItemHandlers");
10
+ var c=$APP.l(this,"__xMenuItemRefs");if($APP.r(b)){var d=$APP.l(b,"keydown"),e=$APP.l(b,"icon-slotchange");c=$APP.r(c)?$APP.l(c,"icon-slot"):null;this.removeEventListener("click",$APP.l(b,"click"));this.removeEventListener("keydown",d);b=$APP.r(c)?c.removeEventListener("slotchange",e):null}else b=null;return b};a.prototype.attributeChangedCallback=function(){return fP(this)?iP(this):null};kP(a);return a},nP=function(){return $APP.r(customElements.get("x-menu-item"))?null:customElements.define("x-menu-item",
11
+ mP())};var lP=["value","disabled","variant","type"],cP=new $APP.R(null,new $APP.P(null,2,["",null,"danger",null],null),null),dP=new $APP.R(null,new $APP.P(null,2,["",null,"divider",null],null),null);$APP.Sd(["x-menu-item-select",new $APP.P(null,1,[$APP.U,new $APP.P(null,1,[$APP.ui,$APP.Y],null)],null)]);$APP.ka("baredom.exports.x_menu_item.init",nP);export const init=nP;
package/dist/x-menu.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var qD=function(a){return $APP.l(a,"__xMenuInit")===!0},rD=function(a){a=a.querySelectorAll("x-menu-item");for(var b=[],c=a.length,d=0;;)if(d<c){var e=a[d];$APP.r(e.hasAttribute("disabled"))&&$APP.O(e.getAttribute("type"),"divider")&&b.push(e);d+=1}else break;return b},sD=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0}))},vD=function(a){$APP.n(a.hasAttribute("open"))||(a.setAttribute("open",""),sD(a,"x-menu-open",{}));if($APP.n(null)){a=rD(a);var b=a.length;
3
- return b>0?$APP.C.h(null,tD)?a[0].focus():$APP.C.h(null,uD)?a[b-1].focus():null:null}return null},wD=function(a,b){$APP.n(a.hasAttribute("open"))&&(a.removeAttribute("open"),sD(a,"x-menu-close",{}));return $APP.n(b)?(a=$APP.l(a,"__xMenuRefs"),a=$APP.n(a)?$APP.l(a,"trigger-slot"):null,a=$APP.n(a)?a.assignedElements():null,a=$APP.n($APP.n(a)?a.length>0:a)?a[0]:null,$APP.n(a)?a.focus():null):null},xD=function(a,b){var c=b.composedPath();a=$APP.lc(a.assignedElements());return $APP.J($APP.Id(function(d){return c.indexOf(d)>
4
- -1},a))},yD=function(a,b){var c=b.key,d=a.hasAttribute("open");if($APP.C.h(c,"Escape"))return $APP.n(d)?(b.preventDefault(),wD(a,!0)):null;if($APP.C.h(c,"Tab"))return $APP.n(d)?wD(a,!1):null;if($APP.C.h(c,"ArrowDown")||$APP.C.h(c,"ArrowUp")){var e=rD(a),g=e.length;if(g>0){b.preventDefault();if($APP.n(d))return a=e.indexOf(document.activeElement),c=$APP.C.h(c,"ArrowDown")?a>=g-1?0:a<0?0:a+1:a<=0?g-1:a-1,e[c].focus();vD(a);return e[$APP.C.h(c,"ArrowDown")?0:g-1].focus()}}else if($APP.C.h(c,"Home")){if($APP.n(d)&&
5
- (e=rD(a),e.length>0))return b.preventDefault(),e[0].focus()}else if($APP.C.h(c,"End")&&$APP.n(d)&&(e=rD(a),e.length>0))return b.preventDefault(),e[e.length-1].focus();return null},AD=function(a){var b=$APP.l(a,"__xMenuRefs");b=$APP.n(b)?$APP.l(b,"popup"):null;a=new $APP.R(null,3,[$APP.pk,a.hasAttribute("open"),$APP.Ei,a.getAttribute("placement"),$APP.U,a.getAttribute("label")],null);a=$APP.N(a);var c=$APP.I(a,$APP.pk),d=$APP.I(a,$APP.Ei);a=$APP.I(a,$APP.U);c=$APP.J(c);d=$APP.n(d)?d:"";d=$APP.K(zD,
6
- d)?d:"bottom-start";a=new $APP.R(null,3,[$APP.pk,c,$APP.Ei,d,$APP.U,$APP.n(a)?a:""],null);return $APP.n(b)?(b.setAttribute("data-placement",$APP.Ei.g(a)),a=$APP.U.g(a),$APP.n($APP.n(a)?$APP.O(a,""):a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")):null},BD=function(a){function b(h){h.stopPropagation();h=h.detail.value;wD(a,!1);return sD(a,"x-menu-select",{value:$APP.n(h)?h:""})}function c(h){return yD(a,h)}function d(h){$APP.n(a.hasAttribute("open"))?(h=h.composedPath(),h=$APP.C.h(-1,
7
- h.indexOf(a))?wD(a,!1):null):h=null;return h}function e(h){var k=$APP.l(a,"__xMenuRefs");k=$APP.n(k)?$APP.l(k,"trigger-slot"):null;return $APP.n($APP.n(k)?xD(k,h):k)?$APP.n(a.hasAttribute("open"))?wD(a,!0):vD(a):null}var g={};a.addEventListener("click",e);document.addEventListener("click",d,!0);a.addEventListener("keydown",c);a.addEventListener("x-menu-item-select",b);g.click=e;g["doc-click"]=d;g.keydown=c;g["item-select"]=b;a.__xMenuHandlers=g},CD=function(a){Object.defineProperty(a.prototype,"open",
8
- {get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?this.setAttribute("open",""):this.removeAttribute("open")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"placement",{get:function(){return this.getAttribute("placement")},set:function(b){return $APP.n(b)?this.setAttribute("placement",b):this.removeAttribute("placement")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"label",{get:function(){return this.getAttribute("label")},
9
- set:function(b){return $APP.n(b)?this.setAttribute("label",b):this.removeAttribute("label")},configurable:!0,enumerable:!0})},ED=function(){var a=class extends HTMLElement{};a.observedAttributes=DD;a.prototype.connectedCallback=function(){if(qD(this)){BD(this);var b=AD(this)}else{if(!qD(this)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style");b=document.createElement("div");var e=document.createElement("slot"),g=document.createElement("div"),h=document.createElement("slot");
2
+ var nG=function(a){return $APP.l(a,"__xMenuInit")===!0},oG=function(a){a=a.querySelectorAll("x-menu-item");for(var b=[],c=a.length,d=0;;)if(d<c){var e=a[d];$APP.t(e.hasAttribute("disabled"))&&$APP.O(e.getAttribute("type"),"divider")&&b.push(e);d+=1}else break;return b},pG=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0}))},sG=function(a){$APP.r(a.hasAttribute("open"))||(a.setAttribute("open",""),pG(a,"x-menu-open",{}));if($APP.r(null)){a=oG(a);var b=a.length;
3
+ return b>0?$APP.D.i(null,qG)?a[0].focus():$APP.D.i(null,rG)?a[b-1].focus():null:null}return null},tG=function(a,b){$APP.r(a.hasAttribute("open"))&&(a.removeAttribute("open"),pG(a,"x-menu-close",{}));return $APP.r(b)?(a=$APP.l(a,"__xMenuRefs"),a=$APP.r(a)?$APP.l(a,"trigger-slot"):null,a=$APP.r(a)?a.assignedElements():null,a=$APP.r($APP.r(a)?a.length>0:a)?a[0]:null,$APP.r(a)?a.focus():null):null},uG=function(a,b){var c=b.composedPath();a=$APP.xc(a.assignedElements());return $APP.I($APP.Wd(function(d){return c.indexOf(d)>
4
+ -1},a))},vG=function(a,b){var c=b.key,d=a.hasAttribute("open");if($APP.D.i(c,"Escape"))return $APP.r(d)?(b.preventDefault(),tG(a,!0)):null;if($APP.D.i(c,"Tab"))return $APP.r(d)?tG(a,!1):null;if($APP.D.i(c,"ArrowDown")||$APP.D.i(c,"ArrowUp")){var e=oG(a),g=e.length;if(g>0){b.preventDefault();if($APP.r(d))return a=e.indexOf(document.activeElement),c=$APP.D.i(c,"ArrowDown")?a>=g-1?0:a<0?0:a+1:a<=0?g-1:a-1,e[c].focus();sG(a);return e[$APP.D.i(c,"ArrowDown")?0:g-1].focus()}}else if($APP.D.i(c,"Home")){if($APP.r(d)&&
5
+ (e=oG(a),e.length>0))return b.preventDefault(),e[0].focus()}else if($APP.D.i(c,"End")&&$APP.r(d)&&(e=oG(a),e.length>0))return b.preventDefault(),e[e.length-1].focus();return null},xG=function(a){var b=$APP.l(a,"__xMenuRefs");b=$APP.r(b)?$APP.l(b,"popup"):null;a=new $APP.P(null,3,[$APP.hl,a.hasAttribute("open"),$APP.hj,a.getAttribute("placement"),$APP.T,a.getAttribute("label")],null);a=$APP.N(a);var c=$APP.G(a,$APP.hl),d=$APP.G(a,$APP.hj);a=$APP.G(a,$APP.T);c=$APP.I(c);d=$APP.r(d)?d:"";d=$APP.J(wG,
6
+ d)?d:"bottom-start";a=new $APP.P(null,3,[$APP.hl,c,$APP.hj,d,$APP.T,$APP.r(a)?a:""],null);return $APP.r(b)?(b.setAttribute("data-placement",$APP.hj.g(a)),a=$APP.T.g(a),$APP.r($APP.r(a)?$APP.O(a,""):a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")):null},yG=function(a){function b(h){h.stopPropagation();h=h.detail.value;tG(a,!1);return pG(a,"x-menu-select",{value:$APP.r(h)?h:""})}function c(h){return vG(a,h)}function d(h){$APP.r(a.hasAttribute("open"))?(h=h.composedPath(),h=$APP.D.i(-1,
7
+ h.indexOf(a))?tG(a,!1):null):h=null;return h}function e(h){var k=$APP.l(a,"__xMenuRefs");k=$APP.r(k)?$APP.l(k,"trigger-slot"):null;return $APP.r($APP.r(k)?uG(k,h):k)?$APP.r(a.hasAttribute("open"))?tG(a,!0):sG(a):null}var g={};a.addEventListener("click",e);document.addEventListener("click",d,!0);a.addEventListener("keydown",c);a.addEventListener("x-menu-item-select",b);g.click=e;g["doc-click"]=d;g.keydown=c;g["item-select"]=b;a.__xMenuHandlers=g},zG=function(a){Object.defineProperty(a.prototype,"open",
8
+ {get:function(){return this.hasAttribute("open")},set:function(b){return $APP.r(b)?this.setAttribute("open",""):this.removeAttribute("open")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"placement",{get:function(){return this.getAttribute("placement")},set:function(b){return $APP.r(b)?this.setAttribute("placement",b):this.removeAttribute("placement")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"label",{get:function(){return this.getAttribute("label")},
9
+ set:function(b){return $APP.r(b)?this.setAttribute("label",b):this.removeAttribute("label")},configurable:!0,enumerable:!0})},BG=function(){var a=class extends HTMLElement{};a.observedAttributes=AG;a.prototype.connectedCallback=function(){if(nG(this)){yG(this);var b=xG(this)}else{if(!nG(this)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style");b=document.createElement("div");var e=document.createElement("slot"),g=document.createElement("div"),h=document.createElement("slot");
10
10
  d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-menu-bg:#ffffff;--x-menu-border:1px solid #e5e7eb;--x-menu-border-radius:8px;--x-menu-shadow:0 4px 16px rgba(0,0,0,0.12);--x-menu-min-width:160px;--x-menu-padding:4px;--x-menu-z-index:1000;}@media (prefers-color-scheme:dark){:host{--x-menu-bg:#1f2937;--x-menu-border:1px solid #374151;--x-menu-shadow:0 4px 16px rgba(0,0,0,0.4);}}.base{position:relative;display:inline-block;}.popup{display:none;position:absolute;background:var(--x-menu-bg);border:var(--x-menu-border);border-radius:var(--x-menu-border-radius);box-shadow:var(--x-menu-shadow);min-width:var(--x-menu-min-width);padding:var(--x-menu-padding);z-index:var(--x-menu-z-index);box-sizing:border-box;}:host([open]) .popup{display:block;}.popup[data-placement\x3d'bottom-start']{top:100%;left:0;margin-top:4px;}.popup[data-placement\x3d'bottom-end']{top:100%;right:0;margin-top:4px;}.popup[data-placement\x3d'top-start']{bottom:100%;left:0;margin-bottom:4px;}.popup[data-placement\x3d'top-end']{bottom:100%;right:0;margin-bottom:4px;}";
11
- b.setAttribute("part","base");b.className="base";e.setAttribute("name","trigger");g.setAttribute("part","popup");g.className="popup";g.setAttribute("role","menu");g.appendChild(h);b.appendChild(e);b.appendChild(g);c.appendChild(d);c.appendChild(b);c={};c.base=b;c.popup=g;c["trigger-slot"]=e;c["item-slot"]=h;this.__xMenuRefs=c;BD(this);this.__xMenuInit=!0}AD(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMenuHandlers");if($APP.n(b)){var c=$APP.l(b,"doc-click"),
12
- d=$APP.l(b,"keydown"),e=$APP.l(b,"item-select");this.removeEventListener("click",$APP.l(b,"click"));document.removeEventListener("click",c,!0);this.removeEventListener("keydown",d);b=this.removeEventListener("x-menu-item-select",e)}else b=null;return b};a.prototype.attributeChangedCallback=function(){return qD(this)?AD(this):null};CD(a);return a},FD=function(){return $APP.n(customElements.get("x-menu"))?null:customElements.define("x-menu",ED())},uD=new $APP.M(null,"last","last",1105735132),tD=new $APP.M(null,
13
- "first","first",-644103046);var DD=["open","placement","label"],zD=new $APP.S(null,new $APP.R(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null);$APP.Ed(["x-menu-open",new $APP.R(null,1,[$APP.V,$APP.Fd],null),"x-menu-close",new $APP.R(null,1,[$APP.V,$APP.Fd],null),"x-menu-select",new $APP.R(null,1,[$APP.V,new $APP.R(null,1,[$APP.Xh,$APP.Y],null)],null)]);$APP.ja("baredom.exports.x_menu.init",FD);export const init=FD;
11
+ b.setAttribute("part","base");b.className="base";e.setAttribute("name","trigger");g.setAttribute("part","popup");g.className="popup";g.setAttribute("role","menu");g.appendChild(h);b.appendChild(e);b.appendChild(g);c.appendChild(d);c.appendChild(b);c={};c.base=b;c.popup=g;c["trigger-slot"]=e;c["item-slot"]=h;this.__xMenuRefs=c;yG(this);this.__xMenuInit=!0}xG(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMenuHandlers");if($APP.r(b)){var c=$APP.l(b,"doc-click"),
12
+ d=$APP.l(b,"keydown"),e=$APP.l(b,"item-select");this.removeEventListener("click",$APP.l(b,"click"));document.removeEventListener("click",c,!0);this.removeEventListener("keydown",d);b=this.removeEventListener("x-menu-item-select",e)}else b=null;return b};a.prototype.attributeChangedCallback=function(){return nG(this)?xG(this):null};zG(a);return a},CG=function(){return $APP.r(customElements.get("x-menu"))?null:customElements.define("x-menu",BG())},rG=new $APP.M(null,"last","last",1105735132),qG=new $APP.M(null,
13
+ "first","first",-644103046);var AG=["open","placement","label"],wG=new $APP.R(null,new $APP.P(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null);$APP.Sd(["x-menu-open",new $APP.P(null,1,[$APP.U,$APP.Td],null),"x-menu-close",new $APP.P(null,1,[$APP.U,$APP.Td],null),"x-menu-select",new $APP.P(null,1,[$APP.U,new $APP.P(null,1,[$APP.ui,$APP.Y],null)],null)]);$APP.ka("baredom.exports.x_menu.init",CG);export const init=CG;
@@ -1,28 +1,29 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Kz=function(a){if(typeof a==="string"){a=parseInt(a.trim(),10);var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?5:Math.min(10,Math.max(2,a))}return 5},Lz=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?40:Math.min(200,Math.max(10,a))}return 40},Mz=function(a){return typeof a==="string"&&a.trim().length>0?a.trim():"#6366f1"},Nz=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?
3
- 3:Math.min(20,Math.max(.5,a))}return 3},Oz=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?.02:Math.min(.1,Math.max(.001,a))}return.02},Pz=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?6:Math.min(30,Math.max(1,a))}return 6},Qz=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?12:Math.min(40,Math.max(4,a))}return 12},Rz=
4
- function(a){return typeof a==="string"&&a.trim().length>0?a.trim():"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10"},Tz=function(a){if(typeof a==="string"&&a.trim().length>0){var b=$APP.I(Sz,a.trim().toLowerCase());if($APP.n(b))return b;if(a.indexOf(",")>=0)return a=a.split(","),$APP.Je.m($APP.Td,$APP.Hg.h($APP.Od.g(function(c){return c.trim()}),$APP.Qd(function(c){return c.length>0})),a)}return null},Uz=function(a){for(var b=[],c=0;;)if(c<a)b.push(Math.max(.01,.35*Math.pow(.45,c))),c+=1;else break;
5
- return b},Vz=function(a,b){for(var c=[],d=0;;)if(d<b)c.push(Math.max(a*.5,a*(1-d*.08))),d+=1;else break;return c},Wz=function(a,b,c){return a+(b-a)*c},lA=function(a){a=$APP.mf([Xz,Yz,Zz,$z,aA,bA,$APP.eh,$APP.Xk,cA,dA],[a.getAttribute("blur"),a.getAttribute("noise-intensity"),a.getAttribute("blob-size"),a.getAttribute("palette"),a.getAttribute("noise-scale"),a.getAttribute("noise"),a.getAttribute("threshold"),a.getAttribute("color"),a.getAttribute("blob-count"),a.getAttribute("noise-speed")]);var b=
6
- $APP.N(a),c=$APP.I(b,dA);a=$APP.I(b,Xz);var d=$APP.I(b,Yz),e=$APP.I(b,Zz),g=$APP.I(b,$z),h=$APP.I(b,aA),k=$APP.I(b,bA),m=$APP.I(b,$APP.eh),p=$APP.I(b,$APP.Xk);b=$APP.I(b,cA);b=Kz(b);p=Mz(p);g=Tz(g);c=Oz(c);var q=[];if($APP.n($APP.n(g)?$APP.B(g)>0:g))for(var v=$APP.B(g),x=0;;)if(x<b)q.push($APP.fc(g,$APP.Vc(x,v))),x+=1;else break;else for(v=0;;)if(v<b)q.push(p),v+=1;else break;return $APP.mf([$APP.Ci,eA,fA,$APP.wk,$APP.fk,gA,hA,$APP.nh,iA,jA,kA],[p,g,c,q,Rz(m),Nz(h),b,Qz(a),Lz(e),k!=null,Pz(d)])},
7
- mA=function(a,b){b=$APP.N(b);b=$APP.I(b,$APP.Ci);return a.style.setProperty("--x-metaball-cursor-color",b)},oA=function(a){$APP.J(window.matchMedia("(prefers-reduced-motion:reduce)").matches)||(a.__xMetaballSeed=0,$APP.ma(a,"__xMetaballRaf",requestAnimationFrame(function(){return nA(a)})))},pA=function(a){function b(c){var d=$APP.hi.g($APP.l(a,"__xMetaballRefs"));if($APP.n(d)){d=d.getBoundingClientRect();var e=$APP.l(a,"__xMetaballMouse");e.x=c.clientX-d.left;e.y=c.clientY-d.top}return null}window.addEventListener("pointermove",
8
- b);a.__xMetaballHandler=b},qA=function(a){var b=$APP.l(a,"__xMetaballHandler");$APP.n(b)&&(window.removeEventListener("pointermove",b),a.__xMetaballHandler=null)},rA=function(a){Object.defineProperty(a,"blobCount",{get:function(){return Kz(this.getAttribute("blob-count"))},set:function(b){return b==null?this.removeAttribute("blob-count"):this.setAttribute("blob-count",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"blobSize",{get:function(){return Lz(this.getAttribute("blob-size"))},
9
- set:function(b){return b==null?this.removeAttribute("blob-size"):this.setAttribute("blob-size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"color",{get:function(){return Mz(this.getAttribute("color"))},set:function(b){return b==null?this.removeAttribute("color"):this.setAttribute("color",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"noise",{get:function(){return this.hasAttribute("noise")},set:function(b){return $APP.n(b)?this.setAttribute("noise",
10
- ""):this.removeAttribute("noise")},enumerable:!0,configurable:!0});Object.defineProperty(a,"noiseScale",{get:function(){return Nz(this.getAttribute("noise-scale"))},set:function(b){return b==null?this.removeAttribute("noise-scale"):this.setAttribute("noise-scale",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"noiseSpeed",{get:function(){return Oz(this.getAttribute("noise-speed"))},set:function(b){return b==null?this.removeAttribute("noise-speed"):this.setAttribute("noise-speed",
11
- ""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"noiseIntensity",{get:function(){return Pz(this.getAttribute("noise-intensity"))},set:function(b){return b==null?this.removeAttribute("noise-intensity"):this.setAttribute("noise-intensity",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"blur",{get:function(){return Qz(this.getAttribute("blur"))},set:function(b){return b==null?this.removeAttribute("blur"):this.setAttribute("blur",""+$APP.T.g(b))},enumerable:!0,
12
- configurable:!0});Object.defineProperty(a,"threshold",{get:function(){return Rz(this.getAttribute("threshold"))},set:function(b){return b==null?this.removeAttribute("threshold"):this.setAttribute("threshold",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"palette",{get:function(){return Tz(this.getAttribute("palette"))},set:function(b){return b==null||$APP.C.h("",b)?this.removeAttribute("palette"):this.setAttribute("palette",""+$APP.T.g(b))},enumerable:!0,configurable:!0})},
13
- xA=function(){var a=class extends HTMLElement{};a.observedAttributes=sA;a.prototype.connectedCallback=function(){var b=lA(this);this.__xMetaballModel=b;this.__xMetaballMouse={x:0,y:0};if(!$APP.n($APP.l(this,"__xMetaballRefs"))){var c=$APP.l(this,"__xMetaballModel"),d=tA[0];tA[0]=d+1;var e="mb-"+$APP.T.g(d),g=this.attachShadow({mode:"open"}),h=document.createElement("style"),k=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");this.__xMetaballUid=d;h.textContent=
14
- uA;k.setAttribute("part","viewport");k.style.filter="url(#"+$APP.T.g(e)+")";m.style.position="absolute";m.style.width="0";m.style.height="0";m.style.overflow="hidden";var p=$APP.N(c);c=$APP.I(p,$APP.nh);d=$APP.I(p,$APP.fk);var q=$APP.I(p,jA),v=$APP.I(p,gA);p=$APP.I(p,kA);var x=document.createElementNS("http://www.w3.org/2000/svg","defs"),y=document.createElementNS("http://www.w3.org/2000/svg","filter"),A=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),D=document.createElementNS("http://www.w3.org/2000/svg",
15
- "feColorMatrix"),G=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence"),H=document.createElementNS("http://www.w3.org/2000/svg","feDisplacementMap");y.setAttribute("id",e);y.setAttribute("x","-20%");y.setAttribute("y","-20%");y.setAttribute("width","140%");y.setAttribute("height","140%");A.setAttribute("in","SourceGraphic");A.setAttribute("stdDeviation",""+$APP.T.g(c));A.setAttribute("result","blur");D.setAttribute("in","blur");D.setAttribute("type","matrix");D.setAttribute("values",
16
- d);D.setAttribute("result","threshold");G.setAttribute("type","fractalNoise");G.setAttribute("baseFrequency",""+$APP.T.g(.01*v));G.setAttribute("numOctaves","3");G.setAttribute("seed","0");G.setAttribute("result","noise");H.setAttribute("in","threshold");H.setAttribute("in2","noise");H.setAttribute("scale",$APP.n(q)?""+$APP.T.g(p):"0");H.setAttribute("xChannelSelector","R");H.setAttribute("yChannelSelector","G");y.appendChild(A);y.appendChild(D);y.appendChild(G);y.appendChild(H);x.appendChild(y);
17
- m.appendChild(x);e=new $APP.R(null,5,[$APP.Dj,y,$APP.ii,A,$APP.Nk,D,vA,G,wA,H],null);k.appendChild(m);g.appendChild(h);g.appendChild(k);this.__xMetaballRefs=$APP.Hf($APP.kc([e,new $APP.R(null,3,[$APP.Jh,g,$APP.hi,k,$APP.Ti,m],null)]))}g=$APP.l(this,"__xMetaballBlobs");if($APP.n(g)){h=g.length;for(k=0;;)if(k<h)m=g[k],$APP.n(m.parentNode)&&m.parentNode.removeChild(m),k+=1;else break;this.__xMetaballBlobs=[];this.__xMetaballPos=[]}h=$APP.N(b);g=$APP.I(h,hA);m=$APP.I(h,iA);h=$APP.I(h,$APP.wk);k=$APP.N($APP.l(this,
18
- "__xMetaballRefs"));k=$APP.I(k,$APP.hi);m=Vz(m,g);e=[];c=[];for(d=0;;)if(d<g)q=document.createElement("div"),v=m[d],q.className="blob",q.style.width=""+$APP.T.g(v)+"px",q.style.height=""+$APP.T.g(v)+"px",q.style.background=h[d],k.appendChild(q),e.push(q),c.push({x:0,y:0}),d+=1;else break;this.__xMetaballBlobs=e;this.__xMetaballPos=c;this.__xMetaballSpeeds=Uz(g);mA(this,b);this.setAttribute("aria-hidden","true");this.setAttribute("role","presentation");qA(this);pA(this);oA(this);return null};a.prototype.disconnectedCallback=
19
- function(){var b=$APP.l(this,"__xMetaballRaf");$APP.n(b)&&(cancelAnimationFrame(b),this.__xMetaballRaf=null);qA(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){if($APP.O(c,d)&&(this.__xMetaballModel=b=lA(this),$APP.n($APP.l(this,"__xMetaballRefs")))){d=$APP.N(b);c=$APP.I(d,hA);var e=$APP.I(d,iA);d=$APP.I(d,$APP.wk);var g=$APP.N($APP.l(this,"__xMetaballRefs")),h=$APP.I(g,$APP.hi);g=$APP.l(this,"__xMetaballBlobs");var k=$APP.l(this,"__xMetaballPos"),m=g.length;e=Vz(e,c);for(var p=
20
- m;;)if(p<c){var q=document.createElement("div");q.className="blob";h.appendChild(q);g.push(q);k.push({x:0,y:0});p+=1}else break;for(h=m;;)if(h>c)m=g.pop(),k.pop(),$APP.n(m.parentNode)&&m.parentNode.removeChild(m),--h;else break;for(k=0;;)if(k<c)h=g[k],m=e[k],h.style.width=""+$APP.T.g(m)+"px",h.style.height=""+$APP.T.g(m)+"px",h.style.background=d[k],k+=1;else break;this.__xMetaballSpeeds=Uz(c);g=$APP.N(b);h=$APP.I(g,$APP.nh);e=$APP.I(g,$APP.fk);c=$APP.I(g,jA);d=$APP.I(g,gA);g=$APP.I(g,kA);k=$APP.l(this,
21
- "__xMetaballRefs");m=$APP.ii.g(k);$APP.n(m)&&m.setAttribute("stdDeviation",""+$APP.T.g(h));h=$APP.Nk.g(k);$APP.n(h)&&h.setAttribute("values",e);e=vA.g(k);$APP.n(e)&&e.setAttribute("baseFrequency",""+$APP.T.g(.01*d));d=wA.g(k);$APP.n(d)&&d.setAttribute("scale",$APP.n(c)?""+$APP.T.g(g):"0");return mA(this,b)}return null};rA(a.prototype);return a},yA=function(){$APP.n(customElements.get("x-metaball-cursor"))||customElements.define("x-metaball-cursor",xA());return null},aA=new $APP.M(null,"noise-scale-raw",
22
- "noise-scale-raw",123215597),Yz=new $APP.M(null,"noise-intensity-raw","noise-intensity-raw",-116633534),jA=new $APP.M(null,"noise?","noise?",-38350370),iA=new $APP.M(null,"blob-size","blob-size",-1862159046),gA=new $APP.M(null,"noise-scale","noise-scale",-2033475279),bA=new $APP.M(null,"noise-attr","noise-attr",-1534959409),$z=new $APP.M(null,"palette-raw","palette-raw",-1398782582),wA=new $APP.M(null,"disp-el","disp-el",-726061474),eA=new $APP.M(null,"palette","palette",-456203511),cA=new $APP.M(null,
23
- "blob-count-raw","blob-count-raw",-1850938603),vA=new $APP.M(null,"turb-el","turb-el",-1332591596),dA=new $APP.M(null,"noise-speed-raw","noise-speed-raw",1761342974),fA=new $APP.M(null,"noise-speed","noise-speed",866692139),Xz=new $APP.M(null,"blur-raw","blur-raw",-2048416671),hA=new $APP.M(null,"blob-count","blob-count",-248711053),kA=new $APP.M(null,"noise-intensity","noise-intensity",747731519),Zz=new $APP.M(null,"blob-size-raw","blob-size-raw",530207878);var sA="blob-count blob-size color noise noise-scale noise-speed noise-intensity blur threshold palette".split(" ");
24
- $APP.mf([$APP.Ci,new $APP.M(null,"blobSize","blobSize",-64083896),new $APP.M(null,"noiseIntensity","noiseIntensity",-792053623),eA,new $APP.M(null,"noiseScale","noiseScale",2003002730),new $APP.M(null,"noise","noise",-994696820),$APP.fk,$APP.nh,new $APP.M(null,"noiseSpeed","noiseSpeed",-959403627),new $APP.M(null,"blobCount","blobCount",-1279691625)],[new $APP.R(null,1,[$APP.Z,$APP.Y],null),new $APP.R(null,1,[$APP.Z,$APP.W],null),new $APP.R(null,1,[$APP.Z,$APP.W],null),new $APP.R(null,1,[$APP.Z,$APP.Y],
25
- null),new $APP.R(null,1,[$APP.Z,$APP.W],null),new $APP.R(null,1,[$APP.Z,$APP.Ni],null),new $APP.R(null,1,[$APP.Z,$APP.Y],null),new $APP.R(null,1,[$APP.Z,$APP.W],null),new $APP.R(null,1,[$APP.Z,$APP.W],null),new $APP.R(null,1,[$APP.Z,$APP.W],null)]);
26
- var Sz=new $APP.R(null,5,["rainbow",new $APP.Q(null,5,5,$APP.fe,["#ef4444","#f59e0b","#22c55e","#3b82f6","#a855f7"],null),"ocean",new $APP.Q(null,5,5,$APP.fe,["#06b6d4","#0ea5e9","#6366f1","#8b5cf6","#0d9488"],null),"sunset",new $APP.Q(null,5,5,$APP.fe,["#ef4444","#f97316","#eab308","#ec4899","#f43f5e"],null),"neon",new $APP.Q(null,5,5,$APP.fe,["#22d3ee","#a78bfa","#f472b6","#34d399","#facc15"],null),"ember",new $APP.Q(null,5,5,$APP.fe,["#dc2626","#ea580c","#d97706","#b91c1c","#f59e0b"],null)],null);var tA=[0],uA=":host{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:var("+$APP.T.g("--x-metaball-cursor-z-index")+",9999);}[part\x3dviewport]{position:absolute;inset:var("+$APP.T.g("--x-metaball-cursor-inset")+",0);pointer-events:none;opacity:var("+$APP.T.g("--x-metaball-cursor-opacity")+",1);mix-blend-mode:var("+$APP.T.g("--x-metaball-cursor-blend-mode")+",normal);}.blob{position:absolute;border-radius:50%;will-change:transform;pointer-events:none;top:0;left:0;background:var("+
27
- $APP.T.g("--x-metaball-cursor-color")+",#6366f1);}@media(prefers-reduced-motion:reduce){.blob{transition:none!important;}}",nA=function nA(a){if($APP.n(a.isConnected)){var c=$APP.l(a,"__xMetaballMouse"),d=$APP.l(a,"__xMetaballBlobs"),e=$APP.l(a,"__xMetaballPos"),g=$APP.l(a,"__xMetaballSpeeds"),h=$APP.l(c,"x");c=$APP.l(c,"y");for(var k=$APP.l(a,"__xMetaballModel"),m=d.length,p=0;;)if(p<m){var q=e[p],v=g[p],x=Wz($APP.l(q,"x"),h,v);v=Wz($APP.l(q,"y"),c,v);var y=d[p];q.x=x;q.y=v;y.style.transform="translate("+
28
- $APP.T.g(x)+"px,"+$APP.T.g(v)+"px) translate(-50%,-50%)";p+=1}else break;$APP.n(jA.g(k))&&(d=$APP.l(a,"__xMetaballSeed")+fA.g(k),e=$APP.l(a,"__xMetaballRefs"),a.__xMetaballSeed=d,e=vA.g(e),$APP.n(e)&&e.setAttribute("seed",""+$APP.T.g(Math.floor(d))));$APP.ma(a,"__xMetaballRaf",requestAnimationFrame(function(){return nA.g?nA.g(a):nA.call(null,a)}))}return null};$APP.ja("baredom.exports.x_metaball_cursor.init",yA);export const init=yA;
2
+ var JC=function(a){if(typeof a==="string"){a=parseInt(a.trim(),10);var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?5:Math.min(10,Math.max(2,a))}return 5},KC=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?40:Math.min(200,Math.max(10,a))}return 40},LC=function(a){return typeof a==="string"&&a.trim().length>0?a.trim():"#6366f1"},MC=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?
3
+ 3:Math.min(20,Math.max(.5,a))}return 3},NC=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?.02:Math.min(.1,Math.max(.001,a))}return.02},OC=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?6:Math.min(30,Math.max(1,a))}return 6},PC=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?12:Math.min(40,Math.max(4,a))}return 12},QC=
4
+ function(a){return typeof a==="string"&&a.trim().length>0?a.trim():"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10"},SC=function(a){if(typeof a==="string"&&a.trim().length>0){var b=$APP.G(RC,a.trim().toLowerCase());if($APP.r(b))return b;if(a.indexOf(",")>=0)return a=a.split(","),$APP.af.o($APP.ie,$APP.$g.i($APP.de.g(function(c){return c.trim()}),$APP.fe(function(c){return c.length>0})),a)}return null},TC=function(a){for(var b=[],c=0;;)if(c<a)b.push(Math.max(.01,.35*Math.pow(.45,c))),c+=1;else break;
5
+ return b},UC=function(a,b){for(var c=[],d=0;;)if(d<b)c.push(Math.max(a*.5,a*(1-d*.08))),d+=1;else break;return c},VC=function(a,b,c){return a+(b-a)*c},jD=function(a){a=$APP.Q([$APP.pl,WC,XC,YC,ZC,$C,$APP.Ah,$APP.Vl,aD,bD],[a.getAttribute("blur"),a.getAttribute("noise-intensity"),a.getAttribute("blob-size"),a.getAttribute("palette"),a.getAttribute("noise-scale"),a.getAttribute("noise"),a.getAttribute("threshold"),a.getAttribute("color"),a.getAttribute("blob-count"),a.getAttribute("noise-speed")]);
6
+ var b=$APP.N(a),c=$APP.G(b,bD);a=$APP.G(b,$APP.pl);var d=$APP.G(b,WC),e=$APP.G(b,XC),g=$APP.G(b,YC),h=$APP.G(b,ZC),k=$APP.G(b,$C),m=$APP.G(b,$APP.Ah),p=$APP.G(b,$APP.Vl);b=$APP.G(b,aD);b=JC(b);p=LC(p);g=SC(g);c=NC(c);var q=[];if($APP.r($APP.r(g)?$APP.B(g)>0:g))for(var w=$APP.B(g),x=0;;)if(x<b)q.push($APP.rc(g,$APP.hd(x,w))),x+=1;else break;else for(w=0;;)if(w<b)q.push(p),w+=1;else break;return $APP.Q([$APP.fj,cD,dD,$APP.ql,$APP.Wk,eD,fD,$APP.Jh,gD,hD,iD],[p,g,c,q,QC(m),MC(h),b,PC(a),KC(e),k!=null,
7
+ OC(d)])},kD=function(a,b){b=$APP.N(b);b=$APP.G(b,$APP.fj);return a.style.setProperty("--x-metaball-cursor-color",b)},mD=function(a){$APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)||(a.__xMetaballSeed=0,$APP.n(a,"__xMetaballRaf",requestAnimationFrame(function(){return lD(a)})))},nD=function(a){function b(c){var d=$APP.Hi.g($APP.l(a,"__xMetaballRefs"));if($APP.r(d)){d=d.getBoundingClientRect();var e=$APP.l(a,"__xMetaballMouse");e.x=c.clientX-d.left;e.y=c.clientY-d.top}return null}
8
+ window.addEventListener("pointermove",b);a.__xMetaballHandler=b},oD=function(a){var b=$APP.l(a,"__xMetaballHandler");$APP.r(b)&&(window.removeEventListener("pointermove",b),a.__xMetaballHandler=null)},pD=function(a){Object.defineProperty(a,"blobCount",{get:function(){return JC(this.getAttribute("blob-count"))},set:function(b){return b==null?this.removeAttribute("blob-count"):this.setAttribute("blob-count",""+$APP.S.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"blobSize",{get:function(){return KC(this.getAttribute("blob-size"))},
9
+ set:function(b){return b==null?this.removeAttribute("blob-size"):this.setAttribute("blob-size",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"color",{get:function(){return LC(this.getAttribute("color"))},set:function(b){return b==null?this.removeAttribute("color"):this.setAttribute("color",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"noise",{get:function(){return this.hasAttribute("noise")},set:function(b){return $APP.r(b)?this.setAttribute("noise",
10
+ ""):this.removeAttribute("noise")},enumerable:!0,configurable:!0});Object.defineProperty(a,"noiseScale",{get:function(){return MC(this.getAttribute("noise-scale"))},set:function(b){return b==null?this.removeAttribute("noise-scale"):this.setAttribute("noise-scale",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"noiseSpeed",{get:function(){return NC(this.getAttribute("noise-speed"))},set:function(b){return b==null?this.removeAttribute("noise-speed"):this.setAttribute("noise-speed",
11
+ ""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"noiseIntensity",{get:function(){return OC(this.getAttribute("noise-intensity"))},set:function(b){return b==null?this.removeAttribute("noise-intensity"):this.setAttribute("noise-intensity",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"blur",{get:function(){return PC(this.getAttribute("blur"))},set:function(b){return b==null?this.removeAttribute("blur"):this.setAttribute("blur",""+$APP.S.g(b))},enumerable:!0,
12
+ configurable:!0});Object.defineProperty(a,"threshold",{get:function(){return QC(this.getAttribute("threshold"))},set:function(b){return b==null?this.removeAttribute("threshold"):this.setAttribute("threshold",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"palette",{get:function(){return SC(this.getAttribute("palette"))},set:function(b){return b==null||$APP.D.i("",b)?this.removeAttribute("palette"):this.setAttribute("palette",""+$APP.S.g(b))},enumerable:!0,configurable:!0})},
13
+ tD=function(){var a=class extends HTMLElement{};a.observedAttributes=qD;a.prototype.connectedCallback=function(){var b=jD(this);this.__xMetaballModel=b;this.__xMetaballMouse={x:0,y:0};if(!$APP.r($APP.l(this,"__xMetaballRefs"))){var c=$APP.l(this,"__xMetaballModel"),d=rD[0];rD[0]=d+1;var e="mb-"+$APP.S.g(d),g=this.attachShadow({mode:"open"}),h=document.createElement("style"),k=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");this.__xMetaballUid=d;h.textContent=
14
+ sD;k.setAttribute("part","viewport");k.style.filter="url(#"+$APP.S.g(e)+")";m.style.position="absolute";m.style.width="0";m.style.height="0";m.style.overflow="hidden";var p=$APP.N(c);c=$APP.G(p,$APP.Jh);d=$APP.G(p,$APP.Wk);var q=$APP.G(p,hD),w=$APP.G(p,eD);p=$APP.G(p,iD);var x=document.createElementNS("http://www.w3.org/2000/svg","defs"),y=document.createElementNS("http://www.w3.org/2000/svg","filter"),A=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),C=document.createElementNS("http://www.w3.org/2000/svg",
15
+ "feColorMatrix"),E=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence"),H=document.createElementNS("http://www.w3.org/2000/svg","feDisplacementMap");y.setAttribute("id",e);y.setAttribute("x","-20%");y.setAttribute("y","-20%");y.setAttribute("width","140%");y.setAttribute("height","140%");A.setAttribute("in","SourceGraphic");A.setAttribute("stdDeviation",""+$APP.S.g(c));A.setAttribute("result","blur");C.setAttribute("in","blur");C.setAttribute("type","matrix");C.setAttribute("values",
16
+ d);C.setAttribute("result","threshold");E.setAttribute("type","fractalNoise");E.setAttribute("baseFrequency",""+$APP.S.g(.01*w));E.setAttribute("numOctaves","3");E.setAttribute("seed","0");E.setAttribute("result","noise");H.setAttribute("in","threshold");H.setAttribute("in2","noise");H.setAttribute("scale",$APP.r(q)?""+$APP.S.g(p):"0");H.setAttribute("xChannelSelector","R");H.setAttribute("yChannelSelector","G");y.appendChild(A);y.appendChild(C);y.appendChild(E);y.appendChild(H);x.appendChild(y);
17
+ m.appendChild(x);e=new $APP.P(null,5,[$APP.qk,y,$APP.Ii,A,$APP.Kl,C,$APP.Sk,E,$APP.dj,H],null);k.appendChild(m);g.appendChild(h);g.appendChild(k);this.__xMetaballRefs=$APP.Vf($APP.wc([e,new $APP.P(null,3,[$APP.bi,g,$APP.Hi,k,$APP.xj,m],null)]))}g=$APP.l(this,"__xMetaballBlobs");if($APP.r(g)){h=g.length;for(k=0;;)if(k<h)m=g[k],$APP.r(m.parentNode)&&m.parentNode.removeChild(m),k+=1;else break;this.__xMetaballBlobs=[];this.__xMetaballPos=[]}h=$APP.N(b);g=$APP.G(h,fD);m=$APP.G(h,gD);h=$APP.G(h,$APP.ql);
18
+ k=$APP.N($APP.l(this,"__xMetaballRefs"));k=$APP.G(k,$APP.Hi);m=UC(m,g);e=[];c=[];for(d=0;;)if(d<g)q=document.createElement("div"),w=m[d],q.className="blob",q.style.width=""+$APP.S.g(w)+"px",q.style.height=""+$APP.S.g(w)+"px",q.style.background=h[d],k.appendChild(q),e.push(q),c.push({x:0,y:0}),d+=1;else break;this.__xMetaballBlobs=e;this.__xMetaballPos=c;this.__xMetaballSpeeds=TC(g);kD(this,b);this.setAttribute("aria-hidden","true");this.setAttribute("role","presentation");oD(this);nD(this);mD(this);
19
+ return null};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMetaballRaf");$APP.r(b)&&(cancelAnimationFrame(b),this.__xMetaballRaf=null);oD(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){if($APP.O(c,d)&&(this.__xMetaballModel=b=jD(this),$APP.r($APP.l(this,"__xMetaballRefs")))){d=$APP.N(b);c=$APP.G(d,fD);var e=$APP.G(d,gD);d=$APP.G(d,$APP.ql);var g=$APP.N($APP.l(this,"__xMetaballRefs")),h=$APP.G(g,$APP.Hi);g=$APP.l(this,"__xMetaballBlobs");var k=$APP.l(this,
20
+ "__xMetaballPos"),m=g.length;e=UC(e,c);for(var p=m;;)if(p<c){var q=document.createElement("div");q.className="blob";h.appendChild(q);g.push(q);k.push({x:0,y:0});p+=1}else break;for(h=m;;)if(h>c)m=g.pop(),k.pop(),$APP.r(m.parentNode)&&m.parentNode.removeChild(m),--h;else break;for(k=0;;)if(k<c)h=g[k],m=e[k],h.style.width=""+$APP.S.g(m)+"px",h.style.height=""+$APP.S.g(m)+"px",h.style.background=d[k],k+=1;else break;this.__xMetaballSpeeds=TC(c);g=$APP.N(b);h=$APP.G(g,$APP.Jh);e=$APP.G(g,$APP.Wk);c=$APP.G(g,
21
+ hD);d=$APP.G(g,eD);g=$APP.G(g,iD);k=$APP.l(this,"__xMetaballRefs");m=$APP.Ii.g(k);$APP.r(m)&&m.setAttribute("stdDeviation",""+$APP.S.g(h));h=$APP.Kl.g(k);$APP.r(h)&&h.setAttribute("values",e);e=$APP.Sk.g(k);$APP.r(e)&&e.setAttribute("baseFrequency",""+$APP.S.g(.01*d));d=$APP.dj.g(k);$APP.r(d)&&d.setAttribute("scale",$APP.r(c)?""+$APP.S.g(g):"0");return kD(this,b)}return null};pD(a.prototype);return a},uD=function(){$APP.r(customElements.get("x-metaball-cursor"))||customElements.define("x-metaball-cursor",
22
+ tD());return null},ZC=new $APP.M(null,"noise-scale-raw","noise-scale-raw",123215597),WC=new $APP.M(null,"noise-intensity-raw","noise-intensity-raw",-116633534),hD=new $APP.M(null,"noise?","noise?",-38350370),gD=new $APP.M(null,"blob-size","blob-size",-1862159046),eD=new $APP.M(null,"noise-scale","noise-scale",-2033475279),$C=new $APP.M(null,"noise-attr","noise-attr",-1534959409),YC=new $APP.M(null,"palette-raw","palette-raw",-1398782582),cD=new $APP.M(null,"palette","palette",-456203511),aD=new $APP.M(null,
23
+ "blob-count-raw","blob-count-raw",-1850938603),bD=new $APP.M(null,"noise-speed-raw","noise-speed-raw",1761342974),dD=new $APP.M(null,"noise-speed","noise-speed",866692139),fD=new $APP.M(null,"blob-count","blob-count",-248711053),iD=new $APP.M(null,"noise-intensity","noise-intensity",747731519),XC=new $APP.M(null,"blob-size-raw","blob-size-raw",530207878);var qD="blob-count blob-size color noise noise-scale noise-speed noise-intensity blur threshold palette".split(" ");
24
+ $APP.Q([$APP.fj,new $APP.M(null,"blobSize","blobSize",-64083896),new $APP.M(null,"noiseIntensity","noiseIntensity",-792053623),cD,new $APP.M(null,"noiseScale","noiseScale",2003002730),new $APP.M(null,"noise","noise",-994696820),$APP.Wk,$APP.Jh,new $APP.M(null,"noiseSpeed","noiseSpeed",-959403627),new $APP.M(null,"blobCount","blobCount",-1279691625)],[new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.Y],
25
+ null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null)]);
26
+ var RC=new $APP.P(null,5,["rainbow",new $APP.ve(null,5,5,$APP.we,["#ef4444","#f59e0b","#22c55e","#3b82f6","#a855f7"],null),"ocean",new $APP.ve(null,5,5,$APP.we,["#06b6d4","#0ea5e9","#6366f1","#8b5cf6","#0d9488"],null),"sunset",new $APP.ve(null,5,5,$APP.we,["#ef4444","#f97316","#eab308","#ec4899","#f43f5e"],null),"neon",new $APP.ve(null,5,5,$APP.we,["#22d3ee","#a78bfa","#f472b6","#34d399","#facc15"],null),"ember",new $APP.ve(null,5,5,$APP.we,["#dc2626","#ea580c","#d97706","#b91c1c","#f59e0b"],null)],
27
+ null);var rD=[0],sD=":host{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:var("+$APP.S.g("--x-metaball-cursor-z-index")+",9999);}[part\x3dviewport]{position:absolute;inset:var("+$APP.S.g("--x-metaball-cursor-inset")+",0);pointer-events:none;opacity:var("+$APP.S.g("--x-metaball-cursor-opacity")+",1);mix-blend-mode:var("+$APP.S.g("--x-metaball-cursor-blend-mode")+",normal);}.blob{position:absolute;border-radius:50%;will-change:transform;pointer-events:none;top:0;left:0;background:var("+
28
+ $APP.S.g("--x-metaball-cursor-color")+",#6366f1);}@media(prefers-reduced-motion:reduce){.blob{transition:none!important;}}",lD=function lD(a){if($APP.r(a.isConnected)){var c=$APP.l(a,"__xMetaballMouse"),d=$APP.l(a,"__xMetaballBlobs"),e=$APP.l(a,"__xMetaballPos"),g=$APP.l(a,"__xMetaballSpeeds"),h=$APP.l(c,"x");c=$APP.l(c,"y");for(var k=$APP.l(a,"__xMetaballModel"),m=d.length,p=0;;)if(p<m){var q=e[p],w=g[p],x=VC($APP.l(q,"x"),h,w);w=VC($APP.l(q,"y"),c,w);var y=d[p];q.x=x;q.y=w;y.style.transform="translate("+
29
+ $APP.S.g(x)+"px,"+$APP.S.g(w)+"px) translate(-50%,-50%)";p+=1}else break;$APP.r(hD.g(k))&&(d=$APP.l(a,"__xMetaballSeed")+dD.g(k),e=$APP.l(a,"__xMetaballRefs"),a.__xMetaballSeed=d,e=$APP.Sk.g(e),$APP.r(e)&&e.setAttribute("seed",""+$APP.S.g(Math.floor(d))));$APP.n(a,"__xMetaballRaf",requestAnimationFrame(function(){return lD.g?lD.g(a):lD.call(null,a)}))}return null};$APP.ka("baredom.exports.x_metaball_cursor.init",uD);export const init=uD;
package/dist/x-modal.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var vN=function(a){var b=$APP.l(a,"__xModalRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),k=document.createElement("div"),m=document.createElement("slot"),p=document.createElement("div"),q=document.createElement("slot");c.textContent=":host{display:contents;color-scheme:light dark;--x-modal-bg:Canvas;--x-modal-fg:CanvasText;--x-modal-backdrop:rgb(0 0 0/0.45);--x-modal-shadow:0 20px 60px rgb(0 0 0/0.25);--x-modal-radius:0.75rem;--x-modal-width-sm:22rem;--x-modal-width-md:32rem;--x-modal-width-lg:44rem;--x-modal-width-xl:60rem;--x-modal-max-height:90vh;--x-modal-header-padding:1rem 1.25rem;--x-modal-body-padding:1rem 1.25rem;--x-modal-footer-padding:0.75rem 1.25rem;--x-modal-border:color-mix(in srgb,currentColor 12%,transparent);--x-modal-duration:180ms;--x-modal-easing:ease;--x-modal-z:1000;}[part\x3dbackdrop]{position:fixed;inset:0;background:var(--x-modal-backdrop);z-index:var(--x-modal-z);opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--x-modal-duration) var(--x-modal-easing),visibility 0s var(--x-modal-easing) var(--x-modal-duration);}:host([data-open\x3dtrue]) [part\x3dbackdrop]{opacity:1;visibility:visible;pointer-events:auto;transition:opacity var(--x-modal-duration) var(--x-modal-easing),visibility 0s;}[part\x3ddialog]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(0.96);opacity:0;visibility:hidden;pointer-events:none;background:var(--x-modal-bg);color:var(--x-modal-fg);box-shadow:var(--x-modal-shadow);border-radius:var(--x-modal-radius);display:flex;flex-direction:column;overflow:hidden;z-index:calc(var(--x-modal-z) + 1);max-height:var(--x-modal-max-height);transition:opacity var(--x-modal-duration) var(--x-modal-easing),transform var(--x-modal-duration) var(--x-modal-easing),visibility 0s var(--x-modal-easing) var(--x-modal-duration);}:host([data-size\x3dsm]) [part\x3ddialog]{width:var(--x-modal-width-sm);}:host([data-size\x3dmd]) [part\x3ddialog]{width:var(--x-modal-width-md);}:host([data-size\x3dlg]) [part\x3ddialog]{width:var(--x-modal-width-lg);}:host([data-size\x3dxl]) [part\x3ddialog]{width:var(--x-modal-width-xl);}:host([data-size\x3dfull]) [part\x3ddialog]{inset:0;top:0;left:0;width:100vw;height:100dvh;border-radius:0;max-width:100vw;max-height:100dvh;transform:scale(0.98);}:host([data-open\x3dtrue]) [part\x3ddialog]{opacity:1;transform:translate(-50%,-50%) scale(1);visibility:visible;pointer-events:auto;transition:opacity var(--x-modal-duration) var(--x-modal-easing),transform var(--x-modal-duration) var(--x-modal-easing),visibility 0s;}:host([data-open\x3dtrue][data-size\x3dfull]) [part\x3ddialog]{transform:scale(1);}[part\x3ddialog]:focus{outline:none;}[part\x3dheader]{padding:var(--x-modal-header-padding);border-bottom:1px solid var(--x-modal-border);flex-shrink:0;}[part\x3dbody]{padding:var(--x-modal-body-padding);overflow-y:auto;flex:1;}[part\x3dfooter]{padding:var(--x-modal-footer-padding);border-top:1px solid var(--x-modal-border);flex-shrink:0;}@media (prefers-reduced-motion:reduce){[part\x3ddialog],[part\x3dbackdrop]{transition:none;}}";
2
+ var nR=function(a){var b=$APP.l(a,"__xModalRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),k=document.createElement("div"),m=document.createElement("slot"),p=document.createElement("div"),q=document.createElement("slot");c.textContent=":host{display:contents;color-scheme:light dark;--x-modal-bg:Canvas;--x-modal-fg:CanvasText;--x-modal-backdrop:rgb(0 0 0/0.45);--x-modal-shadow:0 20px 60px rgb(0 0 0/0.25);--x-modal-radius:0.75rem;--x-modal-width-sm:22rem;--x-modal-width-md:32rem;--x-modal-width-lg:44rem;--x-modal-width-xl:60rem;--x-modal-max-height:90vh;--x-modal-header-padding:1rem 1.25rem;--x-modal-body-padding:1rem 1.25rem;--x-modal-footer-padding:0.75rem 1.25rem;--x-modal-border:color-mix(in srgb,currentColor 12%,transparent);--x-modal-duration:180ms;--x-modal-easing:ease;--x-modal-z:1000;}[part\x3dbackdrop]{position:fixed;inset:0;background:var(--x-modal-backdrop);z-index:var(--x-modal-z);opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--x-modal-duration) var(--x-modal-easing),visibility 0s var(--x-modal-easing) var(--x-modal-duration);}:host([data-open\x3dtrue]) [part\x3dbackdrop]{opacity:1;visibility:visible;pointer-events:auto;transition:opacity var(--x-modal-duration) var(--x-modal-easing),visibility 0s;}[part\x3ddialog]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(0.96);opacity:0;visibility:hidden;pointer-events:none;background:var(--x-modal-bg);color:var(--x-modal-fg);box-shadow:var(--x-modal-shadow);border-radius:var(--x-modal-radius);display:flex;flex-direction:column;overflow:hidden;z-index:calc(var(--x-modal-z) + 1);max-height:var(--x-modal-max-height);transition:opacity var(--x-modal-duration) var(--x-modal-easing),transform var(--x-modal-duration) var(--x-modal-easing),visibility 0s var(--x-modal-easing) var(--x-modal-duration);}:host([data-size\x3dsm]) [part\x3ddialog]{width:var(--x-modal-width-sm);}:host([data-size\x3dmd]) [part\x3ddialog]{width:var(--x-modal-width-md);}:host([data-size\x3dlg]) [part\x3ddialog]{width:var(--x-modal-width-lg);}:host([data-size\x3dxl]) [part\x3ddialog]{width:var(--x-modal-width-xl);}:host([data-size\x3dfull]) [part\x3ddialog]{inset:0;top:0;left:0;width:100vw;height:100dvh;border-radius:0;max-width:100vw;max-height:100dvh;transform:scale(0.98);}:host([data-open\x3dtrue]) [part\x3ddialog]{opacity:1;transform:translate(-50%,-50%) scale(1);visibility:visible;pointer-events:auto;transition:opacity var(--x-modal-duration) var(--x-modal-easing),transform var(--x-modal-duration) var(--x-modal-easing),visibility 0s;}:host([data-open\x3dtrue][data-size\x3dfull]) [part\x3ddialog]{transform:scale(1);}[part\x3ddialog]:focus{outline:none;}[part\x3dheader]{padding:var(--x-modal-header-padding);border-bottom:1px solid var(--x-modal-border);flex-shrink:0;}[part\x3dbody]{padding:var(--x-modal-body-padding);overflow-y:auto;flex:1;}[part\x3dfooter]{padding:var(--x-modal-footer-padding);border-top:1px solid var(--x-modal-border);flex-shrink:0;}@media (prefers-reduced-motion:reduce){[part\x3ddialog],[part\x3dbackdrop]{transition:none;}}";
3
3
  d.setAttribute("part","backdrop");e.setAttribute("part","dialog");e.setAttribute("role","dialog");e.setAttribute("aria-modal","true");g.setAttribute("part","header");h.setAttribute("name","header");k.setAttribute("part","body");p.setAttribute("part","footer");q.setAttribute("name","footer");g.appendChild(h);k.appendChild(m);p.appendChild(q);e.appendChild(g);e.appendChild(k);e.appendChild(p);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xModalRefs={root:b,backdrop:d,dialog:e,header:g,body:k,
4
- footer:p};return $APP.l(a,"__xModalRefs")},wN=function(a,b,c){a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},xN=function(a){function b(d){var e=window.getComputedStyle(d);return $APP.O("none",e.display)&&$APP.O("hidden",e.visibility)&&d.offsetWidth>0&&d.offsetHeight>0}var c=$APP.Rd(b,$APP.kc($APP.l(a,"dialog").querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])")));
5
- a=$APP.Pd(function(d){return $APP.Rd(b,$APP.Pd(function(e){var g=$APP.kc(e.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"));return $APP.n(e.matches("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"))?$APP.dd(e,g):g},$APP.kc([$APP.lc(d.assignedElements({flatten:!0}))])))},$APP.kc([$APP.kc($APP.l(a,"root").querySelectorAll("slot"))]));
6
- return $APP.ke($APP.Nd.h(c,a))},yN=function(a){var b=$APP.l(a,"__xModalRefs");b=$APP.n(b)?$APP.l(b,"dialog"):null;var c=$APP.l(a,"__xModalRestore"),d=$APP.l(a,"__xModalDialogTab")===!0;a.__xModalTabbables=null;a.__xModalRestore=null;$APP.n($APP.n(b)?d:b)&&(b.removeAttribute("tabindex"),a.__xModalDialogTab=!1);$APP.n($APP.n(c)?c.isConnected:c)&&c.focus()},zN=function(a,b){wN(a,"x-modal-dismiss",{reason:b});a.removeAttribute("open");return null},AN=function(a){$APP.n(a.hasAttribute("open"))||a.setAttribute("open",
7
- "");return null},BN=function(a){a.removeAttribute("open");return null},CN=function(a,b){$APP.O($APP.l(a,"__xModalPrevOpen"),b)&&(a.__xModalPrevOpen=b,wN(a,"x-modal-toggle",{open:b}),$APP.n(b)?setTimeout(function(){var c=$APP.l(a,"__xModalRefs"),d=$APP.n(c)?$APP.l(c,"dialog"):null;c=$APP.n(c)?xN(c):null;a.__xModalRestore=document.activeElement;var e=$APP.n(c)?$APP.Sg(c):null;a.__xModalTabbables=e;$APP.u(c)?$APP.w(c).focus():$APP.n(d)&&($APP.n(d.hasAttribute("tabindex"))||(d.setAttribute("tabindex",
8
- "-1"),a.__xModalDialogTab=!0),d.focus());return null},0):yN(a))},EN=function(a){var b=vN(a);b=$APP.l(b,"dialog");var c=new $APP.R(null,3,[$APP.Ih,a.hasAttribute("open"),$APP.hk,a.getAttribute("size"),$APP.sh,a.getAttribute("label")],null);var d=$APP.N(c),e=$APP.I(d,$APP.Ih);c=$APP.I(d,$APP.hk);d=$APP.I(d,$APP.sh);e=$APP.J(e);c=typeof c==="string"&&$APP.K(DN,c)?c:"md";d=typeof d==="string"&&$APP.O(d,"")?d:"Modal";c=new $APP.R(null,3,[$APP.Ik,e,$APP.Wg,c,$APP.U,d],null);d=$APP.Ik.g(c);a.setAttribute("data-open",
9
- $APP.n(d)?"true":"false");a.setAttribute("data-size",$APP.Wg.g(c));b.setAttribute("aria-label",$APP.U.g(c));CN(a,d)},FN=function(a){function b(g){var h=g.key;if($APP.C.h(h,"Escape"))g.preventDefault(),zN(a,"escape");else if($APP.C.h(h,"Tab")){h=$APP.l(a,"__xModalTabbables");h=$APP.n(h)?$APP.ke($APP.kc(h)):$APP.Td;var k=$APP.l(a,"__xModalRefs");k=$APP.n(k)?$APP.l(k,"dialog"):null;if($APP.wc(h))g.preventDefault(),$APP.n(k)&&k.focus();else{k=document.activeElement;var m=$APP.w(h);h=$APP.nc(h);var p=
10
- g.shiftKey;$APP.n($APP.n(p)?$APP.C.h(k,m):p)?(g.preventDefault(),h.focus()):$APP.r(p)&&$APP.C.h(k,h)&&(g.preventDefault(),m.focus())}}return null}function c(){return zN(a,"backdrop")}var d=vN(a),e=$APP.l(d,"dialog");$APP.l(d,"backdrop").addEventListener("click",c);e.addEventListener("keydown",b);$APP.ma(a,"__xModalHandlers",{backdrop:c,keydown:b})},GN=function(a){var b=$APP.l(a,"__xModalHandlers"),c=$APP.l(a,"__xModalRefs");if($APP.n($APP.n(b)?c:b)){var d=$APP.l(c,"backdrop");c=$APP.l(c,"dialog");
11
- var e=$APP.l(b,"backdrop");b=$APP.l(b,"keydown");$APP.n(e)&&d.removeEventListener("click",e);$APP.n(b)&&c.removeEventListener("keydown",b)}a.__xModalHandlers=null},HN=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?AN(this):BN(this)},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?b:"md"},set:function(b){return b==null?this.removeAttribute("size"):
12
- this.setAttribute("size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Modal"},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"show",{value:function(){return AN(this)},enumerable:!0,configurable:!0,writable:!0});Object.defineProperty(a,"hide",{value:function(){return BN(this)},enumerable:!0,
13
- configurable:!0,writable:!0});Object.defineProperty(a,"toggle",{value:function(){$APP.n(this.hasAttribute("open"))?BN(this):AN(this);return null},enumerable:!0,configurable:!0,writable:!0})},JN=function(){if(!$APP.n(customElements.get("x-modal"))){var a=class extends HTMLElement{};a.observedAttributes=IN;a.prototype.connectedCallback=function(){vN(this);GN(this);FN(this);EN(this);return null};a.prototype.disconnectedCallback=function(){GN(this);yN(this);return null};a.prototype.attributeChangedCallback=
14
- function(b,c,d){$APP.O(c,d)&&EN(this);return null};HN(a.prototype);customElements.define("x-modal",a)}return null},KN=function(){return JN()};var DN=new $APP.S(null,new $APP.R(null,5,["md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),IN=["open","size","label"];$APP.Ed(["x-modal-toggle",new $APP.R(null,2,[$APP.rk,!1,$APP.V,new $APP.R(null,1,[$APP.pk,$APP.Ni],null)],null),"x-modal-dismiss",new $APP.R(null,2,[$APP.rk,!1,$APP.V,new $APP.R(null,1,[$APP.Rh,$APP.Y],null)],null)]);$APP.ja("baredom.exports.x_modal.init",KN);export const init=KN;
4
+ footer:p};return $APP.l(a,"__xModalRefs")},oR=function(a,b,c){a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},pR=function(a){function b(d){var e=window.getComputedStyle(d);return $APP.O("none",e.display)&&$APP.O("hidden",e.visibility)&&d.offsetWidth>0&&d.offsetHeight>0}var c=$APP.ge(b,$APP.wc($APP.l(a,"dialog").querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])")));
5
+ a=$APP.ee(function(d){return $APP.ge(b,$APP.ee(function(e){var g=$APP.wc(e.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"));return $APP.r(e.matches("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"))?$APP.rd(e,g):g},$APP.wc([$APP.xc(d.assignedElements({flatten:!0}))])))},$APP.wc([$APP.wc($APP.l(a,"root").querySelectorAll("slot"))]));
6
+ return $APP.Be($APP.ce.i(c,a))},qR=function(a){var b=$APP.l(a,"__xModalRefs");b=$APP.r(b)?$APP.l(b,"dialog"):null;var c=$APP.l(a,"__xModalRestore"),d=$APP.l(a,"__xModalDialogTab")===!0;a.__xModalTabbables=null;a.__xModalRestore=null;$APP.r($APP.r(b)?d:b)&&(b.removeAttribute("tabindex"),a.__xModalDialogTab=!1);$APP.r($APP.r(c)?c.isConnected:c)&&c.focus()},rR=function(a,b){oR(a,"x-modal-dismiss",{reason:b});a.removeAttribute("open");return null},sR=function(a){$APP.r(a.hasAttribute("open"))||a.setAttribute("open",
7
+ "");return null},tR=function(a){a.removeAttribute("open");return null},uR=function(a,b){$APP.O($APP.l(a,"__xModalPrevOpen"),b)&&(a.__xModalPrevOpen=b,oR(a,"x-modal-toggle",{open:b}),$APP.r(b)?setTimeout(function(){var c=$APP.l(a,"__xModalRefs"),d=$APP.r(c)?$APP.l(c,"dialog"):null;c=$APP.r(c)?pR(c):null;a.__xModalRestore=document.activeElement;var e=$APP.r(c)?$APP.nh(c):null;a.__xModalTabbables=e;$APP.u(c)?$APP.v(c).focus():$APP.r(d)&&($APP.r(d.hasAttribute("tabindex"))||(d.setAttribute("tabindex",
8
+ "-1"),a.__xModalDialogTab=!0),d.focus());return null},0):qR(a))},wR=function(a){var b=nR(a);b=$APP.l(b,"dialog");var c=new $APP.P(null,3,[$APP.ai,a.hasAttribute("open"),$APP.Yk,a.getAttribute("size"),$APP.Oh,a.getAttribute("label")],null);var d=$APP.N(c),e=$APP.G(d,$APP.ai);c=$APP.G(d,$APP.Yk);d=$APP.G(d,$APP.Oh);e=$APP.I(e);c=typeof c==="string"&&$APP.J(vR,c)?c:"md";d=typeof d==="string"&&$APP.O(d,"")?d:"Modal";c=new $APP.P(null,3,[$APP.Dl,e,$APP.rh,c,$APP.T,d],null);d=$APP.Dl.g(c);a.setAttribute("data-open",
9
+ $APP.r(d)?"true":"false");a.setAttribute("data-size",$APP.rh.g(c));b.setAttribute("aria-label",$APP.T.g(c));uR(a,d)},xR=function(a){function b(g){var h=g.key;if($APP.D.i(h,"Escape"))g.preventDefault(),rR(a,"escape");else if($APP.D.i(h,"Tab")){h=$APP.l(a,"__xModalTabbables");h=$APP.r(h)?$APP.Be($APP.wc(h)):$APP.ie;var k=$APP.l(a,"__xModalRefs");k=$APP.r(k)?$APP.l(k,"dialog"):null;if($APP.Jc(h))g.preventDefault(),$APP.r(k)&&k.focus();else{k=document.activeElement;var m=$APP.v(h);h=$APP.zc(h);var p=
10
+ g.shiftKey;$APP.r($APP.r(p)?$APP.D.i(k,m):p)?(g.preventDefault(),h.focus()):$APP.t(p)&&$APP.D.i(k,h)&&(g.preventDefault(),m.focus())}}return null}function c(){return rR(a,"backdrop")}var d=nR(a),e=$APP.l(d,"dialog");$APP.l(d,"backdrop").addEventListener("click",c);e.addEventListener("keydown",b);$APP.n(a,"__xModalHandlers",{backdrop:c,keydown:b})},yR=function(a){var b=$APP.l(a,"__xModalHandlers"),c=$APP.l(a,"__xModalRefs");if($APP.r($APP.r(b)?c:b)){var d=$APP.l(c,"backdrop");c=$APP.l(c,"dialog");
11
+ var e=$APP.l(b,"backdrop");b=$APP.l(b,"keydown");$APP.r(e)&&d.removeEventListener("click",e);$APP.r(b)&&c.removeEventListener("keydown",b)}a.__xModalHandlers=null},zR=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.r(b)?sR(this):tR(this)},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.r(b)?b:"md"},set:function(b){return b==null?this.removeAttribute("size"):
12
+ this.setAttribute("size",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:"Modal"},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"show",{value:function(){return sR(this)},enumerable:!0,configurable:!0,writable:!0});Object.defineProperty(a,"hide",{value:function(){return tR(this)},enumerable:!0,
13
+ configurable:!0,writable:!0});Object.defineProperty(a,"toggle",{value:function(){$APP.r(this.hasAttribute("open"))?tR(this):sR(this);return null},enumerable:!0,configurable:!0,writable:!0})},BR=function(){if(!$APP.r(customElements.get("x-modal"))){var a=class extends HTMLElement{};a.observedAttributes=AR;a.prototype.connectedCallback=function(){nR(this);yR(this);xR(this);wR(this);return null};a.prototype.disconnectedCallback=function(){yR(this);qR(this);return null};a.prototype.attributeChangedCallback=
14
+ function(b,c,d){$APP.O(c,d)&&wR(this);return null};zR(a.prototype);customElements.define("x-modal",a)}return null},CR=function(){return BR()};var vR=new $APP.R(null,new $APP.P(null,5,["md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),AR=["open","size","label"];$APP.Sd(["x-modal-toggle",new $APP.P(null,2,[$APP.kl,!1,$APP.U,new $APP.P(null,1,[$APP.hl,$APP.qj],null)],null),"x-modal-dismiss",new $APP.P(null,2,[$APP.kl,!1,$APP.U,new $APP.P(null,1,[$APP.ji,$APP.Y],null)],null)]);$APP.ka("baredom.exports.x_modal.init",CR);export const init=CR;
@@ -0,0 +1,41 @@
1
+ import { $APP, shadow$provide } from "./base.js";
2
+ var Ot=function(a){return typeof a==="string"?(a=a.trim().toLowerCase(),$APP.J(Nt,a)?a:"clean"):"clean"},Pt=function(a){return $APP.D.i(a,"organic")||$APP.D.i(a,"liquid")},Qt=function(a){var b=(a-1)/17*-7;return"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 "+$APP.S.g(a)+" "+$APP.S.g(b)},Rt=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.D.i(a,""))return b;a=parseFloat(a);return $APP.r(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},St=function(a,b,c,d){if($APP.r($APP.r(a)?a>0:a)){b=$APP.Yg.i(1E-4,
3
+ $APP.r(b)?b:0);c=$APP.Yg.i(1E-4,$APP.r(c)?c:0);d=$APP.Yg.i(1E-4,$APP.r(d)?d:0);var e=Math.sqrt(b/d);a=1E3*(4/($APP.Yg.i(.2,$APP.Zg.i(5,c/(2*Math.sqrt(b*d))))*e)+Math.PI/e)/a}else a=1;return a},Tt=function(a,b,c,d,e,g){b+=(e*(1-a)-g*b)/d*c;return[a+b*c,b]},Vt=function(a,b){b=$APP.N(b);var c=$APP.G(b,Ut);b=$APP.G(b,$APP.uj);var d=$APP.Be(a);a=$APP.B(d);if(a>0){var e=$APP.r(function(){return $APP.r(c)?$APP.Wd(function(g){return $APP.D.i(g,c)},d):c}())?c:null;if($APP.r(e))return e;a=$APP.Yg.i(0,$APP.Zg.i(a-
4
+ 1,$APP.r(b)?b:0));return $APP.rc(d,a)}return null},Wt=function(a,b,c){return a+(b-a)*c},Xt=function(a){if(typeof a==="string"){a=a.match(/rgba?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)(?:\s*,\s*(\d*(?:\.\d+)?))?\s*\)/);if($APP.r(a)){var b=parseFloat(a[1]),c=parseFloat(a[2]),d=parseFloat(a[3]);var e=a[4];e=$APP.r(e)?$APP.O("",a[4]):e;a=[b,c,d,$APP.r(e)?parseFloat(a[4]):1]}else a=null;return a}return null},Yt=function(a,b,c){var d=Xt(a),e=Xt(b);return $APP.r($APP.r(d)?e:d)?"rgba("+
5
+ $APP.S.g(Math.round(Wt(d[0],e[0],c)))+","+$APP.S.g(Math.round(Wt(d[1],e[1],c)))+","+$APP.S.g(Math.round(Wt(d[2],e[2],c)))+","+$APP.S.g(Wt(d[3],e[3],c))+")":c<.5?a:b},Zt=function(a){if(typeof a==="string")if(a=a.trim(),$APP.O(a,"")){a=a.split(/\s+/);for(var b=a.length,c=[],d=0;;){if(d>=b)return c.length>0?c:null;var e=a[d];if($APP.r(e.endsWith("px"))){e=parseFloat(e.slice(0,e.length-2));if($APP.r(isNaN(e)))return null;c.push(e);d+=1}else return null}}else return null;else return null},$t=function(a,
6
+ b){return new $APP.P(null,2,[$APP.zh,$APP.r(a)?a:"",$APP.el,$APP.r(b)?b:""],null)},bu=function(a){var b=$APP.l(a,"__xMorphStackRefs"),c=$APP.r(b)?au.g(b):null;if($APP.r($APP.r(c)?c.isConnected:c))return b;c=document.createElement("div");var d=document.createElementNS("http://www.w3.org/2000/svg","svg");c.style.position="fixed";c.style.top="0";c.style.left="0";c.style.width="100vw";c.style.height="100vh";c.style.pointerEvents="none";c.style.overflow="visible";c.style.zIndex="2147483646";c.setAttribute("aria-hidden",
7
+ "true");c.setAttribute("data-x-morph-stack-ghost-layer","");d.style.position="absolute";d.style.width="0";d.style.height="0";d.style.overflow="hidden";d.setAttribute("aria-hidden","true");c.appendChild(d);document.body.appendChild(c);b=$APP.Wg.C(b,au,c,$APP.wc([$APP.xj,d]));return a.__xMorphStackRefs=b},cu=function(a){var b=$APP.l(a,"__xMorphStackRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");
8
+ c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-morph-stack-spring-stiffness:170;--x-morph-stack-spring-damping:26;--x-morph-stack-spring-mass:1;--x-morph-stack-fade-ms:160ms;--x-morph-stack-goo-blur:10;--x-morph-stack-goo-threshold:18;--x-morph-stack-bg:transparent;}:host([data-variant\x3d'clean']){--x-morph-stack-spring-stiffness:280;--x-morph-stack-spring-damping:30;--x-morph-stack-spring-mass:0.7;}:host([data-variant\x3d'organic']){--x-morph-stack-spring-stiffness:180;--x-morph-stack-spring-damping:5;--x-morph-stack-spring-mass:1.0;--x-morph-stack-goo-blur:6;--x-morph-stack-goo-threshold:14;}:host([data-variant\x3d'liquid']){--x-morph-stack-spring-stiffness:50;--x-morph-stack-spring-damping:14;--x-morph-stack-spring-mass:2.0;--x-morph-stack-goo-blur:26;--x-morph-stack-goo-threshold:26;}[part\x3dviewport]{position:relative;display:block;background:var(--x-morph-stack-bg);}:host([disabled]){opacity:0.7;}";
9
+ d.setAttribute("part","viewport");e.setAttribute("name","state");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xMorphStackRefs=new $APP.P(null,3,[$APP.bi,b,$APP.Hi,d,$APP.Fi,e],null);return $APP.l(a,"__xMorphStackRefs")},eu=function(a){a=new $APP.P(null,8,[du,a.getAttribute("active-state"),$APP.uk,a.getAttribute("active-index"),$APP.jl,a.getAttribute("stiffness"),$APP.Ml,a.getAttribute("damping"),$APP.Xi,a.getAttribute("mass"),$APP.Ak,a.getAttribute("variant"),$APP.oi,a.getAttribute("duration"),
10
+ $APP.Rk,a.hasAttribute("disabled")],null);a=$APP.N(a);var b=$APP.G(a,du),c=$APP.G(a,$APP.uk),d=$APP.G(a,$APP.jl),e=$APP.G(a,$APP.Ml),g=$APP.G(a,$APP.Xi),h=$APP.G(a,$APP.Ak),k=$APP.G(a,$APP.oi);a=$APP.G(a,$APP.Rk);b=typeof b==="string"&&$APP.O("",b.trim())?b.trim():null;a:{if(typeof c==="string"&&(c=c.trim(),$APP.O(c,""))){c=parseInt(c,10);c=typeof c==="number"&&$APP.t(isNaN(c))&&c>=0?c:null;break a}c=null}d=Rt(d,170,10,500);e=Rt(e,26,1,100);g=Rt(g,1,.1,10);h=Ot(h);a:{if(typeof k==="string"&&(k=k.trim(),
11
+ $APP.O(k,""))){k=parseFloat(k);k=typeof k==="number"&&$APP.t(isNaN(k))&&k>0?k:null;break a}k=null}return new $APP.P(null,8,[Ut,b,$APP.uj,c,$APP.Vk,d,$APP.Vj,e,$APP.sl,g,$APP.Fh,h,$APP.nk,k,$APP.W,$APP.I(a)],null)},fu=function(a,b,c){a=window.getComputedStyle(a).getPropertyValue(b);return typeof a==="string"&&$APP.O("",a.trim())?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?c:a):c},gu=function(a){a=cu(a);a=$APP.N(a);a=$APP.G(a,$APP.Fi).assignedElements();for(var b=[],c=a.length,d=0;;)if(d<c){var e=a[d],
12
+ g=$APP.D.i(1,e.nodeType);$APP.r(g?e.hasAttribute("data-state"):g)&&b.push(e);d+=1}else break;return b},hu=function(a){a=gu(a);for(var b=[],c=a.length,d=0;;)if(d<c)b.push(a[d].getAttribute("data-state")),d+=1;else break;return b},iu=function(a,b){a=gu(a);for(var c=a.length,d=0;;)if(d<c){var e=a[d];if($APP.D.i(b,e.getAttribute("data-state")))return e;d+=1}else return null},ju=function(a,b){for(var c=gu(a),d=c.length,e=0;;)if(e<d){var g=c[e],h=g.getAttribute("data-state");$APP.D.i(h,b)?g.style.display=
13
+ "":g.style.display="none";e+=1}else break;$APP.r(b)?a.setAttribute("data-active-state",b):a.removeAttribute("data-active-state");a.__xMorphStackCurrent=b},ku=function(a){var b={};if($APP.r(a)){a=a.querySelectorAll("["+$APP.S.g("data-morph-id")+"]");for(var c=a.length,d=0;;)if(d<c){var e=a[d],g=e.getAttribute("data-morph-id"),h=e.getBoundingClientRect(),k=window.getComputedStyle(e);b[g]={rect:{x:h.left,y:h.top,w:h.width,h:h.height},br:k.borderRadius,bg:k.backgroundColor,color:k.color,clip:k.clipPath,
14
+ text:e.textContent,node:e};d+=1}else break}return b},lu=function(a,b,c){var d=$APP.l(a,"__xMorphStackFilterBlur");a=$APP.l(a,"__xMorphStackFilterMatrix");$APP.r(d)&&d.setAttribute("stdDeviation",""+$APP.S.g(b));$APP.r(a)&&a.setAttribute("values",Qt(c))},mu=function(a,b){var c=$APP.l(a,"__xMorphStackGooBaseBlur"),d=$APP.l(a,"__xMorphStackGooBaseThreshold");c!=null&&d!=null&&(b=b<=0?1:b<.18?1-b/.18:b<.7?0:b<1?(b-.7)/(1-.7):1,lu(a,c*(1-b),Wt(d,1,b)))},ou=function(a){var b=bu(a);b=$APP.N(b);b=$APP.G(b,
15
+ $APP.xj);var c=$APP.l(a,"__xMorphStackFilterId");if($APP.r(c))b=c;else{c=nu[0];nu[0]=c+1;c="x-morph-stack-goo-"+$APP.S.g(c);var d=document.createElementNS("http://www.w3.org/2000/svg","defs"),e=document.createElementNS("http://www.w3.org/2000/svg","filter"),g=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),h=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix");e.setAttribute("id",c);e.setAttribute("x","-20%");e.setAttribute("y","-20%");e.setAttribute("width",
16
+ "140%");e.setAttribute("height","140%");g.setAttribute("in","SourceGraphic");g.setAttribute("stdDeviation",""+$APP.S.g(10));g.setAttribute("result","blur");h.setAttribute("in","blur");h.setAttribute("type","matrix");h.setAttribute("values",Qt(18));e.appendChild(g);e.appendChild(h);d.appendChild(e);b.appendChild(d);a.__xMorphStackFilterId=c;a.__xMorphStackFilterBlur=g;a.__xMorphStackFilterMatrix=h;b=c}c=bu(a);c=$APP.N(c);c=$APP.G(c,au);d=fu(a,"--x-morph-stack-goo-blur",10);e=fu(a,"--x-morph-stack-goo-threshold",
17
+ 18);a.__xMorphStackGooBaseBlur=d;a.__xMorphStackGooBaseThreshold=e;lu(a,d,e);c.style.filter="url(#"+$APP.S.g(b)+")";c.style.webkitFilter="url(#"+$APP.S.g(b)+")"},pu=function(a){a=$APP.l(a,"__xMorphStackRefs");a=$APP.r(a)?au.g(a):null;$APP.r(a)&&(a.style.filter="",a.style.webkitFilter="")},qu=function(a){a.style.position="absolute";a.style.margin="0";a.style.boxSizing="border-box";a.style.transformOrigin="top left";a.style.pointerEvents="none"},ru=function(a,b,c){var d=b.y-c.top;a.style.left=""+$APP.S.g(b.x-
18
+ c.left)+"px";a.style.top=""+$APP.S.g(d)+"px";a.style.width=""+$APP.S.g(b.w)+"px";a.style.height=""+$APP.S.g(b.h)+"px"},su=function(a,b,c,d){function e(sa){sa=$APP.Yg.i(0,$APP.Zg.i(1,sa));var Ga=Wt(da,0,sa),Na=Wt(F,1,sa),Xa=Wt(K,1,sa);C.style.transform="translate("+$APP.S.g(Wt(X,0,sa))+"px,"+$APP.S.g(Ga)+"px) scale("+$APP.S.g(Na)+","+$APP.S.g(Xa)+")";Ga=C.style;Na=Zt(m);Xa=Zt(p);if($APP.r($APP.r(Na)?$APP.r(Xa)?$APP.D.i(Na.length,Xa.length):Xa:Na)){for(var Ya=[],ib=Na.length,Lb=0;;)if(Lb<ib)Ya.push(""+
19
+ $APP.S.g(Wt(Na[Lb],Xa[Lb],sa))+"px"),Lb+=1;else break;Na=Ya.join(" ")}else Na=sa<.5?m:p;Ga.borderRadius=Na;$APP.r($APP.r(q)?w:q)&&(C.style.backgroundColor=Yt(q,w,sa));$APP.r($APP.r(x)?y:x)&&(C.style.color=Yt(x,y,sa));A&&(C.style.opacity=""+$APP.S.g($APP.Yg.i(0,$APP.Zg.i(1,sa))));return null}var g=$APP.l(d,"node"),h=$APP.l(d,"rect"),k=$APP.l(c,"rect"),m=$APP.l(c,"br"),p=$APP.l(d,"br"),q=$APP.l(c,"bg"),w=$APP.l(d,"bg"),x=$APP.l(c,"color"),y=$APP.l(d,"color"),A=$APP.O($APP.l(c,"text"),$APP.l(d,"text")),
20
+ C=g.cloneNode(!0);c=h.w;d=h.h;var E=k.w,H=k.h,F=c>0?E/c:1,K=d>0?H/d:1,X=k.x-h.x,da=k.y-h.y;qu(C);ru(C,h,b);a.appendChild(C);g.style.visibility="hidden";e(0);return{t:0,v:0,update:e,finalize:function(){g.style.visibility="";return $APP.r(C.parentNode)?C.parentNode.removeChild(C):null}}},tu=function(a,b,c,d){function e(C){C=$APP.Yg.i(0,$APP.Zg.i(1,C));var E=Wt(0,w,C),H=Wt(1,x,C),F=Wt(1,y,C);A.style.transform="translate("+$APP.S.g(Wt(0,q,C))+"px,"+$APP.S.g(E)+"px) scale("+$APP.S.g(H)+","+$APP.S.g(F)+
21
+ ")";A.style.opacity=""+$APP.S.g($APP.Yg.i(0,1-C));return null}var g=$APP.l(c,"rect");d=$APP.l(d,"rect");var h=g.w,k=g.h,m=d.w,p=d.h,q=d.x-g.x,w=d.y-g.y,x=h>0?m/h:1,y=k>0?p/k:1,A=$APP.l(c,"node").cloneNode(!0);qu(A);ru(A,g,b);a.appendChild(A);e(0);return{t:0,v:0,update:e,finalize:function(){return $APP.r(A.parentNode)?A.parentNode.removeChild(A):null}}},uu=function(a,b,c){var d=$APP.l(c,"rect"),e=$APP.l(c,"node").cloneNode(!0);qu(e);ru(e,d,b);a.appendChild(e);return{t:0,v:0,update:function(g){e.style.opacity=
22
+ ""+$APP.S.g($APP.Yg.i(0,1-g));return null},finalize:function(){return $APP.r(e.parentNode)?e.parentNode.removeChild(e):null}}},vu=function(a){var b=$APP.l(a,"node");b.style.opacity="0";return{t:0,v:0,update:function(c){b.style.opacity=""+$APP.S.g($APP.Yg.i(0,$APP.Zg.i(1,c)));return null},finalize:function(){return b.style.opacity=""}}},Au=function(a,b,c){a=bu(a);a=$APP.N(a);var d=$APP.G(a,au),e=d.getBoundingClientRect(),g=Object.keys(b);a=Object.keys(c);g=$APP.Be(g);a=$APP.Be(a);g=$APP.dg(g);a=$APP.dg(a);
23
+ a=new $APP.P(null,3,[wu,$APP.$l.i(g,a),xu,yu.i(g,a),zu,yu.i(a,g)],null);var h=wu.g(a),k=xu.g(a);g=zu.g(a);a=[];h=$APP.u(h);for(var m=null,p=0,q=0;;)if(q<p){var w=m.G(null,q),x=$APP.l(b,w);w=$APP.l(c,w);var y=$APP.l(x,"text"),A=$APP.l(w,"text");a.push(su(d,e,x,w));$APP.O(y,A)&&a.push(tu(d,e,x,w));q+=1}else if(h=$APP.u(h))$APP.Pc(h)?(p=$APP.yb(h),h=$APP.zb(h),m=p,p=$APP.B(p)):(p=$APP.v(h),m=$APP.l(b,p),p=$APP.l(c,p),q=$APP.l(m,"text"),x=$APP.l(p,"text"),a.push(su(d,e,m,p)),$APP.O(q,x)&&a.push(tu(d,
24
+ e,m,p)),h=$APP.z(h),m=null,p=0),q=0;else break;k=$APP.u(k);h=null;for(p=m=0;;)if(p<m)q=h.G(null,p),a.push(uu(d,e,$APP.l(b,q))),p+=1;else if(k=$APP.u(k))h=k,$APP.Pc(h)?(k=$APP.yb(h),p=$APP.zb(h),h=k,m=$APP.B(k),k=p):(k=$APP.v(h),a.push(uu(d,e,$APP.l(b,k))),k=$APP.z(h),h=null,m=0),p=0;else break;b=$APP.u(g);d=null;for(g=e=0;;)if(g<e)k=d.G(null,g),a.push(vu($APP.l(c,k))),g+=1;else if(b=$APP.u(b))d=b,$APP.Pc(d)?(b=$APP.yb(d),g=$APP.zb(d),d=b,e=$APP.B(b),b=g):(b=$APP.v(d),a.push(vu($APP.l(c,b))),b=$APP.z(d),
25
+ d=null,e=0),g=0;else break;return a},Bu=function(a){if($APP.r(a))for(var b=a.length,c=0;;)if(c<b){var d=a[c].finalize;$APP.r(d)&&(d.H?d.H():d.call(null));c+=1}else break},Cu=function(a,b,c){if($APP.D.i(b,$APP.l(a,"__xMorphStackToken"))){b=$APP.l(a,"__xMorphStackEntries");var d=$APP.l(a,"__xMorphStackRaf");$APP.r(d)&&(window.cancelAnimationFrame(d),a.__xMorphStackRaf=null);Bu(b);a.__xMorphStackEntries=null;a.__xMorphStackLast=null;pu(a);$APP.r(c)&&(c=$APP.nh($t($APP.l(a,"__xMorphStackFrom"),$APP.l(a,
26
+ "__xMorphStackTo"))),c=new CustomEvent("x-morph-stack-changed",{detail:c,bubbles:!0,composed:!0,cancelable:!1}),a.dispatchEvent(c),a.__xMorphStackFrom=null,a.__xMorphStackTo=null)}return null},Du=function(a){var b=$APP.l(a,"__xMorphStackRaf");$APP.r(b)&&(window.cancelAnimationFrame(b),a.__xMorphStackRaf=null);Bu($APP.l(a,"__xMorphStackEntries"));a.__xMorphStackEntries=null;a.__xMorphStackLast=null;pu(a)},Fu=function(a,b,c){var d=$APP.l(a,"__xMorphStackCurrent"),e=function(){var m=$APP.l(a,"__xMorphStackModel");
27
+ return $APP.r(m)?m:eu(a)}(),g=hu(a);if(g.length===0||b==null||$APP.t($APP.Wd(function(m){return $APP.D.i(m,b)},g)))return!1;if($APP.D.i(d,b))return!0;var h=$APP.r(d)?iu(a,d):null;g=iu(a,b);c=$APP.nh(new $APP.P(null,3,[$APP.zh,$APP.r(d)?d:"",$APP.el,$APP.r(b)?b:"",$APP.ji,$APP.r(c)?c:"method"],null));c=new CustomEvent("x-morph-stack-change",{detail:c,bubbles:!0,composed:!0,cancelable:!0});c=a.dispatchEvent(c);if($APP.t(c))return!1;Du(a);c=function(){var m=$APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches);
28
+ return m?m:$APP.W.g(e)}();if($APP.r(c))ju(a,b),queueMicrotask(function(){var m=$APP.nh($t(d,b));m=new CustomEvent("x-morph-stack-changed",{detail:m,bubbles:!0,composed:!0});return a.dispatchEvent(m)});else{h=ku(h);ju(a,b);$APP.Hi.g(cu(a));g=ku(g);g=Au(a,h,g);var k=function(){var m=$APP.l(a,"__xMorphStackToken");return $APP.r(m)?m:0}()+1;a.__xMorphStackToken=k;a.__xMorphStackEntries=g;a.__xMorphStackLast=null;a.__xMorphStackFrom=d;a.__xMorphStackTo=b;$APP.n(a,"__xMorphStackTimeScale",St($APP.nk.g(e),
29
+ $APP.Vk.g(e),$APP.Vj.g(e),$APP.sl.g(e)));Pt($APP.Fh.g(e))&&(ou(a),mu(a,0));g.length===0?Cu(a,k,!0):(g=window.requestAnimationFrame(function(m){return $APP.D.i(k,$APP.l(a,"__xMorphStackToken"))?Eu(a,m):null}),a.__xMorphStackRaf=g)}return!0},Gu=function(a){cu(a);var b=eu(a);a.__xMorphStackModel=b;a.setAttribute("data-variant",$APP.Fh.g(b));var c=hu(a);c=Vt($APP.Be($APP.wc(c)),b);b=$APP.l(a,"__xMorphStackCurrent");b==null?$APP.r(c)&&ju(a,c):$APP.r($APP.r(c)?$APP.O(c,b):c)?Fu(a,c,"attribute"):(c=c==null,
30
+ $APP.r(c?b:c)&&(Du(a),ju(a,null)))},Hu=function(a){var b=hu(a);var c=$APP.l(a,"__xMorphStackModel");c=$APP.r(c)?c:eu(a);b=Vt($APP.Be($APP.wc(b)),c);c=$APP.l(a,"__xMorphStackCurrent");b==null?(Du(a),ju(a,null)):$APP.r($APP.r(c)?iu(a,c)==null:c)?(Du(a),ju(a,b)):c==null?ju(a,b):ju(a,c);return null},Iu=function(a){function b(){return Hu(a)}var c=cu(a);c=$APP.N(c);$APP.G(c,$APP.Fi).addEventListener("slotchange",b);$APP.n(a,"__xMorphStackHandlers",{slot:b})},Ju=function(a){var b=$APP.l(a,"__xMorphStackHandlers"),
31
+ c=$APP.l(a,"__xMorphStackRefs");$APP.r($APP.r(b)?c:b)&&(c=$APP.Fi.g(c),b=$APP.l(b,"slot"),$APP.r(b)&&c.removeEventListener("slotchange",b));a.__xMorphStackHandlers=null},Ku=function(a){Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},Lu=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(c);return d==
32
+ null?null:parseFloat(d)},set:function(d){return d==null?this.removeAttribute(c):this.setAttribute(c,""+$APP.S.g(d))},enumerable:!0,configurable:!0})},Mu=function(a){Object.defineProperty(a,"activeState",{get:function(){return this.getAttribute("active-state")},set:function(b){return b==null?this.removeAttribute("active-state"):this.setAttribute("active-state",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"activeIndex",{get:function(){var b=this.getAttribute("active-index");
33
+ return b==null?null:parseInt(b,10)},set:function(b){return b==null?this.removeAttribute("active-index"):this.setAttribute("active-index",""+$APP.S.g(b|0))},enumerable:!0,configurable:!0});Lu(a,"stiffness","stiffness");Lu(a,"damping","damping");Lu(a,"mass","mass");Lu(a,"duration","duration");Object.defineProperty(a,"variant",{get:function(){return Ot(this.getAttribute("variant"))},set:function(b){return b==null?this.removeAttribute("variant"):this.setAttribute("variant",""+$APP.S.g(b))},enumerable:!0,
34
+ configurable:!0});Ku(a);a.goTo=function(b){b=b!=null?""+$APP.S.g(b):null;return Fu(this,b,"method")};a.next=function(){var b=hu(this);var c=b.length,d=$APP.l(this,"__xMorphStackCurrent");if(c>0){b:{for(var e=0;;){if(e>=c){d=-1;break b}if($APP.D.i(b[e],d)){d=e;break b}e+=1}d=void 0}b=Fu(this,b[$APP.hd(d+1,c)],"method")}else b=null;return b};a.prev=function(){var b=hu(this);var c=b.length,d=$APP.l(this,"__xMorphStackCurrent");if(c>0){b:{for(var e=0;;){if(e>=c){d=0;break b}if($APP.D.i(b[e],d)){d=e;break b}e+=
35
+ 1}d=void 0}b=Fu(this,b[$APP.hd(d-1+c,c)],"method")}else b=null;return b};a.states=function(){return hu(this)}},Pu=function(){var a=class extends HTMLElement{};a.observedAttributes=Nu;a.prototype.connectedCallback=function(){cu(this);Ju(this);Iu(this);Gu(this);$APP.l(this,"__xMorphStackCurrent")==null&&Hu(this);return null};a.prototype.disconnectedCallback=function(){Du(this);var b=$APP.l(this,"__xMorphStackRefs"),c=$APP.r(b)?au.g(b):null;$APP.r($APP.r(c)?c.parentNode:c)&&c.parentNode.removeChild(c);
36
+ $APP.r(b)&&(this.__xMorphStackRefs=Ou.i(Ou.i(b,au),$APP.xj));this.__xMorphStackGooBaseThreshold=this.__xMorphStackGooBaseBlur=this.__xMorphStackFilterMatrix=this.__xMorphStackFilterBlur=this.__xMorphStackFilterId=null;Ju(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&Gu(this);return null};Mu(a.prototype);return a},Qu=function(){$APP.r(customElements.get("x-morph-stack"))||customElements.define("x-morph-stack",Pu());return null},Ou=function Ou(a){switch(arguments.length){case 1:return Ou.g(arguments[0]);
37
+ case 2:return Ou.i(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return Ou.C(arguments[0],arguments[1],2<c.length?new $APP.Vb(c.slice(2),0,null):null)}};Ou.g=function(a){return a};Ou.i=function(a,b){return a==null?null:$APP.Ma(a,b)};Ou.C=function(a,b,c){for(;;){if(a==null)return null;a=Ou.i(a,b);if($APP.r(c))b=$APP.v(c),c=$APP.z(c);else return a}};
38
+ Ou.J=function(a){var b=$APP.v(a),c=$APP.z(a);a=$APP.v(c);c=$APP.z(c);return this.C(b,a,c)};Ou.N=2;var yu=function yu(a){switch(arguments.length){case 1:return yu.g(arguments[0]);case 2:return yu.i(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return yu.C(arguments[0],arguments[1],2<c.length?new $APP.Vb(c.slice(2),0,null):null)}};yu.g=function(a){return a};
39
+ yu.i=function(a,b){return $APP.B(a)<$APP.B(b)?$APP.Zc(function(c,d){return $APP.J(b,d)?$APP.Xg.i(c,d):c},a,a):$APP.Zc($APP.Xg,a,b)};yu.C=function(a,b,c){return $APP.Zc(yu,a,$APP.od.i(c,b))};yu.J=function(a){var b=$APP.v(a),c=$APP.z(a);a=$APP.v(c);c=$APP.z(c);return this.C(b,a,c)};yu.N=2;
40
+ var zu=new $APP.M(null,"entering","entering",-413471949),xu=new $APP.M(null,"leaving","leaving",608616060),wu=new $APP.M(null,"matched","matched",-975207164),du=new $APP.M(null,"active-state-raw","active-state-raw",-60607051),Ut=new $APP.M(null,"active-state","active-state",-1185168001),au=new $APP.M(null,"ghost-layer","ghost-layer",1707493707);var Nu="active-state active-index stiffness damping mass variant duration disabled".split(" "),Nt=$APP.Yf(["liquid","clean","organic"]);$APP.Sd(["x-morph-stack-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.zh,$APP.Y,$APP.el,$APP.Y,$APP.ji,$APP.Y],null),$APP.kl,!0],null),"x-morph-stack-changed",new $APP.P(null,2,[$APP.U,new $APP.P(null,2,[$APP.zh,$APP.Y,$APP.el,$APP.Y],null),$APP.kl,!1],null)]);var nu=[0],Eu=function Eu(a,b){var d=$APP.l(a,"__xMorphStackToken"),e=$APP.l(a,"__xMorphStackEntries"),g=$APP.l(a,"__xMorphStackLast"),h=function(){var C=$APP.l(a,"__xMorphStackModel");return $APP.r(C)?C:eu(a)}(),k=$APP.sl.g(h),m=$APP.Vk.g(h);h=$APP.Vj.g(h);g=$APP.Yg.i(0,$APP.Zg.i(1/30,function(){var C=$APP.l(a,"__xMorphStackTimeScale");return $APP.r(C)?C:1}()*($APP.r(g)?(b-g)/1E3:1/60)));a.__xMorphStackLast=b;if($APP.r($APP.r(e)?e.length:e)){b=[!0];for(var p=[1],q=e.length,w=0;;)if(w<q){var x=e[w],
41
+ y=Tt(x.t,x.v,g,k,m,h),A=y[0];y=y[1];x.t=A;x.v=y;x=x.update;x.g?x.g(A):x.call(null,A);A<p[0]&&(p[0]=A);Math.abs(A-1)<.001&&Math.abs(y)<.01||(b[0]=!1);w+=1}else break;mu(a,p[0]);$APP.r(b[0])?Cu.o?Cu.o(a,d,!0):Cu.call(null,a,d,!0):(e=window.requestAnimationFrame(function(C){return $APP.D.i(d,$APP.l(a,"__xMorphStackToken"))?Eu.i?Eu.i(a,C):Eu.call(null,a,C):null}),a.__xMorphStackRaf=e)}return null};$APP.ka("baredom.exports.x_morph_stack.init",Qu);export const init=Qu;