@vanelsas/baredom 1.1.0 → 1.3.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 +25 -0
- package/README.md +8 -6
- package/dist/base.js +364 -353
- package/dist/x-alert.js +18 -18
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +15 -15
- package/dist/x-badge.js +11 -11
- package/dist/x-bento-grid.js +6 -0
- package/dist/x-bento-item.js +5 -0
- 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 +48 -48
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +8 -8
- package/dist/x-collapse.js +12 -12
- package/dist/x-command-palette.js +31 -31
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +18 -18
- package/dist/x-copy.js +23 -23
- package/dist/x-currency-field.js +22 -22
- package/dist/x-date-picker.js +40 -40
- package/dist/x-divider.js +12 -12
- package/dist/x-drawer.js +12 -12
- package/dist/x-dropdown.js +9 -9
- package/dist/x-fieldset.js +6 -6
- 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 +19 -32
- package/dist/x-grid.js +6 -7
- package/dist/x-kinetic-typography.js +61 -61
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +10 -10
- package/dist/x-metaball-cursor.js +28 -0
- package/dist/x-modal.js +13 -13
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +35 -0
- package/dist/x-notification-center.js +10 -10
- package/dist/x-organic-divider.js +16 -16
- package/dist/x-organic-progress.js +40 -0
- package/dist/x-organic-shape.js +14 -14
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +15 -15
- package/dist/x-progress-circle.js +8 -8
- package/dist/x-progress.js +8 -8
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.js +12 -12
- package/dist/x-scroll-parallax.js +17 -17
- package/dist/x-scroll-stack.js +20 -0
- package/dist/x-scroll-story.js +35 -35
- package/dist/x-scroll-timeline.js +47 -47
- package/dist/x-scroll.js +39 -39
- 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 +5 -5
- package/dist/x-slider.js +16 -16
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -5
- package/dist/x-splash.js +15 -0
- package/dist/x-stat.js +11 -11
- 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 +20 -21
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +14 -14
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +17 -17
- package/dist/x-timeline-item.js +23 -23
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +23 -23
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +8 -8
- package/package.json +30 -2
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
null&&a.pa!=null)a=a.pa(a,b);else{var c=
|
|
4
|
-
d.left.l,new $APP.
|
|
5
|
-
$APP.
|
|
6
|
-
c.l,c.left.ob(),c.right.left),new $APP.
|
|
7
|
-
a,b);else if(c=
|
|
8
|
-
$APP.u(d),c>0&&d)--c,d=$APP.
|
|
9
|
-
65536)).toString(16);return
|
|
10
|
-
a.__xKineticTypographyAnimate=null)},
|
|
11
|
-
"100%;0%;100%":"0%;100%;0%");e.setAttribute("calcMode","spline");e.setAttribute("keySplines","0.42 0 0.58 1;0.42 0 0.58 1");break;case "oscillate":e.setAttribute("values",$APP.C.h(b,"reverse")?"120%;-20%;120%":"-20%;120%;-20%"),e.setAttribute("calcMode","spline"),e.setAttribute("keySplines","0.42 0 0.58 1;0.42 0 0.58 1")}return e},
|
|
12
|
-
[]}},
|
|
13
|
-
var c=$APP.
|
|
14
|
-
typeof k==="string"?k.trim().toLowerCase():null;var
|
|
15
|
-
2,[$APP.
|
|
16
|
-
10);
|
|
17
|
-
|
|
18
|
-
"__xKineticTypographySrOnly"),
|
|
19
|
-
else{a.removeAttribute("data-preset");a.removeAttribute("data-direction");$APP.n(
|
|
20
|
-
$APP.
|
|
21
|
-
$APP.n(
|
|
22
|
-
""+$APP.T.g(
|
|
23
|
-
"text"),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
e:d},set:function(e){return typeof e==="string"&&$APP.
|
|
27
|
-
""+$APP.T.g(1));
|
|
28
|
-
h=
|
|
29
|
-
d.setAttribute("part","container");e.setAttribute("part","svg");e.setAttribute("aria-hidden","true");e.setAttribute("focusable","false");h.setAttribute("id",y);g.appendChild(h);k.setAttribute("part","path-line");e.appendChild(k);m.setAttribute("part","text");p.setAttribute("href","#"+$APP.T.g(y));m.appendChild(p);e.appendChild(g);e.appendChild(m);v.setAttribute("part","crawl-viewport");x.setAttribute("part","crawl-text");v.appendChild(x);
|
|
30
|
-
d.appendChild(e);d.appendChild(v);d.appendChild(
|
|
31
|
-
function(){
|
|
32
|
-
a.right,g=b.left;return
|
|
33
|
-
a.right,g=b.left;return
|
|
34
|
-
$APP.
|
|
35
|
-
$APP.
|
|
36
|
-
$APP.
|
|
37
|
-
$APP.
|
|
38
|
-
$APP.
|
|
39
|
-
$APP.
|
|
40
|
-
$APP.
|
|
41
|
-
$APP.
|
|
42
|
-
$APP.
|
|
43
|
-
$APP.
|
|
44
|
-
$APP.
|
|
45
|
-
$APP.
|
|
46
|
-
$APP.S.prototype.F=$APP.ca(3,function(){return $APP.Ta($APP.
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
$APP.f.
|
|
54
|
-
var
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
$APP.
|
|
59
|
-
2,[$APP.Z,$APP.
|
|
60
|
-
var
|
|
61
|
-
null),null),
|
|
62
|
-
null),"spiral",new $APP.
|
|
2
|
+
var hC=function(a){if(a!=null&&a.F!=null)a=a.F(a);else{var b=hC[$APP.da(a==null?null:a)];if(b!=null)a=b.g?b.g(a):b.call(null,a);else if(b=hC._,b!=null)a=b.g?b.g(a):b.call(null,a);else throw $APP.ra("IEmptyableCollection.-empty",a);}return a},iC=function(a,b){if(a!=null&&a.ib!=null)a=a.ib(a,b);else{var c=iC[$APP.da(a==null?null:a)];if(c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=iC._,c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.ra("IMap.-dissoc",a);}return a},jC=function(a,b){if(a!=
|
|
3
|
+
null&&a.pa!=null)a=a.pa(a,b);else{var c=jC[$APP.da(a==null?null:a)];if(c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=jC._,c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.ra("IDrop.-drop",a);}return a},kC=function(a,b){var c=Array(a.length-2);$APP.Dc(a,0,c,0,2*b);$APP.Dc(a,2*(b+1),c,2*b,c.length-2*b);return c},lC=function(a,b,c,d){return d instanceof $APP.tf?d.right instanceof $APP.tf?new $APP.tf(d.key,d.l,new $APP.sf(a,b,c,d.left),d.right.Fa()):d.left instanceof $APP.tf?new $APP.tf(d.left.key,
|
|
4
|
+
d.left.l,new $APP.sf(a,b,c,d.left.left),new $APP.sf(d.key,d.l,d.left.right,d.right)):new $APP.sf(a,b,c,d):new $APP.sf(a,b,c,d)},mC=function(a,b,c,d){if(c instanceof $APP.tf)return new $APP.tf(a,b,c.Fa(),d);if(d instanceof $APP.sf)return lC(a,b,c,d.ob());if(d instanceof $APP.tf&&d.left instanceof $APP.sf)return new $APP.tf(d.left.key,d.left.l,new $APP.sf(a,b,c,d.left.left),lC(d.key,d.l,d.left.right,d.right.ob()));throw Error("red-black tree invariant violation");},nC=function(a,b,c,d){return c instanceof
|
|
5
|
+
$APP.tf?c.left instanceof $APP.tf?new $APP.tf(c.key,c.l,c.left.Fa(),new $APP.sf(a,b,c.right,d)):c.right instanceof $APP.tf?new $APP.tf(c.right.key,c.right.l,new $APP.sf(c.key,c.l,c.left,c.right.left),new $APP.sf(a,b,c.right.right,d)):new $APP.sf(a,b,c,d):new $APP.sf(a,b,c,d)},oC=function(a,b,c,d){if(d instanceof $APP.tf)return new $APP.tf(a,b,c,d.Fa());if(c instanceof $APP.sf)return nC(a,b,c.ob(),d);if(c instanceof $APP.tf&&c.right instanceof $APP.sf)return new $APP.tf(c.right.key,c.right.l,nC(c.key,
|
|
6
|
+
c.l,c.left.ob(),c.right.left),new $APP.sf(a,b,c.right.right,d));throw Error("red-black tree invariant violation");},pC=function(a,b){a.sort(b||$APP.na)},rC=function(a){var b=qC();const c=Array(a.length);for(let e=0;e<a.length;e++)c[e]={index:e,value:a[e]};const d=b||$APP.na;pC(c,function(e,g){return d(e.value,g.value)||e.index-g.index});for(b=0;b<a.length;b++)a[b]=c[b].value},sC=function(a,b){if(a!=null&&a.Bb!=null)a=a.Bb(a,b);else{var c=sC[$APP.da(a==null?null:a)];if(c!=null)a=c.h?c.h(a,b):c.call(null,
|
|
7
|
+
a,b);else if(c=sC._,c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.ra("ISet.-disjoin",a);}return a},qC=function(){return $APP.C.h($APP.Gc,$APP.Gc)?$APP.Gc:function(a,b){var c=$APP.Gc.h?$APP.Gc.h(a,b):$APP.Gc.call(null,a,b);return typeof c==="number"?c:$APP.n(c)?-1:$APP.n($APP.Gc.h?$APP.Gc.h(b,a):$APP.Gc.call(null,b,a))?1:0}},tC=function(a){if(a!=null&&(a.D&262144||$APP.t===a.yc)){var b=a.pa(null,1);return $APP.n(b)?b:$APP.Mb}return new $APP.gd(null,function(){a:{var c=1;for(var d=a;;)if(d=
|
|
8
|
+
$APP.u(d),c>0&&d)--c,d=$APP.Ob(d);else{c=d;break a}c=void 0}return c},null)},uC=function(a){this.qb=a;this.A=null;this.o=2153775104;this.D=2048},vC=function(a){return new uC(a.toLowerCase())},wC=function(){function a(){var d=Math.floor(Math.random()*65536).toString(16);switch(d.length){case 1:return["000",d].join("");case 2:return["00",d].join("");case 3:return["0",d].join("");default:return d}}var b=(16384|4095&Math.floor(Math.random()*65536)).toString(16),c=(32768|16383&Math.floor(Math.random()*
|
|
9
|
+
65536)).toString(16);return vC([a(),a(),"-",a(),"-",b,"-",c,"-",a(),a(),a()].join(""))},yC=function(a,b){var c=$APP.zd(xC,a,b);return $APP.dd(c,$APP.Sd(function(d){return c===d},b))},zC=function(a){return typeof a==="string"&&$APP.O("",a.trim())?a.trim():null},AC=function(a){return document.createElementNS("http://www.w3.org/2000/svg",a)},BC=function(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches},CC=function(a){var b=$APP.l(a,"__xKineticTypographyAnimate");$APP.n(b)&&(b.remove(),
|
|
10
|
+
a.__xKineticTypographyAnimate=null)},DC=function(a,b,c,d){var e=AC("animate");c=""+$APP.T.g(c)+"s";b=$APP.C.h(b,"reverse")?"reverse":"normal";e.setAttribute("attributeName","startOffset");e.setAttribute("repeatCount","indefinite");e.setAttribute("dur",c);d>0&&e.setAttribute("begin",""+$APP.T.g(d)+"s");switch(a){case "scroll":e.setAttribute("from",$APP.C.h(b,"reverse")?"100%":"0%");e.setAttribute("to",$APP.C.h(b,"reverse")?"0%":"100%");break;case "bounce":e.setAttribute("values",$APP.C.h(b,"reverse")?
|
|
11
|
+
"100%;0%;100%":"0%;100%;0%");e.setAttribute("calcMode","spline");e.setAttribute("keySplines","0.42 0 0.58 1;0.42 0 0.58 1");break;case "oscillate":e.setAttribute("values",$APP.C.h(b,"reverse")?"120%;-20%;120%":"-20%;120%;-20%"),e.setAttribute("calcMode","spline"),e.setAttribute("keySplines","0.42 0 0.58 1;0.42 0 0.58 1")}return e},EC=function(a){var b=$APP.l(a,"__xKineticTypographyEchoEls");if($APP.n(b)){for(var c=b.length,d=0;;)if(d<c)b[d].textEl.remove(),d+=1;else break;a.__xKineticTypographyEchoEls=
|
|
12
|
+
[]}},bD=function(a){var b=$APP.mf([$APP.xj,FC,$APP.oi,GC,$APP.xi,HC,IC,JC,KC,LC,MC,NC,$APP.ni,OC,$APP.Rj],[a.getAttribute("path"),a.getAttribute("echo-scale"),a.getAttribute("animation"),a.getAttribute("font-size"),a.getAttribute("speed"),a.getAttribute("preset"),a.getAttribute("start-size"),a.getAttribute("repeat"),a.getAttribute("effect"),a.getAttribute("echo-delay"),a.getAttribute("echo-count"),a.getAttribute("end-size"),a.getAttribute("direction"),a.getAttribute("echo-opacity"),a.getAttribute("text")]);
|
|
13
|
+
var c=$APP.N(b),d=$APP.I(c,KC),e=$APP.I(c,LC),g=$APP.I(c,MC),h=$APP.I(c,NC),k=$APP.I(c,$APP.ni),m=$APP.I(c,OC),p=$APP.I(c,$APP.Rj),q=$APP.I(c,$APP.xj),v=$APP.I(c,FC),x=$APP.I(c,$APP.oi),y=$APP.I(c,GC),A=$APP.I(c,$APP.xi),D=$APP.I(c,HC),G=$APP.I(c,IC),H=$APP.I(c,JC),F=typeof p==="string"?p:"",P=zC(q),la=typeof D==="string"?D.trim().toLowerCase():null;var Ca=$APP.K(PC,la)?la:"wave";var Xa=$APP.C.h(Ca,"crawl"),Wb=typeof x==="string"?x.trim().toLowerCase():null;var zh=$APP.K(QC,Wb)?Wb:"scroll";var am=
|
|
14
|
+
typeof k==="string"?k.trim().toLowerCase():null;var bm=$APP.K(RC,am)?am:"normal";if(typeof A==="string"){var bg=parseFloat(A.trim());var uf=typeof bg==="number"&&$APP.r(isNaN(bg))&&bg>0?bg:1}else uf=1;if(typeof H==="string"){var Uc=parseInt(H.trim(),10);var Oe=typeof Uc==="number"&&$APP.r(isNaN(Uc))&&Uc>0?Uc:1}else Oe=1;if(typeof d==="string"){var vf=$APP.Nf(d.toLowerCase().trim().split(/\s+/));var wf=SC.h(vf,TC)}else wf=$APP.Jf;var xf=zC(G),Wp=zC(h);var tB=$APP.C.h(Ca,"crawl")?null:P!=null?new $APP.R(null,
|
|
15
|
+
2,[$APP.ek,P,UC,"0 0 800 200"],null):$APP.I(VC,Ca);var Xp=$APP.n($APP.n(xf)?$APP.n(Wp)?!Xa:Wp:xf)?$APP.ad.h(wf,"size-gradient"):wf,Yp=$APP.K(Xp,"size-gradient")?WC.h(Xp,"size-pulse"):Xp,oO=$APP.K(Yp,"color-wave")?WC.h(Yp,"color-shift"):Yp;if(typeof v==="string"){var Yi=parseFloat(v.trim());var uB=typeof Yi==="number"&&$APP.r(isNaN(Yi))&&Yi>0&&Yi<=1?Yi:.85}else uB=.85;var pO=$APP.ek.g(tB),qO=zC(y),rO=UC.g(tB),sO=10/$APP.Fg.h(uf,.01);if(Xa)var Zp=0;else if(typeof g==="string"){var Zi=parseInt(g.trim(),
|
|
16
|
+
10);Zp=typeof Zi==="number"&&$APP.r(isNaN(Zi))&&Zi>=0&&Zi<=5?Zi:0}else Zp=0;if(typeof e==="string"){var cm=parseFloat(e.trim());var vB=typeof cm==="number"&&$APP.r(isNaN(cm))&&cm>0?cm:.3}else vB=.3;if(typeof m==="string"){var $i=parseFloat(m.trim());var wB=typeof $i==="number"&&$APP.r(isNaN($i))&&$i>0&&$i<=1?$i:.5}else wB=.5;var uO=$APP.mf([FC,$APP.Gi,$APP.oi,GC,$APP.xi,UC,HC,XC,IC,YC,ZC,JC,$C,LC,MC,NC,$APP.ni,OC,$APP.Rj],[uB,pO,zh,qO,uf,rO,Ca,Xa,xf,oO,sO,Oe,P!=null,vB,Zp,Wp,bm,wB,F]);var Nb=$APP.N(uO),
|
|
17
|
+
AB=$APP.I(Nb,LC),BB=$APP.I(Nb,MC),$p=$APP.I(Nb,NC),aq=$APP.I(Nb,$APP.ni),vO=$APP.I(Nb,OC),yf=$APP.I(Nb,$APP.Rj),wO=$APP.I(Nb,FC),dm=$APP.I(Nb,$APP.Gi),zf=$APP.I(Nb,$APP.oi),CB=$APP.I(Nb,GC);$APP.I(Nb,$APP.xi);var DB=$APP.I(Nb,UC);$APP.I(Nb,HC);var xO=$APP.I(Nb,XC),aj=$APP.I(Nb,IC),Ah=$APP.I(Nb,YC),cg=$APP.I(Nb,ZC),bq=$APP.I(Nb,JC),EB=$APP.l(a,"__xKineticTypographySvg"),yO=$APP.l(a,"__xKineticTypographyPath"),FB=$APP.l(a,"__xKineticTypographyText"),bj=$APP.l(a,"__xKineticTypographyTextPath"),zO=$APP.l(a,
|
|
18
|
+
"__xKineticTypographySrOnly"),AO=$APP.l(a,"__xKineticTypographyCrawlText"),cq=a.shadowRoot.querySelector("[part\x3dpath-line]");if($APP.n(xO))a.setAttribute("data-preset","crawl"),AO.textContent=yf,CC(a),EC(a),$APP.O(zf,"none")?a.setAttribute("data-animation",zf):a.removeAttribute("data-animation"),$APP.C.h(aq,"reverse")?a.setAttribute("data-direction","reverse"):a.removeAttribute("data-direction"),$APP.K(Ah,"color-shift")?a.setAttribute("data-effect","color-shift"):a.removeAttribute("data-effect");
|
|
19
|
+
else{a.removeAttribute("data-preset");a.removeAttribute("data-direction");$APP.n(DB)&&EB.setAttribute("viewBox",DB);$APP.n(dm)&&yO.setAttribute("d",dm);$APP.n($APP.n(cq)?dm:cq)&&cq.setAttribute("d",dm);var dq=bq<=1?yf:$APP.yd($APP.T,tC(aD.h(new $APP.Md(null,-1," · ",null),bq>0?new $APP.Md(null,bq,yf,null):$APP.Mb))),GB=$APP.K(Ah,"size-gradient"),BO=$APP.K(Ah,"color-wave"),HB=GB?$APP.n(aj)?$APP.n($p)?$APP.O(yf,""):$p:aj:GB;var CO=$APP.n(HB)?HB:BO&&$APP.O(yf,"");if($APP.n(CO)){bj.textContent="";var eq=
|
|
20
|
+
$APP.ke(dq),dg=$APP.B(eq),eg=$APP.K(Ah,"size-gradient"),fq=$APP.K(Ah,"color-wave"),Af=eg?parseFloat(aj):null,em=eg?parseFloat($p):null;if(eg){var IB=$APP.n(aj)?aj:"px",DO=/[a-z%]+/;if(typeof IB==="string"){var fm=DO.exec(IB);var JB=fm==null?null:fm.length===1?fm[0]:$APP.ke(fm)}else throw new TypeError("re-find must match against a string.");var KB=$APP.n(JB)?JB:"px"}else KB=null;for(var LB=KB,MB=fq?dg>0?cg/dg:0:null,gq=$APP.u($APP.Uf(0,dg)),hq=null,iq=0,gm=0;;)if(gm<iq){var fg=hq.G(null,gm),hm=AC("tspan");
|
|
21
|
+
$APP.n(eg?$APP.n(Af)?em:Af:eg)&&hm.setAttribute("font-size",""+$APP.T.g(Af+(dg>1?fg/(dg-1):0)*(em-Af))+$APP.T.g(LB));fq&&(hm.style.cssText="animation:xkt-color-wave "+$APP.T.g(cg)+"s ease-in-out infinite;animation-delay:"+$APP.T.g(fg*MB)+"s;");hm.textContent=$APP.fc(eq,fg);bj.appendChild(hm);gm+=1}else{var NB=$APP.u(gq);if(NB){var cj=NB;if($APP.Cc(cj)){var OB=$APP.qb(cj),EO=$APP.rb(cj),FO=OB,GO=$APP.B(OB);gq=EO;hq=FO;iq=GO}else{fg=$APP.w(cj);var im=AC("tspan");$APP.n(eg?$APP.n(Af)?em:Af:eg)&&im.setAttribute("font-size",
|
|
22
|
+
""+$APP.T.g(Af+(dg>1?fg/(dg-1):0)*(em-Af))+$APP.T.g(LB));fq&&(im.style.cssText="animation:xkt-color-wave "+$APP.T.g(cg)+"s ease-in-out infinite;animation-delay:"+$APP.T.g(fg*MB)+"s;");im.textContent=$APP.fc(eq,fg);bj.appendChild(im);gq=$APP.z(cj);hq=null;iq=0}gm=0}else break}}else bj.textContent=dq;EC(a);if(BB>0){for(var PB=$APP.l(a,"__xKineticTypographyPathId"),QB=[],HO=$APP.O(zf,"none")&&$APP.r(BC()),IO=cg>0?AB/cg*100:5,jq=0;;)if(jq<BB){var jm=jq+1,Bh=document.createElementNS("http://www.w3.org/2000/svg",
|
|
23
|
+
"text"),Ch=document.createElementNS("http://www.w3.org/2000/svg","textPath"),JO=Math.pow(vO,jm),KO=Math.pow(wO,jm),LO="-"+$APP.T.g(IO*jm)+"%";Bh.setAttribute("part","text-echo");Bh.setAttribute("opacity",""+$APP.T.g(JO));Bh.setAttribute("font-size","calc(var(--x-kinetic-typography-font-size) * "+$APP.T.g(KO)+")");Ch.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+$APP.T.g(PB));Ch.setAttribute("href","#"+$APP.T.g(PB));Ch.setAttribute("startOffset",LO);Ch.textContent=dq;if(HO){var MO=DC(zf,
|
|
24
|
+
aq,cg,AB*jm);Ch.appendChild(MO)}Bh.appendChild(Ch);EB.appendChild(Bh);QB.push({textEl:Bh});jq+=1}else break;a.__xKineticTypographyEchoEls=QB}$APP.n(CB)?FB.style.setProperty("font-size",CB):FB.style.removeProperty("font-size");CC(a);if($APP.O(zf,"none")&&$APP.r(BC())){var RB=DC(zf,aq,cg,0);bj.appendChild(RB);a.__xKineticTypographyAnimate=RB}var dj=WC.B(Ah,"size-gradient",$APP.kc(["color-wave"]));if($APP.u(dj)){var NO=a.setAttribute;if($APP.u(dj)){var SB=$APP.od.g?$APP.od.g(dj):$APP.od.call(null,dj);
|
|
25
|
+
rC(SB);var TB=$APP.uc($APP.u(SB),$APP.vc(dj))}else TB=$APP.Mb;NO.call(a,"data-effect",$APP.xg(TB))}else a.removeAttribute("data-effect");$APP.O(zf,"none")?a.setAttribute("data-animation",zf):a.removeAttribute("data-animation")}zO.textContent=yf;$APP.C.h(yf,"")?(a.setAttribute("role","presentation"),a.setAttribute("aria-hidden","true")):(a.setAttribute("role","img"),a.setAttribute("aria-label",yf))},cD=function(a,b,c,d){Object.defineProperty(a,c,{get:function(){var e=this.getAttribute(b);return $APP.n(e)?
|
|
26
|
+
e:d},set:function(e){return typeof e==="string"&&$APP.O("",e)?this.setAttribute(b,e):this.removeAttribute(b)},enumerable:!0,configurable:!0})},dD=function(a){cD(a,"text","text","");cD(a,"path","path",null);cD(a,"preset","preset","wave");cD(a,"animation","animation","scroll");cD(a,"speed","speed",""+$APP.T.g(1));cD(a,"direction","direction","normal");cD(a,"effect","effect","none");cD(a,"font-size","fontSize",null);cD(a,"start-size","startSize",null);cD(a,"end-size","endSize",null);cD(a,"repeat","repeat",
|
|
27
|
+
""+$APP.T.g(1));cD(a,"echo-count","echoCount",""+$APP.T.g(0));cD(a,"echo-delay","echoDelay",""+$APP.T.g(.3));cD(a,"echo-opacity","echoOpacity",""+$APP.T.g(.5));cD(a,"echo-scale","echoScale",""+$APP.T.g(.85))},fD=function(){var a=class extends HTMLElement{};a.observedAttributes=eD;a.prototype.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xKineticTypographyInit"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=AC("svg"),g=AC("defs"),
|
|
28
|
+
h=AC("path"),k=AC("path"),m=AC("text"),p=AC("textPath"),q=document.createElement("span"),v=document.createElement("div"),x=document.createElement("div"),y="xkt-"+$APP.T.g(wC());c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-kinetic-typography-color:currentColor;--x-kinetic-typography-font-family:system-ui,sans-serif;--x-kinetic-typography-font-size:24px;--x-kinetic-typography-font-weight:400;--x-kinetic-typography-letter-spacing:0;--x-kinetic-typography-opacity:1;--x-kinetic-typography-stroke:none;--x-kinetic-typography-stroke-width:0;--x-kinetic-typography-duration:10s;--x-kinetic-typography-timing:linear;--x-kinetic-typography-color-shift-from:currentColor;--x-kinetic-typography-color-shift-to:#3b82f6;--x-kinetic-typography-path-stroke:none;--x-kinetic-typography-path-stroke-width:0;--x-kinetic-typography-crawl-perspective:400px;}@media (prefers-color-scheme:dark){:host{--x-kinetic-typography-color:rgba(255,255,255,0.87);}}[part\x3dcontainer]{width:100%;height:100%;position:relative;}[part\x3dsvg]{width:100%;height:100%;overflow:visible;}[part\x3dtext]{fill:var(--x-kinetic-typography-color);font-family:var(--x-kinetic-typography-font-family);font-size:var(--x-kinetic-typography-font-size);font-weight:var(--x-kinetic-typography-font-weight);letter-spacing:var(--x-kinetic-typography-letter-spacing);opacity:var(--x-kinetic-typography-opacity);stroke:var(--x-kinetic-typography-stroke);stroke-width:var(--x-kinetic-typography-stroke-width);}[part\x3dtext-echo]{fill:var(--x-kinetic-typography-color);font-family:var(--x-kinetic-typography-font-family);font-weight:var(--x-kinetic-typography-font-weight);letter-spacing:var(--x-kinetic-typography-letter-spacing);stroke:var(--x-kinetic-typography-stroke);stroke-width:var(--x-kinetic-typography-stroke-width);}@keyframes xkt-opacity-wave{0%,100%{opacity:var(--x-kinetic-typography-opacity);}50%{opacity:0.3;}}@keyframes xkt-size-pulse{0%,100%{font-size:var(--x-kinetic-typography-font-size);}50%{font-size:calc(var(--x-kinetic-typography-font-size) * 1.15);}}@keyframes xkt-spacing-breathe{0%,100%{letter-spacing:var(--x-kinetic-typography-letter-spacing);}50%{letter-spacing:0.15em;}}@keyframes xkt-color-shift{0%,100%{fill:var(--x-kinetic-typography-color-shift-from);}50%{fill:var(--x-kinetic-typography-color-shift-to);}}@keyframes xkt-color-wave{0%,100%{fill:var(--x-kinetic-typography-color-shift-from);}50%{fill:var(--x-kinetic-typography-color-shift-to);}}:host([data-effect~\x3dopacity-wave]) [part\x3dtext]{animation:xkt-opacity-wave var(--x-kinetic-typography-duration) ease-in-out infinite;}:host([data-effect~\x3dsize-pulse]) [part\x3dtext]{animation:xkt-size-pulse var(--x-kinetic-typography-duration) ease-in-out infinite;}:host([data-effect~\x3dspacing-breathe]) [part\x3dtext]{animation:xkt-spacing-breathe var(--x-kinetic-typography-duration) ease-in-out infinite;}:host([data-effect~\x3dcolor-shift]) [part\x3dtext]{animation:xkt-color-shift var(--x-kinetic-typography-duration) ease-in-out infinite;}:host([data-effect~\x3dopacity-wave][data-effect~\x3dcolor-shift]) [part\x3dtext]{animation:xkt-opacity-wave var(--x-kinetic-typography-duration) ease-in-out infinite,xkt-color-shift var(--x-kinetic-typography-duration) ease-in-out infinite;}:host([data-effect~\x3dopacity-wave][data-effect~\x3dspacing-breathe]) [part\x3dtext]{animation:xkt-opacity-wave var(--x-kinetic-typography-duration) ease-in-out infinite,xkt-spacing-breathe var(--x-kinetic-typography-duration) ease-in-out infinite;}:host([data-effect~\x3dcolor-shift][data-effect~\x3dspacing-breathe]) [part\x3dtext]{animation:xkt-color-shift var(--x-kinetic-typography-duration) ease-in-out infinite,xkt-spacing-breathe var(--x-kinetic-typography-duration) ease-in-out infinite;}:host([data-effect~\x3dopacity-wave][data-effect~\x3dcolor-shift][data-effect~\x3dspacing-breathe]) [part\x3dtext]{animation:xkt-opacity-wave var(--x-kinetic-typography-duration) ease-in-out infinite,xkt-color-shift var(--x-kinetic-typography-duration) ease-in-out infinite,xkt-spacing-breathe var(--x-kinetic-typography-duration) ease-in-out infinite;}[part\x3dpath-line]{fill:none;stroke:var(--x-kinetic-typography-path-stroke);stroke-width:var(--x-kinetic-typography-path-stroke-width);}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}[part\x3dcrawl-viewport]{display:none;}:host([data-preset\x3dcrawl]) [part\x3dsvg]{display:none;}:host([data-preset\x3dcrawl]) [part\x3dcrawl-viewport]{display:block;perspective:var(--x-kinetic-typography-crawl-perspective);height:100%;overflow:hidden;position:relative;}:host([data-preset\x3dcrawl]) [part\x3dcrawl-text]{position:absolute;bottom:0;left:50%;transform:translateX(-50%) rotateX(25deg);transform-origin:50% 100%;text-align:center;font-family:var(--x-kinetic-typography-font-family);font-size:var(--x-kinetic-typography-font-size);font-weight:var(--x-kinetic-typography-font-weight);color:var(--x-kinetic-typography-color);letter-spacing:var(--x-kinetic-typography-letter-spacing);white-space:pre-line;line-height:1.6;width:80%;}@keyframes xkt-crawl{0%{bottom:-100%;opacity:1;}90%{opacity:1;}100%{bottom:200%;opacity:0;}}:host([data-preset\x3dcrawl][data-animation\x3dscroll]) [part\x3dcrawl-text]{animation:xkt-crawl var(--x-kinetic-typography-duration) linear infinite;}:host([data-preset\x3dcrawl][data-animation\x3dscroll][data-direction\x3dreverse]) [part\x3dcrawl-text]{animation-direction:reverse;}:host([data-preset\x3dcrawl][data-effect~\x3dcolor-shift]) [part\x3dcrawl-text]{animation:xkt-crawl var(--x-kinetic-typography-duration) linear infinite,xkt-crawl-color-shift var(--x-kinetic-typography-duration) ease-in-out infinite;}@keyframes xkt-crawl-color-shift{0%,100%{color:var(--x-kinetic-typography-color-shift-from);}50%{color:var(--x-kinetic-typography-color-shift-to);}}@media (prefers-reduced-motion:reduce){:host([data-effect]) [part\x3dtext]{animation:none;}:host([data-preset\x3dcrawl]) [part\x3dcrawl-text]{animation:none;}}";
|
|
29
|
+
d.setAttribute("part","container");e.setAttribute("part","svg");e.setAttribute("aria-hidden","true");e.setAttribute("focusable","false");h.setAttribute("id",y);g.appendChild(h);k.setAttribute("part","path-line");e.appendChild(k);m.setAttribute("part","text");p.setAttribute("href","#"+$APP.T.g(y));m.appendChild(p);e.appendChild(g);e.appendChild(m);v.setAttribute("part","crawl-viewport");x.setAttribute("part","crawl-text");v.appendChild(x);q.classList.add("sr-only");q.setAttribute("part","sr-only");
|
|
30
|
+
d.appendChild(e);d.appendChild(v);d.appendChild(q);b.appendChild(c);b.appendChild(d);this.__xKineticTypographyContainer=d;this.__xKineticTypographySvg=e;this.__xKineticTypographyPath=h;this.__xKineticTypographyText=m;this.__xKineticTypographyTextPath=p;this.__xKineticTypographySrOnly=q;this.__xKineticTypographyPathId=y;this.__xKineticTypographyCrawlViewport=v;this.__xKineticTypographyCrawlText=x;this.__xKineticTypographyEchoEls=[];this.__xKineticTypographyInit=!0}bD(this);return null};a.prototype.disconnectedCallback=
|
|
31
|
+
function(){CC(this);$APP.n($APP.l(this,"__xKineticTypographySvg"))&&EC(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.n($APP.l(this,"__xKineticTypographyInit"))&&bD(this);return null};dD(a.prototype);return a},gD=function(){$APP.n(customElements.get("x-kinetic-typography"))||customElements.define("x-kinetic-typography",fD());return null},hD=function hD(a,b){if(a==null)return b;if(b==null)return a;if(a instanceof $APP.tf){if(b instanceof $APP.tf){var d=function(){var e=
|
|
32
|
+
a.right,g=b.left;return hD.h?hD.h(e,g):hD.call(null,e,g)}();return d instanceof $APP.tf?new $APP.tf(d.key,d.l,new $APP.tf(a.key,a.l,a.left,d.left),new $APP.tf(b.key,b.l,d.right,b.right)):new $APP.tf(a.key,a.l,a.left,new $APP.tf(b.key,b.l,d,b.right))}return new $APP.tf(a.key,a.l,a.left,function(){var e=a.right;return hD.h?hD.h(e,b):hD.call(null,e,b)}())}if(b instanceof $APP.tf)return new $APP.tf(b.key,b.l,function(){var e=b.left;return hD.h?hD.h(a,e):hD.call(null,a,e)}(),b.right);d=function(){var e=
|
|
33
|
+
a.right,g=b.left;return hD.h?hD.h(e,g):hD.call(null,e,g)}();return d instanceof $APP.tf?new $APP.tf(d.key,d.l,new $APP.sf(a.key,a.l,a.left,d.left),new $APP.sf(b.key,b.l,d.right,b.right)):mC(a.key,a.l,a.left,new $APP.sf(b.key,b.l,d,b.right))},iD=function iD(a,b,c,d){if(b!=null){var g=function(){var h=b.key;return a.h?a.h(c,h):a.call(null,c,h)}();if(g===0)return d[0]=b,hD(b.left,b.right);if(g<0)return g=function(){var h=b.left;return iD.Z?iD.Z(a,h,c,d):iD.call(null,a,h,c,d)}(),g!=null||d[0]!=null?b.left instanceof
|
|
34
|
+
$APP.sf?mC(b.key,b.l,g,b.right):new $APP.tf(b.key,b.l,g,b.right):null;g=function(){var h=b.right;return iD.Z?iD.Z(a,h,c,d):iD.call(null,a,h,c,d)}();return g!=null||d[0]!=null?b.right instanceof $APP.sf?oC(b.key,b.l,b.left,g):new $APP.tf(b.key,b.l,b.left,g):null}return null};$APP.S.prototype.Bb=$APP.ca(48,function(a,b){a=iC(this.xa,b);return a===this.xa?this:new $APP.S(this.s,a,null)});$APP.Mf.prototype.Bb=$APP.ca(47,function(a,b){a=iC(this.wa,b);return a===this.wa?this:new $APP.Mf(this.s,a,null)});
|
|
35
|
+
$APP.sf.prototype.ob=$APP.ca(46,function(){return new $APP.tf(this.key,this.l,this.left,this.right)});$APP.tf.prototype.ob=$APP.ca(45,function(){throw Error("red-black tree invariant violation");});
|
|
36
|
+
$APP.Te.prototype.Pa=$APP.ca(44,function(a,b,c){var d=1<<(b>>>a&31);if((this.X&d)===0)return this;var e=$APP.Xc(this.X&d-1),g=this.i[2*e],h=this.i[2*e+1];return g==null?(a=h.Pa(a+5,b,c),a===h?this:a!=null?new $APP.Te(null,this.X,$APP.Pe(this.i,2*e+1,a)):this.X===d?null:new $APP.Te(null,this.X^d,kC(this.i,e))):$APP.Fe(c,g)?this.X===d?null:new $APP.Te(null,this.X^d,kC(this.i,e)):this});
|
|
37
|
+
$APP.Ve.prototype.Pa=$APP.ca(43,function(a,b,c){var d=b>>>a&31,e=this.i[d];if(e!=null){a=e.Pa(a+5,b,c);if(a===e)d=this;else if(a==null)if(this.j<=8)a:{e=this.i;a=e.length;b=Array(2*(this.j-1));c=0;for(var g=1,h=0;;)if(c<a)c!==d&&e[c]!=null?(b[g]=e[c],g+=2,h|=1<<c,c+=1):c+=1;else{d=new $APP.Te(null,h,b);break a}d=void 0}else d=new $APP.Ve(null,this.j-1,$APP.Pe(this.i,d,a));else d=new $APP.Ve(null,this.j,$APP.Pe(this.i,d,a));return d}return this});
|
|
38
|
+
$APP.Xe.prototype.Pa=$APP.ca(42,function(a,b,c){a=$APP.We(this.i,this.j,c);return a===-1?this:this.j===1?null:new $APP.Xe(null,this.Ia,this.j-1,kC(this.i,$APP.Wc(a)))});$APP.Jb.prototype.pa=$APP.ca(35,function(a,b){return b>0?this.u+b<this.i.length?new $APP.Jb(this.i,this.u+b,null):null:this});$APP.Md.prototype.pa=$APP.ca(34,function(a,b){if(this.count===-1)return this;a=this.count-b;return a>0?new $APP.Md(null,a,this.l,null):null});
|
|
39
|
+
$APP.Q.prototype.pa=$APP.ca(33,function(a,b){if(b<this.j){a=b%32;var c=$APP.ae(this,b);b-=a;return $APP.me?$APP.me(this,c,b,a):$APP.oe.call(null,this,c,b,a)}return null});$APP.le.prototype.pa=$APP.ca(32,function(a,b){a=this.ha+b;if(a<this.node.length)return $APP.me?$APP.me(this.ja,this.node,this.u,a):$APP.oe.call(null,this.ja,this.node,this.u,a);var c=this.u+a;if(c<$APP.xa(this.ja)){a=c%32;b=this.ja;var d=$APP.ae(this.ja,c);c-=a;return $APP.me?$APP.me(b,d,c,a):$APP.oe.call(null,b,d,c,a)}return null});
|
|
40
|
+
$APP.De.prototype.pa=$APP.ca(31,function(a,b){return b<this.N(null)?new $APP.De(this.i,this.u+2*b,null):null});$APP.R.prototype.pa=$APP.ca(30,function(a,b){a=this.O(null);return a==null?null:jC(a,b)});$APP.Rf.prototype.pa=$APP.ca(29,function(a,b){return b>0?b<this.j?new $APP.Rf(null,this.start+this.step*b,this.end,this.step,this.j-b,null):null:this});
|
|
41
|
+
$APP.R.prototype.ib=$APP.ca(28,function(a,b){if($APP.Be(this.i,b)>=0){a=this.i.length;var c=a-2;if(c===0)return this.F(null);c=Array(c);for(var d=0,e=0;;){if(d>=a)return new $APP.R(this.s,this.j-1,c,null);$APP.C.h(b,this.i[d])?d+=2:(c[e]=this.i[d],c[e+1]=this.i[d+1],e+=2,d+=2)}}else return this});
|
|
42
|
+
$APP.lf.prototype.ib=$APP.ca(27,function(a,b){if(b==null)return this.la?new $APP.lf(this.s,this.j-1,this.root,!1,null,null):this;if(this.root==null)return this;a=this.root.Pa(0,$APP.Eb(b),b);return a===this.root?this:new $APP.lf(this.s,this.j-1,a,this.la,this.ma,null)});$APP.Bf.prototype.ib=$APP.ca(26,function(a,b){a=[null];b=iD(this.va,this.Ka,b,a);return b==null?$APP.fc(a,0)==null?this:new $APP.Bf(this.va,null,0,this.s,null):new $APP.Bf(this.va,b.Fa(),this.j-1,this.s,null)});
|
|
43
|
+
$APP.Jb.prototype.F=$APP.ca(25,function(){return $APP.Mb});$APP.mc.prototype.F=$APP.ca(24,function(){return $APP.Mb});$APP.Zc.prototype.F=$APP.ca(23,function(){return $APP.Ta($APP.Mb,this.s)});$APP.$c.prototype.F=$APP.ca(22,function(){return this});$APP.cd.prototype.F=$APP.ca(21,function(){return $APP.Mb});$APP.gd.prototype.F=$APP.ca(20,function(){return $APP.Ta($APP.Mb,this.s)});$APP.ld.prototype.F=$APP.ca(19,function(){return $APP.Mb});$APP.Md.prototype.F=$APP.ca(18,function(){return $APP.Mb});
|
|
44
|
+
$APP.Q.prototype.F=$APP.ca(17,function(){return $APP.Ta($APP.Td,this.s)});$APP.le.prototype.F=$APP.ca(16,function(){return $APP.Mb});$APP.Ce.prototype.F=$APP.ca(15,function(){return null});$APP.De.prototype.F=$APP.ca(14,function(){return $APP.Mb});$APP.R.prototype.F=$APP.ca(13,function(){return $APP.Ta($APP.Fd,this.s)});$APP.bf.prototype.F=$APP.ca(12,function(){return $APP.Mb});$APP.ff.prototype.F=$APP.ca(11,function(){return $APP.Mb});
|
|
45
|
+
$APP.lf.prototype.F=$APP.ca(10,function(){return $APP.Ta($APP.Le,this.s)});$APP.qf.prototype.F=$APP.ca(9,function(){return $APP.Mb});$APP.sf.prototype.F=$APP.ca(8,function(){return null});$APP.tf.prototype.F=$APP.ca(7,function(){return null});$APP.Bf.prototype.F=$APP.ca(6,function(){return new $APP.Bf(this.va,null,0,this.s,0)});$APP.Df.prototype.F=$APP.ca(5,function(){return $APP.Mb});$APP.Ff.prototype.F=$APP.ca(4,function(){return $APP.Mb});
|
|
46
|
+
$APP.S.prototype.F=$APP.ca(3,function(){return $APP.Ta($APP.Jf,this.s)});$APP.Mf.prototype.F=$APP.ca(2,function(){return new $APP.Mf(this.s,hC(this.wa),0)});$APP.Rf.prototype.F=$APP.ca(1,function(){return $APP.Mb});$APP.Sf.prototype.F=$APP.ca(0,function(){return $APP.Mb});
|
|
47
|
+
var xC=function xC(a){switch(arguments.length){case 2:return xC.h(arguments[0],arguments[1]);case 3:return xC.m(arguments[0],arguments[1],arguments[2]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return xC.B(arguments[0],arguments[1],arguments[2],3<c.length?new $APP.Jb(c.slice(3),0,null):null)}};xC.h=function(a,b){return b};xC.m=function(a,b,c){return(a.g?a.g(b):a.call(null,b))>(a.g?a.g(c):a.call(null,c))?b:c};
|
|
48
|
+
xC.B=function(a,b,c,d){return $APP.Lc(function(e,g){return xC.m(a,e,g)},xC.m(a,b,c),d)};xC.K=function(a){var b=$APP.w(a),c=$APP.z(a);a=$APP.w(c);var d=$APP.z(c);c=$APP.w(d);d=$APP.z(d);return this.B(b,a,c,d)};xC.P=3;
|
|
49
|
+
var WC=function WC(a){switch(arguments.length){case 1:return WC.g(arguments[0]);case 2:return WC.h(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 WC.B(arguments[0],arguments[1],2<c.length?new $APP.Jb(c.slice(2),0,null):null)}};WC.g=function(a){return a};WC.h=function(a,b){return a==null?null:sC(a,b)};WC.B=function(a,b,c){for(;;){if(a==null)return null;a=WC.h(a,b);if($APP.n(c))b=$APP.w(c),c=$APP.z(c);else return a}};
|
|
50
|
+
WC.K=function(a){var b=$APP.w(a),c=$APP.z(a);a=$APP.w(c);c=$APP.z(c);return this.B(b,a,c)};WC.P=2;var aD=function aD(a){switch(arguments.length){case 0:return aD.H();case 1:return aD.g(arguments[0]);case 2:return aD.h(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 aD.B(arguments[0],arguments[1],2<c.length?new $APP.Jb(c.slice(2),0,null):null)}};aD.H=function(){return $APP.Mb};
|
|
51
|
+
aD.g=function(a){return new $APP.gd(null,function(){return a},null)};aD.h=function(a,b){return new $APP.gd(null,function(){var c=$APP.u(a),d=$APP.u(b);return c&&d?$APP.dd($APP.w(c),$APP.dd($APP.w(d),aD.h($APP.Ob(c),$APP.Ob(d)))):null},null)};aD.B=function(a,b,c){return new $APP.gd(null,function(){var d=$APP.Od.h($APP.u,$APP.ad.B(c,b,$APP.kc([a])));return $APP.Hd($APP.Sc,d)?$APP.Nd.h($APP.Od.h($APP.w,d),$APP.yd(aD,$APP.Od.h($APP.Ob,d))):null},null)};
|
|
52
|
+
aD.K=function(a){var b=$APP.w(a),c=$APP.z(a);a=$APP.w(c);c=$APP.z(c);return this.B(b,a,c)};aD.P=2;$APP.f=uC.prototype;$APP.f.pc=$APP.t;$APP.f.toString=function(){return this.qb};$APP.f.R=function(a,b){return(a=b!=null?$APP.t===b.pc?!0:!1:!1)?this.qb===b.qb:a};$APP.f.S=function(a,b){return $APP.gb(b,['#uuid "',$APP.sa(this.qb),'"'].join(""))};$APP.f.T=function(){this.A==null&&(this.A=$APP.Eb(this.qb));return this.A};
|
|
53
|
+
$APP.f.Ha=function(a,b){if(b instanceof uC)return $APP.na(this.qb,b.qb);throw Error(["Cannot compare ",$APP.sa(this)," to ",$APP.sa(b)].join(""));};
|
|
54
|
+
var OC=new $APP.M(null,"echo-opacity","echo-opacity",-1476699970),jD=new $APP.M(null,"startSize","startSize",-1750632892),IC=new $APP.M(null,"start-size","start-size",-1818812493),XC=new $APP.M(null,"crawl?","crawl?",829918610),FC=new $APP.M(null,"echo-scale","echo-scale",1307207648),kD=new $APP.M(null,"echoOpacity","echoOpacity",-1325258611),LC=new $APP.M(null,"echo-delay","echo-delay",845689658),lD=new $APP.M(null,"endSize","endSize",674490141),MC=new $APP.M(null,"echo-count","echo-count",1053271067),
|
|
55
|
+
UC=new $APP.M(null,"view-box","view-box",-1792199155),HC=new $APP.M(null,"preset","preset",777387345),JC=new $APP.M(null,"repeat","repeat",832692087),mD=new $APP.M(null,"fontSize","fontSize",919623033),$C=new $APP.M(null,"custom-path?","custom-path?",-1532616839),KC=new $APP.M(null,"effect","effect",347343289),nD=new $APP.M(null,"echoDelay","echoDelay",-1807132900),ZC=new $APP.M(null,"duration-s","duration-s",-1976899627),oD=new $APP.M(null,"echoCount","echoCount",-1194377974),GC=new $APP.M(null,
|
|
56
|
+
"font-size","font-size",-1847940346),YC=new $APP.M(null,"effects","effects",-282369292),NC=new $APP.M(null,"end-size","end-size",761612093),pD=new $APP.M(null,"echoScale","echoScale",1536204716);var SC=function SC(a){switch(arguments.length){case 1:return SC.g(arguments[0]);case 2:return SC.h(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 SC.B(arguments[0],arguments[1],2<c.length?new $APP.Jb(c.slice(2),0,null):null)}};SC.g=function(a){return a};SC.h=function(a,b){for(;;)if($APP.B(b)<$APP.B(a)){var c=a;a=b;b=c}else return $APP.Lc(function(d,e){return function(g,h){return $APP.K(e,h)?g:WC.h(g,h)}}(a,b),a,a)};
|
|
57
|
+
SC.B=function(a,b,c){a=yC(function(d){return-$APP.B(d)},$APP.ad.B(c,b,$APP.kc([a])));return $APP.Lc(SC,$APP.w(a),$APP.Ob(a))};SC.K=function(a){var b=$APP.w(a),c=$APP.z(a);a=$APP.w(c);c=$APP.z(c);return this.B(b,a,c)};SC.P=2;var eD="text path preset animation speed direction effect font-size start-size end-size repeat echo-count echo-delay echo-opacity echo-scale".split(" ");
|
|
58
|
+
$APP.mf([$APP.xj,jD,$APP.oi,$APP.xi,oD,pD,kD,HC,JC,mD,KC,nD,lD,$APP.ni,$APP.Rj],[new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"path"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"start-size"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"animation"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"speed"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"echo-count"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"echo-scale"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"echo-opacity"],null),new $APP.R(null,
|
|
59
|
+
2,[$APP.Z,$APP.Y,$APP.nj,"preset"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"repeat"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"font-size"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"effect"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"echo-delay"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"end-size"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"direction"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"text"],null)]);
|
|
60
|
+
var PC=new $APP.S(null,new $APP.R(null,8,["spiral",null,"infinity",null,"arc",null,"line",null,"crawl",null,"wave",null,"circle",null,"sine",null],null),null),QC=new $APP.S(null,new $APP.R(null,4,["none",null,"scroll",null,"bounce",null,"oscillate",null],null),null),RC=new $APP.S(null,new $APP.R(null,2,["reverse",null,"normal",null],null),null),TC=new $APP.S(null,new $APP.R(null,6,["spacing-breathe",null,"color-shift",null,"opacity-wave",null,"color-wave",null,"size-gradient",null,"size-pulse",null],
|
|
61
|
+
null),null),VC=new $APP.R(null,7,["wave",new $APP.R(null,2,[$APP.ek,"M0,100 C100,20 200,180 300,100 C400,20 500,180 600,100 C700,20 800,180 800,100",UC,"0 0 800 200"],null),"circle",new $APP.R(null,2,[$APP.ek,"M125,10 A115,115 0 1,1 124.99,10",UC,"0 0 250 250"],null),"arc",new $APP.R(null,2,[$APP.ek,"M50,350 Q400,10 750,350",UC,"0 0 800 400"],null),"infinity",new $APP.R(null,2,[$APP.ek,"M200,200 C200,80 0,80 0,200 C0,320 200,320 200,200 C200,80 400,80 400,200 C400,320 200,320 200,200",UC,"0 0 400 400"],
|
|
62
|
+
null),"spiral",new $APP.R(null,2,[$APP.ek,"M250,250 C250,150 350,150 350,250 C350,370 130,370 130,250 C130,110 390,110 390,250 C390,410 90,410 90,250",UC,"0 0 500 500"],null),"sine",new $APP.R(null,2,[$APP.ek,"M0,100 C50,0 100,0 150,100 C200,200 250,200 300,100 C350,0 400,0 450,100 C500,200 550,200 600,100 C650,0 700,0 750,100 C800,200 800,150 800,100",UC,"0 0 800 200"],null),"line",new $APP.R(null,2,[$APP.ek,"M0,50 L800,50",UC,"0 0 800 100"],null)],null);$APP.ja("baredom.exports.x_kinetic_typography.init",gD);export const init=gD;
|
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.C.h(k," "))&&$APP.
|
|
6
|
-
b;a.__xMenuItemHandlers=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(
|
|
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.n(b)){var d=$APP.l(b,"keydown"),e=$APP.l(b,"icon-slotchange");c=$APP.n(c)?$APP.l(c,"icon-slot"):null;this.removeEventListener("click",$APP.l(b,"click"));this.removeEventListener("keydown",d);b=$APP.n(c)?c.removeEventListener("slotchange",e):null}else b=null;return b};a.prototype.attributeChangedCallback=function(){return
|
|
11
|
-
|
|
2
|
+
var pM=function(a){var b=$APP.N(a);a=$APP.I(b,$APP.Xh);var c=$APP.I(b,$APP.Di),d=$APP.I(b,$APP.jh);b=$APP.I(b,$APP.Z);a=$APP.n(a)?a:"";c=$APP.J(c);d=$APP.n(d)?d:"";d=$APP.K(nM,d)?d:"";b=$APP.n(b)?b:"";b=$APP.K(oM,b)?b:"";return new $APP.R(null,4,[$APP.Xh,a,$APP.Di,c,$APP.jh,d,$APP.Z,b],null)},qM=function(a){return $APP.l(a,"__xMenuItemInit")===!0},rM=function(a){return new $APP.R(null,4,[$APP.Xh,a.getAttribute("value"),$APP.Di,a.hasAttribute("disabled"),$APP.jh,a.getAttribute("variant"),$APP.Z,a.getAttribute("type")],
|
|
3
|
+
null)},sM=function(a){var b=a.getAttribute("value");return a.dispatchEvent(new CustomEvent("x-menu-item-select",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))},tM=function(a){var b=$APP.l(a,"__xMenuItemRefs");b=$APP.n(b)?$APP.l(b,"base"):null;var c=pM(rM(a));if($APP.n(b)){if($APP.C.h($APP.Z.g(c),"divider"))return a.setAttribute("role","separator"),a.removeAttribute("tabindex"),a.removeAttribute("aria-disabled"),b.setAttribute("data-type","divider"),b.setAttribute("data-variant",""),b.setAttribute("data-disabled",
|
|
4
|
+
"false");a.setAttribute("role","menuitem");a.setAttribute("tabindex","-1");b.setAttribute("data-type","");b.setAttribute("data-variant",$APP.jh.g(c));b.setAttribute("data-disabled",$APP.n($APP.Di.g(c))?"true":"false");return $APP.n($APP.Di.g(c))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")}return null},uM=function(a){function b(){return e.assignedNodes().length>0?a.setAttribute("has-icon",""):a.removeAttribute("has-icon")}function c(h){var k=h.key,m=pM(rM(a));($APP.C.h(k,
|
|
5
|
+
"Enter")||$APP.C.h(k," "))&&$APP.r($APP.Di.g(m))&&$APP.O($APP.Z.g(m),"divider")?(h.preventDefault(),h=sM(a)):h=null;return h}function d(h){var k=pM(rM(a));var m=$APP.Di.g(k);m=$APP.n(m)?m:$APP.C.h($APP.Z.g(k),"divider");$APP.n(m)&&h.preventDefault();return $APP.r($APP.Di.g(k))&&$APP.O($APP.Z.g(k),"divider")?sM(a):null}var e=$APP.l($APP.l(a,"__xMenuItemRefs"),"icon-slot"),g={};a.addEventListener("click",d);a.addEventListener("keydown",c);e.addEventListener("slotchange",b);g.click=d;g.keydown=c;g["icon-slotchange"]=
|
|
6
|
+
b;a.__xMenuItemHandlers=g},vM=function(a){Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.n(b)?this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,
|
|
7
|
+
"variant",{get:function(){return this.getAttribute("variant")},set:function(b){return $APP.n(b)?this.setAttribute("variant",b):this.removeAttribute("variant")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"type",{get:function(){return this.getAttribute("type")},set:function(b){return $APP.n(b)?this.setAttribute("type",b):this.removeAttribute("type")},configurable:!0,enumerable:!0})},xM=function(){var a=class extends HTMLElement{};a.observedAttributes=wM;a.prototype.connectedCallback=
|
|
8
|
+
function(){if(qM(this)){uM(this);var b=tM(this)}else{if(!qM(this)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style");b=document.createElement("div");var e=document.createElement("span"),g=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("slot"),m=document.createElement("hr");d.textContent=":host{display:block;outline:none;color-scheme:light dark;--x-menu-item-color:#111827;--x-menu-item-hover-bg:#f3f4f6;--x-menu-item-focus-bg:#eff6ff;--x-menu-item-focus-color:#1d4ed8;--x-menu-item-disabled-opacity:0.45;--x-menu-item-danger-color:#dc2626;--x-menu-item-danger-hover-bg:#fef2f2;--x-menu-item-padding:8px 12px;--x-menu-item-border-radius:4px;--x-menu-item-font-size:0.9375rem;--x-menu-item-icon-gap:8px;--x-menu-item-divider-color:#e5e7eb;}:host([disabled]){pointer-events:none;}@media (prefers-color-scheme:dark){:host{--x-menu-item-color:#f9fafb;--x-menu-item-hover-bg:#1f2937;--x-menu-item-focus-bg:#1e3a5f;--x-menu-item-focus-color:#60a5fa;--x-menu-item-danger-color:#f87171;--x-menu-item-danger-hover-bg:#2d1515;--x-menu-item-divider-color:#374151;}}.base{display:flex;align-items:center;gap:var(--x-menu-item-icon-gap);padding:var(--x-menu-item-padding);border-radius:var(--x-menu-item-border-radius);font-size:var(--x-menu-item-font-size);color:var(--x-menu-item-color);cursor:pointer;user-select:none;transition:background 100ms ease,color 100ms ease;}.base:hover{background:var(--x-menu-item-hover-bg);}:host(:focus) .base{background:var(--x-menu-item-focus-bg);color:var(--x-menu-item-focus-color);}.base[data-variant\x3d'danger']{color:var(--x-menu-item-danger-color);}.base[data-variant\x3d'danger']:hover{background:var(--x-menu-item-danger-hover-bg);}:host(:focus) .base[data-variant\x3d'danger']{background:var(--x-menu-item-danger-hover-bg);}.base[data-disabled\x3d'true']{opacity:var(--x-menu-item-disabled-opacity);cursor:default;pointer-events:none;}.base[data-type\x3d'divider']{padding:0;cursor:default;pointer-events:none;}.icon-span{display:none;flex-shrink:0;align-items:center;}:host([has-icon]) .icon-span{display:flex;}.divider-hr{display:none;}.base[data-type\x3d'divider'] .icon-span,.base[data-type\x3d'divider'] .label-span{display:none;}.base[data-type\x3d'divider'] .divider-hr{display:block;width:100%;border:none;border-top:1px solid var(--x-menu-item-divider-color);margin:4px 0;}@media (prefers-reduced-motion:reduce){.base{transition:none;}}";
|
|
9
|
+
b.setAttribute("part","base");b.className="base";e.setAttribute("part","icon");e.className="icon-span";g.setAttribute("name","icon");e.appendChild(g);h.className="label-span";h.appendChild(k);m.className="divider-hr";b.appendChild(e);b.appendChild(h);b.appendChild(m);c.appendChild(d);c.appendChild(b);c={};c.base=b;c["icon-span"]=e;c["icon-slot"]=g;this.__xMenuItemRefs=c;uM(this);this.__xMenuItemInit=!0}tM(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMenuItemHandlers");
|
|
10
|
+
var c=$APP.l(this,"__xMenuItemRefs");if($APP.n(b)){var d=$APP.l(b,"keydown"),e=$APP.l(b,"icon-slotchange");c=$APP.n(c)?$APP.l(c,"icon-slot"):null;this.removeEventListener("click",$APP.l(b,"click"));this.removeEventListener("keydown",d);b=$APP.n(c)?c.removeEventListener("slotchange",e):null}else b=null;return b};a.prototype.attributeChangedCallback=function(){return qM(this)?tM(this):null};vM(a);return a},yM=function(){return $APP.n(customElements.get("x-menu-item"))?null:customElements.define("x-menu-item",
|
|
11
|
+
xM())};var wM=["value","disabled","variant","type"],nM=new $APP.S(null,new $APP.R(null,2,["",null,"danger",null],null),null),oM=new $APP.S(null,new $APP.R(null,2,["",null,"divider",null],null),null);$APP.Ed(["x-menu-item-select",new $APP.R(null,1,[$APP.V,new $APP.R(null,1,[$APP.Xh,$APP.Y],null)],null)]);$APP.ja("baredom.exports.x_menu_item.init",yM);export const init=yM;
|
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.C.h(null,
|
|
4
|
-
-1},a))},
|
|
5
|
-
(e=
|
|
6
|
-
d)?d:"bottom-start";a=new $APP.
|
|
7
|
-
h.indexOf(a))?
|
|
2
|
+
var qD=function(a){return $APP.l(a,"__xMenuInit")===!0},rD=function(a){a=a.querySelectorAll("x-menu-item");for(var b=[],c=a.length,d=0;;)if(d<c){var e=a[d];$APP.r(e.hasAttribute("disabled"))&&$APP.O(e.getAttribute("type"),"divider")&&b.push(e);d+=1}else break;return b},sD=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0}))},vD=function(a){$APP.n(a.hasAttribute("open"))||(a.setAttribute("open",""),sD(a,"x-menu-open",{}));if($APP.n(null)){a=rD(a);var b=a.length;
|
|
3
|
+
return b>0?$APP.C.h(null,tD)?a[0].focus():$APP.C.h(null,uD)?a[b-1].focus():null:null}return null},wD=function(a,b){$APP.n(a.hasAttribute("open"))&&(a.removeAttribute("open"),sD(a,"x-menu-close",{}));return $APP.n(b)?(a=$APP.l(a,"__xMenuRefs"),a=$APP.n(a)?$APP.l(a,"trigger-slot"):null,a=$APP.n(a)?a.assignedElements():null,a=$APP.n($APP.n(a)?a.length>0:a)?a[0]:null,$APP.n(a)?a.focus():null):null},xD=function(a,b){var c=b.composedPath();a=$APP.lc(a.assignedElements());return $APP.J($APP.Id(function(d){return c.indexOf(d)>
|
|
4
|
+
-1},a))},yD=function(a,b){var c=b.key,d=a.hasAttribute("open");if($APP.C.h(c,"Escape"))return $APP.n(d)?(b.preventDefault(),wD(a,!0)):null;if($APP.C.h(c,"Tab"))return $APP.n(d)?wD(a,!1):null;if($APP.C.h(c,"ArrowDown")||$APP.C.h(c,"ArrowUp")){var e=rD(a),g=e.length;if(g>0){b.preventDefault();if($APP.n(d))return a=e.indexOf(document.activeElement),c=$APP.C.h(c,"ArrowDown")?a>=g-1?0:a<0?0:a+1:a<=0?g-1:a-1,e[c].focus();vD(a);return e[$APP.C.h(c,"ArrowDown")?0:g-1].focus()}}else if($APP.C.h(c,"Home")){if($APP.n(d)&&
|
|
5
|
+
(e=rD(a),e.length>0))return b.preventDefault(),e[0].focus()}else if($APP.C.h(c,"End")&&$APP.n(d)&&(e=rD(a),e.length>0))return b.preventDefault(),e[e.length-1].focus();return null},AD=function(a){var b=$APP.l(a,"__xMenuRefs");b=$APP.n(b)?$APP.l(b,"popup"):null;a=new $APP.R(null,3,[$APP.pk,a.hasAttribute("open"),$APP.Ei,a.getAttribute("placement"),$APP.U,a.getAttribute("label")],null);a=$APP.N(a);var c=$APP.I(a,$APP.pk),d=$APP.I(a,$APP.Ei);a=$APP.I(a,$APP.U);c=$APP.J(c);d=$APP.n(d)?d:"";d=$APP.K(zD,
|
|
6
|
+
d)?d:"bottom-start";a=new $APP.R(null,3,[$APP.pk,c,$APP.Ei,d,$APP.U,$APP.n(a)?a:""],null);return $APP.n(b)?(b.setAttribute("data-placement",$APP.Ei.g(a)),a=$APP.U.g(a),$APP.n($APP.n(a)?$APP.O(a,""):a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")):null},BD=function(a){function b(h){h.stopPropagation();h=h.detail.value;wD(a,!1);return sD(a,"x-menu-select",{value:$APP.n(h)?h:""})}function c(h){return yD(a,h)}function d(h){$APP.n(a.hasAttribute("open"))?(h=h.composedPath(),h=$APP.C.h(-1,
|
|
7
|
+
h.indexOf(a))?wD(a,!1):null):h=null;return h}function e(h){var k=$APP.l(a,"__xMenuRefs");k=$APP.n(k)?$APP.l(k,"trigger-slot"):null;return $APP.n($APP.n(k)?xD(k,h):k)?$APP.n(a.hasAttribute("open"))?wD(a,!0):vD(a):null}var g={};a.addEventListener("click",e);document.addEventListener("click",d,!0);a.addEventListener("keydown",c);a.addEventListener("x-menu-item-select",b);g.click=e;g["doc-click"]=d;g.keydown=c;g["item-select"]=b;a.__xMenuHandlers=g},CD=function(a){Object.defineProperty(a.prototype,"open",
|
|
8
8
|
{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?this.setAttribute("open",""):this.removeAttribute("open")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"placement",{get:function(){return this.getAttribute("placement")},set:function(b){return $APP.n(b)?this.setAttribute("placement",b):this.removeAttribute("placement")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"label",{get:function(){return this.getAttribute("label")},
|
|
9
|
-
set:function(b){return $APP.n(b)?this.setAttribute("label",b):this.removeAttribute("label")},configurable:!0,enumerable:!0})},
|
|
9
|
+
set:function(b){return $APP.n(b)?this.setAttribute("label",b):this.removeAttribute("label")},configurable:!0,enumerable:!0})},ED=function(){var a=class extends HTMLElement{};a.observedAttributes=DD;a.prototype.connectedCallback=function(){if(qD(this)){BD(this);var b=AD(this)}else{if(!qD(this)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style");b=document.createElement("div");var e=document.createElement("slot"),g=document.createElement("div"),h=document.createElement("slot");
|
|
10
10
|
d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-menu-bg:#ffffff;--x-menu-border:1px solid #e5e7eb;--x-menu-border-radius:8px;--x-menu-shadow:0 4px 16px rgba(0,0,0,0.12);--x-menu-min-width:160px;--x-menu-padding:4px;--x-menu-z-index:1000;}@media (prefers-color-scheme:dark){:host{--x-menu-bg:#1f2937;--x-menu-border:1px solid #374151;--x-menu-shadow:0 4px 16px rgba(0,0,0,0.4);}}.base{position:relative;display:inline-block;}.popup{display:none;position:absolute;background:var(--x-menu-bg);border:var(--x-menu-border);border-radius:var(--x-menu-border-radius);box-shadow:var(--x-menu-shadow);min-width:var(--x-menu-min-width);padding:var(--x-menu-padding);z-index:var(--x-menu-z-index);box-sizing:border-box;}:host([open]) .popup{display:block;}.popup[data-placement\x3d'bottom-start']{top:100%;left:0;margin-top:4px;}.popup[data-placement\x3d'bottom-end']{top:100%;right:0;margin-top:4px;}.popup[data-placement\x3d'top-start']{bottom:100%;left:0;margin-bottom:4px;}.popup[data-placement\x3d'top-end']{bottom:100%;right:0;margin-bottom:4px;}";
|
|
11
|
-
b.setAttribute("part","base");b.className="base";e.setAttribute("name","trigger");g.setAttribute("part","popup");g.className="popup";g.setAttribute("role","menu");g.appendChild(h);b.appendChild(e);b.appendChild(g);c.appendChild(d);c.appendChild(b);c={};c.base=b;c.popup=g;c["trigger-slot"]=e;c["item-slot"]=h;this.__xMenuRefs=c;
|
|
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
|
-
"
|
|
11
|
+
b.setAttribute("part","base");b.className="base";e.setAttribute("name","trigger");g.setAttribute("part","popup");g.className="popup";g.setAttribute("role","menu");g.appendChild(h);b.appendChild(e);b.appendChild(g);c.appendChild(d);c.appendChild(b);c={};c.base=b;c.popup=g;c["trigger-slot"]=e;c["item-slot"]=h;this.__xMenuRefs=c;BD(this);this.__xMenuInit=!0}AD(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMenuHandlers");if($APP.n(b)){var c=$APP.l(b,"doc-click"),
|
|
12
|
+
d=$APP.l(b,"keydown"),e=$APP.l(b,"item-select");this.removeEventListener("click",$APP.l(b,"click"));document.removeEventListener("click",c,!0);this.removeEventListener("keydown",d);b=this.removeEventListener("x-menu-item-select",e)}else b=null;return b};a.prototype.attributeChangedCallback=function(){return qD(this)?AD(this):null};CD(a);return a},FD=function(){return $APP.n(customElements.get("x-menu"))?null:customElements.define("x-menu",ED())},uD=new $APP.M(null,"last","last",1105735132),tD=new $APP.M(null,
|
|
13
|
+
"first","first",-644103046);var DD=["open","placement","label"],zD=new $APP.S(null,new $APP.R(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null);$APP.Ed(["x-menu-open",new $APP.R(null,1,[$APP.V,$APP.Fd],null),"x-menu-close",new $APP.R(null,1,[$APP.V,$APP.Fd],null),"x-menu-select",new $APP.R(null,1,[$APP.V,new $APP.R(null,1,[$APP.Xh,$APP.Y],null)],null)]);$APP.ja("baredom.exports.x_menu.init",FD);export const init=FD;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
+
var Kz=function(a){if(typeof a==="string"){a=parseInt(a.trim(),10);var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?5:Math.min(10,Math.max(2,a))}return 5},Lz=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?40:Math.min(200,Math.max(10,a))}return 40},Mz=function(a){return typeof a==="string"&&a.trim().length>0?a.trim():"#6366f1"},Nz=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?
|
|
3
|
+
3:Math.min(20,Math.max(.5,a))}return 3},Oz=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?.02:Math.min(.1,Math.max(.001,a))}return.02},Pz=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?6:Math.min(30,Math.max(1,a))}return 6},Qz=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?12:Math.min(40,Math.max(4,a))}return 12},Rz=
|
|
4
|
+
function(a){return typeof a==="string"&&a.trim().length>0?a.trim():"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10"},Tz=function(a){if(typeof a==="string"&&a.trim().length>0){var b=$APP.I(Sz,a.trim().toLowerCase());if($APP.n(b))return b;if(a.indexOf(",")>=0)return a=a.split(","),$APP.Je.m($APP.Td,$APP.Hg.h($APP.Od.g(function(c){return c.trim()}),$APP.Qd(function(c){return c.length>0})),a)}return null},Uz=function(a){for(var b=[],c=0;;)if(c<a)b.push(Math.max(.01,.35*Math.pow(.45,c))),c+=1;else break;
|
|
5
|
+
return b},Vz=function(a,b){for(var c=[],d=0;;)if(d<b)c.push(Math.max(a*.5,a*(1-d*.08))),d+=1;else break;return c},Wz=function(a,b,c){return a+(b-a)*c},lA=function(a){a=$APP.mf([Xz,Yz,Zz,$z,aA,bA,$APP.eh,$APP.Xk,cA,dA],[a.getAttribute("blur"),a.getAttribute("noise-intensity"),a.getAttribute("blob-size"),a.getAttribute("palette"),a.getAttribute("noise-scale"),a.getAttribute("noise"),a.getAttribute("threshold"),a.getAttribute("color"),a.getAttribute("blob-count"),a.getAttribute("noise-speed")]);var b=
|
|
6
|
+
$APP.N(a),c=$APP.I(b,dA);a=$APP.I(b,Xz);var d=$APP.I(b,Yz),e=$APP.I(b,Zz),g=$APP.I(b,$z),h=$APP.I(b,aA),k=$APP.I(b,bA),m=$APP.I(b,$APP.eh),p=$APP.I(b,$APP.Xk);b=$APP.I(b,cA);b=Kz(b);p=Mz(p);g=Tz(g);c=Oz(c);var q=[];if($APP.n($APP.n(g)?$APP.B(g)>0:g))for(var v=$APP.B(g),x=0;;)if(x<b)q.push($APP.fc(g,$APP.Vc(x,v))),x+=1;else break;else for(v=0;;)if(v<b)q.push(p),v+=1;else break;return $APP.mf([$APP.Ci,eA,fA,$APP.wk,$APP.fk,gA,hA,$APP.nh,iA,jA,kA],[p,g,c,q,Rz(m),Nz(h),b,Qz(a),Lz(e),k!=null,Pz(d)])},
|
|
7
|
+
mA=function(a,b){b=$APP.N(b);b=$APP.I(b,$APP.Ci);return a.style.setProperty("--x-metaball-cursor-color",b)},oA=function(a){$APP.J(window.matchMedia("(prefers-reduced-motion:reduce)").matches)||(a.__xMetaballSeed=0,$APP.ma(a,"__xMetaballRaf",requestAnimationFrame(function(){return nA(a)})))},pA=function(a){function b(c){var d=$APP.hi.g($APP.l(a,"__xMetaballRefs"));if($APP.n(d)){d=d.getBoundingClientRect();var e=$APP.l(a,"__xMetaballMouse");e.x=c.clientX-d.left;e.y=c.clientY-d.top}return null}window.addEventListener("pointermove",
|
|
8
|
+
b);a.__xMetaballHandler=b},qA=function(a){var b=$APP.l(a,"__xMetaballHandler");$APP.n(b)&&(window.removeEventListener("pointermove",b),a.__xMetaballHandler=null)},rA=function(a){Object.defineProperty(a,"blobCount",{get:function(){return Kz(this.getAttribute("blob-count"))},set:function(b){return b==null?this.removeAttribute("blob-count"):this.setAttribute("blob-count",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"blobSize",{get:function(){return Lz(this.getAttribute("blob-size"))},
|
|
9
|
+
set:function(b){return b==null?this.removeAttribute("blob-size"):this.setAttribute("blob-size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"color",{get:function(){return Mz(this.getAttribute("color"))},set:function(b){return b==null?this.removeAttribute("color"):this.setAttribute("color",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"noise",{get:function(){return this.hasAttribute("noise")},set:function(b){return $APP.n(b)?this.setAttribute("noise",
|
|
10
|
+
""):this.removeAttribute("noise")},enumerable:!0,configurable:!0});Object.defineProperty(a,"noiseScale",{get:function(){return Nz(this.getAttribute("noise-scale"))},set:function(b){return b==null?this.removeAttribute("noise-scale"):this.setAttribute("noise-scale",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"noiseSpeed",{get:function(){return Oz(this.getAttribute("noise-speed"))},set:function(b){return b==null?this.removeAttribute("noise-speed"):this.setAttribute("noise-speed",
|
|
11
|
+
""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"noiseIntensity",{get:function(){return Pz(this.getAttribute("noise-intensity"))},set:function(b){return b==null?this.removeAttribute("noise-intensity"):this.setAttribute("noise-intensity",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"blur",{get:function(){return Qz(this.getAttribute("blur"))},set:function(b){return b==null?this.removeAttribute("blur"):this.setAttribute("blur",""+$APP.T.g(b))},enumerable:!0,
|
|
12
|
+
configurable:!0});Object.defineProperty(a,"threshold",{get:function(){return Rz(this.getAttribute("threshold"))},set:function(b){return b==null?this.removeAttribute("threshold"):this.setAttribute("threshold",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"palette",{get:function(){return Tz(this.getAttribute("palette"))},set:function(b){return b==null||$APP.C.h("",b)?this.removeAttribute("palette"):this.setAttribute("palette",""+$APP.T.g(b))},enumerable:!0,configurable:!0})},
|
|
13
|
+
xA=function(){var a=class extends HTMLElement{};a.observedAttributes=sA;a.prototype.connectedCallback=function(){var b=lA(this);this.__xMetaballModel=b;this.__xMetaballMouse={x:0,y:0};if(!$APP.n($APP.l(this,"__xMetaballRefs"))){var c=$APP.l(this,"__xMetaballModel"),d=tA[0];tA[0]=d+1;var e="mb-"+$APP.T.g(d),g=this.attachShadow({mode:"open"}),h=document.createElement("style"),k=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");this.__xMetaballUid=d;h.textContent=
|
|
14
|
+
uA;k.setAttribute("part","viewport");k.style.filter="url(#"+$APP.T.g(e)+")";m.style.position="absolute";m.style.width="0";m.style.height="0";m.style.overflow="hidden";var p=$APP.N(c);c=$APP.I(p,$APP.nh);d=$APP.I(p,$APP.fk);var q=$APP.I(p,jA),v=$APP.I(p,gA);p=$APP.I(p,kA);var x=document.createElementNS("http://www.w3.org/2000/svg","defs"),y=document.createElementNS("http://www.w3.org/2000/svg","filter"),A=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),D=document.createElementNS("http://www.w3.org/2000/svg",
|
|
15
|
+
"feColorMatrix"),G=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence"),H=document.createElementNS("http://www.w3.org/2000/svg","feDisplacementMap");y.setAttribute("id",e);y.setAttribute("x","-20%");y.setAttribute("y","-20%");y.setAttribute("width","140%");y.setAttribute("height","140%");A.setAttribute("in","SourceGraphic");A.setAttribute("stdDeviation",""+$APP.T.g(c));A.setAttribute("result","blur");D.setAttribute("in","blur");D.setAttribute("type","matrix");D.setAttribute("values",
|
|
16
|
+
d);D.setAttribute("result","threshold");G.setAttribute("type","fractalNoise");G.setAttribute("baseFrequency",""+$APP.T.g(.01*v));G.setAttribute("numOctaves","3");G.setAttribute("seed","0");G.setAttribute("result","noise");H.setAttribute("in","threshold");H.setAttribute("in2","noise");H.setAttribute("scale",$APP.n(q)?""+$APP.T.g(p):"0");H.setAttribute("xChannelSelector","R");H.setAttribute("yChannelSelector","G");y.appendChild(A);y.appendChild(D);y.appendChild(G);y.appendChild(H);x.appendChild(y);
|
|
17
|
+
m.appendChild(x);e=new $APP.R(null,5,[$APP.Dj,y,$APP.ii,A,$APP.Nk,D,vA,G,wA,H],null);k.appendChild(m);g.appendChild(h);g.appendChild(k);this.__xMetaballRefs=$APP.Hf($APP.kc([e,new $APP.R(null,3,[$APP.Jh,g,$APP.hi,k,$APP.Ti,m],null)]))}g=$APP.l(this,"__xMetaballBlobs");if($APP.n(g)){h=g.length;for(k=0;;)if(k<h)m=g[k],$APP.n(m.parentNode)&&m.parentNode.removeChild(m),k+=1;else break;this.__xMetaballBlobs=[];this.__xMetaballPos=[]}h=$APP.N(b);g=$APP.I(h,hA);m=$APP.I(h,iA);h=$APP.I(h,$APP.wk);k=$APP.N($APP.l(this,
|
|
18
|
+
"__xMetaballRefs"));k=$APP.I(k,$APP.hi);m=Vz(m,g);e=[];c=[];for(d=0;;)if(d<g)q=document.createElement("div"),v=m[d],q.className="blob",q.style.width=""+$APP.T.g(v)+"px",q.style.height=""+$APP.T.g(v)+"px",q.style.background=h[d],k.appendChild(q),e.push(q),c.push({x:0,y:0}),d+=1;else break;this.__xMetaballBlobs=e;this.__xMetaballPos=c;this.__xMetaballSpeeds=Uz(g);mA(this,b);this.setAttribute("aria-hidden","true");this.setAttribute("role","presentation");qA(this);pA(this);oA(this);return null};a.prototype.disconnectedCallback=
|
|
19
|
+
function(){var b=$APP.l(this,"__xMetaballRaf");$APP.n(b)&&(cancelAnimationFrame(b),this.__xMetaballRaf=null);qA(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){if($APP.O(c,d)&&(this.__xMetaballModel=b=lA(this),$APP.n($APP.l(this,"__xMetaballRefs")))){d=$APP.N(b);c=$APP.I(d,hA);var e=$APP.I(d,iA);d=$APP.I(d,$APP.wk);var g=$APP.N($APP.l(this,"__xMetaballRefs")),h=$APP.I(g,$APP.hi);g=$APP.l(this,"__xMetaballBlobs");var k=$APP.l(this,"__xMetaballPos"),m=g.length;e=Vz(e,c);for(var p=
|
|
20
|
+
m;;)if(p<c){var q=document.createElement("div");q.className="blob";h.appendChild(q);g.push(q);k.push({x:0,y:0});p+=1}else break;for(h=m;;)if(h>c)m=g.pop(),k.pop(),$APP.n(m.parentNode)&&m.parentNode.removeChild(m),--h;else break;for(k=0;;)if(k<c)h=g[k],m=e[k],h.style.width=""+$APP.T.g(m)+"px",h.style.height=""+$APP.T.g(m)+"px",h.style.background=d[k],k+=1;else break;this.__xMetaballSpeeds=Uz(c);g=$APP.N(b);h=$APP.I(g,$APP.nh);e=$APP.I(g,$APP.fk);c=$APP.I(g,jA);d=$APP.I(g,gA);g=$APP.I(g,kA);k=$APP.l(this,
|
|
21
|
+
"__xMetaballRefs");m=$APP.ii.g(k);$APP.n(m)&&m.setAttribute("stdDeviation",""+$APP.T.g(h));h=$APP.Nk.g(k);$APP.n(h)&&h.setAttribute("values",e);e=vA.g(k);$APP.n(e)&&e.setAttribute("baseFrequency",""+$APP.T.g(.01*d));d=wA.g(k);$APP.n(d)&&d.setAttribute("scale",$APP.n(c)?""+$APP.T.g(g):"0");return mA(this,b)}return null};rA(a.prototype);return a},yA=function(){$APP.n(customElements.get("x-metaball-cursor"))||customElements.define("x-metaball-cursor",xA());return null},aA=new $APP.M(null,"noise-scale-raw",
|
|
22
|
+
"noise-scale-raw",123215597),Yz=new $APP.M(null,"noise-intensity-raw","noise-intensity-raw",-116633534),jA=new $APP.M(null,"noise?","noise?",-38350370),iA=new $APP.M(null,"blob-size","blob-size",-1862159046),gA=new $APP.M(null,"noise-scale","noise-scale",-2033475279),bA=new $APP.M(null,"noise-attr","noise-attr",-1534959409),$z=new $APP.M(null,"palette-raw","palette-raw",-1398782582),wA=new $APP.M(null,"disp-el","disp-el",-726061474),eA=new $APP.M(null,"palette","palette",-456203511),cA=new $APP.M(null,
|
|
23
|
+
"blob-count-raw","blob-count-raw",-1850938603),vA=new $APP.M(null,"turb-el","turb-el",-1332591596),dA=new $APP.M(null,"noise-speed-raw","noise-speed-raw",1761342974),fA=new $APP.M(null,"noise-speed","noise-speed",866692139),Xz=new $APP.M(null,"blur-raw","blur-raw",-2048416671),hA=new $APP.M(null,"blob-count","blob-count",-248711053),kA=new $APP.M(null,"noise-intensity","noise-intensity",747731519),Zz=new $APP.M(null,"blob-size-raw","blob-size-raw",530207878);var sA="blob-count blob-size color noise noise-scale noise-speed noise-intensity blur threshold palette".split(" ");
|
|
24
|
+
$APP.mf([$APP.Ci,new $APP.M(null,"blobSize","blobSize",-64083896),new $APP.M(null,"noiseIntensity","noiseIntensity",-792053623),eA,new $APP.M(null,"noiseScale","noiseScale",2003002730),new $APP.M(null,"noise","noise",-994696820),$APP.fk,$APP.nh,new $APP.M(null,"noiseSpeed","noiseSpeed",-959403627),new $APP.M(null,"blobCount","blobCount",-1279691625)],[new $APP.R(null,1,[$APP.Z,$APP.Y],null),new $APP.R(null,1,[$APP.Z,$APP.W],null),new $APP.R(null,1,[$APP.Z,$APP.W],null),new $APP.R(null,1,[$APP.Z,$APP.Y],
|
|
25
|
+
null),new $APP.R(null,1,[$APP.Z,$APP.W],null),new $APP.R(null,1,[$APP.Z,$APP.Ni],null),new $APP.R(null,1,[$APP.Z,$APP.Y],null),new $APP.R(null,1,[$APP.Z,$APP.W],null),new $APP.R(null,1,[$APP.Z,$APP.W],null),new $APP.R(null,1,[$APP.Z,$APP.W],null)]);
|
|
26
|
+
var Sz=new $APP.R(null,5,["rainbow",new $APP.Q(null,5,5,$APP.fe,["#ef4444","#f59e0b","#22c55e","#3b82f6","#a855f7"],null),"ocean",new $APP.Q(null,5,5,$APP.fe,["#06b6d4","#0ea5e9","#6366f1","#8b5cf6","#0d9488"],null),"sunset",new $APP.Q(null,5,5,$APP.fe,["#ef4444","#f97316","#eab308","#ec4899","#f43f5e"],null),"neon",new $APP.Q(null,5,5,$APP.fe,["#22d3ee","#a78bfa","#f472b6","#34d399","#facc15"],null),"ember",new $APP.Q(null,5,5,$APP.fe,["#dc2626","#ea580c","#d97706","#b91c1c","#f59e0b"],null)],null);var tA=[0],uA=":host{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:var("+$APP.T.g("--x-metaball-cursor-z-index")+",9999);}[part\x3dviewport]{position:absolute;inset:var("+$APP.T.g("--x-metaball-cursor-inset")+",0);pointer-events:none;opacity:var("+$APP.T.g("--x-metaball-cursor-opacity")+",1);mix-blend-mode:var("+$APP.T.g("--x-metaball-cursor-blend-mode")+",normal);}.blob{position:absolute;border-radius:50%;will-change:transform;pointer-events:none;top:0;left:0;background:var("+
|
|
27
|
+
$APP.T.g("--x-metaball-cursor-color")+",#6366f1);}@media(prefers-reduced-motion:reduce){.blob{transition:none!important;}}",nA=function nA(a){if($APP.n(a.isConnected)){var c=$APP.l(a,"__xMetaballMouse"),d=$APP.l(a,"__xMetaballBlobs"),e=$APP.l(a,"__xMetaballPos"),g=$APP.l(a,"__xMetaballSpeeds"),h=$APP.l(c,"x");c=$APP.l(c,"y");for(var k=$APP.l(a,"__xMetaballModel"),m=d.length,p=0;;)if(p<m){var q=e[p],v=g[p],x=Wz($APP.l(q,"x"),h,v);v=Wz($APP.l(q,"y"),c,v);var y=d[p];q.x=x;q.y=v;y.style.transform="translate("+
|
|
28
|
+
$APP.T.g(x)+"px,"+$APP.T.g(v)+"px) translate(-50%,-50%)";p+=1}else break;$APP.n(jA.g(k))&&(d=$APP.l(a,"__xMetaballSeed")+fA.g(k),e=$APP.l(a,"__xMetaballRefs"),a.__xMetaballSeed=d,e=vA.g(e),$APP.n(e)&&e.setAttribute("seed",""+$APP.T.g(Math.floor(d))));$APP.ma(a,"__xMetaballRaf",requestAnimationFrame(function(){return nA.g?nA.g(a):nA.call(null,a)}))}return null};$APP.ja("baredom.exports.x_metaball_cursor.init",yA);export const init=yA;
|
package/dist/x-modal.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
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");
|
|
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.n(d)?"true":"false");a.setAttribute("data-size",$APP.
|
|
10
|
-
g.shiftKey;$APP.n($APP.n(p)?$APP.C.h(k,m):p)?(g.preventDefault(),h.focus()):$APP.
|
|
11
|
-
var e=$APP.l(b,"backdrop");b=$APP.l(b,"keydown");$APP.n(e)&&d.removeEventListener("click",e);$APP.n(b)&&c.removeEventListener("keydown",b)}a.__xModalHandlers=null},
|
|
12
|
-
this.setAttribute("size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Modal"},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"show",{value:function(){return
|
|
13
|
-
configurable:!0,writable:!0});Object.defineProperty(a,"toggle",{value:function(){$APP.n(this.hasAttribute("open"))?
|
|
14
|
-
function(b,c,d){$APP.
|
|
2
|
+
var vN=function(a){var b=$APP.l(a,"__xModalRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),k=document.createElement("div"),m=document.createElement("slot"),p=document.createElement("div"),q=document.createElement("slot");c.textContent=":host{display:contents;color-scheme:light dark;--x-modal-bg:Canvas;--x-modal-fg:CanvasText;--x-modal-backdrop:rgb(0 0 0/0.45);--x-modal-shadow:0 20px 60px rgb(0 0 0/0.25);--x-modal-radius:0.75rem;--x-modal-width-sm:22rem;--x-modal-width-md:32rem;--x-modal-width-lg:44rem;--x-modal-width-xl:60rem;--x-modal-max-height:90vh;--x-modal-header-padding:1rem 1.25rem;--x-modal-body-padding:1rem 1.25rem;--x-modal-footer-padding:0.75rem 1.25rem;--x-modal-border:color-mix(in srgb,currentColor 12%,transparent);--x-modal-duration:180ms;--x-modal-easing:ease;--x-modal-z:1000;}[part\x3dbackdrop]{position:fixed;inset:0;background:var(--x-modal-backdrop);z-index:var(--x-modal-z);opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--x-modal-duration) var(--x-modal-easing),visibility 0s var(--x-modal-easing) var(--x-modal-duration);}:host([data-open\x3dtrue]) [part\x3dbackdrop]{opacity:1;visibility:visible;pointer-events:auto;transition:opacity var(--x-modal-duration) var(--x-modal-easing),visibility 0s;}[part\x3ddialog]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(0.96);opacity:0;visibility:hidden;pointer-events:none;background:var(--x-modal-bg);color:var(--x-modal-fg);box-shadow:var(--x-modal-shadow);border-radius:var(--x-modal-radius);display:flex;flex-direction:column;overflow:hidden;z-index:calc(var(--x-modal-z) + 1);max-height:var(--x-modal-max-height);transition:opacity var(--x-modal-duration) var(--x-modal-easing),transform var(--x-modal-duration) var(--x-modal-easing),visibility 0s var(--x-modal-easing) var(--x-modal-duration);}:host([data-size\x3dsm]) [part\x3ddialog]{width:var(--x-modal-width-sm);}:host([data-size\x3dmd]) [part\x3ddialog]{width:var(--x-modal-width-md);}:host([data-size\x3dlg]) [part\x3ddialog]{width:var(--x-modal-width-lg);}:host([data-size\x3dxl]) [part\x3ddialog]{width:var(--x-modal-width-xl);}:host([data-size\x3dfull]) [part\x3ddialog]{inset:0;top:0;left:0;width:100vw;height:100dvh;border-radius:0;max-width:100vw;max-height:100dvh;transform:scale(0.98);}:host([data-open\x3dtrue]) [part\x3ddialog]{opacity:1;transform:translate(-50%,-50%) scale(1);visibility:visible;pointer-events:auto;transition:opacity var(--x-modal-duration) var(--x-modal-easing),transform var(--x-modal-duration) var(--x-modal-easing),visibility 0s;}:host([data-open\x3dtrue][data-size\x3dfull]) [part\x3ddialog]{transform:scale(1);}[part\x3ddialog]:focus{outline:none;}[part\x3dheader]{padding:var(--x-modal-header-padding);border-bottom:1px solid var(--x-modal-border);flex-shrink:0;}[part\x3dbody]{padding:var(--x-modal-body-padding);overflow-y:auto;flex:1;}[part\x3dfooter]{padding:var(--x-modal-footer-padding);border-top:1px solid var(--x-modal-border);flex-shrink:0;}@media (prefers-reduced-motion:reduce){[part\x3ddialog],[part\x3dbackdrop]{transition:none;}}";
|
|
3
|
+
d.setAttribute("part","backdrop");e.setAttribute("part","dialog");e.setAttribute("role","dialog");e.setAttribute("aria-modal","true");g.setAttribute("part","header");h.setAttribute("name","header");k.setAttribute("part","body");p.setAttribute("part","footer");q.setAttribute("name","footer");g.appendChild(h);k.appendChild(m);p.appendChild(q);e.appendChild(g);e.appendChild(k);e.appendChild(p);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xModalRefs={root:b,backdrop:d,dialog:e,header:g,body:k,
|
|
4
|
+
footer:p};return $APP.l(a,"__xModalRefs")},wN=function(a,b,c){a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},xN=function(a){function b(d){var e=window.getComputedStyle(d);return $APP.O("none",e.display)&&$APP.O("hidden",e.visibility)&&d.offsetWidth>0&&d.offsetHeight>0}var c=$APP.Rd(b,$APP.kc($APP.l(a,"dialog").querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])")));
|
|
5
|
+
a=$APP.Pd(function(d){return $APP.Rd(b,$APP.Pd(function(e){var g=$APP.kc(e.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"));return $APP.n(e.matches("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"))?$APP.dd(e,g):g},$APP.kc([$APP.lc(d.assignedElements({flatten:!0}))])))},$APP.kc([$APP.kc($APP.l(a,"root").querySelectorAll("slot"))]));
|
|
6
|
+
return $APP.ke($APP.Nd.h(c,a))},yN=function(a){var b=$APP.l(a,"__xModalRefs");b=$APP.n(b)?$APP.l(b,"dialog"):null;var c=$APP.l(a,"__xModalRestore"),d=$APP.l(a,"__xModalDialogTab")===!0;a.__xModalTabbables=null;a.__xModalRestore=null;$APP.n($APP.n(b)?d:b)&&(b.removeAttribute("tabindex"),a.__xModalDialogTab=!1);$APP.n($APP.n(c)?c.isConnected:c)&&c.focus()},zN=function(a,b){wN(a,"x-modal-dismiss",{reason:b});a.removeAttribute("open");return null},AN=function(a){$APP.n(a.hasAttribute("open"))||a.setAttribute("open",
|
|
7
|
+
"");return null},BN=function(a){a.removeAttribute("open");return null},CN=function(a,b){$APP.O($APP.l(a,"__xModalPrevOpen"),b)&&(a.__xModalPrevOpen=b,wN(a,"x-modal-toggle",{open:b}),$APP.n(b)?setTimeout(function(){var c=$APP.l(a,"__xModalRefs"),d=$APP.n(c)?$APP.l(c,"dialog"):null;c=$APP.n(c)?xN(c):null;a.__xModalRestore=document.activeElement;var e=$APP.n(c)?$APP.Sg(c):null;a.__xModalTabbables=e;$APP.u(c)?$APP.w(c).focus():$APP.n(d)&&($APP.n(d.hasAttribute("tabindex"))||(d.setAttribute("tabindex",
|
|
8
|
+
"-1"),a.__xModalDialogTab=!0),d.focus());return null},0):yN(a))},EN=function(a){var b=vN(a);b=$APP.l(b,"dialog");var c=new $APP.R(null,3,[$APP.Ih,a.hasAttribute("open"),$APP.hk,a.getAttribute("size"),$APP.sh,a.getAttribute("label")],null);var d=$APP.N(c),e=$APP.I(d,$APP.Ih);c=$APP.I(d,$APP.hk);d=$APP.I(d,$APP.sh);e=$APP.J(e);c=typeof c==="string"&&$APP.K(DN,c)?c:"md";d=typeof d==="string"&&$APP.O(d,"")?d:"Modal";c=new $APP.R(null,3,[$APP.Ik,e,$APP.Wg,c,$APP.U,d],null);d=$APP.Ik.g(c);a.setAttribute("data-open",
|
|
9
|
+
$APP.n(d)?"true":"false");a.setAttribute("data-size",$APP.Wg.g(c));b.setAttribute("aria-label",$APP.U.g(c));CN(a,d)},FN=function(a){function b(g){var h=g.key;if($APP.C.h(h,"Escape"))g.preventDefault(),zN(a,"escape");else if($APP.C.h(h,"Tab")){h=$APP.l(a,"__xModalTabbables");h=$APP.n(h)?$APP.ke($APP.kc(h)):$APP.Td;var k=$APP.l(a,"__xModalRefs");k=$APP.n(k)?$APP.l(k,"dialog"):null;if($APP.wc(h))g.preventDefault(),$APP.n(k)&&k.focus();else{k=document.activeElement;var m=$APP.w(h);h=$APP.nc(h);var p=
|
|
10
|
+
g.shiftKey;$APP.n($APP.n(p)?$APP.C.h(k,m):p)?(g.preventDefault(),h.focus()):$APP.r(p)&&$APP.C.h(k,h)&&(g.preventDefault(),m.focus())}}return null}function c(){return zN(a,"backdrop")}var d=vN(a),e=$APP.l(d,"dialog");$APP.l(d,"backdrop").addEventListener("click",c);e.addEventListener("keydown",b);$APP.ma(a,"__xModalHandlers",{backdrop:c,keydown:b})},GN=function(a){var b=$APP.l(a,"__xModalHandlers"),c=$APP.l(a,"__xModalRefs");if($APP.n($APP.n(b)?c:b)){var d=$APP.l(c,"backdrop");c=$APP.l(c,"dialog");
|
|
11
|
+
var e=$APP.l(b,"backdrop");b=$APP.l(b,"keydown");$APP.n(e)&&d.removeEventListener("click",e);$APP.n(b)&&c.removeEventListener("keydown",b)}a.__xModalHandlers=null},HN=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?AN(this):BN(this)},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?b:"md"},set:function(b){return b==null?this.removeAttribute("size"):
|
|
12
|
+
this.setAttribute("size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Modal"},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"show",{value:function(){return AN(this)},enumerable:!0,configurable:!0,writable:!0});Object.defineProperty(a,"hide",{value:function(){return BN(this)},enumerable:!0,
|
|
13
|
+
configurable:!0,writable:!0});Object.defineProperty(a,"toggle",{value:function(){$APP.n(this.hasAttribute("open"))?BN(this):AN(this);return null},enumerable:!0,configurable:!0,writable:!0})},JN=function(){if(!$APP.n(customElements.get("x-modal"))){var a=class extends HTMLElement{};a.observedAttributes=IN;a.prototype.connectedCallback=function(){vN(this);GN(this);FN(this);EN(this);return null};a.prototype.disconnectedCallback=function(){GN(this);yN(this);return null};a.prototype.attributeChangedCallback=
|
|
14
|
+
function(b,c,d){$APP.O(c,d)&&EN(this);return null};HN(a.prototype);customElements.define("x-modal",a)}return null},KN=function(){return JN()};var DN=new $APP.S(null,new $APP.R(null,5,["md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),IN=["open","size","label"];$APP.Ed(["x-modal-toggle",new $APP.R(null,2,[$APP.rk,!1,$APP.V,new $APP.R(null,1,[$APP.pk,$APP.Ni],null)],null),"x-modal-dismiss",new $APP.R(null,2,[$APP.rk,!1,$APP.V,new $APP.R(null,1,[$APP.Rh,$APP.Y],null)],null)]);$APP.ja("baredom.exports.x_modal.init",KN);export const init=KN;
|