@vanelsas/baredom 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -1
- package/README.md +60 -6
- package/dist/base.js +397 -373
- package/dist/x-alert.js +19 -19
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +16 -16
- package/dist/x-badge.js +11 -11
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +16 -16
- package/dist/x-cancel-dialogue.js +17 -17
- package/dist/x-card.js +7 -7
- package/dist/x-chart.js +47 -47
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +9 -9
- package/dist/x-collapse.js +11 -11
- package/dist/x-command-palette.js +31 -31
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +20 -19
- package/dist/x-copy.js +24 -24
- package/dist/x-currency-field.js +22 -22
- package/dist/x-date-picker.js +41 -41
- package/dist/x-divider.js +13 -13
- package/dist/x-drawer.js +11 -11
- package/dist/x-dropdown.js +10 -10
- package/dist/x-fieldset.js +6 -6
- package/dist/x-file-download.js +7 -7
- package/dist/x-form-field.js +16 -16
- package/dist/x-form.js +10 -10
- package/dist/x-gaussian-blur.js +18 -18
- package/dist/x-grid.js +6 -6
- package/dist/x-kinetic-font.js +29 -0
- package/dist/x-kinetic-typography.js +39 -61
- package/dist/x-liquid-dock.js +40 -0
- package/dist/x-liquid-fill.js +45 -0
- package/dist/x-liquid-glass.js +48 -0
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +12 -12
- package/dist/x-metaball-cursor.js +28 -27
- package/dist/x-modal.js +12 -12
- package/dist/x-morph-stack.js +41 -0
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +34 -34
- package/dist/x-notification-center.js +9 -10
- package/dist/x-organic-divider.js +19 -19
- package/dist/x-organic-progress.js +38 -38
- package/dist/x-organic-shape.js +14 -14
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +14 -14
- package/dist/x-progress-circle.js +10 -10
- package/dist/x-progress.js +11 -11
- package/dist/x-radio.js +12 -12
- package/dist/x-ripple-effect.js +12 -13
- package/dist/x-scroll-parallax.js +19 -19
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +36 -37
- package/dist/x-scroll-timeline.js +47 -50
- package/dist/x-scroll.js +41 -41
- package/dist/x-search-field.js +15 -15
- package/dist/x-select.js +10 -10
- package/dist/x-sidebar.js +17 -17
- package/dist/x-skeleton.js +6 -6
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +23 -0
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +6 -6
- package/dist/x-splash.js +14 -14
- package/dist/x-stat.js +11 -11
- package/dist/x-stepper.js +16 -16
- package/dist/x-switch.js +11 -11
- package/dist/x-tab.js +8 -8
- package/dist/x-table-cell.js +23 -23
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +16 -16
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-theme.js +25 -0
- package/dist/x-timeline-item.js +24 -24
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +25 -25
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +11 -10
- package/package.json +30 -2
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
+
var vQ=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},wQ=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},xQ=function(a){return typeof a==="string"?(a=a.trim(),$APP.O(a,"")?a:null):null},yQ=function(a){return typeof a==="string"?(a=a.trim(),$APP.O(a,"")?a:null):null},BQ=function(a){a=$APP.G(zQ,
|
|
3
|
+
typeof a==="string"?a.trim().toLowerCase():null);return $APP.r(a)?a:AQ},UQ=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.Ai);var c=$APP.G(b,CQ),d=$APP.G(b,DQ),e=$APP.G(b,$APP.ql),g=$APP.G(b,EQ),h=$APP.G(b,FQ),k=$APP.G(b,$APP.Ck),m=$APP.G(b,GQ),p=$APP.G(b,HQ),q=$APP.G(b,IQ),w=$APP.G(b,JQ),x=$APP.G(b,KQ),y=$APP.G(b,LQ);b=$APP.G(b,MQ);return $APP.Q([NQ,OQ,PQ,$APP.Yi,$APP.Ri,QQ,RQ,SQ,$APP.jk,$APP.Jh,$APP.ik,$APP.Gl,TQ,$APP.W],[vQ(q,.5,0,1),vQ(y,10,4,20),vQ(h,.15,.05,.4),vQ(p,.3,.05,2),BQ(k),xQ(d),vQ(c,
|
|
4
|
+
.4,.1,1),b!=null,function(){var A=yQ(w);return $APP.r(A)?A:"rgba(244,114,182,0.35)"}(),vQ(e,12,0,40),function(){var A=yQ(x);return $APP.r(A)?A:"rgba(99,102,241,0.4)"}(),wQ(g),vQ(m,.3,0,1),a!=null])},VQ=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},XQ=function(){var a=$APP.l(WQ,"v");WQ.v=a+1;return a},YQ=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},
|
|
5
|
+
fR=function(a){var b=XQ(),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"),B=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),M=document.createElementNS("http://www.w3.org/2000/svg","stop"),Y=document.createElementNS("http://www.w3.org/2000/svg","stop"),ea=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");M.setAttribute("offset","0%");M.setAttribute("stop-color","white");M.setAttribute("stop-opacity","0.9");Y.setAttribute("offset","50%");Y.setAttribute("stop-color","white");Y.setAttribute("stop-opacity",
|
|
15
|
+
"0.15");ea.setAttribute("offset","100%");ea.setAttribute("stop-color","white");ea.setAttribute("stop-opacity","0.5");m.appendChild(M);m.appendChild(Y);m.appendChild(ea);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");M=$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(M)+")");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);M=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence");Y=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix");m.setAttribute("id",F);M.setAttribute("type","fractalNoise");M.setAttribute("baseFrequency",
|
|
17
|
+
"0.6");M.setAttribute("numOctaves","3");M.setAttribute("stitchTiles","stitch");Y.setAttribute("type","matrix");Y.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(M);m.appendChild(Y);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");M=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)+")");M.setAttribute("fill","white");F.appendChild(M);m.appendChild(F);g.appendChild(m);a.__xLiquidGlassMaskG=F;a.__xLiquidGlassMaskCore=M;$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;B.setAttribute("part","content");B.appendChild(E);c.appendChild(d);c.appendChild(w);c.appendChild(e);
|
|
20
|
+
c.appendChild(x);c.appendChild(y);c.appendChild(A);c.appendChild(B);a.setAttribute("data-entering","");setTimeout(function(){return a.removeAttribute("data-entering")},700);$APP.n(a,"__xLiquidGlassRefs",$APP.Q([$APP.Vh,$APP.xk,ZQ,$Q,aR,bR,$APP.Jh,$APP.bi,cR,$APP.xj,dR,eR],[B,A,w,p,h,[],k,c,y,e,q,x]))},gR=function(a,b,c){var d=$APP.Gl.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 B=
|
|
21
|
+
2*Math.PI*(A/d);x[A]=e+q*Math.cos(B);y[A]=g+w*Math.sin(B);A+=1}else break;q=[x,y];w=$APP.N($APP.l(a,"__xLiquidGlassRefs"));w=$APP.G(w,dR);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=$Q.g(g);g=bR.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,bR);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]},iR=function(a){var b=$APP.l(a,"__xLiquidGlassModel"),c=$APP.l(a,"__xLiquidGlassRefs"),d=$APP.Jh.g(c),e=ZQ.g(c),g=$APP.xk.g(c),h=dR.g(c),k=$Q.g(c);d.setAttribute("stdDeviation",""+$APP.S.g(OQ.g(b)));e.style.setProperty("--x-liquid-glass-blur",""+$APP.S.g($APP.Jh.g(b))+"px");h.setAttribute("fill","#ffffff");d=bR.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(hR,$APP.Ri.g(b));d=$APP.Vh.g(c);c=eR.g(c);e="url(#"+$APP.S.g($APP.l(a,"__xLiquidGlassMaskId"))+")";if(h){d.style.position="relative";d.style.zIndex="0";h=NQ.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(SQ.g(b))||(g.style.opacity="0")},jR=function(a,b){var c=$APP.l(a,"__xLiquidGlassModel"),d=$APP.Gl.g(c),e=$APP.Yi.g(c);c=PQ.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
|
+
bR);a=$APP.l(a,"__xLiquidGlassMaskSats");for(var m=0;;)if(m<d){var p=m*2.39996;var q=[g[m]+c*VQ(p,0,b*e),h[m]+c*VQ(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},kR=function(a){var b=$APP.l(a,"__xLiquidGlassModel"),c=$APP.xk.g($APP.l(a,"__xLiquidGlassRefs"));if($APP.r(SQ.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=RQ.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(TQ.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"}},lR=function(a,b){var c=$APP.l(a,"__xLiquidGlassModel");a=
|
|
29
|
+
cR.g($APP.l(a,"__xLiquidGlassRefs"));var d=$APP.ik.g(c);c=$APP.jk.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%)"},nR=function(a){$APP.r($APP.l(a,"__xLiquidGlassRaf"))||($APP.n(a,"__xLiquidGlassLF",
|
|
30
|
+
performance.now()),$APP.n(a,"__xLiquidGlassRaf",requestAnimationFrame(function(){return mR(a)})))},oR=function(a){var b=$APP.l(a,"__xLiquidGlassRaf");$APP.r(b)&&(cancelAnimationFrame(b),a.__xLiquidGlassRaf=null)},pR=function(a){var b=$APP.Gl.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,bR);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},qR=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)));gR(a,b,c);iR(a);var e=$APP.l(a,"__xLiquidGlassModel");$APP.r(function(){var g=$APP.W.g(e);return $APP.r(g)?g:YQ()}())?pR(a):(jR(a,function(){var g=$APP.l(a,"__xLiquidGlassTime");return $APP.r(g)?g:0}()),nR(a))}}return null},rR=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)},sR=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)},tR=
|
|
34
|
+
function(a){return UQ($APP.Q([$APP.ql,EQ,FQ,$APP.Ck,GQ,HQ,IQ,JQ,KQ,LQ,MQ,$APP.Ai,CQ,DQ],[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")]))},uR=function(a){var b=tR(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)&&(gR(a,c,d),iR(a),$APP.r(function(){var e=$APP.W.g(b);return $APP.r(e)?e:YQ()}())?(oR(a),pR(a)):(jR(a,function(){var e=$APP.l(a,"__xLiquidGlassTime");return $APP.r(e)?e:0}()),nR(a)))},vR=function(a){Object.defineProperty(a,"blobs",{get:function(){var b=this.getAttribute("blobs");return wQ(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 vQ(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 vQ(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 vQ(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 vQ(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 vQ(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 vQ(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 vQ(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})},xR=function(){var a=class extends HTMLElement{};a.observedAttributes=wR;a.prototype.connectedCallback=function(){var b=this,c=tR(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"))||fR(b);iR(b);c=new ResizeObserver(function(d){return qR(b,d)});b.__xLiquidGlassRO=c;c.observe(b);sR(b);rR(b);return null};
|
|
43
|
+
a.prototype.disconnectedCallback=function(){oR(this);sR(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"))&&uR(this);return null};vR(a.prototype);return a},yR=function(){$APP.r(customElements.get("x-liquid-glass"))||customElements.define("x-liquid-glass",xR());return null},AQ=new $APP.K(null,"surface","surface",699915646),dR=new $APP.K(null,
|
|
44
|
+
"core","core",-86019209),TQ=new $APP.K(null,"specular-intensity","specular-intensity",437849876),FQ=new $APP.K(null,"amplitude-raw","amplitude-raw",-673525115),OQ=new $APP.K(null,"goo","goo",-1253057564),ZQ=new $APP.K(null,"glass","glass",1652756718),aR=new $APP.K(null,"filter","filter",-948537934),NQ=new $APP.K(null,"frost","frost",-3478780),RQ=new $APP.K(null,"specular-size","specular-size",757318993),hR=new $APP.K(null,"submerged","submerged",1636004473),QQ=new $APP.K(null,"tint","tint",-1286736913),
|
|
45
|
+
eR=new $APP.K(null,"grain","grain",2007662171),DQ=new $APP.K(null,"tint-raw","tint-raw",-653441954),JQ=new $APP.K(null,"color-2-raw","color-2-raw",-1440423537),MQ=new $APP.K(null,"specular-attr","specular-attr",-716021610),GQ=new $APP.K(null,"specular-intensity-raw","specular-intensity-raw",109079177),HQ=new $APP.K(null,"speed-raw","speed-raw",1756460778),LQ=new $APP.K(null,"goo-raw","goo-raw",59658675),CQ=new $APP.K(null,"specular-size-raw","specular-size-raw",592980345),KQ=new $APP.K(null,"color-1-raw",
|
|
46
|
+
"color-1-raw",-1322552111),$Q=new $APP.K(null,"g","g",1738089905),PQ=new $APP.K(null,"amplitude","amplitude",-1387734203),cR=new $APP.K(null,"gradient","gradient",-1983908971),IQ=new $APP.K(null,"frost-raw","frost-raw",1383732749),SQ=new $APP.K(null,"specular?","specular?",964138290),EQ=new $APP.K(null,"blobs-raw","blobs-raw",1729393761),bR=new $APP.K(null,"satellites","satellites",644765266);var wR="blobs speed amplitude blur goo tint specular specular-size specular-intensity disabled mode frost color-1 color-2".split(" ");
|
|
47
|
+
$APP.Q([NQ,OQ,PQ,new $APP.K(null,"specularSize","specularSize",-1757715579),$APP.gj,$APP.Yi,$APP.Ri,$APP.xk,QQ,new $APP.K(null,"color2","color2",1248091856),$APP.Jh,$APP.Gl,new $APP.K(null,"color1","color1",306558619),new $APP.K(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.X],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.X],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.X],null),new $APP.P(null,1,[$APP.Z,$APP.V],null)]);var zQ=new $APP.P(null,2,["surface",AQ,"submerged",hR],null);var WQ={v:0},mR=function mR(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;jR(a,d);kR(a);lR(a,d);$APP.n(a,"__xLiquidGlassRaf",requestAnimationFrame(function(){return mR.g?mR.g(a):mR.call(null,a)}))}return null};$APP.ka("baredom.exports.x_liquid_glass.init",yR);export const init=yR;
|
package/dist/x-menu-item.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
null)},
|
|
4
|
-
"false");a.setAttribute("role","menuitem");a.setAttribute("tabindex","-1");b.setAttribute("data-type","");b.setAttribute("data-variant",$APP.
|
|
5
|
-
"Enter")||$APP.
|
|
6
|
-
b;a.__xMenuItemHandlers=g},
|
|
7
|
-
"variant",{get:function(){return this.getAttribute("variant")},set:function(b){return $APP.
|
|
8
|
-
function(){if(
|
|
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;
|
|
10
|
-
var c=$APP.l(this,"__xMenuItemRefs");if($APP.
|
|
11
|
-
|
|
2
|
+
var JP=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.ri);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(HP,d)?d:"";b=$APP.r(b)?b:"";b=$APP.J(IP,b)?b:"";return new $APP.P(null,4,[$APP.ri,a,$APP.gj,c,$APP.Fh,d,$APP.Z,b],null)},KP=function(a){return $APP.l(a,"__xMenuItemInit")===!0},LP=function(a){return new $APP.P(null,4,[$APP.ri,a.getAttribute("value"),$APP.gj,a.hasAttribute("disabled"),$APP.Fh,a.getAttribute("variant"),$APP.Z,a.getAttribute("type")],
|
|
3
|
+
null)},MP=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}))},NP=function(a){var b=$APP.l(a,"__xMenuItemRefs");b=$APP.r(b)?$APP.l(b,"base"):null;var c=JP(LP(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},OP=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=JP(LP(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=MP(a)):h=null;return h}function d(h){var k=JP(LP(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")?MP(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},PP=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})},RP=function(){var a=class extends HTMLElement{};a.observedAttributes=QP;a.prototype.connectedCallback=
|
|
8
|
+
function(){if(KP(this)){OP(this);var b=NP(this)}else{if(!KP(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:var(--x-color-text,#111827);--x-menu-item-hover-bg:var(--x-color-surface-hover,#f3f4f6);--x-menu-item-focus-bg:var(--x-color-surface-hover,#eff6ff);--x-menu-item-focus-color:var(--x-color-primary-hover,#1d4ed8);--x-menu-item-disabled-opacity:0.45;--x-menu-item-danger-color:var(--x-color-danger,#dc2626);--x-menu-item-danger-hover-bg:#fef2f2;--x-menu-item-padding:8px 12px;--x-menu-item-border-radius:var(--x-radius-sm,4px);--x-menu-item-font-size:0.9375rem;--x-menu-item-icon-gap:8px;--x-menu-item-divider-color:var(--x-color-border,#e5e7eb);}:host([disabled]){pointer-events:none;}@media (prefers-color-scheme:dark){:host{--x-menu-item-color:var(--x-color-text,#f9fafb);--x-menu-item-hover-bg:var(--x-color-surface-hover,#1f2937);--x-menu-item-focus-bg:var(--x-color-surface-hover,#1e3a5f);--x-menu-item-focus-color:var(--x-color-focus-ring,#60a5fa);--x-menu-item-danger-color:var(--x-color-danger,#f87171);--x-menu-item-danger-hover-bg:#2d1515;--x-menu-item-divider-color:var(--x-color-border,#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;OP(this);this.__xMenuItemInit=!0}NP(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 KP(this)?NP(this):null};PP(a);return a},SP=function(){return $APP.r(customElements.get("x-menu-item"))?null:customElements.define("x-menu-item",
|
|
11
|
+
RP())};var QP=["value","disabled","variant","type"],HP=new $APP.R(null,new $APP.P(null,2,["",null,"danger",null],null),null),IP=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.ri,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_menu_item.init",SP);export const init=SP;
|
package/dist/x-menu.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
return b>0?$APP.
|
|
4
|
-
-1},a))}
|
|
5
|
-
(e=
|
|
6
|
-
d)?d:"bottom-start";a=new $APP.
|
|
7
|
-
h.indexOf(a))?
|
|
8
|
-
{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.
|
|
9
|
-
set:function(b){return $APP.
|
|
10
|
-
d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-menu-bg
|
|
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;
|
|
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
|
|
13
|
-
"first","first",-644103046);var
|
|
2
|
+
var SG=function(a){return $APP.l(a,"__xMenuInit")===!0},TG=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},UG=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0}))},XG=function(a){$APP.r(a.hasAttribute("open"))||(a.setAttribute("open",""),UG(a,"x-menu-open",{}));if($APP.r(null)){a=TG(a);var b=a.length;
|
|
3
|
+
return b>0?$APP.D.i(null,VG)?a[0].focus():$APP.D.i(null,WG)?a[b-1].focus():null:null}return null},YG=function(a,b){$APP.r(a.hasAttribute("open"))&&(a.removeAttribute("open"),UG(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},ZG=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))},$G=function(a,b){var c=b.key,d=a.hasAttribute("open");if($APP.D.i(c,"Escape"))return $APP.r(d)?(b.preventDefault(),YG(a,!0)):null;if($APP.D.i(c,"Tab"))return $APP.r(d)?YG(a,!1):null;if($APP.D.i(c,"ArrowDown")||$APP.D.i(c,"ArrowUp")){var e=TG(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();XG(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=TG(a),e.length>0))return b.preventDefault(),e[0].focus()}else if($APP.D.i(c,"End")&&$APP.r(d)&&(e=TG(a),e.length>0))return b.preventDefault(),e[e.length-1].focus();return null},bH=function(a){var b=$APP.l(a,"__xMenuRefs");b=$APP.r(b)?$APP.l(b,"popup"):null;a=new $APP.P(null,3,[$APP.il,a.hasAttribute("open"),$APP.hj,a.getAttribute("placement"),$APP.T,a.getAttribute("label")],null);a=$APP.N(a);var c=$APP.G(a,$APP.il),d=$APP.G(a,$APP.hj);a=$APP.G(a,$APP.T);c=$APP.I(c);d=$APP.r(d)?d:"";d=$APP.J(aH,
|
|
6
|
+
d)?d:"bottom-start";a=new $APP.P(null,3,[$APP.il,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},cH=function(a){function b(h){h.stopPropagation();h=h.detail.value;YG(a,!1);return UG(a,"x-menu-select",{value:$APP.r(h)?h:""})}function c(h){return $G(a,h)}function d(h){$APP.r(a.hasAttribute("open"))?(h=h.composedPath(),h=$APP.D.i(-1,
|
|
7
|
+
h.indexOf(a))?YG(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)?ZG(k,h):k)?$APP.r(a.hasAttribute("open"))?YG(a,!0):XG(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},dH=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})},fH=function(){var a=class extends HTMLElement{};a.observedAttributes=eH;a.prototype.connectedCallback=function(){if(SG(this)){cH(this);var b=bH(this)}else{if(!SG(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
|
+
d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-menu-bg:var(--x-color-bg,#ffffff);--x-menu-border:1px solid var(--x-color-border,#e5e7eb);--x-menu-border-radius:var(--x-radius-md,8px);--x-menu-shadow:var(--x-shadow-md,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:var(--x-color-bg,#1f2937);--x-menu-border:1px solid var(--x-color-border,#374151);--x-menu-shadow:var(--x-shadow-md,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);max-width:calc(100vw - 1rem);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;cH(this);this.__xMenuInit=!0}bH(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 SG(this)?bH(this):null};dH(a);return a},gH=function(){return $APP.r(customElements.get("x-menu"))?null:customElements.define("x-menu",fH())},WG=new $APP.K(null,"last","last",1105735132),VG=new $APP.K(null,
|
|
13
|
+
"first","first",-644103046);var eH=["open","placement","label"],aH=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.ri,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_menu.init",gH);export const init=gH;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
3:Math.min(20,Math.max(.5,a))}return 3},
|
|
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"},
|
|
5
|
-
return b},
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
b);a.__xMetaballHandler=b},
|
|
9
|
-
set:function(b){return b==null?this.removeAttribute("blob-size"):this.setAttribute("blob-size",""+$APP.
|
|
10
|
-
""):this.removeAttribute("noise")},enumerable:!0,configurable:!0});Object.defineProperty(a,"noiseScale",{get:function(){return
|
|
11
|
-
""+$APP.
|
|
12
|
-
configurable:!0});Object.defineProperty(a,"threshold",{get:function(){return
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"feColorMatrix"),
|
|
16
|
-
d);
|
|
17
|
-
m.appendChild(x);e=new $APP.
|
|
18
|
-
"__xMetaballRefs"));k=$APP.
|
|
19
|
-
function(){var b=$APP.l(this,"__xMetaballRaf");$APP.
|
|
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.
|
|
21
|
-
"__xMetaballRefs");m=$APP.
|
|
22
|
-
"noise-scale-raw",123215597),
|
|
23
|
-
"blob-count-raw","blob-count-raw",-1850938603),
|
|
24
|
-
$APP.
|
|
25
|
-
null),new $APP.
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
$APP.
|
|
2
|
+
var oD=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},pD=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},qD=function(a){return typeof a==="string"&&a.trim().length>0?a.trim():"#6366f1"},rD=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},sD=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},tD=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},uD=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},vD=
|
|
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"},xD=function(a){if(typeof a==="string"&&a.trim().length>0){var b=$APP.G(wD,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},yD=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},zD=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},AD=function(a,b,c){return a+(b-a)*c},PD=function(a){a=$APP.Q([$APP.ql,BD,CD,DD,ED,FD,$APP.Ah,$APP.Wl,GD,HD],[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,HD);a=$APP.G(b,$APP.ql);var d=$APP.G(b,BD),e=$APP.G(b,CD),g=$APP.G(b,DD),h=$APP.G(b,ED),k=$APP.G(b,FD),m=$APP.G(b,$APP.Ah),p=$APP.G(b,$APP.Wl);b=$APP.G(b,GD);b=oD(b);p=qD(p);g=xD(g);c=sD(c);var q=[];if($APP.r($APP.r(g)?$APP.C(g)>0:g))for(var w=$APP.C(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,ID,JD,$APP.rl,$APP.Xk,KD,LD,$APP.Jh,MD,ND,OD],[p,g,c,q,vD(m),rD(h),b,uD(a),pD(e),k!=null,
|
|
7
|
+
tD(d)])},QD=function(a,b){b=$APP.N(b);b=$APP.G(b,$APP.fj);return a.style.setProperty("--x-metaball-cursor-color",b)},SD=function(a){$APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)||(a.__xMetaballSeed=0,$APP.n(a,"__xMetaballRaf",requestAnimationFrame(function(){return RD(a)})))},TD=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},UD=function(a){var b=$APP.l(a,"__xMetaballHandler");$APP.r(b)&&(window.removeEventListener("pointermove",b),a.__xMetaballHandler=null)},VD=function(a){Object.defineProperty(a,"blobCount",{get:function(){return oD(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 pD(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 qD(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 rD(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 sD(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 tD(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 uD(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 vD(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 xD(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
|
+
ZD=function(){var a=class extends HTMLElement{};a.observedAttributes=WD;a.prototype.connectedCallback=function(){var b=PD(this);this.__xMetaballModel=b;this.__xMetaballMouse={x:0,y:0};if(!$APP.r($APP.l(this,"__xMetaballRefs"))){var c=$APP.l(this,"__xMetaballModel"),d=XD[0];XD[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
|
+
YD;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.Xk);var q=$APP.G(p,ND),w=$APP.G(p,KD);p=$APP.G(p,OD);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"),B=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");B.setAttribute("in","blur");B.setAttribute("type","matrix");B.setAttribute("values",
|
|
16
|
+
d);B.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(B);y.appendChild(E);y.appendChild(H);x.appendChild(y);
|
|
17
|
+
m.appendChild(x);e=new $APP.P(null,5,[$APP.kk,y,$APP.Ii,A,$APP.Ll,B,$APP.Tk,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,LD);m=$APP.G(h,MD);h=$APP.G(h,$APP.rl);
|
|
18
|
+
k=$APP.N($APP.l(this,"__xMetaballRefs"));k=$APP.G(k,$APP.Hi);m=zD(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=yD(g);QD(this,b);this.setAttribute("aria-hidden","true");this.setAttribute("role","presentation");UD(this);TD(this);SD(this);
|
|
19
|
+
return null};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMetaballRaf");$APP.r(b)&&(cancelAnimationFrame(b),this.__xMetaballRaf=null);UD(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){if($APP.O(c,d)&&(this.__xMetaballModel=b=PD(this),$APP.r($APP.l(this,"__xMetaballRefs")))){d=$APP.N(b);c=$APP.G(d,LD);var e=$APP.G(d,MD);d=$APP.G(d,$APP.rl);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=zD(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=yD(c);g=$APP.N(b);h=$APP.G(g,$APP.Jh);e=$APP.G(g,$APP.Xk);c=$APP.G(g,
|
|
21
|
+
ND);d=$APP.G(g,KD);g=$APP.G(g,OD);k=$APP.l(this,"__xMetaballRefs");m=$APP.Ii.g(k);$APP.r(m)&&m.setAttribute("stdDeviation",""+$APP.S.g(h));h=$APP.Ll.g(k);$APP.r(h)&&h.setAttribute("values",e);e=$APP.Tk.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 QD(this,b)}return null};VD(a.prototype);return a},$D=function(){$APP.r(customElements.get("x-metaball-cursor"))||customElements.define("x-metaball-cursor",
|
|
22
|
+
ZD());return null},ED=new $APP.K(null,"noise-scale-raw","noise-scale-raw",123215597),BD=new $APP.K(null,"noise-intensity-raw","noise-intensity-raw",-116633534),ND=new $APP.K(null,"noise?","noise?",-38350370),MD=new $APP.K(null,"blob-size","blob-size",-1862159046),KD=new $APP.K(null,"noise-scale","noise-scale",-2033475279),FD=new $APP.K(null,"noise-attr","noise-attr",-1534959409),DD=new $APP.K(null,"palette-raw","palette-raw",-1398782582),ID=new $APP.K(null,"palette","palette",-456203511),GD=new $APP.K(null,
|
|
23
|
+
"blob-count-raw","blob-count-raw",-1850938603),HD=new $APP.K(null,"noise-speed-raw","noise-speed-raw",1761342974),JD=new $APP.K(null,"noise-speed","noise-speed",866692139),LD=new $APP.K(null,"blob-count","blob-count",-248711053),OD=new $APP.K(null,"noise-intensity","noise-intensity",747731519),CD=new $APP.K(null,"blob-size-raw","blob-size-raw",530207878);var WD="blob-count blob-size color noise noise-scale noise-speed noise-intensity blur threshold palette".split(" ");
|
|
24
|
+
$APP.Q([$APP.fj,new $APP.K(null,"blobSize","blobSize",-64083896),new $APP.K(null,"noiseIntensity","noiseIntensity",-792053623),ID,new $APP.K(null,"noiseScale","noiseScale",2003002730),new $APP.K(null,"noise","noise",-994696820),$APP.Xk,$APP.Jh,new $APP.K(null,"noiseSpeed","noiseSpeed",-959403627),new $APP.K(null,"blobCount","blobCount",-1279691625)],[new $APP.P(null,1,[$APP.Z,$APP.X],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.X],
|
|
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.X],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 wD=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 XD=[0],YD=":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;}}",RD=function RD(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=AD($APP.l(q,"x"),h,w);w=AD($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(ND.g(k))&&(d=$APP.l(a,"__xMetaballSeed")+JD.g(k),e=$APP.l(a,"__xMetaballRefs"),a.__xMetaballSeed=d,e=$APP.Tk.g(e),$APP.r(e)&&e.setAttribute("seed",""+$APP.S.g(Math.floor(d))));$APP.n(a,"__xMetaballRaf",requestAnimationFrame(function(){return RD.g?RD.g(a):RD.call(null,a)}))}return null};$APP.ka("baredom.exports.x_metaball_cursor.init",$D);export const init=$D;
|
package/dist/x-modal.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
2
|
+
var SR=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:var(--x-color-bg,Canvas);--x-modal-fg:var(--x-color-text,CanvasText);--x-modal-backdrop:rgb(0 0 0/0.45);--x-modal-shadow:var(--x-shadow-lg,0 20px 60px rgb(0 0 0/0.25));--x-modal-radius:var(--x-radius-md,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:90dvh;--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:var(--x-color-border,color-mix(in srgb,currentColor 12%,transparent));--x-modal-duration:var(--x-transition-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:100%;height:100dvh;border-radius:0;max-width:100%;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;}[part\x3ddialog]{max-width:calc(100vw - 2rem);}:host([data-size\x3dfull]) [part\x3ddialog]{max-width:100%;}@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")},
|
|
5
|
-
a=$APP.
|
|
6
|
-
return $APP.
|
|
7
|
-
"");return null},
|
|
8
|
-
"-1"),a.__xModalDialogTab=!0),d.focus());return null},0):
|
|
9
|
-
$APP.
|
|
10
|
-
g.shiftKey;$APP.
|
|
11
|
-
var e=$APP.l(b,"backdrop");b=$APP.l(b,"keydown");$APP.
|
|
12
|
-
this.setAttribute("size",""+$APP.
|
|
13
|
-
configurable:!0,writable:!0});Object.defineProperty(a,"toggle",{value:function(){$APP.
|
|
14
|
-
function(b,c,d){$APP.O(c,d)&&
|
|
4
|
+
footer:p};return $APP.l(a,"__xModalRefs")},TR=function(a,b,c){a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},UR=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))},VR=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()},WR=function(a,b){TR(a,"x-modal-dismiss",{reason:b});a.removeAttribute("open");return null},YR=function(a){$APP.r(a.hasAttribute("open"))||a.setAttribute("open",
|
|
7
|
+
"");return null},ZR=function(a){a.removeAttribute("open");return null},$R=function(a,b){$APP.O($APP.l(a,"__xModalPrevOpen"),b)&&(a.__xModalPrevOpen=b,TR(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)?UR(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):VR(a))},bS=function(a){var b=SR(a);b=$APP.l(b,"dialog");var c=new $APP.P(null,3,[$APP.ai,a.hasAttribute("open"),$APP.Zk,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.Zk);d=$APP.G(d,$APP.Oh);e=$APP.I(e);c=typeof c==="string"&&$APP.J(aS,c)?c:"md";d=typeof d==="string"&&$APP.O(d,"")?d:"Modal";c=new $APP.P(null,3,[$APP.El,e,$APP.rh,c,$APP.T,d],null);d=$APP.El.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));$R(a,d)},cS=function(a){function b(g){var h=g.key;if($APP.D.i(h,"Escape"))g.preventDefault(),WR(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 WR(a,"backdrop")}var d=SR(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})},dS=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},eS=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.r(b)?YR(this):ZR(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 YR(this)},enumerable:!0,configurable:!0,writable:!0});Object.defineProperty(a,"hide",{value:function(){return ZR(this)},enumerable:!0,
|
|
13
|
+
configurable:!0,writable:!0});Object.defineProperty(a,"toggle",{value:function(){$APP.r(this.hasAttribute("open"))?ZR(this):YR(this);return null},enumerable:!0,configurable:!0,writable:!0})},gS=function(){if(!$APP.r(customElements.get("x-modal"))){var a=class extends HTMLElement{};a.observedAttributes=fS;a.prototype.connectedCallback=function(){SR(this);dS(this);cS(this);bS(this);return null};a.prototype.disconnectedCallback=function(){dS(this);VR(this);return null};a.prototype.attributeChangedCallback=
|
|
14
|
+
function(b,c,d){$APP.O(c,d)&&bS(this);return null};eS(a.prototype);customElements.define("x-modal",a)}return null},hS=function(){return gS()};var aS=new $APP.R(null,new $APP.P(null,5,["md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),fS=["open","size","label"];$APP.Sd(["x-modal-toggle",new $APP.P(null,2,[$APP.ll,!1,$APP.U,new $APP.P(null,1,[$APP.il,$APP.qj],null)],null),"x-modal-dismiss",new $APP.P(null,2,[$APP.ll,!1,$APP.U,new $APP.P(null,1,[$APP.ji,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_modal.init",hS);export const init=hS;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
+
var Pt=function(a){return typeof a==="string"?(a=a.trim().toLowerCase(),$APP.J(Ot,a)?a:"clean"):"clean"},Qt=function(a){return $APP.D.i(a,"organic")||$APP.D.i(a,"liquid")},Rt=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)},St=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},Tt=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},Ut=function(a,b,c,d,e,g){b+=(e*(1-a)-g*b)/d*c;return[a+b*c,b]},Wt=function(a,b){b=$APP.N(b);var c=$APP.G(b,Vt);b=$APP.G(b,$APP.uj);var d=$APP.Be(a);a=$APP.C(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},Xt=function(a,b,c){return a+(b-a)*c},Yt=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},Zt=function(a,b,c){var d=Yt(a),e=Yt(b);return $APP.r($APP.r(d)?e:d)?"rgba("+
|
|
5
|
+
$APP.S.g(Math.round(Xt(d[0],e[0],c)))+","+$APP.S.g(Math.round(Xt(d[1],e[1],c)))+","+$APP.S.g(Math.round(Xt(d[2],e[2],c)))+","+$APP.S.g(Xt(d[3],e[3],c))+")":c<.5?a:b},$t=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},au=function(a,
|
|
6
|
+
b){return new $APP.P(null,2,[$APP.zh,$APP.r(a)?a:"",$APP.fl,$APP.r(b)?b:""],null)},cu=function(a){var b=$APP.l(a,"__xMorphStackRefs"),c=$APP.r(b)?bu.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,bu,c,$APP.wc([$APP.xj,d]));return a.__xMorphStackRefs=b},du=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")},fu=function(a){a=new $APP.P(null,8,[eu,a.getAttribute("active-state"),$APP.vk,a.getAttribute("active-index"),$APP.kl,a.getAttribute("stiffness"),$APP.Nl,a.getAttribute("damping"),$APP.Xi,a.getAttribute("mass"),$APP.Bk,a.getAttribute("variant"),$APP.oi,a.getAttribute("duration"),
|
|
10
|
+
$APP.Sk,a.hasAttribute("disabled")],null);a=$APP.N(a);var b=$APP.G(a,eu),c=$APP.G(a,$APP.vk),d=$APP.G(a,$APP.kl),e=$APP.G(a,$APP.Nl),g=$APP.G(a,$APP.Xi),h=$APP.G(a,$APP.Bk),k=$APP.G(a,$APP.oi);a=$APP.G(a,$APP.Sk);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=St(d,170,10,500);e=St(e,26,1,100);g=St(g,1,.1,10);h=Pt(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,[Vt,b,$APP.uj,c,$APP.Wk,d,$APP.Wj,e,$APP.tl,g,$APP.Fh,h,$APP.hk,k,$APP.W,$APP.I(a)],null)},gu=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},hu=function(a){a=du(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},iu=function(a){a=hu(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},ju=function(a,b){a=hu(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},ku=function(a,b){for(var c=hu(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},lu=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},mu=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",Rt(c))},nu=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,mu(a,c*(1-b),Xt(d,1,b)))},pu=function(a){var b=cu(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=ou[0];ou[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",Rt(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=cu(a);c=$APP.N(c);c=$APP.G(c,bu);d=gu(a,"--x-morph-stack-goo-blur",10);e=gu(a,"--x-morph-stack-goo-threshold",
|
|
17
|
+
18);a.__xMorphStackGooBaseBlur=d;a.__xMorphStackGooBaseThreshold=e;mu(a,d,e);c.style.filter="url(#"+$APP.S.g(b)+")";c.style.webkitFilter="url(#"+$APP.S.g(b)+")"},qu=function(a){a=$APP.l(a,"__xMorphStackRefs");a=$APP.r(a)?bu.g(a):null;$APP.r(a)&&(a.style.filter="",a.style.webkitFilter="")},ru=function(a){a.style.position="absolute";a.style.margin="0";a.style.boxSizing="border-box";a.style.transformOrigin="top left";a.style.pointerEvents="none"},su=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"},tu=function(a,b,c,d){function e(ta){ta=$APP.Yg.i(0,$APP.Zg.i(1,ta));var Ha=Xt(ea,0,ta),Na=Xt(F,1,ta),Ya=Xt(M,1,ta);B.style.transform="translate("+$APP.S.g(Xt(Y,0,ta))+"px,"+$APP.S.g(Ha)+"px) scale("+$APP.S.g(Na)+","+$APP.S.g(Ya)+")";Ha=B.style;Na=$t(m);Ya=$t(p);if($APP.r($APP.r(Na)?$APP.r(Ya)?$APP.D.i(Na.length,Ya.length):Ya:Na)){for(var Za=[],ib=Na.length,Kb=0;;)if(Kb<ib)Za.push(""+
|
|
19
|
+
$APP.S.g(Xt(Na[Kb],Ya[Kb],ta))+"px"),Kb+=1;else break;Na=Za.join(" ")}else Na=ta<.5?m:p;Ha.borderRadius=Na;$APP.r($APP.r(q)?w:q)&&(B.style.backgroundColor=Zt(q,w,ta));$APP.r($APP.r(x)?y:x)&&(B.style.color=Zt(x,y,ta));A&&(B.style.opacity=""+$APP.S.g($APP.Yg.i(0,$APP.Zg.i(1,ta))));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
|
+
B=g.cloneNode(!0);c=h.w;d=h.h;var E=k.w,H=k.h,F=c>0?E/c:1,M=d>0?H/d:1,Y=k.x-h.x,ea=k.y-h.y;ru(B);su(B,h,b);a.appendChild(B);g.style.visibility="hidden";e(0);return{t:0,v:0,update:e,finalize:function(){g.style.visibility="";return $APP.r(B.parentNode)?B.parentNode.removeChild(B):null}}},uu=function(a,b,c,d){function e(B){B=$APP.Yg.i(0,$APP.Zg.i(1,B));var E=Xt(0,w,B),H=Xt(1,x,B),F=Xt(1,y,B);A.style.transform="translate("+$APP.S.g(Xt(0,q,B))+"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-B));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);ru(A);su(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}}},vu=function(a,b,c){var d=$APP.l(c,"rect"),e=$APP.l(c,"node").cloneNode(!0);ru(e);su(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}}},wu=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=""}}},Bu=function(a,b,c){a=cu(a);a=$APP.N(a);var d=$APP.G(a,bu),e=d.getBoundingClientRect(),g=Object.keys(b);a=Object.keys(c);g=$APP.Be(g);a=$APP.Be(a);g=$APP.ag(g);a=$APP.ag(a);
|
|
23
|
+
a=new $APP.P(null,3,[xu,$APP.am.i(g,a),yu,zu.i(g,a),Au,zu.i(a,g)],null);var h=xu.g(a),k=yu.g(a);g=Au.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(tu(d,e,x,w));$APP.O(y,A)&&a.push(uu(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.C(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(tu(d,e,m,p)),$APP.O(q,x)&&a.push(uu(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(vu(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.C(k),k=p):(k=$APP.v(h),a.push(vu(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(wu($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.C(b),b=g):(b=$APP.v(d),a.push(wu($APP.l(c,b))),b=$APP.z(d),
|
|
25
|
+
d=null,e=0),g=0;else break;return a},Cu=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},Du=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);Cu(b);a.__xMorphStackEntries=null;a.__xMorphStackLast=null;qu(a);$APP.r(c)&&(c=$APP.nh(au($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},Eu=function(a){var b=$APP.l(a,"__xMorphStackRaf");$APP.r(b)&&(window.cancelAnimationFrame(b),a.__xMorphStackRaf=null);Cu($APP.l(a,"__xMorphStackEntries"));a.__xMorphStackEntries=null;a.__xMorphStackLast=null;qu(a)},Gu=function(a,b,c){var d=$APP.l(a,"__xMorphStackCurrent"),e=function(){var m=$APP.l(a,"__xMorphStackModel");
|
|
27
|
+
return $APP.r(m)?m:fu(a)}(),g=iu(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)?ju(a,d):null;g=ju(a,b);c=$APP.nh(new $APP.P(null,3,[$APP.zh,$APP.r(d)?d:"",$APP.fl,$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;Eu(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))ku(a,b),queueMicrotask(function(){var m=$APP.nh(au(d,b));m=new CustomEvent("x-morph-stack-changed",{detail:m,bubbles:!0,composed:!0});return a.dispatchEvent(m)});else{h=lu(h);ku(a,b);$APP.Hi.g(du(a));g=lu(g);g=Bu(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",Tt($APP.hk.g(e),
|
|
29
|
+
$APP.Wk.g(e),$APP.Wj.g(e),$APP.tl.g(e)));Qt($APP.Fh.g(e))&&(pu(a),nu(a,0));g.length===0?Du(a,k,!0):(g=window.requestAnimationFrame(function(m){return $APP.D.i(k,$APP.l(a,"__xMorphStackToken"))?Fu(a,m):null}),a.__xMorphStackRaf=g)}return!0},Hu=function(a){du(a);var b=fu(a);a.__xMorphStackModel=b;a.setAttribute("data-variant",$APP.Fh.g(b));var c=iu(a);c=Wt($APP.Be($APP.wc(c)),b);b=$APP.l(a,"__xMorphStackCurrent");b==null?$APP.r(c)&&ku(a,c):$APP.r($APP.r(c)?$APP.O(c,b):c)?Gu(a,c,"attribute"):(c=c==null,
|
|
30
|
+
$APP.r(c?b:c)&&(Eu(a),ku(a,null)))},Iu=function(a){var b=iu(a);var c=$APP.l(a,"__xMorphStackModel");c=$APP.r(c)?c:fu(a);b=Wt($APP.Be($APP.wc(b)),c);c=$APP.l(a,"__xMorphStackCurrent");b==null?(Eu(a),ku(a,null)):$APP.r($APP.r(c)?ju(a,c)==null:c)?(Eu(a),ku(a,b)):c==null?ku(a,b):ku(a,c);return null},Ju=function(a){function b(){return Iu(a)}var c=du(a);c=$APP.N(c);$APP.G(c,$APP.Fi).addEventListener("slotchange",b);$APP.n(a,"__xMorphStackHandlers",{slot:b})},Ku=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},Lu=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})},Mu=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})},Nu=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});Mu(a,"stiffness","stiffness");Mu(a,"damping","damping");Mu(a,"mass","mass");Mu(a,"duration","duration");Object.defineProperty(a,"variant",{get:function(){return Pt(this.getAttribute("variant"))},set:function(b){return b==null?this.removeAttribute("variant"):this.setAttribute("variant",""+$APP.S.g(b))},enumerable:!0,
|
|
34
|
+
configurable:!0});Lu(a);a.goTo=function(b){b=b!=null?""+$APP.S.g(b):null;return Gu(this,b,"method")};a.next=function(){var b=iu(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=Gu(this,b[$APP.hd(d+1,c)],"method")}else b=null;return b};a.prev=function(){var b=iu(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=Gu(this,b[$APP.hd(d-1+c,c)],"method")}else b=null;return b};a.states=function(){return iu(this)}},Qu=function(){var a=class extends HTMLElement{};a.observedAttributes=Ou;a.prototype.connectedCallback=function(){du(this);Ku(this);Ju(this);Hu(this);$APP.l(this,"__xMorphStackCurrent")==null&&Iu(this);return null};a.prototype.disconnectedCallback=function(){Eu(this);var b=$APP.l(this,"__xMorphStackRefs"),c=$APP.r(b)?bu.g(b):null;$APP.r($APP.r(c)?c.parentNode:c)&&c.parentNode.removeChild(c);
|
|
36
|
+
$APP.r(b)&&(this.__xMorphStackRefs=Pu.i(Pu.i(b,bu),$APP.xj));this.__xMorphStackGooBaseThreshold=this.__xMorphStackGooBaseBlur=this.__xMorphStackFilterMatrix=this.__xMorphStackFilterBlur=this.__xMorphStackFilterId=null;Ku(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&Hu(this);return null};Nu(a.prototype);return a},Ru=function(){$APP.r(customElements.get("x-morph-stack"))||customElements.define("x-morph-stack",Qu());return null},Pu=function Pu(a){switch(arguments.length){case 1:return Pu.g(arguments[0]);
|
|
37
|
+
case 2:return Pu.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 Pu.C(arguments[0],arguments[1],2<c.length?new $APP.Vb(c.slice(2),0,null):null)}};Pu.g=function(a){return a};Pu.i=function(a,b){return a==null?null:$APP.Ma(a,b)};Pu.C=function(a,b,c){for(;;){if(a==null)return null;a=Pu.i(a,b);if($APP.r(c))b=$APP.v(c),c=$APP.z(c);else return a}};
|
|
38
|
+
Pu.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)};Pu.N=2;var zu=function zu(a){switch(arguments.length){case 1:return zu.g(arguments[0]);case 2:return zu.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 zu.C(arguments[0],arguments[1],2<c.length?new $APP.Vb(c.slice(2),0,null):null)}};zu.g=function(a){return a};
|
|
39
|
+
zu.i=function(a,b){return $APP.C(a)<$APP.C(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)};zu.C=function(a,b,c){return $APP.Zc(zu,a,$APP.od.i(c,b))};zu.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)};zu.N=2;
|
|
40
|
+
var Au=new $APP.K(null,"entering","entering",-413471949),yu=new $APP.K(null,"leaving","leaving",608616060),xu=new $APP.K(null,"matched","matched",-975207164),eu=new $APP.K(null,"active-state-raw","active-state-raw",-60607051),Vt=new $APP.K(null,"active-state","active-state",-1185168001),bu=new $APP.K(null,"ghost-layer","ghost-layer",1707493707);var Ou="active-state active-index stiffness damping mass variant duration disabled".split(" "),Ot=$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.X,$APP.fl,$APP.X,$APP.ji,$APP.X],null),$APP.ll,!0],null),"x-morph-stack-changed",new $APP.P(null,2,[$APP.U,new $APP.P(null,2,[$APP.zh,$APP.X,$APP.fl,$APP.X],null),$APP.ll,!1],null)]);var ou=[0],Fu=function Fu(a,b){var d=$APP.l(a,"__xMorphStackToken"),e=$APP.l(a,"__xMorphStackEntries"),g=$APP.l(a,"__xMorphStackLast"),h=function(){var B=$APP.l(a,"__xMorphStackModel");return $APP.r(B)?B:fu(a)}(),k=$APP.tl.g(h),m=$APP.Wk.g(h);h=$APP.Wj.g(h);g=$APP.Yg.i(0,$APP.Zg.i(1/30,function(){var B=$APP.l(a,"__xMorphStackTimeScale");return $APP.r(B)?B: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=Ut(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;nu(a,p[0]);$APP.r(b[0])?Du.o?Du.o(a,d,!0):Du.call(null,a,d,!0):(e=window.requestAnimationFrame(function(B){return $APP.D.i(d,$APP.l(a,"__xMorphStackToken"))?Fu.i?Fu.i(a,B):Fu.call(null,a,B):null}),a.__xMorphStackRaf=e)}return null};$APP.ka("baredom.exports.x_morph_stack.init",Ru);export const init=Ru;
|