@vanelsas/baredom 2.1.1 → 2.2.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 +11 -0
- package/README.md +3 -3
- package/dist/base.js +75 -73
- package/dist/x-alert.js +17 -17
- package/dist/x-avatar-group.js +10 -10
- package/dist/x-avatar.js +13 -14
- 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 +15 -15
- package/dist/x-cancel-dialogue.js +12 -12
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.js +28 -28
- package/dist/x-chart.js +46 -46
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +8 -8
- package/dist/x-collapse.js +10 -10
- package/dist/x-color-picker.js +40 -40
- package/dist/x-command-palette.js +25 -25
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +18 -18
- package/dist/x-copy.js +20 -20
- package/dist/x-currency-field.js +21 -21
- package/dist/x-date-picker.js +37 -37
- package/dist/x-divider.js +8 -8
- package/dist/x-drawer.js +11 -11
- package/dist/x-dropdown.js +9 -9
- package/dist/x-fieldset.js +5 -5
- package/dist/x-file-download.js +7 -7
- package/dist/x-form-field.js +15 -15
- package/dist/x-form.js +9 -9
- package/dist/x-gaussian-blur.js +16 -16
- package/dist/x-grid.js +6 -6
- package/dist/x-icon.js +9 -0
- package/dist/x-image.js +20 -0
- package/dist/x-kinetic-font.js +28 -28
- package/dist/x-kinetic-typography.js +37 -37
- package/dist/x-liquid-dock.js +35 -35
- package/dist/x-liquid-fill.js +40 -40
- package/dist/x-liquid-glass.js +33 -33
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +10 -10
- package/dist/x-metaball-cursor.js +25 -25
- package/dist/x-modal.js +11 -11
- package/dist/x-morph-stack.js +39 -39
- package/dist/x-navbar.js +12 -12
- package/dist/x-neural-glow.js +30 -30
- package/dist/x-notification-center.js +10 -10
- package/dist/x-organic-divider.js +15 -15
- package/dist/x-organic-progress.js +35 -35
- package/dist/x-organic-shape.js +12 -12
- package/dist/x-pagination.js +16 -16
- package/dist/x-particle-button.js +46 -46
- package/dist/x-popover.js +14 -14
- package/dist/x-progress-circle.js +7 -7
- package/dist/x-progress.js +7 -7
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.js +10 -10
- package/dist/x-scroll-parallax.js +17 -17
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +33 -33
- package/dist/x-scroll-timeline.js +45 -45
- package/dist/x-scroll.js +40 -40
- package/dist/x-search-field.js +14 -14
- package/dist/x-select.js +9 -9
- package/dist/x-sidebar.js +16 -16
- package/dist/x-skeleton.js +4 -4
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +20 -20
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -5
- package/dist/x-splash.js +13 -13
- package/dist/x-stat.js +9 -9
- package/dist/x-stepper.js +16 -16
- package/dist/x-switch.js +10 -10
- package/dist/x-tab.js +7 -7
- package/dist/x-table-cell.js +19 -19
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +13 -13
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +17 -17
- package/dist/x-theme.js +24 -24
- package/dist/x-timeline-item.js +20 -20
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +21 -21
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +8 -8
- package/package.json +9 -1
package/dist/x-liquid-fill.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
return $APP.n(isNaN(a))?b:Math.min(1,Math.max(0,a))}return b},
|
|
4
|
-
function(a,b,c,d){return c*(.5*Math.sin(a*6.283185307179586*3+b+d)+.3*Math.sin(a*6.283185307179586*5+b*1.3+d*1.7)+.2*Math.sin(a*6.283185307179586*7+b*.7+d*2.3))},
|
|
5
|
-
window.getComputedStyle(a);b=c.getPropertyValue("overflow-y");c=c.getPropertyValue("overflow-x");if($APP.C.i(b,"auto")||$APP.C.i(b,"scroll")||$APP.C.i(c,"auto")||$APP.C.i(c,"scroll"))break a;a=a.parentElement}else{a=null;break a}a=void 0}return a},
|
|
6
|
-
a.clientWidth]:[a.scrollTop,a.scrollHeight,a.clientHeight]},
|
|
2
|
+
var Z3=function(a){function b(d,e){d.push(e);return d}var c=[];return $APP.Wc?$APP.Wc(b,c,a):$APP.Xc.call(null,b,c,a)},a4=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J($3,a)?a:"vertical"},c4=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J(b4,a)?a:"fill"},e4=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J(d4,a)?a:"gold"},f4=function(a,b){if(typeof a==="string"){a=a.trim();if($APP.C.i(a,""))return b;a=parseFloat(a);
|
|
3
|
+
return $APP.n(isNaN(a))?b:Math.min(1,Math.max(0,a))}return b},g4=function(a){if(typeof a==="string"){a=a.trim();if($APP.C.i(a,""))return 3;a=parseInt(a,10);return $APP.n(isNaN(a))?3:Math.min(5,Math.max(2,a))}return 3},k4=function(a,b){b=b>1?a/(b-1):1;return new $APP.R(null,6,[h4,a*2.39996,i4,.7+.6*b,j4,.6+.8*b,$APP.ll,200-a*30,$APP.pk,10+a*3,$APP.Zh,1],null)},l4=function(a,b,c){b-=c;return b<=0?0:Math.min(1,Math.max(0,a/b))},m4=function(a,b,c){return c<=.001?0:Math.min(1,Math.abs(a-b)/c/2E3)},n4=
|
|
4
|
+
function(a,b,c,d){return c*(.5*Math.sin(a*6.283185307179586*3+b+d)+.3*Math.sin(a*6.283185307179586*5+b*1.3+d*1.7)+.2*Math.sin(a*6.283185307179586*7+b*.7+d*2.3))},o4=function(a,b,c,d,e,g){b=c+(e*(b-a)-g*c)*d;return[a+b*d,b]},p4=function(a,b,c){return a+(b-a)*c},r4=function(){var a=q4+1;return q4=a},s4=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},t4=function(a,b){if(typeof b==="string"&&$APP.N(b.trim(),""))a=document.querySelector(b);else a:{for(a=a.parentElement;;)if($APP.n(a)){var c=
|
|
5
|
+
window.getComputedStyle(a);b=c.getPropertyValue("overflow-y");c=c.getPropertyValue("overflow-x");if($APP.C.i(b,"auto")||$APP.C.i(b,"scroll")||$APP.C.i(c,"auto")||$APP.C.i(c,"scroll"))break a;a=a.parentElement}else{a=null;break a}a=void 0}return a},u4=function(a,b){return a==null?$APP.C.i(b,"horizontal")?[window.scrollX,document.documentElement.scrollWidth,window.innerWidth]:[window.scrollY,document.documentElement.scrollHeight,window.innerHeight]:$APP.C.i(b,"horizontal")?[a.scrollLeft,a.scrollWidth,
|
|
6
|
+
a.clientWidth]:[a.scrollTop,a.scrollHeight,a.clientHeight]},B4=function(a){var b=r4(),c=a.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElementNS("http://www.w3.org/2000/svg","svg"),h=document.createElementNS("http://www.w3.org/2000/svg","defs"),l=document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),m=document.createElementNS("http://www.w3.org/2000/svg","stop"),p=document.createElementNS("http://www.w3.org/2000/svg",
|
|
7
7
|
"stop"),q=document.createElementNS("http://www.w3.org/2000/svg","stop"),v=document.createElementNS("http://www.w3.org/2000/svg","filter"),x=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),y=document.createElementNS("http://www.w3.org/2000/svg","feSpecularLighting"),A=document.createElementNS("http://www.w3.org/2000/svg","fePointLight"),B=document.createElementNS("http://www.w3.org/2000/svg","feComposite"),E=document.createElementNS("http://www.w3.org/2000/svg","feComposite"),
|
|
8
|
-
H=
|
|
9
|
-
null)}($APP.bg(0,5))}()),G=document.createElement("div"),I=document.createElement("slot"),Q=""+$APP.T.g("xlf-grad-")+$APP.T.g(b),
|
|
10
|
-
"200");l.setAttribute("fx","150");l.setAttribute("fy","200");m.setAttribute("offset","0%");m.setAttribute("stop-color","var("+$APP.T.g("--x-liquid-fill-color-1")+",#B8860B)");p.setAttribute("offset","50%");p.setAttribute("stop-color","var("+$APP.T.g("--x-liquid-fill-color-2")+",#D4AF37)");q.setAttribute("offset","100%");q.setAttribute("stop-color","var("+$APP.T.g("--x-liquid-fill-color-3")+",#F9F295)");l.appendChild(m);l.appendChild(p);l.appendChild(q);v.setAttribute("id",
|
|
8
|
+
H=Z3(function(){return function Ka(za){return new $APP.qd(null,function(){for(;;){var $a=$APP.t(za);if($a){if($APP.Nc($a)){var ab=$APP.xb($a),jb=$APP.z(ab),Ib=$APP.td(jb);a:{for(var bb=0;;)if(bb<jb){$APP.xc(ab,bb);var ca=Ib,pa=document.createElementNS("http://www.w3.org/2000/svg","path");ca.add(pa);bb+=1}else{ab=!0;break a}ab=void 0}return ab?$APP.wd(Ib.aa(),Ka($APP.yb($a))):$APP.wd(Ib.aa(),null)}$APP.u($a);return $APP.nd(document.createElementNS("http://www.w3.org/2000/svg","path"),Ka($APP.Yb($a)))}return null}},
|
|
9
|
+
null)}($APP.bg(0,5))}()),G=document.createElement("div"),I=document.createElement("slot"),Q=""+$APP.T.g("xlf-grad-")+$APP.T.g(b),Z=""+$APP.T.g("xlf-spec-")+$APP.T.g(b);d.textContent=v4;e.setAttribute("part","container");g.setAttribute("part","svg");g.setAttribute("viewBox","0 0 300 200");g.setAttribute("preserveAspectRatio","none");g.setAttribute("aria-hidden","true");l.setAttribute("id",Q);l.setAttribute("gradientUnits","userSpaceOnUse");l.setAttribute("cx","150");l.setAttribute("cy","200");l.setAttribute("r",
|
|
10
|
+
"200");l.setAttribute("fx","150");l.setAttribute("fy","200");m.setAttribute("offset","0%");m.setAttribute("stop-color","var("+$APP.T.g("--x-liquid-fill-color-1")+",#B8860B)");p.setAttribute("offset","50%");p.setAttribute("stop-color","var("+$APP.T.g("--x-liquid-fill-color-2")+",#D4AF37)");q.setAttribute("offset","100%");q.setAttribute("stop-color","var("+$APP.T.g("--x-liquid-fill-color-3")+",#F9F295)");l.appendChild(m);l.appendChild(p);l.appendChild(q);v.setAttribute("id",Z);v.setAttribute("x","-10%");
|
|
11
11
|
v.setAttribute("y","-10%");v.setAttribute("width","120%");v.setAttribute("height","120%");x.setAttribute("in","SourceAlpha");x.setAttribute("stdDeviation","3");x.setAttribute("result","blur");y.setAttribute("in","blur");y.setAttribute("surfaceScale","5");y.setAttribute("specularConstant","0.75");y.setAttribute("specularExponent","20");y.setAttribute("lighting-color","var("+$APP.T.g("--x-liquid-fill-specular-color")+",rgba(255,255,240,0.6))");y.setAttribute("result","specular");y.appendChild(A);A.setAttribute("x",
|
|
12
12
|
"90");A.setAttribute("y","-50");A.setAttribute("z","200");B.setAttribute("in","specular");B.setAttribute("in2","SourceAlpha");B.setAttribute("operator","in");B.setAttribute("result","specClip");E.setAttribute("in","SourceGraphic");E.setAttribute("in2","specClip");E.setAttribute("operator","arithmetic");E.setAttribute("k1","0");E.setAttribute("k2","1");E.setAttribute("k3","1");E.setAttribute("k4","0");v.appendChild(x);v.appendChild(y);v.appendChild(B);v.appendChild(E);h.appendChild(l);h.appendChild(v);
|
|
13
|
-
g.appendChild(h);for(h=0;;)if(h<5)m=H[h],m.setAttribute("class","wave-layer"),m.setAttribute("data-layer",""+$APP.T.g(h)),m.setAttribute("fill","url(#"+$APP.T.g(Q)+")"),m.style.display="none",g.appendChild(m),h+=1;else break;G.setAttribute("part","content");G.appendChild(I);e.appendChild(g);e.appendChild(G);c.appendChild(d);c.appendChild(e);a.__xLiquidFillUid=b;$APP.ia(a,"__xLiquidFillRefs",new $APP.R(null,8,[$APP.
|
|
14
|
-
8,[
|
|
15
|
-
null,$APP.
|
|
16
|
-
"url(#"+$APP.T.g(c)+")"):e.removeAttribute("filter")}else e.style.display="none";d+=1}else break},
|
|
17
|
-
$APP.n(d)?c>0&&d>0:d:c))for(var p=0;;)if(p<h){var q=a[p],v=l[p],x=m[p];if(b){var y=d*(1-g),A=c,B=d,E=e,H=[];H.push("M0,"+$APP.T.g((y+
|
|
18
|
-
H.join(""))}else{y=c*g;A=d;B=e;E=v;v=x;x=[];x.push("M"+$APP.T.g((y+
|
|
19
|
-
d=$APP.k(a,"__xLiquidFillH");var e=$APP.k(a,"__xLiquidFillProg");e=$APP.n(e)?e:0;var g=$APP.
|
|
20
|
-
",0L"+$APP.T.g(m.toFixed(2))+","+$APP.T.g(d.toFixed(2))+"L0,"+$APP.T.g(d.toFixed(2))+"L0,0Z");h+=1}else break},
|
|
21
|
-
"__xLiquidFillRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xLiquidFillRaf=null)}
|
|
22
|
-
var d=$APP.
|
|
23
|
-
$APP.W.g(c);return $APP.n(h)?h:
|
|
24
|
-
$APP.k(b,"scroll");a=$APP.k(a,"__xLiquidFillST");$APP.n(a)?a.removeEventListener("scroll",c):window.removeEventListener("scroll",c);b.scrollAttached=!1}else return null},
|
|
25
|
-
|
|
26
|
-
0&&d>0){a.__xLiquidFillW=c;a.__xLiquidFillH=d;var e=$APP.M($APP.k(a,"__xLiquidFillRefs")),g=$APP.D(e,$APP.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"mode",{get:function(){return
|
|
30
|
-
return
|
|
13
|
+
g.appendChild(h);for(h=0;;)if(h<5)m=H[h],m.setAttribute("class","wave-layer"),m.setAttribute("data-layer",""+$APP.T.g(h)),m.setAttribute("fill","url(#"+$APP.T.g(Q)+")"),m.style.display="none",g.appendChild(m),h+=1;else break;G.setAttribute("part","content");G.appendChild(I);e.appendChild(g);e.appendChild(G);c.appendChild(d);c.appendChild(e);a.__xLiquidFillUid=b;$APP.ia(a,"__xLiquidFillRefs",new $APP.R(null,8,[$APP.li,c,$APP.Nj,g,w4,H,$APP.ei,G,x4,A,y4,l,z4,Z,A4,Q],null))},L4=function(a){a=new $APP.R(null,
|
|
14
|
+
8,[C4,a.getAttribute("target"),$APP.pl,a.getAttribute("orientation"),$APP.Rk,a.getAttribute("mode"),D4,a.getAttribute("theme"),E4,a.getAttribute("wave-intensity"),F4,a.getAttribute("splash-intensity"),G4,a.getAttribute("layers"),$APP.Ii,a.getAttribute("disabled")],null);var b=$APP.M(a);a=$APP.D(b,C4);var c=$APP.D(b,$APP.pl),d=$APP.D(b,$APP.Rk),e=$APP.D(b,D4),g=$APP.D(b,E4),h=$APP.D(b,F4),l=$APP.D(b,G4);b=$APP.D(b,$APP.Ii);return new $APP.R(null,8,[H4,typeof a==="string"&&$APP.N(a.trim(),"")?a.trim():
|
|
15
|
+
null,$APP.Mk,a4(c),$APP.Zi,c4(d),I4,e4(e),J4,f4(g,.5),K4,f4(h,.7),$APP.Ji,g4(l),$APP.W,b!=null],null)},M4=function(a,b){var c=new Float64Array(b);a.__xLiquidFillWA=c;c=new Float64Array(b);a.__xLiquidFillWV=c;b=new Float64Array(b);a.__xLiquidFillWP=b},N4=function(a,b){var c=$APP.M($APP.k(a,"__xLiquidFillRefs"));a=$APP.D(c,w4);c=$APP.D(c,z4);for(var d=0;;)if(d<5){var e=a[d];if(d<b){var g=k4(d,b),h=$APP.C.i(d,b-1);e.style.display="";e.setAttribute("opacity",""+$APP.T.g($APP.Zh.g(g)));h?e.setAttribute("filter",
|
|
16
|
+
"url(#"+$APP.T.g(c)+")"):e.removeAttribute("filter")}else e.style.display="none";d+=1}else break},O4=function(a){return $APP.C.i("vertical",$APP.Mk.g(a))&&$APP.N("bar",$APP.Zi.g(a))},P4=function(a){var b=$APP.k(a,"__xLiquidFillModel"),c=$APP.k(a,"__xLiquidFillW"),d=$APP.k(a,"__xLiquidFillH"),e=$APP.k(a,"__xLiquidFillTime"),g=$APP.k(a,"__xLiquidFillProg"),h=$APP.Ji.g(b);b=O4(b);var l=$APP.k(a,"__xLiquidFillWA"),m=$APP.k(a,"__xLiquidFillWP");a=$APP.M($APP.k(a,"__xLiquidFillRefs"));a=$APP.D(a,w4);if($APP.n($APP.n(c)?
|
|
17
|
+
$APP.n(d)?c>0&&d>0:d:c))for(var p=0;;)if(p<h){var q=a[p],v=l[p],x=m[p];if(b){var y=d*(1-g),A=c,B=d,E=e,H=[];H.push("M0,"+$APP.T.g((y+n4(0,E,v,x)).toFixed(2)));for(var G=0;;)if(G<10){var I=(G+.5)/10,Q=(G+1)/10,Z=y+n4(I,E,v,x),la=Q*A;Q=y+n4(Q,E,v,x);H.push("Q"+$APP.T.g((I*A).toFixed(2))+","+$APP.T.g(Z.toFixed(2))+" "+$APP.T.g(la.toFixed(2))+","+$APP.T.g(Q.toFixed(2)));G+=1}else break;H.push("L"+$APP.T.g(A.toFixed(2))+","+$APP.T.g(B.toFixed(2)));H.push("L0,"+$APP.T.g(B.toFixed(2)));H.push("Z");q.setAttribute("d",
|
|
18
|
+
H.join(""))}else{y=c*g;A=d;B=e;E=v;v=x;x=[];x.push("M"+$APP.T.g((y+n4(0,B,E,v)).toFixed(2))+",0");for(H=0;;)if(H<10)G=(H+.5)/10,la=(H+1)/10,I=G*A,Z=la*A,la=y+n4(la,B,E,v),x.push("Q"+$APP.T.g((y+n4(G,B,E,v)).toFixed(2))+","+$APP.T.g(I.toFixed(2))+" "+$APP.T.g(la.toFixed(2))+","+$APP.T.g(Z.toFixed(2))),H+=1;else break;x.push("L0,"+$APP.T.g(A.toFixed(2)));x.push("L0,0");x.push("Z");q.setAttribute("d",x.join(""))}p+=1}else break},Q4=function(a){var b=$APP.k(a,"__xLiquidFillModel"),c=$APP.k(a,"__xLiquidFillW"),
|
|
19
|
+
d=$APP.k(a,"__xLiquidFillH");var e=$APP.k(a,"__xLiquidFillProg");e=$APP.n(e)?e:0;var g=$APP.Ji.g(b);b=O4(b);a=$APP.M($APP.k(a,"__xLiquidFillRefs"));a=$APP.D(a,w4);if($APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c))for(var h=0;;)if(h<g){var l=a[h];if(b){var m=d*(1-e);l.setAttribute("d","M0,"+$APP.T.g(m.toFixed(2))+"L"+$APP.T.g(c.toFixed(2))+","+$APP.T.g(m.toFixed(2))+"L"+$APP.T.g(c.toFixed(2))+","+$APP.T.g(d.toFixed(2))+"L0,"+$APP.T.g(d.toFixed(2))+"Z")}else m=c*e,l.setAttribute("d","M"+$APP.T.g(m.toFixed(2))+
|
|
20
|
+
",0L"+$APP.T.g(m.toFixed(2))+","+$APP.T.g(d.toFixed(2))+"L0,"+$APP.T.g(d.toFixed(2))+"L0,0Z");h+=1}else break},S4=function(a,b,c){b=new CustomEvent("x-liquid-fill-progress",{detail:$APP.ph(new $APP.R(null,2,[$APP.ul,b,R4,c],null)),bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b)},U4=function(a){$APP.n($APP.k(a,"__xLiquidFillRaf"))||($APP.ia(a,"__xLiquidFillLF",performance.now()),$APP.ia(a,"__xLiquidFillRaf",requestAnimationFrame(function(){return T4(a)})))},V4=function(a){var b=$APP.k(a,
|
|
21
|
+
"__xLiquidFillRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xLiquidFillRaf=null)},Y4=function(a){if($APP.n(function(){var h=a.isConnected;return $APP.n(h)?(h=$APP.k(a,"__xLiquidFillVis"),$APP.n(h)?$APP.r($APP.W.g($APP.k(a,"__xLiquidFillModel"))):h):h}())){var b=$APP.k(a,"__xLiquidFillModel");$APP.k(a,"__xLiquidFillST")==null&&H4.g(b)!=null&&(b=t4(a,H4.g(b)),$APP.n(b)&&(W4.g?W4.g(a):W4.call(null,a),a.__xLiquidFillST=b,X4.g?X4.g(a):X4.call(null,a)));var c=$APP.k(a,"__xLiquidFillModel");b=$APP.k(a,"__xLiquidFillST");
|
|
22
|
+
var d=$APP.Mk.g(c);d=u4(b,d);var e=d[0];b=d[1];d=d[2];var g=performance.now();b=l4(e,b,d);d=m4(e,function(){var h=$APP.k(a,"__xLiquidFillLS");return $APP.n(h)?h:e}(),(g-function(){var h=$APP.k(a,"__xLiquidFillLST");return $APP.n(h)?h:g}())/1E3);a.__xLiquidFillTP=b;$APP.ia(a,"__xLiquidFillSV",Math.max(function(){var h=$APP.k(a,"__xLiquidFillSV");return $APP.n(h)?h:0}(),d));a.__xLiquidFillLS=e;a.__xLiquidFillLST=g;$APP.n(function(){var h=$APP.W.g(c);return $APP.n(h)?h:s4()}())||U4(a);$APP.n(function(){var h=
|
|
23
|
+
$APP.W.g(c);return $APP.n(h)?h:s4()}())&&(a.__xLiquidFillProg=b,Q4(a),S4(a,b,d))}return null},X4=function(a){var b=$APP.k(a,"__xLiquidFillHdl");if($APP.n($APP.n(b)?$APP.r($APP.k(b,"scrollAttached")):b)){var c=$APP.k(b,"scroll");a=$APP.k(a,"__xLiquidFillST");$APP.n(a)?a.addEventListener("scroll",c,{passive:!0}):window.addEventListener("scroll",c,{passive:!0});b.scrollAttached=!0}else return null},W4=function(a){var b=$APP.k(a,"__xLiquidFillHdl");if($APP.n($APP.n(b)?$APP.k(b,"scrollAttached"):b)){var c=
|
|
24
|
+
$APP.k(b,"scroll");a=$APP.k(a,"__xLiquidFillST");$APP.n(a)?a.removeEventListener("scroll",c):window.removeEventListener("scroll",c);b.scrollAttached=!1}else return null},Z4=function(a){var b=H4.g($APP.k(a,"__xLiquidFillModel")),c=t4(a,b);a.__xLiquidFillST=c;X4(a);Y4(a);b!=null&&c==null&&requestAnimationFrame(function(){if($APP.n(a.isConnected)){var d=H4.g($APP.k(a,"__xLiquidFillModel"));d!=null&&$APP.k(a,"__xLiquidFillST")==null&&(d=t4(a,d),$APP.n(d)&&(W4(a),a.__xLiquidFillST=d,X4(a),Y4(a)))}return null})},
|
|
25
|
+
$4=function(a){$APP.ia(a,"__xLiquidFillHdl",{scroll:function(){return Y4(a)},scrollAttached:!1})},a5=function(a){W4(a);a.__xLiquidFillHdl=null},b5=function(a){var b=new IntersectionObserver(function(c){c=c[0].isIntersecting;a.__xLiquidFillVis=c;$APP.n(c)?(c=$APP.W.g($APP.k(a,"__xLiquidFillModel")),c=$APP.n(c)?c:s4(),$APP.n(c)||U4(a)):V4(a);return null},{threshold:[0]});b.observe(a);a.__xLiquidFillIO=b;b=new ResizeObserver(function(c){if(c.length>0){var d=c[0].contentRect;c=d.width;d=d.height;if(c>
|
|
26
|
+
0&&d>0){a.__xLiquidFillW=c;a.__xLiquidFillH=d;var e=$APP.M($APP.k(a,"__xLiquidFillRefs")),g=$APP.D(e,$APP.Nj),h=$APP.D(e,x4);e=$APP.D(e,y4);var l=Math.max(c,d);g.setAttribute("viewBox","0 0 "+$APP.T.g(c)+" "+$APP.T.g(d));h.setAttribute("x",""+$APP.T.g(c*.3));e.setAttribute("cx",""+$APP.T.g(c*.5));e.setAttribute("cy",""+$APP.T.g(d));e.setAttribute("r",""+$APP.T.g(l));e.setAttribute("fx",""+$APP.T.g(c*.5));e.setAttribute("fy",""+$APP.T.g(d));c=$APP.W.g($APP.k(a,"__xLiquidFillModel"));c=$APP.n(c)?c:
|
|
27
|
+
s4();$APP.n(c)?Q4(a):(P4(a),U4(a))}}return null});b.observe(a);a.__xLiquidFillRO=b},e5=function(a,b){b=$APP.D(c5,b);$APP.n(b)?(a=a.style,a.setProperty("--x-liquid-fill-color-1",$APP.Ck.g(b)),a.setProperty("--x-liquid-fill-color-2",$APP.Dk.g(b)),a.setProperty("--x-liquid-fill-color-3",d5.g(b)),a.setProperty("--x-liquid-fill-specular-color",$APP.Lk.g(b))):(a=a.style,a.removeProperty("--x-liquid-fill-color-1"),a.removeProperty("--x-liquid-fill-color-2"),a.removeProperty("--x-liquid-fill-color-3"),a.removeProperty("--x-liquid-fill-specular-color"))},
|
|
28
|
+
f5=function(a){Object.defineProperty(a,"target",{get:function(){return this.getAttribute("target")},set:function(b){return $APP.n(b)?this.setAttribute("target",""+$APP.T.g(b)):this.removeAttribute("target")},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return a4(this.getAttribute("orientation"))},set:function(b){return $APP.n(b)?this.setAttribute("orientation",""+$APP.T.g(b)):this.removeAttribute("orientation")},enumerable:!0,configurable:!0});Object.defineProperty(a,
|
|
29
|
+
"mode",{get:function(){return c4(this.getAttribute("mode"))},set:function(b){return $APP.n(b)?this.setAttribute("mode",""+$APP.T.g(b)):this.removeAttribute("mode")},enumerable:!0,configurable:!0});Object.defineProperty(a,"theme",{get:function(){return e4(this.getAttribute("theme"))},set:function(b){return $APP.n(b)?this.setAttribute("theme",""+$APP.T.g(b)):this.removeAttribute("theme")},enumerable:!0,configurable:!0});Object.defineProperty(a,"waveIntensity",{get:function(){var b=this.getAttribute("wave-intensity");
|
|
30
|
+
return f4(b,.5)},set:function(b){return b==null?this.removeAttribute("wave-intensity"):this.setAttribute("wave-intensity",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"splashIntensity",{get:function(){var b=this.getAttribute("splash-intensity");return f4(b,.7)},set:function(b){return b==null?this.removeAttribute("splash-intensity"):this.setAttribute("splash-intensity",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"layers",{get:function(){return g4(this.getAttribute("layers"))},
|
|
31
31
|
set:function(b){return b==null?this.removeAttribute("layers"):this.setAttribute("layers",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.k(this,"__xLiquidFillProg");return $APP.n(b)?b:0},enumerable:!0,configurable:!0})},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
null||$APP.N(
|
|
35
|
-
|
|
36
|
-
"theme","theme",-1247880880),
|
|
37
|
-
$APP.xf([new $APP.K(null,"waveIntensity","waveIntensity",695633410),$APP.
|
|
38
|
-
new $APP.R(null,2,[$APP.
|
|
39
|
-
var
|
|
40
|
-
null),"lava",new $APP.R(null,4,[$APP.
|
|
32
|
+
h5=function(){var a=class extends HTMLElement{};a.observedAttributes=g5;a.prototype.connectedCallback=function(){var b=L4(this);this.__xLiquidFillModel=b;this.__xLiquidFillTime=this.__xLiquidFillSV=this.__xLiquidFillTP=this.__xLiquidFillProg=0;this.__xLiquidFillLD=-1;this.__xLiquidFillVis=!0;$APP.n($APP.k(this,"__xLiquidFillRefs"))||B4(this);e5(this,I4.g(b));M4(this,$APP.Ji.g(b));N4(this,$APP.Ji.g(b));a5(this);$4(this);b5(this);Z4(this);return null};a.prototype.disconnectedCallback=function(){V4(this);
|
|
33
|
+
a5(this);var b=$APP.k(this,"__xLiquidFillIO");$APP.n(b)&&(b.disconnect(),this.__xLiquidFillIO=null);b=$APP.k(this,"__xLiquidFillRO");$APP.n(b)&&(b.disconnect(),this.__xLiquidFillRO=null);this.__xLiquidFillVis=!1;return null};a.prototype.attributeChangedCallback=function(b,c,d){if($APP.N(c,d)&&$APP.n($APP.k(this,"__xLiquidFillRefs"))){b=L4(this);c=$APP.k(this,"__xLiquidFillModel");this.__xLiquidFillModel=b;if(c==null||$APP.N($APP.Ji.g(b),$APP.Ji.g(c)))M4(this,$APP.Ji.g(b)),N4(this,$APP.Ji.g(b));(c==
|
|
34
|
+
null||$APP.N(I4.g(b),I4.g(c)))&&e5(this,I4.g(b));if(c==null||$APP.N(H4.g(b),H4.g(c)))W4(this),Z4(this);c=$APP.k(this,"__xLiquidFillW");d=$APP.k(this,"__xLiquidFillH");$APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c)&&(b=$APP.W.g(b),b=$APP.n(b)?b:s4(),$APP.n(b)?(V4(this),Q4(this)):(P4(this),U4(this)))}return null};f5(a.prototype);return a},i5=function(){$APP.n(customElements.get("x-liquid-fill"))||customElements.define("x-liquid-fill",h5());return null},j4=new $APP.K(null,"amp-mult","amp-mult",698045242),
|
|
35
|
+
x4=new $APP.K(null,"feLight","feLight",-1941454484),i4=new $APP.K(null,"speed-mult","speed-mult",-353631814),G4=new $APP.K(null,"layers-raw","layers-raw",-233899391),h4=new $APP.K(null,"phase-offset","phase-offset",-1013192067),w4=new $APP.K(null,"paths","paths",-1807389588),D4=new $APP.K(null,"theme-raw","theme-raw",1068228849),z4=new $APP.K(null,"filt-id","filt-id",-672558408),J4=new $APP.K(null,"wave-intensity","wave-intensity",-915557489),y4=new $APP.K(null,"grad","grad",1125187229),I4=new $APP.K(null,
|
|
36
|
+
"theme","theme",-1247880880),d5=new $APP.K(null,"color-3","color-3",265727868),E4=new $APP.K(null,"wave-intensity-raw","wave-intensity-raw",1563162777),A4=new $APP.K(null,"grad-id","grad-id",1430109665),C4=new $APP.K(null,"target-raw","target-raw",-72152629),K4=new $APP.K(null,"splash-intensity","splash-intensity",-619909243),R4=new $APP.K(null,"velocity","velocity",-581524355),F4=new $APP.K(null,"splash-intensity-raw","splash-intensity-raw",1573376927),H4=new $APP.K(null,"target","target",253001721);var g5="target orientation mode theme wave-intensity splash-intensity layers disabled".split(" ");
|
|
37
|
+
$APP.xf([new $APP.K(null,"waveIntensity","waveIntensity",695633410),$APP.qj,new $APP.K(null,"splashIntensity","splashIntensity",1275664841),$APP.Zi,$APP.Mk,I4,$APP.Ji,H4,$APP.ul],[new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.Fj],null),new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),
|
|
38
|
+
new $APP.R(null,2,[$APP.Y,$APP.V,$APP.Wj,!0],null)]);$APP.Pd(["x-liquid-fill-progress",new $APP.R(null,2,[$APP.Cj,new $APP.R(null,2,[$APP.ul,$APP.V,R4,$APP.V],null),$APP.Dl,!1],null)]);
|
|
39
|
+
var $3=new $APP.S(null,new $APP.R(null,2,["vertical",null,"horizontal",null],null),null),b4=new $APP.S(null,new $APP.R(null,2,["bar",null,"fill",null],null),null),d4=new $APP.S(null,new $APP.R(null,4,["custom",null,"gold",null,"lava",null,"water",null],null),null),c5=new $APP.R(null,3,["gold",new $APP.R(null,4,[$APP.Ck,"#B8860B",$APP.Dk,"#D4AF37",d5,"#F9F295",$APP.Lk,"rgba(255,255,240,0.6)"],null),"water",new $APP.R(null,4,[$APP.Ck,"#0077B6",$APP.Dk,"#00B4D8",d5,"#90E0EF",$APP.Lk,"rgba(255,255,255,0.5)"],
|
|
40
|
+
null),"lava",new $APP.R(null,4,[$APP.Ck,"#8B0000",$APP.Dk,"#FF4500",d5,"#FF8C00",$APP.Lk,"rgba(255,255,200,0.7)"],null)],null);var q4=0,v4=":host{display:block;position:relative;overflow:hidden;"+$APP.T.g("--x-liquid-fill-bg")+":transparent;"+$APP.T.g("--x-liquid-fill-border")+":none;"+$APP.T.g("--x-liquid-fill-radius")+":0;"+$APP.T.g("--x-liquid-fill-opacity")+":1;"+$APP.T.g("--x-liquid-fill-wave-speed")+":1;"+$APP.T.g("--x-liquid-fill-color-1")+":#B8860B;"+$APP.T.g("--x-liquid-fill-color-2")+":#D4AF37;"+$APP.T.g("--x-liquid-fill-color-3")+":#F9F295;"+$APP.T.g("--x-liquid-fill-specular-color")+":rgba(255,255,240,0.6);}:host{background:var("+
|
|
41
41
|
$APP.T.g("--x-liquid-fill-bg")+",transparent);border:var("+$APP.T.g("--x-liquid-fill-border")+",none);border-radius:var("+$APP.T.g("--x-liquid-fill-radius")+",0);}:host([mode\x3dbar]){"+$APP.T.g("--x-liquid-fill-bar-height")+":14px;height:var("+$APP.T.g("--x-liquid-fill-bar-height")+",14px);}[part\x3dcontainer]{position:relative;width:100%;height:100%;overflow:hidden;border-radius:inherit;}[part\x3dsvg]{display:block;width:100%;height:100%;position:absolute;inset:0;pointer-events:none;opacity:var("+
|
|
42
|
-
$APP.T.g("--x-liquid-fill-opacity")+",1);}[part\x3dcontent]{position:relative;z-index:1;}."+$APP.T.g("wave-layer")+"{transition:none;}@media(prefers-color-scheme:dark){:host{"+$APP.T.g("--x-liquid-fill-bg")+":transparent;"+$APP.T.g("--x-liquid-fill-specular-color")+":rgba(255,255,200,0.4);}}@media(prefers-reduced-motion:reduce){."+$APP.T.g("wave-layer")+"{transition:none!important;}}",
|
|
43
|
-
E:
|
|
44
|
-
q=$APP.k(a,"__xLiquidFillWV"),v=$APP.k(a,"__xLiquidFillWP");a.__xLiquidFillLF=d;$APP.ia(a,"__xLiquidFillTime",function(){var E=$APP.k(a,"__xLiquidFillTime");return $APP.n(E)?E:0}()+e*g);$APP.ia(a,"__xLiquidFillProg",
|
|
45
|
-
v[d]+=e*g*
|
|
46
|
-
requestAnimationFrame(function(){return
|
|
42
|
+
$APP.T.g("--x-liquid-fill-opacity")+",1);}[part\x3dcontent]{position:relative;z-index:1;}."+$APP.T.g("wave-layer")+"{transition:none;}@media(prefers-color-scheme:dark){:host{"+$APP.T.g("--x-liquid-fill-bg")+":transparent;"+$APP.T.g("--x-liquid-fill-specular-color")+":rgba(255,255,200,0.4);}}@media(prefers-reduced-motion:reduce){."+$APP.T.g("wave-layer")+"{transition:none!important;}}",T4=function T4(a){if(!$APP.r(a.isConnected))if($APP.n(function(){var E=$APP.W.g($APP.k(a,"__xLiquidFillModel"));return $APP.n(E)?
|
|
43
|
+
E:s4()}()))a.__xLiquidFillRaf=null;else{var c=$APP.k(a,"__xLiquidFillModel"),d=performance.now(),e=Math.min(d-$APP.k(a,"__xLiquidFillLF"),100)/1E3,g=function(){var E=window.getComputedStyle(a).getPropertyValue("--x-liquid-fill-wave-speed");E=typeof E==="string"?parseFloat(E.trim()):null;var H=E==null;H||(H=isNaN(E),H=$APP.n(H)?H:E<=0);return $APP.n(H)?1:E}(),h=$APP.Ji.g(c),l=J4.g(c);c=K4.g(c);var m=function(){var E=$APP.k(a,"__xLiquidFillSV");return $APP.n(E)?E:0}(),p=$APP.k(a,"__xLiquidFillWA"),
|
|
44
|
+
q=$APP.k(a,"__xLiquidFillWV"),v=$APP.k(a,"__xLiquidFillWP");a.__xLiquidFillLF=d;$APP.ia(a,"__xLiquidFillTime",function(){var E=$APP.k(a,"__xLiquidFillTime");return $APP.n(E)?E:0}()+e*g);$APP.ia(a,"__xLiquidFillProg",p4(function(){var E=$APP.k(a,"__xLiquidFillProg");return $APP.n(E)?E:0}(),function(){var E=$APP.k(a,"__xLiquidFillTP");return $APP.n(E)?E:0}(),5*e));var x=[!1];for(d=0;;)if(d<h){var y=k4(d,h),A=m*l*c*j4.g(y)*30+2*l*j4.g(y);A=o4(p[d],A,q[d],e,$APP.ll.g(y),$APP.pk.g(y));p[d]=A[0];q[d]=A[1];
|
|
45
|
+
v[d]+=e*g*i4.g(y);Math.abs(q[d])>.05&&(x[0]=!0);d+=1}else break;a.__xLiquidFillSV=m*Math.max(0,1-3*e);P4(a);e=$APP.k(a,"__xLiquidFillProg");Math.abs(e-function(){var E=$APP.k(a,"__xLiquidFillLD");return $APP.n(E)?E:-1}())>.005&&(a.__xLiquidFillLD=e,S4(a,e,m));var B=Math.abs(function(){var E=$APP.k(a,"__xLiquidFillProg");return $APP.n(E)?E:0}()-function(){var E=$APP.k(a,"__xLiquidFillTP");return $APP.n(E)?E:0}());$APP.n(function(){var E=x[0];return $APP.n(E)?E:m>.01||B>.001}())?$APP.ia(a,"__xLiquidFillRaf",
|
|
46
|
+
requestAnimationFrame(function(){return T4.g?T4.g(a):T4.call(null,a)})):a.__xLiquidFillRaf=null}return null};$APP.fa("baredom.exports.x_liquid_fill.init",i5);export const init=i5;
|
package/dist/x-liquid-glass.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
typeof a==="string"?a.trim().toLowerCase():null);return $APP.n(a)?a:
|
|
4
|
-
.4,.1,1),b!=null,function(){var A=
|
|
5
|
-
|
|
2
|
+
var yT=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.C.i(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},zT=function(a){if(typeof a==="string"){a=a.trim();if($APP.C.i(a,""))return 5;a=parseInt(a,10);return $APP.n(isNaN(a))?5:Math.min(8,Math.max(3,a))}return 5},AT=function(a){return typeof a==="string"?(a=a.trim(),$APP.N(a,"")?a:null):null},BT=function(a){return typeof a==="string"?(a=a.trim(),$APP.N(a,"")?a:null):null},ET=function(a){a=$APP.D(CT,
|
|
3
|
+
typeof a==="string"?a.trim().toLowerCase():null);return $APP.n(a)?a:DT},XT=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Ii);var c=$APP.D(b,FT),d=$APP.D(b,GT),e=$APP.D(b,$APP.Il),g=$APP.D(b,HT),h=$APP.D(b,IT),l=$APP.D(b,$APP.Rk),m=$APP.D(b,JT),p=$APP.D(b,KT),q=$APP.D(b,LT),v=$APP.D(b,MT),x=$APP.D(b,NT),y=$APP.D(b,OT);b=$APP.D(b,PT);return $APP.xf([QT,RT,ST,$APP.hj,$APP.Zi,TT,UT,VT,$APP.Dk,$APP.Th,$APP.Ck,$APP.gm,WT,$APP.W],[yT(q,.5,0,1),yT(y,10,4,20),yT(h,.15,.05,.4),yT(p,.3,.05,2),ET(l),AT(d),yT(c,
|
|
4
|
+
.4,.1,1),b!=null,function(){var A=BT(v);return $APP.n(A)?A:"rgba(244,114,182,0.35)"}(),yT(e,12,0,40),function(){var A=BT(x);return $APP.n(A)?A:"rgba(99,102,241,0.4)"}(),zT(g),yT(m,.3,0,1),a!=null])},YT=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},$T=function(){var a=$APP.k(ZT,"v");ZT.v=a+1;return a},aU=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},
|
|
5
|
+
hU=function(a){var b=$T(),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"),l=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
6
|
"ellipse"),v=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.T.g(b);a.__xLiquidGlassUID=b;d.textContent=":host{display:block;position:relative;isolation:isolate;min-width:120px;min-height:80px;"+$APP.T.g("--x-liquid-glass-padding")+":1.5rem;"+$APP.T.g("--x-liquid-glass-specular-color")+":rgba(255,255,255,0.6);"+$APP.T.g("--x-liquid-glass-spring")+
|
|
7
7
|
":"+$APP.T.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.T.g("--x-liquid-glass-spring-duration")+":"+
|
|
8
8
|
$APP.T.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.T.g("--x-liquid-glass-blur")+",12px)) saturate(180%);-webkit-backdrop-filter:blur(var("+$APP.T.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("+
|
|
@@ -11,38 +11,38 @@ $APP.T.g("--x-liquid-glass-spring-duration")+","+$APP.T.g("600ms")+") var("+$APP
|
|
|
11
11
|
");}[part\x3dcontent]{position:relative;padding:var("+$APP.T.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.T.g("--x-liquid-glass-spring-duration")+","+$APP.T.g("600ms")+") var("+$APP.T.g("--x-liquid-glass-spring")+","+$APP.T.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
12
|
") both;}@media(prefers-color-scheme:dark){:host{"+$APP.T.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);l.setAttribute("in","SourceGraphic");
|
|
13
13
|
l.setAttribute("stdDeviation","10");l.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(l);h.appendChild(m);g.appendChild(h);e.appendChild(g);p.setAttribute("filter","url(#"+$APP.T.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 G="lg-edge-"+
|
|
14
|
-
$APP.T.g(b),I=document.createElementNS("http://www.w3.org/2000/svg","stop"),Q=document.createElementNS("http://www.w3.org/2000/svg","stop"),
|
|
15
|
-
"0.15");
|
|
14
|
+
$APP.T.g(b),I=document.createElementNS("http://www.w3.org/2000/svg","stop"),Q=document.createElementNS("http://www.w3.org/2000/svg","stop"),Z=document.createElementNS("http://www.w3.org/2000/svg","stop");m.setAttribute("id",G);m.setAttribute("x1","0");m.setAttribute("y1","0");m.setAttribute("x2","1");m.setAttribute("y2","1");I.setAttribute("offset","0%");I.setAttribute("stop-color","white");I.setAttribute("stop-opacity","0.9");Q.setAttribute("offset","50%");Q.setAttribute("stop-color","white");Q.setAttribute("stop-opacity",
|
|
15
|
+
"0.15");Z.setAttribute("offset","100%");Z.setAttribute("stop-color","white");Z.setAttribute("stop-opacity","0.5");m.appendChild(I);m.appendChild(Q);m.appendChild(Z);g.appendChild(m);a.__xLiquidGlassEdgeId=G;m=document.createElementNS("http://www.w3.org/2000/svg","g");G=document.createElementNS("http://www.w3.org/2000/svg","ellipse");I=$APP.k(a,"__xLiquidGlassEdgeId");m.setAttribute("filter","url(#"+$APP.T.g(H)+")");m.setAttribute("opacity","0.7");G.setAttribute("class","blob-border");G.setAttribute("fill",
|
|
16
16
|
"none");G.setAttribute("stroke","url(#"+$APP.T.g(I)+")");G.setAttribute("stroke-width","2.5");m.appendChild(G);e.appendChild(m);a.__xLiquidGlassBorderG=m;a.__xLiquidGlassBorderCore=G;m=document.createElementNS("http://www.w3.org/2000/svg","filter");G="lg-grain-"+$APP.T.g(b);I=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence");Q=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix");m.setAttribute("id",G);I.setAttribute("type","fractalNoise");I.setAttribute("baseFrequency",
|
|
17
17
|
"0.6");I.setAttribute("numOctaves","3");I.setAttribute("stitchTiles","stitch");Q.setAttribute("type","matrix");Q.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(I);m.appendChild(Q);g.appendChild(m);a.__xLiquidGlassGrainId=G;m=document.createElementNS("http://www.w3.org/2000/svg","mask");b="lg-mask-"+$APP.T.g(b);G=document.createElementNS("http://www.w3.org/2000/svg","g");I=document.createElementNS("http://www.w3.org/2000/svg","ellipse");m.setAttribute("id",b);
|
|
18
18
|
m.setAttribute("maskUnits","userSpaceOnUse");m.setAttribute("maskContentUnits","userSpaceOnUse");G.setAttribute("filter","url(#"+$APP.T.g(H)+")");I.setAttribute("fill","white");G.appendChild(I);m.appendChild(G);g.appendChild(m);a.__xLiquidGlassMaskG=G;a.__xLiquidGlassMaskCore=I;$APP.ia(a,"__xLiquidGlassMaskSats",[]);a.__xLiquidGlassMaskId=b;v.setAttribute("part","glass");g="url(#"+$APP.T.g($APP.k(a,"__xLiquidGlassMaskId"))+")";v.style.mask=g;v.style.webkitMask=g;x.setAttribute("part","grain");x.style.filter=
|
|
19
19
|
"url(#"+$APP.T.g($APP.k(a,"__xLiquidGlassGrainId"))+")";g="url(#"+$APP.T.g($APP.k(a,"__xLiquidGlassMaskId"))+")";x.style.mask=g;x.style.webkitMask=g;y.setAttribute("part","gradient");g="url(#"+$APP.T.g($APP.k(a,"__xLiquidGlassMaskId"))+")";y.style.mask=g;y.style.webkitMask=g;A.setAttribute("part","specular");g="url(#"+$APP.T.g($APP.k(a,"__xLiquidGlassMaskId"))+")";A.style.mask=g;A.style.webkitMask=g;B.setAttribute("part","content");B.appendChild(E);c.appendChild(d);c.appendChild(v);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.ia(a,"__xLiquidGlassRefs",$APP.xf([$APP.
|
|
21
|
-
d){var B=2*Math.PI*(A/d);x[A]=e+q*Math.cos(B);y[A]=g+v*Math.sin(B);A+=1}else break;q=[x,y];v=$APP.M($APP.k(a,"__xLiquidGlassRefs"));v=$APP.D(v,
|
|
22
|
-
$APP.k(a,"__xLiquidGlassBorderCore");$APP.n(h)&&(h.setAttribute("cx",""+$APP.T.g(e)),h.setAttribute("cy",""+$APP.T.g(g)),h.setAttribute("rx",""+$APP.T.g(b)),h.setAttribute("ry",""+$APP.T.g(c)));g=$APP.k(a,"__xLiquidGlassRefs");e=$APP.
|
|
23
|
-
"ellipse"),l.setAttribute("class","blob-sat-"+$APP.T.g(h)),l.setAttribute("fill","#ffffff"),e.appendChild(l),g.push(l),$APP.n(c)&&(l=document.createElementNS("http://www.w3.org/2000/svg","ellipse"),l.setAttribute("fill","white"),c.appendChild(l),b.push(l)),h+=1;else break;e=$APP.M($APP.k(a,"__xLiquidGlassRefs"));e=$APP.D(e,
|
|
24
|
-
b.setAttribute("rx",""+$APP.T.g(m)),b.setAttribute("ry",""+$APP.T.g(p))),c+=1;else break;a.__xLiquidGlassRX=q[0];a.__xLiquidGlassRY=q[1]},
|
|
25
|
-
"#ffffff"),h+=1;else break;h=$APP.C.i(
|
|
26
|
-
d.style.zIndex="3",d.style.filter="",d.style.opacity="",d.style.mask="",d.style.webkitMask="",l.setAttribute("opacity","0.35"),$APP.n(c)&&(c.style.opacity="0.4"),a.style.contain="";$APP.n(
|
|
27
|
-
|
|
28
|
-
g=$APP.k(a,"__xLiquidGlassPY"),h=$APP.k(a,"__xLiquidGlassW");a=$APP.k(a,"__xLiquidGlassH");h=
|
|
29
|
-
|
|
30
|
-
performance.now()),$APP.ia(a,"__xLiquidGlassRaf",requestAnimationFrame(function(){return
|
|
31
|
-
e[g];m.setAttribute("cx",h);m.setAttribute("cy",l)}$APP.n($APP.n(a)?g<a.length:a)&&(m=a[g],m.setAttribute("cx",h),m.setAttribute("cy",l));g+=1}else break},
|
|
32
|
-
"0"),d.setAttribute("y","0"),d.setAttribute("width",""+$APP.T.g(b)),d.setAttribute("height",""+$APP.T.g(c)));
|
|
33
|
-
e.clientX-g.left;a.__xLiquidGlassPY=e.clientY-g.top;return null}$APP.ia(a,"__xLiquidGlassHdl",{move:d,enter:c,leave:b});a.addEventListener("pointermove",d,{passive:!0});a.addEventListener("pointerenter",c);a.addEventListener("pointerleave",b)},
|
|
34
|
-
function(a){return
|
|
35
|
-
b;var c=$APP.k(a,"__xLiquidGlassW"),d=$APP.k(a,"__xLiquidGlassH");$APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c)&&(
|
|
36
|
-
enumerable:!0,configurable:!0});Object.defineProperty(a,"speed",{get:function(){var b=this.getAttribute("speed");return
|
|
37
|
-
configurable:!0});Object.defineProperty(a,"blur",{get:function(){var b=this.getAttribute("blur");return
|
|
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.ia(a,"__xLiquidGlassRefs",$APP.xf([$APP.ei,$APP.Lk,bU,$APP.jl,cU,dU,$APP.Th,$APP.li,eU,$APP.Nj,fU,gU],[B,A,v,p,h,[],l,c,y,e,q,x]))},iU=function(a,b,c){var d=$APP.gm.g($APP.k(a,"__xLiquidGlassModel")),e=b/2,g=c/2,h=b*.32,l=c*.32,m=h*.55,p=l*.55;var q=h*.9;for(var v=l*.9,x=new Float64Array(d),y=new Float64Array(d),A=0;;)if(A<
|
|
21
|
+
d){var B=2*Math.PI*(A/d);x[A]=e+q*Math.cos(B);y[A]=g+v*Math.sin(B);A+=1}else break;q=[x,y];v=$APP.M($APP.k(a,"__xLiquidGlassRefs"));v=$APP.D(v,fU);v.setAttribute("cx",""+$APP.T.g(e));v.setAttribute("cy",""+$APP.T.g(g));v.setAttribute("rx",""+$APP.T.g(h));v.setAttribute("ry",""+$APP.T.g(l));v=$APP.k(a,"__xLiquidGlassMaskCore");$APP.n(v)&&(v.setAttribute("cx",""+$APP.T.g(e)),v.setAttribute("cy",""+$APP.T.g(g)),v.setAttribute("rx",""+$APP.T.g(h)),v.setAttribute("ry",""+$APP.T.g(l)));b*=.44;c*=.44;h=
|
|
22
|
+
$APP.k(a,"__xLiquidGlassBorderCore");$APP.n(h)&&(h.setAttribute("cx",""+$APP.T.g(e)),h.setAttribute("cy",""+$APP.T.g(g)),h.setAttribute("rx",""+$APP.T.g(b)),h.setAttribute("ry",""+$APP.T.g(c)));g=$APP.k(a,"__xLiquidGlassRefs");e=$APP.jl.g(g);g=dU.g(g);c=$APP.k(a,"__xLiquidGlassMaskG");b=$APP.k(a,"__xLiquidGlassMaskSats");for(h=g.length-1;;)if(h>=d)e.removeChild(g[h]),$APP.n(c)&&c.removeChild(b[h]),--h;else break;g.length>d&&(g.length=d,$APP.n(b)&&(b.length=d));for(h=g.length;;)if(h<d)l=document.createElementNS("http://www.w3.org/2000/svg",
|
|
23
|
+
"ellipse"),l.setAttribute("class","blob-sat-"+$APP.T.g(h)),l.setAttribute("fill","#ffffff"),e.appendChild(l),g.push(l),$APP.n(c)&&(l=document.createElementNS("http://www.w3.org/2000/svg","ellipse"),l.setAttribute("fill","white"),c.appendChild(l),b.push(l)),h+=1;else break;e=$APP.M($APP.k(a,"__xLiquidGlassRefs"));e=$APP.D(e,dU);g=$APP.k(a,"__xLiquidGlassMaskSats");for(c=0;;)if(c<d)b=e[c],b.setAttribute("rx",""+$APP.T.g(m)),b.setAttribute("ry",""+$APP.T.g(p)),$APP.n($APP.n(g)?c<g.length:g)&&(b=g[c],
|
|
24
|
+
b.setAttribute("rx",""+$APP.T.g(m)),b.setAttribute("ry",""+$APP.T.g(p))),c+=1;else break;a.__xLiquidGlassRX=q[0];a.__xLiquidGlassRY=q[1]},kU=function(a){var b=$APP.k(a,"__xLiquidGlassModel"),c=$APP.k(a,"__xLiquidGlassRefs"),d=$APP.Th.g(c),e=bU.g(c),g=$APP.Lk.g(c),h=fU.g(c),l=$APP.jl.g(c);d.setAttribute("stdDeviation",""+$APP.T.g(RT.g(b)));e.style.setProperty("--x-liquid-glass-blur",""+$APP.T.g($APP.Th.g(b))+"px");h.setAttribute("fill","#ffffff");d=dU.g(c);e=d.length;for(h=0;;)if(h<e)d[h].setAttribute("fill",
|
|
25
|
+
"#ffffff"),h+=1;else break;h=$APP.C.i(jU,$APP.Zi.g(b));d=$APP.ei.g(c);c=gU.g(c);e="url(#"+$APP.T.g($APP.k(a,"__xLiquidGlassMaskId"))+")";if(h){d.style.position="relative";d.style.zIndex="0";h=QT.g(b);var m=1-h*.5,p=h*.35,q=h*.2;d.style.filter="blur("+$APP.T.g((h*2).toFixed(1))+"px)";d.style.opacity=""+$APP.T.g(m.toFixed(2));d.style.mask=e;d.style.webkitMask=e;l.setAttribute("opacity",p.toFixed(2));$APP.n(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="",l.setAttribute("opacity","0.35"),$APP.n(c)&&(c.style.opacity="0.4"),a.style.contain="";$APP.n(VT.g(b))||(g.style.opacity="0")},lU=function(a,b){var c=$APP.k(a,"__xLiquidGlassModel"),d=$APP.gm.g(c),e=$APP.hj.g(c);c=ST.g(c)*(Math.min($APP.k(a,"__xLiquidGlassW"),$APP.k(a,"__xLiquidGlassH"))*.32)*.6;var g=$APP.k(a,"__xLiquidGlassRX"),h=$APP.k(a,"__xLiquidGlassRY"),l=$APP.M($APP.k(a,"__xLiquidGlassRefs"));l=$APP.D(l,
|
|
27
|
+
dU);a=$APP.k(a,"__xLiquidGlassMaskSats");for(var m=0;;)if(m<d){var p=m*2.39996;var q=[g[m]+c*YT(p,0,b*e),h[m]+c*YT(0,p,b*e)];p=q[0].toFixed(2);q=q[1].toFixed(2);var v=l[m];v.setAttribute("cx",p);v.setAttribute("cy",q);$APP.n($APP.n(a)?m<a.length:a)&&(v=a[m],v.setAttribute("cx",p),v.setAttribute("cy",q));m+=1}else break},mU=function(a){var b=$APP.k(a,"__xLiquidGlassModel"),c=$APP.Lk.g($APP.k(a,"__xLiquidGlassRefs"));if($APP.n(VT.g(b))){var d=$APP.k(a,"__xLiquidGlassPA"),e=$APP.k(a,"__xLiquidGlassPX"),
|
|
28
|
+
g=$APP.k(a,"__xLiquidGlassPY"),h=$APP.k(a,"__xLiquidGlassW");a=$APP.k(a,"__xLiquidGlassH");h=UT.g(b)*Math.min(h,a);a="var("+$APP.T.g("--x-liquid-glass-specular-color")+",rgba(255,255,255,0.6))";$APP.n(d)?(c.style.opacity=""+$APP.T.g(WT.g(b)),c.style.background="radial-gradient(ellipse "+$APP.T.g(h)+"px "+$APP.T.g(h)+"px at "+$APP.T.g(e.toFixed(1))+"px "+$APP.T.g(g.toFixed(1))+"px,"+$APP.T.g(a)+" 0%,transparent 100%)"):c.style.opacity="0"}},nU=function(a,b){var c=$APP.k(a,"__xLiquidGlassModel");a=
|
|
29
|
+
eU.g($APP.k(a,"__xLiquidGlassRefs"));var d=$APP.Ck.g(c);c=$APP.Dk.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.T.g((30+10*Math.sin(b*.07)).toFixed(1))+"% "+$APP.T.g(e.toFixed(1))+"%,"+$APP.T.g(d)+" 0%,transparent 70%),radial-gradient(ellipse at "+$APP.T.g(g.toFixed(1))+"% "+$APP.T.g(h.toFixed(1))+"%,"+$APP.T.g(c)+" 0%,transparent 70%)"},pU=function(a){$APP.n($APP.k(a,"__xLiquidGlassRaf"))||($APP.ia(a,"__xLiquidGlassLF",
|
|
30
|
+
performance.now()),$APP.ia(a,"__xLiquidGlassRaf",requestAnimationFrame(function(){return oU(a)})))},qU=function(a){var b=$APP.k(a,"__xLiquidGlassRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xLiquidGlassRaf=null)},rU=function(a){var b=$APP.gm.g($APP.k(a,"__xLiquidGlassModel")),c=$APP.k(a,"__xLiquidGlassRX"),d=$APP.k(a,"__xLiquidGlassRY"),e=$APP.M($APP.k(a,"__xLiquidGlassRefs"));e=$APP.D(e,dU);a=$APP.k(a,"__xLiquidGlassMaskSats");for(var g=0;;)if(g<b){var h=c[g].toFixed(2),l=d[g].toFixed(2);if(g<e.length){var m=
|
|
31
|
+
e[g];m.setAttribute("cx",h);m.setAttribute("cy",l)}$APP.n($APP.n(a)?g<a.length:a)&&(m=a[g],m.setAttribute("cx",h),m.setAttribute("cy",l));g+=1}else break},sU=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.M($APP.k(a,"__xLiquidGlassRefs"));d=$APP.D(d,$APP.Nj);d.setAttribute("viewBox","0 0 "+$APP.T.g(b)+" "+$APP.T.g(c));d=d.querySelector("#"+$APP.T.g($APP.k(a,"__xLiquidGlassMaskId")));$APP.n(d)&&(d.setAttribute("x",
|
|
32
|
+
"0"),d.setAttribute("y","0"),d.setAttribute("width",""+$APP.T.g(b)),d.setAttribute("height",""+$APP.T.g(c)));iU(a,b,c);kU(a);var e=$APP.k(a,"__xLiquidGlassModel");$APP.n(function(){var g=$APP.W.g(e);return $APP.n(g)?g:aU()}())?rU(a):(lU(a,function(){var g=$APP.k(a,"__xLiquidGlassTime");return $APP.n(g)?g:0}()),pU(a))}}return null},tU=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.ia(a,"__xLiquidGlassHdl",{move:d,enter:c,leave:b});a.addEventListener("pointermove",d,{passive:!0});a.addEventListener("pointerenter",c);a.addEventListener("pointerleave",b)},uU=function(a){var b=$APP.k(a,"__xLiquidGlassHdl");$APP.n(b)&&(a.removeEventListener("pointermove",$APP.k(b,"move")),a.removeEventListener("pointerenter",$APP.k(b,"enter")),a.removeEventListener("pointerleave",$APP.k(b,"leave")),a.__xLiquidGlassHdl=null)},vU=
|
|
34
|
+
function(a){return XT($APP.xf([$APP.Il,HT,IT,$APP.Rk,JT,KT,LT,MT,NT,OT,PT,$APP.Ii,FT,GT],[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")]))},wU=function(a){var b=vU(a);a.__xLiquidGlassModel=
|
|
35
|
+
b;var c=$APP.k(a,"__xLiquidGlassW"),d=$APP.k(a,"__xLiquidGlassH");$APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c)&&(iU(a,c,d),kU(a),$APP.n(function(){var e=$APP.W.g(b);return $APP.n(e)?e:aU()}())?(qU(a),rU(a)):(lU(a,function(){var e=$APP.k(a,"__xLiquidGlassTime");return $APP.n(e)?e:0}()),pU(a)))},xU=function(a){Object.defineProperty(a,"blobs",{get:function(){var b=this.getAttribute("blobs");return zT(b)},set:function(b){return b==null?this.removeAttribute("blobs"):this.setAttribute("blobs",""+$APP.T.g(b))},
|
|
36
|
+
enumerable:!0,configurable:!0});Object.defineProperty(a,"speed",{get:function(){var b=this.getAttribute("speed");return yT(b,.3,.05,2)},set:function(b){return b==null?this.removeAttribute("speed"):this.setAttribute("speed",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"amplitude",{get:function(){var b=this.getAttribute("amplitude");return yT(b,.15,.05,.4)},set:function(b){return b==null?this.removeAttribute("amplitude"):this.setAttribute("amplitude",""+$APP.T.g(b))},enumerable:!0,
|
|
37
|
+
configurable:!0});Object.defineProperty(a,"blur",{get:function(){var b=this.getAttribute("blur");return yT(b,12,0,40)},set:function(b){return b==null?this.removeAttribute("blur"):this.setAttribute("blur",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"goo",{get:function(){var b=this.getAttribute("goo");return yT(b,10,4,20)},set:function(b){return b==null?this.removeAttribute("goo"):this.setAttribute("goo",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
|
|
38
38
|
"tint",{get:function(){return this.getAttribute("tint")},set:function(b){return b==null?this.removeAttribute("tint"):this.setAttribute("tint",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"specular",{get:function(){return this.hasAttribute("specular")},set:function(b){return $APP.n(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
|
|
40
|
-
set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"mode",{get:function(){var b=this.getAttribute("mode");return $APP.C.i(b,"submerged")?"submerged":"surface"},set:function(b){return b==null?this.removeAttribute("mode"):this.setAttribute("mode",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"frost",{get:function(){var b=this.getAttribute("frost");return
|
|
39
|
+
return yT(b,.4,.1,1)},set:function(b){return b==null?this.removeAttribute("specular-size"):this.setAttribute("specular-size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"specularIntensity",{get:function(){var b=this.getAttribute("specular-intensity");return yT(b,.3,0,1)},set:function(b){return b==null?this.removeAttribute("specular-intensity"):this.setAttribute("specular-intensity",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},
|
|
40
|
+
set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"mode",{get:function(){var b=this.getAttribute("mode");return $APP.C.i(b,"submerged")?"submerged":"surface"},set:function(b){return b==null?this.removeAttribute("mode"):this.setAttribute("mode",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"frost",{get:function(){var b=this.getAttribute("frost");return yT(b,.5,0,1)},
|
|
41
41
|
set:function(b){return b==null?this.removeAttribute("frost"):this.setAttribute("frost",""+$APP.T.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.T.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.T.g(b))},enumerable:!0,configurable:!0})},
|
|
43
|
-
a.prototype.disconnectedCallback=function(){
|
|
44
|
-
"core","core",-86019209),
|
|
45
|
-
|
|
46
|
-
"color-1-raw",-1322552111),
|
|
47
|
-
$APP.xf([
|
|
48
|
-
1,[$APP.
|
|
42
|
+
this.setAttribute("color-2",""+$APP.T.g(b))},enumerable:!0,configurable:!0})},zU=function(){var a=class extends HTMLElement{};a.observedAttributes=yU;a.prototype.connectedCallback=function(){var b=this,c=vU(b);b.__xLiquidGlassModel=c;b.__xLiquidGlassTime=0;b.__xLiquidGlassPA=!1;b.__xLiquidGlassPX=0;b.__xLiquidGlassPY=0;b.__xLiquidGlassGT=0;$APP.n($APP.k(b,"__xLiquidGlassRefs"))||hU(b);kU(b);c=new ResizeObserver(function(d){return sU(b,d)});b.__xLiquidGlassRO=c;c.observe(b);uU(b);tU(b);return null};
|
|
43
|
+
a.prototype.disconnectedCallback=function(){qU(this);uU(this);var b=$APP.k(this,"__xLiquidGlassRO");$APP.n(b)&&(b.disconnect(),this.__xLiquidGlassRO=null);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&$APP.n($APP.k(this,"__xLiquidGlassRefs"))&&wU(this);return null};xU(a.prototype);return a},AU=function(){$APP.n(customElements.get("x-liquid-glass"))||customElements.define("x-liquid-glass",zU());return null},DT=new $APP.K(null,"surface","surface",699915646),fU=new $APP.K(null,
|
|
44
|
+
"core","core",-86019209),WT=new $APP.K(null,"specular-intensity","specular-intensity",437849876),IT=new $APP.K(null,"amplitude-raw","amplitude-raw",-673525115),RT=new $APP.K(null,"goo","goo",-1253057564),bU=new $APP.K(null,"glass","glass",1652756718),cU=new $APP.K(null,"filter","filter",-948537934),QT=new $APP.K(null,"frost","frost",-3478780),UT=new $APP.K(null,"specular-size","specular-size",757318993),jU=new $APP.K(null,"submerged","submerged",1636004473),TT=new $APP.K(null,"tint","tint",-1286736913),
|
|
45
|
+
gU=new $APP.K(null,"grain","grain",2007662171),GT=new $APP.K(null,"tint-raw","tint-raw",-653441954),MT=new $APP.K(null,"color-2-raw","color-2-raw",-1440423537),PT=new $APP.K(null,"specular-attr","specular-attr",-716021610),JT=new $APP.K(null,"specular-intensity-raw","specular-intensity-raw",109079177),KT=new $APP.K(null,"speed-raw","speed-raw",1756460778),OT=new $APP.K(null,"goo-raw","goo-raw",59658675),FT=new $APP.K(null,"specular-size-raw","specular-size-raw",592980345),NT=new $APP.K(null,"color-1-raw",
|
|
46
|
+
"color-1-raw",-1322552111),ST=new $APP.K(null,"amplitude","amplitude",-1387734203),eU=new $APP.K(null,"gradient","gradient",-1983908971),LT=new $APP.K(null,"frost-raw","frost-raw",1383732749),VT=new $APP.K(null,"specular?","specular?",964138290),HT=new $APP.K(null,"blobs-raw","blobs-raw",1729393761),dU=new $APP.K(null,"satellites","satellites",644765266);var yU="blobs speed amplitude blur goo tint specular specular-size specular-intensity disabled mode frost color-1 color-2".split(" ");
|
|
47
|
+
$APP.xf([QT,RT,ST,new $APP.K(null,"specularSize","specularSize",-1757715579),$APP.qj,$APP.hj,$APP.Zi,$APP.Lk,TT,new $APP.K(null,"color2","color2",1248091856),$APP.Th,$APP.gm,new $APP.K(null,"color1","color1",306558619),new $APP.K(null,"specularIntensity","specularIntensity",138075)],[new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.Fj],null),new $APP.R(null,
|
|
48
|
+
1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.Fj],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.V],null)]);var CT=new $APP.R(null,2,["surface",DT,"submerged",jU],null);var ZT={v:0},oU=function oU(a){if($APP.n(a.isConnected)){var c=performance.now(),d=$APP.k(a,"__xLiquidGlassTime")+Math.min(c-$APP.k(a,"__xLiquidGlassLF"),100)/1E3;a.__xLiquidGlassLF=c;a.__xLiquidGlassTime=d;lU(a,d);mU(a);nU(a,d);$APP.ia(a,"__xLiquidGlassRaf",requestAnimationFrame(function(){return oU.g?oU.g(a):oU.call(null,a)}))}return null};$APP.fa("baredom.exports.x_liquid_glass.init",AU);export const init=AU;
|
package/dist/x-menu-item.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
return a.dispatchEvent(new CustomEvent("x-menu-item-select",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))},
|
|
4
|
-
"menuitem");a.setAttribute("tabindex","-1");b.setAttribute("data-type","");b.setAttribute("data-variant",$APP.
|
|
5
|
-
$APP.r($APP.
|
|
6
|
-
g},
|
|
7
|
-
"variant",{get:function(){return this.getAttribute("variant")},set:function(b){return $APP.n(b)?this.setAttribute("variant",b):this.removeAttribute("variant")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"type",{get:function(){return this.getAttribute("type")},set:function(b){return $APP.n(b)?this.setAttribute("type",b):this.removeAttribute("type")},configurable:!0,enumerable:!0})},
|
|
8
|
-
function(){if($APP.Bg(this,"__xMenuItemInit")){
|
|
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(l);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.k(this,"__xMenuItemRefs");if($APP.n(b)){var d=$APP.k(b,"keydown"),e=$APP.k(b,"icon-slotchange");c=$APP.n(c)?$APP.k(c,"icon-slot"):null;this.removeEventListener("click",$APP.k(b,"click"));this.removeEventListener("keydown",d);b=$APP.n(c)?c.removeEventListener("slotchange",e):null}else b=null;return b};a.prototype.attributeChangedCallback=function(){return $APP.Bg(this,"__xMenuItemInit")?
|
|
11
|
-
|
|
2
|
+
var NS=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Bi);var c=$APP.D(b,$APP.qj),d=$APP.D(b,$APP.Oh);b=$APP.D(b,$APP.Y);a=$APP.n(a)?a:"";c=$APP.F(c);d=$APP.n(d)?d:"";d=$APP.J(LS,d)?d:"";b=$APP.n(b)?b:"";b=$APP.J(MS,b)?b:"";return new $APP.R(null,4,[$APP.Bi,a,$APP.qj,c,$APP.Oh,d,$APP.Y,b],null)},OS=function(a){return new $APP.R(null,4,[$APP.Bi,a.getAttribute("value"),$APP.qj,a.hasAttribute("disabled"),$APP.Oh,a.getAttribute("variant"),$APP.Y,a.getAttribute("type")],null)},PS=function(a){var b=a.getAttribute("value");
|
|
3
|
+
return a.dispatchEvent(new CustomEvent("x-menu-item-select",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))},QS=function(a){var b=$APP.k(a,"__xMenuItemRefs");b=$APP.n(b)?$APP.k(b,"base"):null;var c=NS(OS(a));if($APP.n(b)){if($APP.C.i($APP.Y.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","false");a.setAttribute("role",
|
|
4
|
+
"menuitem");a.setAttribute("tabindex","-1");b.setAttribute("data-type","");b.setAttribute("data-variant",$APP.Oh.g(c));b.setAttribute("data-disabled",$APP.n($APP.qj.g(c))?"true":"false");return $APP.n($APP.qj.g(c))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")}return null},RS=function(a){function b(){return e.assignedNodes().length>0?a.setAttribute("has-icon",""):a.removeAttribute("has-icon")}function c(h){var l=h.key,m=NS(OS(a));($APP.C.i(l,"Enter")||$APP.C.i(l," "))&&
|
|
5
|
+
$APP.r($APP.qj.g(m))&&$APP.N($APP.Y.g(m),"divider")?(h.preventDefault(),h=PS(a)):h=null;return h}function d(h){var l=NS(OS(a));var m=$APP.qj.g(l);m=$APP.n(m)?m:$APP.C.i($APP.Y.g(l),"divider");$APP.n(m)&&h.preventDefault();return $APP.r($APP.qj.g(l))&&$APP.N($APP.Y.g(l),"divider")?PS(a):null}var e=$APP.k($APP.k(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"]=b;a.__xMenuItemHandlers=
|
|
6
|
+
g},SS=function(a){Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.n(b)?this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,
|
|
7
|
+
"variant",{get:function(){return this.getAttribute("variant")},set:function(b){return $APP.n(b)?this.setAttribute("variant",b):this.removeAttribute("variant")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"type",{get:function(){return this.getAttribute("type")},set:function(b){return $APP.n(b)?this.setAttribute("type",b):this.removeAttribute("type")},configurable:!0,enumerable:!0})},US=function(){var a=class extends HTMLElement{};a.observedAttributes=TS;a.prototype.connectedCallback=
|
|
8
|
+
function(){if($APP.Bg(this,"__xMenuItemInit")){RS(this);var b=QS(this)}else{if(!$APP.Bg(this,"__xMenuItemInit")){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"),l=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(l);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;RS(this);this.__xMenuItemInit=!0}QS(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__xMenuItemHandlers");
|
|
10
|
+
var c=$APP.k(this,"__xMenuItemRefs");if($APP.n(b)){var d=$APP.k(b,"keydown"),e=$APP.k(b,"icon-slotchange");c=$APP.n(c)?$APP.k(c,"icon-slot"):null;this.removeEventListener("click",$APP.k(b,"click"));this.removeEventListener("keydown",d);b=$APP.n(c)?c.removeEventListener("slotchange",e):null}else b=null;return b};a.prototype.attributeChangedCallback=function(){return $APP.Bg(this,"__xMenuItemInit")?QS(this):null};SS(a);return a},VS=function(){return $APP.n(customElements.get("x-menu-item"))?null:customElements.define("x-menu-item",
|
|
11
|
+
US())};var TS=["value","disabled","variant","type"],LS=new $APP.S(null,new $APP.R(null,2,["",null,"danger",null],null),null),MS=new $APP.S(null,new $APP.R(null,2,["",null,"divider",null],null),null);$APP.Pd(["x-menu-item-select",new $APP.R(null,1,[$APP.Cj,new $APP.R(null,1,[$APP.Bi,$APP.X],null)],null)]);$APP.fa("baredom.exports.x_menu_item.init",VS);export const init=VS;
|
package/dist/x-menu.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
d=a.hasAttribute("open");if($APP.C.i(c,"Escape"))return $APP.n(d)?(b.preventDefault(),
|
|
5
|
-
e[0].focus()}else if($APP.C.i(c,"End")&&$APP.n(d)&&(e=
|
|
6
|
-
c,$APP.
|
|
7
|
-
function e(h){var l=$APP.k(a,"__xMenuRefs");l=$APP.n(l)?$APP.k(l,"trigger-slot"):null;return $APP.n($APP.n(l)?
|
|
2
|
+
var JJ=function(a){a=a.querySelectorAll("x-menu-item");for(var b=[],c=a.length,d=0;;)if(d<c){var e=a[d];$APP.r(e.hasAttribute("disabled"))&&$APP.N(e.getAttribute("type"),"divider")&&b.push(e);d+=1}else break;return b},KJ=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0}))},NJ=function(a){$APP.n(a.hasAttribute("open"))||(a.setAttribute("open",""),KJ(a,"x-menu-open",{}));if($APP.n(null)){a=JJ(a);var b=a.length;return b>0?$APP.C.i(null,LJ)?a[0].focus():$APP.C.i(null,
|
|
3
|
+
MJ)?a[b-1].focus():null:null}return null},OJ=function(a,b){$APP.n(a.hasAttribute("open"))&&(a.removeAttribute("open"),KJ(a,"x-menu-close",{}));return $APP.n(b)?(a=$APP.k(a,"__xMenuRefs"),a=$APP.n(a)?$APP.k(a,"trigger-slot"):null,a=$APP.n(a)?a.assignedElements():null,a=$APP.n($APP.n(a)?a.length>0:a)?a[0]:null,$APP.n(a)?a.focus():null):null},PJ=function(a,b){var c=b.composedPath();a=$APP.uc(a.assignedElements());return $APP.F($APP.Td(function(d){return c.indexOf(d)>-1},a))},QJ=function(a,b){var c=b.key,
|
|
4
|
+
d=a.hasAttribute("open");if($APP.C.i(c,"Escape"))return $APP.n(d)?(b.preventDefault(),OJ(a,!0)):null;if($APP.C.i(c,"Tab"))return $APP.n(d)?OJ(a,!1):null;if($APP.C.i(c,"ArrowDown")||$APP.C.i(c,"ArrowUp")){var e=JJ(a),g=e.length;if(g>0){b.preventDefault();if($APP.n(d))return a=e.indexOf(document.activeElement),c=$APP.C.i(c,"ArrowDown")?a>=g-1?0:a<0?0:a+1:a<=0?g-1:a-1,e[c].focus();NJ(a);return e[$APP.C.i(c,"ArrowDown")?0:g-1].focus()}}else if($APP.C.i(c,"Home")){if($APP.n(d)&&(e=JJ(a),e.length>0))return b.preventDefault(),
|
|
5
|
+
e[0].focus()}else if($APP.C.i(c,"End")&&$APP.n(d)&&(e=JJ(a),e.length>0))return b.preventDefault(),e[e.length-1].focus();return null},SJ=function(a){var b=$APP.k(a,"__xMenuRefs");b=$APP.n(b)?$APP.k(b,"popup"):null;a=new $APP.R(null,3,[$APP.Al,a.hasAttribute("open"),$APP.rj,a.getAttribute("placement"),$APP.U,a.getAttribute("label")],null);a=$APP.M(a);var c=$APP.D(a,$APP.Al),d=$APP.D(a,$APP.rj);a=$APP.D(a,$APP.U);c=$APP.F(c);d=$APP.n(d)?d:"";d=$APP.J(RJ,d)?d:"bottom-start";a=new $APP.R(null,3,[$APP.Al,
|
|
6
|
+
c,$APP.rj,d,$APP.U,$APP.n(a)?a:""],null);return $APP.n(b)?(b.setAttribute("data-placement",$APP.rj.g(a)),a=$APP.U.g(a),$APP.n($APP.n(a)?$APP.N(a,""):a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")):null},TJ=function(a){function b(h){h.stopPropagation();h=h.detail.value;OJ(a,!1);return KJ(a,"x-menu-select",{value:$APP.n(h)?h:""})}function c(h){return QJ(a,h)}function d(h){$APP.n(a.hasAttribute("open"))?(h=h.composedPath(),h=$APP.C.i(-1,h.indexOf(a))?OJ(a,!1):null):h=null;return h}
|
|
7
|
+
function e(h){var l=$APP.k(a,"__xMenuRefs");l=$APP.n(l)?$APP.k(l,"trigger-slot"):null;return $APP.n($APP.n(l)?PJ(l,h):l)?$APP.n(a.hasAttribute("open"))?OJ(a,!0):NJ(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},UJ=function(a){Object.defineProperty(a.prototype,"open",{get:function(){return this.hasAttribute("open")},
|
|
8
8
|
set:function(b){return $APP.n(b)?this.setAttribute("open",""):this.removeAttribute("open")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"placement",{get:function(){return this.getAttribute("placement")},set:function(b){return $APP.n(b)?this.setAttribute("placement",b):this.removeAttribute("placement")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"label",{get:function(){return this.getAttribute("label")},set:function(b){return $APP.n(b)?this.setAttribute("label",
|
|
9
|
-
b):this.removeAttribute("label")},configurable:!0,enumerable:!0})},
|
|
10
|
-
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;
|
|
11
|
-
d=$APP.k(b,"keydown"),e=$APP.k(b,"item-select");this.removeEventListener("click",$APP.k(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 $APP.Bg(this,"__xMenuInit")?
|
|
12
|
-
1105735132)
|
|
9
|
+
b):this.removeAttribute("label")},configurable:!0,enumerable:!0})},WJ=function(){var a=class extends HTMLElement{};a.observedAttributes=VJ;a.prototype.connectedCallback=function(){if($APP.Bg(this,"__xMenuInit")){TJ(this);var b=SJ(this)}else{if(!$APP.Bg(this,"__xMenuInit")){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");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;}";
|
|
10
|
+
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;TJ(this);this.__xMenuInit=!0}SJ(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__xMenuHandlers");if($APP.n(b)){var c=$APP.k(b,"doc-click"),
|
|
11
|
+
d=$APP.k(b,"keydown"),e=$APP.k(b,"item-select");this.removeEventListener("click",$APP.k(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 $APP.Bg(this,"__xMenuInit")?SJ(this):null};UJ(a);return a},XJ=function(){return $APP.n(customElements.get("x-menu"))?null:customElements.define("x-menu",WJ())},MJ=new $APP.K(null,"last","last",
|
|
12
|
+
1105735132),LJ=new $APP.K(null,"first","first",-644103046);var VJ=["open","placement","label"],RJ=new $APP.S(null,new $APP.R(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null);$APP.Pd(["x-menu-open",new $APP.R(null,1,[$APP.Cj,$APP.Qd],null),"x-menu-close",new $APP.R(null,1,[$APP.Cj,$APP.Qd],null),"x-menu-select",new $APP.R(null,1,[$APP.Cj,new $APP.R(null,1,[$APP.Bi,$APP.X],null)],null)]);$APP.fa("baredom.exports.x_menu.init",XJ);export const init=XJ;
|