@vanelsas/baredom 3.10.0 → 3.12.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 +48 -0
- package/custom-elements.json +11052 -10264
- package/dist/baredom.d.ts +93 -93
- package/dist/base.js +598 -598
- package/dist/integrity.json +111 -111
- package/dist/x-alert.js +16 -16
- package/dist/x-avatar-group.js +9 -9
- package/dist/x-avatar.js +14 -14
- package/dist/x-badge.js +8 -8
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +13 -13
- package/dist/x-button.js +1 -1
- package/dist/x-calendar.js +34 -34
- package/dist/x-cancel-dialogue.js +12 -12
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.js +31 -31
- package/dist/x-chart.js +44 -44
- package/dist/x-checkbox.js +1 -1
- package/dist/x-chip.js +1 -1
- package/dist/x-code.js +27 -27
- package/dist/x-collapse.js +8 -8
- package/dist/x-color-picker.js +34 -34
- package/dist/x-combobox.js +31 -31
- package/dist/x-command-palette.js +27 -27
- package/dist/x-confetti.js +23 -23
- package/dist/x-container.js +4 -4
- package/dist/x-context-menu.js +19 -19
- package/dist/x-copy.js +1 -1
- package/dist/x-currency-field.js +21 -21
- package/dist/x-date-picker.js +34 -34
- package/dist/x-divider.js +9 -9
- package/dist/x-drag-panel.js +31 -31
- package/dist/x-drawer.js +9 -9
- package/dist/x-drop-zone.js +11 -11
- package/dist/x-dropdown.js +12 -12
- package/dist/x-fieldset.js +5 -5
- package/dist/x-file-download.d.ts +4 -0
- package/dist/x-file-download.js +14 -6
- package/dist/x-file-upload.js +23 -23
- package/dist/x-floating-panel.js +21 -21
- package/dist/x-form-field.js +14 -14
- package/dist/x-form.js +10 -10
- package/dist/x-gaussian-blur.js +11 -11
- package/dist/x-grid.js +6 -6
- package/dist/x-i18n-provider.js +7 -7
- package/dist/x-i18n.js +4 -4
- package/dist/x-icon.js +7 -7
- package/dist/x-image.js +16 -16
- package/dist/x-kbd.js +11 -11
- package/dist/x-kinetic-canvas.js +24 -24
- package/dist/x-kinetic-font.js +22 -22
- package/dist/x-kinetic-typography.js +29 -29
- package/dist/x-liquid-dock.js +29 -29
- package/dist/x-liquid-fill.js +38 -38
- package/dist/x-liquid-glass.js +25 -25
- package/dist/x-menu-item.js +8 -8
- package/dist/x-menu.js +8 -8
- package/dist/x-metaball-cursor.js +18 -18
- package/dist/x-modal.js +10 -10
- package/dist/x-morph-stack.js +37 -37
- package/dist/x-multi-combobox.js +37 -37
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +21 -21
- package/dist/x-notification-center.js +9 -9
- package/dist/x-organic-divider.js +15 -15
- package/dist/x-organic-progress.js +32 -32
- package/dist/x-organic-shape.js +7 -7
- package/dist/x-otp-input.js +20 -20
- package/dist/x-pagination.js +11 -11
- package/dist/x-particle-button.d.ts +1 -1
- package/dist/x-particle-button.js +39 -39
- package/dist/x-popover.js +24 -24
- package/dist/x-progress-circle.js +6 -6
- package/dist/x-progress.js +6 -6
- package/dist/x-proximity-list.js +20 -20
- package/dist/x-radio.js +12 -12
- package/dist/x-range-slider.js +27 -27
- package/dist/x-rating.js +22 -22
- package/dist/x-ripple-effect.js +8 -8
- package/dist/x-scroll-parallax.js +17 -17
- package/dist/x-scroll-stack.js +15 -15
- package/dist/x-scroll-story.js +30 -30
- package/dist/x-scroll-timeline.js +45 -45
- package/dist/x-scroll.js +34 -34
- package/dist/x-search-field.js +1 -1
- package/dist/x-select.js +1 -1
- package/dist/x-sidebar.js +15 -15
- package/dist/x-skeleton-group.js +12 -12
- package/dist/x-skeleton.js +1 -1
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +16 -16
- package/dist/x-spacer.js +4 -4
- package/dist/x-spinner.js +4 -4
- package/dist/x-splash.js +11 -11
- package/dist/x-split-pane.js +14 -14
- package/dist/x-spotlight-card.js +11 -11
- package/dist/x-stat.js +8 -8
- package/dist/x-stepper.js +13 -13
- package/dist/x-switch.js +11 -11
- package/dist/x-tab.js +6 -6
- package/dist/x-table-cell.js +17 -17
- package/dist/x-table-row.js +8 -8
- package/dist/x-table.js +12 -12
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-theme.js +24 -24
- package/dist/x-timeline-item.js +18 -18
- package/dist/x-timeline.js +8 -8
- package/dist/x-toast.js +20 -20
- package/dist/x-toaster.js +6 -6
- package/dist/x-tooltip.js +11 -11
- package/dist/x-trace-history.js +112 -112
- package/dist/x-typography.js +5 -5
- package/dist/x-welcome-tour.js +57 -57
- package/package.json +1 -1
package/dist/x-collapse.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
2
|
var a$=function(){var a=window.matchMedia;return $APP.n(a)?window.matchMedia("(prefers-reduced-motion: reduce)").matches:a},c$=function(a){a=b$.i($APP.l(a,"__xCollapseModel"));return $APP.n(a)?a:300},d$=function(a){a.style.height="";return a.style.transition=""},e$=function(a,b,c,d){a.style.height=b;a.offsetHeight;a.style.transition="height "+$APP.P.i(d)+"ms ease";a.style.height=c;var e=setTimeout(function(){return d$(a)},d+80);return a.addEventListener("transitionend",function h(){clearTimeout(e);
|
|
3
|
-
d$(a);return a.removeEventListener("transitionend",h)})},h$=function(a){if($APP.n($APP.l(a,"__xCollapseRefs"))){var b=new $APP.M(null,4,[$APP.
|
|
4
|
-
c)):300;b=new $APP.M(null,4,[$APP.
|
|
5
|
-
a=null):a=null;return a}return null},i$=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;var c=$APP.p(a.hasAttribute("open"));return $APP.
|
|
6
|
-
f=i$(a,"keyboard")):f=null;return f},e={};b.addEventListener("click",c);b.addEventListener("keydown",d);e.click=c;e.keydown=d;$APP.Q(a,"__xCollapseHandlers",e)}},j$=function(a){var b=$APP.l(a,"__xCollapseRefs");if($APP.n(b)){var c=$APP.l(a,"__xCollapseHandlers");if($APP.n(c))return b=$APP.l(b,"trigger"),b.removeEventListener("click",$APP.l(c,"click")),b.removeEventListener("keydown",$APP.l(c,"keydown")),$APP.Q(a,"__xCollapseHandlers",null)}return null},
|
|
3
|
+
d$(a);return a.removeEventListener("transitionend",h)})},h$=function(a){if($APP.n($APP.l(a,"__xCollapseRefs"))){var b=new $APP.M(null,4,[$APP.Oq,a.hasAttribute("open"),$APP.Qj,a.hasAttribute("disabled"),f$,a.getAttribute("header"),g$,a.getAttribute("duration-ms")],null);var c=$APP.G(b);b=$APP.C(c,$APP.Oq);var d=$APP.C(c,$APP.Qj),e=$APP.C(c,f$);c=$APP.C(c,g$);b=$APP.D(b);d=$APP.D(d);e=$APP.n(e)?e:"";$APP.n(c)?(c=parseInt(c,10),c=$APP.p(isNaN(c))&&c>0?c:null):c=null;c=$APP.n(c)?$APP.Rl.j(0,$APP.Sl.j(2E3,
|
|
4
|
+
c)):300;b=new $APP.M(null,4,[$APP.Bv,b,$APP.Xj,d,$APP.Fr,e,b$,c],null);$APP.I($APP.l(a,"__xCollapseModel"),b)?(e=$APP.l(a,"__xCollapseRefs"),$APP.n(e)?(d=$APP.l(e,"trigger"),e=$APP.l(e,"header-text"),c=$APP.G(b),c=$APP.C(c,$APP.Fr),e.textContent=c,c=$APP.G(b),e=$APP.C(c,$APP.Bv),c=$APP.C(c,$APP.Xj),$APP.S(d,"aria-expanded",$APP.n(e)?"true":"false"),$APP.n(c)?($APP.S(d,"disabled",""),$APP.S(d,"aria-disabled","true")):($APP.U(d,"disabled"),$APP.U(d,"aria-disabled")),a=$APP.Q(a,"__xCollapseModel",b)):
|
|
5
|
+
a=null):a=null;return a}return null},i$=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;var c=$APP.p(a.hasAttribute("open"));return $APP.hj(a,"x-collapse-toggle",{open:c,source:b})?(c?$APP.S(a,"open",""):$APP.U(a,"open"),$APP.fj(a,"x-collapse-change",{open:c})):null},lxa=function(a){var b=$APP.l(a,"__xCollapseRefs");if($APP.n(b)){b=$APP.l(b,"trigger");var c=function(){return i$(a,"pointer")},d=function(f){var h=f.key;$APP.z.j(h," ")||$APP.z.j(h,"Enter")||$APP.z.j(h,"Space")?(f.preventDefault(),
|
|
6
|
+
f=i$(a,"keyboard")):f=null;return f},e={};b.addEventListener("click",c);b.addEventListener("keydown",d);e.click=c;e.keydown=d;$APP.Q(a,"__xCollapseHandlers",e)}},j$=function(a){var b=$APP.l(a,"__xCollapseRefs");if($APP.n(b)){var c=$APP.l(a,"__xCollapseHandlers");if($APP.n(c))return b=$APP.l(b,"trigger"),b.removeEventListener("click",$APP.l(c,"click")),b.removeEventListener("keydown",$APP.l(c,"keydown")),$APP.Q(a,"__xCollapseHandlers",null)}return null},mxa=function(a){if(!$APP.n($APP.l(a,"__xCollapseRefs"))){var b=
|
|
7
7
|
a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("button"),f=document.createElement("span"),h=document.createElement("span"),k=document.createElement("div"),m=document.createElement("div"),r=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-collapse-border-radius:var(--x-radius-md, 8px);--x-collapse-border:1px solid var(--x-color-border,#e2e8f0);--x-collapse-bg:var(--x-color-surface, #ffffff);--x-collapse-trigger-bg:var(--x-color-surface-hover, #f8fafc);--x-collapse-trigger-bg-hover:var(--x-color-surface-active,#f1f5f9);--x-collapse-trigger-color:var(--x-color-text, #0f172a);--x-collapse-trigger-padding:0.75rem 1rem;--x-collapse-content-padding:1rem;--x-collapse-font-size:0.9375rem;--x-collapse-font-weight:600;--x-collapse-chevron-color:var(--x-color-text-muted, #64748b);--x-collapse-focus-ring:var(--x-color-focus-ring, #60a5fa);}@media (prefers-color-scheme:dark){:host{--x-collapse-border:1px solid var(--x-color-border,#334155);--x-collapse-bg:var(--x-color-surface,#1e293b);--x-collapse-trigger-bg:var(--x-color-surface-hover,#0f172a);--x-collapse-trigger-bg-hover:var(--x-color-surface-active,#1e293b);--x-collapse-trigger-color:var(--x-color-text,#e2e8f0);--x-collapse-chevron-color:var(--x-color-text-muted, #94a3b8);--x-collapse-focus-ring:var(--x-color-focus-ring, #93c5fd);}}[part\x3dcontainer]{box-sizing:border-box;border:var(--x-collapse-border);border-radius:var(--x-collapse-border-radius);background:var(--x-collapse-bg);overflow:hidden;}[part\x3dtrigger]{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--x-collapse-trigger-padding);background:var(--x-collapse-trigger-bg);color:var(--x-collapse-trigger-color);font-size:var(--x-collapse-font-size);font-weight:var(--x-collapse-font-weight);cursor:pointer;user-select:none;}[part\x3dtrigger][disabled]{cursor:default;opacity:0.55;}[part\x3dtrigger]:hover:not([disabled]){background:var(--x-collapse-trigger-bg-hover);}[part\x3dtrigger]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--x-collapse-focus-ring);}[part\x3dheader-text]{flex:1;text-align:start;}[part\x3dchevron]{display:inline-block;margin-inline-start:0.5rem;color:var(--x-collapse-chevron-color);transition:transform 200ms ease;flex-shrink:0;}:host([open]) [part\x3dchevron]{transform:rotate(180deg);}[part\x3dcontent]{overflow:hidden;height:0;}:host([open]) [part\x3dcontent]{height:auto;}[part\x3dcontent-inner]{padding:var(--x-collapse-content-padding);}@media (prefers-reduced-motion:reduce){[part\x3dcontent]{transition:none !important;}[part\x3dchevron]{transition:none !important;}}";
|
|
8
8
|
$APP.S(d,"part","container");$APP.S(e,"part","trigger");$APP.S(e,"type","button");$APP.S(e,"id","trigger");$APP.S(e,"aria-controls","panel");$APP.S(f,"part","header-text");$APP.S(h,"part","chevron");$APP.S(h,"aria-hidden","true");$APP.S(k,"part","content");$APP.S(k,"id","panel");$APP.S(k,"role","region");$APP.S(k,"aria-labelledby","trigger");$APP.S(m,"part","content-inner");$APP.S(r,"name","content");h.textContent="▼";e.appendChild(f);e.appendChild(h);m.appendChild(r);k.appendChild(m);d.appendChild(e);
|
|
9
|
-
d.appendChild(k);b.appendChild(c);b.appendChild(d);c={};c.root=b;c.trigger=e;c["header-text"]=f;c.content=k;$APP.Q(a,"__xCollapseRefs",c)}j$(a);
|
|
10
|
-
(b.style.height="0px",a=b.style.transition=""):(c=""+$APP.P.i(b.offsetHeight)+"px",a=e$(b,c,"0px",c$(a))):a=null,a):null},
|
|
11
|
-
-2138819526),b$=new $APP.F(null,"duration-ms","duration-ms",1993555055);var
|
|
12
|
-
$APP.
|
|
9
|
+
d.appendChild(k);b.appendChild(c);b.appendChild(d);c={};c.root=b;c.trigger=e;c["header-text"]=f;c.content=k;$APP.Q(a,"__xCollapseRefs",c)}j$(a);lxa(a);return h$(a)},nxa=function(a){return j$(a)},oxa=function(a,b,c,d){return $APP.I(c,d)&&(h$(a),$APP.z.j(b,"open")&&(b=$APP.l(a,"__xCollapseRefs"),$APP.n(b)))?(b=$APP.l(b,"content"),c=a.hasAttribute("open"),$APP.n(b)?$APP.n(c)?$APP.n(a$())?a=d$(b):(b.style.height="0px",b.offsetHeight,c=""+$APP.P.i(b.scrollHeight)+"px",a=e$(b,"0px",c,c$(a))):$APP.n(a$())?
|
|
10
|
+
(b.style.height="0px",a=b.style.transition=""):(c=""+$APP.P.i(b.offsetHeight)+"px",a=e$(b,c,"0px",c$(a))):a=null,a):null},qxa=function(a){$APP.uj(a,pxa);return Object.defineProperty(a,"toggle",{value:function(){return i$(this,"programmatic")},writable:!0,configurable:!0})},k$=function(){return $APP.si("x-collapse",new $APP.M(null,5,[$APP.ji,rxa,$APP.hi,mxa,$APP.ei,nxa,$APP.di,oxa,$APP.ii,qxa],null))},f$=new $APP.F(null,"header-raw","header-raw",41484),g$=new $APP.F(null,"duration-ms-raw","duration-ms-raw",
|
|
11
|
+
-2138819526),b$=new $APP.F(null,"duration-ms","duration-ms",1993555055);var rxa=["open","disabled","header","duration-ms"],pxa=new $APP.M(null,4,[$APP.Wu,new $APP.M(null,2,[$APP.N,$APP.sj,$APP.W,"open"],null),$APP.un,new $APP.M(null,2,[$APP.N,$APP.sj,$APP.W,"disabled"],null),$APP.Fr,new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"header"],null),new $APP.F(null,"durationMs","durationMs",1439579766),new $APP.M(null,3,[$APP.N,$APP.Y,$APP.W,"duration-ms",$APP.tj,300],null)],null);
|
|
12
|
+
$APP.je(["x-collapse-toggle",new $APP.M(null,2,[$APP.$u,!0,$APP.V,new $APP.M(null,2,[$APP.Wu,$APP.sj,$APP.cu,$APP.X],null)],null),"x-collapse-change",new $APP.M(null,2,[$APP.$u,!1,$APP.V,new $APP.M(null,1,[$APP.Wu,$APP.sj],null)],null)]);$APP.ha("baredom.exports.x_collapse.init",k$);export const init=k$;
|
package/dist/x-color-picker.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var FI=function(a,b){return $APP.
|
|
3
|
-
1)),16),d=parseInt(""+$APP.P.i($APP.
|
|
4
|
-
else return null},
|
|
5
|
-
Math.round(c*255),new $APP.M(null,3,[LI,a,$APP.
|
|
6
|
-
return"#"+$APP.P.i(e(a))+$APP.P.i(e(b))+$APP.P.i(e(c))+$APP.P.i(e(II(d)*255))},XI=function(a,b,c){b=HI(b)/100;c=HI(c)/100;b=c+b*$APP.
|
|
7
|
-
$APP.
|
|
8
|
-
a=$APP.C(b,$APP.
|
|
9
|
-
RI);d=$APP.
|
|
10
|
-
$APP.S(a,"aria-valuemax",d)},gJ=function(a,b,c,d){$APP.S(a,"part",b);$APP.S(a,"type","button");$APP.S(a,"aria-label",c);a.innerHTML=d},hJ=function(a){return
|
|
11
|
-
QI.i(b),f=RI.i(b);b=NI.i(b);return $APP.
|
|
12
|
-
d){if($APP.I($APP.l(a,"__xColorPickerSwatchesCache"),c)){$APP.Q(a,"__xColorPickerSwatchesCache",c);b.innerHTML="";a=$APP.q(c);c=null;for(var e=0,f=0;;)if(f<e){var h=c.C(null,f),k=document.createElement("button");$APP.S(k,"part","swatch");$APP.S(k,"type","button");$APP.S(k,"role","option");$APP.S(k,"aria-label",h);$APP.S(k,"data-color",h);k.style.backgroundColor=h;b.appendChild(k);f+=1}else if(a=$APP.q(a))$APP
|
|
2
|
+
var FI=function(a,b){return $APP.Sl.j($APP.Rl.j(a,0),b)},GI=function(a){return $APP.ud(a,360)},HI=function(a){return FI(a,100)},II=function(a){return FI(a,1)},KI=function(a){var b=typeof a==="string";a=b?$APP.sh(JI,a.trim()):b;return $APP.D(a)},OI=function(a){if(typeof a==="string")if(a=$APP.sh(JI,a.trim()),$APP.n(a))switch($APP.A(a,0,null),a=$APP.A(a,1,null),$APP.w(a)){case 3:var b=parseInt(""+$APP.P.i($APP.zc(a,0))+$APP.P.i($APP.zc(a,0)),16),c=parseInt(""+$APP.P.i($APP.zc(a,1))+$APP.P.i($APP.zc(a,
|
|
3
|
+
1)),16),d=parseInt(""+$APP.P.i($APP.zc(a,2))+$APP.P.i($APP.zc(a,2)),16);return new $APP.M(null,4,[LI,b,$APP.zu,c,MI,d,NI,1],null);case 6:return b=parseInt(a.substring(0,2),16),c=parseInt(a.substring(2,4),16),d=parseInt(a.substring(4,6),16),new $APP.M(null,4,[LI,b,$APP.zu,c,MI,d,NI,1],null);case 8:return b=parseInt(a.substring(0,2),16),c=parseInt(a.substring(2,4),16),d=parseInt(a.substring(4,6),16),new $APP.M(null,4,[LI,b,$APP.zu,c,MI,d,NI,parseInt(a.substring(6,8),16)/255],null);default:return null}else return null;
|
|
4
|
+
else return null},cfa=function(a,b,c){a/=255;b/=255;c/=255;var d=$APP.Rl.B(a,b,$APP.Ec([c])),e=$APP.Sl.B(a,b,$APP.Ec([c])),f=(d+e)/2,h=d-e;return h===0?new $APP.M(null,3,[PI,0,QI,0,RI,f*100],null):new $APP.M(null,3,[PI,(d===a?((b-c)/h+(b<c?6:0))/6:d===b?((c-a)/h+2)/6:((a-b)/h+4)/6)*360,QI,(f>.5?h/(2-d-e):h/(d+e))*100,RI,f*100],null)},SI=function(a,b,c){c=c<0?c+1:c>1?c-1:c;return c<1/6?a+(b-a)*6*c:c<.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a},TI=function(a,b,c){a=GI(a)/360;b=HI(b)/100;c=HI(c)/100;if(b===0)return a=
|
|
5
|
+
Math.round(c*255),new $APP.M(null,3,[LI,a,$APP.zu,a,MI,a],null);b=c<.5?c*(1+b):c+b-c*b;c=2*c-b;return new $APP.M(null,3,[LI,Math.round(SI(c,b,a+1/3)*255),$APP.zu,Math.round(SI(c,b,a)*255),MI,Math.round(SI(c,b,a-1/3)*255)],null)},UI=function(a,b,c){function d(e){e=FI(Math.round(e),255).toString(16);return $APP.w(e)<2?"0"+$APP.P.i(e):e}return"#"+$APP.P.i(d(a))+$APP.P.i(d(b))+$APP.P.i(d(c))},VI=function(a,b,c,d){function e(f){f=FI(Math.round(f),255).toString(16);return $APP.w(f)<2?"0"+$APP.P.i(f):f}
|
|
6
|
+
return"#"+$APP.P.i(e(a))+$APP.P.i(e(b))+$APP.P.i(e(c))+$APP.P.i(e(II(d)*255))},XI=function(a,b,c){b=HI(b)/100;c=HI(c)/100;b=c+b*$APP.Sl.j(c,1-c);return new $APP.M(null,3,[PI,GI(a),QI,(b===0?0:2*(1-c/b))*100,WI,b*100],null)},YI=function(a,b,c){b=HI(b)/100;c=HI(c)/100;b=c*(1-b/2);c=b===0||b===1?0:(c-b)/$APP.Sl.j(b,1-b);return new $APP.M(null,3,[PI,GI(a),QI,c*100,RI,b*100],null)},ZI=function(a,b,c){return 100*(FI(a-b,c)/c)},dfa=function(a){return typeof a==="string"&&KI(a)?(a=OI(a),$APP.n(a)?UI(LI.i(a),
|
|
7
|
+
$APP.zu.i(a),MI.i(a)):null):"#000000"},ffa=function(a){return typeof a==="string"&&$APP.dd(efa,a.trim().toLowerCase())?a.trim().toLowerCase():"inline"},gfa=function(a){return typeof a==="string"&&$APP.Ei(a)?$APP.Gf.m($APP.Ge,$APP.zp.m($APP.ye.i($APP.Ai),$APP.De(KI),$APP.ye.i(function(b){b=OI(b);var c=$APP.G(b);b=$APP.C(c,LI);var d=$APP.C(c,$APP.zu);c=$APP.C(c,MI);return UI(b,d,c)})),$APP.yi(a,/,/)):$APP.Ge},hfa=function(a){var b=$APP.G(a),c=$APP.C(b,$APP.Wu),d=$APP.C(b,$APP.un),e=$APP.C(b,$APP.Ui);
|
|
8
|
+
a=$APP.C(b,$APP.Vj);var f=$APP.C(b,$APP.rj),h=$APP.C(b,$APP.Mm),k=$APP.C(b,$I),m=$APP.C(b,$APP.Z),r=$APP.C(b,aJ);b=dfa(e);var u=function(){var T=OI(e);return $APP.n(T)?T:OI("#000000")}(),x=$APP.G(u);u=$APP.C(x,LI);var y=$APP.C(x,$APP.zu),B=$APP.C(x,MI);x=$APP.C(x,NI);var E=function(){var T=typeof e==="string";if(T){T=e.trim();var R=$APP.sh(JI,T);return $APP.n(R)?8===$APP.w($APP.Hc($APP.sh(JI,T))):R}return T}();x=$APP.n(E)?x:1;E=cfa(u,y,B);var H=$APP.G(E);E=$APP.C(H,PI);var O=$APP.C(H,QI);H=$APP.C(H,
|
|
9
|
+
RI);d=$APP.Ci(d);f=$APP.Ci(f);r=r!=null;c=c!=null;h=ffa(h);return $APP.wg([$APP.fm,bJ,$APP.Vj,$APP.Mm,$I,QI,RI,cJ,PI,$APP.Z,$APP.Bv,dJ,$APP.Xj,NI],[f,r,$APP.Ei(a)?a:null,h,gfa(k),O,H,b,E,$APP.Ei(m)?m:null,$APP.z.j(h,"popover")&&c,r&&x<1?VI(u,y,B,x):b,d,x])},eJ=function(a){var b=$APP.G(a);a=$APP.C(b,$APP.Xj);b=$APP.C(b,$APP.fm);return $APP.p(a)&&$APP.p(b)},fJ=function(a,b,c,d){$APP.S(a,"part",b);$APP.S(a,"role","slider");$APP.S(a,"tabindex","0");$APP.S(a,"aria-label",c);$APP.S(a,"aria-valuemin","0");
|
|
10
|
+
$APP.S(a,"aria-valuemax",d)},gJ=function(a,b,c,d){$APP.S(a,"part",b);$APP.S(a,"type","button");$APP.S(a,"aria-label",c);a.innerHTML=d},hJ=function(a){return hfa($APP.wg([$APP.Wu,$APP.un,$APP.Vj,$APP.Ui,$APP.rj,$APP.Mm,$I,$APP.Z,aJ],[a.getAttribute("open"),a.getAttribute("disabled"),a.getAttribute("name"),a.getAttribute("value"),a.getAttribute("readonly"),a.getAttribute("mode"),a.getAttribute("swatches"),a.getAttribute("label"),a.getAttribute("alpha")]))},iJ=function(a,b){var c=dJ.i(b),d=PI.i(b),e=
|
|
11
|
+
QI.i(b),f=RI.i(b);b=NI.i(b);return $APP.fj(a,"x-color-picker-input",$APP.an(new $APP.M(null,5,[$APP.Ui,c,PI,d,QI,e,RI,f,NI,b],null)))},jJ=function(a,b){var c=dJ.i(b),d=PI.i(b),e=QI.i(b),f=RI.i(b);b=NI.i(b);return $APP.hj(a,"x-color-picker-change",$APP.an(new $APP.M(null,5,[$APP.Ui,c,PI,d,QI,e,RI,f,NI,b],null)))},kJ=function(a,b,c,d,e,f){b=TI(b,c,d);d=$APP.G(b);b=$APP.C(d,LI);c=$APP.C(d,$APP.zu);d=$APP.C(d,MI);e=$APP.n($APP.n(f)?e<1:f)?VI(b,c,d,e):UI(b,c,d);$APP.S(a,"value",e)},ifa=function(a,b,c,
|
|
12
|
+
d){if($APP.I($APP.l(a,"__xColorPickerSwatchesCache"),c)){$APP.Q(a,"__xColorPickerSwatchesCache",c);b.innerHTML="";a=$APP.q(c);c=null;for(var e=0,f=0;;)if(f<e){var h=c.C(null,f),k=document.createElement("button");$APP.S(k,"part","swatch");$APP.S(k,"type","button");$APP.S(k,"role","option");$APP.S(k,"aria-label",h);$APP.S(k,"data-color",h);k.style.backgroundColor=h;b.appendChild(k);f+=1}else if(a=$APP.q(a))$APP.$c(a)?(e=$APP.Fb(a),a=$APP.Gb(a),c=e,e=$APP.w(e)):(c=$APP.t(a),e=document.createElement("button"),
|
|
13
13
|
$APP.S(e,"part","swatch"),$APP.S(e,"type","button"),$APP.S(e,"role","option"),$APP.S(e,"aria-label",c),$APP.S(e,"data-color",c),e.style.backgroundColor=c,b.appendChild(e),a=$APP.v(a),c=null,e=0),f=0;else break}b.querySelectorAll("[part\x3dswatch]").forEach(function(m){return $APP.S(m,"aria-selected",$APP.z.j(m.getAttribute("data-color"),d)?"true":"false")})},lJ=function(a){if($APP.n($APP.l(a,"__xColorPickerRefs"))){var b=hJ(a);if($APP.I($APP.l(a,"__xColorPickerModel"),b)){var c=$APP.l(a,"__xColorPickerRefs");
|
|
14
|
-
if($APP.n(c)){var d=$APP.l(c,"area"),e=$APP.l(c,"hue-strip"),f=$APP.l(c,"alpha-strip"),h=$APP.l(c,"preview-color"),k=$APP.l(c,"trigger-swatch"),m=$APP.l(c,"hex-input");c=$APP.l(c,"swatches");var r=$APP.G(b),u=$APP.C(r,PI);r=$APP.C(r,$APP.
|
|
15
|
-
[$APP.
|
|
14
|
+
if($APP.n(c)){var d=$APP.l(c,"area"),e=$APP.l(c,"hue-strip"),f=$APP.l(c,"alpha-strip"),h=$APP.l(c,"preview-color"),k=$APP.l(c,"trigger-swatch"),m=$APP.l(c,"hex-input");c=$APP.l(c,"swatches");var r=$APP.G(b),u=$APP.C(r,PI);r=$APP.C(r,$APP.Mm);$APP.S(a,"data-mode",r);a.style.setProperty("--_x-cp-hue",""+$APP.P.i(Math.round(u)));r=$APP.G(b);var x=$APP.C(r,PI),y=$APP.C(r,QI),B=$APP.C(r,RI);u=$APP.C(r,NI);r=$APP.C(r,$APP.Z);y=XI(x,y,B);var E=$APP.G(y);y=$APP.C(E,QI);E=$APP.C(E,WI);E=new $APP.M(null,2,
|
|
15
|
+
[$APP.vu,HI(y),$APP.uu,100-HI(E)],null);d.style.setProperty("--_x-cp-area-x",""+$APP.P.i($APP.vu.i(E).toFixed(2))+"%");d.style.setProperty("--_x-cp-area-y",""+$APP.P.i($APP.uu.i(E).toFixed(2))+"%");x="Hue "+$APP.P.i(Math.round(x))+", Saturation "+$APP.P.i(Math.round(y))+"%, Lightness "+$APP.P.i(Math.round(B))+"%";u=u<1?""+$APP.P.i(x)+", Opacity "+$APP.P.i(Math.round(u*100))+"%":x;$APP.S(d,"aria-valuetext",u);$APP.n(r)&&$APP.S(d,"aria-label",r);d=$APP.G(b);d=$APP.C(d,PI);e.style.setProperty("--_x-cp-hue-pos",
|
|
16
16
|
""+$APP.P.i((GI(d)/360*100).toFixed(2))+"%");$APP.S(e,"aria-valuenow",""+$APP.P.i(Math.round(d)));x=$APP.G(b);e=$APP.C(x,PI);d=$APP.C(x,QI);u=$APP.C(x,RI);r=$APP.C(x,NI);x=$APP.C(x,bJ);$APP.n(x)?(f.style.display="",a.style.setProperty("--_x-cp-alpha-color","hsl("+$APP.P.i(Math.round(e))+","+$APP.P.i(Math.round(d))+"%,"+$APP.P.i(Math.round(u))+"%)"),f.style.setProperty("--_x-cp-alpha-pos",""+$APP.P.i((II(r)*100).toFixed(2))+"%"),$APP.S(f,"aria-valuenow",""+$APP.P.i(Math.round(r*100)))):f.style.display=
|
|
17
|
-
"none";x=$APP.G(b);e=$APP.C(x,PI);d=$APP.C(x,QI);u=$APP.C(x,RI);f=$APP.C(x,NI);r=$APP.C(x,cJ);x=$APP.C(x,bJ);$APP.n(x)?(e=TI(e,d,u),u=$APP.G(e),e=$APP.C(u,LI),d=$APP.C(u,$APP.
|
|
18
|
-
m=$APP.C(m,dJ);c=$APP.l(a,"__xColorPickerInternals");$APP.n(c)&&c.setFormValue(m);a=$APP.Q(a,"__xColorPickerModel",b)}else a=null}else a=null;return a}return null},nJ=function(a,b){var c=a.getBoundingClientRect();a=b.clientY;var d=c.top,e=c.height;b=ZI(b.clientX,c.left,c.width);a=ZI(a,d,e);return new $APP.M(null,2,[mJ,HI(b),$APP.
|
|
19
|
-
a.left,a.width);return HI(b)/100},
|
|
20
|
-
RI);kJ(a,f,h,k,NI.i(c),bJ.i(c));iJ(a,hJ(a));return jJ(a,hJ(a))}return null},
|
|
21
|
-
return f?(f=bJ.i(c),$APP.n(f)?$APP.
|
|
22
|
-
return jJ(a,hJ(a))}).catch(function(){return null}):null},
|
|
23
|
-
a}))?null:rJ(a):null},
|
|
24
|
-
b.key)&&$APP.z.j("popover",$APP.
|
|
17
|
+
"none";x=$APP.G(b);e=$APP.C(x,PI);d=$APP.C(x,QI);u=$APP.C(x,RI);f=$APP.C(x,NI);r=$APP.C(x,cJ);x=$APP.C(x,bJ);$APP.n(x)?(e=TI(e,d,u),u=$APP.G(e),e=$APP.C(u,LI),d=$APP.C(u,$APP.zu),u=$APP.C(u,MI),f="rgba("+$APP.P.i(e)+","+$APP.P.i(d)+","+$APP.P.i(u)+","+$APP.P.i(f.toFixed(2))+")"):f=r;h.style.backgroundColor=f;k.style.backgroundColor=f;f=$APP.G(b);h=$APP.C(f,dJ);k=$APP.C(f,$APP.Xj);f=$APP.C(f,$APP.fm);a.shadowRoot.activeElement!==m&&(m.value=h);m.disabled=$APP.n(k)?k:f;ifa(a,c,$I.i(b),cJ.i(b));m=$APP.G(b);
|
|
18
|
+
m=$APP.C(m,dJ);c=$APP.l(a,"__xColorPickerInternals");$APP.n(c)&&c.setFormValue(m);a=$APP.Q(a,"__xColorPickerModel",b)}else a=null}else a=null;return a}return null},nJ=function(a,b){var c=a.getBoundingClientRect();a=b.clientY;var d=c.top,e=c.height;b=ZI(b.clientX,c.left,c.width);a=ZI(a,d,e);return new $APP.M(null,2,[mJ,HI(b),$APP.Np,100-HI(a)],null)},oJ=function(a,b){a=a.getBoundingClientRect();b=ZI(b.clientX,a.left,a.width);return HI(b)/100*360},pJ=function(a,b){a=a.getBoundingClientRect();b=ZI(b.clientX,
|
|
19
|
+
a.left,a.width);return HI(b)/100},kfa=function(a,b){var c=hJ(a);if(eJ(c)&&$APP.dd(jfa,b.key)){b.preventDefault();var d=$APP.n(b.shiftKey)?10:1,e=XI(PI.i(c),QI.i(c),RI.i(c)),f=function(){switch(b.key){case "ArrowRight":return HI(QI.i(e)+d);case "ArrowLeft":return HI(QI.i(e)-d);default:return QI.i(e)}}(),h=function(){switch(b.key){case "ArrowUp":return HI(WI.i(e)+d);case "ArrowDown":return HI(WI.i(e)-d);default:return WI.i(e)}}();f=YI(PI.i(c),f,h);var k=$APP.G(f);f=$APP.C(k,PI);h=$APP.C(k,QI);k=$APP.C(k,
|
|
20
|
+
RI);kJ(a,f,h,k,NI.i(c),bJ.i(c));iJ(a,hJ(a));return jJ(a,hJ(a))}return null},lfa=function(a,b){var c=hJ(a);if(eJ(c)&&$APP.dd(qJ,b.key)){b.preventDefault();var d=$APP.n(b.shiftKey)?10:1,e=function(){switch(b.key){case "ArrowRight":return GI(PI.i(c)+d);case "ArrowLeft":return GI(PI.i(c)-d);case "Home":return 0;case "End":return 360;default:return PI.i(c)}}();kJ(a,e,QI.i(c),RI.i(c),NI.i(c),bJ.i(c));iJ(a,hJ(a));return jJ(a,hJ(a))}return null},mfa=function(a,b){var c=hJ(a);if($APP.n(function(){var f=eJ(c);
|
|
21
|
+
return f?(f=bJ.i(c),$APP.n(f)?$APP.dd(qJ,b.key):f):f}())){b.preventDefault();var d=$APP.n(b.shiftKey)?.1:.01,e=function(){switch(b.key){case "ArrowRight":return II(NI.i(c)+d);case "ArrowLeft":return II(NI.i(c)-d);case "Home":return 0;case "End":return 1;default:return NI.i(c)}}();kJ(a,PI.i(c),QI.i(c),RI.i(c),e,!0);iJ(a,hJ(a));return jJ(a,hJ(a))}return null},nfa=function(a){var b=hJ(a);return eJ(b)&&typeof EyeDropper!=="undefined"?(new EyeDropper).open().then(function(c){$APP.S(a,"value",c.sRGBHex);
|
|
22
|
+
return jJ(a,hJ(a))}).catch(function(){return null}):null},ofa=function(a){if($APP.n(a.hasAttribute("open")))return null;$APP.S(a,"open","");a=$APP.l(a,"__xColorPickerRefs");if($APP.n(a)){var b=$APP.l(a,"area");return setTimeout(function(){return b.focus()},0)}return null},rJ=function(a){return $APP.n(a.hasAttribute("open"))?($APP.U(a,"open"),a=$APP.l(a,"__xColorPickerRefs"),$APP.n(a)?$APP.l(a,"trigger").focus():null):null},pfa=function(a,b){return $APP.n(a.hasAttribute("open"))?$APP.n(b.composedPath().some(function(c){return c===
|
|
23
|
+
a}))?null:rJ(a):null},qfa=function(a){return{"area-move":function(b){if($APP.z.j("area",$APP.l(a,"__xColorPickerDragging"))){var c=hJ(a);b=nJ($APP.l($APP.l(a,"__xColorPickerRefs"),"area"),b);var d=$APP.G(b);b=$APP.C(d,mJ);d=$APP.C(d,$APP.Np);b=YI(PI.i(c),b,d);var e=$APP.G(b);b=$APP.C(e,PI);d=$APP.C(e,QI);e=$APP.C(e,RI);kJ(a,b,d,e,NI.i(c),bJ.i(c));c=iJ(a,hJ(a))}else c=null;return c},copy:function(){var b=hJ(a);return $APP.n(navigator.clipboard)?navigator.clipboard.writeText(dJ.i(b)):null},"panel-key":function(b){$APP.z.j("Escape",
|
|
24
|
+
b.key)&&$APP.z.j("popover",$APP.Mm.i(hJ(a)))?(b.preventDefault(),b.stopPropagation(),b=rJ(a)):b=null;return b},"alpha-up":function(){if($APP.z.j("alpha",$APP.l(a,"__xColorPickerDragging"))){$APP.Q(a,"__xColorPickerDragging",null);var b=jJ(a,hJ(a))}else b=null;return b},"hue-up":function(){if($APP.z.j("hue",$APP.l(a,"__xColorPickerDragging"))){$APP.Q(a,"__xColorPickerDragging",null);var b=jJ(a,hJ(a))}else b=null;return b},"alpha-key":function(b){return mfa(a,b)},"alpha-move":function(b){if($APP.z.j("alpha",
|
|
25
25
|
$APP.l(a,"__xColorPickerDragging"))){var c=hJ(a);b=pJ($APP.l($APP.l(a,"__xColorPickerRefs"),"alpha-strip"),b);kJ(a,PI.i(c),QI.i(c),RI.i(c),b,!0);c=iJ(a,hJ(a))}else c=null;return c},"hex-key":function(b){a:{if($APP.z.j("Enter",b.key)){b.preventDefault();b=$APP.l($APP.l(a,"__xColorPickerRefs"),"hex-input");var c=b.value,d=hJ(a);if(eJ(d)){if(KI(c)){$APP.S(a,"value",c);b=jJ(a,hJ(a));break a}b=b.value=dJ.i(d);break a}}b=null}return b},swatch:function(b){a:{var c=hJ(a);if(eJ(c)&&(b=b.target,$APP.n(b.hasAttribute("data-color")))){b=
|
|
26
26
|
b.getAttribute("data-color");$APP.S(a,"value",b);b=jJ(a,hJ(a));break a}b=null}return b},"area-up":function(){if($APP.z.j("area",$APP.l(a,"__xColorPickerDragging"))){$APP.Q(a,"__xColorPickerDragging",null);var b=jJ(a,hJ(a))}else b=null;return b},"alpha-down":function(b){var c=hJ(a);var d=(d=eJ(c))?bJ.i(c):d;$APP.n(d)?(b.preventDefault(),d=$APP.l($APP.l(a,"__xColorPickerRefs"),"alpha-strip"),d.setPointerCapture(b.pointerId),$APP.Q(a,"__xColorPickerDragging","alpha"),b=pJ(d,b),kJ(a,PI.i(c),QI.i(c),RI.i(c),
|
|
27
|
-
b,!0),c=iJ(a,hJ(a))):c=null;return c},"area-key":function(b){return
|
|
28
|
-
"__xColorPickerRefs"),"hue-strip"),b);kJ(a,b,QI.i(c),RI.i(c),NI.i(c),bJ.i(c));c=iJ(a,hJ(a))}else c=null;return c},eyedrop:function(){return
|
|
29
|
-
$APP.Q(a,"__xColorPickerDragging","area");b=nJ(d,b);d=$APP.G(b);b=$APP.C(d,mJ);d=$APP.C(d,$APP.
|
|
30
|
-
r=$APP.A(k,1,null),u=$APP.A(k,2,null);k=$APP.A(k,3,null);tJ(b,m).removeEventListener(r,$APP.l(c,u),k);h+=1}else if(d=$APP.q(d))$APP
|
|
31
|
-
"value","#000000");return lJ(a)},
|
|
27
|
+
b,!0),c=iJ(a,hJ(a))):c=null;return c},"area-key":function(b){return kfa(a,b)},"hue-down":function(b){var c=hJ(a);if(eJ(c)){b.preventDefault();var d=$APP.l($APP.l(a,"__xColorPickerRefs"),"hue-strip");d.setPointerCapture(b.pointerId);$APP.Q(a,"__xColorPickerDragging","hue");b=oJ(d,b);kJ(a,b,QI.i(c),RI.i(c),NI.i(c),bJ.i(c));c=iJ(a,hJ(a))}else c=null;return c},"hue-key":function(b){return lfa(a,b)},"hue-move":function(b){if($APP.z.j("hue",$APP.l(a,"__xColorPickerDragging"))){var c=hJ(a);b=oJ($APP.l($APP.l(a,
|
|
28
|
+
"__xColorPickerRefs"),"hue-strip"),b);kJ(a,b,QI.i(c),RI.i(c),NI.i(c),bJ.i(c));c=iJ(a,hJ(a))}else c=null;return c},eyedrop:function(){return nfa(a)},"panel-pd":function(b){return b.stopPropagation()},trigger:function(){var b=hJ(a);return $APP.z.j("popover",$APP.Mm.i(b))&&$APP.p($APP.Xj.i(b))?$APP.n($APP.Bv.i(b))?rJ(a):ofa(a):null},"doc-click":function(b){return pfa(a,b)},"area-down":function(b){var c=hJ(a);if(eJ(c)){b.preventDefault();var d=$APP.l($APP.l(a,"__xColorPickerRefs"),"area");d.setPointerCapture(b.pointerId);
|
|
29
|
+
$APP.Q(a,"__xColorPickerDragging","area");b=nJ(d,b);d=$APP.G(b);b=$APP.C(d,mJ);d=$APP.C(d,$APP.Np);b=YI(PI.i(c),b,d);var e=$APP.G(b);b=$APP.C(e,PI);d=$APP.C(e,QI);e=$APP.C(e,RI);kJ(a,b,d,e,NI.i(c),bJ.i(c));c=iJ(a,hJ(a))}else c=null;return c}}},tJ=function(a,b){return $APP.z.j(b,sJ)?document:$APP.l(a,b)},vJ=function(a){var b=$APP.l(a,"__xColorPickerRefs"),c=$APP.l(a,"__xColorPickerHandlers");if($APP.n($APP.n(b)?c:b)){for(var d=$APP.q(uJ),e=null,f=0,h=0;;)if(h<f){var k=e.C(null,h),m=$APP.A(k,0,null),
|
|
30
|
+
r=$APP.A(k,1,null),u=$APP.A(k,2,null);k=$APP.A(k,3,null);tJ(b,m).removeEventListener(r,$APP.l(c,u),k);h+=1}else if(d=$APP.q(d))$APP.$c(d)?(f=$APP.Fb(d),d=$APP.Gb(d),e=f,f=$APP.w(f)):(m=$APP.t(d),e=$APP.A(m,0,null),f=$APP.A(m,1,null),h=$APP.A(m,2,null),m=$APP.A(m,3,null),tJ(b,e).removeEventListener(f,$APP.l(c,h),m),d=$APP.v(d),e=null,f=0),h=0;else break;return $APP.Q(a,"__xColorPickerHandlers",null)}return null},rfa=function(a,b){$APP.aj(a,"disabled",$APP.D(b));return lJ(a)},sfa=function(a){$APP.S(a,
|
|
31
|
+
"value","#000000");return lJ(a)},tfa=function(a){if(!$APP.n($APP.l(a,"__xColorPickerRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div");var f=document.createElement("button");var h=document.createElement("span");$APP.S(f,"part","trigger");$APP.S(f,"type","button");$APP.S(f,"aria-label","Pick color");$APP.S(h,"part","trigger-swatch");f.appendChild(h);f=new $APP.M(null,2,[$APP.hs,f,wJ,h],null);h=document.createElement("div");
|
|
32
32
|
var k=document.createElement("div");$APP.S(h,"part","area");$APP.S(h,"role","slider");$APP.S(h,"tabindex","0");$APP.S(h,"aria-label","Color");$APP.S(k,"part","area-thumb");h.appendChild(k);h=new $APP.M(null,2,[xJ,h,yJ,k],null);k=document.createElement("div");var m=document.createElement("div"),r=document.createElement("div"),u=document.createElement("div"),x=document.createElement("div"),y=document.createElement("div");$APP.S(k,"part","strips");fJ(m,"hue-strip","Hue","360");fJ(u,"alpha-strip","Opacity",
|
|
33
33
|
"100");$APP.S(r,"part","hue-thumb");$APP.S(x,"part","alpha-gradient");$APP.S(y,"part","alpha-thumb");m.appendChild(r);u.appendChild(x);u.appendChild(y);k.appendChild(m);k.appendChild(u);k=new $APP.M(null,6,[zJ,k,AJ,m,BJ,r,CJ,u,DJ,x,EJ,y],null);m=document.createElement("div");r=document.createElement("div");u=document.createElement("span");x=document.createElement("input");y=document.createElement("button");var B=document.createElement("button");$APP.S(m,"part","controls");$APP.S(r,"part","preview");
|
|
34
34
|
$APP.S(u,"part","preview-color");$APP.S(x,"part","hex-input");$APP.S(x,"type","text");$APP.S(x,"spellcheck","false");$APP.S(x,"autocomplete","off");$APP.S(x,"aria-label","Hex color value");gJ(y,"eyedropper","Pick color from screen",'\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"\x3e\x3cpath d\x3d"M13.5 2.5a2.12 2.12 0 0 0-3 0L9 4l-.5-.5L6 6l4 4 2.5-2.5L12 7l1.5-1.5a2.12 2.12 0 0 0 0-3zM6 6L2.5 9.5a1.5 1.5 0 0 0-.4.8L1.5 14l3.7-.6a1.5 1.5 0 0 0 .8-.4L10 10"/\x3e\x3c/svg\x3e');
|
|
35
35
|
gJ(B,"copy","Copy color value",'\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"\x3e\x3crect x\x3d"5" y\x3d"5" width\x3d"9" height\x3d"9" rx\x3d"1.5"/\x3e\x3cpath d\x3d"M5 11H3.5A1.5 1.5 0 0 1 2 9.5v-6A1.5 1.5 0 0 1 3.5 2h6A1.5 1.5 0 0 1 11 3.5V5"/\x3e\x3c/svg\x3e');typeof EyeDropper==="undefined"&&(y.style.display="none");r.appendChild(u);m.appendChild(r);m.appendChild(x);
|
|
36
|
-
m.appendChild(y);m.appendChild(B);m=new $APP.M(null,6,[$APP.
|
|
37
|
-
$APP.S(d,"part","container");$APP.S(e,"part","panel");e.appendChild(xJ.i(h));e.appendChild(zJ.i(k));e.appendChild($APP.
|
|
38
|
-
"alpha-strip":CJ.i(k),eyedropper:IJ.i(m),"hex-input":HJ.i(m)};$APP.Q(a,"__xColorPickerRefs",b);$APP.n(a.attachInternals)&&$APP.Q(a,"__xColorPickerInternals",a.attachInternals())}vJ(a);b=$APP.l(a,"__xColorPickerRefs");if($APP.n(b)){c=
|
|
39
|
-
e=$APP.A(k,0,null),f=$APP.A(k,1,null),h=$APP.A(k,2,null),k=$APP.A(k,3,null),tJ(b,e).addEventListener(f,$APP.l(c,h),k),d=$APP.v(d),e=null,f=0),h=0;else break;$APP.Q(a,"__xColorPickerHandlers",c)}return lJ(a)},
|
|
40
|
-
$APP.
|
|
36
|
+
m.appendChild(y);m.appendChild(B);m=new $APP.M(null,6,[$APP.nv,m,FJ,r,GJ,u,HJ,x,IJ,y,$APP.Ev,B],null);r=document.createElement("div");$APP.S(r,"part","swatches");$APP.S(r,"role","listbox");$APP.S(r,"aria-label","Preset colors");r=new $APP.M(null,1,[$I,r],null);c.textContent=":host{display:inline-block;color-scheme:light dark;position:relative;--x-color-picker-width:240px;--x-color-picker-area-height:160px;--x-color-picker-strip-height:14px;--x-color-picker-swatch-size:28px;--x-color-picker-radius:var(--x-radius-md,8px);--x-color-picker-gap:10px;--x-color-picker-bg:var(--x-color-bg,#ffffff);--x-color-picker-border:var(--x-color-border,#cbd5e1);--x-color-picker-text:var(--x-color-text,#1e293b);--x-color-picker-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-color-picker-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-color-picker-bg:var(--x-color-bg,#1e293b);--x-color-picker-border:var(--x-color-border,#475569);--x-color-picker-text:var(--x-color-text,#f1f5f9);--x-color-picker-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3dcontainer]{position:relative;width:var(--x-color-picker-width);max-width:calc(100vw - 2rem);}[part\x3dtrigger]{all:unset;display:none;box-sizing:border-box;width:36px;height:36px;border-radius:var(--x-color-picker-radius);border:2px solid var(--x-color-picker-border);cursor:pointer;overflow:hidden;}[part\x3dtrigger]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}:host([data-mode\x3dpopover]) [part\x3dtrigger]{display:block;}[part\x3dtrigger-swatch]{display:block;width:100%;height:100%;}[part\x3dpanel]{box-sizing:border-box;background:var(--x-color-picker-bg);border:1px solid var(--x-color-picker-border);border-radius:var(--x-color-picker-radius);padding:var(--x-color-picker-gap);display:flex;flex-direction:column;gap:var(--x-color-picker-gap);box-shadow:var(--x-shadow-md,0 4px 12px rgba(0,0,0,0.1));}:host([data-mode\x3dpopover]) [part\x3dpanel]{display:none;position:absolute;z-index:1000;top:calc(100% + 8px);left:0;max-width:calc(100vw - 1rem);}:host([data-mode\x3dpopover][open]) [part\x3dpanel]{display:flex;}[part\x3darea]{position:relative;width:100%;height:var(--x-color-picker-area-height);border-radius:calc(var(--x-color-picker-radius) - 2px);cursor:crosshair;touch-action:none;overflow:hidden;background:linear-gradient(to bottom,transparent,#000),linear-gradient(to right,#fff,hsl(var(--_x-cp-hue,0),100%,50%));}[part\x3darea]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3darea-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,0.3),inset 0 0 0 1px rgba(0,0,0,0.3);pointer-events:none;left:var(--_x-cp-area-x,0%);top:var(--_x-cp-area-y,0%);transform:translate(-50%,-50%);}[part\x3dstrips]{display:flex;flex-direction:column;gap:8px;}[part\x3dhue-strip]{position:relative;width:100%;height:var(--x-color-picker-strip-height);border-radius:var(--x-color-picker-strip-height);cursor:pointer;touch-action:none;background:linear-gradient(to right,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);}[part\x3dhue-strip]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3dhue-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,0.3);pointer-events:none;top:50%;left:var(--_x-cp-hue-pos,0%);transform:translate(-50%,-50%);}[part\x3dalpha-strip]{position:relative;width:100%;height:var(--x-color-picker-strip-height);border-radius:var(--x-color-picker-strip-height);cursor:pointer;touch-action:none;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:12px 12px;background-position:0 0,0 6px,6px -6px,-6px 0;}[part\x3dalpha-strip]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3dalpha-gradient]{position:absolute;inset:0;border-radius:inherit;background:linear-gradient(to right,transparent,var(--_x-cp-alpha-color,#000));}[part\x3dalpha-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,0.3);pointer-events:none;top:50%;left:var(--_x-cp-alpha-pos,100%);transform:translate(-50%,-50%);z-index:1;}[part\x3dcontrols]{display:flex;align-items:center;gap:6px;}[part\x3dpreview]{width:32px;height:32px;border-radius:var(--x-color-picker-radius);border:1px solid var(--x-color-picker-border);flex-shrink:0;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0;overflow:hidden;}[part\x3dpreview-color]{display:block;width:100%;height:100%;}[part\x3dhex-input]{flex:1;min-width:0;box-sizing:border-box;padding:4px 8px;border:1px solid var(--x-color-picker-border);border-radius:calc(var(--x-color-picker-radius) - 2px);background:transparent;color:var(--x-color-picker-text);font-family:var(--x-font-family,inherit);font-size:var(--x-font-size-sm,0.8125rem);outline:none;}[part\x3dhex-input]:focus-visible{border-color:var(--x-color-picker-focus-ring);box-shadow:0 0 0 2px var(--x-color-picker-focus-ring);}[part\x3deyedropper],[part\x3dcopy]{all:unset;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:calc(var(--x-color-picker-radius) - 2px);cursor:pointer;color:var(--x-color-picker-text);flex-shrink:0;}[part\x3deyedropper]:hover,[part\x3dcopy]:hover{background:rgba(0,0,0,0.06);}@media (prefers-color-scheme:dark){[part\x3deyedropper]:hover,[part\x3dcopy]:hover{background:rgba(255,255,255,0.1);}}[part\x3deyedropper]:focus-visible,[part\x3dcopy]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}[part\x3dswatches]{display:grid;grid-template-columns:repeat(auto-fill,var(--x-color-picker-swatch-size));gap:4px;}[part\x3dswatches]:empty{display:none;}[part\x3dswatch]{all:unset;width:var(--x-color-picker-swatch-size);height:var(--x-color-picker-swatch-size);border-radius:4px;cursor:pointer;border:1px solid rgba(0,0,0,0.1);box-sizing:border-box;}[part\x3dswatch]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}[part\x3dswatch][aria-selected\x3dtrue]{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}:host([disabled]){opacity:var(--x-color-picker-disabled-opacity);pointer-events:none;}@media (prefers-reduced-motion:reduce){[part\x3darea-thumb],[part\x3dhue-thumb],[part\x3dalpha-thumb]{transition:none;}}@media (pointer:coarse){[part\x3darea-thumb],[part\x3dhue-thumb],[part\x3dalpha-thumb]{width:24px;height:24px;}[part\x3dtrigger]{width:44px;height:44px;}[part\x3deyedropper],[part\x3dcopy]{width:44px;height:44px;}[part\x3dswatch]{min-width:44px;min-height:44px;}}";
|
|
37
|
+
$APP.S(d,"part","container");$APP.S(e,"part","panel");e.appendChild(xJ.i(h));e.appendChild(zJ.i(k));e.appendChild($APP.nv.i(m));e.appendChild($I.i(r));d.appendChild($APP.hs.i(f));d.appendChild(e);b.appendChild(c);b.appendChild(d);b={"alpha-thumb":EJ.i(k),copy:$APP.Ev.i(m),swatches:$I.i(r),"hue-strip":AJ.i(k),controls:$APP.nv.i(m),"alpha-gradient":DJ.i(k),panel:e,preview:FJ.i(m),"area-thumb":yJ.i(h),"preview-color":GJ.i(m),container:d,area:xJ.i(h),"hue-thumb":BJ.i(k),"trigger-swatch":wJ.i(f),trigger:$APP.hs.i(f),
|
|
38
|
+
"alpha-strip":CJ.i(k),eyedropper:IJ.i(m),"hex-input":HJ.i(m)};$APP.Q(a,"__xColorPickerRefs",b);$APP.n(a.attachInternals)&&$APP.Q(a,"__xColorPickerInternals",a.attachInternals())}vJ(a);b=$APP.l(a,"__xColorPickerRefs");if($APP.n(b)){c=qfa(a);d=$APP.q(uJ);e=null;for(h=f=0;;)if(h<f)u=e.C(null,h),k=$APP.A(u,0,null),m=$APP.A(u,1,null),r=$APP.A(u,2,null),u=$APP.A(u,3,null),tJ(b,k).addEventListener(m,$APP.l(c,r),u),h+=1;else if(d=$APP.q(d))$APP.$c(d)?(f=$APP.Fb(d),d=$APP.Gb(d),e=f,f=$APP.w(f)):(k=$APP.t(d),
|
|
39
|
+
e=$APP.A(k,0,null),f=$APP.A(k,1,null),h=$APP.A(k,2,null),k=$APP.A(k,3,null),tJ(b,e).addEventListener(f,$APP.l(c,h),k),d=$APP.v(d),e=null,f=0),h=0;else break;$APP.Q(a,"__xColorPickerHandlers",c)}return lJ(a)},ufa=function(a){return vJ(a)},vfa=function(a,b,c,d){return $APP.I(c,d)?lJ(a):null},xfa=function(a){$APP.Gj(a,"__xColorPickerInternals");return $APP.uj(a,wfa)},JJ=function(){return $APP.si("x-color-picker",new $APP.M(null,8,[$APP.ji,yfa,$APP.hi,tfa,$APP.ei,ufa,$APP.di,vfa,$APP.fi,!0,$APP.ci,rfa,
|
|
40
|
+
$APP.bi,sfa,$APP.ii,xfa],null))},DJ=new $APP.F(null,"alpha-gradient","alpha-gradient",2099400176),EJ=new $APP.F(null,"alpha-thumb","alpha-thumb",-1443114239),xJ=new $APP.F(null,"area","area",472007256),aJ=new $APP.F(null,"alpha","alpha",-1574982441),GJ=new $APP.F(null,"preview-color","preview-color",1405210195),CJ=new $APP.F(null,"alpha-strip","alpha-strip",1085401595),dJ=new $APP.F(null,"hex-full","hex-full",-1466644518),HJ=new $APP.F(null,"hex-input","hex-input",1497535517),FJ=new $APP.F(null,"preview",
|
|
41
41
|
"preview",451279890),AJ=new $APP.F(null,"hue-strip","hue-strip",938856876),yJ=new $APP.F(null,"area-thumb","area-thumb",1471343090),$I=new $APP.F(null,"swatches","swatches",2033601707),zJ=new $APP.F(null,"strips","strips",-1564791997),WI=new $APP.F(null,"v","v",21465059),QI=new $APP.F(null,"s","s",1705939918),LI=new $APP.F(null,"r","r",-471384190),bJ=new $APP.F(null,"alpha?","alpha?",1329751525),RI=new $APP.F(null,"l","l",1395893423),PI=new $APP.F(null,"h","h",1109658740),MI=new $APP.F(null,"b","b",
|
|
42
|
-
1482224470),mJ=new $APP.F(null,"sat","sat",1064662667),NI=new $APP.F(null,"a","a",-2123407586),wJ=new $APP.F(null,"trigger-swatch","trigger-swatch",208431162),sJ=new $APP.F(null,"document","document",-1329188687),cJ=new $APP.F(null,"hex","hex",41691346),IJ=new $APP.F(null,"eyedropper","eyedropper",-1786107588),BJ=new $APP.F(null,"hue-thumb","hue-thumb",638949625);var
|
|
43
|
-
2,[$APP.N,$APP.
|
|
44
|
-
2,[$APP.N,$APP.
|
|
42
|
+
1482224470),mJ=new $APP.F(null,"sat","sat",1064662667),NI=new $APP.F(null,"a","a",-2123407586),wJ=new $APP.F(null,"trigger-swatch","trigger-swatch",208431162),sJ=new $APP.F(null,"document","document",-1329188687),cJ=new $APP.F(null,"hex","hex",41691346),IJ=new $APP.F(null,"eyedropper","eyedropper",-1786107588),BJ=new $APP.F(null,"hue-thumb","hue-thumb",638949625);var efa=new $APP.ch(null,new $APP.M(null,2,["inline",null,"popover",null],null),null),yfa="value alpha swatches disabled readonly name mode open label".split(" "),wfa=$APP.wg([$APP.cw,$APP.Wu,$APP.mv,$APP.Or,$APP.un,$APP.Vj,$APP.Ui,$APP.Mm,$I,$APP.bv,$APP.Z,aJ,$APP.Wt,$APP.gt],[new $APP.M(null,2,[$APP.N,$APP.X,$APP.rj,!0],null),new $APP.M(null,2,[$APP.N,$APP.sj,$APP.W,"open"],null),new $APP.M(null,2,[$APP.N,$APP.vs,$APP.rj,!0],null),new $APP.M(null,2,[$APP.N,$APP.sj,$APP.rj,!0],null),new $APP.M(null,
|
|
43
|
+
2,[$APP.N,$APP.sj,$APP.W,"disabled"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"name"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"value"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"mode"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"swatches"],null),new $APP.M(null,2,[$APP.N,$APP.sj,$APP.W,"readonly"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"label"],null),new $APP.M(null,2,[$APP.N,$APP.sj,$APP.W,"alpha"],null),new $APP.M(null,2,[$APP.N,$APP.rt,$APP.rj,!0],null),new $APP.M(null,
|
|
44
|
+
2,[$APP.N,$APP.Ms,$APP.rj,!0],null)]);$APP.je(["x-color-picker-input",new $APP.M(null,2,[$APP.V,new $APP.M(null,5,[$APP.Ui,$APP.X,PI,$APP.Y,QI,$APP.Y,RI,$APP.Y,NI,$APP.Y],null),$APP.$u,!1],null),"x-color-picker-change",new $APP.M(null,2,[$APP.V,new $APP.M(null,5,[$APP.Ui,$APP.X,PI,$APP.Y,QI,$APP.Y,RI,$APP.Y,NI,$APP.Y],null),$APP.$u,!0],null)]);var JI=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;var jfa=new $APP.ch(null,new $APP.M(null,4,["ArrowUp",null,"ArrowDown",null,"ArrowRight",null,"ArrowLeft",null],null),null),qJ=new $APP.ch(null,new $APP.M(null,4,["End",null,"ArrowRight",null,"ArrowLeft",null,"Home",null],null),null),uJ=new $APP.J(null,20,5,$APP.K,[new $APP.J(null,4,5,$APP.K,["area","pointerdown","area-down",!1],null),new $APP.J(null,4,5,$APP.K,["area","pointermove","area-move",!1],null),new $APP.J(null,4,5,$APP.K,["area","pointerup","area-up",!1],null),new $APP.J(null,4,5,$APP.K,
|
|
45
45
|
["area","keydown","area-key",!1],null),new $APP.J(null,4,5,$APP.K,["hue-strip","pointerdown","hue-down",!1],null),new $APP.J(null,4,5,$APP.K,["hue-strip","pointermove","hue-move",!1],null),new $APP.J(null,4,5,$APP.K,["hue-strip","pointerup","hue-up",!1],null),new $APP.J(null,4,5,$APP.K,["hue-strip","keydown","hue-key",!1],null),new $APP.J(null,4,5,$APP.K,["alpha-strip","pointerdown","alpha-down",!1],null),new $APP.J(null,4,5,$APP.K,["alpha-strip","pointermove","alpha-move",!1],null),new $APP.J(null,
|
|
46
46
|
4,5,$APP.K,["alpha-strip","pointerup","alpha-up",!1],null),new $APP.J(null,4,5,$APP.K,["alpha-strip","keydown","alpha-key",!1],null),new $APP.J(null,4,5,$APP.K,["hex-input","keydown","hex-key",!1],null),new $APP.J(null,4,5,$APP.K,["swatches","click","swatch",!1],null),new $APP.J(null,4,5,$APP.K,["eyedropper","click","eyedrop",!1],null),new $APP.J(null,4,5,$APP.K,["copy","click","copy",!1],null),new $APP.J(null,4,5,$APP.K,["trigger","click","trigger",!1],null),new $APP.J(null,4,5,$APP.K,["panel","keydown",
|
|
47
47
|
"panel-key",!1],null),new $APP.J(null,4,5,$APP.K,["panel","pointerdown","panel-pd",!1],null),new $APP.J(null,4,5,$APP.K,[sJ,"pointerdown","doc-click",!0],null)],null);$APP.ha("baredom.exports.x_color_picker.init",JJ);export const init=JJ;
|
package/dist/x-combobox.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
null)}return null},
|
|
4
|
-
""+$APP.P.i("x-cb-opt-")+$APP.P.i(c));$APP.S(b,"data-value",e);$APP.z.j(c,d)&&$APP.S(b,"data-active","");$APP.n(f)?(b.appendChild(document.createTextNode($APP.
|
|
5
|
-
function(a,b,c,d,e){c=$APP.q($APP.
|
|
6
|
-
r=
|
|
7
|
-
k:""}(),e=
|
|
8
|
-
$APP.
|
|
9
|
-
$APP.
|
|
10
|
-
$APP.
|
|
11
|
-
$APP.n($APP.
|
|
12
|
-
($APP.Q(a,"__xComboboxQuery",""),$APP.Q(a,"__xComboboxActiveIdx",0),$APP.U(a,"open")):null},
|
|
13
|
-
e:""}());c=$APP.w(c);var d=function(){var e=$APP.l(a,"__xComboboxActiveIdx");return $APP.n(e)?e:0}();b=$APP.z.j(b,$APP.
|
|
14
|
-
return $APP.n(c)?c:""}());b=$APP.A(b,function(){var c=$APP.l(a,"__xComboboxActiveIdx");return $APP.n(c)?c:0}(),null);return $APP.n(b)?
|
|
15
|
-
null),u=$APP.A(k,2,null),x=$APP.A(k,3,null),y=$APP.l(b,m);k=function(H,O,T,R,aa,ma,ia,na,Na,Oa){return function(fb){return Oa.j?Oa.j(a,fb):Oa.call(null,a,fb)}}(d,e,f,h,y,k,m,r,u,x,c,b,b);y.addEventListener(u,k);c[r]=k;h+=1}else if(m=$APP.q(d)){r=m;if($APP
|
|
16
|
-
Oa.call(null,a,fb)}}(d,e,f,h,k,x,B,u,y,E,r,m,c,b,b);k.addEventListener(y,d);c[u]=d;d=$APP.v(r);e=null;f=0}h=0}else break;d=$APP.q(
|
|
17
|
-
y=$APP.A(m,1,null),x=$APP.A(m,2,null),d=function(H,O,T,R,aa,ma,ia,na){return function(Na){return na.j?na.j(a,Na):na.call(null,a,Na)}}(d,e,f,h,m,u,y,x,r,k,c,b,b),a.addEventListener(y,d),c[u]=d,d=$APP.v(r),e=null,f=0),h=0;else break;$APP.Q(a,"__xComboboxHandlers",c)}},
|
|
18
|
-
$APP.A(k,3,null);var x=$APP.l(c,m),y=$APP.l(b,r);$APP.n(function(){var H=x;return $APP.n(H)?y:H}())&&x.removeEventListener(u,y);h+=1}else if(d=$APP.q(d)){if($APP
|
|
19
|
-
m=$APP.A(k,0,null),h=$APP.A(k,1,null),$APP.A(k,2,null),k=$APP.l(b,m),$APP.n(k)&&a.removeEventListener(h,k),f+=1;else if(c=$APP.q(c))$APP
|
|
20
|
-
d}())){var b=function(d){return
|
|
21
|
-
|
|
2
|
+
var Rx=function(a,b){if(b==null||$APP.z.j(b,""))return a;var c=b.toLowerCase();return $APP.Ie(function(d){d=$APP.G(d);d=$APP.C(d,$APP.Z);return $APP.I(-1,d.toLowerCase().indexOf(c))},a)},Sx=function(a,b){return b!=null?$APP.pe(function(c){return $APP.z.j($APP.Ui.i(c),b)?c:null},a):null},Tx=function(a,b){if(b!=null&&$APP.I(b,"")){var c=a.toLowerCase().indexOf(b.toLowerCase());if($APP.I(c,-1))return b=c+$APP.w(b),new $APP.M(null,3,[$APP.uv,a.substring(0,c),$APP.wr,a.substring(c,b),$APP.Kt,a.substring(b)],
|
|
3
|
+
null)}return null},Ux=function(a){var b=$APP.l(a,"__xComboboxRefs");$APP.n(b)&&(b=$APP.l(b,"slot").assignedElements({flatten:!0}),b=$APP.Gf.m($APP.Ge,$APP.zp.j($APP.De(function(c){return $APP.z.j("OPTION",c.tagName)}),$APP.ye.i(function(c){var d=c.getAttribute("value");return new $APP.M(null,2,[$APP.Ui,$APP.n(d)?d:c.textContent,$APP.Z,c.textContent],null)})),$APP.Ec(b)),$APP.Q(a,"__xComboboxOptions",b))},Vx=function(a,b,c,d,e,f,h){$APP.S(b,"part","option");$APP.S(b,"role","option");$APP.S(b,"id",
|
|
4
|
+
""+$APP.P.i("x-cb-opt-")+$APP.P.i(c));$APP.S(b,"data-value",e);$APP.z.j(c,d)&&$APP.S(b,"data-active","");$APP.n(f)?(b.appendChild(document.createTextNode($APP.uv.i(f))),c=document.createElement("b"),c.textContent=$APP.wr.i(f),b.appendChild(c),b.appendChild(document.createTextNode($APP.Kt.i(f)))):b.textContent=h;a.appendChild(b)},Wx=function(a,b){var c=document.createElement("div");$APP.S(c,"part","empty-msg");c.textContent="No matches";a.appendChild(c);return $APP.U(b,"aria-activedescendant")},Xx=
|
|
5
|
+
function(a,b,c,d,e){c=$APP.q($APP.se($APP.Dp,c));for(var f=null,h=0,k=0;;)if(k<h){var m=f.C(null,k),r=$APP.A(m,0,null);m=$APP.A(m,1,null);var u=document.createElement("div"),x=Tx($APP.Z.i(m),function(){var y=$APP.l(a,"_query");return $APP.n(y)?y:""}());Vx(a,u,r,d,$APP.Ui.i(m),x,$APP.Z.i(m));$APP.z.j($APP.Ui.i(m),e)&&$APP.S(u,"aria-selected","true");k+=1}else if(c=$APP.q(c))$APP.$c(c)?(h=$APP.Fb(c),c=$APP.Gb(c),f=h,h=$APP.w(h)):(h=$APP.t(c),f=$APP.A(h,0,null),h=$APP.A(h,1,null),k=document.createElement("div"),
|
|
6
|
+
r=Tx($APP.Z.i(h),function(){var y=$APP.l(a,"_query");return $APP.n(y)?y:""}()),Vx(a,k,f,d,$APP.Ui.i(h),r,$APP.Z.i(h)),$APP.z.j($APP.Ui.i(h),e)&&$APP.S(k,"aria-selected","true"),c=$APP.v(c),f=null,h=0),k=0;else break;return d>=0?$APP.S(b,"aria-activedescendant",""+$APP.P.i("x-cb-opt-")+$APP.P.i(d)):$APP.U(b,"aria-activedescendant")},Yx=function(a){var b=$APP.l(a,"__xComboboxRefs");if($APP.n(b)){var c=$APP.l(b,"panel");b=$APP.l(b,"input");var d=function(){var k=$APP.l(a,"__xComboboxQuery");return $APP.n(k)?
|
|
7
|
+
k:""}(),e=Rx($APP.l(a,"__xComboboxOptions"),d),f=function(){var k=$APP.l(a,"__xComboboxActiveIdx");return $APP.n(k)?k:0}();f=$APP.Tc(e)?-1:$APP.Sl.j(f,$APP.w(e)-1);var h=function(){var k=a.getAttribute("value");return $APP.n(k)?k:""}();c.textContent="";$APP.Q(c,"_query",d);return $APP.Tc(e)?Wx(c,b):Xx(c,b,e,f,h)}return null},$x=function(a){var b=new $APP.M(null,8,[$APP.Nj,a.getAttribute("value"),$APP.Oj,a.getAttribute("placeholder"),$APP.Mj,a.getAttribute("name"),$APP.Qj,a.hasAttribute("disabled"),
|
|
8
|
+
$APP.Rj,a.hasAttribute("required"),$APP.Oq,a.hasAttribute("open"),$APP.fw,a.getAttribute("placement"),$APP.to,a.getAttribute("error")],null);var c=$APP.G(b),d=$APP.C(c,$APP.Nj),e=$APP.C(c,$APP.Oj),f=$APP.C(c,$APP.Mj);b=$APP.C(c,$APP.Qj);var h=$APP.C(c,$APP.Rj),k=$APP.C(c,$APP.Oq),m=$APP.C(c,$APP.fw);c=$APP.C(c,$APP.to);h=$APP.D(h);e=$APP.n(e)?e:"";f=$APP.n(f)?f:"";d=$APP.n(d)?d:"";var r=$APP.D(typeof c==="string"&&$APP.I(c,""));k=$APP.D(k);c=$APP.n(c)?c:"";m=$APP.dd(Zx,m)?m:"bottom-start";b=$APP.wg([$APP.xj,
|
|
9
|
+
$APP.Wj,$APP.Vj,$APP.Ui,$APP.vj,$APP.Bv,$APP.wj,$APP.gs,$APP.Xj],[h,e,f,d,r,k,c,m,$APP.D(b)]);$APP.I($APP.l(a,"__xComboboxModel"),b)?(h=$APP.l(a,"__xComboboxRefs"),$APP.n(h)?(m=$APP.l(h,"input"),c=$APP.l(h,"panel"),h=$APP.l(h,"error"),k=Sx($APP.l(a,"__xComboboxOptions"),$APP.Ui.i(b)),d=$APP.G(b),e=$APP.C(d,$APP.Wj),f=$APP.C(d,$APP.Xj),d=$APP.C(d,$APP.Bv),m.placeholder=e,m.disabled=f,$APP.S(m,"aria-expanded",""+$APP.P.i(d)),e=$APP.G(b),e=$APP.C(e,$APP.gs),$APP.S(c,"data-placement",e),c=$APP.G(b),$APP.C(c,
|
|
10
|
+
$APP.Ui),c=$APP.C(c,$APP.Bv),$APP.n(c)||(m.value=$APP.n(k)?$APP.Z.i(k):""),k=$APP.G(b),k=$APP.C(k,$APP.Ui),$APP.I(k,"")?$APP.S(a,"data-has-value",""):$APP.U(a,"data-has-value"),$APP.Ij(a,m,h,b,$APP.Hj($APP.vj.i(b),null)),k=$APP.G(b),h=$APP.C(k,$APP.Ui),k=$APP.C(k,$APP.vj),h=$APP.n(h)?h:"",$APP.Dj($APP.l(a,"__xComboboxInternals"),m,h,new $APP.M(null,5,[$APP.vj,k,$APP.wj,a.getAttribute("error"),$APP.xj,a.hasAttribute("required"),$APP.yj,$APP.z.j(h,""),$APP.zj,"Please select an item in the list."],null)),
|
|
11
|
+
$APP.n($APP.Bv.i(b))&&Yx(a),a=$APP.Q(a,"__xComboboxModel",b)):a=null):a=null;return a},ay=function(a,b){return $APP.p(a.hasAttribute("disabled"))&&$APP.p(a.hasAttribute("open"))&&$APP.hj(a,"x-combobox-toggle",{open:!0,source:b})?($APP.Q(a,"__xComboboxQuery",""),$APP.Q(a,"__xComboboxActiveIdx",0),$APP.S(a,"open",""),a=$APP.l(a,"__xComboboxRefs"),$APP.n(a)?$APP.l(a,"input").select():null):null},by=function(a,b){return $APP.n(a.hasAttribute("open"))&&$APP.hj(a,"x-combobox-toggle",{open:!1,source:b})?
|
|
12
|
+
($APP.Q(a,"__xComboboxQuery",""),$APP.Q(a,"__xComboboxActiveIdx",0),$APP.U(a,"open")):null},cy=function(a,b,c){var d=a.getAttribute("value");return $APP.hj(a,"x-combobox-change-request",{value:b,label:c,previousValue:$APP.n(d)?d:""})?($APP.S(a,"value",b),d=$APP.l(a,"__xComboboxRefs"),$APP.n(d)&&($APP.l(d,"input").value=c),by(a,"select"),$APP.fj(a,"x-combobox-change",{value:b,label:c})):null},dy=function(a,b){var c=Rx($APP.l(a,"__xComboboxOptions"),function(){var e=$APP.l(a,"__xComboboxQuery");return $APP.n(e)?
|
|
13
|
+
e:""}());c=$APP.w(c);var d=function(){var e=$APP.l(a,"__xComboboxActiveIdx");return $APP.n(e)?e:0}();b=$APP.z.j(b,$APP.js)?c===0?-1:$APP.ud(($APP.n(d)?d:-1)+1,c):c===0?-1:$APP.ud(($APP.n(d)?d:c)-1,c);$APP.Q(a,"__xComboboxActiveIdx",b);Yx(a);b=$APP.l(a,"__xComboboxRefs");return $APP.n(b)?(b=$APP.l(b,"panel").querySelector("["+$APP.P.i("data-active")+"]"),$APP.n(b)?b.scrollIntoView({block:"nearest"}):null):null},ey=function(a){var b=Rx($APP.l(a,"__xComboboxOptions"),function(){var c=$APP.l(a,"__xComboboxQuery");
|
|
14
|
+
return $APP.n(c)?c:""}());b=$APP.A(b,function(){var c=$APP.l(a,"__xComboboxActiveIdx");return $APP.n(c)?c:0}(),null);return $APP.n(b)?cy(a,$APP.Ui.i(b),$APP.Z.i(b)):null},fy=function(a,b){return $APP.n(a.hasAttribute("open"))?(b=$APP.Fc(b.composedPath()),b=$APP.pe(function(c){return c===a},b),$APP.n(b)?null:by(a,"outside-click")):null},iy=function(a){var b=$APP.l(a,"__xComboboxRefs");if($APP.n(b)){for(var c={},d=$APP.q(gy),e=null,f=0,h=0;;)if(h<f){var k=e.C(null,h),m=$APP.A(k,0,null),r=$APP.A(k,1,
|
|
15
|
+
null),u=$APP.A(k,2,null),x=$APP.A(k,3,null),y=$APP.l(b,m);k=function(H,O,T,R,aa,ma,ia,na,Na,Oa){return function(fb){return Oa.j?Oa.j(a,fb):Oa.call(null,a,fb)}}(d,e,f,h,y,k,m,r,u,x,c,b,b);y.addEventListener(u,k);c[r]=k;h+=1}else if(m=$APP.q(d)){r=m;if($APP.$c(r))d=$APP.Fb(r),h=$APP.Gb(r),e=d,f=$APP.w(d),d=h;else{x=$APP.t(r);var B=$APP.A(x,0,null);u=$APP.A(x,1,null);y=$APP.A(x,2,null);var E=$APP.A(x,3,null);k=$APP.l(b,B);d=function(H,O,T,R,aa,ma,ia,na,Na,Oa){return function(fb){return Oa.j?Oa.j(a,fb):
|
|
16
|
+
Oa.call(null,a,fb)}}(d,e,f,h,k,x,B,u,y,E,r,m,c,b,b);k.addEventListener(y,d);c[u]=d;d=$APP.v(r);e=null;f=0}h=0}else break;d=$APP.q(hy);e=null;for(h=f=0;;)if(h<f)y=e.C(null,h),r=$APP.A(y,0,null),u=$APP.A(y,1,null),k=$APP.A(y,2,null),y=function(H,O,T,R,aa,ma,ia,na){return function(Na){return na.j?na.j(a,Na):na.call(null,a,Na)}}(d,e,f,h,y,r,u,k,c,b,b),a.addEventListener(u,y),c[r]=y,h+=1;else if(k=$APP.q(d))r=k,$APP.$c(r)?(d=$APP.Fb(r),h=$APP.Gb(r),e=d,f=$APP.w(d),d=h):(m=$APP.t(r),u=$APP.A(m,0,null),
|
|
17
|
+
y=$APP.A(m,1,null),x=$APP.A(m,2,null),d=function(H,O,T,R,aa,ma,ia,na){return function(Na){return na.j?na.j(a,Na):na.call(null,a,Na)}}(d,e,f,h,m,u,y,x,r,k,c,b,b),a.addEventListener(y,d),c[u]=d,d=$APP.v(r),e=null,f=0),h=0;else break;$APP.Q(a,"__xComboboxHandlers",c)}},jy=function(a){var b=$APP.l(a,"__xComboboxHandlers");if($APP.n(b)){var c=$APP.l(a,"__xComboboxRefs");if($APP.n(c)){for(var d=$APP.q(gy),e=null,f=0,h=0;;)if(h<f){var k=e.C(null,h),m=$APP.A(k,0,null),r=$APP.A(k,1,null),u=$APP.A(k,2,null);
|
|
18
|
+
$APP.A(k,3,null);var x=$APP.l(c,m),y=$APP.l(b,r);$APP.n(function(){var H=x;return $APP.n(H)?y:H}())&&x.removeEventListener(u,y);h+=1}else if(d=$APP.q(d)){if($APP.$c(d))f=$APP.Fb(d),d=$APP.Gb(d),e=f,f=$APP.w(f);else{e=$APP.t(d);f=$APP.A(e,0,null);h=$APP.A(e,1,null);k=$APP.A(e,2,null);$APP.A(e,3,null);var B=$APP.l(c,f),E=$APP.l(b,h);$APP.n(function(){var H=B;return $APP.n(H)?E:H}())&&B.removeEventListener(k,E);d=$APP.v(d);e=null;f=0}h=0}else break;c=$APP.q(hy);d=null;for(f=e=0;;)if(f<e)k=d.C(null,f),
|
|
19
|
+
m=$APP.A(k,0,null),h=$APP.A(k,1,null),$APP.A(k,2,null),k=$APP.l(b,m),$APP.n(k)&&a.removeEventListener(h,k),f+=1;else if(c=$APP.q(c))$APP.$c(c)?(e=$APP.Fb(c),c=$APP.Gb(c),d=e,e=$APP.w(e)):(e=$APP.t(c),f=$APP.A(e,0,null),d=$APP.A(e,1,null),$APP.A(e,2,null),e=$APP.l(b,f),$APP.n(e)&&a.removeEventListener(d,e),c=$APP.v(c),d=null,e=0),f=0;else break}$APP.Q(a,"__xComboboxHandlers",null)}},ky=function(a){return setTimeout(function(){if($APP.n(function(){var d=a.isConnected;return $APP.n(d)?a.hasAttribute("open"):
|
|
20
|
+
d}())){var b=function(d){return fy(a,d)},c=$APP.l(a,"__xComboboxHandlers");$APP.n(c)&&(c.docClick=b);return document.addEventListener("click",b)}return null},0)},ly=function(a){a=$APP.l(a,"__xComboboxHandlers");if($APP.n(a)){var b=$APP.l(a,"docClick");if($APP.n(b)){document.removeEventListener("click",b);a.docClick=null;return}}return null},my=function(a,b){$APP.aj(a,"disabled",$APP.D(b));return $x(a)},ny=function(a){$APP.U(a,"value");$APP.U(a,"error");$APP.Q(a,"__xComboboxModel",null);return $x(a)},
|
|
21
|
+
oy=function(a){if(!$APP.n($APP.l(a,"__xComboboxRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=""+$APP.P.i("x-cb-lb-")+$APP.P.i(crypto.randomUUID()),e=document.createElement("input");$APP.S(e,"part","input");$APP.S(e,"type","text");$APP.S(e,"role","combobox");$APP.S(e,"aria-expanded","false");$APP.S(e,"aria-autocomplete","list");$APP.S(e,"aria-controls",d);$APP.S(e,"autocomplete","off");var f=document.createElement("button");$APP.S(f,"part","clear");$APP.S(f,"type",
|
|
22
22
|
"button");$APP.S(f,"aria-label","Clear");$APP.S(f,"tabindex","-1");f.textContent="×";var h=document.createElement("span");$APP.S(h,"part","chevron");$APP.S(h,"aria-hidden","true");h.innerHTML='\x3csvg width\x3d"12" height\x3d"12" viewBox\x3d"0 0 12 12" fill\x3d"none" xmlns\x3d"http://www.w3.org/2000/svg" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M2.5 4.5L6 8L9.5 4.5" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"/\x3e\x3c/svg\x3e';var k=document.createElement("div");
|
|
23
23
|
$APP.S(k,"part","wrapper");k.appendChild(e);k.appendChild(f);k.appendChild(h);var m=document.createElement("div");$APP.S(m,"part","panel");$APP.S(m,"role","listbox");$APP.S(m,"id",d);$APP.S(m,"data-placement","bottom-start");d=document.createElement("span");$APP.S(d,"part","error");$APP.S(d,"id","error");$APP.S(d,"role","alert");$APP.S(d,"aria-live","assertive");d.classList.add("error-hidden");var r=document.createElement("slot"),u={};c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-combobox-bg:var(--x-color-surface,#ffffff);--x-combobox-fg:var(--x-color-text,#0f172a);--x-combobox-placeholder:var(--x-color-text-muted,#94a3b8);--x-combobox-border:1px solid var(--x-color-border,#e2e8f0);--x-combobox-border-hover:1px solid var(--x-color-border,#cbd5e1);--x-combobox-border-focus:1px solid var(--x-color-focus-ring,#60a5fa);--x-combobox-radius:var(--x-radius-md,6px);--x-combobox-height:2.25rem;--x-combobox-font-size:var(--x-font-size-sm,0.9375rem);--x-combobox-padding:0 0.625rem;--x-combobox-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-combobox-error-color:var(--x-color-danger,#dc2626);--x-combobox-shadow:var(--x-shadow-sm,0 1px 2px rgba(0,0,0,0.05));--x-combobox-disabled-opacity:var(--x-opacity-disabled,0.55);--x-combobox-chevron-color:var(--x-color-text-muted,#64748b);--x-combobox-panel-bg:var(--x-color-bg,#ffffff);--x-combobox-panel-border:1px solid var(--x-color-border,#e2e8f0);--x-combobox-panel-radius:var(--x-radius-md,8px);--x-combobox-panel-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-combobox-panel-max-height:16rem;--x-combobox-panel-offset:4px;--x-combobox-option-padding:0.5rem 0.625rem;--x-combobox-option-hover-bg:var(--x-color-surface-hover,#f1f5f9);--x-combobox-option-active-bg:var(--x-color-primary,#3b82f6);--x-combobox-option-active-fg:#ffffff;--x-combobox-transition-duration:var(--x-transition-duration,150ms);--x-combobox-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-combobox-bg:var(--x-color-surface,#1e293b);--x-combobox-fg:var(--x-color-text,#e2e8f0);--x-combobox-placeholder:var(--x-color-text-muted,#64748b);--x-combobox-border:1px solid var(--x-color-border,#334155);--x-combobox-border-hover:1px solid var(--x-color-border,#475569);--x-combobox-border-focus:1px solid var(--x-color-focus-ring,#93c5fd);--x-combobox-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-combobox-error-color:var(--x-color-danger,#f87171);--x-combobox-shadow:var(--x-shadow-sm,0 1px 2px rgba(0,0,0,0.2));--x-combobox-chevron-color:var(--x-color-text-muted,#94a3b8);--x-combobox-panel-bg:var(--x-color-bg,#1e293b);--x-combobox-panel-border:1px solid var(--x-color-border,#334155);--x-combobox-panel-shadow:var(--x-shadow-md,0 4px 24px rgba(0,0,0,0.4));--x-combobox-option-hover-bg:var(--x-color-surface-hover,#334155);--x-combobox-option-active-bg:var(--x-color-primary,#3b82f6);}}[part\x3dwrapper]{position:relative;display:flex;align-items:center;height:var(--x-combobox-height);background:var(--x-combobox-bg);border:var(--x-combobox-border);border-radius:var(--x-combobox-radius);box-shadow:var(--x-combobox-shadow);padding:var(--x-combobox-padding);cursor:text;transition:border var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),box-shadow var(--x-combobox-transition-duration) var(--x-combobox-transition-easing);}[part\x3dwrapper]:hover{border:var(--x-combobox-border-hover);}:host(:focus-within) [part\x3dwrapper]{border:var(--x-combobox-border-focus);box-shadow:0 0 0 2px var(--x-combobox-focus-ring);}:host([data-invalid]) [part\x3dwrapper]{border:1px solid var(--x-combobox-error-color);}:host([data-invalid]:focus-within) [part\x3dwrapper]{border:1px solid var(--x-combobox-error-color);box-shadow:0 0 0 2px color-mix(in srgb,var(--x-combobox-error-color) 45%,transparent);}:host([disabled]) [part\x3dwrapper]{opacity:var(--x-combobox-disabled-opacity);cursor:default;pointer-events:none;}[part\x3dinput]{all:unset;flex:1;min-width:0;height:100%;font-size:var(--x-combobox-font-size);font-family:inherit;color:var(--x-combobox-fg);}[part\x3dinput]::placeholder{color:var(--x-combobox-placeholder);}[part\x3dclear]{all:unset;display:none;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;font-size:0.875rem;color:var(--x-combobox-chevron-color);cursor:pointer;flex-shrink:0;border-radius:2px;}[part\x3dclear]:hover{color:var(--x-combobox-fg);}[part\x3dclear]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-combobox-focus-ring);}:host([data-has-value]) [part\x3dclear]{display:inline-flex;}:host([disabled]) [part\x3dclear]{display:none;}[part\x3dchevron]{display:inline-flex;align-items:center;color:var(--x-combobox-chevron-color);flex-shrink:0;margin-left:0.25rem;transition:transform 200ms ease;cursor:pointer;}:host([open]) [part\x3dchevron]{transform:rotate(180deg);}[part\x3dpanel]{position:absolute;z-index:var(--x-z-dropdown,1000);box-sizing:border-box;width:100%;background:var(--x-combobox-panel-bg);border:var(--x-combobox-panel-border);border-radius:var(--x-combobox-panel-radius);box-shadow:var(--x-combobox-panel-shadow);padding:0.25rem 0;max-height:var(--x-combobox-panel-max-height);max-width:calc(100% - 0rem);overflow-y:auto;visibility:hidden;pointer-events:none;opacity:0;transform:scaleY(0.95);transition:opacity var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),transform var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),visibility 0s var(--x-combobox-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;pointer-events:auto;opacity:1;transform:scaleY(1);transition:opacity var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),transform var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dbottom-start]{top:calc(100% + var(--x-combobox-panel-offset));left:0;transform-origin:top left;}[part\x3dpanel][data-placement\x3dbottom-end]{top:calc(100% + var(--x-combobox-panel-offset));right:0;transform-origin:top right;}[part\x3dpanel][data-placement\x3dtop-start]{bottom:calc(100% + var(--x-combobox-panel-offset));left:0;transform-origin:bottom left;}[part\x3dpanel][data-placement\x3dtop-end]{bottom:calc(100% + var(--x-combobox-panel-offset));right:0;transform-origin:bottom right;}[part\x3doption]{padding:var(--x-combobox-option-padding);font-size:var(--x-combobox-font-size);font-family:inherit;color:var(--x-combobox-fg);cursor:default;border-radius:4px;margin:0 0.25rem;}[part\x3doption]:hover{background:var(--x-combobox-option-hover-bg);}[part\x3doption][data-active]{background:var(--x-combobox-option-active-bg);color:var(--x-combobox-option-active-fg);}[part\x3doption][data-active] b{color:inherit;}[part\x3doption] b{font-weight:700;}[part\x3dempty-msg]{padding:var(--x-combobox-option-padding);font-size:var(--x-combobox-font-size);color:var(--x-combobox-placeholder);font-style:italic;margin:0 0.25rem;}[part\x3derror]{display:block;margin-top:0.25rem;font-size:0.8125rem;line-height:1.4;color:var(--x-combobox-error-color);}.error-hidden{display:none;}slot{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}[part\x3dwrapper]{transition:none !important;}[part\x3dchevron]{transition:none !important;}}@media (pointer:coarse){:host{--x-combobox-height:2.75rem;}[part\x3dclear]{width:2.75rem;height:2.75rem;}[part\x3doption]{min-height:2.75rem;display:flex;align-items:center;}}";
|
|
24
|
-
k.appendChild(m);b.appendChild(c);b.appendChild(k);b.appendChild(d);b.appendChild(r);$APP.Q(a,"__xComboboxOptions",$APP.
|
|
25
|
-
d)&&$APP.n($APP.l(a,"__xComboboxRefs"))?(
|
|
26
|
-
|
|
27
|
-
$APP.
|
|
28
|
-
$APP.
|
|
29
|
-
$APP.
|
|
30
|
-
(b.preventDefault(),a=$APP.n(a.hasAttribute("open"))
|
|
31
|
-
$APP.Q(a,"__xComboboxActiveIdx",0),a=
|
|
32
|
-
"value"),$APP.U(a,"data-has-value"),b=$APP.l(a,"__xComboboxRefs"),$APP.n(b)&&(b=$APP.l(b,"input"),b.value="",b.focus()),$APP.
|
|
33
|
-
"pointerdown",function(a,b){return b.preventDefault()}],null),new $APP.J(null,4,5,$APP.K,["panel","panelClick","click",function(a,b){b=b.target;b=$APP.n(b.hasAttribute("data-value"))?b:b.closest("["+$APP.P.i("data-value")+"]");if($APP.n(b)){var c=b.getAttribute("data-value");return
|
|
34
|
-
3,5,$APP.K,["focusout","focusout",function(a,b){return $APP.n(a.hasAttribute("open"))?(b=b.relatedTarget,b==null||$APP.p(a.contains(b))?
|
|
24
|
+
k.appendChild(m);b.appendChild(c);b.appendChild(k);b.appendChild(d);b.appendChild(r);$APP.Q(a,"__xComboboxOptions",$APP.Ge);$APP.Q(a,"__xComboboxQuery","");$APP.Q(a,"__xComboboxActiveIdx",0);u.wrapper=k;u.input=e;u.clear=f;u.chevron=h;u.panel=m;u.error=d;u.slot=r;$APP.Q(a,"__xComboboxRefs",u);$APP.n(a.attachInternals)&&$APP.Q(a,"__xComboboxInternals",a.attachInternals())}jy(a);ly(a);iy(a);Ux(a);return $x(a)},py=function(a){jy(a);ly(a);return $APP.Q(a,"__xComboboxModel",null)},qy=function(a,b,c,d){return $APP.I(c,
|
|
25
|
+
d)&&$APP.n($APP.l(a,"__xComboboxRefs"))?($x(a),$APP.z.j(b,"open")?$APP.n(a.hasAttribute("open"))?ky(a):ly(a):null):null},sy=function(a){$APP.Gj(a,"__xComboboxInternals");$APP.uj(a,ry);Object.defineProperty(a,"show",{value:function(){return ay(this,"programmatic")},writable:!0,configurable:!0});return Object.defineProperty(a,"hide",{value:function(){return by(this,"programmatic")},writable:!0,configurable:!0})},uy=function(){return $APP.si("x-combobox",new $APP.M(null,8,[$APP.ji,ty,$APP.hi,oy,$APP.ei,
|
|
26
|
+
py,$APP.di,qy,$APP.fi,!0,$APP.ci,my,$APP.bi,ny,$APP.ii,sy],null))};var Zx=new $APP.ch(null,new $APP.M(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),ty="value placeholder name disabled required open placement error".split(" "),ry=$APP.wg([$APP.cw,$APP.Wu,$APP.mv,$APP.Or,$APP.Wj,$APP.un,$APP.Vj,$APP.Ui,$APP.wj,$APP.Wt,$APP.gs,$APP.Zs,$APP.gt],[new $APP.M(null,2,[$APP.N,$APP.X,$APP.rj,!0],null),new $APP.M(null,2,[$APP.N,$APP.sj,$APP.W,"open"],null),new $APP.M(null,2,[$APP.N,$APP.vs,$APP.rj,!0],null),new $APP.M(null,2,[$APP.N,
|
|
27
|
+
$APP.sj,$APP.rj,!0],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"placeholder"],null),new $APP.M(null,2,[$APP.N,$APP.sj,$APP.W,"disabled"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"name"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"value"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"error"],null),new $APP.M(null,2,[$APP.N,$APP.rt,$APP.rj,!0],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"placement"],null),new $APP.M(null,2,[$APP.N,$APP.sj,$APP.W,"required"],null),new $APP.M(null,2,[$APP.N,
|
|
28
|
+
$APP.Ms,$APP.rj,!0],null)]);
|
|
29
|
+
$APP.je(["x-combobox-change-request",new $APP.M(null,2,[$APP.$u,!0,$APP.V,new $APP.M(null,3,[$APP.Ui,$APP.X,$APP.Z,$APP.X,$APP.ut,$APP.X],null)],null),"x-combobox-change",new $APP.M(null,2,[$APP.$u,!1,$APP.V,new $APP.M(null,2,[$APP.Ui,$APP.X,$APP.Z,$APP.X],null)],null),"x-combobox-input",new $APP.M(null,2,[$APP.$u,!1,$APP.V,new $APP.M(null,1,[$APP.Rq,$APP.X],null)],null),"x-combobox-toggle",new $APP.M(null,2,[$APP.$u,!0,$APP.V,new $APP.M(null,2,[$APP.Wu,$APP.sj,$APP.cu,$APP.X],null)],null)]);var gy=new $APP.J(null,8,5,$APP.K,[new $APP.J(null,4,5,$APP.K,["input","inputFocus","focus",function(a){return ay(a,"focus")}],null),new $APP.J(null,4,5,$APP.K,["input","inputInput","input",function(a,b){b=b.target.value;$APP.Q(a,"__xComboboxQuery",b);$APP.Q(a,"__xComboboxActiveIdx",0);$APP.n(a.hasAttribute("open"))||ay(a,"input");Yx(a);return $APP.fj(a,"x-combobox-input",{query:b})}],null),new $APP.J(null,4,5,$APP.K,["input","inputKeydown","keydown",function(a,b){var c=b.key;$APP.z.j(c,"ArrowDown")?
|
|
30
|
+
(b.preventDefault(),a=$APP.n(a.hasAttribute("open"))?dy(a,$APP.js):ay(a,"keyboard")):$APP.z.j(c,"ArrowUp")?(b.preventDefault(),a=$APP.n(a.hasAttribute("open"))?dy(a,$APP.cs):ay(a,"keyboard")):$APP.z.j(c,"Enter")?$APP.n(a.hasAttribute("open"))?(b.preventDefault(),a=ey(a)):a=null:$APP.z.j(c,"Escape")?$APP.n(a.hasAttribute("open"))?(b.preventDefault(),by(a,"escape"),a=$APP.l(a,"__xComboboxRefs"),a=$APP.n(a)?$APP.l(a,"input").focus():null):a=null:$APP.z.j(c,"Home")?$APP.n(a.hasAttribute("open"))?(b.preventDefault(),
|
|
31
|
+
$APP.Q(a,"__xComboboxActiveIdx",0),a=Yx(a)):a=null:$APP.z.j(c,"End")?$APP.n(a.hasAttribute("open"))?(b.preventDefault(),b=$APP.l(a,"__xComboboxQuery"),b=$APP.w(Rx($APP.l(a,"__xComboboxOptions"),$APP.n(b)?b:"")),$APP.Q(a,"__xComboboxActiveIdx",$APP.Rl.j(0,b-1)),a=Yx(a)):a=null:a=null;return a}],null),new $APP.J(null,4,5,$APP.K,["clear","clearClick","click",function(a){var b=a.getAttribute("value");return $APP.hj(a,"x-combobox-change-request",{value:"",label:"",previousValue:$APP.n(b)?b:""})?($APP.U(a,
|
|
32
|
+
"value"),$APP.U(a,"data-has-value"),b=$APP.l(a,"__xComboboxRefs"),$APP.n(b)&&(b=$APP.l(b,"input"),b.value="",b.focus()),$APP.fj(a,"x-combobox-change",{value:"",label:""})):null}],null),new $APP.J(null,4,5,$APP.K,["chevron","chevronPointerdown","pointerdown",function(a,b){b.preventDefault();if($APP.n(a.hasAttribute("open")))return by(a,"pointer");ay(a,"pointer");a=$APP.l(a,"__xComboboxRefs");return $APP.n(a)?$APP.l(a,"input").focus():null}],null),new $APP.J(null,4,5,$APP.K,["panel","panelPointerdown",
|
|
33
|
+
"pointerdown",function(a,b){return b.preventDefault()}],null),new $APP.J(null,4,5,$APP.K,["panel","panelClick","click",function(a,b){b=b.target;b=$APP.n(b.hasAttribute("data-value"))?b:b.closest("["+$APP.P.i("data-value")+"]");if($APP.n(b)){var c=b.getAttribute("data-value");return cy(a,c,b.textContent)}return null}],null),new $APP.J(null,4,5,$APP.K,["slot","slotchange","slotchange",function(a){Ux(a);$APP.Q(a,"__xComboboxModel",null);return $x(a)}],null)],null),hy=new $APP.J(null,1,5,$APP.K,[new $APP.J(null,
|
|
34
|
+
3,5,$APP.K,["focusout","focusout",function(a,b){return $APP.n(a.hasAttribute("open"))?(b=b.relatedTarget,b==null||$APP.p(a.contains(b))?by(a,"focusout"):null):null}],null)],null);$APP.ha("baredom.exports.x_combobox.init",uy);export const init=uy;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
k;return $APP.n(E)?E:""}(),B=typeof m==="string"?m:"";y=(""+$APP.P.i(h)+" "+$APP.P.i(x)+" "+$APP.P.i(y)+" "+$APP.P.i(B)).toLowerCase();x=c+1;d=$APP.
|
|
4
|
-
|
|
5
|
-
r=$APP.C(b,
|
|
6
|
-
a.getAttribute("disabled"),a.getAttribute("close-on-escape"),a.getAttribute("no-scrim"),a.getAttribute("dismissible"),a.getAttribute("modal"),a.hasAttribute("open"),a.getAttribute("placeholder")]))},
|
|
7
|
-
$APP.S(e,"data-id",""+$APP.P.i($APP.
|
|
8
|
-
var k=
|
|
9
|
-
e=
|
|
10
|
-
"aria-label",$APP.n(h)?h:"Command palette");c=$APP.G(b);c=$APP.C(c,
|
|
11
|
-
return a}return null}
|
|
12
|
-
null;$APP.n(b)&&$APP.U(b,"aria-activedescendant");
|
|
13
|
-
"__xCommandPaletteActiveIdx",c);
|
|
14
|
-
(b.preventDefault(),
|
|
15
|
-
"");$APP.Q(a,"__xCommandPaletteActiveIdx",0);$APP.
|
|
16
|
-
null;x=$APP.n(x)?$APP.l(x,"clear-btn"):null;y=$APP.n(y)?y.value:null;$APP.Q(a,"__xCommandPaletteQuery",$APP.n(y)?y:"");$APP.Q(a,"__xCommandPaletteActiveIdx",0);$APP.n(x)&&($APP.n($APP.n(y)?$APP.I(y,""):y)?$APP.U(x,"hidden"):$APP.S(x,"hidden",""));$APP.
|
|
17
|
-
e);m.addEventListener("click",d);r.addEventListener("click",c);h.addEventListener("click",b);u.input=f;u.keydown=e;u.scrim=d;u.list=c;u.clear=b;$APP.Q(a,"__xCommandPaletteHandlers",u)}
|
|
18
|
-
$APP.l(a,"scrim"));e.removeEventListener("click",$APP.l(a,"list"));return b.removeEventListener("click",$APP.l(a,"clear"))}return null},
|
|
2
|
+
var zD=function(a){return typeof a==="string"?(a=a.trim(),$APP.I(a,"")?a:null):null},CD=function(a){if(a==null||$APP.p($APP.ra(a)))return $APP.Ge;for(var b=a.length,c=0,d=$APP.yb($APP.Ge);;){if($APP.z.j(c,b))return $APP.Ab(d);var e=a[c],f=""+$APP.P.i(function(){var E=e.id;return $APP.n(E)?E:c}()),h=""+$APP.P.i(function(){var E=e.label;return $APP.n(E)?E:""}()),k=zD(e.group),m=e.value,r=e.icon,u=$APP.z.j(!0,e.disabled),x=e.keywords;x=$APP.n($APP.ra(x))?x.join(" "):typeof x==="string"?x:"";var y=function(){var E=
|
|
3
|
+
k;return $APP.n(E)?E:""}(),B=typeof m==="string"?m:"";y=(""+$APP.P.i(h)+" "+$APP.P.i(x)+" "+$APP.P.i(y)+" "+$APP.P.i(B)).toLowerCase();x=c+1;d=$APP.Td(d,new $APP.M(null,7,[$APP.ju,f,$APP.Z,h,AD,k,$APP.Ui,m,$APP.ot,r,$APP.Xj,u,BD,y],null));c=x}},ED=function(a,b){b=typeof b==="string"?b.trim():"";var c=$APP.I(b,"")?$APP.te(zD,$APP.yi(b,/\s+/)):null;if($APP.Tc(c))return new $APP.M(null,2,[$APP.wu,a,DD,$APP.Gf.j($APP.dh,$APP.te(AD,a))],null);a=$APP.Ie(function(d){return $APP.oe(function(e){return $APP.I(-1,
|
|
4
|
+
BD.i(d).indexOf(e.toLowerCase()))},c)},a);return new $APP.M(null,2,[$APP.wu,a,DD,$APP.Gf.j($APP.dh,$APP.te(AD,a))],null)},FD=function(a,b,c){var d=$APP.w(a);if(d>0)for(var e=1;;)if(e<=d){var f=$APP.ud(b+e*c,d),h=$APP.A(a,f,null),k=h;h=$APP.n(k)?$APP.p($APP.Xj.i(h)):k;if($APP.n(h))return f;e+=1}else return null;else return null},cca=function(a){var b=$APP.G(a);a=$APP.C(b,$APP.Oq);var c=$APP.C(b,$APP.Oj),d=$APP.C(b,$APP.Pj),e=$APP.C(b,GD),f=$APP.C(b,HD),h=$APP.C(b,ID),k=$APP.C(b,JD),m=$APP.C(b,KD),
|
|
5
|
+
r=$APP.C(b,LD);b=$APP.C(b,MD);b=$APP.Di(b);r=$APP.Di(r);m=$APP.Ci(m);m=b&&!m;f=f!=null?$APP.Ci(f):m;k=$APP.Di(k);return $APP.wg([$APP.Wj,$APP.Yq,ND,OD,PD,QD,$APP.Z,$APP.Bv,bca,$APP.Xj],[function(){var u=zD(c);return $APP.n(u)?u:"Search…"}(),r,function(){var u=zD(e);return $APP.n(u)?u:"No results"}(),f,k,m,zD(d),$APP.D(a),b,$APP.Ci(h)])},RD=function(a){return cca($APP.wg([$APP.Pj,GD,HD,ID,JD,KD,LD,MD,$APP.Oq,$APP.Oj],[a.getAttribute("label"),a.getAttribute("empty-text"),a.getAttribute("close-on-scrim"),
|
|
6
|
+
a.getAttribute("disabled"),a.getAttribute("close-on-escape"),a.getAttribute("no-scrim"),a.getAttribute("dismissible"),a.getAttribute("modal"),a.hasAttribute("open"),a.getAttribute("placeholder")]))},dca=function(a,b){var c=document.createElement("div");$APP.S(c,"part","group-header");$APP.S(c,"aria-hidden","true");c.textContent=b;a.appendChild(c)},eca=function(a,b,c,d){var e=document.createElement("div");$APP.S(e,"part","item");$APP.S(e,"role","option");$APP.S(e,"id",""+$APP.P.i("x-cp-item-")+$APP.P.i(b));
|
|
7
|
+
$APP.S(e,"data-id",""+$APP.P.i($APP.ju.i(c)));$APP.S(e,"data-idx",""+$APP.P.i(b));$APP.S(e,"tabindex","-1");$APP.n($APP.Xj.i(c))&&$APP.S(e,"aria-disabled","true");e.textContent=$APP.Z.i(c);$APP.z.j(b,d)&&$APP.S(e,"aria-selected","true");a.appendChild(e)},fca=function(a,b){$APP.U(a,"hidden");return $APP.n(b)?$APP.U(b,"aria-activedescendant"):null},gca=function(a,b,c,d,e){$APP.S(a,"hidden","");a=$APP.se($APP.Dp,d);for(var f=null;;)if(d=$APP.t(a),$APP.n(d)){var h=d;d=$APP.A(h,0,null);h=$APP.A(h,1,null);
|
|
8
|
+
var k=AD.i(h);$APP.n(function(){var m=k;return $APP.n(m)?$APP.I(k,f):m}())&&dca(b,k);eca(b,d,h,e);a=$APP.gc(a);f=d=function(){var m=k;return $APP.n(m)?m:f}()}else break;return $APP.n(c)?$APP.S(c,"aria-activedescendant",""+$APP.P.i("x-cp-item-")+$APP.P.i(e)):null},SD=function(a){var b=$APP.l(a,"__xCommandPaletteRefs");if($APP.n(b)){var c=$APP.l(b,"list"),d=$APP.l(b,"empty");b=$APP.l(b,"input");var e=function(){var h=$APP.l(a,"__xCommandPaletteQuery");return $APP.n(h)?h:""}(),f=CD($APP.l(a,"__xCommandPaletteItems"));
|
|
9
|
+
e=ED(f,e);e=$APP.G(e);e=$APP.C(e,$APP.wu);f=function(){var h=$APP.l(a,"__xCommandPaletteActiveIdx");return $APP.n(h)?h:0}();c.textContent="";return $APP.Tc(e)?fca(d,b):gca(d,c,b,e,f)}return null},TD=function(a){if($APP.n($APP.l(a,"__xCommandPaletteRefs"))){var b=RD(a);if($APP.I($APP.l(a,"__xCommandPaletteModel"),b)){var c=$APP.l(a,"__xCommandPaletteRefs");if($APP.n(c)){var d=$APP.l(c,"overlay"),e=$APP.l(c,"input"),f=$APP.l(c,"empty");c=$APP.l(c,"panel");var h=$APP.G(b);h=$APP.C(h,$APP.Z);$APP.S(c,
|
|
10
|
+
"aria-label",$APP.n(h)?h:"Command palette");c=$APP.G(b);c=$APP.C(c,QD);$APP.n(c)?$APP.U(d,"hidden"):$APP.S(d,"hidden","");h=$APP.G(b);d=$APP.C(h,$APP.Wj);c=$APP.C(h,$APP.Bv);h=$APP.C(h,$APP.Xj);$APP.S(e,"placeholder",d);$APP.S(e,"aria-expanded",$APP.n(c)?"true":"false");$APP.n(h)?($APP.S(e,"disabled",""),$APP.S(e,"aria-disabled","true")):($APP.U(e,"disabled"),$APP.U(e,"aria-disabled"));e=$APP.G(b);e=$APP.C(e,ND);f.textContent=e;SD(a);a=$APP.Q(a,"__xCommandPaletteModel",b)}else a=null}else a=null;
|
|
11
|
+
return a}return null},UD=function(a){if($APP.n(a.hasAttribute("open")))a=null;else if($APP.hj(a,"x-command-palette-open-request",{})){$APP.S(a,"open","");var b=$APP.l(a,"__xCommandPaletteRefs");b=$APP.n(b)?$APP.l(b,"input"):null;$APP.n(b)&&b.focus();TD(a);a=$APP.fj(a,"x-command-palette-open",{})}else a=null;return a},VD=function(a){if($APP.n(a.hasAttribute("open")))if($APP.hj(a,"x-command-palette-close-request",{})){$APP.U(a,"open");var b=$APP.l(a,"__xCommandPaletteRefs");b=$APP.n(b)?$APP.l(b,"input"):
|
|
12
|
+
null;$APP.n(b)&&$APP.U(b,"aria-activedescendant");TD(a);a=$APP.fj(a,"x-command-palette-close",{})}else a=null;else a=null;return a},WD=function(a){var b=$APP.l(a,"__xCommandPaletteQuery");b=$APP.n(b)?b:"";a=CD($APP.l(a,"__xCommandPaletteItems"));a=ED(a,b);a=$APP.G(a);return $APP.C(a,$APP.wu)},YD=function(a,b){var c=WD(a);var d=$APP.l(a,"__xCommandPaletteActiveIdx");d=$APP.n(d)?d:0;$APP.z.j(b,XD)?(c=FD(c,$APP.n(d)?d:-1,1),c=$APP.n(c)?c:0):(b=$APP.w(c),c=FD(c,$APP.n(d)?d:b,-1),c=$APP.n(c)?c:0);$APP.Q(a,
|
|
13
|
+
"__xCommandPaletteActiveIdx",c);SD(a);a=$APP.l(a,"__xCommandPaletteRefs");a=$APP.n(a)?$APP.l(a,"list"):null;a=$APP.n(a)?a.querySelector("["+$APP.P.i("data-idx")+"\x3d'"+$APP.P.i(c)+"']"):null;return $APP.n(a)?a.scrollIntoView({block:"nearest"}):null},ZD=function(a,b){return $APP.n($APP.n(b)?$APP.p($APP.Xj.i(b)):b)&&$APP.hj(a,"x-command-palette-select-request",{item:$APP.an(b)})?($APP.fj(a,"x-command-palette-select",{item:$APP.an(b)}),VD(a)):null},ica=function(a,b){var c=b.key;return $APP.z.j(c,"ArrowDown")?
|
|
14
|
+
(b.preventDefault(),YD(a,XD)):$APP.z.j(c,"ArrowUp")?(b.preventDefault(),YD(a,hca)):$APP.z.j(c,"Enter")?(b.preventDefault(),b=WD(a),c=$APP.l(a,"__xCommandPaletteActiveIdx"),ZD(a,$APP.A(b,$APP.n(c)?c:0,null))):$APP.z.j(c,"Escape")?(b=RD(a),$APP.n(PD.i(b))?VD(a):null):null},jca=function(a){function b(){var x=$APP.l(a,"__xCommandPaletteRefs"),y=$APP.n(x)?$APP.l(x,"input"):null;x=$APP.n(x)?$APP.l(x,"clear-btn"):null;$APP.n(y)&&(y.value="");$APP.n(x)&&$APP.S(x,"hidden","");$APP.Q(a,"__xCommandPaletteQuery",
|
|
15
|
+
"");$APP.Q(a,"__xCommandPaletteActiveIdx",0);$APP.fj(a,"x-command-palette-query-change",{query:""});SD(a);return $APP.n(y)?y.focus():null}function c(x){x=x.target.closest("["+$APP.P.i("part")+"\x3d"+$APP.P.i("item")+"]");if($APP.n(x)){x=parseInt(x.getAttribute("data-idx"),10);var y=WD(a);x=ZD(a,$APP.A(y,x,null))}else x=null;return x}function d(){var x=RD(a);return $APP.n(OD.i(x))?VD(a):null}function e(x){return ica(a,x)}function f(){var x=$APP.l(a,"__xCommandPaletteRefs"),y=$APP.n(x)?$APP.l(x,"input"):
|
|
16
|
+
null;x=$APP.n(x)?$APP.l(x,"clear-btn"):null;y=$APP.n(y)?y.value:null;$APP.Q(a,"__xCommandPaletteQuery",$APP.n(y)?y:"");$APP.Q(a,"__xCommandPaletteActiveIdx",0);$APP.n(x)&&($APP.n($APP.n(y)?$APP.I(y,""):y)?$APP.U(x,"hidden"):$APP.S(x,"hidden",""));$APP.fj(a,"x-command-palette-query-change",{query:$APP.n(y)?y:""});return SD(a)}var h=$APP.l(a,"__xCommandPaletteRefs"),k=$APP.l(h,"input"),m=$APP.l(h,"overlay"),r=$APP.l(h,"list");h=$APP.l(h,"clear-btn");var u={};k.addEventListener("input",f);k.addEventListener("keydown",
|
|
17
|
+
e);m.addEventListener("click",d);r.addEventListener("click",c);h.addEventListener("click",b);u.input=f;u.keydown=e;u.scrim=d;u.list=c;u.clear=b;$APP.Q(a,"__xCommandPaletteHandlers",u)},$D=function(a){var b=$APP.l(a,"__xCommandPaletteRefs");a=$APP.l(a,"__xCommandPaletteHandlers");if($APP.n($APP.n(b)?a:b)){var c=$APP.l(b,"input"),d=$APP.l(b,"overlay"),e=$APP.l(b,"list");b=$APP.l(b,"clear-btn");c.removeEventListener("input",$APP.l(a,"input"));c.removeEventListener("keydown",$APP.l(a,"keydown"));d.removeEventListener("click",
|
|
18
|
+
$APP.l(a,"scrim"));e.removeEventListener("click",$APP.l(a,"list"));return b.removeEventListener("click",$APP.l(a,"clear"))}return null},kca=function(a){if(!$APP.n($APP.l(a,"__xCommandPaletteRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div");$APP.S(d,"part","overlay");var e=document.createElement("div");var f=document.createElement("span"),h=document.createElement("input"),k=document.createElement("button");$APP.S(e,"part","search-wrap");
|
|
19
19
|
$APP.S(f,"part","search-icon");$APP.S(f,"aria-hidden","true");f.textContent="\ud83d\udd0d";$APP.S(h,"part","input");$APP.S(h,"type","search");$APP.S(h,"role","combobox");$APP.S(h,"autocomplete","off");$APP.S(h,"autocorrect","off");$APP.S(h,"spellcheck","false");$APP.S(h,"aria-autocomplete","list");$APP.S(h,"aria-expanded","false");$APP.S(h,"aria-controls","x-cp-list");$APP.S(k,"part","clear-btn");$APP.S(k,"type","button");$APP.S(k,"aria-label","Clear");$APP.S(k,"hidden","");e.appendChild(f);e.appendChild(h);
|
|
20
|
-
e.appendChild(k);e=new $APP.M(null,3,[
|
|
21
|
-
$APP.S(k,"aria-modal","true");k.appendChild(
|
|
22
|
-
b.appendChild(c);b.appendChild(d);b.appendChild(k);f.overlay=d;f.panel=k;b=
|
|
23
|
-
"items",{configurable:!0,enumerable:!0,get:function(){var b=$APP.l(this,"__xCommandPaletteItems");return $APP.n(b)?b:[]},set:function(b){$APP.Q(this,"__xCommandPaletteItems",b);$APP.Q(this,"__xCommandPaletteActiveIdx",0);return
|
|
24
|
-
writable:!0,value:function(){return $APP.n(this.hasAttribute("open"))?
|
|
25
|
-
|
|
26
|
-
556931961),
|
|
27
|
-
"disabled-raw","disabled-raw",498098381);var
|
|
28
|
-
$APP.
|
|
29
|
-
[$APP
|
|
20
|
+
e.appendChild(k);e=new $APP.M(null,3,[aE,e,bE,h,cE,k],null);f=document.createElement("div");h=document.createElement("div");k=document.createElement("div");$APP.S(f,"part","list-wrap");$APP.S(h,"part","list");$APP.S(h,"id","x-cp-list");$APP.S(h,"role","listbox");$APP.S(h,"aria-label","Results");$APP.S(k,"part","empty");$APP.S(k,"hidden","");f.appendChild(h);f.appendChild(k);h=new $APP.M(null,3,[dE,f,eE,h,$APP.At,k],null);k=document.createElement("div");$APP.S(k,"part","panel");$APP.S(k,"role","dialog");
|
|
21
|
+
$APP.S(k,"aria-modal","true");k.appendChild(aE.i(e));k.appendChild(dE.i(h));f={};c.textContent=":host{display:contents;}[part\x3doverlay]{display:none;position:fixed;inset:0;background:var(--x-command-palette-backdrop,rgba(0,0,0,0.45));z-index:var(--x-command-palette-z,800);}[part\x3dpanel]{display:none;position:fixed;top:20vh;left:50%;transform:translateX(-50%);width:var(--x-command-palette-width,560px);max-width:calc(100vw - 2rem);max-height:60dvh;z-index:calc(var(--x-command-palette-z,800) + 1);flex-direction:column;border-radius:var(--x-command-palette-radius,var(--x-radius-lg,12px));background:var(--x-command-palette-bg,var(--x-color-bg,#fff));box-shadow:var(--x-command-palette-shadow,var(--x-shadow-lg,0 20px 60px rgba(0,0,0,0.25),0 4px 16px rgba(0,0,0,0.12)));overflow:hidden;}:host([open]) [part\x3doverlay]{display:block;}:host([open]) [part\x3dpanel]{display:flex;}[part\x3dsearch-wrap]{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--x-command-palette-divider,rgba(0,0,0,0.08));}[part\x3dsearch-icon]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;color:var(--x-command-palette-icon-color,var(--x-color-text-muted,#64748b));}[part\x3dinput]{flex:1;border:none;outline:none;background:transparent;font-size:1rem;line-height:1.5;color:var(--x-command-palette-text,inherit);}[part\x3dinput]::placeholder{color:var(--x-command-palette-placeholder,var(--x-color-text-muted,#94a3b8));}[part\x3dclear-btn]{all:unset;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;color:var(--x-command-palette-icon-color,var(--x-color-text-muted,#64748b));}[part\x3dclear-btn]:focus-visible{outline:2px solid var(--x-command-palette-focus-ring,var(--x-color-focus-ring,#60a5fa));}[part\x3dclear-btn][hidden]{display:none;}[part\x3dlist-wrap]{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:8px 0;}[part\x3dlist]{display:flex;flex-direction:column;}[part\x3ditem]{padding:10px 16px;cursor:default;font-size:var(--x-font-size-sm,0.9375rem);line-height:1.4;color:var(--x-command-palette-item-text,inherit);border-radius:0;outline:none;}[part\x3ditem]:hover,[part\x3ditem]:focus{background:var(--x-command-palette-item-hover,var(--x-color-surface-active,#f1f5f9));}[part\x3ditem][aria-selected\x3dtrue]{background:var(--x-command-palette-item-active,#e0e7ff);color:var(--x-command-palette-item-active-text,#3730a3);}[part\x3ditem][aria-disabled\x3dtrue]{opacity:0.45;cursor:default;pointer-events:none;}[part\x3dgroup-header]{padding:8px 16px 4px;font-size:0.75rem;font-weight:600;letter-spacing:0.05em;text-transform:uppercase;color:var(--x-command-palette-group-text,var(--x-color-text-muted,#94a3b8));}[part\x3dempty]{padding:32px 16px;text-align:center;color:var(--x-command-palette-empty-text,var(--x-color-text-muted,#94a3b8));font-size:0.9375rem;}[part\x3dempty][hidden]{display:none;}@media (prefers-color-scheme:dark){[part\x3dpanel]{background:var(--x-command-palette-bg,var(--x-color-bg,#1e293b));box-shadow:var(--x-command-palette-shadow,var(--x-shadow-lg,0 20px 60px rgba(0,0,0,0.6),0 4px 16px rgba(0,0,0,0.4)));}[part\x3dsearch-wrap]{border-bottom-color:var(--x-command-palette-divider,rgba(255,255,255,0.08));}[part\x3ditem]:hover,[part\x3ditem]:focus{background:var(--x-command-palette-item-hover,var(--x-color-text-muted,#334155));}[part\x3ditem][aria-selected\x3dtrue]{background:var(--x-command-palette-item-active,#312e81);color:var(--x-command-palette-item-active-text,#c7d2fe);}}@media (prefers-reduced-motion:reduce){[part\x3dpanel],[part\x3doverlay]{transition:none;}}";
|
|
22
|
+
b.appendChild(c);b.appendChild(d);b.appendChild(k);f.overlay=d;f.panel=k;b=bE.i(e);f.input=b;b=cE.i(e);f["clear-btn"]=b;b=eE.i(h);f.list=b;b=$APP.At.i(h);f.empty=b;$APP.Q(a,"__xCommandPaletteRefs",f)}$D(a);jca(a);return TD(a)},lca=function(a){return $D(a)},mca=function(a,b,c,d){if($APP.I(c,d)&&(TD(a),$APP.z.j(b,"open")&&d!=null)){a=$APP.l(a,"__xCommandPaletteRefs");var e=$APP.n(a)?$APP.l(a,"input"):null;return $APP.n(e)?requestAnimationFrame(function(){return e.focus()}):null}return null},nca=function(a){Object.defineProperty(a,
|
|
23
|
+
"items",{configurable:!0,enumerable:!0,get:function(){var b=$APP.l(this,"__xCommandPaletteItems");return $APP.n(b)?b:[]},set:function(b){$APP.Q(this,"__xCommandPaletteItems",b);$APP.Q(this,"__xCommandPaletteActiveIdx",0);return SD(this)}})},oca=function(a){Object.defineProperty(a,"show",{configurable:!0,writable:!0,value:function(){return UD(this)}});Object.defineProperty(a,"close",{configurable:!0,writable:!0,value:function(){return VD(this)}});return Object.defineProperty(a,"toggle",{configurable:!0,
|
|
24
|
+
writable:!0,value:function(){return $APP.n(this.hasAttribute("open"))?VD(this):UD(this)}})},pca=function(a){$APP.kj(a,"open","open");$APP.kj(a,"disabled","disabled");nca(a);return oca(a)},fE=function(){return $APP.si("x-command-palette",new $APP.M(null,5,[$APP.ji,qca,$APP.hi,kca,$APP.ei,lca,$APP.di,mca,$APP.ii,pca],null))},ND=new $APP.F(null,"empty-text","empty-text",1554384594),cE=new $APP.F(null,"clear-btn","clear-btn",1023677608),HD=new $APP.F(null,"close-on-scrim-raw","close-on-scrim-raw",159828234),
|
|
25
|
+
GD=new $APP.F(null,"empty-text-raw","empty-text-raw",1477406757),LD=new $APP.F(null,"dismissible-raw","dismissible-raw",947680658),eE=new $APP.F(null,"list","list",765357683),MD=new $APP.F(null,"modal-raw","modal-raw",-263722282),PD=new $APP.F(null,"close-on-escape?","close-on-escape?",-1559868909),DD=new $APP.F(null,"groups","groups",-136896102),JD=new $APP.F(null,"close-on-escape-raw","close-on-escape-raw",-1942646255),QD=new $APP.F(null,"scrim?","scrim?",744210580),bE=new $APP.F(null,"input","input",
|
|
26
|
+
556931961),KD=new $APP.F(null,"no-scrim-raw","no-scrim-raw",-1344365743),OD=new $APP.F(null,"close-on-scrim?","close-on-scrim?",-367113965),AD=new $APP.F(null,"group","group",582596132),XD=new $APP.F(null,"down","down",1565245570),BD=new $APP.F(null,"search-str","search-str",-821246171),hca=new $APP.F(null,"up","up",-269712113),bca=new $APP.F(null,"modal?","modal?",2146094679),aE=new $APP.F(null,"search-wrap","search-wrap",-1719739506),dE=new $APP.F(null,"list-wrap","list-wrap",-510225298),ID=new $APP.F(null,
|
|
27
|
+
"disabled-raw","disabled-raw",498098381);var qca="open modal dismissible disabled no-scrim close-on-scrim close-on-escape label placeholder empty-text".split(" ");
|
|
28
|
+
$APP.je(["x-command-palette-open-request",new $APP.M(null,2,[$APP.$u,!0,$APP.V,$APP.ke],null),"x-command-palette-open",new $APP.M(null,2,[$APP.$u,!1,$APP.V,$APP.ke],null),"x-command-palette-close-request",new $APP.M(null,2,[$APP.$u,!0,$APP.V,$APP.ke],null),"x-command-palette-close",new $APP.M(null,2,[$APP.$u,!1,$APP.V,$APP.ke],null),"x-command-palette-select-request",new $APP.M(null,2,[$APP.$u,!0,$APP.V,new $APP.M(null,1,[$APP.Ks,$APP.St],null)],null),"x-command-palette-select",new $APP.M(null,2,
|
|
29
|
+
[$APP.$u,!1,$APP.V,new $APP.M(null,1,[$APP.Ks,$APP.St],null)],null),"x-command-palette-query-change",new $APP.M(null,2,[$APP.$u,!1,$APP.V,new $APP.M(null,1,[$APP.Rq,$APP.X],null)],null)]);$APP.ha("baredom.exports.x_command_palette.init",fE);export const init=fE;
|