@vanelsas/baredom 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +12 -41
  3. package/custom-elements.json +344 -5
  4. package/dist/baredom.d.ts +4 -0
  5. package/dist/base.js +451 -421
  6. package/dist/integrity.json +97 -93
  7. package/dist/x-alert.js +17 -19
  8. package/dist/x-avatar-group.js +9 -11
  9. package/dist/x-avatar.js +15 -15
  10. package/dist/x-badge.js +9 -11
  11. package/dist/x-bento-grid.js +5 -5
  12. package/dist/x-bento-item.js +4 -4
  13. package/dist/x-breadcrumbs.js +13 -14
  14. package/dist/x-button.js +16 -16
  15. package/dist/x-cancel-dialogue.js +13 -17
  16. package/dist/x-card.js +7 -7
  17. package/dist/x-carousel.js +33 -34
  18. package/dist/x-chart.d.ts +26 -0
  19. package/dist/x-chart.js +47 -48
  20. package/dist/x-checkbox.js +11 -11
  21. package/dist/x-chip.js +1 -9
  22. package/dist/x-collapse.js +10 -12
  23. package/dist/x-color-picker.js +44 -45
  24. package/dist/x-combobox.js +26 -27
  25. package/dist/x-command-palette.js +26 -27
  26. package/dist/x-container.js +5 -6
  27. package/dist/x-context-menu.d.ts +31 -2
  28. package/dist/x-context-menu.js +20 -18
  29. package/dist/x-copy.js +20 -23
  30. package/dist/x-currency-field.js +23 -25
  31. package/dist/x-date-picker.d.ts +27 -0
  32. package/dist/x-date-picker.js +42 -42
  33. package/dist/x-divider.js +9 -10
  34. package/dist/x-drawer.js +10 -12
  35. package/dist/x-dropdown.js +11 -11
  36. package/dist/x-fieldset.js +5 -6
  37. package/dist/x-file-download.js +7 -8
  38. package/dist/x-file-upload.js +22 -25
  39. package/dist/x-form-field.js +15 -17
  40. package/dist/x-form.js +9 -10
  41. package/dist/x-gaussian-blur.js +13 -19
  42. package/dist/x-grid.js +6 -6
  43. package/dist/x-i18n-provider.d.ts +43 -0
  44. package/dist/x-i18n-provider.js +8 -0
  45. package/dist/x-i18n.d.ts +14 -0
  46. package/dist/x-i18n.js +5 -0
  47. package/dist/x-icon.js +6 -7
  48. package/dist/x-image.js +18 -19
  49. package/dist/x-kinetic-canvas.d.ts +18 -0
  50. package/dist/x-kinetic-canvas.js +26 -0
  51. package/dist/x-kinetic-font.js +27 -29
  52. package/dist/x-kinetic-typography.js +33 -39
  53. package/dist/x-liquid-dock.js +39 -39
  54. package/dist/x-liquid-fill.js +45 -45
  55. package/dist/x-liquid-glass.js +47 -47
  56. package/dist/x-menu-item.js +8 -10
  57. package/dist/x-menu.js +10 -11
  58. package/dist/x-metaball-cursor.js +27 -27
  59. package/dist/x-modal.js +11 -13
  60. package/dist/x-morph-stack.js +37 -39
  61. package/dist/x-multi-combobox.d.ts +50 -0
  62. package/dist/x-multi-combobox.js +37 -0
  63. package/dist/x-navbar.js +12 -13
  64. package/dist/x-neural-glow.js +33 -34
  65. package/dist/x-notification-center.js +9 -10
  66. package/dist/x-organic-divider.js +17 -19
  67. package/dist/x-organic-progress.js +38 -39
  68. package/dist/x-organic-shape.js +13 -14
  69. package/dist/x-pagination.js +15 -17
  70. package/dist/x-particle-button.js +51 -52
  71. package/dist/x-popover.js +26 -25
  72. package/dist/x-progress-circle.js +9 -11
  73. package/dist/x-progress.js +10 -11
  74. package/dist/x-radio.js +11 -12
  75. package/dist/x-ripple-effect.js +11 -12
  76. package/dist/x-scroll-parallax.js +18 -19
  77. package/dist/x-scroll-stack.js +17 -18
  78. package/dist/x-scroll-story.js +34 -36
  79. package/dist/x-scroll-timeline.js +45 -47
  80. package/dist/x-scroll.js +40 -42
  81. package/dist/x-search-field.js +15 -17
  82. package/dist/x-select.js +11 -11
  83. package/dist/x-sidebar.js +17 -17
  84. package/dist/x-skeleton-group.js +12 -14
  85. package/dist/x-skeleton.js +1 -1
  86. package/dist/x-slider.js +15 -18
  87. package/dist/x-soft-body.js +22 -22
  88. package/dist/x-spacer.js +4 -5
  89. package/dist/x-spinner.js +4 -6
  90. package/dist/x-splash.js +12 -13
  91. package/dist/x-stat.js +10 -12
  92. package/dist/x-stepper.js +14 -15
  93. package/dist/x-switch.js +10 -11
  94. package/dist/x-tab.js +7 -8
  95. package/dist/x-table-cell.js +20 -24
  96. package/dist/x-table-row.js +8 -10
  97. package/dist/x-table.js +12 -16
  98. package/dist/x-tabs.js +11 -11
  99. package/dist/x-text-area.js +19 -21
  100. package/dist/x-theme.d.ts +1 -1
  101. package/dist/x-theme.js +25 -25
  102. package/dist/x-timeline-item.js +21 -23
  103. package/dist/x-timeline.js +8 -9
  104. package/dist/x-toast.js +22 -24
  105. package/dist/x-toaster.js +8 -8
  106. package/dist/x-tooltip.js +12 -13
  107. package/dist/x-typography.js +9 -11
  108. package/dist/x-welcome-tour.js +60 -65
  109. package/package.json +201 -181
@@ -1,28 +1,27 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Uu=function(a){return a==null?!0:$APP.N(a,"false")},Vu=function(a){return typeof a==="string"?(a=a.trim(),$APP.N(a,"")?a:null):null},Yu=function(a){if(a==null||$APP.r($APP.na(a)))return $APP.fe;for(var b=a.length,c=0,d=$APP.rb($APP.fe);;){if($APP.B.i(c,b))return $APP.tb(d);var e=a[c],g=""+$APP.T.g(function(){var A=e.id;return $APP.n(A)?A:c}()),h=""+$APP.T.g(function(){var A=e.label;return $APP.n(A)?A:""}()),l=Vu(e.group),m=e.value,p=e.icon,q=$APP.B.i(!0,e.disabled),v=e.keywords;v=$APP.n($APP.na(v))?
3
- v.join(" "):typeof v==="string"?v:"";var x=function(){var A=l;return $APP.n(A)?A:""}(),y=typeof m==="string"?m:"";x=(""+$APP.T.g(h)+" "+$APP.T.g(v)+" "+$APP.T.g(x)+" "+$APP.T.g(y)).toLowerCase();v=c+1;d=$APP.Cd(d,new $APP.Q(null,7,[$APP.zl,g,$APP.U,h,Wu,l,$APP.Yi,m,$APP.Qk,p,$APP.X,q,Xu,x],null));c=v}},$u=function(a,b){b=typeof b==="string"?b.trim():"";var c=$APP.N(b,"")?$APP.Yd(Vu,$APP.Hg(b,/\s+/)):null;if($APP.Hc(c))return new $APP.Q(null,2,[$APP.Ml,a,Zu,$APP.We.i($APP.Tf,$APP.Yd(Wu,a))],null);
4
- a=$APP.he(function(d){return $APP.Sd(function(e){return $APP.N(-1,Xu.g(d).indexOf(e.toLowerCase()))},c)},a);return new $APP.Q(null,2,[$APP.Ml,a,Zu,$APP.We.i($APP.Tf,$APP.Yd(Wu,a))],null)},av=function(a,b,c){var d=$APP.z(a);if(d>0)for(var e=1;;)if(e<=d){var g=$APP.fd(b+e*c,d),h=$APP.Ac(a,g,null),l=h;h=$APP.n(l)?$APP.r($APP.X.g(h)):l;if($APP.n(h))return g;e+=1}else return null;else return null},nv=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Gi);var c=$APP.D(b,$APP.Pi),d=$APP.D(b,$APP.pi),e=$APP.D(b,
5
- bv),g=$APP.D(b,cv),h=$APP.D(b,dv),l=$APP.D(b,ev),m=$APP.D(b,fv),p=$APP.D(b,gv);b=$APP.D(b,hv);b=Uu(b);p=Uu(p);m=$APP.Kg(m);m=b&&!m;g=g!=null?$APP.Kg(g):m;l=Uu(l);return $APP.zf([$APP.sm,$APP.Oi,iv,jv,kv,lv,$APP.U,$APP.Om,mv,$APP.X],[function(){var q=Vu(c);return $APP.n(q)?q:"Search…"}(),p,function(){var q=Vu(e);return $APP.n(q)?q:"No results"}(),g,l,m,Vu(d),$APP.F(a),b,$APP.Kg(h)])},ov=function(a){return document.createElement(a)},pv=function(a){return nv($APP.zf([$APP.pi,bv,cv,dv,ev,fv,gv,hv,$APP.Gi,
6
- $APP.Pi],[a.getAttribute("label"),a.getAttribute("empty-text"),a.getAttribute("close-on-scrim"),a.getAttribute("disabled"),a.getAttribute("close-on-escape"),a.getAttribute("no-scrim"),a.getAttribute("dismissible"),a.getAttribute("modal"),a.hasAttribute("open"),a.getAttribute("placeholder")]))},qv=function(a,b,c,d){b=new CustomEvent(b,{detail:d,bubbles:!0,composed:!0,cancelable:$APP.F(c)});a.dispatchEvent(b);return b},rv=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");if($APP.n(b)){var c=$APP.k(b,
7
- "list"),d=$APP.k(b,"empty");b=$APP.k(b,"input");var e=function(){var q=$APP.k(a,"__xCommandPaletteQuery");return $APP.n(q)?q:""}(),g=Yu($APP.k(a,"__xCommandPaletteItems"));e=$u(g,e);e=$APP.M(e);g=$APP.D(e,$APP.Ml);e=function(){var q=$APP.k(a,"__xCommandPaletteActiveIdx");return $APP.n(q)?q:0}();c.textContent="";if($APP.Hc(g))return d.removeAttribute("hidden"),$APP.n(b)?b.removeAttribute("aria-activedescendant"):null;d.setAttribute("hidden","");d=$APP.Wd($APP.xh,g);for(var h=null;;)if(g=$APP.u(d),
8
- $APP.n(g)){var l=g;g=$APP.Ac(l,0,null);l=$APP.Ac(l,1,null);var m=Wu.g(l);if($APP.n(function(){var q=m;return $APP.n(q)?$APP.N(m,h):q}())){var p=ov("div");p.setAttribute("part","group-header");p.setAttribute("aria-hidden","true");p.textContent=m;c.appendChild(p)}p=ov("div");p.setAttribute("part","item");p.setAttribute("role","option");p.setAttribute("id","x-cp-item-"+$APP.T.g(g));p.setAttribute("data-id",""+$APP.T.g($APP.zl.g(l)));p.setAttribute("data-idx",""+$APP.T.g(g));p.setAttribute("tabindex",
9
- "-1");$APP.n($APP.X.g(l))&&p.setAttribute("aria-disabled","true");p.textContent=$APP.U.g(l);$APP.B.i(g,e)&&p.setAttribute("aria-selected","true");c.appendChild(p);d=$APP.Yb(d);h=g=function(){var q=m;return $APP.n(q)?q:h}()}else break;return $APP.n(b)?b.setAttribute("aria-activedescendant","x-cp-item-"+$APP.T.g(e)):null}return null},sv=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");if($APP.n(b)){var c=pv(a),d=$APP.k(b,"panel"),e=$APP.k(b,"input"),g=$APP.k(b,"overlay");b=$APP.k(b,"empty");var h=
10
- $APP.U.g(c),l=$APP.sm.g(c),m=iv.g(c);$APP.n(h)?d.setAttribute("aria-label",h):d.setAttribute("aria-label","Command palette");$APP.n(lv.g(c))?g.removeAttribute("hidden"):g.setAttribute("hidden","");e.setAttribute("placeholder",l);e.setAttribute("aria-expanded",$APP.n($APP.Om.g(c))?"true":"false");$APP.n($APP.X.g(c))&&(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true"));$APP.n($APP.X.g(c))||(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"));b.textContent=m;return rv(a)}return null},
11
- tv=function(a){if($APP.n(a.hasAttribute("open")))return null;var b=qv(a,"x-command-palette-open-request",!0,{});$APP.n(b.defaultPrevented)?a=null:(a.setAttribute("open",""),b=$APP.k(a,"__xCommandPaletteRefs"),b=$APP.n(b)?$APP.k(b,"input"):null,$APP.n(b)&&b.focus(),sv(a),a=qv(a,"x-command-palette-open",!1,{}));return a},uv=function(a){if($APP.n(a.hasAttribute("open"))){var b=qv(a,"x-command-palette-close-request",!0,{});$APP.n(b.defaultPrevented)?a=null:(a.removeAttribute("open"),b=$APP.k(a,"__xCommandPaletteRefs"),
12
- b=$APP.n(b)?$APP.k(b,"input"):null,$APP.n(b)&&b.removeAttribute("aria-activedescendant"),sv(a),a=qv(a,"x-command-palette-close",!1,{}));return a}return null},vv=function(a){var b=$APP.k(a,"__xCommandPaletteQuery");b=$APP.n(b)?b:"";a=Yu($APP.k(a,"__xCommandPaletteItems"));a=$u(a,b);a=$APP.M(a);return $APP.D(a,$APP.Ml)},xv=function(a,b){var c=vv(a);var d=$APP.k(a,"__xCommandPaletteActiveIdx");d=$APP.n(d)?d:0;$APP.B.i(b,wv)?(c=av(c,$APP.n(d)?d:-1,1),c=$APP.n(c)?c:0):(b=$APP.z(c),c=av(c,$APP.n(d)?d:b,
13
- -1),c=$APP.n(c)?c:0);a.__xCommandPaletteActiveIdx=c;rv(a);a=$APP.k(a,"__xCommandPaletteRefs");a=$APP.n(a)?$APP.k(a,"list"):null;a=$APP.n(a)?a.querySelector("[data-idx\x3d'"+$APP.T.g(c)+"']"):null;return $APP.n(a)?a.scrollIntoView({block:"nearest"}):null},zv=function(a,b){var c=b.key;return $APP.B.i(c,"ArrowDown")?(b.preventDefault(),xv(a,wv)):$APP.B.i(c,"ArrowUp")?(b.preventDefault(),xv(a,yv)):$APP.B.i(c,"Enter")?(b.preventDefault(),b=vv(a),c=$APP.k(a,"__xCommandPaletteActiveIdx"),b=$APP.Ac(b,$APP.n(c)?
14
- c:0,null),$APP.n($APP.n(b)?$APP.r($APP.X.g(b)):b)?(c=qv(a,"x-command-palette-select-request",!0,{item:$APP.Hh(b)}),$APP.n(c.defaultPrevented)?a=null:(qv(a,"x-command-palette-select",!1,{item:$APP.Hh(b)}),a=uv(a))):a=null,a):$APP.B.i(c,"Escape")?(b=pv(a),$APP.n(kv.g(b))?uv(a):null):null},Av=function(a){function b(){var q=$APP.k(a,"__xCommandPaletteRefs"),v=$APP.n(q)?$APP.k(q,"input"):null;q=$APP.n(q)?$APP.k(q,"clear-btn"):null;$APP.n(v)&&(v.value="");$APP.n(q)&&q.setAttribute("hidden","");a.__xCommandPaletteQuery=
15
- "";a.__xCommandPaletteActiveIdx=0;qv(a,"x-command-palette-query-change",!1,{query:""});rv(a);return $APP.n(v)?v.focus():null}function c(q){a:{q=q.target.closest("[part\x3ditem]");if($APP.n(q)){q=parseInt(q.getAttribute("data-idx"),10);var v=vv(a);q=$APP.Ac(v,q,null);if($APP.n($APP.n(q)?$APP.r($APP.X.g(q)):q)){v=qv(a,"x-command-palette-select-request",!0,{item:$APP.Hh(q)});if($APP.n(v.defaultPrevented)){q=null;break a}qv(a,"x-command-palette-select",!1,{item:$APP.Hh(q)});q=uv(a);break a}}q=null}return q}
16
- function d(){var q=pv(a);return $APP.n(jv.g(q))?uv(a):null}function e(q){return zv(a,q)}function g(){var q=$APP.k(a,"__xCommandPaletteRefs"),v=$APP.n(q)?$APP.k(q,"input"):null;q=$APP.n(q)?$APP.k(q,"clear-btn"):null;v=$APP.n(v)?v.value:null;a.__xCommandPaletteQuery=$APP.n(v)?v:"";a.__xCommandPaletteActiveIdx=0;$APP.n(q)&&($APP.n($APP.n(v)?$APP.N(v,""):v)?q.removeAttribute("hidden"):q.setAttribute("hidden",""));qv(a,"x-command-palette-query-change",!1,{query:$APP.n(v)?v:""});return rv(a)}var h=$APP.k(a,
17
- "__xCommandPaletteRefs"),l=$APP.k(h,"input"),m=$APP.k(h,"overlay"),p=$APP.k(h,"list");h=$APP.k(h,"clear-btn");l.addEventListener("input",g);l.addEventListener("keydown",e);m.addEventListener("click",d);p.addEventListener("click",c);h.addEventListener("click",b);$APP.ja(a,"__xCommandPaletteHandlers",{input:g,keydown:e,scrim:d,list:c,clear:b})},Bv=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");a=$APP.k(a,"__xCommandPaletteHandlers");if($APP.n($APP.n(b)?a:b)){var c=$APP.k(b,"input"),d=$APP.k(b,
18
- "overlay"),e=$APP.k(b,"list");b=$APP.k(b,"clear-btn");c.removeEventListener("input",$APP.k(a,"input"));c.removeEventListener("keydown",$APP.k(a,"keydown"));d.removeEventListener("click",$APP.k(a,"scrim"));e.removeEventListener("click",$APP.k(a,"list"));return b.removeEventListener("click",$APP.k(a,"clear"))}return null},Cv=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},
19
- Dv=function(a){Object.defineProperty(a,"items",{configurable:!0,enumerable:!0,get:function(){var b=$APP.k(this,"__xCommandPaletteItems");return $APP.n(b)?b:[]},set:function(b){this.__xCommandPaletteItems=b;this.__xCommandPaletteActiveIdx=0;return rv(this)}})},Ev=function(a){Object.defineProperty(a,"open",{configurable:!0,writable:!0,value:function(){return tv(this)}});Object.defineProperty(a,"close",{configurable:!0,writable:!0,value:function(){return uv(this)}});Object.defineProperty(a,"toggle",
20
- {configurable:!0,writable:!0,value:function(){return $APP.n(this.hasAttribute("open"))?uv(this):tv(this)}})},Gv=function(){var a=class extends HTMLElement{};a.observedAttributes=Fv;var b=a.prototype;Cv(b,"open","open");Cv(b,"disabled","disabled");Dv(b);Ev(b);b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xCommandPaletteRefs"))){var c=this.attachShadow({mode:"open"}),d=ov("style"),e=ov("div"),g=ov("div"),h=ov("div"),l=ov("span"),m=ov("input"),p=ov("button"),q=ov("div"),v=ov("div"),x=ov("div");
21
- d.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
- e.setAttribute("part","overlay");g.setAttribute("part","panel");g.setAttribute("role","dialog");g.setAttribute("aria-modal","true");h.setAttribute("part","search-wrap");l.setAttribute("part","search-icon");l.setAttribute("aria-hidden","true");l.textContent="\ud83d\udd0d";m.setAttribute("part","input");m.setAttribute("type","search");m.setAttribute("role","combobox");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("spellcheck","false");m.setAttribute("aria-autocomplete",
23
- "list");m.setAttribute("aria-expanded","false");m.setAttribute("aria-controls","x-cp-list");p.setAttribute("part","clear-btn");p.setAttribute("type","button");p.setAttribute("aria-label","Clear");p.setAttribute("hidden","");q.setAttribute("part","list-wrap");v.setAttribute("part","list");v.setAttribute("id","x-cp-list");v.setAttribute("role","listbox");v.setAttribute("aria-label","Results");x.setAttribute("part","empty");x.setAttribute("hidden","");h.appendChild(l);h.appendChild(m);h.appendChild(p);
24
- q.appendChild(v);q.appendChild(x);g.appendChild(h);g.appendChild(q);c.appendChild(d);c.appendChild(e);c.appendChild(g);this.__xCommandPaletteRefs={overlay:e,panel:g,input:m,"clear-btn":p,list:v,empty:x}}Bv(this);Av(this);return sv(this)};b.disconnectedCallback=function(){return Bv(this)};b.attributeChangedCallback=function(){return sv(this)};return a},Hv=function(){return $APP.n(customElements.get("x-command-palette"))?null:customElements.define("x-command-palette",Gv())},iv=new $APP.K(null,"empty-text",
25
- "empty-text",1554384594),cv=new $APP.K(null,"close-on-scrim-raw","close-on-scrim-raw",159828234),bv=new $APP.K(null,"empty-text-raw","empty-text-raw",1477406757),gv=new $APP.K(null,"dismissible-raw","dismissible-raw",947680658),hv=new $APP.K(null,"modal-raw","modal-raw",-263722282),kv=new $APP.K(null,"close-on-escape?","close-on-escape?",-1559868909),Zu=new $APP.K(null,"groups","groups",-136896102),ev=new $APP.K(null,"close-on-escape-raw","close-on-escape-raw",-1942646255),lv=new $APP.K(null,"scrim?",
26
- "scrim?",744210580),fv=new $APP.K(null,"no-scrim-raw","no-scrim-raw",-1344365743),jv=new $APP.K(null,"close-on-scrim?","close-on-scrim?",-367113965),Wu=new $APP.K(null,"group","group",582596132),wv=new $APP.K(null,"down","down",1565245570),Xu=new $APP.K(null,"search-str","search-str",-821246171),yv=new $APP.K(null,"up","up",-269712113),mv=new $APP.K(null,"modal?","modal?",2146094679),dv=new $APP.K(null,"disabled-raw","disabled-raw",498098381);var Fv="open modal dismissible disabled no-scrim close-on-scrim close-on-escape label placeholder empty-text".split(" ");
27
- $APP.Pd(["x-command-palette-open-request",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,$APP.Qd],null),"x-command-palette-open",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,$APP.Qd],null),"x-command-palette-close-request",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,$APP.Qd],null),"x-command-palette-close",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,$APP.Qd],null),"x-command-palette-select-request",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,1,[$APP.tk,$APP.jl],null)],null),"x-command-palette-select",new $APP.Q(null,2,
28
- [$APP.lm,!1,$APP.V,new $APP.Q(null,1,[$APP.tk,$APP.jl],null)],null),"x-command-palette-query-change",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,1,[$APP.Ii,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_command_palette.init",Hv);export const init=Hv;
2
+ var ax=function(a){return a==null?!0:$APP.M(a,"false")},bx=function(a){return typeof a==="string"?(a=a.trim(),$APP.M(a,"")?a:null):null},ex=function(a){if(a==null||$APP.p($APP.na(a)))return $APP.pe;for(var b=a.length,c=0,d=$APP.wb($APP.pe);;){if($APP.B.i(c,b))return $APP.yb(d);var e=a[c],f=""+$APP.Q.g(function(){var A=e.id;return $APP.n(A)?A:c}()),h=""+$APP.Q.g(function(){var A=e.label;return $APP.n(A)?A:""}()),l=bx(e.group),m=e.value,q=e.icon,r=$APP.B.i(!0,e.disabled),v=e.keywords;v=$APP.n($APP.na(v))?
3
+ v.join(" "):typeof v==="string"?v:"";var x=function(){var A=l;return $APP.n(A)?A:""}(),y=typeof m==="string"?m:"";x=(""+$APP.Q.g(h)+" "+$APP.Q.g(v)+" "+$APP.Q.g(x)+" "+$APP.Q.g(y)).toLowerCase();v=c+1;d=$APP.Kd(d,new $APP.N(null,7,[$APP.Lm,f,$APP.X,h,cx,l,$APP.Gh,m,$APP.Xl,q,$APP.Y,r,dx,x],null));c=v}},gx=function(a,b){b=typeof b==="string"?b.trim():"";var c=$APP.M(b,"")?$APP.fe(bx,$APP.ph(b,/\s+/)):null;if($APP.Oc(c))return new $APP.N(null,2,[$APP.dn,a,fx,$APP.hf.i($APP.eg,$APP.fe(cx,a))],null);
4
+ a=$APP.re(function(d){return $APP.ae(function(e){return $APP.M(-1,dx.g(d).indexOf(e.toLowerCase()))},c)},a);return new $APP.N(null,2,[$APP.dn,a,fx,$APP.hf.i($APP.eg,$APP.fe(cx,a))],null)},hx=function(a,b,c){var d=$APP.z(a);if(d>0)for(var e=1;;)if(e<=d){var f=$APP.od(b+e*c,d),h=$APP.Hc(a,f,null),l=h;h=$APP.n(l)?$APP.p($APP.Y.g(h)):l;if($APP.n(h))return f;e+=1}else return null;else return null},ux=function(a){var b=$APP.J(a);a=$APP.C(b,$APP.Pj);var c=$APP.C(b,$APP.Xj),d=$APP.C(b,$APP.Ch),e=$APP.C(b,
5
+ ix),f=$APP.C(b,jx),h=$APP.C(b,kx),l=$APP.C(b,lx),m=$APP.C(b,mx),q=$APP.C(b,nx);b=$APP.C(b,ox);b=ax(b);q=ax(q);m=$APP.sh(m);m=b&&!m;f=f!=null?$APP.sh(f):m;l=ax(l);return $APP.Lf([$APP.Mn,$APP.Wj,px,qx,rx,sx,$APP.X,$APP.ao,tx,$APP.Y],[function(){var r=bx(c);return $APP.n(r)?r:"Search…"}(),q,function(){var r=bx(e);return $APP.n(r)?r:"No results"}(),f,l,m,bx(d),$APP.E(a),b,$APP.sh(h)])},vx=function(a){return document.createElement(a)},wx=function(a){return ux($APP.Lf([$APP.Ch,ix,jx,kx,lx,mx,nx,ox,$APP.Pj,
6
+ $APP.Xj],[a.getAttribute("label"),a.getAttribute("empty-text"),a.getAttribute("close-on-scrim"),a.getAttribute("disabled"),a.getAttribute("close-on-escape"),a.getAttribute("no-scrim"),a.getAttribute("dismissible"),a.getAttribute("modal"),a.hasAttribute("open"),a.getAttribute("placeholder")]))},xx=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");if($APP.n(b)){var c=$APP.k(b,"list"),d=$APP.k(b,"empty");b=$APP.k(b,"input");var e=function(){var r=$APP.k(a,"__xCommandPaletteQuery");return $APP.n(r)?
7
+ r:""}(),f=ex($APP.k(a,"__xCommandPaletteItems"));e=gx(f,e);e=$APP.J(e);f=$APP.C(e,$APP.dn);e=function(){var r=$APP.k(a,"__xCommandPaletteActiveIdx");return $APP.n(r)?r:0}();c.textContent="";if($APP.Oc(f))return d.removeAttribute("hidden"),$APP.n(b)?b.removeAttribute("aria-activedescendant"):null;d.setAttribute("hidden","");d=$APP.ee($APP.Ni,f);for(var h=null;;)if(f=$APP.u(d),$APP.n(f)){var l=f;f=$APP.Hc(l,0,null);l=$APP.Hc(l,1,null);var m=cx.g(l);if($APP.n(function(){var r=m;return $APP.n(r)?$APP.M(m,
8
+ h):r}())){var q=vx("div");q.setAttribute("part","group-header");q.setAttribute("aria-hidden","true");q.textContent=m;c.appendChild(q)}q=vx("div");q.setAttribute("part","item");q.setAttribute("role","option");q.setAttribute("id","x-cp-item-"+$APP.Q.g(f));q.setAttribute("data-id",""+$APP.Q.g($APP.Lm.g(l)));q.setAttribute("data-idx",""+$APP.Q.g(f));q.setAttribute("tabindex","-1");$APP.n($APP.Y.g(l))&&q.setAttribute("aria-disabled","true");q.textContent=$APP.X.g(l);$APP.B.i(f,e)&&q.setAttribute("aria-selected",
9
+ "true");c.appendChild(q);d=$APP.dc(d);h=f=function(){var r=m;return $APP.n(r)?r:h}()}else break;return $APP.n(b)?b.setAttribute("aria-activedescendant","x-cp-item-"+$APP.Q.g(e)):null}return null},yx=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");if($APP.n(b)){var c=wx(a),d=$APP.k(b,"panel"),e=$APP.k(b,"input"),f=$APP.k(b,"overlay");b=$APP.k(b,"empty");var h=$APP.X.g(c),l=$APP.Mn.g(c),m=px.g(c);$APP.n(h)?d.setAttribute("aria-label",h):d.setAttribute("aria-label","Command palette");$APP.n(sx.g(c))?
10
+ f.removeAttribute("hidden"):f.setAttribute("hidden","");e.setAttribute("placeholder",l);e.setAttribute("aria-expanded",$APP.n($APP.ao.g(c))?"true":"false");$APP.n($APP.Y.g(c))&&(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true"));$APP.n($APP.Y.g(c))||(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"));b.textContent=m;return xx(a)}return null},zx=function(a){if($APP.n(a.hasAttribute("open")))a=null;else if($APP.ch(a,"x-command-palette-open-request",{})){a.setAttribute("open",
11
+ "");var b=$APP.k(a,"__xCommandPaletteRefs");b=$APP.n(b)?$APP.k(b,"input"):null;$APP.n(b)&&b.focus();yx(a);a=$APP.P(a,"x-command-palette-open",{})}else a=null;return a},Ax=function(a){if($APP.n(a.hasAttribute("open")))if($APP.ch(a,"x-command-palette-close-request",{})){a.removeAttribute("open");var b=$APP.k(a,"__xCommandPaletteRefs");b=$APP.n(b)?$APP.k(b,"input"):null;$APP.n(b)&&b.removeAttribute("aria-activedescendant");yx(a);a=$APP.P(a,"x-command-palette-close",{})}else a=null;else a=null;return a},
12
+ Bx=function(a){var b=$APP.k(a,"__xCommandPaletteQuery");b=$APP.n(b)?b:"";a=ex($APP.k(a,"__xCommandPaletteItems"));a=gx(a,b);a=$APP.J(a);return $APP.C(a,$APP.dn)},Dx=function(a,b){var c=Bx(a);var d=$APP.k(a,"__xCommandPaletteActiveIdx");d=$APP.n(d)?d:0;$APP.B.i(b,Cx)?(c=hx(c,$APP.n(d)?d:-1,1),c=$APP.n(c)?c:0):(b=$APP.z(c),c=hx(c,$APP.n(d)?d:b,-1),c=$APP.n(c)?c:0);a.__xCommandPaletteActiveIdx=c;xx(a);a=$APP.k(a,"__xCommandPaletteRefs");a=$APP.n(a)?$APP.k(a,"list"):null;a=$APP.n(a)?a.querySelector("[data-idx\x3d'"+
13
+ $APP.Q.g(c)+"']"):null;return $APP.n(a)?a.scrollIntoView({block:"nearest"}):null},Fx=function(a,b){var c=b.key;return $APP.B.i(c,"ArrowDown")?(b.preventDefault(),Dx(a,Cx)):$APP.B.i(c,"ArrowUp")?(b.preventDefault(),Dx(a,Ex)):$APP.B.i(c,"Enter")?(b.preventDefault(),b=Bx(a),c=$APP.k(a,"__xCommandPaletteActiveIdx"),b=$APP.Hc(b,$APP.n(c)?c:0,null),$APP.n($APP.n(b)?$APP.p($APP.Y.g(b)):b)&&$APP.ch(a,"x-command-palette-select-request",{item:$APP.Xi(b)})?($APP.P(a,"x-command-palette-select",{item:$APP.Xi(b)}),
14
+ a=Ax(a)):a=null,a):$APP.B.i(c,"Escape")?(b=wx(a),$APP.n(rx.g(b))?Ax(a):null):null},Gx=function(a){function b(){var r=$APP.k(a,"__xCommandPaletteRefs"),v=$APP.n(r)?$APP.k(r,"input"):null;r=$APP.n(r)?$APP.k(r,"clear-btn"):null;$APP.n(v)&&(v.value="");$APP.n(r)&&r.setAttribute("hidden","");a.__xCommandPaletteQuery="";a.__xCommandPaletteActiveIdx=0;$APP.P(a,"x-command-palette-query-change",{query:""});xx(a);return $APP.n(v)?v.focus():null}function c(r){a:{r=r.target.closest("[part\x3ditem]");if($APP.n(r)){r=
15
+ parseInt(r.getAttribute("data-idx"),10);var v=Bx(a);r=$APP.Hc(v,r,null);if($APP.n($APP.n(r)?$APP.p($APP.Y.g(r)):r)&&$APP.ch(a,"x-command-palette-select-request",{item:$APP.Xi(r)})){$APP.P(a,"x-command-palette-select",{item:$APP.Xi(r)});r=Ax(a);break a}}r=null}return r}function d(){var r=wx(a);return $APP.n(qx.g(r))?Ax(a):null}function e(r){return Fx(a,r)}function f(){var r=$APP.k(a,"__xCommandPaletteRefs"),v=$APP.n(r)?$APP.k(r,"input"):null;r=$APP.n(r)?$APP.k(r,"clear-btn"):null;v=$APP.n(v)?v.value:
16
+ null;a.__xCommandPaletteQuery=$APP.n(v)?v:"";a.__xCommandPaletteActiveIdx=0;$APP.n(r)&&($APP.n($APP.n(v)?$APP.M(v,""):v)?r.removeAttribute("hidden"):r.setAttribute("hidden",""));$APP.P(a,"x-command-palette-query-change",{query:$APP.n(v)?v:""});return xx(a)}var h=$APP.k(a,"__xCommandPaletteRefs"),l=$APP.k(h,"input"),m=$APP.k(h,"overlay"),q=$APP.k(h,"list");h=$APP.k(h,"clear-btn");l.addEventListener("input",f);l.addEventListener("keydown",e);m.addEventListener("click",d);q.addEventListener("click",
17
+ c);h.addEventListener("click",b);$APP.fa(a,"__xCommandPaletteHandlers",{input:f,keydown:e,scrim:d,list:c,clear:b})},Hx=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");a=$APP.k(a,"__xCommandPaletteHandlers");if($APP.n($APP.n(b)?a:b)){var c=$APP.k(b,"input"),d=$APP.k(b,"overlay"),e=$APP.k(b,"list");b=$APP.k(b,"clear-btn");c.removeEventListener("input",$APP.k(a,"input"));c.removeEventListener("keydown",$APP.k(a,"keydown"));d.removeEventListener("click",$APP.k(a,"scrim"));e.removeEventListener("click",
18
+ $APP.k(a,"list"));return b.removeEventListener("click",$APP.k(a,"clear"))}return null},Ix=function(a){if(!$APP.n($APP.k(a,"__xCommandPaletteRefs"))){var b=a.attachShadow({mode:"open"}),c=vx("style"),d=vx("div"),e=vx("div"),f=vx("div"),h=vx("span"),l=vx("input"),m=vx("button"),q=vx("div"),r=vx("div"),v=vx("div");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;}}";
19
+ d.setAttribute("part","overlay");e.setAttribute("part","panel");e.setAttribute("role","dialog");e.setAttribute("aria-modal","true");f.setAttribute("part","search-wrap");h.setAttribute("part","search-icon");h.setAttribute("aria-hidden","true");h.textContent="\ud83d\udd0d";l.setAttribute("part","input");l.setAttribute("type","search");l.setAttribute("role","combobox");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("spellcheck","false");l.setAttribute("aria-autocomplete",
20
+ "list");l.setAttribute("aria-expanded","false");l.setAttribute("aria-controls","x-cp-list");m.setAttribute("part","clear-btn");m.setAttribute("type","button");m.setAttribute("aria-label","Clear");m.setAttribute("hidden","");q.setAttribute("part","list-wrap");r.setAttribute("part","list");r.setAttribute("id","x-cp-list");r.setAttribute("role","listbox");r.setAttribute("aria-label","Results");v.setAttribute("part","empty");v.setAttribute("hidden","");f.appendChild(h);f.appendChild(l);f.appendChild(m);
21
+ q.appendChild(r);q.appendChild(v);e.appendChild(f);e.appendChild(q);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xCommandPaletteRefs={overlay:d,panel:e,input:l,"clear-btn":m,list:r,empty:v}}Hx(a);Gx(a);return yx(a)},Jx=function(a){return Hx(a)},Kx=function(a,b,c,d){yx(a);if($APP.B.i(b,"open")&&d!=null){a=$APP.k(a,"__xCommandPaletteRefs");var e=$APP.n(a)?$APP.k(a,"input"):null;return $APP.n(e)?requestAnimationFrame(function(){return e.focus()}):null}return null},Lx=function(a){Object.defineProperty(a,
22
+ "items",{configurable:!0,enumerable:!0,get:function(){var b=$APP.k(this,"__xCommandPaletteItems");return $APP.n(b)?b:[]},set:function(b){this.__xCommandPaletteItems=b;this.__xCommandPaletteActiveIdx=0;return xx(this)}})},Mx=function(a){Object.defineProperty(a,"open",{configurable:!0,writable:!0,value:function(){return zx(this)}});Object.defineProperty(a,"close",{configurable:!0,writable:!0,value:function(){return Ax(this)}});return Object.defineProperty(a,"toggle",{configurable:!0,writable:!0,value:function(){return $APP.n(this.hasAttribute("open"))?
23
+ Ax(this):zx(this)}})},Nx=function(a){$APP.dh(a,"open","open");$APP.dh(a,"disabled","disabled");Lx(a);return Mx(a)},Px=function(){return $APP.Yg("x-command-palette",new $APP.N(null,5,[$APP.Pg,Ox,$APP.Qg,Ix,$APP.Rg,Jx,$APP.Sg,Kx,$APP.Wg,Nx],null))},px=new $APP.F(null,"empty-text","empty-text",1554384594),jx=new $APP.F(null,"close-on-scrim-raw","close-on-scrim-raw",159828234),ix=new $APP.F(null,"empty-text-raw","empty-text-raw",1477406757),nx=new $APP.F(null,"dismissible-raw","dismissible-raw",947680658),
24
+ ox=new $APP.F(null,"modal-raw","modal-raw",-263722282),rx=new $APP.F(null,"close-on-escape?","close-on-escape?",-1559868909),fx=new $APP.F(null,"groups","groups",-136896102),lx=new $APP.F(null,"close-on-escape-raw","close-on-escape-raw",-1942646255),sx=new $APP.F(null,"scrim?","scrim?",744210580),mx=new $APP.F(null,"no-scrim-raw","no-scrim-raw",-1344365743),qx=new $APP.F(null,"close-on-scrim?","close-on-scrim?",-367113965),cx=new $APP.F(null,"group","group",582596132),Cx=new $APP.F(null,"down","down",
25
+ 1565245570),dx=new $APP.F(null,"search-str","search-str",-821246171),Ex=new $APP.F(null,"up","up",-269712113),tx=new $APP.F(null,"modal?","modal?",2146094679),kx=new $APP.F(null,"disabled-raw","disabled-raw",498098381);var Ox="open modal dismissible disabled no-scrim close-on-scrim close-on-escape label placeholder empty-text".split(" ");
26
+ $APP.Yd(["x-command-palette-open-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,$APP.Zd],null),"x-command-palette-open",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,$APP.Zd],null),"x-command-palette-close-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,$APP.Zd],null),"x-command-palette-close",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,$APP.Zd],null),"x-command-palette-select-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,1,[$APP.Bl,$APP.vm],null)],null),"x-command-palette-select",new $APP.N(null,2,
27
+ [$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Bl,$APP.vm],null)],null),"x-command-palette-query-change",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Qj,$APP.U],null)],null)]);$APP.ca("baredom.exports.x_command_palette.init",Px);export const init=Px;
@@ -1,7 +1,6 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var HO=function(a,b,c){return typeof a==="string"&&$APP.I(b,a)?a:c},IO=function(a){return a.__xContainerState},JO=function(a){Object.defineProperty(a,"fluid",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("fluid")},set:function(b){return $APP.Eg(this,"fluid",$APP.F(b))}})},KO=function(a){Object.defineProperty(a,"center",{configurable:!0,enumerable:!0,get:function(){return $APP.N("false",this.getAttribute("center"))},set:function(b){return $APP.F(b)?this.removeAttribute("center"):
3
- this.setAttribute("center","false")}})},RO=function(a,b){a=new $APP.Q(null,6,[LO,a.getAttribute("as"),$APP.Mh,a.getAttribute("size"),$APP.Nm,a.getAttribute("padding"),MO,$APP.N("false",a.getAttribute("center")),NO,a.hasAttribute("fluid"),$APP.U,a.getAttribute("label")],null);var c=$APP.M(a);a=$APP.D(c,LO);var d=$APP.D(c,$APP.Mh),e=$APP.D(c,$APP.Nm),g=$APP.D(c,MO),h=$APP.D(c,NO);c=$APP.D(c,$APP.U);a=new $APP.Q(null,6,[LO,HO(a,OO,"div"),$APP.Mh,HO(d,PO,"lg"),$APP.Nm,HO(e,QO,"md"),MO,$APP.F(g),NO,$APP.F(h),
4
- $APP.U,$APP.Lg(c)?c:null],null);h=LO.g(a);d=b.base;$APP.N(d.tagName.toLowerCase(),h)&&(e=b.root,g=b.slot,h=document.createElement(h),h.setAttribute("part","base"),h.appendChild(g),e.replaceChild(h,d),b.base=h);b=b.base;b.setAttribute("data-size",$APP.Mh.g(a));b.setAttribute("data-padding",$APP.Nm.g(a));b.setAttribute("data-center",$APP.n(MO.g(a))?"true":"false");b.setAttribute("data-fluid",$APP.n(NO.g(a))?"true":"false");a=$APP.U.g(a);return $APP.n(a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")},
5
- TO=function(){var a=class extends HTMLElement{};a.observedAttributes=SO;a.prototype.connectedCallback=function(){if(!$APP.n(IO(this))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent="\n :host{\n display:block;\n color-scheme:light dark;\n\n --x-container-max-width-xs:480px;\n --x-container-max-width-sm:640px;\n --x-container-max-width-md:768px;\n --x-container-max-width-lg:1024px;\n --x-container-max-width-xl:1280px;\n\n --x-container-padding-sm:0.5rem;\n --x-container-padding-md:1rem;\n --x-container-padding-lg:1.5rem;\n\n --x-container-padding-block:0;\n --x-container-margin-inline:auto;\n\n --x-container-bg:transparent;\n --x-container-color:var(--x-color-text, #0f172a);\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n\n @media (prefers-color-scheme: dark){\n :host{\n --x-container-bg:transparent;\n --x-container-color:var(--x-color-text, #e5e7eb);\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n }\n\n [part\x3d'base']{\n display:block;\n box-sizing:border-box;\n width:100%;\n max-width:var(--x-container-max-width-lg);\n padding-inline:var(--x-container-padding-md);\n padding-block:var(--x-container-padding-block);\n margin-inline:0;\n background:var(--x-container-bg);\n color:var(--x-container-color);\n border:1px solid var(--x-container-border);\n border-radius:var(--x-container-radius);\n box-shadow:var(--x-container-shadow);\n }\n\n [part\x3d'base'][data-size\x3d'xs']{max-width:var(--x-container-max-width-xs);}\n [part\x3d'base'][data-size\x3d'sm']{max-width:var(--x-container-max-width-sm);}\n [part\x3d'base'][data-size\x3d'md']{max-width:var(--x-container-max-width-md);}\n [part\x3d'base'][data-size\x3d'lg']{max-width:var(--x-container-max-width-lg);}\n [part\x3d'base'][data-size\x3d'xl']{max-width:var(--x-container-max-width-xl);}\n [part\x3d'base'][data-size\x3d'full']{max-width:none;width:100%;}\n\n [part\x3d'base'][data-padding\x3d'none']{padding-inline:0;}\n [part\x3d'base'][data-padding\x3d'sm']{padding-inline:var(--x-container-padding-sm);}\n [part\x3d'base'][data-padding\x3d'md']{padding-inline:var(--x-container-padding-md);}\n [part\x3d'base'][data-padding\x3d'lg']{padding-inline:var(--x-container-padding-lg);}\n\n [part\x3d'base'][data-center\x3d'true']{\n margin-inline:var(--x-container-margin-inline);\n }\n\n [part\x3d'base'][data-center\x3d'false']{\n margin-inline:0;\n }\n\n [part\x3d'base'][data-fluid\x3d'true']{\n max-width:none;\n width:100%;\n }\n\n ";
6
- d.setAttribute("part","base");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xContainerState={root:b,base:d,slot:e}}return RO(this,IO(this))};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(){var b=IO(this);return $APP.n(b)?RO(this,b):null};KO(a.prototype);JO(a.prototype);return a},UO=function(){$APP.n(customElements.get("x-container"))||customElements.define("x-container",TO());return null},NO=new $APP.K(null,"fluid","fluid",-1823657759),
7
- LO=new $APP.K(null,"as","as",1148689641),MO=new $APP.K(null,"center","center",-748944368);var OO=new $APP.S(null,new $APP.Q(null,8,["article",null,"footer",null,"section",null,"main",null,"nav",null,"div",null,"aside",null,"header",null],null),null),PO=new $APP.S(null,new $APP.Q(null,6,["xs",null,"md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),QO=new $APP.S(null,new $APP.Q(null,4,["none",null,"md",null,"lg",null,"sm",null],null),null),SO="as size padding center fluid label".split(" ");$APP.ha("baredom.exports.x_container.init",UO);export const init=UO;
2
+ var oS=function(a,b,c){return typeof a==="string"&&$APP.Zc(b,a)?a:c},pS=function(a){return a.__xContainerState},qS=function(a){Object.defineProperty(a,"center",{configurable:!0,enumerable:!0,get:function(){return $APP.M("false",this.getAttribute("center"))},set:function(b){return $APP.E(b)?this.removeAttribute("center"):this.setAttribute("center","false")}})},xS=function(a,b){a=new $APP.N(null,6,[rS,a.getAttribute("as"),$APP.bj,a.getAttribute("size"),$APP.$n,a.getAttribute("padding"),sS,$APP.M("false",
3
+ a.getAttribute("center")),tS,a.hasAttribute("fluid"),$APP.X,a.getAttribute("label")],null);var c=$APP.J(a);a=$APP.C(c,rS);var d=$APP.C(c,$APP.bj),e=$APP.C(c,$APP.$n),f=$APP.C(c,sS),h=$APP.C(c,tS);c=$APP.C(c,$APP.X);a=new $APP.N(null,6,[rS,oS(a,uS,"div"),$APP.bj,oS(d,vS,"lg"),$APP.$n,oS(e,wS,"md"),sS,$APP.E(f),tS,$APP.E(h),$APP.X,$APP.th(c)?c:null],null);h=rS.g(a);d=b.base;$APP.M(d.tagName.toLowerCase(),h)&&(e=b.root,f=b.slot,h=document.createElement(h),h.setAttribute("part","base"),h.appendChild(f),
4
+ e.replaceChild(h,d),b.base=h);b=b.base;b.setAttribute("data-size",$APP.bj.g(a));b.setAttribute("data-padding",$APP.$n.g(a));b.setAttribute("data-center",$APP.n(sS.g(a))?"true":"false");b.setAttribute("data-fluid",$APP.n(tS.g(a))?"true":"false");a=$APP.X.g(a);return $APP.n(a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")},yS=function(a){if(!$APP.n(pS(a))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");
5
+ c.textContent="\n :host{\n display:block;\n color-scheme:light dark;\n\n --x-container-max-width-xs:480px;\n --x-container-max-width-sm:640px;\n --x-container-max-width-md:768px;\n --x-container-max-width-lg:1024px;\n --x-container-max-width-xl:1280px;\n\n --x-container-padding-sm:0.5rem;\n --x-container-padding-md:1rem;\n --x-container-padding-lg:1.5rem;\n\n --x-container-padding-block:0;\n --x-container-margin-inline:auto;\n\n --x-container-bg:transparent;\n --x-container-color:var(--x-color-text, #0f172a);\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n\n @media (prefers-color-scheme: dark){\n :host{\n --x-container-bg:transparent;\n --x-container-color:var(--x-color-text, #e5e7eb);\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n }\n\n [part\x3d'base']{\n display:block;\n box-sizing:border-box;\n width:100%;\n max-width:var(--x-container-max-width-lg);\n padding-inline:var(--x-container-padding-md);\n padding-block:var(--x-container-padding-block);\n margin-inline:0;\n background:var(--x-container-bg);\n color:var(--x-container-color);\n border:1px solid var(--x-container-border);\n border-radius:var(--x-container-radius);\n box-shadow:var(--x-container-shadow);\n }\n\n [part\x3d'base'][data-size\x3d'xs']{max-width:var(--x-container-max-width-xs);}\n [part\x3d'base'][data-size\x3d'sm']{max-width:var(--x-container-max-width-sm);}\n [part\x3d'base'][data-size\x3d'md']{max-width:var(--x-container-max-width-md);}\n [part\x3d'base'][data-size\x3d'lg']{max-width:var(--x-container-max-width-lg);}\n [part\x3d'base'][data-size\x3d'xl']{max-width:var(--x-container-max-width-xl);}\n [part\x3d'base'][data-size\x3d'full']{max-width:none;width:100%;}\n\n [part\x3d'base'][data-padding\x3d'none']{padding-inline:0;}\n [part\x3d'base'][data-padding\x3d'sm']{padding-inline:var(--x-container-padding-sm);}\n [part\x3d'base'][data-padding\x3d'md']{padding-inline:var(--x-container-padding-md);}\n [part\x3d'base'][data-padding\x3d'lg']{padding-inline:var(--x-container-padding-lg);}\n\n [part\x3d'base'][data-center\x3d'true']{\n margin-inline:var(--x-container-margin-inline);\n }\n\n [part\x3d'base'][data-center\x3d'false']{\n margin-inline:0;\n }\n\n [part\x3d'base'][data-fluid\x3d'true']{\n max-width:none;\n width:100%;\n }\n\n ";
6
+ d.setAttribute("part","base");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xContainerState={root:b,base:d,slot:e}}return xS(a,pS(a))},zS=function(a){var b=pS(a);return $APP.n(b)?xS(a,b):null},AS=function(a){qS(a);return $APP.dh(a,"fluid","fluid")},CS=function(){return $APP.Yg("x-container",new $APP.N(null,4,[$APP.Pg,BS,$APP.Qg,yS,$APP.Sg,zS,$APP.Wg,AS],null))},tS=new $APP.F(null,"fluid","fluid",-1823657759),rS=new $APP.F(null,"as","as",1148689641),sS=new $APP.F(null,"center","center",-748944368);var uS=new $APP.O(null,new $APP.N(null,8,["article",null,"footer",null,"section",null,"main",null,"nav",null,"div",null,"aside",null,"header",null],null),null),vS=new $APP.O(null,new $APP.N(null,6,["xs",null,"md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),wS=new $APP.O(null,new $APP.N(null,4,["none",null,"md",null,"lg",null,"sm",null],null),null),BS="as size padding center fluid label".split(" ");$APP.ca("baredom.exports.x_container.init",CS);export const init=CS;
@@ -2,12 +2,41 @@
2
2
 
3
3
  export function init(): void;
4
4
 
5
+ export interface XContextMenuEventMap {
6
+ "x-context-menu-open-request": CustomEvent<{ reason: string }>;
7
+ "x-context-menu-open": CustomEvent<{ reason: string }>;
8
+ "x-context-menu-close-request": CustomEvent<{ reason: string }>;
9
+ "x-context-menu-close": CustomEvent<{ reason: string }>;
10
+ "x-context-menu-select": CustomEvent<{ item: Record<string, any> }>;
11
+ }
12
+
5
13
  export interface XContextMenu extends HTMLElement {
6
14
  open: boolean;
7
15
  disabled: boolean;
8
16
  placement: string;
9
- offset: number;
10
- zIndex: number;
17
+ offset: string;
18
+ zIndex: string;
19
+
20
+ addEventListener<K extends keyof XContextMenuEventMap>(
21
+ type: K,
22
+ listener: (this: XContextMenu, ev: XContextMenuEventMap[K]) => any,
23
+ options?: boolean | AddEventListenerOptions
24
+ ): void;
25
+ addEventListener(
26
+ type: string,
27
+ listener: EventListenerOrEventListenerObject,
28
+ options?: boolean | AddEventListenerOptions
29
+ ): void;
30
+ removeEventListener<K extends keyof XContextMenuEventMap>(
31
+ type: K,
32
+ listener: (this: XContextMenu, ev: XContextMenuEventMap[K]) => any,
33
+ options?: boolean | EventListenerOptions
34
+ ): void;
35
+ removeEventListener(
36
+ type: string,
37
+ listener: EventListenerOrEventListenerObject,
38
+ options?: boolean | EventListenerOptions
39
+ ): void;
11
40
  }
12
41
 
13
42
  declare global {
@@ -1,19 +1,21 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var m6=function(a,b){return typeof a==="string"?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:b):b},n6=function(a){return $APP.B.i(a,"bottom-start")?"top-start":$APP.B.i(a,"bottom-end")?"top-end":$APP.B.i(a,"top-start")?"bottom-start":$APP.B.i(a,"top-end")?"bottom-end":$APP.B.i(a,"right-start")?"left-start":$APP.B.i(a,"left-start")?"right-start":a},o6=function(a,b,c,d){var e=$APP.M(c);c=$APP.D(e,$APP.Ll);var g=$APP.D(e,$APP.Kl),h=$APP.D(e,$APP.Xg);e=$APP.D(e,$APP.Yg);var l=$APP.M(d);d=$APP.D(l,$APP.Xg);
3
- l=$APP.D(l,$APP.Yg);switch(a){case "bottom-start":return new $APP.Q(null,2,[$APP.Ll,c,$APP.Kl,g+e+b],null);case "bottom-end":return new $APP.Q(null,2,[$APP.Ll,c+h-d,$APP.Kl,g+e+b],null);case "top-start":return new $APP.Q(null,2,[$APP.Ll,c,$APP.Kl,g-l-b],null);case "top-end":return new $APP.Q(null,2,[$APP.Ll,c+h-d,$APP.Kl,g-l-b],null);case "right-start":return new $APP.Q(null,2,[$APP.Ll,c+h+b,$APP.Kl,g],null);case "left-start":return new $APP.Q(null,2,[$APP.Ll,c-d-b,$APP.Kl,g],null);default:return new $APP.Q(null,
4
- 2,[$APP.Ll,c,$APP.Kl,g+e+b],null)}},p6=function(a,b,c,d,e){function g(x){var y=o6(x,b,c,d);y=$APP.M(y);var A=$APP.D(y,$APP.Ll),C=$APP.D(y,$APP.Kl);y=A>=8&&A+m<=h-8;var E=C>=8&&C+p<=l-8;A=$APP.ph.i($APP.oh.i(A,8),h-m-8);C=$APP.ph.i($APP.oh.i(C,8),l-p-8);return new $APP.Q(null,5,[$APP.Ll,A,$APP.Kl,C,$APP.vi,x,$APP.Xl,y&&E,$APP.Ek,$APP.oh.i(40,l-C-8)],null)}e=$APP.M(e);var h=$APP.D(e,$APP.Xg),l=$APP.D(e,$APP.Yg);e=$APP.M(d);var m=$APP.D(e,$APP.Xg),p=$APP.D(e,$APP.Yg),q=g(a),v=g(n6(a));return $APP.n(function(){var x=
5
- $APP.Xl.g(q);return $APP.n(x)?x:$APP.r($APP.Xl.g(v))}())?q:v},u6=function(a){a=new $APP.Q(null,5,[$APP.Gi,$APP.n(a.hasAttribute("open"))?a.getAttribute("open"):null,$APP.Ol,$APP.n(a.hasAttribute("disabled"))?a.getAttribute("disabled"):null,$APP.jn,a.getAttribute("placement"),q6,a.getAttribute("offset"),r6,a.getAttribute("z-index")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Gi),d=$APP.D(b,$APP.Ol),e=$APP.D(b,$APP.jn);a=$APP.D(b,q6);b=$APP.D(b,r6);c=$APP.Kg(c);d=$APP.Kg(d);e=typeof e==="string"&&$APP.I(s6,
6
- e)?e:"bottom-start";return new $APP.Q(null,5,[$APP.Om,c,$APP.X,d,$APP.Qj,e,$APP.ti,m6(a,8),t6,m6(b,1E3)],null)},v6=function(a,b,c,d){b=new CustomEvent(b,{detail:d,bubbles:!0,composed:!0,cancelable:c});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)},w6=function(a){return $APP.uc(a.querySelectorAll("[role\x3dmenuitem]:not([disabled]):not([aria-disabled\x3dtrue])"))},x6=function(a){return $APP.n(a)?a.focus():null},y6=function(a,b){a=$APP.Pg(a,":host{color-scheme:light dark;--x-context-menu-bg:var(--x-color-bg,rgba(255,255,255,0.97));--x-context-menu-border:var(--x-color-border,rgba(0,0,0,0.1));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.14),0 2px 8px rgba(0,0,0,0.08));--x-context-menu-radius:var(--x-radius-md,10px);--x-context-menu-item-hover:rgba(0,0,0,0.05);--x-context-menu-item-active:rgba(0,0,0,0.09);--x-context-menu-item-fg:var(--x-color-text,rgba(0,0,0,0.87));--x-context-menu-separator:var(--x-color-border,rgba(0,0,0,0.1));}@media(prefers-color-scheme:dark){:host{--x-context-menu-bg:var(--x-color-bg,#1e293b);--x-context-menu-border:var(--x-color-border,rgba(255,255,255,0.12));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.7),0 2px 8px rgba(0,0,0,0.4));--x-context-menu-item-hover:rgba(255,255,255,0.08);--x-context-menu-item-active:rgba(255,255,255,0.14);--x-context-menu-item-fg:var(--x-color-text,rgba(255,255,255,0.9));--x-context-menu-separator:var(--x-color-border,rgba(255,255,255,0.12));}}[part\x3dpanel]{position:absolute;min-width:160px;max-width:calc(100vw - 1rem);border-radius:var(--x-context-menu-radius);background:var(--x-context-menu-bg);border:1px solid var(--x-context-menu-border);box-shadow:var(--x-context-menu-shadow);padding:4px 0;overflow:auto;pointer-events:auto;outline:none;@media(prefers-reduced-motion:no-preference){transition:opacity 120ms ease,transform 120ms ease;}}[role\x3dmenuitem]{color:var(--x-context-menu-item-fg);}[role\x3dmenuitem]:hover{background:var(--x-context-menu-item-hover);}",
7
- b);b=document.createElement("div");b.setAttribute("part","panel");b.setAttribute("role","menu");b.setAttribute("tabindex","-1");a.shadowRoot.appendChild(b);return a},z6=function(a,b,c,d){var e=$APP.M(d);d=$APP.D(e,t6);e=$APP.D(e,$APP.Ek);a.style.zIndex=""+$APP.T.g(d);a=$APP.Qg(a);$APP.n(a)&&(a.style.left=""+$APP.T.g(b)+"px",a.style.top=""+$APP.T.g(c)+"px",a.style.maxHeight=""+$APP.T.g(e)+"px")},A6=function(a,b){a=$APP.t($APP.uc(a.children));for(var c=null,d=0,e=0;;)if(e<d){var g=c.F(null,e);b.appendChild(g.cloneNode(!0));
8
- e+=1}else if(a=$APP.t(a))c=a,$APP.Nc(c)?(a=$APP.yb(c),d=$APP.zb(c),c=a,g=$APP.z(a),a=d,d=g):(g=$APP.u(c),b.appendChild(g.cloneNode(!0)),a=$APP.w(c),c=null,d=0),e=0;else break},C6=function(a,b){function c(g){g.stopPropagation();g=g.target.closest("[role\x3dmenuitem]");return $APP.n(g)?(v6(a,"x-context-menu-select",!1,{item:g}),B6.i?B6.i(a,"select"):B6.call(null,a,"select")):null}function d(g){var h=g.key,l=b.shadowRoot.activeElement;return $APP.B.i(h,"Tab")?B6.i?B6.i(a,"keyboard"):B6.call(null,a,"keyboard"):
9
- $APP.B.i(h,"ArrowDown")?(g.preventDefault(),$APP.n(l)?(g=w6(e),l=$APP.zd(g).indexOf(l),l=$APP.Ac(g,$APP.fd(l+1,$APP.z(g)),null),l=x6(l)):l=x6($APP.u(w6(e))),l):$APP.B.i(h,"ArrowUp")?(g.preventDefault(),$APP.n(l)?(g=w6(e),h=$APP.z(g),l=$APP.zd(g).indexOf(l),l=$APP.Ac(g,$APP.fd(l+(h-1),h),null),l=x6(l)):l=x6($APP.u(w6(e))),l):($APP.B.i(h,"Enter")||$APP.B.i(h," "))&&$APP.n(l)?(g.preventDefault(),l.click()):null}var e=$APP.Qg(b);b.addEventListener("keydown",d,!0);$APP.n(e)&&e.addEventListener("click",
10
- c);b.__onKey=d;b.__onItemClick=c},D6=function(a){function b(d){var e=$APP.k(a,"__xContextMenuLayer");return $APP.n(e)?(e=$APP.Qg(e),$APP.n($APP.n(e)?$APP.r(e.contains(d.target)):e)?B6.i?B6.i(a,"backdrop"):B6.call(null,a,"backdrop"):null):null}function c(d){return $APP.B.i(d.key,"Escape")?(d.preventDefault(),B6.i?B6.i(a,"keyboard"):B6.call(null,a,"keyboard")):null}setTimeout(function(){if($APP.n(a.hasAttribute("open")))document.addEventListener("keydown",c),document.addEventListener("click",b),a.__xContextMenuDocH=
11
- {keydown:c,click:b};else return null},0)},B6=function(a,b){if($APP.n(a.hasAttribute("open"))&&v6(a,"x-context-menu-close-request",!0,{reason:b})){var c=$APP.k(a,"__xContextMenuDocH");$APP.n(c)&&(document.removeEventListener("keydown",$APP.k(c,"keydown")),document.removeEventListener("click",$APP.k(c,"click")),a.__xContextMenuDocH=null);a.removeAttribute("open");$APP.Rg($APP.k(a,"__xContextMenuLayer"));a.__xContextMenuLayer=null;return v6(a,"x-context-menu-close",!1,{reason:b})}return null},E6=function(a,
12
- b,c,d){if($APP.n(a.hasAttribute("disabled")))return null;if(v6(a,"x-context-menu-open-request",!0,{reason:d})){var e=u6(a);e=$APP.M(e);var g=$APP.D(e,$APP.Qj),h=$APP.D(e,$APP.ti),l=$APP.D(e,t6),m=window.innerWidth,p=window.innerHeight,q=new $APP.Q(null,4,[$APP.Ll,b,$APP.Kl,c,$APP.Xg,1,$APP.Yg,1],null);b=p6(g,h,q,new $APP.Q(null,2,[$APP.Xg,200,$APP.Yg,300],null),new $APP.Q(null,2,[$APP.Xg,m,$APP.Yg,p],null));var v=y6(a,l);A6(a,$APP.Qg(v));C6(a,v);z6(v,$APP.Ll.g(b),$APP.Kl.g(b),$APP.mh.m(b,t6,l));a.setAttribute("open",
13
- "");a.__xContextMenuLayer=v;D6(a);requestAnimationFrame(function(){var x=$APP.Qg(v);if($APP.n(x)){var y=p6(g,h,q,new $APP.Q(null,2,[$APP.Xg,x.offsetWidth,$APP.Yg,x.offsetHeight],null),new $APP.Q(null,2,[$APP.Xg,m,$APP.Yg,p],null));z6(v,$APP.Ll.g(y),$APP.Kl.g(y),$APP.mh.m(y,t6,l));return x6($APP.u(w6(x)))}return null});return v6(a,"x-context-menu-open",!1,{reason:d})}return null},F6=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;b=b.getBoundingClientRect();var c=u6(a);c=$APP.M(c);
14
- var d=$APP.D(c,$APP.Qj),e=$APP.D(c,$APP.ti),g=$APP.D(c,t6),h=window.innerWidth,l=window.innerHeight,m=new $APP.Q(null,4,[$APP.Ll,b.left,$APP.Kl,b.top,$APP.Xg,b.width,$APP.Yg,b.height],null);if(v6(a,"x-context-menu-open-request",!0,{reason:"programmatic"})){b=p6(d,e,m,new $APP.Q(null,2,[$APP.Xg,200,$APP.Yg,300],null),new $APP.Q(null,2,[$APP.Xg,h,$APP.Yg,l],null));var p=y6(a,g);A6(a,$APP.Qg(p));C6(a,p);z6(p,$APP.Ll.g(b),$APP.Kl.g(b),$APP.mh.m(b,t6,g));a.setAttribute("open","");a.__xContextMenuLayer=
15
- p;D6(a);requestAnimationFrame(function(){var q=$APP.Qg(p);if($APP.n(q)){var v=p6(d,e,m,new $APP.Q(null,2,[$APP.Xg,q.offsetWidth,$APP.Yg,q.offsetHeight],null),new $APP.Q(null,2,[$APP.Xg,h,$APP.Yg,l],null));z6(p,$APP.Ll.g(v),$APP.Kl.g(v),$APP.mh.m(v,t6,g));return x6($APP.u(w6(q)))}return null});return v6(a,"x-context-menu-open",!1,{reason:"programmatic"})}return null},G6=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n(d)?
16
- this.setAttribute(c,""):this.removeAttribute(c)}})},H6=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.getAttribute(c)},set:function(d){return d!=null?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},I6=function(a){a.openAt=function(b,c){return E6(this,b,c,"programmatic")};a.toggleAt=function(b,c){return $APP.n(this.hasAttribute("open"))?B6(this,"toggle"):E6(this,b,c,"toggle")};a.openForElement=function(b){return F6(this,b)};a.close=
17
- function(){return B6(this,"programmatic")}},K6=function(){var a=class extends HTMLElement{};a.observedAttributes=J6;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xContextMenuRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:contents;}slot{display:none;}";b.appendChild(c);b.appendChild(d);c={};c.root=b;c.slot=d;this.__xContextMenuRefs=c}return $APP.n(this.hasAttribute("open"))?this.removeAttribute("open"):
18
- null};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__xContextMenuLayer");$APP.n(b)?($APP.Rg(b),this.__xContextMenuLayer=null,b=void 0):b=null;return b};a.prototype.attributeChangedCallback=function(b){a:{if($APP.B.i(b,"open")){if($APP.n(this.hasAttribute("open"))){b=null;break a}b=$APP.k(this,"__xContextMenuLayer");if($APP.n(b)){$APP.Rg(b);this.__xContextMenuLayer=null;b=void 0;break a}}b=null}return b};G6(a.prototype,"open","open");G6(a.prototype,"disabled","disabled");H6(a.prototype,
19
- "placement","placement");H6(a.prototype,"offset","offset");H6(a.prototype,"zIndex","z-index");I6(a.prototype);return a},L6=function(){return $APP.n(customElements.get("x-context-menu"))?null:customElements.define("x-context-menu",K6())},r6=new $APP.K(null,"z-index-raw","z-index-raw",-1179679257),t6=new $APP.K(null,"z-index","z-index",1892827090),q6=new $APP.K(null,"offset-raw","offset-raw",-1418404095);var J6=["open","disabled","placement","offset","z-index"],s6=new $APP.S(null,new $APP.Q(null,6,["right-start",null,"bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null,"left-start",null],null),null);$APP.ha("baredom.exports.x_context_menu.init",L6);export const init=L6;
2
+ var $8=function(a,b){return typeof a==="string"?(a=parseInt(a,10),$APP.p(isNaN(a))&&a>0?a:b):b},Kba=function(a){return $APP.B.i(a,"bottom-start")?"top-start":$APP.B.i(a,"bottom-end")?"top-end":$APP.B.i(a,"top-start")?"bottom-start":$APP.B.i(a,"top-end")?"bottom-end":$APP.B.i(a,"right-start")?"left-start":$APP.B.i(a,"left-start")?"right-start":a},Lba=function(a,b,c,d){var e=$APP.J(c);c=$APP.C(e,$APP.cn);var f=$APP.C(e,$APP.bn),h=$APP.C(e,$APP.ki);e=$APP.C(e,$APP.li);var l=$APP.J(d);d=$APP.C(l,$APP.ki);
3
+ l=$APP.C(l,$APP.li);switch(a){case "bottom-start":return new $APP.N(null,2,[$APP.cn,c,$APP.bn,f+e+b],null);case "bottom-end":return new $APP.N(null,2,[$APP.cn,c+h-d,$APP.bn,f+e+b],null);case "top-start":return new $APP.N(null,2,[$APP.cn,c,$APP.bn,f-l-b],null);case "top-end":return new $APP.N(null,2,[$APP.cn,c+h-d,$APP.bn,f-l-b],null);case "right-start":return new $APP.N(null,2,[$APP.cn,c+h+b,$APP.bn,f],null);case "left-start":return new $APP.N(null,2,[$APP.cn,c-d-b,$APP.bn,f],null);default:return new $APP.N(null,
4
+ 2,[$APP.cn,c,$APP.bn,f+e+b],null)}},a9=function(a,b,c,d,e){function f(x){var y=Lba(x,b,c,d);y=$APP.J(y);var A=$APP.C(y,$APP.cn),D=$APP.C(y,$APP.bn);y=A>=8&&A+m<=h-8;var G=D>=8&&D+q<=l-8;A=$APP.Ii.i($APP.Hi.i(A,8),h-m-8);D=$APP.Ii.i($APP.Hi.i(D,8),l-q-8);return new $APP.N(null,5,[$APP.cn,A,$APP.bn,D,$APP.Ej,x,$APP.pn,y&&G,$APP.Ml,$APP.Hi.i(40,l-D-8)],null)}e=$APP.J(e);var h=$APP.C(e,$APP.ki),l=$APP.C(e,$APP.li);e=$APP.J(d);var m=$APP.C(e,$APP.ki),q=$APP.C(e,$APP.li),r=f(a),v=f(Kba(a));return $APP.n(function(){var x=
5
+ $APP.pn.g(r);return $APP.n(x)?x:$APP.p($APP.pn.g(v))}())?r:v},e9=function(a){a=new $APP.N(null,5,[$APP.Pj,$APP.n(a.hasAttribute("open"))?a.getAttribute("open"):null,$APP.Fh,$APP.n(a.hasAttribute("disabled"))?a.getAttribute("disabled"):null,$APP.vo,a.getAttribute("placement"),b9,a.getAttribute("offset"),c9,a.getAttribute("z-index")],null);var b=$APP.J(a),c=$APP.C(b,$APP.Pj),d=$APP.C(b,$APP.Fh),e=$APP.C(b,$APP.vo);a=$APP.C(b,b9);b=$APP.C(b,c9);c=$APP.sh(c);d=$APP.sh(d);e=typeof e==="string"&&$APP.Zc(Mba,
6
+ e)?e:"bottom-start";return new $APP.N(null,5,[$APP.ao,c,$APP.Y,d,$APP.bl,e,$APP.Cj,$8(a,8),d9,$8(b,1E3)],null)},f9=function(a){return $APP.Bc(a.querySelectorAll("[role\x3dmenuitem]:not([disabled]):not([aria-disabled\x3dtrue])"))},g9=function(a){return $APP.n(a)?a.focus():null},h9=function(a,b){a=$APP.zh(a,":host{color-scheme:light dark;--x-context-menu-bg:var(--x-color-bg,rgba(255,255,255,0.97));--x-context-menu-border:var(--x-color-border,rgba(0,0,0,0.1));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.14),0 2px 8px rgba(0,0,0,0.08));--x-context-menu-radius:var(--x-radius-md,10px);--x-context-menu-item-hover:rgba(0,0,0,0.05);--x-context-menu-item-active:rgba(0,0,0,0.09);--x-context-menu-item-fg:var(--x-color-text,rgba(0,0,0,0.87));--x-context-menu-separator:var(--x-color-border,rgba(0,0,0,0.1));}@media(prefers-color-scheme:dark){:host{--x-context-menu-bg:var(--x-color-bg,#1e293b);--x-context-menu-border:var(--x-color-border,rgba(255,255,255,0.12));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.7),0 2px 8px rgba(0,0,0,0.4));--x-context-menu-item-hover:rgba(255,255,255,0.08);--x-context-menu-item-active:rgba(255,255,255,0.14);--x-context-menu-item-fg:var(--x-color-text,rgba(255,255,255,0.9));--x-context-menu-separator:var(--x-color-border,rgba(255,255,255,0.12));}}[part\x3dpanel]{position:absolute;min-width:160px;max-width:calc(100vw - 1rem);border-radius:var(--x-context-menu-radius);background:var(--x-context-menu-bg);border:1px solid var(--x-context-menu-border);box-shadow:var(--x-context-menu-shadow);padding:4px 0;overflow:auto;pointer-events:auto;outline:none;@media(prefers-reduced-motion:no-preference){transition:opacity 120ms ease,transform 120ms ease;}}[role\x3dmenuitem]{color:var(--x-context-menu-item-fg);}[role\x3dmenuitem]:hover{background:var(--x-context-menu-item-hover);}",
7
+ b);b=document.createElement("div");b.setAttribute("part","panel");b.setAttribute("role","menu");b.setAttribute("tabindex","-1");a.shadowRoot.appendChild(b);return a},i9=function(a,b,c,d){var e=$APP.J(d);d=$APP.C(e,d9);e=$APP.C(e,$APP.Ml);a.style.zIndex=""+$APP.Q.g(d);a=$APP.Ah(a);$APP.n(a)&&(a.style.left=""+$APP.Q.g(b)+"px",a.style.top=""+$APP.Q.g(c)+"px",a.style.maxHeight=""+$APP.Q.g(e)+"px")},j9=function(a,b){a=$APP.t($APP.Bc(a.children));for(var c=null,d=0,e=0;;)if(e<d){var f=c.F(null,e);b.appendChild(f.cloneNode(!0));
8
+ e+=1}else if(a=$APP.t(a))c=a,$APP.Vc(c)?(a=$APP.Db(c),d=$APP.Eb(c),c=a,f=$APP.z(a),a=d,d=f):(f=$APP.u(c),b.appendChild(f.cloneNode(!0)),a=$APP.w(c),c=null,d=0),e=0;else break},l9=function(a,b){function c(f){f.stopPropagation();f=f.target.closest("[role\x3dmenuitem]");return $APP.n(f)?($APP.P(a,"x-context-menu-select",{item:f}),k9.i?k9.i(a,"select"):k9.call(null,a,"select")):null}function d(f){var h=f.key,l=b.shadowRoot.activeElement;return $APP.B.i(h,"Tab")?k9.i?k9.i(a,"keyboard"):k9.call(null,a,
9
+ "keyboard"):$APP.B.i(h,"ArrowDown")?(f.preventDefault(),$APP.n(l)?(f=f9(e),l=$APP.bd(f).indexOf(l),l=$APP.Hc(f,$APP.od(l+1,$APP.z(f)),null),l=g9(l)):l=g9($APP.u(f9(e))),l):$APP.B.i(h,"ArrowUp")?(f.preventDefault(),$APP.n(l)?(f=f9(e),h=$APP.z(f),l=$APP.bd(f).indexOf(l),l=$APP.Hc(f,$APP.od(l+(h-1),h),null),l=g9(l)):l=g9($APP.u(f9(e))),l):($APP.B.i(h,"Enter")||$APP.B.i(h," "))&&$APP.n(l)?(f.preventDefault(),l.click()):null}var e=$APP.Ah(b);b.addEventListener("keydown",d,!0);$APP.n(e)&&e.addEventListener("click",
10
+ c);b.__xOverlayOnKey=d;b.__xOverlayOnItemClick=c},m9=function(a){function b(d){var e=$APP.k(a,"__xContextMenuLayer");if($APP.n(e)){var f=$APP.Ah(e);d=d.composedPath();d=$APP.be(function(h){return h===f},$APP.Bc(d));return $APP.n($APP.n(f)?$APP.p(d):f)?k9.i?k9.i(a,"backdrop"):k9.call(null,a,"backdrop"):null}return null}function c(d){return $APP.B.i(d.key,"Escape")?(d.preventDefault(),k9.i?k9.i(a,"keyboard"):k9.call(null,a,"keyboard")):null}setTimeout(function(){if($APP.n(a.hasAttribute("open")))document.addEventListener("keydown",
11
+ c),document.addEventListener("click",b),a.__xContextMenuDocH={keydown:c,click:b};else return null},0)},k9=function(a,b){if($APP.n(a.hasAttribute("open"))&&$APP.ch(a,"x-context-menu-close-request",{reason:b})){var c=$APP.k(a,"__xContextMenuDocH");$APP.n(c)&&(document.removeEventListener("keydown",$APP.k(c,"keydown")),document.removeEventListener("click",$APP.k(c,"click")),a.__xContextMenuDocH=null);a.removeAttribute("open");$APP.Bh($APP.k(a,"__xContextMenuLayer"));a.__xContextMenuLayer=null;return $APP.P(a,
12
+ "x-context-menu-close",{reason:b})}return null},n9=function(a,b,c,d){if($APP.n(a.hasAttribute("disabled")))return null;if($APP.ch(a,"x-context-menu-open-request",{reason:d})){var e=e9(a);e=$APP.J(e);var f=$APP.C(e,$APP.bl),h=$APP.C(e,$APP.Cj),l=$APP.C(e,d9),m=window.innerWidth,q=window.innerHeight,r=new $APP.N(null,4,[$APP.cn,b,$APP.bn,c,$APP.ki,1,$APP.li,1],null);b=a9(f,h,r,new $APP.N(null,2,[$APP.ki,200,$APP.li,300],null),new $APP.N(null,2,[$APP.ki,m,$APP.li,q],null));var v=h9(a,l);j9(a,$APP.Ah(v));
13
+ l9(a,v);i9(v,$APP.cn.g(b),$APP.bn.g(b),$APP.Fi.l(b,d9,l));a.setAttribute("open","");a.__xContextMenuLayer=v;m9(a);requestAnimationFrame(function(){var x=$APP.Ah(v);if($APP.n(x)){var y=a9(f,h,r,new $APP.N(null,2,[$APP.ki,x.offsetWidth,$APP.li,x.offsetHeight],null),new $APP.N(null,2,[$APP.ki,m,$APP.li,q],null));i9(v,$APP.cn.g(y),$APP.bn.g(y),$APP.Fi.l(y,d9,l));return g9($APP.u(f9(x)))}return null});return $APP.P(a,"x-context-menu-open",{reason:d})}return null},Nba=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;
14
+ b=b.getBoundingClientRect();var c=e9(a);c=$APP.J(c);var d=$APP.C(c,$APP.bl),e=$APP.C(c,$APP.Cj),f=$APP.C(c,d9),h=window.innerWidth,l=window.innerHeight,m=new $APP.N(null,4,[$APP.cn,b.left,$APP.bn,b.top,$APP.ki,b.width,$APP.li,b.height],null);if($APP.ch(a,"x-context-menu-open-request",{reason:"programmatic"})){b=a9(d,e,m,new $APP.N(null,2,[$APP.ki,200,$APP.li,300],null),new $APP.N(null,2,[$APP.ki,h,$APP.li,l],null));var q=h9(a,f);j9(a,$APP.Ah(q));l9(a,q);i9(q,$APP.cn.g(b),$APP.bn.g(b),$APP.Fi.l(b,
15
+ d9,f));a.setAttribute("open","");a.__xContextMenuLayer=q;m9(a);requestAnimationFrame(function(){var r=$APP.Ah(q);if($APP.n(r)){var v=a9(d,e,m,new $APP.N(null,2,[$APP.ki,r.offsetWidth,$APP.li,r.offsetHeight],null),new $APP.N(null,2,[$APP.ki,h,$APP.li,l],null));i9(q,$APP.cn.g(v),$APP.bn.g(v),$APP.Fi.l(v,d9,f));return g9($APP.u(f9(r)))}return null});return $APP.P(a,"x-context-menu-open",{reason:"programmatic"})}return null},Oba=function(a){if(!$APP.n($APP.k(a,"__xContextMenuRefs"))){var b=a.attachShadow({mode:"open"}),
16
+ c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:contents;}slot{display:none;}";b.appendChild(c);b.appendChild(d);c={};c.root=b;c.slot=d;a.__xContextMenuRefs=c}return $APP.n(a.hasAttribute("open"))?a.removeAttribute("open"):null},Pba=function(a){var b=$APP.k(a,"__xContextMenuLayer");if($APP.n(b))$APP.Bh(b),a.__xContextMenuLayer=null;else return null},Qba=function(a,b){if($APP.B.i(b,"open")){if($APP.n(a.hasAttribute("open")))return null;b=$APP.k(a,"__xContextMenuLayer");
17
+ if($APP.n(b)){$APP.Bh(b);a.__xContextMenuLayer=null;return}}return null},Rba=function(a){a.openAt=function(b,c){return n9(this,b,c,"programmatic")};a.toggleAt=function(b,c){return $APP.n(this.hasAttribute("open"))?k9(this,"toggle"):n9(this,b,c,"toggle")};a.openForElement=function(b){return Nba(this,b)};return a.close=function(){return k9(this,"programmatic")}},Tba=function(a){$APP.jh(a,Sba);return Rba(a)},o9=function(){return $APP.Yg("x-context-menu",new $APP.N(null,5,[$APP.Pg,Uba,$APP.Qg,Oba,$APP.Rg,
18
+ Pba,$APP.Sg,Qba,$APP.Wg,Tba],null))},c9=new $APP.F(null,"z-index-raw","z-index-raw",-1179679257),d9=new $APP.F(null,"z-index","z-index",1892827090),b9=new $APP.F(null,"offset-raw","offset-raw",-1418404095);var Uba=["open","disabled","placement","offset","z-index"],Mba=new $APP.O(null,new $APP.N(null,6,["right-start",null,"bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null,"left-start",null],null),null),Sba=new $APP.N(null,5,[$APP.Bn,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"open"],null),$APP.al,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),$APP.bl,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"placement"],null),$APP.Cj,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"offset"],null),new $APP.F(null,
19
+ "zIndex","zIndex",-1588341609),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"z-index"],null)],null);
20
+ $APP.Yd(["x-context-menu-open-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,1,[$APP.Yj,$APP.U],null)],null),"x-context-menu-open",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Yj,$APP.U],null)],null),"x-context-menu-close-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,1,[$APP.Yj,$APP.U],null)],null),"x-context-menu-close",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Yj,$APP.U],null)],null),"x-context-menu-select",new $APP.N(null,2,[$APP.Fn,
21
+ !1,$APP.Z,new $APP.N(null,1,[$APP.Bl,$APP.vm],null)],null)]);$APP.ca("baredom.exports.x_context_menu.init",o9);export const init=o9;
package/dist/x-copy.js CHANGED
@@ -1,25 +1,22 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var NE=function(a){return a==null?!0:$APP.B.i(a,"false")?!1:$APP.B.i(a,"0")?!1:!0},OE=function(a){return typeof a==="string"&&$APP.N(a,"")?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:1200):1200},PE=function(a){return Math.min(1E4,Math.max(100,a))},cF=function(a){var b=$APP.M(a);a=$APP.D(b,QE);var c=$APP.D(b,RE),d=$APP.D(b,SE),e=$APP.D(b,$APP.Kh),g=$APP.D(b,$APP.xl),h=$APP.D(b,TE),l=$APP.D(b,UE),m=$APP.D(b,$APP.Ol),p=$APP.D(b,VE);b=$APP.D(b,WE);return $APP.zf([XE,$APP.wj,YE,ZE,$E,$APP.Vh,aF,$APP.X,bF,
3
- $APP.Cl],[NE(b),$APP.B.i(g,"html")?"html":"text",typeof l==="string"&&$APP.N(l.trim(),"")?l.trim():null,typeof a==="string"&&$APP.N(a.trim(),"")?a.trim():null,PE(OE(c)),typeof d==="string"&&$APP.N(d.trim(),"")?d.trim():null,function(){var q;if(q=typeof h==="string")q=(q=$APP.N(h,""))?h:q;return $APP.n(q)?q:"Copy failed"}(),$APP.F(m),function(){var q;if(q=typeof p==="string")q=(q=$APP.N(p,""))?p:q;return $APP.n(q)?q:"Copied"}(),typeof e==="string"&&$APP.N(e.trim(),"")?e.trim():null])},dF=function(a){var b=
4
- $APP.M(a);a=$APP.D(b,$APP.Cl);var c=$APP.D(b,$APP.Vh),d=$APP.D(b,YE);b=$APP.D(b,$APP.wj);return{text:$APP.n(a)?a:"",mode:$APP.n(b)?b:"text",from:$APP.n(c)?c:null,fromAttr:$APP.n(d)?d:null}},eF=function(a){var b=$APP.k(a,"__xCopyRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("button"),g=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("slot"),m=document.createElement("span");
2
+ var JH=function(a){return a==null?!0:$APP.B.i(a,"false")?!1:$APP.B.i(a,"0")?!1:!0},KH=function(a){return typeof a==="string"&&$APP.M(a,"")?(a=parseInt(a,10),$APP.p(isNaN(a))&&a>0?a:1200):1200},LH=function(a){return Math.min(1E4,Math.max(100,a))},ZH=function(a){var b=$APP.J(a);a=$APP.C(b,MH);var c=$APP.C(b,NH),d=$APP.C(b,OH),e=$APP.C(b,$APP.$i),f=$APP.C(b,$APP.Jm),h=$APP.C(b,PH),l=$APP.C(b,QH),m=$APP.C(b,$APP.Fh),q=$APP.C(b,RH);b=$APP.C(b,SH);return $APP.Lf([TH,$APP.Jk,UH,VH,WH,$APP.kj,XH,$APP.Y,YH,
3
+ $APP.Om],[JH(b),$APP.B.i(f,"html")?"html":"text",typeof l==="string"&&$APP.M(l.trim(),"")?l.trim():null,typeof a==="string"&&$APP.M(a.trim(),"")?a.trim():null,LH(KH(c)),typeof d==="string"&&$APP.M(d.trim(),"")?d.trim():null,function(){var r;if(r=typeof h==="string")r=(r=$APP.M(h,""))?h:r;return $APP.n(r)?r:"Copy failed"}(),$APP.E(m),function(){var r;if(r=typeof q==="string")r=(r=$APP.M(q,""))?q:r;return $APP.n(r)?r:"Copied"}(),typeof e==="string"&&$APP.M(e.trim(),"")?e.trim():null])},$H=function(a){var b=
4
+ $APP.J(a);a=$APP.C(b,$APP.Om);var c=$APP.C(b,$APP.kj),d=$APP.C(b,UH);b=$APP.C(b,$APP.Jk);return{text:$APP.n(a)?a:"",mode:$APP.n(b)?b:"text",from:$APP.n(c)?c:null,fromAttr:$APP.n(d)?d:null}},aI=function(a){var b=$APP.k(a,"__xCopyRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("button"),f=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("slot"),m=document.createElement("span");
5
5
  c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-copy-tooltip-bg:var(--x-color-bg,#1e293b);--x-copy-tooltip-fg:var(--x-color-text,#f8fafc);--x-copy-tooltip-success-bg:var(--x-color-primary,#15803d);--x-copy-tooltip-success-fg:#ffffff;--x-copy-tooltip-error-bg:var(--x-color-danger,#b91c1c);--x-copy-tooltip-error-fg:#fef2f2;--x-copy-tooltip-radius:var(--x-radius-md,6px);--x-copy-tooltip-padding:4px 8px;--x-copy-tooltip-font-size:var(--x-font-size-sm,0.8125rem);--x-copy-tooltip-z:100;}@media (prefers-color-scheme:dark){:host{--x-copy-tooltip-bg:var(--x-color-bg,#0f172a);--x-copy-tooltip-fg:var(--x-color-text,#e2e8f0);--x-copy-tooltip-success-bg:var(--x-color-primary,#166534);--x-copy-tooltip-success-fg:#ffffff;--x-copy-tooltip-error-bg:var(--x-color-danger,#991b1b);--x-copy-tooltip-error-fg:#fee2e2;}}[part\x3dwrap]{display:inline-flex;align-items:center;justify-content:center;}[part\x3dtrigger]{all:unset;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-sizing:border-box;}[part\x3dtrigger]:focus-visible{outline:2px solid currentColor;outline-offset:2px;}:host([disabled]) [part\x3dtrigger]{opacity:0.55;pointer-events:none;cursor:default;}[part\x3dtooltip]{display:none;position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);white-space:nowrap;background:var(--x-copy-tooltip-bg);color:var(--x-copy-tooltip-fg);border-radius:var(--x-copy-tooltip-radius);padding:var(--x-copy-tooltip-padding);font-size:var(--x-copy-tooltip-font-size);z-index:var(--x-copy-tooltip-z);pointer-events:none;}:host([data-tooltip-open]) [part\x3dtooltip]{display:block;}:host([data-tooltip-kind\x3dsuccess]) [part\x3dtooltip]{background:var(--x-copy-tooltip-success-bg);color:var(--x-copy-tooltip-success-fg);}:host([data-tooltip-kind\x3derror]) [part\x3dtooltip]{background:var(--x-copy-tooltip-error-bg);color:var(--x-copy-tooltip-error-fg);}@media (prefers-reduced-motion:reduce){[part\x3dtrigger]{transition:none;}}";
6
- d.setAttribute("part","wrap");e.setAttribute("part","trigger");e.setAttribute("type","button");e.appendChild(g);h.setAttribute("part","tooltip");h.setAttribute("role","status");h.setAttribute("aria-live","polite");l.setAttribute("name","tooltip");m.setAttribute("part","tooltip-text");h.appendChild(l);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xCopyRefs={root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:l,tooltipText:m};return $APP.k(a,"__xCopyRefs")},fF=function(a){return cF($APP.zf([SE,
7
- $APP.Kh,$APP.xl,TE,UE,$APP.Ol,VE,WE,QE,RE],[a.getAttribute("from"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("error-message"),a.getAttribute("from-attr"),a.hasAttribute("disabled"),a.getAttribute("success-message"),a.getAttribute("show-tooltip"),a.getAttribute("hotkey"),a.getAttribute("tooltip-ms")]))},gF=function(a){var b=$APP.k(a,"__xCopyTextValue");if(typeof b==="string")return b;b=a.getAttribute("text");if(typeof b==="string"&&$APP.N(b,""))return b;b=a.getAttribute("from");
8
- return typeof b==="string"&&$APP.N(b,"")&&(b=document.querySelector(b),$APP.n(b))?(a=a.getAttribute("from-attr"),a=typeof a==="string"&&$APP.N(a,"")?b.getAttribute(a):b.textContent,$APP.n(a)?a:""):""},hF=function(a){var b=gF(a),c=function(){var d=a.getAttribute("mode");return $APP.n(d)?d:"text"}();return new Promise(function(d,e){if($APP.B.i(c,"html")){if($APP.n(function(){var h=navigator.clipboard;return $APP.n(h)?window.ClipboardItem:h}()))return navigator.clipboard.write($APP.Hh(new $APP.O(null,
9
- 1,5,$APP.P,[new ClipboardItem({"text/html":new Blob([b],{type:"text/html"}),"text/plain":new Blob([b],{type:"text/plain"})})],null))).then(function(){return d.g?d.g(b):d.call(null,b)}).catch(function(h){return e.g?e.g(h):e.call(null,h)});try{var g=document.createElement("textarea");g.value=b;document.body.appendChild(g);g.select();document.execCommand("copy");g.remove();return d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}else{if($APP.n(navigator.clipboard))return navigator.clipboard.writeText(b).then(function(){return d.g?
10
- d.g(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.g?d.g(b):d.call(null,b)}catch(l){if(l instanceof Error)return e.g?e.g(h):e.call(null,h);throw l;}});try{return g=document.createElement("textarea"),g.value=b,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove(),d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}})},iF=function(a,b,c,d){var e=
11
- $APP.k(a,"__xCopyRefs");if($APP.n(e)){var g=$APP.k(a,"__xCopyTid");$APP.n(g)&&(clearTimeout(g),a.__xCopyTid=null);a.setAttribute("data-tooltip-open","");a.setAttribute("data-tooltip-kind",b);$APP.k(e,"tooltipText").textContent=c;$APP.ja(a,"__xCopyTid",setTimeout(function(){a.__xCopyTid=null;a.removeAttribute("data-tooltip-open");a.removeAttribute("data-tooltip-kind");var h=$APP.k(a,"__xCopyRefs");$APP.n(h)&&($APP.k(h,"tooltipText").textContent="");return null},d))}},jF=function(a,b,c,d){b=new CustomEvent(b,
12
- {detail:c,bubbles:!0,composed:!0,cancelable:d});a.dispatchEvent(b);return b},kF=function(a){if($APP.n(a.hasAttribute("disabled")))return Promise.resolve(null);var b=fF(a),c=dF(b);c=jF(a,"x-copy-request",c,!0);return $APP.n(c.defaultPrevented)?Promise.resolve(null):hF(a).then(function(d){jF(a,"x-copy-success",{text:$APP.n(d)?d:""},!1);$APP.n(XE.g(b))&&iF(a,"success",bF.g(b),$E.g(b));return d}).catch(function(d){jF(a,"x-copy-error",{error:""+$APP.T.g(d)},!1);$APP.n(XE.g(b))&&iF(a,"error",aF.g(b),$E.g(b));
13
- return Promise.reject(d)})},lF=function(a,b){if(typeof b==="string"&&$APP.N(b,"")){var c=b.toLowerCase().split("+");b=$APP.xc(c);var d=$APP.F($APP.Td(function(h){return $APP.B.i(h,"ctrl")},c)),e=$APP.F($APP.Td(function(h){return $APP.B.i(h,"shift")},c)),g=$APP.F($APP.Td(function(h){return $APP.B.i(h,"alt")},c));c=$APP.F($APP.Td(function(h){return $APP.B.i(h,"meta")},c));return $APP.B.i(a.key.toLowerCase(),b)&&$APP.B.i(d,a.ctrlKey)&&$APP.B.i(e,a.shiftKey)&&$APP.B.i(g,a.altKey)&&$APP.B.i(c,a.metaKey)}return null},
14
- mF=function(a){function b(e){var g=a.getAttribute("hotkey");return $APP.n(lF(e,g))?(e.preventDefault(),kF(a)):null}function c(){return kF(a)}var d=eF(a);$APP.k(d,"trigger").addEventListener("click",c);document.addEventListener("keydown",b);$APP.ja(a,"__xCopyHandlers",{click:c,keydown:b})},nF=function(a){var b=$APP.k(a,"__xCopyTid");$APP.n(b)&&(clearTimeout(b),a.__xCopyTid=null);b=$APP.k(a,"__xCopyHandlers");var c=$APP.k(a,"__xCopyRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.k(c,"trigger");var d=$APP.k(b,
15
- "click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&document.removeEventListener("keydown",b)}a.__xCopyHandlers=null},oF=function(a){var b=eF(a),c=a.hasAttribute("disabled");$APP.k(b,"trigger").disabled=$APP.F(c);$APP.n(c)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")},pF=function(a){for(var b=$APP.t(new $APP.O(null,7,5,$APP.P,[new $APP.O(null,2,5,$APP.P,["text","text"],null),new $APP.O(null,2,5,$APP.P,["from","from"],null),new $APP.O(null,
16
- 2,5,$APP.P,["fromAttr","from-attr"],null),new $APP.O(null,2,5,$APP.P,["mode","mode"],null),new $APP.O(null,2,5,$APP.P,["successMessage","success-message"],null),new $APP.O(null,2,5,$APP.P,["errorMessage","error-message"],null),new $APP.O(null,2,5,$APP.P,["hotkey","hotkey"],null)],null)),c=null,d=0,e=0;;)if(e<d){var g=c.F(null,e),h=$APP.Ac(g,0,null),l=$APP.Ac(g,1,null);Object.defineProperty(a,h,{get:function(q,v,x,y,A,C,E){return function(){return this.getAttribute(E)}}(b,c,d,e,g,h,l),set:function(q,
17
- v,x,y,A,C,E){return function(H){return H==null?this.removeAttribute(E):this.setAttribute(E,""+$APP.T.g(H))}}(b,c,d,e,g,h,l),enumerable:!0,configurable:!0});e+=1}else if(h=$APP.t(b)){g=h;if($APP.Nc(g))b=$APP.yb(g),e=$APP.zb(g),c=b,d=$APP.z(b),b=e;else{l=$APP.u(g);var m=$APP.Ac(l,0,null),p=$APP.Ac(l,1,null);Object.defineProperty(a,m,{get:function(q,v,x,y,A,C,E){return function(){return this.getAttribute(E)}}(b,c,d,e,l,m,p,g,h),set:function(q,v,x,y,A,C,E){return function(H){return H==null?this.removeAttribute(E):
18
- this.setAttribute(E,""+$APP.T.g(H))}}(b,c,d,e,l,m,p,g,h),enumerable:!0,configurable:!0});b=$APP.w(g);c=null;d=0}e=0}else break;Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(q){return $APP.n(q)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"showTooltip",{get:function(){return NE(this.getAttribute("show-tooltip"))},set:function(q){return $APP.n(q)?this.setAttribute("show-tooltip",
19
- "true"):this.setAttribute("show-tooltip","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return OE(this.getAttribute("tooltip-ms"))},set:function(q){return q==null?this.removeAttribute("tooltip-ms"):this.setAttribute("tooltip-ms",""+$APP.T.g(q|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"textValue",{get:function(){return $APP.k(this,"__xCopyTextValue")},set:function(q){this.__xCopyTextValue=typeof q==="string"?q:void 0},enumerable:!0,
20
- configurable:!0});Object.defineProperty(a,"copy",{value:function(){return kF(this)},enumerable:!0,configurable:!0,writable:!0})},rF=function(){var a=class extends HTMLElement{};a.observedAttributes=qF;a.prototype.connectedCallback=function(){eF(this);nF(this);mF(this);oF(this);return null};a.prototype.disconnectedCallback=function(){nF(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&oF(this);return null};pF(a.prototype);return a},sF=function(){$APP.n(customElements.get("x-copy"))||
21
- customElements.define("x-copy",rF());return null},XE=new $APP.K(null,"show-tooltip?","show-tooltip?",-1214081087),RE=new $APP.K(null,"tooltip-ms-raw","tooltip-ms-raw",-1973326401),bF=new $APP.K(null,"success-message","success-message",-96541601),TE=new $APP.K(null,"error-message-raw","error-message-raw",1910536231),ZE=new $APP.K(null,"hotkey","hotkey",-329017295),aF=new $APP.K(null,"error-message","error-message",1756021561),tF=new $APP.K(null,"fromAttr","fromAttr",-1768252533),UE=new $APP.K(null,
22
- "from-attr-raw","from-attr-raw",761657416),$E=new $APP.K(null,"tooltip-ms","tooltip-ms",1062450417),VE=new $APP.K(null,"success-message-raw","success-message-raw",388691116),SE=new $APP.K(null,"from-raw","from-raw",-44462428),YE=new $APP.K(null,"from-attr","from-attr",1217901743),QE=new $APP.K(null,"hotkey-raw","hotkey-raw",1972404222),WE=new $APP.K(null,"show-tooltip-raw","show-tooltip-raw",453600717);var qF="text from from-attr mode disabled show-tooltip tooltip-ms success-message error-message hotkey".split(" ");
23
- $APP.zf([new $APP.K(null,"errorMessage","errorMessage",982744869),$APP.Pj,new $APP.K(null,"textValue","textValue",-598870870),$APP.wj,tF,new $APP.K(null,"tooltipMs","tooltipMs",1056463375),ZE,$APP.Vh,new $APP.K(null,"showTooltip","showTooltip",482349691),new $APP.K(null,"successMessage","successMessage",-789572803),$APP.Cl],[new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"error-message"],null),new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"disabled"],null),new $APP.Q(null,3,[$APP.Z,$APP.Y,$APP.Ik,null,new $APP.K(null,
24
- "note","note",1426297904),"property-only override"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"mode"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"from-attr"],null),new $APP.Q(null,2,[$APP.Z,$APP.W,$APP.Ik,"tooltip-ms"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"hotkey"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"from"],null),new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"show-tooltip"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"success-message"],null),new $APP.Q(null,2,[$APP.Z,
25
- $APP.Y,$APP.Ik,"text"],null)]);$APP.Pd(["x-copy-request",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,4,[$APP.Cl,$APP.Y,$APP.wj,$APP.Y,$APP.Vh,$APP.Y,tF,$APP.Y],null)],null),"x-copy-success",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,1,[$APP.Cl,$APP.Y],null)],null),"x-copy-error",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,1,[$APP.Ei,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_copy.init",sF);export const init=sF;
6
+ d.setAttribute("part","wrap");e.setAttribute("part","trigger");e.setAttribute("type","button");e.appendChild(f);h.setAttribute("part","tooltip");h.setAttribute("role","status");h.setAttribute("aria-live","polite");l.setAttribute("name","tooltip");m.setAttribute("part","tooltip-text");h.appendChild(l);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xCopyRefs={root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:l,tooltipText:m};return $APP.k(a,"__xCopyRefs")},bI=function(a){return ZH($APP.Lf([OH,
7
+ $APP.$i,$APP.Jm,PH,QH,$APP.Fh,RH,SH,MH,NH],[a.getAttribute("from"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("error-message"),a.getAttribute("from-attr"),a.hasAttribute("disabled"),a.getAttribute("success-message"),a.getAttribute("show-tooltip"),a.getAttribute("hotkey"),a.getAttribute("tooltip-ms")]))},cI=function(a){var b=$APP.k(a,"__xCopyTextValue");if(typeof b==="string")return b;b=a.getAttribute("text");if(typeof b==="string"&&$APP.M(b,""))return b;b=a.getAttribute("from");
8
+ return typeof b==="string"&&$APP.M(b,"")&&(b=document.querySelector(b),$APP.n(b))?(a=a.getAttribute("from-attr"),a=typeof a==="string"&&$APP.M(a,"")?b.getAttribute(a):b.textContent,$APP.n(a)?a:""):""},dI=function(a){var b=cI(a),c=function(){var d=a.getAttribute("mode");return $APP.n(d)?d:"text"}();return new Promise(function(d,e){if($APP.B.i(c,"html")){if($APP.n(function(){var h=navigator.clipboard;return $APP.n(h)?window.ClipboardItem:h}()))return navigator.clipboard.write($APP.Xi(new $APP.De(null,
9
+ 1,5,$APP.Ee,[new ClipboardItem({"text/html":new Blob([b],{type:"text/html"}),"text/plain":new Blob([b],{type:"text/plain"})})],null))).then(function(){return d.g?d.g(b):d.call(null,b)}).catch(function(h){return e.g?e.g(h):e.call(null,h)});try{var f=document.createElement("textarea");f.value=b;document.body.appendChild(f);f.select();document.execCommand("copy");f.remove();return d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return f=h,e.g?e.g(f):e.call(null,f);throw h;}}else{if($APP.n(navigator.clipboard))return navigator.clipboard.writeText(b).then(function(){return d.g?
10
+ d.g(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.g?d.g(b):d.call(null,b)}catch(l){if(l instanceof Error)return e.g?e.g(h):e.call(null,h);throw l;}});try{return f=document.createElement("textarea"),f.value=b,f.style.position="fixed",f.style.opacity="0",document.body.appendChild(f),f.select(),document.execCommand("copy"),f.remove(),d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return f=h,e.g?e.g(f):e.call(null,f);throw h;}}})},eI=function(a,b,c,d){var e=
11
+ $APP.k(a,"__xCopyRefs");if($APP.n(e)){var f=$APP.k(a,"__xCopyTid");$APP.n(f)&&(clearTimeout(f),a.__xCopyTid=null);a.setAttribute("data-tooltip-open","");a.setAttribute("data-tooltip-kind",b);$APP.k(e,"tooltipText").textContent=c;$APP.fa(a,"__xCopyTid",setTimeout(function(){a.__xCopyTid=null;a.removeAttribute("data-tooltip-open");a.removeAttribute("data-tooltip-kind");var h=$APP.k(a,"__xCopyRefs");$APP.n(h)&&($APP.k(h,"tooltipText").textContent="");return null},d))}},fI=function(a){if($APP.n(a.hasAttribute("disabled")))return Promise.resolve(null);
12
+ var b=bI(a),c=$H(b);return $APP.ch(a,"x-copy-request",c)?dI(a).then(function(d){$APP.P(a,"x-copy-success",{text:$APP.n(d)?d:""});$APP.n(TH.g(b))&&eI(a,"success",YH.g(b),WH.g(b));return d}).catch(function(d){$APP.P(a,"x-copy-error",{error:""+$APP.Q.g(d)});$APP.n(TH.g(b))&&eI(a,"error",XH.g(b),WH.g(b));return Promise.reject(d)}):Promise.resolve(null)},gI=function(a,b){if(typeof b==="string"&&$APP.M(b,"")){var c=b.toLowerCase().split("+");b=$APP.Ec(c);var d=$APP.E($APP.be(function(h){return $APP.B.i(h,
13
+ "ctrl")},c)),e=$APP.E($APP.be(function(h){return $APP.B.i(h,"shift")},c)),f=$APP.E($APP.be(function(h){return $APP.B.i(h,"alt")},c));c=$APP.E($APP.be(function(h){return $APP.B.i(h,"meta")},c));return $APP.B.i(a.key.toLowerCase(),b)&&$APP.B.i(d,a.ctrlKey)&&$APP.B.i(e,a.shiftKey)&&$APP.B.i(f,a.altKey)&&$APP.B.i(c,a.metaKey)}return null},hI=function(a){function b(e){var f=a.getAttribute("hotkey");return $APP.n(gI(e,f))?(e.preventDefault(),fI(a)):null}function c(){return fI(a)}var d=aI(a);$APP.k(d,"trigger").addEventListener("click",
14
+ c);document.addEventListener("keydown",b);$APP.fa(a,"__xCopyHandlers",{click:c,keydown:b})},iI=function(a){var b=$APP.k(a,"__xCopyTid");$APP.n(b)&&(clearTimeout(b),a.__xCopyTid=null);b=$APP.k(a,"__xCopyHandlers");var c=$APP.k(a,"__xCopyRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.k(c,"trigger");var d=$APP.k(b,"click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&document.removeEventListener("keydown",b)}a.__xCopyHandlers=null},jI=function(a){var b=aI(a),c=a.hasAttribute("disabled");
15
+ $APP.k(b,"trigger").disabled=$APP.E(c);$APP.n(c)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")},kI=function(a){aI(a);iI(a);hI(a);jI(a);return null},lI=function(a){iI(a);return null},mI=function(a,b,c,d){$APP.M(c,d)&&jI(a);return null},nI=function(a){$APP.fh(a,"text","text");$APP.fh(a,"from","from");$APP.fh(a,"fromAttr","from-attr");$APP.fh(a,"mode","mode");$APP.fh(a,"successMessage","success-message");$APP.fh(a,"errorMessage","error-message");$APP.fh(a,"hotkey","hotkey");
16
+ $APP.dh(a,"disabled","disabled");Object.defineProperty(a,"showTooltip",{get:function(){return JH(this.getAttribute("show-tooltip"))},set:function(b){return $APP.n(b)?this.setAttribute("show-tooltip","true"):this.setAttribute("show-tooltip","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return KH(this.getAttribute("tooltip-ms"))},set:function(b){return b==null?this.removeAttribute("tooltip-ms"):this.setAttribute("tooltip-ms",""+$APP.Q.g(b|0))},enumerable:!0,
17
+ configurable:!0});Object.defineProperty(a,"textValue",{get:function(){return $APP.k(this,"__xCopyTextValue")},set:function(b){this.__xCopyTextValue=typeof b==="string"?b:void 0},enumerable:!0,configurable:!0});return Object.defineProperty(a,"copy",{value:function(){return fI(this)},enumerable:!0,configurable:!0,writable:!0})},pI=function(){return $APP.Yg("x-copy",new $APP.N(null,5,[$APP.Pg,oI,$APP.Qg,kI,$APP.Rg,lI,$APP.Sg,mI,$APP.Wg,nI],null))},TH=new $APP.F(null,"show-tooltip?","show-tooltip?",-1214081087),
18
+ NH=new $APP.F(null,"tooltip-ms-raw","tooltip-ms-raw",-1973326401),YH=new $APP.F(null,"success-message","success-message",-96541601),PH=new $APP.F(null,"error-message-raw","error-message-raw",1910536231),VH=new $APP.F(null,"hotkey","hotkey",-329017295),XH=new $APP.F(null,"error-message","error-message",1756021561),qI=new $APP.F(null,"fromAttr","fromAttr",-1768252533),QH=new $APP.F(null,"from-attr-raw","from-attr-raw",761657416),WH=new $APP.F(null,"tooltip-ms","tooltip-ms",1062450417),RH=new $APP.F(null,
19
+ "success-message-raw","success-message-raw",388691116),OH=new $APP.F(null,"from-raw","from-raw",-44462428),UH=new $APP.F(null,"from-attr","from-attr",1217901743),MH=new $APP.F(null,"hotkey-raw","hotkey-raw",1972404222),SH=new $APP.F(null,"show-tooltip-raw","show-tooltip-raw",453600717);var oI="text from from-attr mode disabled show-tooltip tooltip-ms success-message error-message hotkey".split(" ");
20
+ $APP.Lf([new $APP.F(null,"errorMessage","errorMessage",982744869),$APP.al,new $APP.F(null,"textValue","textValue",-598870870),$APP.Jk,qI,new $APP.F(null,"tooltipMs","tooltipMs",1056463375),VH,$APP.kj,new $APP.F(null,"showTooltip","showTooltip",482349691),new $APP.F(null,"successMessage","successMessage",-789572803),$APP.Om],[new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"error-message"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,null,new $APP.F(null,
21
+ "note","note",1426297904),"property-only override"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"mode"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"from-attr"],null),new $APP.N(null,2,[$APP.R,$APP.V,$APP.S,"tooltip-ms"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"hotkey"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"from"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"show-tooltip"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"success-message"],null),new $APP.N(null,2,[$APP.R,$APP.U,
22
+ $APP.S,"text"],null)]);$APP.Yd(["x-copy-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,4,[$APP.Om,$APP.U,$APP.Jk,$APP.U,$APP.kj,$APP.U,qI,$APP.U],null)],null),"x-copy-success",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Om,$APP.U],null)],null),"x-copy-error",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Nj,$APP.U],null)],null)]);$APP.ca("baredom.exports.x_copy.init",pI);export const init=pI;