@ixfx/components 0.13.7 → 0.13.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle/index.js CHANGED
@@ -7735,7 +7735,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
7735
7735
  height: 100%;
7736
7736
  transform: none;
7737
7737
  }
7738
- `]}};E([d({type:Boolean,reflect:!0})],ob.prototype,`collapsed`,void 0),E([d({type:String,attribute:`orientation`,reflect:!0})],ob.prototype,`orientation`,void 0),E([d({type:Boolean})],ob.prototype,`closable`,void 0),E([d({type:Boolean,reflect:!0})],ob.prototype,`collapsible`,void 0),E([d({type:String})],ob.prototype,`title`,void 0),E([d({type:String,attribute:`icon-name`})],ob.prototype,`iconName`,void 0),E([d({type:String,attribute:`toggle-interaction`})],ob.prototype,`toggleInteraction`,void 0),E([d({type:String,attribute:`variant`,reflect:!0})],ob.prototype,`variant`,void 0),E([d({type:Boolean,attribute:`hide-titlebar`})],ob.prototype,`hideTitlebar`,void 0),E([d({type:Boolean,attribute:`keep-toolbar`})],ob.prototype,`keepToolbar`,void 0),ob=E([T(`ixfx-panel`)],ob);const sb=`__ungrouped__`;let cb=class extends n{constructor(...e){super(...e),this.grouped=!1,this.crossGroupSelection=!1,this.#n=new Map,this.#i=!1,this.#a=new Ae(this),this.#d=e=>{if(this.#i)return;let n=e.target,r;for(let[e,i]of this.#n)if(i===n){r=e;break}if(r!==void 0){if(this.grouped&&!this.crossGroupSelection){this.#i=!0;for(let[e,n]of this.#n)e!==r&&n.clearSelection();this.#i=!1}this.dispatchEvent(new CustomEvent(`grouped-select`,{detail:{selected:this.selectedItems,groupKey:r===sb?void 0:r},bubbles:!0,composed:!0}))}}}#e;#t;#n;#r;#i;#a;get groupBy(){return this.#e}set groupBy(e){this.#e=e,this.requestUpdate()}get factory(){return this.#t}set factory(e){e!==this.#t&&(this.#s(),this.#t=e,this.requestUpdate())}get provider(){return this.#a.provider}set provider(e){this.#a.provider=e,e&&this.#a.request(void 0)}get selectedItems(){let e=new Set;for(let n of this.#n.values())for(let r of n.selectedItems)e.add(r);return e}dispatch(e,n){for(let r of this.#n.values())r.dispatch(e,n)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener(`select`,this.#d)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`select`,this.#d)}updated(e){super.updated(e),e.has(`grouped`)&&this.#s(),this.#c()}render(){return this.#t?this.grouped?this.#e?(this.#r=this.#o(),i`${_(this.#r.keys(),e=>e,e=>i`<ixfx-panel data-group-key=${e} .title=${e}></ixfx-panel>`)}`):a:i`<div class="ungrouped-host"></div>`:a}#o(){let e=new Map;if(!this.#e)return e;for(let n of this.#a.items){let r=this.#e(n),i=e.get(r);i||(i=[],e.set(r,i)),i.push(n)}return e}#s(){for(let e of this.#n.values())e.remove();this.#n.clear()}#c(){if(this.#t){if(!this.grouped){this.#l();return}this.#e&&this.#u()}}#l(){let e=this.querySelector(`.ungrouped-host`);if(!e)return;let n=this.#n.get(sb);n||(n=this.#t(void 0),e.appendChild(n),this.#n.set(sb,n)),n.setItems(this.#a.items)}#u(){let e=this.#r??this.#o();for(let n of[...this.#n.keys()])e.has(n)||(this.#n.get(n)?.remove(),this.#n.delete(n));for(let[n,r]of e){let e=[...this.children].find(e=>e instanceof HTMLElement&&e.dataset.groupKey===n);if(!e)continue;let i=this.#n.get(n);i||(i=this.#t(n),e.appendChild(i),this.#n.set(n,i)),i.setItems(r)}}#d};E([d({type:Boolean,reflect:!0})],cb.prototype,`grouped`,void 0),E([d({type:Boolean,attribute:`cross-group-selection`,reflect:!0})],cb.prototype,`crossGroupSelection`,void 0),cb=E([T(`ixfx-grouped-item-lister`)],cb);const lb=`application/x-ixfx-tree`,ub=new Map,db=new Map;let fb,pb=0;function mb(){return`tree-drag-${++pb}-${Date.now()}`}function hb(e,n,r,i){ub.set(e,{sourceId:e,nodes:r,keys:i}),db.set(e,new WeakRef(n)),fb=e}function gb(e){ub.delete(e),db.delete(e),fb===e&&(fb=void 0)}function _b(){if(fb===void 0)return;let e=ub.get(fb);if(e)return{sourceId:fb,keys:e.keys,nodes:e.nodes,element:db.get(fb)?.deref()}}function vb(e,n,r){return Math.max(n,Math.min(r,e))}var yb=class{#e;#t;#n=!1;#r;#i=`internal`;#a=[];#o=[];#s;#c;#l=0;#u=0;#d=0;#f;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}get isDragging(){return this.#n}get isRejected(){return this.#n&&this.#r===void 0}get dropState(){return this.#r}hostConnected(){this.#p()}hostUpdated(){this.#p()}#p(){let e=this.#t.getScrollContainer();!e||e===this.#f||(this.#m(),this.#f=e,e.addEventListener(`dragenter`,this.#h),e.addEventListener(`dragover`,this.#g),e.addEventListener(`dragleave`,this.#v),e.addEventListener(`drop`,this.#y))}#m(){let e=this.#f;e&&(e.removeEventListener(`dragenter`,this.#h),e.removeEventListener(`dragover`,this.#g),e.removeEventListener(`dragleave`,this.#v),e.removeEventListener(`drop`,this.#y),this.#f=void 0)}hostDisconnected(){this.#m(),this.#w(),this.#D(),this.#n=!1,this.#r=void 0}#h=e=>{this.#t.getDndMode()===`none`||!e.dataTransfer||this.#t.resolveDrag(e.dataTransfer,`hover`)!==void 0&&(e.preventDefault(),this.#n||(this.#n=!0,this.#t.onActiveChange(!0)))};#g=e=>{if(this.#t.getDndMode()===`none`||!e.dataTransfer)return;this.#u=e.clientX,this.#d=e.clientY;let n=this.#t.resolveDrag(e.dataTransfer,`hover`);if(!n){this.#_(e);return}this.#n||(this.#n=!0,this.#t.onActiveChange(!0)),this.#i=n.source,this.#a=n.keys,this.#o=n.nodes;let r=this.#t.getVisibleRows();this.#C(this.#x(r,e.clientY)),this.#T();let i=this.#S(e,r,n.source);if(!i){this.#_(e,!1);return}let a={source:n.source,dragged:n.nodes.length>0?n.nodes:void 0,draggedKeys:n.keys,target:i,dataTransfer:e.dataTransfer};if(!this.#t.vet(a)){this.#_(e,!1);return}e.preventDefault(),e.dataTransfer.dropEffect=n.source===`internal`?`move`:`copy`,this.#O(i)};#_(e,n=!0){e.dataTransfer&&(e.dataTransfer.dropEffect=`none`),this.#O(void 0),n&&this.#w()}#v=e=>{let n=this.#t.getScrollContainer(),r=e.relatedTarget;n&&r&&n.contains(r)||this.#b()};#y=e=>{if(!e.dataTransfer){this.#b();return}e.preventDefault(),this.#D(),this.#w();let n=e=>{this.#r=void 0,this.#n=!1,this.#t.onDropStateChange(void 0),this.#t.onActiveChange(!1),this.#t.onDragEnd(e)};if(this.#t.getDndMode()===`none`){n(!1);return}let r=this.#t.resolveDrag(e.dataTransfer,`drop`);if(!r){n(!1);return}this.#a=r.keys,this.#o=r.nodes;let i=this.#S(e,this.#t.getVisibleRows(),r.source);if(!i){n(!1);return}let a={source:r.source,dragged:r.nodes.length>0?r.nodes:void 0,draggedKeys:r.keys,target:i,dataTransfer:e.dataTransfer};if(!this.#t.vet(a)){n(!1);return}let o={...a,external:r.source===`external`?r.nodes:void 0};n(this.#t.commitDrop(o))};#b(){this.#w(),this.#D(),this.#r!==void 0&&(this.#r=void 0,this.#t.onDropStateChange(void 0)),this.#n&&(this.#n=!1,this.#t.onActiveChange(!1))}#x(e,n){if(e.length!==0)return n<e[0].rect.top?e[0]:n>e[e.length-1].rect.bottom?e[e.length-1]:e.find(e=>n>=e.rect.top&&n<=e.rect.bottom)??e[e.length-1]}#S(e,n,r){if(n.length===0)return;let i=this.#x(n,e.clientY);if(!i)return;let a=vb((e.clientY-i.rect.top)/i.rect.height,0,1),o=a<.25?`before`:a>.75?`after`:`inside`,s=i.node.item.isLeaf===!0;o===`inside`&&s&&(o=`after`);let c=!1;o===`after`&&!s&&this.#t.isExpanded(i.key)&&(o=`inside`,c=!0);let l,u,d,f;if(o===`inside`)l=i.key,u=i.key,d=i.depth+1,f=c?0:i.node.children?.length??0;else{let r=this.#t.getIndentPx()||1,a=n[0].rect.left,s=vb(Math.round((e.clientX-a)/r),0,i.depth),c={node:i.node,depth:i.depth,parentKey:this.#t.getRowInfo(i.key)?.parentKey};u=i.key;for(let e=i.depth-s;e>0&&c.parentKey!==void 0;e--){let e=this.#t.getRowInfo(c.parentKey);if(!e)break;u=c.parentKey,c=e}d=c.depth,l=c.parentKey;let p=this.#t.getChildren(l).findIndex(e=>e.item.key===u);f=(p<0?0:p)+ +(o===`after`)}if(r===`internal`){for(let e of this.#a)if(e===l||e===u||l!==void 0&&this.#t.isSelfOrDescendant(e,l)||o!==`inside`&&this.#t.isSelfOrDescendant(e,u))return;if(this.#a.length>0&&!this.#t.isReorderAllowed()&&!this.#a.some(e=>this.#t.getParentKey(e)!==l))return}return{parentKey:l,index:f,referenceKey:u,position:o,depth:d}}#C(e){if(!e||e.node.item.isLeaf===!0||this.#t.isExpanded(e.key)){this.#w();return}if(e.key===this.#c)return;this.#w();let n=this.#c=e.key;this.#s=setTimeout(()=>{this.#s=void 0,this.#c===n&&(this.#c=void 0,this.#t.expandKey(n))},Math.max(0,this.#t.getExpandHoverMs()))}#w(){this.#s!==void 0&&(clearTimeout(this.#s),this.#s=void 0),this.#c=void 0}#T(){this.#l===0&&(this.#l=requestAnimationFrame(this.#E))}#E=()=>{if(this.#l=0,!this.#n)return;let e=this.#t.getScrollContainer();if(!e)return;let n=e.getBoundingClientRect(),r=this.#d-n.top,i=0;r<24?i=-Math.ceil(16*(1-Math.max(0,r)/24)):r>n.height-24&&(i=Math.ceil(16*(1-Math.max(0,n.height-r)/24))),i!==0&&this.#u>=n.left&&this.#u<=n.right&&(e.scrollTop+=i,this.#T())};#D(){this.#l!==0&&(cancelAnimationFrame(this.#l),this.#l=0)}#O(e){let n=e===void 0?this.#r===void 0:e.referenceKey===this.#r?.referenceKey&&e.position===this.#r?.position&&e.depth===this.#r?.depth&&e.index===this.#r?.index;this.#r=e,(!n||this.#n)&&this.#t.onDropStateChange(e)}};function bb(e,n){let r=[],i=new Map,a=[],o=(e,r,i)=>{if(!e||e.length===0)return;let o=e.filter(e=>n.isShown(e,r));for(let e=o.length-1;e>=0;e--)a.push({node:o[e],depth:r,parentKey:i,posInSet:e+1,setSize:o.length})};for(o(e.children,0,void 0);a.length>0;){let{node:e,depth:s,parentKey:c,posInSet:l,setSize:u}=a.pop();i.set(e.item.key,r.length),r.push({node:e,depth:s,parentKey:c,posInSet:l,setSize:u}),e.children&&e.children.length>0&&n.isExpanded(e,s)&&o(e.children,s+1,e.item.key)}return{rows:r,indexByKey:i}}function xb(e){let n=new Map,r=new Set,i=[];if(e.children)for(let r of e.children)n.set(r.item.key,e.item.key),i.push({node:r,depth:0,parentKey:e.item.key});for(;i.length>0;){let{node:e,depth:a,parentKey:o}=i.pop();if(n.set(e.item.key,o),e.item.icon&&r.add(a),e.children)for(let n=e.children.length-1;n>=0;n--){let r=e.children[n];i.push({node:r,depth:a+1,parentKey:e.item.key})}}return{parentByKey:n,depthsWithIcons:r}}function Sb(e,n){let r=new Set;if(!e.children)return r;let i=[],a=(e,r)=>{i.push({node:e,depth:r,next:0,matched:n(e,r)})};for(let n of e.children)for(a(n,0);i.length>0;){let e=i[i.length-1],n=e.node.children;if(n&&e.next<n.length){a(n[e.next++],e.depth+1);continue}i.pop(),e.matched&&(r.add(e.node.item.key),i.length>0&&(i[i.length-1].matched=!0))}return r}function Cb(e,n,r){if(r.size===0)return[...e];let i=new Set;for(let n of e)i.add(n.node.item.key);let a=Symbol(`end`),o=new Map,s=a;for(let e=n.length-1;e>=0;e--){let a=n[e];if(i.has(a)){s=a;continue}let c=r.get(a);if(!c)continue;let l=o.get(s);l?l.push(c):o.set(s,[c])}let c=[];for(let n of e){let e=o.get(n.node.item.key);if(e)for(let n=e.length-1;n>=0;n--)c.push(e[n]);c.push(n)}let l=o.get(a);if(l)for(let e=l.length-1;e>=0;e--)c.push(l[e]);return c}function wb(e,n){let r=new Map;if(!e.children)return r;let i=[];for(let a of e.children)for(i.push({node:a,next:0,checked:0,unchecked:0});i.length>0;){let e=i[i.length-1],{node:a}=e,o=a.children,s=a.item.isLeaf||!o?.length;if(!s&&e.next<o.length){i.push({node:o[e.next++],next:0,checked:0,unchecked:0});continue}i.pop();let c;if(c=s?n.has(a)?`checked`:`unchecked`:e.checked===o.length?`checked`:e.unchecked===o.length?`unchecked`:`indeterminate`,r.set(a.item.key,c),i.length>0){let e=i[i.length-1];c===`checked`?e.checked++:c===`unchecked`&&e.unchecked++}}return r}function Tb(e,n){if(e.has(n))return e;let r=new Set(e);return r.add(n),r}function Eb(e,n){if(!e.has(n))return e;let r=new Set(e);return r.delete(n),r}function Db(e,n){let r;for(let i of e)n(i)&&(r??=new Set(e),r.delete(i));return r??e}function Ob(e){return Math.max(1,e.rowHeight+e.gap)}function kb(e,n){return e.listOffset+n*Ob(e)+e.gap}function Ab(e,n){return kb(e,n)+e.rowHeight}function jb(e,n,r=5){let{count:i}=e;if(i<=0)return{start:0,end:0};let a=Ob(e),o=Math.max(0,n-e.listOffset),s=Math.floor(o/a),c=Math.ceil((o+e.viewportHeight)/a),l=Math.min(i,Math.max(0,s-r));return{start:l,end:Math.min(i,Math.max(l,c+r))}}function Mb(e,n,r,i=0){if(n<0||n>=e.count)return r;let a=kb(e,n),o=a+e.rowHeight;return a<r+i?n===0?0:Math.max(0,a-i):o>r+e.viewportHeight?Math.max(0,o-e.viewportHeight):r}function Nb(e,n,r,i=0){if(n<0||n>=e.count)return r;let a=kb(e,n),o=a+e.rowHeight;if(a>=r+i&&o<=r+e.viewportHeight)return r;let s=a+e.rowHeight/2-(e.viewportHeight+i)/2;return Math.max(0,s)}function Pb(e){return Math.max(1,Math.floor(e.viewportHeight/Ob(e))-1)}function Fb(e){return{count:e.count,topOf:n=>kb(e,n),bottomOf:n=>Ab(e,n)}}function Ib(e,n){let r=0,i=e.count;for(;r<i;){let a=r+i>>>1;e.bottomOf(a)>n?i=a:r=a+1}return r}function Lb(e,n,r,i=0){if(e.count===0)return;let a=Math.min(Ib(e,n),e.count-1),o=a,s=e.count;for(;o<s;){let n=o+s>>>1;e.topOf(n)>=r?s=n:o=n+1}let c=Math.max(a,o-1);return{first:Math.max(0,a-i),last:Math.min(e.count-1,c+i)}}const Rb={rows:[],indexByKey:new Map};let q=class extends n{constructor(...e){super(...e),this.exclusivity=`none`,this.selectionFilter=`all`,this.interactionMode=`standard`,this._selectedNodes=new Set,this.disableKeyboardNavigation=!1,this.registry=void 0,this.itemDnd=`none`,this.dndExpandHoverMs=500,this.reorderable=!0,this.stickyHeaders=!0,this.virtualize=`auto`,this.virtualizeThreshold=200,this.applyInternalDrop=!0,this._expandedKeys=new Set,this.#i=0,this._selectionVersion=0,this._scrollTop=0,this.#l={rowHeight:30,gap:1,listOffset:0},this.#u=0,this.#d=0,this.#m=0,this.#h=0,this.#g=!1,this.#S=()=>{this.#d===0&&(this.#d=requestAnimationFrame(()=>{this.#d=0,this.#C()}))},this.tickled=new ie(this,{getItems:()=>this.#s().rows.map(({node:e})=>({id:e.item.key,enabled:!0})),hoverDisabled:()=>this.#J?.isDragging===!0||this.#Y?.isDragging===!0,onStateChange:()=>{this.setAttribute(`data-input-mode`,this.tickled.inputMode)}}),this._focusedDepth=0,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.tree-label`,highlightKey:`incr-search-highlight`})}),this.#I={indent:20},this.#L=[],this.#R=[],this.#z=new Map,this.#B=new Map,this.#V=new Set,this.#H=new Map,this.#U=new Map,this.#W=!1,this.#G=``,this.#X=new Set,this.#Z=!1,this.#$=()=>{this.#Q=void 0},this.#te=()=>{this.#de===0&&(this.#de=requestAnimationFrame(()=>{this.#de=0,this.#re()}))},this._stickyKeys=[],this.#le=new Map,this.#ue=!0,this.#de=0,this.#pe=!1,this.#Fe=`user`,this.#Ie=!1,this.#Qe=0,this.#ut=e=>{if(this.search.isOpen)return;let n=this.#s().rows;if(n.length===0)return;if((e.ctrlKey||e.metaKey)&&e.key===`a`){e.preventDefault(),this.selectAll();return}[`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`,`Enter`,` `].includes(e.key)&&this.tickled.setInputMode(`keyboard`);let r=this.#at();switch(e.key){case`ArrowDown`:e.preventDefault(),this.#lt(n,r,Math.min(r+1,n.length-1),e.shiftKey);break;case`ArrowUp`:e.preventDefault(),this.#lt(n,r,Math.max(r-1,0),e.shiftKey);break;case`Home`:e.preventDefault(),this.#lt(n,r,0,e.shiftKey);break;case`End`:e.preventDefault(),this.#lt(n,r,n.length-1,e.shiftKey);break;case`PageDown`:{e.preventDefault();let i=this.#ct();this.#lt(n,r,Math.min(r+i,n.length-1),e.shiftKey);break}case`PageUp`:{e.preventDefault();let i=this.#ct();this.#lt(n,r,Math.max(r-i,0),e.shiftKey);break}case`ArrowRight`:{e.preventDefault();let i=n[r];i&&i.node.item.isLeaf!==!0&&(this._expandedKeys.has(i.node.item.key)?r+1<n.length&&this.#ot(r+1):this.#Ge(i.node,i.depth)),this.requestUpdate();break}case`ArrowLeft`:{e.preventDefault();let i=n[r];if(i&&this._expandedKeys.has(i.node.item.key))this.#e(Eb(this._expandedKeys,i.node.item.key)),this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:i.node,depth:i.depth},bubbles:!0,composed:!0}));else if(i.depth>0){let e=i.depth-1;for(let i=r-1;i>=0;i--)if(n[i].depth===e){this.#ot(i);break}}this.requestUpdate();break}case`Enter`:{e.preventDefault();let i=n[r];i&&(this.interactionMode!==`manual`&&this.interactionMode!==`checked`&&this.select(i.node),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:i.node,depth:i.depth},bubbles:!0,composed:!0})),this.requestUpdate());break}case` `:{e.preventDefault();let i=n[r];if(!i)break;this.interactionMode===`checked`?this._handleCheckboxClick(new MouseEvent(`click`),i.node,i.depth):(this.interactionMode===`standard`||this.interactionMode===`vscode`||this.interactionMode===`manual`)&&this.#We(i.node,i.depth);break}case`Escape`:e.preventDefault(),this.#et()}},this.#dt=e=>{let n=e.target.closest(`ul.tree-list li`);if(!n)return;let r=n.dataset.key;if(!r)return;let i=this.#s(),a=i.indexByKey.get(r),o=a===void 0?void 0:i.rows[a];if(!o)return;let s={node:o.node,depth:o.depth};this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:s,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`activate`,{detail:s,bubbles:!0,composed:!0}))}}get selectedNodes(){return this._selectedNodes}#e(e){e!==this._expandedKeys&&(this._expandedKeys=e,this.#t=void 0,this.#ue=!0)}#t;#n;#r;#i;#a;#o;invalidateStructure(){this.#i++,this.#t=void 0,this.requestUpdate()}#s(){if(!this.root)return Rb;if(this.#t&&this.#n===this.root&&this.#r===this.filterPredicate)return this.#t;let e=this.#D();return this.#t=bb(this.root,{isExpanded:(e,n)=>this._isExpanded(e,n),isShown:e?n=>e.matches.has(n.item.key):()=>!0}),this.#n=this.root,this.#r=this.filterPredicate,this.#t}#c(){let e=this.root;if(!e)return{parentByKey:new Map,depthsWithIcons:new Set};let n=this.#a;if(n&&n.root===e&&n.version===this.#i)return n.index;let r=xb(e);return this.#a={root:e,version:this.#i,index:r},r}#l;#u;#d;#f;#p;#m;#h;#g;#_(){return this.virtualize===`off`?!1:this.virtualize===`on`||this.#s().rows.length>this.virtualizeThreshold}#v(e){return{count:e,rowHeight:this.#l.rowHeight,gap:this.#l.gap,listOffset:this.#l.listOffset,viewportHeight:this.#u>0?this.#u:600}}#y(){let e=this.renderRoot.querySelector(`ul.tree-list`),n=e?.querySelector(`li.item:not(.leaving)`),r=n?.getBoundingClientRect().height??0,i=r>0?r:this.#Se(),a=n?Number.parseFloat(getComputedStyle(n).marginTop):NaN,o=Number.isNaN(a)?Number.parseFloat(getComputedStyle(this).getPropertyValue(`--tree-item-gap`)):a,s=Number.isNaN(o)?1:o,c=this.#l.listOffset;if(e){let n=Number.parseFloat(getComputedStyle(e).paddingTop);c=e.offsetTop+(Number.isNaN(n)?0:n)}let l=this.#be()?.clientHeight??0,u=l>0&&l!==this.#u;l>0&&(this.#u=l);let d=this.#l,f=d.rowHeight!==i||d.gap!==s||d.listOffset!==c;return this.#l={rowHeight:i,gap:s,listOffset:c},f||u}#b(e){return jb(this.#v(e),this._scrollTop)}#x(){let e=this.#be()?.scrollTop;e!==void 0&&e!==this._scrollTop&&(this._scrollTop=e)}#S;#C(){let e=this.#be();if(!e||!this.root||!this.#_())return;let n=e.scrollTop;if(n===this._scrollTop)return;let r=jb(this.#v(this.#s().rows.length),n);(r.start!==this.#m||r.end!==this.#h)&&(this._scrollTop=n)}#w(){let e=this.#be();e!==this.#f&&(this.#f?.removeEventListener(`scroll`,this.#S),this.#p?.disconnect(),this.#p=void 0,this.#f=e,e&&(e.addEventListener(`scroll`,this.#S,{passive:!0}),typeof ResizeObserver<`u`&&(this.#p=new ResizeObserver(e=>{let n=e.at(-1)?.contentRect.height??0;n>0&&n!==this.#u&&this.#_()&&this.requestUpdate()}),this.#p.observe(e))))}#T(){this.#f?.removeEventListener(`scroll`,this.#S),this.#f=void 0,this.#p?.disconnect(),this.#p=void 0,this.#d!==0&&(cancelAnimationFrame(this.#d),this.#d=0)}#E(e,n=`edge`){let r=this.#be();if(!r)return;let i=this.#v(this.#s().rows.length),a=this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0,o=(n===`center-if-hidden`?Nb:Mb)(i,e,r.scrollTop,a);(o!==r.scrollTop||o!==this._scrollTop)&&(r.scrollTop=o,this._scrollTop=o)}#D(){let e=this.filterPredicate,n=this.root;if(!e||!n)return;let r=this.#o;if(r&&r.predicate===e&&r.root===n&&r.version===this.#i)return r;let i=Sb(n,e),{parentByKey:a}=this.#c(),o=new Set;for(let e of i){let n=a.get(e);n!==void 0&&o.add(n)}let s={predicate:e,root:n,version:this.#i,matches:i,autoExpanded:o};return this.#o=s,s}get _structureVersion(){return this.#i}get _depthsWithIcons(){return this.#c().depthsWithIcons}#O;#k(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#A(){this.#F&&(this.search.setModes(this.#k()),this.#O?.(),this.#O=Lt(this.#F,this.search))}#j;#M;#N;#P;#F;#I;#L;#R;#z;#B;#V;#H;#U;#W;#G;#K;#q;#J;#Y;#X;#Z;#Q;#$;#ee(){let e=this.#be();this.stickyHeaders&&e?(!this.#pe||this.#fe!==e)&&(this.#fe?.removeEventListener(`scroll`,this.#te),e.addEventListener(`scroll`,this.#te,{passive:!0}),this.#fe=e,this.#pe=!0):this.#pe&&=(this.#fe?.removeEventListener(`scroll`,this.#te),this.#fe=void 0,!1)}#te;#ne(e){return{count:e.length,topOf:n=>e[n].offsetTop,bottomOf:n=>e[n].offsetTop+e[n].offsetHeight}}#re(){this.#ue=!1;let e=new Map,n=()=>this.#ie([],e);if(!this.stickyHeaders||!this.root)return n();let r=this.#be(),i=this.renderRoot.querySelector(`ul.tree-list`);if(!r||!i)return n();let a=this.#s(),o=this.#_(),s=i.children,c=this.#R;if(a.rows.length===0||!o&&(s.length===0||s.length!==c.length))return n();let l=o?Fb(this.#v(a.rows.length)):this.#ne(s),u=r.scrollTop,d=u+(this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0),f=Ib(l,u);if(!o)for(;f<s.length&&s[f].classList.contains(`leaving`);)f++;if(f>=l.count)return n();let p=o?f:a.indexByKey.get(c[f]);if(p===void 0)return n();let m=[],h=a.rows[p].parentKey;for(;h!==void 0;){let e=a.indexByKey.get(h);if(e===void 0)break;m.unshift(a.rows[e]),h=a.rows[e].parentKey}let g=new Map,_=[];for(let e of m){let n=e.node.item.key,r=o?a.indexByKey.get(n):this.#z.get(n);r===void 0||l.bottomOf(r)>d||(_.push(n),g.set(n,{node:e.node,depth:e.depth}))}this.#ie(_,g)}#ie(e,n){let r=this._stickyKeys;r.length===e.length&&r.every((n,r)=>n===e[r])||(this.#le=n,this._stickyKeys=e)}#ae(){return!this.stickyHeaders||this._stickyKeys.length===0?a:i`
7738
+ `]}};E([d({type:Boolean,reflect:!0})],ob.prototype,`collapsed`,void 0),E([d({type:String,attribute:`orientation`,reflect:!0})],ob.prototype,`orientation`,void 0),E([d({type:Boolean})],ob.prototype,`closable`,void 0),E([d({type:Boolean,reflect:!0})],ob.prototype,`collapsible`,void 0),E([d({type:String})],ob.prototype,`title`,void 0),E([d({type:String,attribute:`icon-name`})],ob.prototype,`iconName`,void 0),E([d({type:String,attribute:`toggle-interaction`})],ob.prototype,`toggleInteraction`,void 0),E([d({type:String,attribute:`variant`,reflect:!0})],ob.prototype,`variant`,void 0),E([d({type:Boolean,attribute:`hide-titlebar`})],ob.prototype,`hideTitlebar`,void 0),E([d({type:Boolean,attribute:`keep-toolbar`})],ob.prototype,`keepToolbar`,void 0),ob=E([T(`ixfx-panel`)],ob);const sb=`__ungrouped__`;let cb=class extends n{constructor(...e){super(...e),this.grouped=!1,this.crossGroupSelection=!1,this.#n=new Map,this.#i=!1,this.#a=new Ae(this),this.#d=e=>{if(this.#i)return;let n=e.target,r;for(let[e,i]of this.#n)if(i===n){r=e;break}if(r!==void 0){if(this.grouped&&!this.crossGroupSelection){this.#i=!0;for(let[e,n]of this.#n)e!==r&&n.clearSelection();this.#i=!1}this.dispatchEvent(new CustomEvent(`grouped-select`,{detail:{selected:this.selectedItems,groupKey:r===sb?void 0:r},bubbles:!0,composed:!0}))}}}#e;#t;#n;#r;#i;#a;get groupBy(){return this.#e}set groupBy(e){this.#e=e,this.requestUpdate()}get factory(){return this.#t}set factory(e){e!==this.#t&&(this.#s(),this.#t=e,this.requestUpdate())}get provider(){return this.#a.provider}set provider(e){this.#a.provider=e,e&&this.#a.request(void 0)}get selectedItems(){let e=new Set;for(let n of this.#n.values())for(let r of n.selectedItems)e.add(r);return e}dispatch(e,n){for(let r of this.#n.values())r.dispatch(e,n)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener(`select`,this.#d)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`select`,this.#d)}updated(e){super.updated(e),e.has(`grouped`)&&this.#s(),this.#c()}render(){return this.#t?this.grouped?this.#e?(this.#r=this.#o(),i`${_(this.#r.keys(),e=>e,e=>i`<ixfx-panel data-group-key=${e} .title=${e}></ixfx-panel>`)}`):a:i`<div class="ungrouped-host"></div>`:a}#o(){let e=new Map;if(!this.#e)return e;for(let n of this.#a.items){let r=this.#e(n),i=e.get(r);i||(i=[],e.set(r,i)),i.push(n)}return e}#s(){for(let e of this.#n.values())e.remove();this.#n.clear()}#c(){if(this.#t){if(!this.grouped){this.#l();return}this.#e&&this.#u()}}#l(){let e=this.querySelector(`.ungrouped-host`);if(!e)return;let n=this.#n.get(sb);n||(n=this.#t(void 0),e.appendChild(n),this.#n.set(sb,n)),n.setItems(this.#a.items)}#u(){let e=this.#r??this.#o();for(let n of[...this.#n.keys()])e.has(n)||(this.#n.get(n)?.remove(),this.#n.delete(n));for(let[n,r]of e){let e=[...this.children].find(e=>e instanceof HTMLElement&&e.dataset.groupKey===n);if(!e)continue;let i=this.#n.get(n);i||(i=this.#t(n),e.appendChild(i),this.#n.set(n,i)),i.setItems(r)}}#d};E([d({type:Boolean,reflect:!0})],cb.prototype,`grouped`,void 0),E([d({type:Boolean,attribute:`cross-group-selection`,reflect:!0})],cb.prototype,`crossGroupSelection`,void 0),cb=E([T(`ixfx-grouped-item-lister`)],cb);const lb=`application/x-ixfx-tree`,ub=new Map,db=new Map;let fb,pb=0;function mb(){return`tree-drag-${++pb}-${Date.now()}`}function hb(e,n,r,i){ub.set(e,{sourceId:e,nodes:r,keys:i}),db.set(e,new WeakRef(n)),fb=e}function gb(e){ub.delete(e),db.delete(e),fb===e&&(fb=void 0)}function _b(){if(fb===void 0)return;let e=ub.get(fb);if(e)return{sourceId:fb,keys:e.keys,nodes:e.nodes,element:db.get(fb)?.deref()}}function vb(e,n,r){return Math.max(n,Math.min(r,e))}var yb=class{#e;#t;#n=!1;#r;#i=`internal`;#a=[];#o=[];#s;#c;#l=0;#u=0;#d=0;#f;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}get isDragging(){return this.#n}get isRejected(){return this.#n&&this.#r===void 0}get dropState(){return this.#r}hostConnected(){this.#p()}hostUpdated(){this.#p()}#p(){let e=this.#t.getScrollContainer();!e||e===this.#f||(this.#m(),this.#f=e,e.addEventListener(`dragenter`,this.#h),e.addEventListener(`dragover`,this.#g),e.addEventListener(`dragleave`,this.#v),e.addEventListener(`drop`,this.#y))}#m(){let e=this.#f;e&&(e.removeEventListener(`dragenter`,this.#h),e.removeEventListener(`dragover`,this.#g),e.removeEventListener(`dragleave`,this.#v),e.removeEventListener(`drop`,this.#y),this.#f=void 0)}hostDisconnected(){this.#m(),this.#w(),this.#D(),this.#n=!1,this.#r=void 0}#h=e=>{this.#t.getDndMode()===`none`||!e.dataTransfer||this.#t.resolveDrag(e.dataTransfer,`hover`)!==void 0&&(e.preventDefault(),this.#n||(this.#n=!0,this.#t.onActiveChange(!0)))};#g=e=>{if(this.#t.getDndMode()===`none`||!e.dataTransfer)return;this.#u=e.clientX,this.#d=e.clientY;let n=this.#t.resolveDrag(e.dataTransfer,`hover`);if(!n){this.#_(e);return}this.#n||(this.#n=!0,this.#t.onActiveChange(!0)),this.#i=n.source,this.#a=n.keys,this.#o=n.nodes;let r=this.#t.getVisibleRows();this.#C(this.#x(r,e.clientY)),this.#T();let i=this.#S(e,r,n.source);if(!i){this.#_(e,!1);return}let a={source:n.source,dragged:n.nodes.length>0?n.nodes:void 0,draggedKeys:n.keys,target:i,dataTransfer:e.dataTransfer};if(!this.#t.vet(a)){this.#_(e,!1);return}e.preventDefault(),e.dataTransfer.dropEffect=n.source===`internal`?`move`:`copy`,this.#O(i)};#_(e,n=!0){e.dataTransfer&&(e.dataTransfer.dropEffect=`none`),this.#O(void 0),n&&this.#w()}#v=e=>{let n=this.#t.getScrollContainer(),r=e.relatedTarget;n&&r&&n.contains(r)||this.#b()};#y=e=>{if(!e.dataTransfer){this.#b();return}e.preventDefault(),this.#D(),this.#w();let n=e=>{this.#r=void 0,this.#n=!1,this.#t.onDropStateChange(void 0),this.#t.onActiveChange(!1),this.#t.onDragEnd(e)};if(this.#t.getDndMode()===`none`){n(!1);return}let r=this.#t.resolveDrag(e.dataTransfer,`drop`);if(!r){n(!1);return}this.#a=r.keys,this.#o=r.nodes;let i=this.#S(e,this.#t.getVisibleRows(),r.source);if(!i){n(!1);return}let a={source:r.source,dragged:r.nodes.length>0?r.nodes:void 0,draggedKeys:r.keys,target:i,dataTransfer:e.dataTransfer};if(!this.#t.vet(a)){n(!1);return}let o={...a,external:r.source===`external`?r.nodes:void 0};n(this.#t.commitDrop(o))};#b(){this.#w(),this.#D(),this.#r!==void 0&&(this.#r=void 0,this.#t.onDropStateChange(void 0)),this.#n&&(this.#n=!1,this.#t.onActiveChange(!1))}#x(e,n){if(e.length!==0)return n<e[0].rect.top?e[0]:n>e[e.length-1].rect.bottom?e[e.length-1]:e.find(e=>n>=e.rect.top&&n<=e.rect.bottom)??e[e.length-1]}#S(e,n,r){if(n.length===0)return;let i=this.#x(n,e.clientY);if(!i)return;let a=vb((e.clientY-i.rect.top)/i.rect.height,0,1),o=a<.25?`before`:a>.75?`after`:`inside`,s=i.node.item.isLeaf===!0;o===`inside`&&s&&(o=`after`);let c=!1;o===`after`&&!s&&this.#t.isExpanded(i.key)&&(o=`inside`,c=!0);let l,u,d,f;if(o===`inside`)l=i.key,u=i.key,d=i.depth+1,f=c?0:i.node.children?.length??0;else{let r=this.#t.getIndentPx()||1,a=n[0].rect.left,s=vb(Math.round((e.clientX-a)/r),0,i.depth),c={node:i.node,depth:i.depth,parentKey:this.#t.getRowInfo(i.key)?.parentKey};u=i.key;for(let e=i.depth-s;e>0&&c.parentKey!==void 0;e--){let e=this.#t.getRowInfo(c.parentKey);if(!e)break;u=c.parentKey,c=e}d=c.depth,l=c.parentKey;let p=this.#t.getChildren(l).findIndex(e=>e.item.key===u);f=(p<0?0:p)+ +(o===`after`)}if(r===`internal`){for(let e of this.#a)if(e===l||e===u||l!==void 0&&this.#t.isSelfOrDescendant(e,l)||o!==`inside`&&this.#t.isSelfOrDescendant(e,u))return;if(this.#a.length>0&&!this.#t.isReorderAllowed()&&!this.#a.some(e=>this.#t.getParentKey(e)!==l))return}return{parentKey:l,index:f,referenceKey:u,position:o,depth:d}}#C(e){if(!e||e.node.item.isLeaf===!0||this.#t.isExpanded(e.key)){this.#w();return}if(e.key===this.#c)return;this.#w();let n=this.#c=e.key;this.#s=setTimeout(()=>{this.#s=void 0,this.#c===n&&(this.#c=void 0,this.#t.expandKey(n))},Math.max(0,this.#t.getExpandHoverMs()))}#w(){this.#s!==void 0&&(clearTimeout(this.#s),this.#s=void 0),this.#c=void 0}#T(){this.#l===0&&(this.#l=requestAnimationFrame(this.#E))}#E=()=>{if(this.#l=0,!this.#n)return;let e=this.#t.getScrollContainer();if(!e)return;let n=e.getBoundingClientRect(),r=this.#d-n.top,i=0;r<24?i=-Math.ceil(16*(1-Math.max(0,r)/24)):r>n.height-24&&(i=Math.ceil(16*(1-Math.max(0,n.height-r)/24))),i!==0&&this.#u>=n.left&&this.#u<=n.right&&(e.scrollTop+=i,this.#T())};#D(){this.#l!==0&&(cancelAnimationFrame(this.#l),this.#l=0)}#O(e){let n=e===void 0?this.#r===void 0:e.referenceKey===this.#r?.referenceKey&&e.position===this.#r?.position&&e.depth===this.#r?.depth&&e.index===this.#r?.index;this.#r=e,(!n||this.#n)&&this.#t.onDropStateChange(e)}};function bb(e,n){let r=[],i=new Map,a=[],o=(e,r,i)=>{if(!e||e.length===0)return;let o=e.filter(e=>n.isShown(e,r));for(let e=o.length-1;e>=0;e--)a.push({node:o[e],depth:r,parentKey:i,posInSet:e+1,setSize:o.length})};for(o(e.children,0,void 0);a.length>0;){let{node:e,depth:s,parentKey:c,posInSet:l,setSize:u}=a.pop();i.set(e.item.key,r.length),r.push({node:e,depth:s,parentKey:c,posInSet:l,setSize:u}),e.children&&e.children.length>0&&n.isExpanded(e,s)&&o(e.children,s+1,e.item.key)}return{rows:r,indexByKey:i}}function xb(e){let n=new Map,r=new Set,i=[];if(e.children)for(let r of e.children)n.set(r.item.key,e.item.key),i.push({node:r,depth:0,parentKey:e.item.key});for(;i.length>0;){let{node:e,depth:a,parentKey:o}=i.pop();if(n.set(e.item.key,o),e.item.icon&&r.add(a),e.children)for(let n=e.children.length-1;n>=0;n--){let r=e.children[n];i.push({node:r,depth:a+1,parentKey:e.item.key})}}return{parentByKey:n,depthsWithIcons:r}}function Sb(e,n){let r=new Set;if(!e.children)return r;let i=[],a=(e,r)=>{i.push({node:e,depth:r,next:0,matched:n(e,r)})};for(let n of e.children)for(a(n,0);i.length>0;){let e=i[i.length-1],n=e.node.children;if(n&&e.next<n.length){a(n[e.next++],e.depth+1);continue}i.pop(),e.matched&&(r.add(e.node.item.key),i.length>0&&(i[i.length-1].matched=!0))}return r}function Cb(e,n,r){if(r.size===0)return[...e];let i=new Set;for(let n of e)i.add(n.node.item.key);let a=Symbol(`end`),o=new Map,s=a;for(let e=n.length-1;e>=0;e--){let a=n[e];if(i.has(a)){s=a;continue}let c=r.get(a);if(!c)continue;let l=o.get(s);l?l.push(c):o.set(s,[c])}let c=[];for(let n of e){let e=o.get(n.node.item.key);if(e)for(let n=e.length-1;n>=0;n--)c.push(e[n]);c.push(n)}let l=o.get(a);if(l)for(let e=l.length-1;e>=0;e--)c.push(l[e]);return c}function wb(e,n){let r=new Map;if(!e.children)return r;let i=[];for(let a of e.children)for(i.push({node:a,next:0,checked:0,unchecked:0});i.length>0;){let e=i[i.length-1],{node:a}=e,o=a.children,s=a.item.isLeaf||!o?.length;if(!s&&e.next<o.length){i.push({node:o[e.next++],next:0,checked:0,unchecked:0});continue}i.pop();let c;if(c=s?n.has(a)?`checked`:`unchecked`:e.checked===o.length?`checked`:e.unchecked===o.length?`unchecked`:`indeterminate`,r.set(a.item.key,c),i.length>0){let e=i[i.length-1];c===`checked`?e.checked++:c===`unchecked`&&e.unchecked++}}return r}function Tb(e,n){if(e.has(n))return e;let r=new Set(e);return r.add(n),r}function Eb(e,n){if(!e.has(n))return e;let r=new Set(e);return r.delete(n),r}function Db(e,n){let r;for(let i of e)n(i)&&(r??=new Set(e),r.delete(i));return r??e}function Ob(e){return Math.max(1,e.rowHeight+e.gap)}function kb(e,n){return e.listOffset+n*Ob(e)+e.gap}function Ab(e,n){return kb(e,n)+e.rowHeight}function jb(e,n,r=5){let{count:i}=e;if(i<=0)return{start:0,end:0};let a=Ob(e),o=Math.max(0,n-e.listOffset),s=Math.floor(o/a),c=Math.ceil((o+e.viewportHeight)/a),l=Math.min(i,Math.max(0,s-r));return{start:l,end:Math.min(i,Math.max(l,c+r))}}function Mb(e,n,r,i=0){if(n<0||n>=e.count)return r;let a=kb(e,n),o=a+e.rowHeight;return a<r+i?n===0?0:Math.max(0,a-i):o>r+e.viewportHeight?Math.max(0,o-e.viewportHeight):r}function Nb(e,n,r,i=0){if(n<0||n>=e.count)return r;let a=kb(e,n),o=a+e.rowHeight;if(a>=r+i&&o<=r+e.viewportHeight)return r;let s=a+e.rowHeight/2-(e.viewportHeight+i)/2;return Math.max(0,s)}function Pb(e){return Math.max(1,Math.floor(e.viewportHeight/Ob(e))-1)}function Fb(e){return{count:e.count,topOf:n=>kb(e,n),bottomOf:n=>Ab(e,n)}}function Ib(e,n){let r=0,i=e.count;for(;r<i;){let a=r+i>>>1;e.bottomOf(a)>n?i=a:r=a+1}return r}function Lb(e,n,r,i=0){if(e.count===0)return;let a=Math.min(Ib(e,n),e.count-1),o=a,s=e.count;for(;o<s;){let n=o+s>>>1;e.topOf(n)>=r?s=n:o=n+1}let c=Math.max(a,o-1);return{first:Math.max(0,a-i),last:Math.min(e.count-1,c+i)}}const Rb={rows:[],indexByKey:new Map};let q=class extends n{constructor(...e){super(...e),this.exclusivity=`none`,this.selectionFilter=`all`,this.interactionMode=`standard`,this._selectedNodes=new Set,this.disableKeyboardNavigation=!1,this.registry=void 0,this.itemDnd=`none`,this.dndExpandHoverMs=500,this.reorderable=!0,this.stickyHeaders=!0,this.virtualize=`auto`,this.virtualizeThreshold=200,this.applyInternalDrop=!0,this._expandedKeys=new Set,this.#i=0,this._selectionVersion=0,this._scrollTop=0,this.#l={rowHeight:30,gap:1,listOffset:0},this.#u=0,this.#d=0,this.#m=0,this.#h=0,this.#g=!1,this.#S=()=>{this.#d===0&&(this.#d=requestAnimationFrame(()=>{this.#d=0,this.#C()}))},this.tickled=new ie(this,{getItems:()=>this.#s().rows.map(({node:e})=>({id:e.item.key,enabled:!0})),hoverDisabled:()=>this.#J?.isDragging===!0||this.#Y?.isDragging===!0,onStateChange:()=>{this.setAttribute(`data-input-mode`,this.tickled.inputMode)}}),this._focusedDepth=0,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.tree-label`,highlightKey:`incr-search-highlight`})}),this.#I={indent:20},this.#L=[],this.#R=[],this.#z=new Map,this.#B=new Map,this.#V=new Set,this.#H=new Map,this.#U=new Map,this.#W=!1,this.#G=``,this.#X=new Set,this.#Z=!1,this.#$=()=>{this.#Q=void 0},this.#te=()=>{this.#de===0&&(this.#de=requestAnimationFrame(()=>{this.#de=0,this.#re()}))},this._stickyKeys=[],this.#le=new Map,this.#ue=!0,this.#de=0,this.#pe=!1,this.#Ie=`user`,this.#Le=!1,this.#$e=0,this.#dt=e=>{if(this.search.isOpen)return;let n=this.#s().rows;if(n.length===0)return;if((e.ctrlKey||e.metaKey)&&e.key===`a`){e.preventDefault(),this.selectAll();return}[`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`,`Enter`,` `].includes(e.key)&&this.tickled.setInputMode(`keyboard`);let r=this.#ot();switch(e.key){case`ArrowDown`:e.preventDefault(),this.#ut(n,r,Math.min(r+1,n.length-1),e.shiftKey);break;case`ArrowUp`:e.preventDefault(),this.#ut(n,r,Math.max(r-1,0),e.shiftKey);break;case`Home`:e.preventDefault(),this.#ut(n,r,0,e.shiftKey);break;case`End`:e.preventDefault(),this.#ut(n,r,n.length-1,e.shiftKey);break;case`PageDown`:{e.preventDefault();let i=this.#lt();this.#ut(n,r,Math.min(r+i,n.length-1),e.shiftKey);break}case`PageUp`:{e.preventDefault();let i=this.#lt();this.#ut(n,r,Math.max(r-i,0),e.shiftKey);break}case`ArrowRight`:{e.preventDefault();let i=n[r];i&&i.node.item.isLeaf!==!0&&(this._expandedKeys.has(i.node.item.key)?r+1<n.length&&this.#st(r+1):this.#Ke(i.node,i.depth)),this.requestUpdate();break}case`ArrowLeft`:{e.preventDefault();let i=n[r];if(i&&this._expandedKeys.has(i.node.item.key))this.#e(Eb(this._expandedKeys,i.node.item.key)),this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:i.node,depth:i.depth},bubbles:!0,composed:!0}));else if(i.depth>0){let e=i.depth-1;for(let i=r-1;i>=0;i--)if(n[i].depth===e){this.#st(i);break}}this.requestUpdate();break}case`Enter`:{e.preventDefault();let i=n[r];i&&(this.interactionMode!==`manual`&&this.interactionMode!==`checked`&&this.select(i.node),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:i.node,depth:i.depth},bubbles:!0,composed:!0})),this.requestUpdate());break}case` `:{e.preventDefault();let i=n[r];if(!i)break;this.interactionMode===`checked`?this._handleCheckboxClick(new MouseEvent(`click`),i.node,i.depth):(this.interactionMode===`standard`||this.interactionMode===`vscode`||this.interactionMode===`manual`)&&this.#Ge(i.node,i.depth);break}case`Escape`:e.preventDefault(),this.#tt()}},this.#ft=e=>{let n=e.target.closest(`ul.tree-list li`);if(!n)return;let r=n.dataset.key;if(!r)return;let i=this.#s(),a=i.indexByKey.get(r),o=a===void 0?void 0:i.rows[a];if(!o)return;let s={node:o.node,depth:o.depth};this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:s,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`activate`,{detail:s,bubbles:!0,composed:!0}))}}get selectedNodes(){return this._selectedNodes}#e(e){e!==this._expandedKeys&&(this._expandedKeys=e,this.#t=void 0,this.#ue=!0)}#t;#n;#r;#i;#a;#o;invalidateStructure(){this.#i++,this.#t=void 0,this.requestUpdate()}#s(){if(!this.root)return Rb;if(this.#t&&this.#n===this.root&&this.#r===this.filterPredicate)return this.#t;let e=this.#D();return this.#t=bb(this.root,{isExpanded:(e,n)=>this._isExpanded(e,n),isShown:e?n=>e.matches.has(n.item.key):()=>!0}),this.#n=this.root,this.#r=this.filterPredicate,this.#t}#c(){let e=this.root;if(!e)return{parentByKey:new Map,depthsWithIcons:new Set};let n=this.#a;if(n&&n.root===e&&n.version===this.#i)return n.index;let r=xb(e);return this.#a={root:e,version:this.#i,index:r},r}#l;#u;#d;#f;#p;#m;#h;#g;#_(){return this.virtualize===`off`?!1:this.virtualize===`on`||this.#s().rows.length>this.virtualizeThreshold}#v(e){return{count:e,rowHeight:this.#l.rowHeight,gap:this.#l.gap,listOffset:this.#l.listOffset,viewportHeight:this.#u>0?this.#u:600}}#y(){let e=this.renderRoot.querySelector(`ul.tree-list`),n=e?.querySelector(`li.item:not(.leaving)`),r=n?.getBoundingClientRect().height??0,i=r>0?r:this.#Se(),a=n?Number.parseFloat(getComputedStyle(n).marginTop):NaN,o=Number.isNaN(a)?Number.parseFloat(getComputedStyle(this).getPropertyValue(`--tree-item-gap`)):a,s=Number.isNaN(o)?1:o,c=this.#l.listOffset;if(e){let n=Number.parseFloat(getComputedStyle(e).paddingTop);c=e.offsetTop+(Number.isNaN(n)?0:n)}let l=this.#be()?.clientHeight??0,u=l>0&&l!==this.#u;l>0&&(this.#u=l);let d=this.#l,f=d.rowHeight!==i||d.gap!==s||d.listOffset!==c;return this.#l={rowHeight:i,gap:s,listOffset:c},f||u}#b(e){return jb(this.#v(e),this._scrollTop)}#x(){let e=this.#be()?.scrollTop;e!==void 0&&e!==this._scrollTop&&(this._scrollTop=e)}#S;#C(){let e=this.#be();if(!e||!this.root||!this.#_())return;let n=e.scrollTop;if(n===this._scrollTop)return;let r=jb(this.#v(this.#s().rows.length),n);(r.start!==this.#m||r.end!==this.#h)&&(this._scrollTop=n)}#w(){let e=this.#be();e!==this.#f&&(this.#f?.removeEventListener(`scroll`,this.#S),this.#p?.disconnect(),this.#p=void 0,this.#f=e,e&&(e.addEventListener(`scroll`,this.#S,{passive:!0}),typeof ResizeObserver<`u`&&(this.#p=new ResizeObserver(e=>{let n=e.at(-1)?.contentRect.height??0;n>0&&n!==this.#u&&this.#_()&&this.requestUpdate()}),this.#p.observe(e))))}#T(){this.#f?.removeEventListener(`scroll`,this.#S),this.#f=void 0,this.#p?.disconnect(),this.#p=void 0,this.#d!==0&&(cancelAnimationFrame(this.#d),this.#d=0)}#E(e,n=`edge`){let r=this.#be();if(!r)return;let i=this.#v(this.#s().rows.length),a=this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0,o=(n===`center-if-hidden`?Nb:Mb)(i,e,r.scrollTop,a);(o!==r.scrollTop||o!==this._scrollTop)&&(r.scrollTop=o,this._scrollTop=o)}#D(){let e=this.filterPredicate,n=this.root;if(!e||!n)return;let r=this.#o;if(r&&r.predicate===e&&r.root===n&&r.version===this.#i)return r;let i=Sb(n,e),{parentByKey:a}=this.#c(),o=new Set;for(let e of i){let n=a.get(e);n!==void 0&&o.add(n)}let s={predicate:e,root:n,version:this.#i,matches:i,autoExpanded:o};return this.#o=s,s}get _structureVersion(){return this.#i}get _depthsWithIcons(){return this.#c().depthsWithIcons}#O;#k(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#A(){this.#F&&(this.search.setModes(this.#k()),this.#O?.(),this.#O=Lt(this.#F,this.search))}#j;#M;#N;#P;#F;#I;#L;#R;#z;#B;#V;#H;#U;#W;#G;#K;#q;#J;#Y;#X;#Z;#Q;#$;#ee(){let e=this.#be();this.stickyHeaders&&e?(!this.#pe||this.#fe!==e)&&(this.#fe?.removeEventListener(`scroll`,this.#te),e.addEventListener(`scroll`,this.#te,{passive:!0}),this.#fe=e,this.#pe=!0):this.#pe&&=(this.#fe?.removeEventListener(`scroll`,this.#te),this.#fe=void 0,!1)}#te;#ne(e){return{count:e.length,topOf:n=>e[n].offsetTop,bottomOf:n=>e[n].offsetTop+e[n].offsetHeight}}#re(){this.#ue=!1;let e=new Map,n=()=>this.#ie([],e);if(!this.stickyHeaders||!this.root)return n();let r=this.#be(),i=this.renderRoot.querySelector(`ul.tree-list`);if(!r||!i)return n();let a=this.#s(),o=this.#_(),s=i.children,c=this.#R;if(a.rows.length===0||!o&&(s.length===0||s.length!==c.length))return n();let l=o?Fb(this.#v(a.rows.length)):this.#ne(s),u=r.scrollTop,d=u+(this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0),f=Ib(l,u);if(!o)for(;f<s.length&&s[f].classList.contains(`leaving`);)f++;if(f>=l.count)return n();let p=o?f:a.indexByKey.get(c[f]);if(p===void 0)return n();let m=[],h=a.rows[p].parentKey;for(;h!==void 0;){let e=a.indexByKey.get(h);if(e===void 0)break;m.unshift(a.rows[e]),h=a.rows[e].parentKey}let g=new Map,_=[];for(let e of m){let n=e.node.item.key,r=o?a.indexByKey.get(n):this.#z.get(n);r===void 0||l.bottomOf(r)>d||(_.push(n),g.set(n,{node:e.node,depth:e.depth}))}this.#ie(_,g)}#ie(e,n){let r=this._stickyKeys;r.length===e.length&&r.every((n,r)=>n===e[r])||(this.#le=n,this._stickyKeys=e)}#ae(){return!this.stickyHeaders||this._stickyKeys.length===0?a:i`
7739
7739
  <div class="sticky-anchor">
7740
7740
  <div class="sticky-headers" part="sticky-headers">
7741
7741
  ${this._stickyKeys.map(e=>{let n=this.#le.get(e);return n?this.#oe(n.node,n.depth):a})}
@@ -7753,34 +7753,34 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
7753
7753
  @click=${n=>this.#se(n,e)}
7754
7754
  @keydown=${n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),this.#ce(e))}}
7755
7755
  >${this.renderNodeContent(e,n)}</div>
7756
- `}#se(e,n){if(!(this.#J?.isDragging||this.#Y?.isDragging)){if(n.item.isLeaf!==!0&&e.target instanceof Element&&e.target.closest(`.tree-caret`)){let e=this.#le.get(n.item.key)?.depth??0;this.#Ge(n,e),this.#ue=!0,this.requestUpdate();return}this.#ce(n)}}#ce(e){this.#Ne(e)&&this.select(e),this.#Ze(e.item.key),this.#ue=!0,this.requestUpdate()}#le;#ue;#de;#fe;#pe;get nativeDrag(){return this.#Y}get dropState(){return this.#q}get nativeDragKeys(){return this.#X}#me(e){this.#U.get(e)?.cancel(),this.#U.delete(e)}#he(){for(let e of this.#U.values())try{e.cancel()}catch{}this.#U.clear()}willUpdate(e){super.willUpdate(e);let n=this.#t!==void 0&&e.size===1&&e.has(`_scrollTop`)&&this.#_();if(this.#g=n,n){this.#x();return}this.#t=void 0,(e.has(`root`)||e.has(`model`))&&this.#i++,this.#ge(e.has(`filterPredicate`));let r=this.#_();this.toggleAttribute(`data-virtual`,r),r&&(this.#y(),this.#x()),(e.has(`root`)||e.has(`model`)||e.has(`filterPredicate`)||e.has(`stickyHeaders`))&&(this.#ue=!0),this.#ue&&this.#re()}#ge(e){let n=this.#s().rows;if(this.#_()){this.#V.clear(),this.#he(),this.#H.clear(),this.#L=[];return}let r=new Set(n.map(e=>e.node.item.key));if(this.#V.clear(),e)this.#he(),this.#H.clear();else if(this.#W&&this.#L.length>0){let e=new Set(this.#L);for(let{node:r}of n)e.has(r.item.key)||this.#V.add(r.item.key);this.#V.size>50&&this.#V.clear();for(let e of this.#L)if(!r.has(e)&&!this.#H.has(e)){let n=this.#B.get(e);n&&this.#H.set(e,n)}}for(let e of[...this.#H.keys()])r.has(e)&&(this.#me(e),this.#H.delete(e));this.#H.size>50&&(this.#he(),this.#H.clear())}_isLeaving(e){return this.#H.has(e.item.key)}_isFilteredOut(e,n){return!1}#_e(){if(this.#V.size>0){for(let e of this.renderRoot.querySelectorAll(`.item`)){let n=e.dataset.key;if(!(n===void 0||!this.#V.has(n))){if(this.#U.has(n))this.#me(n);else for(let n of e.getAnimations())n.cancel();Gn(e)}}this.#V.clear()}if(this.#H.size>0)for(let e of this.renderRoot.querySelectorAll(`.item.leaving`)){let n=e.dataset.key;if(n===void 0||this.#U.has(n))continue;let r=Jn(e),i=r.animation;if(!i){r.then(()=>{this.#H.has(n)&&(this.#H.delete(n),this.requestUpdate())});continue}this.#me(n),this.#U.set(n,i),r.then(()=>{this.#U.get(n)===i&&(this.#U.delete(n),this.#H.delete(n),this.requestUpdate(),this.updateComplete.then(()=>{try{i.cancel()}catch{}}))})}let e=this.#s().rows;this.#L=e.map(e=>e.node.item.key),this.#B.clear();for(let n of e)this.#B.set(n.node.item.key,n);this.#W=!0}updated(e){if(this.#Q=void 0,this.#w(),this.#g){this.#g=!1,this.#ve();return}if(this.#ee(),e.has(`root`)&&this.root&&(this.#et(),this.#e(new Set),this.#Pe(),this.tickled.clearTickled(),this._focusedDepth=0,this.#he(),this.#H.clear(),this.#V.clear()),e.has(`model`)){this.#N?.(),this.#N=void 0;let e=this.model;e&&(this.root=e.root,this.#N=e._subscribe(e=>{e.type===`root`?(this.root=e.root,this.requestUpdate()):e.type===`invalidate`&&this._expandedKeys.has(e.key)&&(this.#e(Eb(this._expandedKeys,e.key)),this.requestUpdate())}))}e.has(`interactionMode`)&&(this.#P=void 0,this.clearSelection()),e.has(`selectedNode`)&&this.selectedNode&&e.get(`selectedNode`)!==this.selectedNode&&this.tickled.setTickled(this.selectedNode.item.key),this.#_()?(this.#L=[],this.#B.clear(),this.#y()&&queueMicrotask(()=>this.requestUpdate()),this.#ve()):this.#_e()}#ve(){this.search.isOpen&&this.search.repaintHighlights()}connectedCallback(){super.connectedCallback(),this.setAttribute(`data-input-mode`,`mouse`);let e=this.#F=Jt();e.register({id:`select-all`,label:`Select All`,description:`Select all visible items`,execute:()=>this.selectAll()}),e.register({id:`deselect-all`,label:`Deselect All`,description:`Clear all selection`,execute:()=>this.deselectAll()}),this.registry=e,this.#A(),this.#ye()}#ye(){this.#G=mb(),this.#Y=new Yn(this,{source:`tree-list`,isEnabled:()=>this.itemDnd!==`none`&&this.#je(),resolveEventToKey:e=>{if(e instanceof Element)return e.closest(`ul.tree-list li[data-key]`)?.getAttribute(`data-key`)??void 0},prepareSelection:e=>{let n=this.#s(),r=n.rows,i=n.indexByKey.get(e),a=i===void 0?void 0:r[i];if(!a)return;let o=new Set(this._selectedNodes);o.has(a.node)||o.clear(),o.add(a.node);let s=r.filter(e=>o.has(e.node)).map(e=>e.node.item.key),c=new Set(this.root?yg(this.root,s):s),l=r.filter(e=>c.has(e.node.item.key)).map((e,n)=>({key:e.node.item.key,index:n,item:e.node,element:this.shadowRoot?.querySelector(`ul.tree-list li[data-key="${CSS.escape(e.node.item.key)}"]`)??void 0})),u=l.find(n=>n.key===e)??{key:e,index:0,item:a.node,element:void 0};return l.some(e=>e.key===u.key)||l.unshift(u),{origin:u,selected:l}},getMetrics:()=>({rowHeight:this.#Se()}),getRenderer:()=>this.dragPreviewRenderer,getDragPreviewSourceResolver:()=>this.dragPreviewSource,dispatch:e=>{let n=e.selected.map(e=>e.key),r=e.selected.map(e=>e.item),i=new CustomEvent(`list-native-drag-start`,{detail:e,bubbles:!0,composed:!0,cancelable:!0}),a=this.dispatchEvent(i);return a&&(this.#X=new Set(n),this.#Z=!1,(this.itemDnd===`internal`||this.itemDnd===`both`)&&hb(this.#G,this,r,n),this.dispatchEvent(new CustomEvent(`tree-drag-start`,{detail:{nodes:r,keys:n},bubbles:!0,composed:!0}))),a},writeDataTransfer:(e,n)=>{if(this.itemDnd!==`internal`&&this.itemDnd!==`both`)return;let r=n.selected.map(e=>e.key),i=n.selected.map(e=>e.item);try{e.setData(lb,JSON.stringify({sourceId:this.#G,keys:r,nodes:i})),e.setData(`text/plain`,i.map(e=>e.item.label).join(`
7757
- `))}catch{}},onActiveChange:e=>{this.toggleAttribute(`data-native-dragging`,e),e||(this.#X=new Set),this.requestUpdate()},onEnd:()=>{gb(this.#G),this.#X=new Set,this.#K=setTimeout(()=>{this.#K=void 0},150),this.#Z||this.dispatchEvent(new CustomEvent(`tree-drag-end`,{detail:{dropped:!1},bubbles:!0,composed:!0})),this.#Z=!1}}),this.#J=new yb(this,{getDndMode:()=>this.itemDnd,getExpandHoverMs:()=>this.dndExpandHoverMs,getVisibleRows:()=>this.#Te(),getRowInfo:e=>{let n=this.#s(),r=n.indexByKey.get(e);if(r===void 0)return;let{node:i,depth:a,parentKey:o}=n.rows[r];return{node:i,depth:a,parentKey:o}},getChildren:e=>this.#Ce(e),getIndentPx:()=>this.#xe(),getScrollContainer:()=>this.#be(),isSelfOrDescendant:(e,n)=>this.#De(e,n),isExpanded:e=>this._expandedKeys.has(e),isReorderAllowed:()=>this.reorderable,getParentKey:e=>this.#Oe(e)?.item.key,resolveDrag:(e,n)=>this.#Ae(e,n),vet:e=>{if(this.canDrop&&!this.canDrop(e))return!1;let n=new CustomEvent(`tree-drag-over`,{detail:e,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(n)},expandKey:e=>this.#Ee(e),onDropStateChange:e=>{this.#q=e,this.toggleAttribute(`data-drop-rejected`,this.#J.isDragging&&e===void 0),this.requestUpdate()},onActiveChange:e=>{e?(this.#Q=void 0,this.#be()?.addEventListener(`scroll`,this.#$,{passive:!0})):(this.#be()?.removeEventListener(`scroll`,this.#$),this.#Q=void 0,this.toggleAttribute(`data-drop-rejected`,!1)),this.requestUpdate()},commitDrop:e=>this.dispatchEvent(new CustomEvent(`tree-drop`,{detail:e,bubbles:!0,composed:!0,cancelable:!0}))?(this.applyInternalDrop&&e.source===`internal`&&this.model&&this.model.applyDrop({source:`internal`,draggedKeys:e.draggedKeys,target:e.target}),this.#Z=!0,!0):!1,onDragEnd:e=>{this.#q=void 0,this.toggleAttribute(`data-drop-rejected`,!1),this.requestUpdate(),this.dispatchEvent(new CustomEvent(`tree-drag-end`,{detail:{dropped:e},bubbles:!0,composed:!0}))}})}#be(){return this.shadowRoot?.querySelector(`#container`)??void 0}#xe(){let e=Number.parseInt(getComputedStyle(this).getPropertyValue(`--tree-indent`),10);return Number.isNaN(e)?20:e}#Se(){let e=Number.parseInt(getComputedStyle(this).getPropertyValue(`--tree-item-height`),10);return Number.isNaN(e)?30:e}#Ce(e){if(e===void 0)return this.root?.children??[];let n=this.#s(),r=n.indexByKey.get(e);return r===void 0?[]:n.rows[r].node.children??[]}#we(e,n,r){let i=this.#s(),a=this.#v(i.rows.length),o=Lb(Fb(a),e.scrollTop,e.scrollTop+e.clientHeight,1);if(!o)return;let s=e.getBoundingClientRect(),c=n.querySelector(`li.item`)?.getBoundingClientRect()??s;for(let n=o.first;n<=o.last;n++){let{node:o,depth:l}=i.rows[n],u=s.top-e.scrollTop+kb(a,n),d={x:c.left,y:u,left:c.left,right:c.left+c.width,top:u,bottom:u+a.rowHeight,width:c.width,height:a.rowHeight,toJSON:()=>({})};r.push({key:o.item.key,node:o,depth:l,index:n,rect:d})}}#Te(){if(this.#Q)return this.#Q;let e=[],n=this.#be(),r=this.renderRoot.querySelector(`ul.tree-list`),i=this.#R;if(n&&r&&this.#_())this.#we(n,r,e);else if(n&&r&&r.children.length===i.length){let a=this.#s(),o=r.children,s=Lb(this.#ne(o),n.scrollTop,n.scrollTop+n.clientHeight,1);if(s)for(let n=s.first;n<=s.last;n++){let r=o[n];if(r.classList.contains(`leaving`))continue;let s=a.indexByKey.get(i[n]);if(s===void 0)continue;let{node:c,depth:l}=a.rows[s];e.push({key:c.item.key,node:c,depth:l,index:s,rect:r.getBoundingClientRect()})}}return this.#Q=e,e}#Ee(e){if(this._expandedKeys.has(e))return;let n=this.#s(),r=n.indexByKey.get(e),i=r===void 0?void 0:n.rows[r];!i||i.node.item.isLeaf===!0||(this.#Ge(i.node,i.depth),this.#Q=void 0,this.requestUpdate())}#De(e,n){if(e===n)return!0;let{parentByKey:r}=this.#c(),i=r.get(n);for(;i!==void 0;){if(i===e)return!0;i=r.get(i)}return!1}#Oe(e){let n=this.#c().parentByKey.get(e);if(n!==void 0&&n!==this.root?.item.key)return this.#ke(n)}#ke(e){let n=this.#s(),r=n.indexByKey.get(e);if(r!==void 0)return n.rows[r].node;let{parentByKey:i}=this.#c(),a=[];for(let n=e;n!==void 0&&n!==this.root?.item.key;n=i.get(n))a.unshift(n);let o=this.root;for(let e of a)o=o?.children?.find(n=>n.item.key===e);return o}#Ae(e,n){let r=this.itemDnd;if(r===`none`)return;let i=r===`internal`||r===`both`,a=r===`external`||r===`both`,o=[];try{o=Array.from(e.types)}catch{}let s=_b(),c=o.includes(lb)||s!==void 0;if(i&&c){if(s&&s.keys.length>0){let e=this.root?yg(this.root,s.keys):s.keys;return{source:`internal`,keys:e,nodes:e.map(e=>this.#ke(e)).filter(e=>e!==void 0)}}if(n===`drop`)try{let n=e.getData(lb);if(n){let e=JSON.parse(n);return{source:`internal`,keys:e.keys??[],nodes:e.nodes??[]}}}catch{}return{source:`internal`,keys:[],nodes:[]}}if(a&&!c){if(this.acceptDropTypes!==void 0){let n=this.acceptDropTypes.trim().split(/\s+/).filter(Boolean),r=Array.from(e.types);if(n.length>0&&!n.some(e=>r.includes(e)))return}if(n===`drop`){let n=this.parseExternalDrop?.(e);return!n||n.length===0?void 0:{source:`external`,keys:n.map(e=>e.item.key),nodes:n}}return this.parseExternalDrop?{source:`external`,keys:[],nodes:[]}:void 0}}#je(){if(this.itemDnd===`none`)return!1;let e=this.#s().rows;return e.length===0?!1:!this.canDrag||e.some(({node:e})=>this.canDrag({nodes:[e],keys:[e.item.key]}))}disconnectedCallback(){super.disconnectedCallback(),this.#he(),this.#H.clear(),this.#V.clear(),this.#N?.(),this.#N=void 0,this.#O?.(),this.#O=void 0,this.#K!==void 0&&(clearTimeout(this.#K),this.#K=void 0),this.#be()?.removeEventListener(`scroll`,this.#$),this.#T(),this.#pe&&=(this.#fe?.removeEventListener(`scroll`,this.#te),this.#fe=void 0,!1),this.#de!==0&&(cancelAnimationFrame(this.#de),this.#de=0),gb(this.#G),this.#F&&(this.#F.unregister(`select-all`),this.#F.unregister(`deselect-all`),this.#F=void 0,this.registry=void 0)}getConfig(){return{...this.#I}}setConfig(e){this.#I={...this.#I,...e},this.requestUpdate()}select(e){if(!this.#Ne(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#Le(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#Le(n),this.requestUpdate()}clearSelection(){if(this._selectedNodes.size===0)return;let e=new Set(this._selectedNodes);this.#Pe(),this.#Le(e),this.requestUpdate()}selectAll(){let e=new Set(this._selectedNodes);if(this.interactionMode===`checked`)for(let{node:e}of this.#s().rows)this.#Ne(e)&&this.#qe(e,!0);else{for(let{node:e}of this.#s().rows)this.#Ne(e)&&this._selectedNodes.add(e);this.selectedNode=[...this._selectedNodes].at(-1)}this.#Le(e),this.requestUpdate()}deselectAll(){let e=new Set(this._selectedNodes);if(this.interactionMode===`checked`)for(let{node:e}of this.#s().rows)this.#Ne(e)&&this.#qe(e,!1);else this.#Pe();this.#Le(e),this.requestUpdate()}navigateTo(e,n={}){if(!this.root?.children)return!1;let r=this.#Fe,i=this.#Ie;this.#Fe=`programmatic`,this.#Ie=n.silent===!0;try{return this.#Me(e,n.reveal??`edge`)}finally{this.#Fe=r,this.#Ie=i}}#Me(e,n){this.#et(),this.#Pe(),this.tickled.clearTickled(),this._focusedDepth=0;let r=this.root;for(let n of e){let i=r?.children;if(!i)return!1;let a=i.find(e=>e.item.key===n);if(!a)return!1;this.#tt(a.item.key),this.#e(Tb(this._expandedKeys,a.item.key)),n===e.at(-1)&&(this.select(a),this.tickled.setTickled(a.item.key)),r=a}return this.#ue=!0,this.requestUpdate(),this.#Ze(e.at(-1),n),!0}navigateToNode(e){if(!this.root?.children)return!1;let n=this.#Re(this.root.children,e);return n?this.navigateTo(n):!1}revealKey(e){if(!this.root?.children)return!1;let n=this.#Re(this.root.children,n=>n.item.key===e);if(!n)return!1;for(let e=0;e<n.length-1;e++)this.#tt(n[e]),this.#e(Tb(this._expandedKeys,n[e]));return this.tickled.setTickled(e),this.#ue=!0,this.requestUpdate(),this.updateComplete.then(()=>this.#Ze(e)),!0}selectMany(e){let n=new Set(this._selectedNodes);this._selectedNodes=new Set([...e].filter(e=>this.#Ne(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#Le(n),this.requestUpdate()}getNodes(){if(!this.root?.children)return[];let e=[],n=(r,i)=>{if(e.push({node:r,depth:i}),r.children)for(let e of r.children)n(e,i+1)};for(let e of this.root.children)n(e,0);return e}#Ne(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf===!0:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#Pe(){this._selectionVersion++,this._selectedNodes.clear(),this.selectedNode=void 0}#Fe;#Ie;#Le(e){if(this._selectionVersion++,this.#Ie)return;let n={selected:new Set(this._selectedNodes),previous:e,origin:this.#Fe};this.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}#Re(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;if(i.children?.length){let r=this.#Re(i.children,n,e);if(r)return r}}}renderNodeContent(e,n){let r=e.item.isLeaf!==!0,o=this._isExpanded(e,n);return i`
7756
+ `}#se(e,n){if(!(this.#J?.isDragging||this.#Y?.isDragging)){if(n.item.isLeaf!==!0&&e.target instanceof Element&&e.target.closest(`.tree-caret`)){let e=this.#le.get(n.item.key)?.depth??0;this.#Ke(n,e),this.#ue=!0,this.requestUpdate();return}this.#ce(n)}}#ce(e){this.#Pe(e)&&this.select(e),this.#Qe(e.item.key),this.#ue=!0,this.requestUpdate()}#le;#ue;#de;#fe;#pe;get nativeDrag(){return this.#Y}get dropState(){return this.#q}get nativeDragKeys(){return this.#X}#me(e){this.#U.get(e)?.cancel(),this.#U.delete(e)}#he(){for(let e of this.#U.values())try{e.cancel()}catch{}this.#U.clear()}willUpdate(e){super.willUpdate(e);let n=this.#t!==void 0&&e.size===1&&e.has(`_scrollTop`)&&this.#_();if(this.#g=n,n){this.#x();return}this.#t=void 0,(e.has(`root`)||e.has(`model`))&&this.#i++,this.#ge(e.has(`filterPredicate`));let r=this.#_();this.toggleAttribute(`data-virtual`,r),r&&(this.#y(),this.#x()),(e.has(`root`)||e.has(`model`)||e.has(`filterPredicate`)||e.has(`stickyHeaders`))&&(this.#ue=!0),this.#ue&&this.#re()}#ge(e){let n=this.#s().rows;if(this.#_()){this.#V.clear(),this.#he(),this.#H.clear(),this.#L=[];return}let r=new Set(n.map(e=>e.node.item.key));if(this.#V.clear(),e)this.#he(),this.#H.clear();else if(this.#W&&this.#L.length>0){let e=new Set(this.#L);for(let{node:r}of n)e.has(r.item.key)||this.#V.add(r.item.key);this.#V.size>50&&this.#V.clear();for(let e of this.#L)if(!r.has(e)&&!this.#H.has(e)){let n=this.#B.get(e);n&&this.#H.set(e,n)}}for(let e of[...this.#H.keys()])r.has(e)&&(this.#me(e),this.#H.delete(e));this.#H.size>50&&(this.#he(),this.#H.clear())}_isLeaving(e){return this.#H.has(e.item.key)}_isFilteredOut(e,n){return!1}#_e(){if(this.#V.size>0){for(let e of this.renderRoot.querySelectorAll(`.item`)){let n=e.dataset.key;if(!(n===void 0||!this.#V.has(n))){if(this.#U.has(n))this.#me(n);else for(let n of e.getAnimations())n.cancel();Gn(e)}}this.#V.clear()}if(this.#H.size>0)for(let e of this.renderRoot.querySelectorAll(`.item.leaving`)){let n=e.dataset.key;if(n===void 0||this.#U.has(n))continue;let r=Jn(e),i=r.animation;if(!i){r.then(()=>{this.#H.has(n)&&(this.#H.delete(n),this.requestUpdate())});continue}this.#me(n),this.#U.set(n,i),r.then(()=>{this.#U.get(n)===i&&(this.#U.delete(n),this.#H.delete(n),this.requestUpdate(),this.updateComplete.then(()=>{try{i.cancel()}catch{}}))})}let e=this.#s().rows;this.#L=e.map(e=>e.node.item.key),this.#B.clear();for(let n of e)this.#B.set(n.node.item.key,n);this.#W=!0}updated(e){if(this.#Q=void 0,this.#w(),this.#g){this.#g=!1,this.#ve();return}if(this.#ee(),e.has(`root`)&&this.root&&(this.#tt(),this.#e(new Set),this.#Fe(),this.tickled.clearTickled(),this._focusedDepth=0,this.#he(),this.#H.clear(),this.#V.clear()),e.has(`model`)){this.#N?.(),this.#N=void 0;let e=this.model;e&&(this.root=e.root,this.#N=e._subscribe(e=>{e.type===`root`?(this.root=e.root,this.requestUpdate()):e.type===`invalidate`&&this._expandedKeys.has(e.key)&&(this.#e(Eb(this._expandedKeys,e.key)),this.requestUpdate())}))}e.has(`interactionMode`)&&(this.#P=void 0,this.clearSelection()),e.has(`selectedNode`)&&this.selectedNode&&e.get(`selectedNode`)!==this.selectedNode&&this.tickled.setTickled(this.selectedNode.item.key),this.#_()?(this.#L=[],this.#B.clear(),this.#y()&&queueMicrotask(()=>this.requestUpdate()),this.#ve()):this.#_e()}#ve(){this.search.isOpen&&this.search.repaintHighlights()}connectedCallback(){super.connectedCallback(),this.setAttribute(`data-input-mode`,`mouse`);let e=this.#F=Jt();e.register({id:`select-all`,label:`Select All`,description:`Select all visible items`,execute:()=>this.selectAll()}),e.register({id:`deselect-all`,label:`Deselect All`,description:`Clear all selection`,execute:()=>this.deselectAll()}),this.registry=e,this.#A(),this.#ye()}#ye(){this.#G=mb(),this.#Y=new Yn(this,{source:`tree-list`,isEnabled:()=>this.itemDnd!==`none`&&this.#je(),resolveEventToKey:e=>{if(e instanceof Element)return e.closest(`ul.tree-list li[data-key]`)?.getAttribute(`data-key`)??void 0},prepareSelection:e=>{let n=this.#s(),r=n.rows,i=n.indexByKey.get(e),a=i===void 0?void 0:r[i];if(!a)return;let o=new Set(this._selectedNodes);o.has(a.node)||o.clear(),o.add(a.node);let s=r.filter(e=>o.has(e.node)).map(e=>e.node.item.key),c=new Set(this.root?yg(this.root,s):s),l=r.filter(e=>c.has(e.node.item.key)).map((e,n)=>({key:e.node.item.key,index:n,item:e.node,element:this.shadowRoot?.querySelector(`ul.tree-list li[data-key="${CSS.escape(e.node.item.key)}"]`)??void 0})),u=l.find(n=>n.key===e)??{key:e,index:0,item:a.node,element:void 0};return l.some(e=>e.key===u.key)||l.unshift(u),{origin:u,selected:l}},getMetrics:()=>({rowHeight:this.#Se()}),getRenderer:()=>this.dragPreviewRenderer,getDragPreviewSourceResolver:()=>this.dragPreviewSource,dispatch:e=>{let n=e.selected.map(e=>e.key),r=e.selected.map(e=>e.item),i=new CustomEvent(`list-native-drag-start`,{detail:e,bubbles:!0,composed:!0,cancelable:!0}),a=this.dispatchEvent(i);return a&&(this.#X=new Set(n),this.#Z=!1,(this.itemDnd===`internal`||this.itemDnd===`both`)&&hb(this.#G,this,r,n),this.dispatchEvent(new CustomEvent(`tree-drag-start`,{detail:{nodes:r,keys:n},bubbles:!0,composed:!0}))),a},writeDataTransfer:(e,n)=>{if(this.itemDnd!==`internal`&&this.itemDnd!==`both`)return;let r=n.selected.map(e=>e.key),i=n.selected.map(e=>e.item);try{e.setData(lb,JSON.stringify({sourceId:this.#G,keys:r,nodes:i})),e.setData(`text/plain`,i.map(e=>e.item.label).join(`
7757
+ `))}catch{}},onActiveChange:e=>{this.toggleAttribute(`data-native-dragging`,e),e||(this.#X=new Set),this.requestUpdate()},onEnd:()=>{gb(this.#G),this.#X=new Set,this.#K=setTimeout(()=>{this.#K=void 0},150),this.#Z||this.dispatchEvent(new CustomEvent(`tree-drag-end`,{detail:{dropped:!1},bubbles:!0,composed:!0})),this.#Z=!1}}),this.#J=new yb(this,{getDndMode:()=>this.itemDnd,getExpandHoverMs:()=>this.dndExpandHoverMs,getVisibleRows:()=>this.#Te(),getRowInfo:e=>{let n=this.#s(),r=n.indexByKey.get(e);if(r===void 0)return;let{node:i,depth:a,parentKey:o}=n.rows[r];return{node:i,depth:a,parentKey:o}},getChildren:e=>this.#Ce(e),getIndentPx:()=>this.#xe(),getScrollContainer:()=>this.#be(),isSelfOrDescendant:(e,n)=>this.#De(e,n),isExpanded:e=>this._expandedKeys.has(e),isReorderAllowed:()=>this.reorderable,getParentKey:e=>this.#Oe(e)?.item.key,resolveDrag:(e,n)=>this.#Ae(e,n),vet:e=>{if(this.canDrop&&!this.canDrop(e))return!1;let n=new CustomEvent(`tree-drag-over`,{detail:e,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(n)},expandKey:e=>this.#Ee(e),onDropStateChange:e=>{this.#q=e,this.toggleAttribute(`data-drop-rejected`,this.#J.isDragging&&e===void 0),this.requestUpdate()},onActiveChange:e=>{e?(this.#Q=void 0,this.#be()?.addEventListener(`scroll`,this.#$,{passive:!0})):(this.#be()?.removeEventListener(`scroll`,this.#$),this.#Q=void 0,this.toggleAttribute(`data-drop-rejected`,!1)),this.requestUpdate()},commitDrop:e=>this.dispatchEvent(new CustomEvent(`tree-drop`,{detail:e,bubbles:!0,composed:!0,cancelable:!0}))?(this.applyInternalDrop&&e.source===`internal`&&this.model&&this.model.applyDrop({source:`internal`,draggedKeys:e.draggedKeys,target:e.target}),this.#Z=!0,!0):!1,onDragEnd:e=>{this.#q=void 0,this.toggleAttribute(`data-drop-rejected`,!1),this.requestUpdate(),this.dispatchEvent(new CustomEvent(`tree-drag-end`,{detail:{dropped:e},bubbles:!0,composed:!0}))}})}#be(){return this.shadowRoot?.querySelector(`#container`)??void 0}#xe(){let e=Number.parseInt(getComputedStyle(this).getPropertyValue(`--tree-indent`),10);return Number.isNaN(e)?20:e}#Se(){let e=Number.parseInt(getComputedStyle(this).getPropertyValue(`--tree-item-height`),10);return Number.isNaN(e)?30:e}#Ce(e){if(e===void 0)return this.root?.children??[];let n=this.#s(),r=n.indexByKey.get(e);return r===void 0?[]:n.rows[r].node.children??[]}#we(e,n,r){let i=this.#s(),a=this.#v(i.rows.length),o=Lb(Fb(a),e.scrollTop,e.scrollTop+e.clientHeight,1);if(!o)return;let s=e.getBoundingClientRect(),c=n.querySelector(`li.item`)?.getBoundingClientRect()??s;for(let n=o.first;n<=o.last;n++){let{node:o,depth:l}=i.rows[n],u=s.top-e.scrollTop+kb(a,n),d={x:c.left,y:u,left:c.left,right:c.left+c.width,top:u,bottom:u+a.rowHeight,width:c.width,height:a.rowHeight,toJSON:()=>({})};r.push({key:o.item.key,node:o,depth:l,index:n,rect:d})}}#Te(){if(this.#Q)return this.#Q;let e=[],n=this.#be(),r=this.renderRoot.querySelector(`ul.tree-list`),i=this.#R;if(n&&r&&this.#_())this.#we(n,r,e);else if(n&&r&&r.children.length===i.length){let a=this.#s(),o=r.children,s=Lb(this.#ne(o),n.scrollTop,n.scrollTop+n.clientHeight,1);if(s)for(let n=s.first;n<=s.last;n++){let r=o[n];if(r.classList.contains(`leaving`))continue;let s=a.indexByKey.get(i[n]);if(s===void 0)continue;let{node:c,depth:l}=a.rows[s];e.push({key:c.item.key,node:c,depth:l,index:s,rect:r.getBoundingClientRect()})}}return this.#Q=e,e}#Ee(e){if(this._expandedKeys.has(e))return;let n=this.#s(),r=n.indexByKey.get(e),i=r===void 0?void 0:n.rows[r];!i||i.node.item.isLeaf===!0||(this.#Ke(i.node,i.depth),this.#Q=void 0,this.requestUpdate())}#De(e,n){if(e===n)return!0;let{parentByKey:r}=this.#c(),i=r.get(n);for(;i!==void 0;){if(i===e)return!0;i=r.get(i)}return!1}#Oe(e){let n=this.#c().parentByKey.get(e);if(n!==void 0&&n!==this.root?.item.key)return this.#ke(n)}#ke(e){let n=this.#s(),r=n.indexByKey.get(e);if(r!==void 0)return n.rows[r].node;let{parentByKey:i}=this.#c(),a=[];for(let n=e;n!==void 0&&n!==this.root?.item.key;n=i.get(n))a.unshift(n);let o=this.root;for(let e of a)o=o?.children?.find(n=>n.item.key===e);return o}#Ae(e,n){let r=this.itemDnd;if(r===`none`)return;let i=r===`internal`||r===`both`,a=r===`external`||r===`both`,o=[];try{o=Array.from(e.types)}catch{}let s=_b(),c=o.includes(lb)||s!==void 0;if(i&&c){if(s&&s.keys.length>0){let e=this.root?yg(this.root,s.keys):s.keys;return{source:`internal`,keys:e,nodes:e.map(e=>this.#ke(e)).filter(e=>e!==void 0)}}if(n===`drop`)try{let n=e.getData(lb);if(n){let e=JSON.parse(n);return{source:`internal`,keys:e.keys??[],nodes:e.nodes??[]}}}catch{}return{source:`internal`,keys:[],nodes:[]}}if(a&&!c){if(this.acceptDropTypes!==void 0){let n=this.acceptDropTypes.trim().split(/\s+/).filter(Boolean),r=Array.from(e.types);if(n.length>0&&!n.some(e=>r.includes(e)))return}if(n===`drop`){let n=this.parseExternalDrop?.(e);return!n||n.length===0?void 0:{source:`external`,keys:n.map(e=>e.item.key),nodes:n}}return this.parseExternalDrop?{source:`external`,keys:[],nodes:[]}:void 0}}#je(){if(this.itemDnd===`none`)return!1;let e=this.#s().rows;return e.length===0?!1:!this.canDrag||e.some(({node:e})=>this.canDrag({nodes:[e],keys:[e.item.key]}))}disconnectedCallback(){super.disconnectedCallback(),this.#he(),this.#H.clear(),this.#V.clear(),this.#N?.(),this.#N=void 0,this.#O?.(),this.#O=void 0,this.#K!==void 0&&(clearTimeout(this.#K),this.#K=void 0),this.#be()?.removeEventListener(`scroll`,this.#$),this.#T(),this.#pe&&=(this.#fe?.removeEventListener(`scroll`,this.#te),this.#fe=void 0,!1),this.#de!==0&&(cancelAnimationFrame(this.#de),this.#de=0),gb(this.#G),this.#F&&(this.#F.unregister(`select-all`),this.#F.unregister(`deselect-all`),this.#F=void 0,this.registry=void 0)}getConfig(){return{...this.#I}}setConfig(e){this.#I={...this.#I,...e},this.requestUpdate()}select(e){if(!this.#Pe(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#Re(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#Re(n),this.requestUpdate()}clearSelection(){if(this._selectedNodes.size===0)return;let e=new Set(this._selectedNodes);this.#Fe(),this.#Re(e),this.requestUpdate()}selectAll(){let e=new Set(this._selectedNodes);if(this.interactionMode===`checked`)for(let{node:e}of this.#s().rows)this.#Pe(e)&&this.#Je(e,!0);else{for(let{node:e}of this.#s().rows)this.#Pe(e)&&this._selectedNodes.add(e);this.selectedNode=[...this._selectedNodes].at(-1)}this.#Re(e),this.requestUpdate()}deselectAll(){let e=new Set(this._selectedNodes);if(this.interactionMode===`checked`)for(let{node:e}of this.#s().rows)this.#Pe(e)&&this.#Je(e,!1);else this.#Fe();this.#Re(e),this.requestUpdate()}expandAll(e){this.#Me(!0,e)}collapseAll(e){this.#Me(!1,e)}#Me(e,n){let r=this.root;if(!r)return;let i=r=>e?r<(n??1/0):r>=(n??0),a=[],o=this._expandedKeys,s=(n,r)=>{let c=n.children;if(n.item.isLeaf!==!0&&c!==void 0&&c.length>0&&i(r)){let i=o.has(n.item.key);e&&!i?(o=Tb(o,n.item.key),this._isExpanded(n,r)||a.push({node:n,depth:r})):!e&&i&&(o=Eb(o,n.item.key),a.push({node:n,depth:r}))}for(let e of c??[])s(e,r+1)};for(let e of r.children??[])s(e,0);if(o===this._expandedKeys)return;this.#e(o);let c=e?`expand`:`collapse`;for(let{node:e,depth:n}of a)this.dispatchEvent(new CustomEvent(c,{detail:{node:e,depth:n},bubbles:!0,composed:!0}));this.requestUpdate()}navigateTo(e,n={}){if(!this.root?.children)return!1;let r=this.#Ie,i=this.#Le;this.#Ie=`programmatic`,this.#Le=n.silent===!0;try{return this.#Ne(e,n.reveal??`edge`)}finally{this.#Ie=r,this.#Le=i}}#Ne(e,n){this.#tt(),this.#Fe(),this.tickled.clearTickled(),this._focusedDepth=0;let r=this.root;for(let n of e){let i=r?.children;if(!i)return!1;let a=i.find(e=>e.item.key===n);if(!a)return!1;this.#nt(a.item.key),this.#e(Tb(this._expandedKeys,a.item.key)),n===e.at(-1)&&(this.select(a),this.tickled.setTickled(a.item.key)),r=a}return this.#ue=!0,this.requestUpdate(),this.#Qe(e.at(-1),n),!0}navigateToNode(e){if(!this.root?.children)return!1;let n=this.#ze(this.root.children,e);return n?this.navigateTo(n):!1}revealKey(e){if(!this.root?.children)return!1;let n=this.#ze(this.root.children,n=>n.item.key===e);if(!n)return!1;for(let e=0;e<n.length-1;e++)this.#nt(n[e]),this.#e(Tb(this._expandedKeys,n[e]));return this.tickled.setTickled(e),this.#ue=!0,this.requestUpdate(),this.updateComplete.then(()=>this.#Qe(e)),!0}selectMany(e){let n=new Set(this._selectedNodes);this._selectedNodes=new Set([...e].filter(e=>this.#Pe(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#Re(n),this.requestUpdate()}getNodes(){if(!this.root?.children)return[];let e=[],n=(r,i)=>{if(e.push({node:r,depth:i}),r.children)for(let e of r.children)n(e,i+1)};for(let e of this.root.children)n(e,0);return e}#Pe(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf===!0:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#Fe(){this._selectionVersion++,this._selectedNodes.clear(),this.selectedNode=void 0}#Ie;#Le;#Re(e){if(this._selectionVersion++,this.#Le)return;let n={selected:new Set(this._selectedNodes),previous:e,origin:this.#Ie};this.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}#ze(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;if(i.children?.length){let r=this.#ze(i.children,n,e);if(r)return r}}}renderNodeContent(e,n){let r=e.item.isLeaf!==!0,o=this._isExpanded(e,n);return i`
7758
7758
  <span class="tree-caret">
7759
7759
  ${r?i`<ixfx-icon class="caret-icon" name="chevron-down" .rotate=${o?a:`-90deg`}></ixfx-icon>`:``}
7760
7760
  </span>
7761
7761
  <span class="tree-label">${e.item.label}</span>
7762
- `}_handleItemClick(e,n,r){if(!(this.#J?.isDragging||this.#Y?.isDragging||this.#K!==void 0)&&!(r&&r.detail>=2)){switch(this.#j&&this._expandedKeys.has(this.#j.item.key)&&this.#et(),this.tickled.handlePointerEnter(e.item.key),this._focusedDepth=n,this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e,depth:n},bubbles:!0,composed:!0})),this.interactionMode){case`implicit`:this.#Be(e,n,r);break;case`standard`:this.#Ve(e,n,r);break;case`vscode`:this.#Ve(e,n,r);break;case`manual`:this.#Ue(e,n,r);break;case`checked`:this.#He(e,n)}this.requestUpdate()}}#ze(e,n){if(e.item.isLeaf===!0)return!1;let r=n?.target;return r instanceof Element&&r.closest(`.tree-caret`)!==null}#Be(e,n,r){if(!this.#ze(e,r)&&this.#Ne(e)){let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,(!n.has(e)||n.size!==1)&&this.#Le(n)}this.#Ge(e,n)}#Ve(e,n,r){let i=r?r.metaKey||r.ctrlKey:!1,a=r?r.shiftKey:!1;if(i){if(this.#Ne(e)){let n=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Je(e)}),this.#Le(n)}return}if(a&&this.#P){let n=this.#s(),r=n.rows,i=n.indexByKey.get(this.#P.node.item.key)??-1,a=n.indexByKey.get(e.item.key)??-1;if(i>=0&&a>=0){let n=new Set(this._selectedNodes),o=Math.min(i,a),s=Math.max(i,a),c=r.slice(o,s+1).map(e=>e.node).filter(e=>this.#Ne(e));this._selectedNodes=new Set(c),this.selectedNode=e,this.#Le(n)}return}if(!this.#ze(e,r)&&this.#Ne(e)){let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Je(e)},(!n.has(e)||n.size!==1)&&this.#Le(n)}this.#Ge(e,n)}#He(e,n){this.#Ge(e,n)}#Ue(e,n,r){let i=r?r.metaKey||r.ctrlKey:!1,a=r?r.shiftKey:!1;if(i){if(this.#Ne(e)){let n=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Je(e)}),this.#Le(n)}return}if(a&&this.#P){let n=this.#s(),r=n.rows,i=n.indexByKey.get(this.#P.node.item.key)??-1,a=n.indexByKey.get(e.item.key)??-1;if(i>=0&&a>=0){let n=new Set(this._selectedNodes),o=Math.min(i,a),s=Math.max(i,a),c=r.slice(o,s+1).map(e=>e.node).filter(e=>this.#Ne(e));this._selectedNodes=new Set(c),this.selectedNode=e,this.#Le(n)}return}this.#Ge(e,n)}#We(e,n){if(!this.#Ne(e))return;let r=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Je(e)}),this.#Le(r)}_handleCheckboxClick(e,n,r){e.stopPropagation();let i=new Set(this._selectedNodes),a=this.#Ke(n);this.#qe(n,!a),(this.selectedNode===void 0||!this._selectedNodes.has(this.selectedNode))&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#Le(i),this.requestUpdate()}#Ge(e,n){let r=this._expandedKeys.has(e.item.key);if(this.#ue=!0,r)this.#e(Eb(this._expandedKeys,e.item.key)),this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}));else if(e.children===void 0){if(e.item.isLeaf!==!1)return;if(this.model??(this.loadChildren?this:void 0)){this.#j=e;let r=new AbortController;this.#M=r,this.#Xe(e,n,r).catch(()=>{})}}else this.#tt(e.item.key),this.#e(Tb(this._expandedKeys,e.item.key)),this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}#Ke(e){let n=[],r=e=>{this.#Ne(e)&&n.push(e),e.children?.forEach(r)};return r(e),n.length>0&&n.every(e=>this._selectedNodes.has(e))}#qe(e,n){if(this.#Ne(e)&&(n?this._selectedNodes.add(e):this._selectedNodes.delete(e)),e.children)for(let r of e.children)this.#qe(r,n)}#Je(e){return this.#s().indexByKey.get(e.item.key)??-1}#Ye(e,n,r){if(!this.#P){let r=e[n]?.node;r&&(this.#P={node:r,flatIndex:n})}if(!this.#P)return;let i=this.#s().indexByKey.get(this.#P.node.item.key)??-1;if(i<0)return;let a=Math.min(i,r),o=Math.max(i,r);if(this.interactionMode===`vscode`){this.#P.selectionSnapshot||(this.#P={...this.#P,selectionSnapshot:new Set(this._selectedNodes)});let n=this.#P.selectionSnapshot,i=e.slice(a,o+1).map(e=>e.node).filter(e=>this.#Ne(e)),s=new Set(n);for(let e of i)n.has(e)?s.delete(e):s.add(e);let c=new Set(this._selectedNodes);this._selectedNodes=s,this.selectedNode=e[r]?.node??this.selectedNode,this.#Le(c)}else{let n=new Set(this._selectedNodes),i=e.slice(a,o+1).map(e=>e.node).filter(e=>this.#Ne(e));this._selectedNodes=new Set(i),this.selectedNode=e[r]?.node??this.selectedNode,this.#Le(n)}}async#Xe(e,n,r){try{let i;if(i=this.model?await this.model.getChildren(e,n,r.signal):[...await dg(this.loadChildren({node:e,depth:n},r.signal),r.signal)],r.signal.aborted)return;e.children=i,this.#i++,this.#tt(e.item.key),this.#e(Tb(this._expandedKeys,e.item.key)),this.#t=void 0,this.#ue=!0,this.#j=void 0,this.#M=void 0,this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0})),this.requestUpdate()}catch{if(r.signal.aborted)return;e.children=[],this.#i++,this.#t=void 0,this.#j=void 0,this.#M=void 0,this.requestUpdate()}}_isSelected(e){return this._selectedNodes.has(e)}_isFocused(e){return this.tickled.isTickled(e.item.key)}_isExpanded(e,n=0){return this._expandedKeys.has(e.item.key)?!0:this.#D()?.autoExpanded.has(e.item.key)??!1}get _pendingNode(){return this.#j}#Ze(e,n=`edge`){if(n===`center-if-hidden`){this.updateComplete.then(()=>{this.#y();let r=this.#s().indexByKey.get(e);r!==void 0&&this.#E(r,n)});return}if(this.#_()){this.updateComplete.then(()=>{let n=this.#s().indexByKey.get(e);n!==void 0&&this.#E(n)});return}let r=++this.#Qe;requestAnimationFrame(()=>{this.#$e(e);let n=this.#be()?.getAnimations?.({subtree:!0})??[];n.length>0&&Promise.allSettled(n.map(e=>e.finished)).then(()=>{r===this.#Qe&&this.#$e(e)})})}#Qe;#$e(e){let n=this.#be(),r=this.shadowRoot?.querySelector(`ul.tree-list [data-key="${CSS.escape(e)}"]`);if(!r||!n)return;let i=r.getBoundingClientRect(),a=n.getBoundingClientRect(),o=i.top-a.top,s=o+i.height,c=this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0;o<c?n.scrollTop+=o-c:s>n.clientHeight&&(n.scrollTop+=s-n.clientHeight)}#et(){this.#M&&(this.#M.abort(),this.#M=void 0,this.#j=void 0)}#tt(e){if(this.exclusivity!==`none`){if(this.exclusivity===`depth`)this.#nt(e);else if(this.exclusivity===`global`){let n=this.#rt(e);this.#e(Db(this._expandedKeys,r=>!n.has(r)&&r!==e))}}}#nt(e){if(!this.root)return;let n=this.#it(this.root,e);if(!n?.children)return;let r=new Set(n.children.map(e=>e.item.key));this.#e(Db(this._expandedKeys,n=>n!==e&&r.has(n)))}#rt(e){let n=new Set,r=i=>{if(i.item.key===e)return!0;if(!i.children)return!1;for(let e of i.children)if(r(e))return n.add(i.item.key),!0;return!1};return this.root&&r(this.root),n}#it(e,n,r=void 0){if(e.children)for(let i of e.children){if(i.item.key===n)return r??e;let a=this.#it(i,n,i);if(a)return a}}#at(){let e=this.tickled.tickledId;return e?this.#s().indexByKey.get(e)??0:0}#ot(e){let n=this.#s().rows;if(e<0||e>=n.length)return;let{node:r,depth:i}=n[e];if(this.tickled.setTickled(r.item.key),this._focusedDepth=i,this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:r,depth:i},bubbles:!0,composed:!0})),this.requestUpdate(),this.#_()){this.#E(e);return}this.updateComplete.then(()=>this.#st())}#st(){let e=this.tickled.tickledId;e!==void 0&&(this.shadowRoot?.querySelector(`ul.tree-list [data-key="${CSS.escape(e)}"]`))?.scrollIntoView({block:`nearest`,behavior:`smooth`})}#ct(){return this.#y(),Pb(this.#v(this.#s().rows.length))}#lt(e,n,r,i){this.interactionMode===`implicit`&&this.select(e[r].node),this.#ot(r),i&&(this.interactionMode===`standard`||this.interactionMode===`vscode`)?this.#Ye(e,n,r):this.interactionMode===`vscode`&&(this.#P=void 0),this.requestUpdate()}#ut;renderLoadingIndicator(){return i`<span class="loading-spinner"></span>`}render(){let e=this.#s().rows;return i`
7762
+ `}_handleItemClick(e,n,r){if(!(this.#J?.isDragging||this.#Y?.isDragging||this.#K!==void 0)&&!(r&&r.detail>=2)){switch(this.#j&&this._expandedKeys.has(this.#j.item.key)&&this.#tt(),this.tickled.handlePointerEnter(e.item.key),this._focusedDepth=n,this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e,depth:n},bubbles:!0,composed:!0})),this.interactionMode){case`implicit`:this.#Ve(e,n,r);break;case`standard`:this.#He(e,n,r);break;case`vscode`:this.#He(e,n,r);break;case`manual`:this.#We(e,n,r);break;case`checked`:this.#Ue(e,n)}this.requestUpdate()}}#Be(e,n){if(e.item.isLeaf===!0)return!1;let r=n?.target;return r instanceof Element&&r.closest(`.tree-caret`)!==null}#Ve(e,n,r){if(!this.#Be(e,r)&&this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,(!n.has(e)||n.size!==1)&&this.#Re(n)}this.#Ke(e,n)}#He(e,n,r){let i=r?r.metaKey||r.ctrlKey:!1,a=r?r.shiftKey:!1;if(i){if(this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)}),this.#Re(n)}return}if(a&&this.#P){let n=this.#s(),r=n.rows,i=n.indexByKey.get(this.#P.node.item.key)??-1,a=n.indexByKey.get(e.item.key)??-1;if(i>=0&&a>=0){let n=new Set(this._selectedNodes),o=Math.min(i,a),s=Math.max(i,a),c=r.slice(o,s+1).map(e=>e.node).filter(e=>this.#Pe(e));this._selectedNodes=new Set(c),this.selectedNode=e,this.#Re(n)}return}if(!this.#Be(e,r)&&this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)},(!n.has(e)||n.size!==1)&&this.#Re(n)}this.#Ke(e,n)}#Ue(e,n){this.#Ke(e,n)}#We(e,n,r){let i=r?r.metaKey||r.ctrlKey:!1,a=r?r.shiftKey:!1;if(i){if(this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)}),this.#Re(n)}return}if(a&&this.#P){let n=this.#s(),r=n.rows,i=n.indexByKey.get(this.#P.node.item.key)??-1,a=n.indexByKey.get(e.item.key)??-1;if(i>=0&&a>=0){let n=new Set(this._selectedNodes),o=Math.min(i,a),s=Math.max(i,a),c=r.slice(o,s+1).map(e=>e.node).filter(e=>this.#Pe(e));this._selectedNodes=new Set(c),this.selectedNode=e,this.#Re(n)}return}this.#Ke(e,n)}#Ge(e,n){if(!this.#Pe(e))return;let r=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)}),this.#Re(r)}_handleCheckboxClick(e,n,r){e.stopPropagation();let i=new Set(this._selectedNodes),a=this.#qe(n);this.#Je(n,!a),(this.selectedNode===void 0||!this._selectedNodes.has(this.selectedNode))&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#Re(i),this.requestUpdate()}#Ke(e,n){let r=this._expandedKeys.has(e.item.key);if(this.#ue=!0,r)this.#e(Eb(this._expandedKeys,e.item.key)),this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}));else if(e.children===void 0){if(e.item.isLeaf!==!1)return;if(this.model??(this.loadChildren?this:void 0)){this.#j=e;let r=new AbortController;this.#M=r,this.#Ze(e,n,r).catch(()=>{})}}else this.#nt(e.item.key),this.#e(Tb(this._expandedKeys,e.item.key)),this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}#qe(e){let n=[],r=e=>{this.#Pe(e)&&n.push(e),e.children?.forEach(r)};return r(e),n.length>0&&n.every(e=>this._selectedNodes.has(e))}#Je(e,n){if(this.#Pe(e)&&(n?this._selectedNodes.add(e):this._selectedNodes.delete(e)),e.children)for(let r of e.children)this.#Je(r,n)}#Ye(e){return this.#s().indexByKey.get(e.item.key)??-1}#Xe(e,n,r){if(!this.#P){let r=e[n]?.node;r&&(this.#P={node:r,flatIndex:n})}if(!this.#P)return;let i=this.#s().indexByKey.get(this.#P.node.item.key)??-1;if(i<0)return;let a=Math.min(i,r),o=Math.max(i,r);if(this.interactionMode===`vscode`){this.#P.selectionSnapshot||(this.#P={...this.#P,selectionSnapshot:new Set(this._selectedNodes)});let n=this.#P.selectionSnapshot,i=e.slice(a,o+1).map(e=>e.node).filter(e=>this.#Pe(e)),s=new Set(n);for(let e of i)n.has(e)?s.delete(e):s.add(e);let c=new Set(this._selectedNodes);this._selectedNodes=s,this.selectedNode=e[r]?.node??this.selectedNode,this.#Re(c)}else{let n=new Set(this._selectedNodes),i=e.slice(a,o+1).map(e=>e.node).filter(e=>this.#Pe(e));this._selectedNodes=new Set(i),this.selectedNode=e[r]?.node??this.selectedNode,this.#Re(n)}}async#Ze(e,n,r){try{let i;if(i=this.model?await this.model.getChildren(e,n,r.signal):[...await dg(this.loadChildren({node:e,depth:n},r.signal),r.signal)],r.signal.aborted)return;e.children=i,this.#i++,this.#nt(e.item.key),this.#e(Tb(this._expandedKeys,e.item.key)),this.#t=void 0,this.#ue=!0,this.#j=void 0,this.#M=void 0,this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0})),this.requestUpdate()}catch{if(r.signal.aborted)return;e.children=[],this.#i++,this.#t=void 0,this.#j=void 0,this.#M=void 0,this.requestUpdate()}}_isSelected(e){return this._selectedNodes.has(e)}_isFocused(e){return this.tickled.isTickled(e.item.key)}_isExpanded(e,n=0){return this._expandedKeys.has(e.item.key)?!0:this.#D()?.autoExpanded.has(e.item.key)??!1}get _pendingNode(){return this.#j}#Qe(e,n=`edge`){if(n===`center-if-hidden`){this.updateComplete.then(()=>{this.#y();let r=this.#s().indexByKey.get(e);r!==void 0&&this.#E(r,n)});return}if(this.#_()){this.updateComplete.then(()=>{let n=this.#s().indexByKey.get(e);n!==void 0&&this.#E(n)});return}let r=++this.#$e;requestAnimationFrame(()=>{this.#et(e);let n=this.#be()?.getAnimations?.({subtree:!0})??[];n.length>0&&Promise.allSettled(n.map(e=>e.finished)).then(()=>{r===this.#$e&&this.#et(e)})})}#$e;#et(e){let n=this.#be(),r=this.shadowRoot?.querySelector(`ul.tree-list [data-key="${CSS.escape(e)}"]`);if(!r||!n)return;let i=r.getBoundingClientRect(),a=n.getBoundingClientRect(),o=i.top-a.top,s=o+i.height,c=this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0;o<c?n.scrollTop+=o-c:s>n.clientHeight&&(n.scrollTop+=s-n.clientHeight)}#tt(){this.#M&&(this.#M.abort(),this.#M=void 0,this.#j=void 0)}#nt(e){if(this.exclusivity!==`none`){if(this.exclusivity===`depth`)this.#rt(e);else if(this.exclusivity===`global`){let n=this.#it(e);this.#e(Db(this._expandedKeys,r=>!n.has(r)&&r!==e))}}}#rt(e){if(!this.root)return;let n=this.#at(this.root,e);if(!n?.children)return;let r=new Set(n.children.map(e=>e.item.key));this.#e(Db(this._expandedKeys,n=>n!==e&&r.has(n)))}#it(e){let n=new Set,r=i=>{if(i.item.key===e)return!0;if(!i.children)return!1;for(let e of i.children)if(r(e))return n.add(i.item.key),!0;return!1};return this.root&&r(this.root),n}#at(e,n,r=void 0){if(e.children)for(let i of e.children){if(i.item.key===n)return r??e;let a=this.#at(i,n,i);if(a)return a}}#ot(){let e=this.tickled.tickledId;return e?this.#s().indexByKey.get(e)??0:0}#st(e){let n=this.#s().rows;if(e<0||e>=n.length)return;let{node:r,depth:i}=n[e];if(this.tickled.setTickled(r.item.key),this._focusedDepth=i,this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:r,depth:i},bubbles:!0,composed:!0})),this.requestUpdate(),this.#_()){this.#E(e);return}this.updateComplete.then(()=>this.#ct())}#ct(){let e=this.tickled.tickledId;e!==void 0&&(this.shadowRoot?.querySelector(`ul.tree-list [data-key="${CSS.escape(e)}"]`))?.scrollIntoView({block:`nearest`,behavior:`smooth`})}#lt(){return this.#y(),Pb(this.#v(this.#s().rows.length))}#ut(e,n,r,i){this.interactionMode===`implicit`&&this.select(e[r].node),this.#st(r),i&&(this.interactionMode===`standard`||this.interactionMode===`vscode`)?this.#Xe(e,n,r):this.interactionMode===`vscode`&&(this.#P=void 0),this.requestUpdate()}#dt;renderLoadingIndicator(){return i`<span class="loading-spinner"></span>`}render(){let e=this.#s().rows;return i`
7763
7763
  <div
7764
7764
  id="container"
7765
7765
  data-input-mode=${this.tickled.inputMode}
7766
- @keydown=${this.#ut}
7767
- @dblclick=${this.#dt}
7766
+ @keydown=${this.#dt}
7767
+ @dblclick=${this.#ft}
7768
7768
  @pointerleave=${e=>this.tickled.handlePointerLeave(e)}
7769
7769
  tabindex="0"
7770
7770
  >
7771
7771
  ${this.#ae()}
7772
- ${this.root?this.#ft(e):a}
7772
+ ${this.root?this.#pt(e):a}
7773
7773
  </div>
7774
7774
  ${this.search.renderField()}
7775
- `}#dt;#ft(e){if(e.length===0&&this.#j&&this.#H.size===0)return i`
7775
+ `}#ft;#pt(e){if(e.length===0&&this.#j&&this.#H.size===0)return i`
7776
7776
  <div class="tree-loading">
7777
7777
  ${this.renderLoadingIndicator()}
7778
7778
  </div>
7779
- `;if(this.#_())return this.#pt(e);let n=Cb(e,this.#R,this.#H);return this.#R=n.map(e=>e.node.item.key),this.#z=new Map(this.#R.map((e,n)=>[e,n])),i`
7779
+ `;if(this.#_())return this.#mt(e);let n=Cb(e,this.#R,this.#H);return this.#R=n.map(e=>e.node.item.key),this.#z=new Map(this.#R.map((e,n)=>[e,n])),i`
7780
7780
  <ul class="tree-list" role="tree">
7781
7781
  ${_(n,({node:e})=>e.item.key,({node:e,depth:n})=>this._renderNode(e,n))}
7782
7782
  </ul>
7783
- `}#pt(e){let n=this.#v(e.length),{start:r,end:a}=this.#b(e.length);this.#m=r,this.#h=a,this.#R=[],this.#z=new Map;let o=Ob(n);return i`
7783
+ `}#mt(e){let n=this.#v(e.length),{start:r,end:a}=this.#b(e.length);this.#m=r,this.#h=a,this.#R=[],this.#z=new Map;let o=Ob(n);return i`
7784
7784
  <ul class="tree-list virtual" role="tree" aria-rowcount=${e.length}>
7785
7785
  <li class="virtual-spacer" role="presentation" aria-hidden="true" style=${`height: ${r*o}px`}></li>
7786
7786
  ${_(e.slice(r,a),({node:e})=>e.item.key,({node:e,depth:n})=>this._renderNode(e,n))}
@@ -8344,9 +8344,9 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8344
8344
  @pointerup=${n=>this._onPointerUp(e,`text`,n)}
8345
8345
  @pointermove=${n=>this._onPointerMove(e,`text`,n)}
8346
8346
  >${a}</span>
8347
- `}};E([d({type:Number})],gx.prototype,`columns`,void 0),E([d({type:String})],gx.prototype,`colourScheme`,void 0),E([d({type:Boolean})],gx.prototype,`showChangeset`,void 0),E([d({type:Boolean,attribute:`hide-offset-col`})],gx.prototype,`hideOffsetCol`,void 0),E([d({type:Boolean,attribute:`hide-hex-col`})],gx.prototype,`hideHexCol`,void 0),E([d({type:Boolean,attribute:`hide-text-col`})],gx.prototype,`hideTextCol`,void 0),E([m()],gx.prototype,`_selection`,void 0),E([m()],gx.prototype,`_scrollTop`,void 0),E([m()],gx.prototype,`_editState`,void 0),E([m()],gx.prototype,`_containerH`,void 0),E([m()],gx.prototype,`_shadeMap`,void 0),E([m()],gx.prototype,`_focusSide`,void 0),gx=E([T(`ixfx-hex-editor`)],gx);function _x(e,n,r){let i=e.node.children??[];if(i.length===0)return!1;let a=n.filter(n=>n.parentId===e.id);return a.length<i.length||a.some(e=>!r.has(e.id))}function vx(e,n,r,i){let a=Math.min(r,i)/2.1;return{x:r/2+(n.offset.x+n.zoom*e.x)*a,y:i/2+(n.offset.y+n.zoom*e.y)*a}}function yx(e,n){if(!e)return a;let r=e.node.children??[],o=r.slice(0,12),s=r.length-o.length;return i`
8347
+ `}};E([d({type:Number})],gx.prototype,`columns`,void 0),E([d({type:String})],gx.prototype,`colourScheme`,void 0),E([d({type:Boolean})],gx.prototype,`showChangeset`,void 0),E([d({type:Boolean,attribute:`hide-offset-col`})],gx.prototype,`hideOffsetCol`,void 0),E([d({type:Boolean,attribute:`hide-hex-col`})],gx.prototype,`hideHexCol`,void 0),E([d({type:Boolean,attribute:`hide-text-col`})],gx.prototype,`hideTextCol`,void 0),E([m()],gx.prototype,`_selection`,void 0),E([m()],gx.prototype,`_scrollTop`,void 0),E([m()],gx.prototype,`_editState`,void 0),E([m()],gx.prototype,`_containerH`,void 0),E([m()],gx.prototype,`_shadeMap`,void 0),E([m()],gx.prototype,`_focusSide`,void 0),gx=E([T(`ixfx-hex-editor`)],gx);const _x=s`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 7-7 7 7"/><path d="M12 19V5"/></svg>`;function vx(e,n,r){return e.y<r*.25?`below`:e.y>r*.75?`above`:e.x>n/2?`left`:`right`}function yx(e,n,r){let i=e.node.children??[];if(i.length===0)return!1;let a=n.filter(n=>n.parentId===e.id);return a.length<i.length||a.some(e=>!r.has(e.id))}function bx(e,n,r,i){let a=Math.min(r,i)/2.1;return{x:r/2+(n.offset.x+n.zoom*e.x)*a,y:i/2+(n.offset.y+n.zoom*e.y)*a}}function xx(e,n){if(!e)return a;let r=e.node.children??[],o=r.slice(0,12),s=r.length-o.length;return i`
8348
8348
  <div
8349
- class="child-preview ${e.above?`above`:`below`}"
8349
+ class="child-preview ${e.side}"
8350
8350
  part="child-preview"
8351
8351
  role="dialog"
8352
8352
  aria-label=${`Children of ${e.node.item.label}`}
@@ -8355,7 +8355,17 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8355
8355
  @pointerleave=${n.onPointerLeave}
8356
8356
  @pointerdown=${e=>e.stopPropagation()}
8357
8357
  >
8358
- <div class="child-preview-title">${e.node.item.label}</div>
8358
+ <div class="child-preview-title">
8359
+ ${e.parent?i`<button
8360
+ type="button"
8361
+ class="child-preview-up"
8362
+ tabindex="-1"
8363
+ title=${`Up to ${e.parent.item.label}`}
8364
+ aria-label=${`Up to ${e.parent.item.label}`}
8365
+ @click=${()=>n.onPick(e.parent)}
8366
+ >${_x}</button>`:a}
8367
+ <span>${e.node.item.label}</span>
8368
+ </div>
8359
8369
  <ul>
8360
8370
  ${o.map(e=>i`<li>
8361
8371
  <button type="button" tabindex="-1" @click=${()=>n.onPick(e)}>${e.item.label}</button>
@@ -8363,7 +8373,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8363
8373
  </ul>
8364
8374
  ${s>0?i`<div class="child-preview-more">+${s} more</div>`:a}
8365
8375
  </div>
8366
- `}function bx(e){let n=!1,r,i=i=>{clearTimeout(r);let a=e.candidate(i);if(a!==void 0){e.setPreviewId(a);return}r=setTimeout(()=>{n||e.setPreviewId(void 0)},250)};return{update:i,pointerEnter(){n=!0,clearTimeout(r)},pointerLeave(e){n=!1,i(e)},hide(){n=!1,clearTimeout(r),e.setPreviewId(void 0)},dispose(){clearTimeout(r)}}}const xx=1e-9;function Sx(e,n){return{x:e.x*n.x-e.y*n.y,y:e.x*n.y+e.y*n.x}}function Cx(e){return{x:e.x,y:-e.y}}function wx(e,n){return{x:e.x+n.x,y:e.y+n.y}}function Tx(e,n){return{x:e.x-n.x,y:e.y-n.y}}function Ex(e,n){return{x:e.x*n,y:e.y*n}}function Dx(e,n){let r=n.x*n.x+n.y*n.y;return r<xx?{x:0,y:0}:Ex(Sx(e,Cx(n)),1/r)}function Ox(e){return Math.hypot(e.x,e.y)}function kx(e,n=.999999){let r=Ox(e);return r<=n?e:Ex(e,n/r)}function Ax(e,n){return kx(Dx(Tx(e,n),Tx({x:1,y:0},Sx(Cx(n),e))))}function jx(e,n){return kx(Dx(wx(e,n),wx({x:1,y:0},Sx(Cx(n),e))))}function Mx(e,n){return jx(n,e)}function Nx(e){return Math.tanh(e/2)}function Px(e){return 2*Math.atanh(Math.min(Math.max(e,0),.999999))}function Fx(e,n){return Px(Ox(Ax(n,e)))}function Ix(e,n,r){if(r<=0)return e;if(r>=1)return n;let i=Ax(n,e),a=Ox(i);return a<xx?e:jx(Ex(Ex(i,1/a),Nx(Px(a)*r)),e)}const Lx={a:{x:1,y:0},b:{x:0,y:0}};function Rx(e,n){return kx(Dx(wx(Sx(e.a,n),e.b),wx(Sx(Cx(e.b),n),Cx(e.a))))}function zx(e,n){let r=wx(Sx(e.a,n.a),Sx(e.b,Cx(n.b))),i=wx(Sx(e.a,n.b),Sx(e.b,Cx(n.a))),a=Math.sqrt(Math.max(xx,r.x*r.x+r.y*r.y-i.x*i.x-i.y*i.y));return{a:Ex(r,1/a),b:Ex(i,1/a)}}function Bx(e){return{a:Cx(e.a),b:Ex(e.b,-1)}}function Vx(e){let n=1/Math.sqrt(Math.max(xx,1-e.x*e.x-e.y*e.y));return{a:{x:n,y:0},b:Ex(e,n)}}function Hx(e){return{a:{x:Math.cos(e/2),y:Math.sin(e/2)},b:{x:0,y:0}}}function Ux(e,n=0){return zx(Hx(n),Bx(Vx(e)))}function Wx(e){return{center:Rx(Bx(e),{x:0,y:0}),rotation:2*Math.atan2(e.a.y,e.a.x)}}function Gx(e,n){let r=e.x*n.y-e.y*n.x,i=Math.hypot(n.x-e.x,n.y-e.y);if(Math.abs(r)<1e-6*Math.max(i,xx))return{kind:`line`};let a=(e.x*e.x+e.y*e.y+1)/2,o=(n.x*n.x+n.y*n.y+1)/2,s={x:(a*n.y-o*e.y)/r,y:(e.x*o-n.x*a)/r};return{kind:`arc`,center:s,radius:Math.sqrt(Math.max(0,s.x*s.x+s.y*s.y-1)),sweep:+((e.x-s.x)*(n.y-s.y)-(e.y-s.y)*(n.x-s.x)>0)}}function Kx(e,n,r=1){let i=e=>(e*r).toFixed(2),a=Gx(e,n),o=`M${i(e.x)},${i(e.y)}`;return a.kind===`line`||a.radius*r>1e6?`${o} L${i(n.x)},${i(n.y)}`:`${o} A${i(a.radius)},${i(a.radius)} 0 0 ${a.sweep} ${i(n.x)},${i(n.y)}`}function qx(e){return Math.atan2(Math.sin(e),Math.cos(e))}function Jx(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}function Yx(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Xx(e,n,r){let i=Vx(n);return zx(zx(i,zx(Vx(Ax(r,n)),Bx(i))),e)}function Zx(e){let{center:n,rotation:r}=Wx(e),i=qx(r),a={x:0,y:0};return{settledRotation:i,viewAt:e=>{let r=Jx(Math.min(1,Math.max(0,e)));return Ux(Ix(n,a,r),i)}}}const Qx=.5;function $x(e){let n=Math.min(8,Math.max(Qx,e.zoom));if(n<=1)return{zoom:n,offset:{x:0,y:0}};let r=n-1,i=Math.hypot(e.offset.x,e.offset.y);return{zoom:n,offset:i>r?{x:e.offset.x*r/i,y:e.offset.y*r/i}:e.offset}}function eS(e,n,r){let i=Math.min(8,Math.max(Qx,e.zoom*r)),a=nS(n,e);return $x({zoom:i,offset:{x:n.x-i*a.x,y:n.y-i*a.y}})}function tS(e,n,r){let i=2.1/(Math.min(e.width,e.height)||1);return{x:(n-(e.left+e.width/2))*i,y:(r-(e.top+e.height/2))*i}}function nS(e,n){let r=n.zoom||1;return{x:(e.x-n.offset.x)/r,y:(e.y-n.offset.y)/r}}function rS(e){let n=e.target;return n===e.currentTarget||n?.classList.contains(`disk-boundary`)===!0}function iS(e){let n=new Map,r,i,a=n=>{let r=e.svgRect();return r?tS(r,n.clientX,n.clientY):void 0},o=n=>kx(nS(n,e.zoomState()),.98),s=(e,n)=>({x:(e.x+n.x)/2,y:(e.y+n.y)/2}),c=(n,i)=>{r={pointerId:n,start:o(i),baseView:e.takeView()}},l=()=>{let[[a,o],[c,l]]=[...n.entries()];r=void 0;let{zoom:u}=e.zoomState();i={ids:[a,c],startDistance:Math.max(1e-6,Math.hypot(o.x-l.x,o.y-l.y)),startZoom:u,anchor:nS(s(o,l),e.zoomState())}};return{onPointerDown(r){if(!rS(r))return;e.focusTree();let i=a(r);i&&(r.currentTarget.setPointerCapture?.(r.pointerId),n.set(r.pointerId,i),n.size===2&&e.zoomGesturesEnabled()?l():n.size===1&&c(r.pointerId,i))},onPointerMove(c){if(!n.has(c.pointerId))return;let l=a(c);if(l){if(n.set(c.pointerId,l),i){let r=n.get(i.ids[0]),a=n.get(i.ids[1]);if(!r||!a)return;let o=i.startZoom*Math.hypot(r.x-a.x,r.y-a.y)/i.startDistance,c=s(r,a),l=Math.min(8,Math.max(Qx,o));e.setZoomState($x({zoom:l,offset:{x:c.x-l*i.anchor.x,y:c.y-l*i.anchor.y}}))}else r&&r.pointerId===c.pointerId&&e.setView(Xx(r.baseView,r.start,o(l)))}},onPointerUp(e){if(n.delete(e.pointerId)){if(i){i=void 0;let[e]=[...n.entries()];e&&c(e[0],e[1])}else r?.pointerId===e.pointerId&&(r=void 0)}},onWheel(n){let r=n.ctrlKey||n.metaKey;if(!e.zoomGesturesEnabled()||!r&&!e.hasFocus())return;let i=a(n);if(!i)return;n.preventDefault();let o=n.deltaMode===1?n.deltaY*16:n.deltaY,s=Math.exp(-o*(r?.01:.002));e.setZoomState(eS(e.zoomState(),i,s))},cancel(){r=void 0,i=void 0,n.clear()}}}const aS=r`
8376
+ `}function Sx(e){let n=!1,r,i=i=>{clearTimeout(r);let a=e.candidate(i);if(a!==void 0){if(a===e.currentId())return;r=setTimeout(()=>{let n=e.candidate(i);n!==void 0&&e.setPreviewId(n)},600);return}r=setTimeout(()=>{n||e.setPreviewId(void 0)},250)};return{update:i,pointerEnter(){n=!0,clearTimeout(r)},pointerLeave(e){n=!1,i(e)},hide(){n=!1,clearTimeout(r),e.setPreviewId(void 0)},dispose(){clearTimeout(r)}}}const Cx=1e-9;function wx(e,n){return{x:e.x*n.x-e.y*n.y,y:e.x*n.y+e.y*n.x}}function Tx(e){return{x:e.x,y:-e.y}}function Ex(e,n){return{x:e.x+n.x,y:e.y+n.y}}function Dx(e,n){return{x:e.x-n.x,y:e.y-n.y}}function Ox(e,n){return{x:e.x*n,y:e.y*n}}function kx(e,n){let r=n.x*n.x+n.y*n.y;return r<Cx?{x:0,y:0}:Ox(wx(e,Tx(n)),1/r)}function Ax(e){return Math.hypot(e.x,e.y)}function jx(e,n=.999999){let r=Ax(e);return r<=n?e:Ox(e,n/r)}function Mx(e,n){return jx(kx(Dx(e,n),Dx({x:1,y:0},wx(Tx(n),e))))}function Nx(e,n){return jx(kx(Ex(e,n),Ex({x:1,y:0},wx(Tx(n),e))))}function Px(e,n){return Nx(n,e)}function Fx(e){return Math.tanh(e/2)}function Ix(e){return 2*Math.atanh(Math.min(Math.max(e,0),.999999))}function Lx(e,n){return Ix(Ax(Mx(n,e)))}function Rx(e,n,r){if(r<=0)return e;if(r>=1)return n;let i=Mx(n,e),a=Ax(i);return a<Cx?e:Nx(Ox(Ox(i,1/a),Fx(Ix(a)*r)),e)}const zx={a:{x:1,y:0},b:{x:0,y:0}};function Bx(e,n){return jx(kx(Ex(wx(e.a,n),e.b),Ex(wx(Tx(e.b),n),Tx(e.a))))}function Vx(e,n){let r=Ex(wx(e.a,n.a),wx(e.b,Tx(n.b))),i=Ex(wx(e.a,n.b),wx(e.b,Tx(n.a))),a=Math.sqrt(Math.max(Cx,r.x*r.x+r.y*r.y-i.x*i.x-i.y*i.y));return{a:Ox(r,1/a),b:Ox(i,1/a)}}function Hx(e){return{a:Tx(e.a),b:Ox(e.b,-1)}}function Ux(e){let n=1/Math.sqrt(Math.max(Cx,1-e.x*e.x-e.y*e.y));return{a:{x:n,y:0},b:Ox(e,n)}}function Wx(e){return{a:{x:Math.cos(e/2),y:Math.sin(e/2)},b:{x:0,y:0}}}function Gx(e,n=0){return Vx(Wx(n),Hx(Ux(e)))}function Kx(e){return{center:Bx(Hx(e),{x:0,y:0}),rotation:2*Math.atan2(e.a.y,e.a.x)}}function qx(e,n){let r=e.x*n.y-e.y*n.x,i=Math.hypot(n.x-e.x,n.y-e.y);if(Math.abs(r)<1e-6*Math.max(i,Cx))return{kind:`line`};let a=(e.x*e.x+e.y*e.y+1)/2,o=(n.x*n.x+n.y*n.y+1)/2,s={x:(a*n.y-o*e.y)/r,y:(e.x*o-n.x*a)/r};return{kind:`arc`,center:s,radius:Math.sqrt(Math.max(0,s.x*s.x+s.y*s.y-1)),sweep:+((e.x-s.x)*(n.y-s.y)-(e.y-s.y)*(n.x-s.x)>0)}}function Jx(e,n,r=1){let i=e=>(e*r).toFixed(2),a=qx(e,n),o=`M${i(e.x)},${i(e.y)}`;return a.kind===`line`||a.radius*r>1e6?`${o} L${i(n.x)},${i(n.y)}`:`${o} A${i(a.radius)},${i(a.radius)} 0 0 ${a.sweep} ${i(n.x)},${i(n.y)}`}function Yx(e){return Math.atan2(Math.sin(e),Math.cos(e))}function Xx(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}function Zx(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Qx(e,n,r){let i=Ux(n);return Vx(Vx(i,Vx(Ux(Mx(r,n)),Hx(i))),e)}function $x(e){let{center:n,rotation:r}=Kx(e),i=Yx(r),a={x:0,y:0};return{settledRotation:i,viewAt:e=>{let r=Xx(Math.min(1,Math.max(0,e)));return Gx(Rx(n,a,r),i)}}}const eS=.5;function tS(e){let n=Math.min(8,Math.max(eS,e.zoom));if(n<=1)return{zoom:n,offset:{x:0,y:0}};let r=n-1,i=Math.hypot(e.offset.x,e.offset.y);return{zoom:n,offset:i>r?{x:e.offset.x*r/i,y:e.offset.y*r/i}:e.offset}}function nS(e,n,r){let i=Math.min(8,Math.max(eS,e.zoom*r)),a=iS(n,e);return tS({zoom:i,offset:{x:n.x-i*a.x,y:n.y-i*a.y}})}function rS(e,n,r){let i=2.1/(Math.min(e.width,e.height)||1);return{x:(n-(e.left+e.width/2))*i,y:(r-(e.top+e.height/2))*i}}function iS(e,n){let r=n.zoom||1;return{x:(e.x-n.offset.x)/r,y:(e.y-n.offset.y)/r}}function aS(e){let n=e.target;return n===e.currentTarget||n?.classList.contains(`disk-boundary`)===!0}function oS(e){let n=new Map,r,i=!1,a,o=n=>{let r=e.svgRect();return r?rS(r,n.clientX,n.clientY):void 0},s=n=>jx(iS(n,e.zoomState()),.98),c=(e,n)=>({x:(e.x+n.x)/2,y:(e.y+n.y)/2}),l=(n,i,a,o)=>{r={pointerId:n,start:s(i),baseView:e.takeView(),downClient:a,armed:o}},u=()=>{let[[i,o],[s,l]]=[...n.entries()];r=void 0;let{zoom:u}=e.zoomState();a={ids:[i,s],startDistance:Math.max(1e-6,Math.hypot(o.x-l.x,o.y-l.y)),startZoom:u,anchor:iS(c(o,l),e.zoomState())}};return{onPointerDown(r){i=!1;let a=aS(r);e.focusTree();let s=o(r);s&&(a&&(r.currentTarget.setPointerCapture?.(r.pointerId),e.onDragStart?.()),n.set(r.pointerId,s),n.size===2&&e.zoomGesturesEnabled()?u():n.size===1&&l(r.pointerId,s,{x:r.clientX,y:r.clientY},a))},onPointerMove(l){if(!n.has(l.pointerId))return;let u=o(l);if(u){if(n.set(l.pointerId,u),a){let r=n.get(a.ids[0]),i=n.get(a.ids[1]);if(!r||!i)return;let o=a.startZoom*Math.hypot(r.x-i.x,r.y-i.y)/a.startDistance,s=c(r,i),l=Math.min(8,Math.max(eS,o));e.setZoomState(tS({zoom:l,offset:{x:s.x-l*a.anchor.x,y:s.y-l*a.anchor.y}}))}else if(r&&r.pointerId===l.pointerId){if(!r.armed){if(Math.hypot(l.clientX-r.downClient.x,l.clientY-r.downClient.y)<4)return;r.armed=!0,i=!0,l.currentTarget.setPointerCapture?.(l.pointerId),e.onDragStart?.()}e.setView(Qx(r.baseView,r.start,s(u)))}}},onPointerUp(e){if(n.delete(e.pointerId)){if(a){a=void 0;let[e]=[...n.entries()];e&&l(e[0],e[1],{x:0,y:0},!0)}else r?.pointerId===e.pointerId&&(r=void 0)}},onWheel(n){let r=n.ctrlKey||n.metaKey;if(!e.zoomGesturesEnabled()||!r&&!e.hasFocus())return;let i=o(n);if(!i)return;n.preventDefault();let a=n.deltaMode===1?n.deltaY*16:n.deltaY,s=Math.exp(-a*(r?.01:.002));e.setZoomState(nS(e.zoomState(),i,s))},isDragging(){return r?.armed===!0},wasDragged(){return i},cancel(){r=void 0,a=void 0,n.clear()}}}const sS=r`
8367
8377
  :host {
8368
8378
  --hyperbolictree-node-color: var(--surface-4);
8369
8379
  --hyperbolictree-node-text: var(--surface-3-text);
@@ -8554,6 +8564,15 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8554
8564
  border-radius: var(--radius-m, 6px);
8555
8565
  box-shadow: var(--shadow-m);
8556
8566
  font-size: var(--hyperbolictree-font-size);
8567
+ /* Beside the node, never over it, with the dot level with the popover's middle. */
8568
+ transform: translate(14px, -50%);
8569
+ }
8570
+
8571
+ .child-preview.left {
8572
+ transform: translate(calc(-100% - 14px), -50%);
8573
+ }
8574
+
8575
+ .child-preview.below {
8557
8576
  transform: translate(-50%, 14px);
8558
8577
  }
8559
8578
 
@@ -8562,13 +8581,26 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8562
8581
  }
8563
8582
 
8564
8583
  .child-preview-title {
8584
+ display: flex;
8585
+ align-items: center;
8586
+ gap: 4px;
8565
8587
  padding: 2px 6px 4px;
8566
8588
  font-weight: 600;
8589
+ }
8590
+
8591
+ .child-preview-title span {
8567
8592
  overflow: hidden;
8568
8593
  text-overflow: ellipsis;
8569
8594
  white-space: nowrap;
8570
8595
  }
8571
8596
 
8597
+ .child-preview button.child-preview-up {
8598
+ display: inline-flex;
8599
+ flex: none;
8600
+ width: auto;
8601
+ padding: 2px;
8602
+ }
8603
+
8572
8604
  .child-preview ul {
8573
8605
  margin: 0;
8574
8606
  padding: 0;
@@ -8600,7 +8632,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8600
8632
  padding: 2px 6px;
8601
8633
  color: var(--surface-muted-text);
8602
8634
  }
8603
- `;function oS(e,n){let r=new Map;return n.map(n=>{let i=n.item.key,a=r.get(i)??0;return r.set(i,a+1),`${e}${a===0?i:`${i}#${a}`}`})}function sS(e){return e.split(``).length-1}function cS(e){let n=e.split(``);return n.length<2?void 0:`${n[0]}${n[1]}`}function lS(e,n){return e.startsWith(`${n}`)}function uS(e,n){if(!e)return;let r=(e,i)=>{if(i===n)return[e];if(!lS(n,i))return;let a=e.children??[],o=oS(i,a);for(let n=0;n<a.length;n++){let i=r(a[n],o[n]);if(i)return[e,...i]}};return r(e,e.item.key)}function dS(e,n){if(!e)return;let r=(e,i)=>{if(e===n)return i;let a=e.children??[],o=oS(i,a);for(let e=0;e<a.length;e++){let n=r(a[e],o[e]);if(n!==void 0)return n}};return r(e,e.item.key)}function fS(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;let a=i.children?.length?fS(i.children,n,e):void 0;if(a)return a}}function pS(e,n){if(e){if(e.item.key===n)return e;for(let r of e.children??[]){let e=pS(r,n);if(e)return e}}}function mS(e,n){if(e){if(e.item.key===n)return[e];for(let r of e.children??[]){let i=mS(r,n);if(i)return[e,...i]}}}function hS(e,n){if(n<=0)return 1;let r=e.children??[];if(r.length===0)return 1;let i=1;for(let e of r)i+=hS(e,n-1);return i}function gS(e,n){let r=Ax({x:Math.cos(e),y:Math.sin(e)},n);return Math.atan2(r.y,r.x)}function _S(e){let n=0;for(let r=0;r<e.length;r++)n=Math.imul(n,31)+e.charCodeAt(r)|0;return(n>>>0)%1e3/1e3*2-1}const vS=.5;function yS(e,n,r){if(n<=0)return r;let i=Math.min(e,Math.PI)/2,a=Math.asinh(Math.sinh(n/2)/Math.max(Math.sin(i),1e-6));return Math.min(Math.max(r,a),r+6)}function bS(e,n=24,r=1,i=vS){let a=new Map;if(!e)return a;let o={x:0,y:0};a.set(e.item.key,{node:e,id:e.item.key,depth:0,parentKey:void 0,parentId:void 0,position:o,toParent:Lx,angularShare:2*Math.PI});let s=(e,c,l,u,d,f)=>{if(f>=n)return;let p=e.children??[],m=p.length;if(m===0)return;let h=d-u,g=p.map(e=>Math.sqrt(hS(e,n-f-1))),_=g.reduce((e,n)=>e+n,0),v=oS(c,p),y=u;p.forEach((n,u)=>{let d=m===1?h:h*g[u]/_,p=y+d/2;y+=d;let b=p+(m===1?_S(n.item.key)*Math.min(.22,d*.4):0),x=Nx(m===1?r:yS(d,i,r)),S={x:x*Math.cos(b),y:x*Math.sin(b)},ee=Vx(S),C=zx(l,ee);a.set(v[u],{node:n,id:v[u],depth:f+1,parentKey:e.item.key,parentId:c,position:Rx(C,o),toParent:ee,angularShare:d});let te=Math.min(d,Math.PI)/2,ne=gS(p-te,S),re=gS(p+te,S)-ne;re<=0&&(re+=2*Math.PI),s(n,v[u],C,ne,ne+re,f+1)})};return s(e,e.item.key,Lx,-Math.PI,Math.PI,0),a}function xS(e,n,r){let i=new Map;if(!e.has(n))return i;i.set(n,{ring:0,frame:Lx});let a=[n];for(let n=1;n<=r&&a.length>0;n++){let r=[];for(let o of a){let a=e.get(o),{frame:s}=i.get(o),c=(a,o)=>{i.has(a)||!e.has(a)||(i.set(a,{ring:n,frame:o()}),r.push(a))};for(let n of oS(o,a.node.children??[]))c(n,()=>zx(s,e.get(n).toParent));a.parentId!==void 0&&c(a.parentId,()=>zx(s,Bx(a.toParent)))}a=r}return i}function SS(e,n,r){let i=Lx;for(let a=n;a!==void 0&&a!==r;a=e.get(a)?.parentId)i=zx(e.get(a).toParent,i);return i}function CS(e,n,r){if(!e.has(n)||!e.has(r))return;let i=new Set;for(let r=n;r!==void 0;r=e.get(r)?.parentId)i.add(r);let a=r;for(;a!==void 0&&!i.has(a);)a=e.get(a)?.parentId;if(a!==void 0)return zx(Bx(SS(e,n,a)),SS(e,r,a))}function wS(e,n){if(n!==void 0){if(e.has(n))return n;for(let r of e.values())if(r.node.item.key===n)return r.id}}function TS(e,n={}){if(!e)return{nodes:[],edges:[]};let{maxRadius:r=1/0,maxDepth:i=24,curvature:a=1,siblingSpacing:o=vS}=n,s=bS(e,i,a,o),c=wS(s,n.focusedKey)??e.item.key;if(!s.has(c))return{nodes:[],edges:[]};let l=n.view??Ux(n.centerOverride??{x:0,y:0}),u=xS(s,c,r),d=[...u.keys()].map(e=>s.get(e).node.item.weight).filter(e=>typeof e==`number`),f=d.length>0?Math.min(...d):void 0,p=d.length>0?Math.max(...d):void 0,m=e=>e===void 0||f===void 0||p===void 0||p===f?.5:(e-f)/(p-f),h=[...u.entries()].map(([e,{ring:n,frame:r}])=>{let i=s.get(e),a=i.node.item.weight;return{node:i.node,key:i.node.item.key,id:e,depth:i.depth,ring:n,parentKey:i.parentKey,parentId:i.parentId,position:Rx(zx(l,r),{x:0,y:0}),angularShare:i.angularShare,weight:a,weightNormalized:m(a)}}).sort((e,n)=>e.ring-n.ring),g=new Map(h.map(e=>[e.id,e])),_=[];for(let e of h){if(e.parentId===void 0)continue;let n=g.get(e.parentId);n&&_.push({fromKey:n.key,toKey:e.key,fromId:n.id,toId:e.id,from:n.position,to:e.position,weightNormalized:(n.weightNormalized+e.weightNormalized)/2})}return{nodes:h,edges:_}}const ES={action:{kind:`none`},handled:!1};function DS(e){let n=Math.atan2(e.position.y,e.position.x),r=Math.abs(n- -Math.PI/2);return r>Math.PI&&(r=2*Math.PI-r),r}function OS(e,n,r,i){let a=uS(n,r),o=a?.at(-1);if(!a||!o)return ES;let s=a.length>=2?a[a.length-2]:void 0,c={action:{kind:`none`},handled:!0},l=e=>e?{action:{kind:`focus`,node:e},handled:!0}:c;switch(e){case`ArrowUp`:{let e=i.filter(e=>e.parentId===r);return e.length===0?c:l(e.reduce((e,n)=>DS(e)<DS(n)?e:n).node)}case`ArrowDown`:return l(s);case`ArrowLeft`:case`ArrowRight`:{let n=s?.children??[],r=n.indexOf(o);return r===-1||n.length<=1?c:l(n[(r+(e===`ArrowRight`?1:-1)+n.length)%n.length])}case`Enter`:return{action:{kind:`activate`,node:o,depth:a.length-1},handled:!0};case`Escape`:return o===n?ES:l(n);default:return ES}}function kS(e,n){let r=new Set,i=new Map,a=async(n,r,i)=>{let{model:a,loadChildren:o}=e();return a?a.getChildren(n,r,i):[...await dg(o({node:n,depth:r},i),i)]},o=async(e,o)=>{r.add(e);let s=new AbortController;i.set(e,s),n();try{let n=await a(e,o,s.signal);s.signal.aborted||(e.children=n)}catch{s.signal.aborted||(e.children=[])}finally{r.delete(e),i.delete(e),s.signal.aborted||n()}};return{ensure(n){let{model:i,loadChildren:a}=e();if(!(!i&&!a))for(let{node:e,depth:i}of n)e.children===void 0&&!r.has(e)&&o(e,i)},isPending:e=>r.has(e),abortAll(){for(let e of i.values())e.abort();i.clear(),r.clear()}}}function AS(e){return Math.max(0,1-(e.x*e.x+e.y*e.y))}function jS(e){let n=new Map;for(let r of e)n.set(r.id,1/0);for(let r=0;r<e.length;r++){let i=e[r].position;for(let a=r+1;a<e.length;a++){let o=e[a].position,s=Math.hypot(i.x-o.x,i.y-o.y);s<n.get(e[r].id)&&n.set(e[r].id,s),s<n.get(e[a].id)&&n.set(e[a].id,s)}}return n}function MS(e,n){return n.minWeightScale+(n.maxWeightScale-n.minWeightScale)*e.weightNormalized}function NS(e,n,r){let i=r.nodeRadius*AS(e.position)*MS(e,r);return Math.max(Math.min(i,n*.45),.003)}function PS(e,n,r,i,a=0){let o=Math.cos(a),s=Math.sin(a),c=(e,r)=>({x:n.x+e*o-r*s,y:n.y+e*s+r*o});return{id:e,corners:[c(-r,-i),c(r,-i),c(r,i),c(-r,i)]}}function FS(e){let n=0;for(let r=0;r<e.length;r++){let i=e[r],a=e[(r+1)%e.length];n+=i.x*a.y-a.x*i.y}return Math.abs(n)/2}function IS(e,n){let r=Math.sign((n[1].x-n[0].x)*(n[2].y-n[0].y)-(n[1].y-n[0].y)*(n[2].x-n[0].x))||1,i=[...e];for(let e=0;e<n.length&&i.length>0;e++){let a=n[e],o=n[(e+1)%n.length],s=e=>r*((o.x-a.x)*(e.y-a.y)-(o.y-a.y)*(e.x-a.x)),c=i;i=[];for(let e=0;e<c.length;e++){let n=c[e],r=c[(e+c.length-1)%c.length],a=s(n),o=s(r);if(a>=0!=o>=0){let e=o/(o-a);i.push({x:r.x+(n.x-r.x)*e,y:r.y+(n.y-r.y)*e})}a>=0&&i.push(n)}}return i}function LS(e){let n=e.map(e=>e.x),r=e.map(e=>e.y);return{x0:Math.min(...n),y0:Math.min(...r),x1:Math.max(...n),y1:Math.max(...r)}}function RS(e,n){let r=LS(e.corners),i=LS(n.corners);if(r.x1<=i.x0||i.x1<=r.x0||r.y1<=i.y0||i.y1<=r.y0)return 0;let a=FS(e.corners);return a<=0?1:FS(IS(e.corners,n.corners))/a}function zS(e,n=.03){let r=[];for(let i of e)r.every(e=>RS(i,e)<=n)&&r.push(i);return new Set(r.map(e=>e.id))}function BS(e,n){return n<=0||e.length<=n?e:`${e.slice(0,Math.max(1,n-1)).trimEnd()}…`}let VS;const HS=new Map;function US(e,n,r){let i=`${r}\u0000${e}`,a=HS.get(i);if(a===void 0){if(VS===void 0)try{VS=typeof document>`u`?null:document.createElement(`canvas`).getContext(`2d`)}catch{VS=null}let n;if(VS){VS.font=`100px ${r||`sans-serif`}`;let i=VS.measureText(e).width;Number.isFinite(i)&&i>0&&(n=i/100)}a=n??e.length*.6,HS.set(i,a)}return a*n}function WS(e,n){let r=.45+.55*AS(e.position),i=Math.min(1,r*(n.zoom??1))*Math.sqrt(MS(e,n)),a=BS(e.node.item.label,n.maxChars),o=n.fontSize*.5,s=n.fontSize*1.55;return{scale:i,width:US(a,n.fontSize,n.fontFamily)+o*2,height:s,markerSize:n.fontSize*.55,text:a}}function GS(e,n,r,i=0){return PS(e,n,r.width*r.scale/2,r.height*r.scale/2,i)}const KS={direction:0,textAngle:0,flipped:!1};function qS(e,n,r){let i=typeof getComputedStyle==`function`?getComputedStyle(e):void 0,a=Number.parseFloat(i?.getPropertyValue(`--hyperbolictree-font-size`)??``),o=Number.isFinite(a)&&a>0?a:13;return{px:o,units:o*(1050/(n>0?n:420)/(r||1)),family:i?.fontFamily??``}}function JS(e){return e?new Map(oS(e.item.key,e.children??[]).map((e,n)=>[e,n])):new Map}function YS(e,n){let r=cS(e),i=r===void 0?void 0:n.get(r);return i===void 0?``:` --branch-index: ${i}; --branch-count: ${n.size};`}function XS(e){let n=new Map;for(let r of e){let e=n.get(r.parentId)??[];e.push(r),n.set(r.parentId,e)}return n}function ZS(e,n,r){let i=e=>e.ring===0?0:r(e.node)?1:2;return[...e].sort((e,r)=>i(e)-i(r)||n(r)-n(e)||e.ring-r.ring)}function QS(e,n){let r=new Map;if(!n){for(let n of e)r.set(n.id,KS);return r}let i=new Map(e.map(e=>[e.id,e])),a=new Map;for(let n of e){let e=n.parentId===void 0?void 0:i.get(n.parentId);e&&(e.ring<n.ring?a.set(n.id,e):n.ring<e.ring&&a.set(e.id,n))}for(let n of e){let e=a.get(n.id);if(!e||n.ring===0){r.set(n.id,KS);continue}let i=Math.atan2(n.position.y-e.position.y,n.position.x-e.position.x),o=Math.cos(i)<0;r.set(n.id,{direction:i,textAngle:o?i+Math.PI:i,flipped:o})}return r}const $S=e=>({x:e.position.x*500,y:e.position.y*500});function eC(e,n,r){let{font:i}=n,a=new Map(e.map(e=>[e.id,WS(e,{fontSize:i.units,fontFamily:i.family,maxChars:n.boxMaxChars,minWeightScale:n.minWeightScale,maxWeightScale:n.maxWeightScale,zoom:n.zoom})]));return{boxes:a,labelIds:zS(ZS(e.filter(e=>!n.isTickled(e.id)&&i.px*a.get(e.id).scale>=n.minLabelSize),e=>a.get(e.id).scale,n.isSelected).map(e=>GS(e.id,$S(e),a.get(e.id),r.get(e.id).textAngle)))}}function tC(e,n,r){let{font:i}=n,a=jS(e),o=new Map(e.map(e=>[e.id,NS(e,a.get(e.id),n)]));return{radii:o,labelIds:zS(ZS(e.filter(e=>!n.isTickled(e.id)&&o.get(e.id)*n.zoom>=n.minNodeRadius),e=>o.get(e.id),n.isSelected).map(e=>{let{direction:n}=r.get(e.id),a=US(e.node.item.label,i.units,i.family)/2,s=(o.get(e.id)+.01)*500+a,c=$S(e),l={x:c.x+Math.cos(n)*s,y:c.y+Math.sin(n)*s};return PS(e.id,l,a+i.units*.6,i.units*.6,n)}))}}function nC(e,n){let r=QS(e,n.radialLabels),i=n.nodeShape===`box`?{...eC(e,n,r),radii:new Map}:{...tC(e,n,r),boxes:new Map},a=new Set(i.labelIds);for(let r of e)n.isTickled(r.id)&&a.add(r.id);return{siblingGroups:XS(e),font:n.font,branches:n.branches,boxes:i.boxes,radii:i.radii,labelIds:a,orientations:r}}function rC(e,n,r){let i=e=>r(e.id)?2:+!!n.labelIds.has(e.id),a=e=>e.position.x**2+e.position.y**2;return[...e].sort((e,n)=>i(e)-i(n)||a(n)-a(e))}function iC(e){return e.replace(/[^\w-]/g,`-`)}const aC=e=>e.preventDefault();function oC(e,n,r,i){let{node:o,key:c,id:l}=e,{ctx:u,state:d,handlers:f}=n,p=d.isSelected(o),m=[`node`,p?`selected`:``,d.isTickled(l)?`tickled`:``,d.isFiltered(e)?`filtered`:``,d.isPending(o)?`loading`:``,e.ring===0?`focused`:``].filter(Boolean).join(` `),h=u.siblingGroups.get(e.parentId)??[e],g=`--node-weight: ${e.weightNormalized};${e.weight===void 0?``:` --node-weight-raw: ${e.weight};`}`;return s`
8635
+ `;function cS(e,n){let r=new Map;return n.map(n=>{let i=n.item.key,a=r.get(i)??0;return r.set(i,a+1),`${e}${a===0?i:`${i}#${a}`}`})}function lS(e){return e.split(``).length-1}function uS(e){let n=e.split(``);return n.length<2?void 0:`${n[0]}${n[1]}`}function dS(e,n){return e.startsWith(`${n}`)}function fS(e,n){if(!e)return;let r=(e,i)=>{if(i===n)return[e];if(!dS(n,i))return;let a=e.children??[],o=cS(i,a);for(let n=0;n<a.length;n++){let i=r(a[n],o[n]);if(i)return[e,...i]}};return r(e,e.item.key)}function pS(e,n){if(!e)return;let r=(e,i)=>{if(e===n)return i;let a=e.children??[],o=cS(i,a);for(let e=0;e<a.length;e++){let n=r(a[e],o[e]);if(n!==void 0)return n}};return r(e,e.item.key)}function mS(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;let a=i.children?.length?mS(i.children,n,e):void 0;if(a)return a}}function hS(e,n){if(e){if(e.item.key===n)return e;for(let r of e.children??[]){let e=hS(r,n);if(e)return e}}}function gS(e,n){if(e){if(e.item.key===n)return[e];for(let r of e.children??[]){let i=gS(r,n);if(i)return[e,...i]}}}function _S(e,n){if(n<=0)return 1;let r=e.children??[];if(r.length===0)return 1;let i=1;for(let e of r)i+=_S(e,n-1);return i}function vS(e,n){let r=Mx({x:Math.cos(e),y:Math.sin(e)},n);return Math.atan2(r.y,r.x)}function yS(e){let n=0;for(let r=0;r<e.length;r++)n=Math.imul(n,31)+e.charCodeAt(r)|0;return(n>>>0)%1e3/1e3*2-1}const bS=.5;function xS(e,n,r){if(n<=0)return r;let i=Math.min(e,Math.PI)/2,a=Math.asinh(Math.sinh(n/2)/Math.max(Math.sin(i),1e-6));return Math.min(Math.max(r,a),r+6)}function SS(e,n=24,r=1,i=bS){let a=new Map;if(!e)return a;let o={x:0,y:0};a.set(e.item.key,{node:e,id:e.item.key,depth:0,parentKey:void 0,parentId:void 0,position:o,toParent:zx,angularShare:2*Math.PI});let s=(e,c,l,u,d,f)=>{if(f>=n)return;let p=e.children??[],m=p.length;if(m===0)return;let h=d-u,g=p.map(e=>Math.sqrt(_S(e,n-f-1))),_=g.reduce((e,n)=>e+n,0),v=cS(c,p),y=u;p.forEach((n,u)=>{let d=m===1?h:h*g[u]/_,p=y+d/2;y+=d;let b=p+(m===1?yS(n.item.key)*Math.min(.22,d*.4):0),x=Fx(m===1?r:xS(d,i,r)),S={x:x*Math.cos(b),y:x*Math.sin(b)},ee=Ux(S),C=Vx(l,ee);a.set(v[u],{node:n,id:v[u],depth:f+1,parentKey:e.item.key,parentId:c,position:Bx(C,o),toParent:ee,angularShare:d});let te=Math.min(d,Math.PI)/2,ne=vS(p-te,S),re=vS(p+te,S)-ne;re<=0&&(re+=2*Math.PI),s(n,v[u],C,ne,ne+re,f+1)})};return s(e,e.item.key,zx,-Math.PI,Math.PI,0),a}function CS(e,n,r){let i=new Map;if(!e.has(n))return i;i.set(n,{ring:0,frame:zx});let a=[n];for(let n=1;n<=r&&a.length>0;n++){let r=[];for(let o of a){let a=e.get(o),{frame:s}=i.get(o),c=(a,o)=>{i.has(a)||!e.has(a)||(i.set(a,{ring:n,frame:o()}),r.push(a))};for(let n of cS(o,a.node.children??[]))c(n,()=>Vx(s,e.get(n).toParent));a.parentId!==void 0&&c(a.parentId,()=>Vx(s,Hx(a.toParent)))}a=r}return i}function wS(e,n,r){let i=zx;for(let a=n;a!==void 0&&a!==r;a=e.get(a)?.parentId)i=Vx(e.get(a).toParent,i);return i}function TS(e,n,r){if(!e.has(n)||!e.has(r))return;let i=new Set;for(let r=n;r!==void 0;r=e.get(r)?.parentId)i.add(r);let a=r;for(;a!==void 0&&!i.has(a);)a=e.get(a)?.parentId;if(a!==void 0)return Vx(Hx(wS(e,n,a)),wS(e,r,a))}function ES(e,n){if(n!==void 0){if(e.has(n))return n;for(let r of e.values())if(r.node.item.key===n)return r.id}}function DS(e,n={}){if(!e)return{nodes:[],edges:[]};let{maxRadius:r=1/0,maxDepth:i=24,curvature:a=1,siblingSpacing:o=bS}=n,s=SS(e,i,a,o),c=ES(s,n.focusedKey)??e.item.key;if(!s.has(c))return{nodes:[],edges:[]};let l=n.view??Gx(n.centerOverride??{x:0,y:0}),u=CS(s,c,r),d=[...u.keys()].map(e=>s.get(e).node.item.weight).filter(e=>typeof e==`number`),f=d.length>0?Math.min(...d):void 0,p=d.length>0?Math.max(...d):void 0,m=e=>e===void 0||f===void 0||p===void 0||p===f?.5:(e-f)/(p-f),h=[...u.entries()].map(([e,{ring:n,frame:r}])=>{let i=s.get(e),a=i.node.item.weight;return{node:i.node,key:i.node.item.key,id:e,depth:i.depth,ring:n,parentKey:i.parentKey,parentId:i.parentId,position:Bx(Vx(l,r),{x:0,y:0}),angularShare:i.angularShare,weight:a,weightNormalized:m(a)}}).sort((e,n)=>e.ring-n.ring),g=new Map(h.map(e=>[e.id,e])),_=[];for(let e of h){if(e.parentId===void 0)continue;let n=g.get(e.parentId);n&&_.push({fromKey:n.key,toKey:e.key,fromId:n.id,toId:e.id,from:n.position,to:e.position,weightNormalized:(n.weightNormalized+e.weightNormalized)/2})}return{nodes:h,edges:_}}const OS={action:{kind:`none`},handled:!1};function kS(e){let n=Math.atan2(e.position.y,e.position.x),r=Math.abs(n- -Math.PI/2);return r>Math.PI&&(r=2*Math.PI-r),r}function AS(e,n,r,i){let a=fS(n,r),o=a?.at(-1);if(!a||!o)return OS;let s=a.length>=2?a[a.length-2]:void 0,c={action:{kind:`none`},handled:!0},l=e=>e?{action:{kind:`focus`,node:e},handled:!0}:c;switch(e){case`ArrowUp`:{let e=i.filter(e=>e.parentId===r);return e.length===0?c:l(e.reduce((e,n)=>kS(e)<kS(n)?e:n).node)}case`ArrowDown`:return l(s);case`ArrowLeft`:case`ArrowRight`:{let n=s?.children??[],r=n.indexOf(o);return r===-1||n.length<=1?c:l(n[(r+(e===`ArrowRight`?1:-1)+n.length)%n.length])}case`Enter`:return{action:{kind:`activate`,node:o,depth:a.length-1},handled:!0};case`Escape`:return o===n?OS:l(n);default:return OS}}function jS(e,n){let r=new Set,i=new Map,a=async(n,r,i)=>{let{model:a,loadChildren:o}=e();return a?a.getChildren(n,r,i):[...await dg(o({node:n,depth:r},i),i)]},o=async(e,o)=>{r.add(e);let s=new AbortController;i.set(e,s),n();try{let n=await a(e,o,s.signal);s.signal.aborted||(e.children=n)}catch{s.signal.aborted||(e.children=[])}finally{r.delete(e),i.delete(e),s.signal.aborted||n()}};return{ensure(n){let{model:i,loadChildren:a}=e();if(!(!i&&!a))for(let{node:e,depth:i}of n)e.children===void 0&&!r.has(e)&&o(e,i)},isPending:e=>r.has(e),abortAll(){for(let e of i.values())e.abort();i.clear(),r.clear()}}}function MS(e){return Math.max(0,1-(e.x*e.x+e.y*e.y))}function NS(e){let n=new Map;for(let r of e)n.set(r.id,1/0);for(let r=0;r<e.length;r++){let i=e[r].position;for(let a=r+1;a<e.length;a++){let o=e[a].position,s=Math.hypot(i.x-o.x,i.y-o.y);s<n.get(e[r].id)&&n.set(e[r].id,s),s<n.get(e[a].id)&&n.set(e[a].id,s)}}return n}function PS(e,n){return n.minWeightScale+(n.maxWeightScale-n.minWeightScale)*e.weightNormalized}function FS(e,n,r){let i=r.nodeRadius*MS(e.position)*PS(e,r);return Math.max(Math.min(i,n*.45),.003)}function IS(e,n,r,i,a=0){let o=Math.cos(a),s=Math.sin(a),c=(e,r)=>({x:n.x+e*o-r*s,y:n.y+e*s+r*o});return{id:e,corners:[c(-r,-i),c(r,-i),c(r,i),c(-r,i)]}}function LS(e){let n=0;for(let r=0;r<e.length;r++){let i=e[r],a=e[(r+1)%e.length];n+=i.x*a.y-a.x*i.y}return Math.abs(n)/2}function RS(e,n){let r=Math.sign((n[1].x-n[0].x)*(n[2].y-n[0].y)-(n[1].y-n[0].y)*(n[2].x-n[0].x))||1,i=[...e];for(let e=0;e<n.length&&i.length>0;e++){let a=n[e],o=n[(e+1)%n.length],s=e=>r*((o.x-a.x)*(e.y-a.y)-(o.y-a.y)*(e.x-a.x)),c=i;i=[];for(let e=0;e<c.length;e++){let n=c[e],r=c[(e+c.length-1)%c.length],a=s(n),o=s(r);if(a>=0!=o>=0){let e=o/(o-a);i.push({x:r.x+(n.x-r.x)*e,y:r.y+(n.y-r.y)*e})}a>=0&&i.push(n)}}return i}function zS(e){let n=e.map(e=>e.x),r=e.map(e=>e.y);return{x0:Math.min(...n),y0:Math.min(...r),x1:Math.max(...n),y1:Math.max(...r)}}function BS(e,n){let r=zS(e.corners),i=zS(n.corners);if(r.x1<=i.x0||i.x1<=r.x0||r.y1<=i.y0||i.y1<=r.y0)return 0;let a=LS(e.corners);return a<=0?1:LS(RS(e.corners,n.corners))/a}function VS(e,n=.03){let r=[];for(let i of e)r.every(e=>BS(i,e)<=n)&&r.push(i);return new Set(r.map(e=>e.id))}function HS(e,n){return n<=0||e.length<=n?e:`${e.slice(0,Math.max(1,n-1)).trimEnd()}…`}let US;const WS=new Map;function GS(e,n,r){let i=`${r}\u0000${e}`,a=WS.get(i);if(a===void 0){if(US===void 0)try{US=typeof document>`u`?null:document.createElement(`canvas`).getContext(`2d`)}catch{US=null}let n;if(US){US.font=`100px ${r||`sans-serif`}`;let i=US.measureText(e).width;Number.isFinite(i)&&i>0&&(n=i/100)}a=n??e.length*.6,WS.set(i,a)}return a*n}function KS(e,n){let r=.45+.55*MS(e.position),i=Math.min(1,r*(n.zoom??1))*Math.sqrt(PS(e,n)),a=HS(e.node.item.label,n.maxChars),o=n.fontSize*.5,s=n.fontSize*1.55;return{scale:i,width:GS(a,n.fontSize,n.fontFamily)+o*2,height:s,markerSize:n.fontSize*.55,text:a}}function qS(e,n,r,i=0){return IS(e,n,r.width*r.scale/2,r.height*r.scale/2,i)}const JS={direction:0,textAngle:0,flipped:!1};function YS(e,n,r){let i=typeof getComputedStyle==`function`?getComputedStyle(e):void 0,a=Number.parseFloat(i?.getPropertyValue(`--hyperbolictree-font-size`)??``),o=Number.isFinite(a)&&a>0?a:13;return{px:o,units:o*(1050/(n>0?n:420)/(r||1)),family:i?.fontFamily??``}}function XS(e){return e?new Map(cS(e.item.key,e.children??[]).map((e,n)=>[e,n])):new Map}function ZS(e,n){let r=uS(e),i=r===void 0?void 0:n.get(r);return i===void 0?``:` --branch-index: ${i}; --branch-count: ${n.size};`}function QS(e){let n=new Map;for(let r of e){let e=n.get(r.parentId)??[];e.push(r),n.set(r.parentId,e)}return n}function $S(e,n,r){let i=e=>e.ring===0?0:r(e.node)?1:2;return[...e].sort((e,r)=>i(e)-i(r)||n(r)-n(e)||e.ring-r.ring)}function eC(e,n){let r=new Map;if(!n){for(let n of e)r.set(n.id,JS);return r}let i=new Map(e.map(e=>[e.id,e])),a=new Map;for(let n of e){let e=n.parentId===void 0?void 0:i.get(n.parentId);e&&(e.ring<n.ring?a.set(n.id,e):n.ring<e.ring&&a.set(e.id,n))}for(let n of e){let e=a.get(n.id);if(!e||n.ring===0){r.set(n.id,JS);continue}let i=Math.atan2(n.position.y-e.position.y,n.position.x-e.position.x),o=Math.cos(i)<0;r.set(n.id,{direction:i,textAngle:o?i+Math.PI:i,flipped:o})}return r}const tC=e=>({x:e.position.x*500,y:e.position.y*500});function nC(e,n,r){let{font:i}=n,a=new Map(e.map(e=>[e.id,KS(e,{fontSize:i.units,fontFamily:i.family,maxChars:n.boxMaxChars,minWeightScale:n.minWeightScale,maxWeightScale:n.maxWeightScale,zoom:n.zoom})]));return{boxes:a,labelIds:VS($S(e.filter(e=>!n.isTickled(e.id)&&i.px*a.get(e.id).scale>=n.minLabelSize),e=>a.get(e.id).scale,n.isSelected).map(e=>qS(e.id,tC(e),a.get(e.id),r.get(e.id).textAngle)))}}function rC(e,n,r){let{font:i}=n,a=NS(e),o=new Map(e.map(e=>[e.id,FS(e,a.get(e.id),n)]));return{radii:o,labelIds:VS($S(e.filter(e=>!n.isTickled(e.id)&&o.get(e.id)*n.zoom>=n.minNodeRadius),e=>o.get(e.id),n.isSelected).map(e=>{let{direction:n}=r.get(e.id),a=GS(e.node.item.label,i.units,i.family)/2,s=(o.get(e.id)+.01)*500+a,c=tC(e),l={x:c.x+Math.cos(n)*s,y:c.y+Math.sin(n)*s};return IS(e.id,l,a+i.units*.6,i.units*.6,n)}))}}function iC(e,n){let r=eC(e,n.radialLabels),i=n.nodeShape===`box`?{...nC(e,n,r),radii:new Map}:{...rC(e,n,r),boxes:new Map},a=new Set(i.labelIds);for(let r of e)n.isTickled(r.id)&&a.add(r.id);return{siblingGroups:QS(e),font:n.font,branches:n.branches,boxes:i.boxes,radii:i.radii,labelIds:a,orientations:r}}function aC(e,n,r){let i=e=>r(e.id)?2:+!!n.labelIds.has(e.id),a=e=>e.position.x**2+e.position.y**2;return[...e].sort((e,n)=>i(e)-i(n)||a(n)-a(e))}function oC(e){return e.replace(/[^\w-]/g,`-`)}const sC=e=>e.preventDefault();function cC(e,n,r,i){let{node:o,key:c,id:l}=e,{ctx:u,state:d,handlers:f}=n,p=d.isSelected(o),m=[`node`,p?`selected`:``,d.isTickled(l)?`tickled`:``,d.isFiltered(e)?`filtered`:``,d.isPending(o)?`loading`:``,e.ring===0?`focused`:``].filter(Boolean).join(` `),h=u.siblingGroups.get(e.parentId)??[e],g=`--node-weight: ${e.weightNormalized};${e.weight===void 0?``:` --node-weight-raw: ${e.weight};`}`;return s`
8604
8636
  <g
8605
8637
  class=${m}
8606
8638
  data-key=${c}
@@ -8611,29 +8643,28 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8611
8643
  aria-setsize=${h.length}
8612
8644
  aria-posinset=${h.findIndex(e=>e.id===l)+1}
8613
8645
  aria-label=${o.item.label}
8614
- part="node node-${iC(c)}"
8615
- style=${g+YS(l,u.branches)}
8646
+ part="node node-${oC(c)}"
8647
+ style=${g+ZS(l,u.branches)}
8616
8648
  transform=${r}
8617
- @pointerdown=${f.onPointerDown}
8618
- @mousedown=${aC}
8649
+ @mousedown=${sC}
8619
8650
  @click=${n=>f.onClick(e,n)}
8620
8651
  @dblclick=${n=>f.onDblClick(e,n)}
8621
8652
  @pointerenter=${()=>f.onPointerEnter(l)}
8622
8653
  >${d.showTitle(e)?s`<title>${o.item.label}</title>`:a}${i}</g>
8623
- `}const sC=e=>e*180/Math.PI;function cC(e,n,r){let{textAngle:i,flipped:o}=n.orientations.get(e.id),c=r+5;return s`<text
8654
+ `}const lC=e=>e*180/Math.PI;function uC(e,n,r){let{textAngle:i,flipped:o}=n.orientations.get(e.id),c=r+5;return s`<text
8624
8655
  class="hyperbolictree-label"
8625
8656
  part="label"
8626
8657
  x=${o?-c:c}
8627
8658
  y="0"
8628
- transform=${i===0?a:`rotate(${sC(i)})`}
8659
+ transform=${i===0?a:`rotate(${lC(i)})`}
8629
8660
  text-anchor=${o?`end`:`start`}
8630
8661
  font-size=${n.font.units}
8631
8662
  dominant-baseline="middle"
8632
- >${e.node.item.label}</text>`}function lC(e,n){let{ctx:r}=n,i=r.radii.get(e.id)*500;return oC(e,n,`translate(${e.position.x*500} ${e.position.y*500})`,s`
8663
+ >${e.node.item.label}</text>`}function dC(e,n){let{ctx:r}=n,i=r.radii.get(e.id)*500;return cC(e,n,`translate(${e.position.x*500} ${e.position.y*500})`,s`
8633
8664
  <circle class="node-hit" r=${Math.max(i,17.5)} part="hit" />
8634
8665
  <circle class="node-dot" r=${i} part="dot" />
8635
- ${r.labelIds.has(e.id)?cC(e,r,i):a}
8636
- `)}function uC(e,n){let{ctx:r}=n,i=r.boxes.get(e.id),o=r.labelIds.has(e.id),c=o?i.width:i.markerSize,l=o?i.height:i.markerSize,{textAngle:u}=r.orientations.get(e.id),d=o&&u!==0?` rotate(${sC(u)})`:``;return oC(e,n,`translate(${e.position.x*500} ${e.position.y*500})${d} scale(${i.scale})`,s`
8666
+ ${r.labelIds.has(e.id)?uC(e,r,i):a}
8667
+ `)}function fC(e,n){let{ctx:r}=n,i=r.boxes.get(e.id),o=r.labelIds.has(e.id),c=o?i.width:i.markerSize,l=o?i.height:i.markerSize,{textAngle:u}=r.orientations.get(e.id),d=o&&u!==0?` rotate(${lC(u)})`:``;return cC(e,n,`translate(${e.position.x*500} ${e.position.y*500})${d} scale(${i.scale})`,s`
8637
8668
  <rect
8638
8669
  class="node-box ${o?``:`marker`}"
8639
8670
  part="box"
@@ -8644,14 +8675,14 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8644
8675
  rx=${r.font.units*.2}
8645
8676
  />
8646
8677
  ${o?s`<text class="hyperbolictree-label box-label" part="label" x="0" y="0" font-size=${r.font.units} text-anchor="middle" dominant-baseline="central">${i.text}</text>`:a}
8647
- `)}function dC(e,n,r){let i=rC(e,r.ctx,r.state.isTickled),a=n===`box`?uC:lC;return _(i,e=>e.id,e=>a(e,r))}function fC(e,n){return s`<path
8678
+ `)}function pC(e,n,r){let i=aC(e,r.ctx,r.state.isTickled),a=n===`box`?fC:dC;return _(i,e=>e.id,e=>a(e,r))}function mC(e,n){return s`<path
8648
8679
  class="edge"
8649
- d=${Kx(e.from,e.to,500)}
8650
- part="edge edge-to-${iC(e.toKey)} edge-from-${iC(e.fromKey)}"
8680
+ d=${Jx(e.from,e.to,500)}
8681
+ part="edge edge-to-${oC(e.toKey)} edge-from-${oC(e.fromKey)}"
8651
8682
  data-from=${e.fromKey}
8652
8683
  data-to=${e.toKey}
8653
- style="--edge-weight: ${e.weightNormalized};${YS(e.toId,n)}"
8654
- />`}function pC(e,n,r,i){return _(e,e=>`${e.fromId}->${e.toId}`,e=>{let a=n.get(e.fromId)?.node,o=n.get(e.toId)?.node;return i&&a&&o?s`<g transform="scale(${500})">${i({edge:e,fromNode:a,toNode:o})}</g>`:fC(e,r)})}let J=class extends n{constructor(...e){super(...e),this.exclusivity=`none`,this.selectionFilter=`all`,this.interactionMode=`standard`,this.maxRadius=4,this.nodeShape=`dot`,this.boxMaxChars=24,this.minLabelSize=9,this.colorByBranch=!1,this.nodeRadius=.05,this.minNodeRadius=.015,this.minWeightScale=.6,this.maxWeightScale=1.6,this.zoom=1,this.disableZoomGestures=!1,this.disableRadialLabels=!1,this.disableChildPreview=!1,this.curvature=1,this.siblingSpacing=vS,this.focusAnimationDuration=400,this._selectedNodes=new Set,this.disableKeyboardNavigation=!1,this.registry=void 0,this._focusId=void 0,this._viewOverride=void 0,this._focusRotation=0,this._zoomOffset={x:0,y:0},this._previewId=void 0,this.#e=bx({candidate:e=>{let n=this.#u().nodes,r=e===void 0||this.disableChildPreview?void 0:n.find(n=>n.id===e);return r&&_x(r,n,this.#n)?r.id:void 0},setPreviewId:e=>{this._previewId=e}}),this.#t=kS(()=>({model:this.model,loadChildren:this.loadChildren}),()=>this.requestUpdate()),this.#n=new Set,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.hyperbolictree-label`,highlightKey:`incr-search-highlight`})}),this.tickled=new ie(this,{getItems:()=>this.#u().nodes.map(e=>({id:e.id,enabled:!0})),onStateChange:()=>{this.setAttribute(`data-input-mode`,this.tickled.inputMode)},onTickle:e=>{if(this.#e.update(e),e===void 0)return;let n=this.#u().nodes.find(n=>n.id===e);n&&this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:n.node,depth:n.depth},bubbles:!0,composed:!0}))}}),this._hostSize={width:0,height:0},this.#c=iS({svgRect:()=>this.renderRoot.querySelector(`svg.hyperbolictree`)?.getBoundingClientRect(),takeView:()=>{let e=this.#f();return this.#x(),this._viewOverride=e,e},setView:e=>{this._viewOverride=e},zoomState:()=>this.#O(),setZoomState:e=>{this.zoom=e.zoom,this._zoomOffset=e.offset},zoomGesturesEnabled:()=>!this.disableZoomGestures,hasFocus:()=>this.renderRoot.activeElement!==null,focusTree:()=>this.#k()})}static{this.shadowRootOptions={...n.shadowRootOptions,delegatesFocus:!0}}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusId===void 0?this.#l:uS(this.#l,this._focusId)?.at(-1)??this.#l}#e;#t;#n;#r;#i;#a;#o;#s;#c;get#l(){return this.model?.root??this.root}#u(){return TS(this.#l,{focusedKey:this._focusId,maxRadius:this.maxRadius,curvature:this.curvature,siblingSpacing:this.siblingSpacing,view:this.#f()})}get#d(){return this.#l?.item.key}#f(){return this._viewOverride??Hx(this._focusRotation)}#p(e,n){let r=bS(this.#l,24,this.curvature,this.siblingSpacing),i=n===void 0?void 0:CS(r,n,e);return i?zx(this.#f(),i):Hx(this._focusRotation)}#m(e){let n=this.#l,r=dS(n,e);if(r!==void 0)return r;let i=pS(n,e.item.key);return i?dS(n,i):void 0}connectedCallback(){super.connectedCallback(),this.setAttribute(`data-input-mode`,`mouse`);let e=this.#i=Jt();e.register({id:`select-all`,label:`Select All`,description:`Select all visible items`,execute:()=>this.selectAll()}),e.register({id:`deselect-all`,label:`Deselect All`,description:`Clear all selection`,execute:()=>this.deselectAll()}),this.registry=e,this.#g(),typeof ResizeObserver==`function`&&(this.#s=new ResizeObserver(([e])=>{let{width:n,height:r}=e.contentRect;this._hostSize={width:n,height:r}}),this.#s.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.#s?.disconnect(),this.#s=void 0,this.#r?.(),this.#r=void 0,this.#e.dispose(),this.#t.abortAll(),this.#o!==void 0&&(cancelAnimationFrame(this.#o),this.#o=void 0),this.#i&&(this.#i.unregister(`select-all`),this.#i.unregister(`deselect-all`),this.#i=void 0,this.registry=void 0)}#h(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#g(){this.#i&&(this.search.setModes(this.#h()),this.#a?.(),this.#a=Lt(this.#i,this.search))}updated(e){e.has(`root`)&&this.root&&this.#_(),e.has(`model`)&&(this.#r?.(),this.#r=void 0,this.model&&(this.#r=this.model._subscribe(e=>{e.type===`root`?(this.#_(),this.requestUpdate()):e.type===`invalidate`&&this.requestUpdate()}),this.#_())),e.has(`interactionMode`)&&this.clearSelection(),e.has(`searchModes`)&&this.#g(),this._focusId!==void 0&&!uS(this.#l,this._focusId)&&(this._focusId=void 0,this._viewOverride=void 0,this._focusRotation=0),this.#t.ensure(this.#u().nodes)}#_(){this.#y(),this.tickled.clearTickled(),this._focusId=void 0,this._viewOverride=void 0,this._focusRotation=0,this._zoomOffset={x:0,y:0},this._previewId=void 0,this.#c.cancel(),this.#o!==void 0&&(cancelAnimationFrame(this.#o),this.#o=void 0)}#v(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf===!0:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#y(){this._selectedNodes.clear(),this.selectedNode=void 0}#b(e){this.dispatchEvent(new CustomEvent(`select`,{detail:{selected:new Set(this._selectedNodes),previous:e},bubbles:!0,composed:!0}))}select(e){if(!this.#v(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#b(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#b(n),this.requestUpdate()}clearSelection(){if(this._selectedNodes.size===0)return;let e=new Set(this._selectedNodes);this.#y(),this.#b(e),this.requestUpdate()}selectAll(){let e=new Set(this._selectedNodes);for(let e of this.#u().nodes)this.#v(e.node)&&this._selectedNodes.add(e.node);this.selectedNode=[...this._selectedNodes].at(-1),this.#b(e),this.requestUpdate()}deselectAll(){let e=new Set(this._selectedNodes);this.#y(),this.#b(e),this.requestUpdate()}selectMany(e){let n=new Set(this._selectedNodes);this._selectedNodes=new Set([...e].filter(e=>this.#v(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#b(n),this.requestUpdate()}focusOn(e){let n=this.#l,r=this.#m(e),i=this._focusId??this.#d;if(r===void 0||i===r)return;let a=uS(n,r)?.at(-1)??e,o=i===void 0?void 0:uS(n,i)?.at(-1),s=this.#p(r,i);this._focusId=r,this.#c.cancel(),this._previewId=void 0,this.#S(s),this.dispatchEvent(new CustomEvent(`focus`,{detail:{node:a,previous:o},bubbles:!0,composed:!0})),o&&i!==void 0&&(lS(r,i)?this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:a,depth:sS(r)},bubbles:!0,composed:!0})):lS(i,r)&&this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:o,depth:sS(i)},bubbles:!0,composed:!0}))),this.requestUpdate()}#x(){this.#o!==void 0&&(cancelAnimationFrame(this.#o),this.#o=void 0)}#S(e){this.#x();let{viewAt:n,settledRotation:r}=Zx(e);this._focusRotation=r;let i=this._zoomOffset;if(this.focusAnimationDuration<=0||Yx()||typeof requestAnimationFrame!=`function`){this._viewOverride=void 0,this._zoomOffset={x:0,y:0};return}let a=performance.now(),o=this.focusAnimationDuration,s=e=>{let r=Math.min(1,(e-a)/o),c=1-Jx(r);this._zoomOffset={x:i.x*c,y:i.y*c},this._viewOverride=r>=1?void 0:n(r),this.#o=r<1?requestAnimationFrame(s):void 0};this.#o=requestAnimationFrame(s)}#C(e){this.focusOn(e);let n=this.#m(e);n!==void 0&&this.tickled.setTickled(n),this.interactionMode===`implicit`&&this.select(e)}navigateTo(e){let n=this.#l;if(!n?.children)return!1;let r=n;for(let n of e){let e=r.children?.find(e=>e.item.key===n);if(!e)return!1;r=e}this.focusOn(r),this.select(r);let i=this.#m(r);return i!==void 0&&this.tickled.setTickled(i),this.requestUpdate(),!0}navigateToNode(e){let n=this.#l;if(!n?.children)return!1;let r=fS(n.children,e);return r?this.navigateTo(r):!1}revealKey(e){let n=pS(this.#l,e),r=n?this.#m(n):void 0;return!n||r===void 0?!1:(this.#u().nodes.some(e=>e.id===r)||this.focusOn(n),this.tickled.setTickled(r),this.requestUpdate(),!0)}getNodes(){return this.#u().nodes.map(e=>({node:e.node,depth:e.depth}))}#w(e,n){return!this.filterPredicate||this.filterPredicate(e,n)?!0:e.children?.some(e=>this.#w(e,n+1))??!1}#T(e,n){if(this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.interactionMode===`standard`&&(n.ctrlKey||n.metaKey)){if(this._selectedNodes.has(e.node))this.deselect(e.node);else if(this.#v(e.node)){let n=new Set(this._selectedNodes);this._selectedNodes.add(e.node),this.selectedNode=e.node,this.#b(n),this.requestUpdate()}}else this.interactionMode!==`manual`&&this.select(e.node);this.tickled.setTickled(e.id),this.focusOn(e.node)}#E(e){this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0}))}#D(e){let n=this.#l;if(this.disableKeyboardNavigation||!n)return;if(e.key===`Escape`&&this._previewId!==void 0){e.preventDefault(),this._previewId=void 0;return}let{action:r,handled:i}=OS(e.key,n,this._focusId??n.item.key,this.#u().nodes);i&&e.preventDefault(),r.kind===`focus`?this.#C(r.node):r.kind===`activate`&&(this.interactionMode!==`manual`&&this.select(r.node),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:r.node,depth:r.depth},bubbles:!0,composed:!0})))}#O(){return $x({zoom:this.zoom,offset:this._zoomOffset})}#k(){this.renderRoot.querySelector(`svg.hyperbolictree`)?.focus({preventScroll:!0})}#A(e){e.stopPropagation(),this.#k()}#j(e){this.#e.hide(),this.interactionMode!==`manual`&&this.select(e);let n=this.#m(e);n!==void 0&&this.tickled.setTickled(n),this.focusOn(e),this.#k()}#M(e){let n=this._previewId===void 0||this.disableChildPreview?void 0:e.find(e=>e.id===this._previewId);if(!n)return;let{width:r,height:i}=this._hostSize,a=vx(n.position,this.#O(),r||420,i||420);return{node:n.node,anchor:a,above:a.y>(i||420)/2}}#N(e,n){return nC(e,{nodeShape:this.nodeShape,radialLabels:!this.disableRadialLabels,zoom:this.#O().zoom,font:qS(this,Math.min(this._hostSize.width,this._hostSize.height),this.zoom),branches:n,boxMaxChars:this.boxMaxChars,minLabelSize:this.minLabelSize,nodeRadius:this.nodeRadius,minNodeRadius:this.minNodeRadius,minWeightScale:this.minWeightScale,maxWeightScale:this.maxWeightScale,isSelected:e=>this._selectedNodes.has(e),isTickled:e=>this.tickled.isTickled(e)})}#P(e,n){return dC(e,this.nodeShape,{ctx:n,state:{isSelected:e=>this._selectedNodes.has(e),isTickled:e=>this.tickled.isTickled(e),showTitle:e=>this.disableChildPreview||!e.node.children?.length,isFiltered:e=>!this.#w(e.node,e.depth),isPending:e=>this.#t.isPending(e)},handlers:{onPointerDown:e=>this.#A(e),onClick:(e,n)=>{n.stopPropagation(),this.#T(e,n)},onDblClick:(e,n)=>{n.stopPropagation(),this.#E(e)},onPointerEnter:e=>this.tickled.handlePointerEnter(e)}})}render(){let{nodes:e,edges:n}=this.#u(),r=new Map(e.map(e=>[e.id,e])),a=JS(this.#l),o=this.#N(e,a);this.#n=o.labelIds;let{zoom:s,offset:c}=this.#O(),l=c.x===0&&c.y===0?``:`translate(${c.x*500} ${c.y*500}) `;return i`
8684
+ style="--edge-weight: ${e.weightNormalized};${ZS(e.toId,n)}"
8685
+ />`}function hC(e,n,r,i){return _(e,e=>`${e.fromId}->${e.toId}`,e=>{let a=n.get(e.fromId)?.node,o=n.get(e.toId)?.node;return i&&a&&o?s`<g transform="scale(${500})">${i({edge:e,fromNode:a,toNode:o})}</g>`:mC(e,r)})}let J=class extends n{constructor(...e){super(...e),this.exclusivity=`none`,this.selectionFilter=`all`,this.interactionMode=`standard`,this.maxRadius=4,this.nodeShape=`dot`,this.boxMaxChars=24,this.minLabelSize=9,this.colorByBranch=!1,this.nodeRadius=.05,this.minNodeRadius=.015,this.minWeightScale=.6,this.maxWeightScale=1.6,this.zoom=1,this.disableZoomGestures=!1,this.disableRadialLabels=!1,this.disableChildPreview=!1,this.curvature=1,this.siblingSpacing=bS,this.focusAnimationDuration=400,this._selectedNodes=new Set,this.disableKeyboardNavigation=!1,this.registry=void 0,this._focusId=void 0,this._viewOverride=void 0,this._focusRotation=0,this._zoomOffset={x:0,y:0},this._previewId=void 0,this.#e=Sx({candidate:e=>{let n=this.#u().nodes,r=e===void 0||this.disableChildPreview?void 0:n.find(n=>n.id===e);return r&&!this.#c.isDragging()&&yx(r,n,this.#n)?r.id:void 0},currentId:()=>this._previewId,setPreviewId:e=>{this._previewId=e}}),this.#t=jS(()=>({model:this.model,loadChildren:this.loadChildren}),()=>this.requestUpdate()),this.#n=new Set,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.hyperbolictree-label`,highlightKey:`incr-search-highlight`})}),this.tickled=new ie(this,{getItems:()=>this.#u().nodes.map(e=>({id:e.id,enabled:!0})),onStateChange:()=>{this.setAttribute(`data-input-mode`,this.tickled.inputMode)},onTickle:e=>{if(this.#e.update(e),e===void 0)return;let n=this.#u().nodes.find(n=>n.id===e);n&&this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:n.node,depth:n.depth},bubbles:!0,composed:!0}))}}),this._hostSize={width:0,height:0},this.#c=oS({svgRect:()=>this.renderRoot.querySelector(`svg.hyperbolictree`)?.getBoundingClientRect(),onDragStart:()=>this.#e.hide(),takeView:()=>{let e=this.#f();return this.#x(),this._viewOverride=e,e},setView:e=>{this._viewOverride=e},zoomState:()=>this.#O(),setZoomState:e=>{this.zoom=e.zoom,this._zoomOffset=e.offset},zoomGesturesEnabled:()=>!this.disableZoomGestures,hasFocus:()=>this.renderRoot.activeElement!==null,focusTree:()=>this.#k()})}static{this.shadowRootOptions={...n.shadowRootOptions,delegatesFocus:!0}}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusId===void 0?this.#l:fS(this.#l,this._focusId)?.at(-1)??this.#l}#e;#t;#n;#r;#i;#a;#o;#s;#c;get#l(){return this.model?.root??this.root}#u(){return DS(this.#l,{focusedKey:this._focusId,maxRadius:this.maxRadius,curvature:this.curvature,siblingSpacing:this.siblingSpacing,view:this.#f()})}get#d(){return this.#l?.item.key}#f(){return this._viewOverride??Wx(this._focusRotation)}#p(e,n){let r=SS(this.#l,24,this.curvature,this.siblingSpacing),i=n===void 0?void 0:TS(r,n,e);return i?Vx(this.#f(),i):Wx(this._focusRotation)}#m(e){let n=this.#l,r=pS(n,e);if(r!==void 0)return r;let i=hS(n,e.item.key);return i?pS(n,i):void 0}connectedCallback(){super.connectedCallback(),this.setAttribute(`data-input-mode`,`mouse`);let e=this.#i=Jt();e.register({id:`select-all`,label:`Select All`,description:`Select all visible items`,execute:()=>this.selectAll()}),e.register({id:`deselect-all`,label:`Deselect All`,description:`Clear all selection`,execute:()=>this.deselectAll()}),this.registry=e,this.#g(),typeof ResizeObserver==`function`&&(this.#s=new ResizeObserver(([e])=>{let{width:n,height:r}=e.contentRect;this._hostSize={width:n,height:r}}),this.#s.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.#s?.disconnect(),this.#s=void 0,this.#r?.(),this.#r=void 0,this.#e.dispose(),this.#t.abortAll(),this.#o!==void 0&&(cancelAnimationFrame(this.#o),this.#o=void 0),this.#i&&(this.#i.unregister(`select-all`),this.#i.unregister(`deselect-all`),this.#i=void 0,this.registry=void 0)}#h(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#g(){this.#i&&(this.search.setModes(this.#h()),this.#a?.(),this.#a=Lt(this.#i,this.search))}updated(e){e.has(`root`)&&this.root&&this.#_(),e.has(`model`)&&(this.#r?.(),this.#r=void 0,this.model&&(this.#r=this.model._subscribe(e=>{e.type===`root`?(this.#_(),this.requestUpdate()):e.type===`invalidate`&&this.requestUpdate()}),this.#_())),e.has(`interactionMode`)&&this.clearSelection(),e.has(`searchModes`)&&this.#g(),this._focusId!==void 0&&!fS(this.#l,this._focusId)&&(this._focusId=void 0,this._viewOverride=void 0,this._focusRotation=0),this.#t.ensure(this.#u().nodes)}#_(){this.#y(),this.tickled.clearTickled(),this._focusId=void 0,this._viewOverride=void 0,this._focusRotation=0,this._zoomOffset={x:0,y:0},this._previewId=void 0,this.#c.cancel(),this.#o!==void 0&&(cancelAnimationFrame(this.#o),this.#o=void 0)}#v(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf===!0:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#y(){this._selectedNodes.clear(),this.selectedNode=void 0}#b(e){this.dispatchEvent(new CustomEvent(`select`,{detail:{selected:new Set(this._selectedNodes),previous:e},bubbles:!0,composed:!0}))}select(e){if(!this.#v(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#b(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#b(n),this.requestUpdate()}clearSelection(){if(this._selectedNodes.size===0)return;let e=new Set(this._selectedNodes);this.#y(),this.#b(e),this.requestUpdate()}selectAll(){let e=new Set(this._selectedNodes);for(let e of this.#u().nodes)this.#v(e.node)&&this._selectedNodes.add(e.node);this.selectedNode=[...this._selectedNodes].at(-1),this.#b(e),this.requestUpdate()}deselectAll(){let e=new Set(this._selectedNodes);this.#y(),this.#b(e),this.requestUpdate()}selectMany(e){let n=new Set(this._selectedNodes);this._selectedNodes=new Set([...e].filter(e=>this.#v(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#b(n),this.requestUpdate()}focusOn(e){let n=this.#l,r=this.#m(e),i=this._focusId??this.#d;if(r===void 0||i===r)return;let a=fS(n,r)?.at(-1)??e,o=i===void 0?void 0:fS(n,i)?.at(-1),s=this.#p(r,i);this._focusId=r,this.#c.cancel(),this._previewId=void 0,this.#S(s),this.dispatchEvent(new CustomEvent(`focus`,{detail:{node:a,previous:o},bubbles:!0,composed:!0})),o&&i!==void 0&&(dS(r,i)?this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:a,depth:lS(r)},bubbles:!0,composed:!0})):dS(i,r)&&this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:o,depth:lS(i)},bubbles:!0,composed:!0}))),this.requestUpdate()}#x(){this.#o!==void 0&&(cancelAnimationFrame(this.#o),this.#o=void 0)}#S(e){this.#x();let{viewAt:n,settledRotation:r}=$x(e);this._focusRotation=r;let i=this._zoomOffset;if(this.focusAnimationDuration<=0||Zx()||typeof requestAnimationFrame!=`function`){this._viewOverride=void 0,this._zoomOffset={x:0,y:0};return}let a=performance.now(),o=this.focusAnimationDuration,s=e=>{let r=Math.min(1,(e-a)/o),c=1-Xx(r);this._zoomOffset={x:i.x*c,y:i.y*c},this._viewOverride=r>=1?void 0:n(r),this.#o=r<1?requestAnimationFrame(s):void 0};this.#o=requestAnimationFrame(s)}#C(e){this.focusOn(e);let n=this.#m(e);n!==void 0&&this.tickled.setTickled(n),this.interactionMode===`implicit`&&this.select(e)}navigateTo(e){let n=this.#l;if(!n?.children)return!1;let r=n;for(let n of e){let e=r.children?.find(e=>e.item.key===n);if(!e)return!1;r=e}this.focusOn(r),this.select(r);let i=this.#m(r);return i!==void 0&&this.tickled.setTickled(i),this.requestUpdate(),!0}navigateToNode(e){let n=this.#l;if(!n?.children)return!1;let r=mS(n.children,e);return r?this.navigateTo(r):!1}revealKey(e){let n=hS(this.#l,e),r=n?this.#m(n):void 0;return!n||r===void 0?!1:(this.#u().nodes.some(e=>e.id===r)||this.focusOn(n),this.tickled.setTickled(r),this.requestUpdate(),!0)}getNodes(){return this.#u().nodes.map(e=>({node:e.node,depth:e.depth}))}#w(e,n){return!this.filterPredicate||this.filterPredicate(e,n)?!0:e.children?.some(e=>this.#w(e,n+1))??!1}#T(e,n){if(this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.interactionMode===`standard`&&(n.ctrlKey||n.metaKey)){if(this._selectedNodes.has(e.node))this.deselect(e.node);else if(this.#v(e.node)){let n=new Set(this._selectedNodes);this._selectedNodes.add(e.node),this.selectedNode=e.node,this.#b(n),this.requestUpdate()}}else this.interactionMode!==`manual`&&this.select(e.node);this.tickled.setTickled(e.id),this.focusOn(e.node)}#E(e){this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0}))}#D(e){let n=this.#l;if(this.disableKeyboardNavigation||!n)return;if(e.key===`Escape`&&this._previewId!==void 0){e.preventDefault(),this._previewId=void 0;return}let{action:r,handled:i}=AS(e.key,n,this._focusId??n.item.key,this.#u().nodes);i&&e.preventDefault(),r.kind===`focus`?this.#C(r.node):r.kind===`activate`&&(this.interactionMode!==`manual`&&this.select(r.node),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:r.node,depth:r.depth},bubbles:!0,composed:!0})))}#O(){return tS({zoom:this.zoom,offset:this._zoomOffset})}#k(){this.renderRoot.querySelector(`svg.hyperbolictree`)?.focus({preventScroll:!0})}#A(e){this.#e.hide(),this.interactionMode!==`manual`&&this.select(e);let n=this.#m(e);n!==void 0&&this.tickled.setTickled(n),this.focusOn(e),this.#k()}#j(e){let n=this._previewId===void 0||this.disableChildPreview?void 0:e.find(e=>e.id===this._previewId);if(!n)return;let{width:r,height:i}=this._hostSize,a=bx(n.position,this.#O(),r||420,i||420),o=n.parentId===void 0?void 0:e.find(e=>e.id===n.parentId)?.node;return{node:n.node,anchor:a,side:vx(a,r||420,i||420),parent:o}}#M(e,n){return iC(e,{nodeShape:this.nodeShape,radialLabels:!this.disableRadialLabels,zoom:this.#O().zoom,font:YS(this,Math.min(this._hostSize.width,this._hostSize.height),this.zoom),branches:n,boxMaxChars:this.boxMaxChars,minLabelSize:this.minLabelSize,nodeRadius:this.nodeRadius,minNodeRadius:this.minNodeRadius,minWeightScale:this.minWeightScale,maxWeightScale:this.maxWeightScale,isSelected:e=>this._selectedNodes.has(e),isTickled:e=>this.tickled.isTickled(e)})}#N(e,n){return pC(e,this.nodeShape,{ctx:n,state:{isSelected:e=>this._selectedNodes.has(e),isTickled:e=>this.tickled.isTickled(e),showTitle:e=>this.disableChildPreview||!e.node.children?.length,isFiltered:e=>!this.#w(e.node,e.depth),isPending:e=>this.#t.isPending(e)},handlers:{onClick:(e,n)=>{n.stopPropagation(),this.#c.wasDragged()||this.#T(e,n)},onDblClick:(e,n)=>{n.stopPropagation(),this.#c.wasDragged()||this.#E(e)},onPointerEnter:e=>this.tickled.handlePointerEnter(e)}})}render(){let{nodes:e,edges:n}=this.#u(),r=new Map(e.map(e=>[e.id,e])),a=XS(this.#l),o=this.#M(e,a);this.#n=o.labelIds;let{zoom:s,offset:c}=this.#O(),l=c.x===0&&c.y===0?``:`translate(${c.x*500} ${c.y*500}) `;return i`
8655
8686
  <svg
8656
8687
  class="hyperbolictree"
8657
8688
  viewBox="${-525} ${-525} ${1050} ${1050}"
@@ -8671,16 +8702,16 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8671
8702
  <g class="zoom" transform="${l}scale(${s})">
8672
8703
  <circle class="disk-boundary" part="boundary" cx="0" cy="0" r=${500} />
8673
8704
  <g class="edges" part="edges">
8674
- ${pC(n,r,a,this.edgeRenderer)}
8705
+ ${hC(n,r,a,this.edgeRenderer)}
8675
8706
  </g>
8676
8707
  <g class="nodes" part="nodes">
8677
- ${this.#P(e,o)}
8708
+ ${this.#N(e,o)}
8678
8709
  </g>
8679
8710
  </g>
8680
8711
  </svg>
8681
- ${yx(this.#M(e),{onPointerEnter:()=>this.#e.pointerEnter(),onPointerLeave:()=>this.#e.pointerLeave(this.tickled.tickledId),onPick:e=>this.#j(e)})}
8712
+ ${xx(this.#j(e),{onPointerEnter:()=>this.#e.pointerEnter(),onPointerLeave:()=>this.#e.pointerLeave(this.tickled.tickledId),onPick:e=>this.#A(e)})}
8682
8713
  ${this.search.renderField()}
8683
- `}static{this.styles=[w,Vt,aS]}};E([d({type:Object})],J.prototype,`root`,void 0),E([d({attribute:!1})],J.prototype,`model`,void 0),E([d({attribute:!1})],J.prototype,`loadChildren`,void 0),E([d({reflect:!0,attribute:`exclusivity`})],J.prototype,`exclusivity`,void 0),E([d({reflect:!0,attribute:`selection-filter`})],J.prototype,`selectionFilter`,void 0),E([d({type:String,attribute:`interaction-mode`})],J.prototype,`interactionMode`,void 0),E([d({type:Number,attribute:`max-radius`})],J.prototype,`maxRadius`,void 0),E([d({type:String,attribute:`node-shape`,reflect:!0})],J.prototype,`nodeShape`,void 0),E([d({type:Number,attribute:`box-max-chars`})],J.prototype,`boxMaxChars`,void 0),E([d({type:Number,attribute:`min-label-size`})],J.prototype,`minLabelSize`,void 0),E([d({type:Boolean,attribute:`color-by-branch`,reflect:!0})],J.prototype,`colorByBranch`,void 0),E([d({type:Number,attribute:`node-radius`})],J.prototype,`nodeRadius`,void 0),E([d({type:Number,attribute:`min-node-radius`})],J.prototype,`minNodeRadius`,void 0),E([d({type:Number,attribute:`min-weight-scale`})],J.prototype,`minWeightScale`,void 0),E([d({type:Number,attribute:`max-weight-scale`})],J.prototype,`maxWeightScale`,void 0),E([d({type:Number})],J.prototype,`zoom`,void 0),E([d({type:Boolean,attribute:`disable-zoom-gestures`})],J.prototype,`disableZoomGestures`,void 0),E([d({type:Boolean,attribute:`disable-radial-labels`})],J.prototype,`disableRadialLabels`,void 0),E([d({type:Boolean,attribute:`disable-child-preview`})],J.prototype,`disableChildPreview`,void 0),E([d({type:Number})],J.prototype,`curvature`,void 0),E([d({type:Number,attribute:`sibling-spacing`})],J.prototype,`siblingSpacing`,void 0),E([d({type:Number,attribute:`focus-animation-duration`})],J.prototype,`focusAnimationDuration`,void 0),E([d({attribute:!1})],J.prototype,`edgeRenderer`,void 0),E([d({attribute:!1})],J.prototype,`selectedNode`,void 0),E([m()],J.prototype,`_selectedNodes`,void 0),E([d({attribute:!1})],J.prototype,`filterPredicate`,void 0),E([d({type:Boolean,attribute:`disable-keyboard-navigation`})],J.prototype,`disableKeyboardNavigation`,void 0),E([d({attribute:!1})],J.prototype,`registry`,void 0),E([d({type:String,attribute:`search-modes`,reflect:!0})],J.prototype,`searchModes`,void 0),E([m()],J.prototype,`_focusId`,void 0),E([m()],J.prototype,`_viewOverride`,void 0),E([m()],J.prototype,`_focusRotation`,void 0),E([m()],J.prototype,`_zoomOffset`,void 0),E([m()],J.prototype,`_previewId`,void 0),E([m()],J.prototype,`_hostSize`,void 0),J=E([T(`ixfx-hyperbolictree-list`)],J);function mC(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function hC(e,n){if(e){if(e.item.key===n)return e;for(let r of e.children??[]){let e=hC(r,n);if(e)return e}}}function gC(e,n){if(e){if(e.item.key===n)return[e];for(let r of e.children??[]){let i=gC(r,n);if(i)return[e,...i]}}}function _C(e,n={}){if(!e?.children?.length)return[];let{maxDepth:r=1/0,valueAccessor:i=()=>1,zoomKey:a,hideLeaves:o=!1}=n;if(r<=0)return[];let s=a===void 0?e:hC(e,a)??e,c=gC(e,s.item.key),l=c?c.length-2:-1,u=s.children??[];if(u.length===0)return[];let d=e=>e.item.isLeaf===!0||e.children!==void 0&&e.children.length===0,f=[],p=(e,n,a,s,c,l)=>{let u=o?e.filter(e=>!d(e)):e;if(u.length===0||a>=r)return;let m=u.map(e=>mC(i(e.item))),h=m.reduce((e,n)=>e+n,0),g=u.length,_=s;u.forEach((e,r)=>{let i=c*(h>0?m[r]/h:1/g),o=e.children??[];f.push({node:e,depth:n,relativeDepth:a,x:_,width:i,parentKey:l,index:r,setSize:g,hasChildren:o.length>0||e.children===void 0&&e.item.isLeaf!==!0}),o.length>0&&p(o,n+1,a+1,_,i,e.item.key),_+=i})};return p(u,l+1,0,0,1,s.item.key),f}let vC=class extends n{constructor(...e){super(...e),this.exclusivity=`none`,this.selectionFilter=`all`,this.interactionMode=`standard`,this.orientation=`horizontal`,this.maxDepth=4,this.minLabelWidth=40,this.minVerticalLabelWidth=16,this.hideLeaves=!1,this.valueAccessor=()=>1,this._selectedNodes=new Set,this.disableKeyboardNavigation=!1,this.registry=void 0,this._zoomKey=void 0,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.icicle-label`,highlightKey:`incr-search-highlight`})}),this.tickled=new ie(this,{getItems:()=>this.#c().map(e=>({id:e.node.item.key,enabled:!0})),onStateChange:()=>{this.setAttribute(`data-input-mode`,this.tickled.inputMode)},onTickle:e=>{if(e===void 0)return;let n=this.#c().find(n=>n.node.item.key===e);n&&this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:n.node,depth:n.depth},bubbles:!0,composed:!0}))}}),this.#t=new Set,this.#n=new Map}static{this.shadowRootOptions={...n.shadowRootOptions,delegatesFocus:!0}}get selectedNodes(){return this._selectedNodes}get focusedNode(){if(this._zoomKey!==void 0)return hC(this.#s,this._zoomKey)}#e;#t;#n;#r;#i;#a;#o;get#s(){return this.model?.root??this.root}#c(){return _C(this.#s,{valueAccessor:this.valueAccessor,maxDepth:this.maxDepth,zoomKey:this._zoomKey,hideLeaves:this.hideLeaves})}connectedCallback(){super.connectedCallback(),this.setAttribute(`data-input-mode`,`mouse`);let e=this.#i=Jt();e.register({id:`select-all`,label:`Select All`,description:`Select all visible items`,execute:()=>this.selectAll()}),e.register({id:`deselect-all`,label:`Deselect All`,description:`Clear all selection`,execute:()=>this.deselectAll()}),this.registry=e,this.#u(),typeof ResizeObserver<`u`&&(this.#o=new ResizeObserver(()=>this.requestUpdate()),this.#o.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=void 0;for(let e of this.#n.values())e.abort();this.#n.clear(),this.#t.clear(),this.#o?.disconnect(),this.#o=void 0,this.#i&&(this.#i.unregister(`select-all`),this.#i.unregister(`deselect-all`),this.#i=void 0,this.registry=void 0)}#l(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#u(){this.#i&&(this.search.setModes(this.#l()),this.#a?.(),this.#a=Lt(this.#i,this.search))}updated(e){e.has(`root`)&&this.root&&this.#m(),e.has(`model`)&&(this.#e?.(),this.#e=void 0,this.model&&(this.#e=this.model._subscribe(e=>{e.type===`root`?(this.#m(),this.requestUpdate()):e.type===`invalidate`&&this.requestUpdate()}),this.#m())),e.has(`interactionMode`)&&(this.#r=void 0,this.clearSelection()),e.has(`searchModes`)&&this.#u(),this._zoomKey!==void 0&&!hC(this.#s,this._zoomKey)&&(this._zoomKey=void 0),this.#h(),this.#p()}#d(){return(this.orientation===`vertical`?this.clientHeight:this.clientWidth)||0}#f(e){let n=this.#d();if(n===0)return{hidden:!1,rotated:!1};let r=this.orientation===`vertical`,i=e.width*n;return r?{hidden:i<this.minLabelWidth,rotated:!1}:i<this.minVerticalLabelWidth?{hidden:!0,rotated:!1}:{hidden:!1,rotated:i<this.minLabelWidth}}#p(){let e=this._tooltipEl;if(!e?.popover)return;let n=this.tickled.tickledId,r=n===void 0?void 0:this.#c().find(e=>e.node.item.key===n),i=r?this.#f(r):void 0,a=e.matches(`:popover-open`);if(r&&i&&(i.hidden||i.rotated)){if(e.textContent=r.node.item.label,!a)try{e.showPopover()}catch{}}else if(a)try{e.hidePopover()}catch{}}#m(){this.#v(),this.tickled.clearTickled(),this._zoomKey=void 0,this.#r=void 0}#h(){if(!(!this.model&&!this.loadChildren))for(let e of this.#c()){let{node:n}=e;n.children!==void 0||this.#t.has(n.item.key)||this.#g(n,e.depth)}}async#g(e,n){let r=e.item.key;this.#t.add(r);let i=new AbortController;this.#n.set(r,i),this.requestUpdate();try{let r;if(r=this.model?await this.model.getChildren(e,n,i.signal):[...await dg(this.loadChildren({node:e,depth:n},i.signal),i.signal)],i.signal.aborted)return;e.children=r}catch{if(i.signal.aborted)return;e.children=[]}finally{this.#t.delete(r),this.#n.delete(r),i.signal.aborted||this.requestUpdate()}}#_(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf===!0:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#v(){this._selectedNodes.clear(),this.selectedNode=void 0}#y(e){this.dispatchEvent(new CustomEvent(`select`,{detail:{selected:new Set(this._selectedNodes),previous:e},bubbles:!0,composed:!0}))}select(e){if(!this.#_(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#y(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#y(n),this.requestUpdate()}clearSelection(){if(this._selectedNodes.size===0)return;let e=new Set(this._selectedNodes);this.#v(),this.#y(e),this.requestUpdate()}selectAll(){let e=new Set(this._selectedNodes);for(let e of this.#c())this.#_(e.node)&&this._selectedNodes.add(e.node);this.selectedNode=[...this._selectedNodes].at(-1),this.#y(e),this.requestUpdate()}deselectAll(){let e=new Set(this._selectedNodes);this.#v(),this.#y(e),this.requestUpdate()}selectMany(e){let n=new Set(this._selectedNodes);this._selectedNodes=new Set([...e].filter(e=>this.#_(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#y(n),this.requestUpdate()}zoomTo(e){if(this._zoomKey===e.item.key)return;this._zoomKey=e.item.key,this.tickled.clearTickled();let n=gC(this.#s,e.item.key)?.length,r=n===void 0?-1:n-2;this.dispatchEvent(new CustomEvent(`zoom`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.requestUpdate()}zoomOut(){if(this._zoomKey===void 0)return;let e=this.focusedNode,n=this._zoomKey===void 0?void 0:gC(this.#s,this._zoomKey),r=n===void 0?-1:n.length-2;this._zoomKey=void 0,this.tickled.clearTickled(),this.dispatchEvent(new CustomEvent(`zoom`,{detail:{node:void 0,depth:-1},bubbles:!0,composed:!0})),e&&this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.requestUpdate()}#b(e){return e.item.isLeaf===!0?!1:e.children===void 0?this.model!==void 0||this.loadChildren!==void 0:e.children.length>0}navigateTo(e){let n=this.#s;if(!n?.children)return!1;let r=n,i=[];for(let n of e){let e=r.children?.find(e=>e.item.key===n);if(!e)return!1;i.push(e),r=e}let a=i.at(-1);return i.length>this.maxDepth?this.zoomTo(i[i.length-this.maxDepth-1]):this._zoomKey!==void 0&&this.zoomOut(),this.select(a),this.tickled.setTickled(a.item.key),this.requestUpdate(),!0}navigateToNode(e){let n=this.#s;if(!n?.children)return!1;let r=this.#S(n.children,e);return r?this.navigateTo(r):!1}revealKey(e){let n=this.#s;if(!n?.children)return!1;let r=this.#S(n.children,n=>n.item.key===e);if(!r)return!1;if(r.length>this.maxDepth){let e=this.#x(r.slice(0,r.length-this.maxDepth));e&&this.zoomTo(e)}return this.tickled.setTickled(e),this.requestUpdate(),!0}#x(e){let n=this.#s;for(let r of e){let e=r===n?.item.key?n:n?.children?.find(e=>e.item.key===r);if(!e)return;n=e}return n}#S(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;if(i.children?.length){let r=this.#S(i.children,n,e);if(r)return r}}}getNodes(){return this.#c().map(e=>({node:e.node,depth:e.depth}))}#C(e,n){return!this.filterPredicate||this.filterPredicate(e,n)?!0:e.children?.some(e=>this.#C(e,n+1))??!1}#w(e,n,r){if(this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.interactionMode===`standard`&&(r.ctrlKey||r.metaKey)){if(this._selectedNodes.has(e.node))this.deselect(e.node);else if(this.#_(e.node)){let n=new Set(this._selectedNodes);this._selectedNodes.add(e.node),this.selectedNode=e.node,this.#y(n),this.requestUpdate()}this.#r=n}else if(this.interactionMode===`standard`&&r.shiftKey&&this.#r!==void 0){let e=this.#c(),r=Math.min(this.#r,n),i=Math.max(this.#r,n),a=new Set(this._selectedNodes);this._selectedNodes=new Set(e.slice(r,i+1).map(e=>e.node).filter(e=>this.#_(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#y(a),this.requestUpdate()}else this.interactionMode!==`manual`&&(this.select(e.node),this.#r=n);this.tickled.setTickled(e.node.item.key),this.#b(e.node)&&this.zoomTo(e.node)}#T(e){this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0}))}#E(e){if(this.disableKeyboardNavigation)return;let n=this.#c();if(n.length===0)return;let r=this.tickled.tickledId,i=r===void 0?-1:n.findIndex(e=>e.node.item.key===r),a=i>=0?n[i]:void 0,o=n=>{n&&(e.preventDefault(),this.tickled.setTickled(n.node.item.key),this.interactionMode===`implicit`&&this.select(n.node))};switch(e.key){case`ArrowLeft`:case`ArrowRight`:{e.preventDefault();let r=e.key===`ArrowRight`?1:-1;if(!a){o(n[0]);return}let i=n.filter(e=>e.relativeDepth===a.relativeDepth&&e.parentKey===a.parentKey);o(i[i.findIndex(e=>e.node.item.key===a.node.item.key)+r]??(r>0?i[0]:i.at(-1)));return}case`ArrowUp`:if(!a){o(n[0]);return}o((a.parentKey===void 0?void 0:n.find(e=>e.node.item.key===a.parentKey))??n[0]);return;case`ArrowDown`:if(!a){o(n[0]);return}o(n.find(e=>e.parentKey===a.node.item.key));return;case`Home`:o(n[0]);return;case`End`:o(n.at(-1));return;case`Enter`:if(!a)return;e.preventDefault(),this.interactionMode!==`manual`&&this.select(a.node),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:a.node,depth:a.depth},bubbles:!0,composed:!0})),this.#b(a.node)&&this.zoomTo(a.node);return;case`Escape`:this._zoomKey!==void 0&&(e.preventDefault(),this.zoomOut())}}#D(){let e=this.focusedNode;return e===void 0?a:i`
8714
+ `}static{this.styles=[w,Vt,sS]}};E([d({type:Object})],J.prototype,`root`,void 0),E([d({attribute:!1})],J.prototype,`model`,void 0),E([d({attribute:!1})],J.prototype,`loadChildren`,void 0),E([d({reflect:!0,attribute:`exclusivity`})],J.prototype,`exclusivity`,void 0),E([d({reflect:!0,attribute:`selection-filter`})],J.prototype,`selectionFilter`,void 0),E([d({type:String,attribute:`interaction-mode`})],J.prototype,`interactionMode`,void 0),E([d({type:Number,attribute:`max-radius`})],J.prototype,`maxRadius`,void 0),E([d({type:String,attribute:`node-shape`,reflect:!0})],J.prototype,`nodeShape`,void 0),E([d({type:Number,attribute:`box-max-chars`})],J.prototype,`boxMaxChars`,void 0),E([d({type:Number,attribute:`min-label-size`})],J.prototype,`minLabelSize`,void 0),E([d({type:Boolean,attribute:`color-by-branch`,reflect:!0})],J.prototype,`colorByBranch`,void 0),E([d({type:Number,attribute:`node-radius`})],J.prototype,`nodeRadius`,void 0),E([d({type:Number,attribute:`min-node-radius`})],J.prototype,`minNodeRadius`,void 0),E([d({type:Number,attribute:`min-weight-scale`})],J.prototype,`minWeightScale`,void 0),E([d({type:Number,attribute:`max-weight-scale`})],J.prototype,`maxWeightScale`,void 0),E([d({type:Number})],J.prototype,`zoom`,void 0),E([d({type:Boolean,attribute:`disable-zoom-gestures`})],J.prototype,`disableZoomGestures`,void 0),E([d({type:Boolean,attribute:`disable-radial-labels`})],J.prototype,`disableRadialLabels`,void 0),E([d({type:Boolean,attribute:`disable-child-preview`})],J.prototype,`disableChildPreview`,void 0),E([d({type:Number})],J.prototype,`curvature`,void 0),E([d({type:Number,attribute:`sibling-spacing`})],J.prototype,`siblingSpacing`,void 0),E([d({type:Number,attribute:`focus-animation-duration`})],J.prototype,`focusAnimationDuration`,void 0),E([d({attribute:!1})],J.prototype,`edgeRenderer`,void 0),E([d({attribute:!1})],J.prototype,`selectedNode`,void 0),E([m()],J.prototype,`_selectedNodes`,void 0),E([d({attribute:!1})],J.prototype,`filterPredicate`,void 0),E([d({type:Boolean,attribute:`disable-keyboard-navigation`})],J.prototype,`disableKeyboardNavigation`,void 0),E([d({attribute:!1})],J.prototype,`registry`,void 0),E([d({type:String,attribute:`search-modes`,reflect:!0})],J.prototype,`searchModes`,void 0),E([m()],J.prototype,`_focusId`,void 0),E([m()],J.prototype,`_viewOverride`,void 0),E([m()],J.prototype,`_focusRotation`,void 0),E([m()],J.prototype,`_zoomOffset`,void 0),E([m()],J.prototype,`_previewId`,void 0),E([m()],J.prototype,`_hostSize`,void 0),J=E([T(`ixfx-hyperbolictree-list`)],J);function gC(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function _C(e,n){if(e){if(e.item.key===n)return e;for(let r of e.children??[]){let e=_C(r,n);if(e)return e}}}function vC(e,n){if(e){if(e.item.key===n)return[e];for(let r of e.children??[]){let i=vC(r,n);if(i)return[e,...i]}}}function yC(e,n={}){if(!e?.children?.length)return[];let{maxDepth:r=1/0,valueAccessor:i=()=>1,zoomKey:a,hideLeaves:o=!1}=n;if(r<=0)return[];let s=a===void 0?e:_C(e,a)??e,c=vC(e,s.item.key),l=c?c.length-2:-1,u=s.children??[];if(u.length===0)return[];let d=e=>e.item.isLeaf===!0||e.children!==void 0&&e.children.length===0,f=[],p=(e,n,a,s,c,l)=>{let u=o?e.filter(e=>!d(e)):e;if(u.length===0||a>=r)return;let m=u.map(e=>gC(i(e.item))),h=m.reduce((e,n)=>e+n,0),g=u.length,_=s;u.forEach((e,r)=>{let i=c*(h>0?m[r]/h:1/g),o=e.children??[];f.push({node:e,depth:n,relativeDepth:a,x:_,width:i,parentKey:l,index:r,setSize:g,hasChildren:o.length>0||e.children===void 0&&e.item.isLeaf!==!0}),o.length>0&&p(o,n+1,a+1,_,i,e.item.key),_+=i})};return p(u,l+1,0,0,1,s.item.key),f}let bC=class extends n{constructor(...e){super(...e),this.exclusivity=`none`,this.selectionFilter=`all`,this.interactionMode=`standard`,this.orientation=`horizontal`,this.maxDepth=4,this.minLabelWidth=40,this.minVerticalLabelWidth=16,this.hideLeaves=!1,this.valueAccessor=()=>1,this._selectedNodes=new Set,this.disableKeyboardNavigation=!1,this.registry=void 0,this._zoomKey=void 0,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.icicle-label`,highlightKey:`incr-search-highlight`})}),this.tickled=new ie(this,{getItems:()=>this.#c().map(e=>({id:e.node.item.key,enabled:!0})),onStateChange:()=>{this.setAttribute(`data-input-mode`,this.tickled.inputMode)},onTickle:e=>{if(e===void 0)return;let n=this.#c().find(n=>n.node.item.key===e);n&&this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:n.node,depth:n.depth},bubbles:!0,composed:!0}))}}),this.#t=new Set,this.#n=new Map}static{this.shadowRootOptions={...n.shadowRootOptions,delegatesFocus:!0}}get selectedNodes(){return this._selectedNodes}get focusedNode(){if(this._zoomKey!==void 0)return _C(this.#s,this._zoomKey)}#e;#t;#n;#r;#i;#a;#o;get#s(){return this.model?.root??this.root}#c(){return yC(this.#s,{valueAccessor:this.valueAccessor,maxDepth:this.maxDepth,zoomKey:this._zoomKey,hideLeaves:this.hideLeaves})}connectedCallback(){super.connectedCallback(),this.setAttribute(`data-input-mode`,`mouse`);let e=this.#i=Jt();e.register({id:`select-all`,label:`Select All`,description:`Select all visible items`,execute:()=>this.selectAll()}),e.register({id:`deselect-all`,label:`Deselect All`,description:`Clear all selection`,execute:()=>this.deselectAll()}),this.registry=e,this.#u(),typeof ResizeObserver<`u`&&(this.#o=new ResizeObserver(()=>this.requestUpdate()),this.#o.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=void 0;for(let e of this.#n.values())e.abort();this.#n.clear(),this.#t.clear(),this.#o?.disconnect(),this.#o=void 0,this.#i&&(this.#i.unregister(`select-all`),this.#i.unregister(`deselect-all`),this.#i=void 0,this.registry=void 0)}#l(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#u(){this.#i&&(this.search.setModes(this.#l()),this.#a?.(),this.#a=Lt(this.#i,this.search))}updated(e){e.has(`root`)&&this.root&&this.#m(),e.has(`model`)&&(this.#e?.(),this.#e=void 0,this.model&&(this.#e=this.model._subscribe(e=>{e.type===`root`?(this.#m(),this.requestUpdate()):e.type===`invalidate`&&this.requestUpdate()}),this.#m())),e.has(`interactionMode`)&&(this.#r=void 0,this.clearSelection()),e.has(`searchModes`)&&this.#u(),this._zoomKey!==void 0&&!_C(this.#s,this._zoomKey)&&(this._zoomKey=void 0),this.#h(),this.#p()}#d(){return(this.orientation===`vertical`?this.clientHeight:this.clientWidth)||0}#f(e){let n=this.#d();if(n===0)return{hidden:!1,rotated:!1};let r=this.orientation===`vertical`,i=e.width*n;return r?{hidden:i<this.minLabelWidth,rotated:!1}:i<this.minVerticalLabelWidth?{hidden:!0,rotated:!1}:{hidden:!1,rotated:i<this.minLabelWidth}}#p(){let e=this._tooltipEl;if(!e?.popover)return;let n=this.tickled.tickledId,r=n===void 0?void 0:this.#c().find(e=>e.node.item.key===n),i=r?this.#f(r):void 0,a=e.matches(`:popover-open`);if(r&&i&&(i.hidden||i.rotated)){if(e.textContent=r.node.item.label,!a)try{e.showPopover()}catch{}}else if(a)try{e.hidePopover()}catch{}}#m(){this.#v(),this.tickled.clearTickled(),this._zoomKey=void 0,this.#r=void 0}#h(){if(!(!this.model&&!this.loadChildren))for(let e of this.#c()){let{node:n}=e;n.children!==void 0||this.#t.has(n.item.key)||this.#g(n,e.depth)}}async#g(e,n){let r=e.item.key;this.#t.add(r);let i=new AbortController;this.#n.set(r,i),this.requestUpdate();try{let r;if(r=this.model?await this.model.getChildren(e,n,i.signal):[...await dg(this.loadChildren({node:e,depth:n},i.signal),i.signal)],i.signal.aborted)return;e.children=r}catch{if(i.signal.aborted)return;e.children=[]}finally{this.#t.delete(r),this.#n.delete(r),i.signal.aborted||this.requestUpdate()}}#_(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf===!0:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#v(){this._selectedNodes.clear(),this.selectedNode=void 0}#y(e){this.dispatchEvent(new CustomEvent(`select`,{detail:{selected:new Set(this._selectedNodes),previous:e},bubbles:!0,composed:!0}))}select(e){if(!this.#_(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#y(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#y(n),this.requestUpdate()}clearSelection(){if(this._selectedNodes.size===0)return;let e=new Set(this._selectedNodes);this.#v(),this.#y(e),this.requestUpdate()}selectAll(){let e=new Set(this._selectedNodes);for(let e of this.#c())this.#_(e.node)&&this._selectedNodes.add(e.node);this.selectedNode=[...this._selectedNodes].at(-1),this.#y(e),this.requestUpdate()}deselectAll(){let e=new Set(this._selectedNodes);this.#v(),this.#y(e),this.requestUpdate()}selectMany(e){let n=new Set(this._selectedNodes);this._selectedNodes=new Set([...e].filter(e=>this.#_(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#y(n),this.requestUpdate()}zoomTo(e){if(this._zoomKey===e.item.key)return;this._zoomKey=e.item.key,this.tickled.clearTickled();let n=vC(this.#s,e.item.key)?.length,r=n===void 0?-1:n-2;this.dispatchEvent(new CustomEvent(`zoom`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.requestUpdate()}zoomOut(){if(this._zoomKey===void 0)return;let e=this.focusedNode,n=this._zoomKey===void 0?void 0:vC(this.#s,this._zoomKey),r=n===void 0?-1:n.length-2;this._zoomKey=void 0,this.tickled.clearTickled(),this.dispatchEvent(new CustomEvent(`zoom`,{detail:{node:void 0,depth:-1},bubbles:!0,composed:!0})),e&&this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.requestUpdate()}#b(e){return e.item.isLeaf===!0?!1:e.children===void 0?this.model!==void 0||this.loadChildren!==void 0:e.children.length>0}navigateTo(e){let n=this.#s;if(!n?.children)return!1;let r=n,i=[];for(let n of e){let e=r.children?.find(e=>e.item.key===n);if(!e)return!1;i.push(e),r=e}let a=i.at(-1);return i.length>this.maxDepth?this.zoomTo(i[i.length-this.maxDepth-1]):this._zoomKey!==void 0&&this.zoomOut(),this.select(a),this.tickled.setTickled(a.item.key),this.requestUpdate(),!0}navigateToNode(e){let n=this.#s;if(!n?.children)return!1;let r=this.#S(n.children,e);return r?this.navigateTo(r):!1}revealKey(e){let n=this.#s;if(!n?.children)return!1;let r=this.#S(n.children,n=>n.item.key===e);if(!r)return!1;if(r.length>this.maxDepth){let e=this.#x(r.slice(0,r.length-this.maxDepth));e&&this.zoomTo(e)}return this.tickled.setTickled(e),this.requestUpdate(),!0}#x(e){let n=this.#s;for(let r of e){let e=r===n?.item.key?n:n?.children?.find(e=>e.item.key===r);if(!e)return;n=e}return n}#S(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;if(i.children?.length){let r=this.#S(i.children,n,e);if(r)return r}}}getNodes(){return this.#c().map(e=>({node:e.node,depth:e.depth}))}#C(e,n){return!this.filterPredicate||this.filterPredicate(e,n)?!0:e.children?.some(e=>this.#C(e,n+1))??!1}#w(e,n,r){if(this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.interactionMode===`standard`&&(r.ctrlKey||r.metaKey)){if(this._selectedNodes.has(e.node))this.deselect(e.node);else if(this.#_(e.node)){let n=new Set(this._selectedNodes);this._selectedNodes.add(e.node),this.selectedNode=e.node,this.#y(n),this.requestUpdate()}this.#r=n}else if(this.interactionMode===`standard`&&r.shiftKey&&this.#r!==void 0){let e=this.#c(),r=Math.min(this.#r,n),i=Math.max(this.#r,n),a=new Set(this._selectedNodes);this._selectedNodes=new Set(e.slice(r,i+1).map(e=>e.node).filter(e=>this.#_(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#y(a),this.requestUpdate()}else this.interactionMode!==`manual`&&(this.select(e.node),this.#r=n);this.tickled.setTickled(e.node.item.key),this.#b(e.node)&&this.zoomTo(e.node)}#T(e){this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0}))}#E(e){if(this.disableKeyboardNavigation)return;let n=this.#c();if(n.length===0)return;let r=this.tickled.tickledId,i=r===void 0?-1:n.findIndex(e=>e.node.item.key===r),a=i>=0?n[i]:void 0,o=n=>{n&&(e.preventDefault(),this.tickled.setTickled(n.node.item.key),this.interactionMode===`implicit`&&this.select(n.node))};switch(e.key){case`ArrowLeft`:case`ArrowRight`:{e.preventDefault();let r=e.key===`ArrowRight`?1:-1;if(!a){o(n[0]);return}let i=n.filter(e=>e.relativeDepth===a.relativeDepth&&e.parentKey===a.parentKey);o(i[i.findIndex(e=>e.node.item.key===a.node.item.key)+r]??(r>0?i[0]:i.at(-1)));return}case`ArrowUp`:if(!a){o(n[0]);return}o((a.parentKey===void 0?void 0:n.find(e=>e.node.item.key===a.parentKey))??n[0]);return;case`ArrowDown`:if(!a){o(n[0]);return}o(n.find(e=>e.parentKey===a.node.item.key));return;case`Home`:o(n[0]);return;case`End`:o(n.at(-1));return;case`Enter`:if(!a)return;e.preventDefault(),this.interactionMode!==`manual`&&this.select(a.node),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:a.node,depth:a.depth},bubbles:!0,composed:!0})),this.#b(a.node)&&this.zoomTo(a.node);return;case`Escape`:this._zoomKey!==void 0&&(e.preventDefault(),this.zoomOut())}}#D(){let e=this.focusedNode;return e===void 0?a:i`
8684
8715
  <nav class="breadcrumb" part="breadcrumb" aria-label="Icicle zoom path">
8685
8716
  <ixfx-crumb-navigation
8686
8717
  with-up
@@ -8911,7 +8942,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8911
8942
  color: var(--surface-muted-text);
8912
8943
  font-size: var(--text-s);
8913
8944
  }
8914
- `]}};E([d({type:Object})],vC.prototype,`root`,void 0),E([d({attribute:!1})],vC.prototype,`model`,void 0),E([d({attribute:!1})],vC.prototype,`loadChildren`,void 0),E([d({reflect:!0,attribute:`exclusivity`})],vC.prototype,`exclusivity`,void 0),E([d({reflect:!0,attribute:`selection-filter`})],vC.prototype,`selectionFilter`,void 0),E([d({type:String,attribute:`interaction-mode`})],vC.prototype,`interactionMode`,void 0),E([d({type:String,reflect:!0})],vC.prototype,`orientation`,void 0),E([d({type:Number,attribute:`max-depth`})],vC.prototype,`maxDepth`,void 0),E([d({type:Number,attribute:`min-label-width`})],vC.prototype,`minLabelWidth`,void 0),E([d({type:Number,attribute:`min-vertical-label-width`})],vC.prototype,`minVerticalLabelWidth`,void 0),E([d({type:Boolean,attribute:`hide-leaves`,reflect:!0})],vC.prototype,`hideLeaves`,void 0),E([d({attribute:!1})],vC.prototype,`valueAccessor`,void 0),E([d({attribute:!1})],vC.prototype,`selectedNode`,void 0),E([m()],vC.prototype,`_selectedNodes`,void 0),E([d({attribute:!1})],vC.prototype,`filterPredicate`,void 0),E([d({type:Boolean,attribute:`disable-keyboard-navigation`})],vC.prototype,`disableKeyboardNavigation`,void 0),E([d({attribute:!1})],vC.prototype,`registry`,void 0),E([d({type:String,attribute:`search-modes`,reflect:!0})],vC.prototype,`searchModes`,void 0),E([m()],vC.prototype,`_zoomKey`,void 0),E([f(`#icicle-tooltip`)],vC.prototype,`_tooltipEl`,void 0),vC=E([T(`ixfx-icicletree-list`)],vC);const yC=Math.PI*2,bC=-Math.PI/2;function xC(e,n,r={x:50,y:50}){return{x:r.x+Math.cos(e)*n,y:r.y+Math.sin(e)*n}}function SC(e){let n=yC*(1-e)/2,r=-Math.PI/2,i=r-n,a=r+n;return{startAngle:i,endAngle:a,totalArc:a-i}}function CC(e,n,r){let{startAngle:i,endAngle:a,totalArc:o}=SC(r);switch(n){case`range`:return i+e*o;case`bipolar`:if(e<=.5)return i+e/.5*(bC-i);{let n=(e-.5)/.5;return bC+n*(a-bC)}case`unipolar`:return bC;default:return i}}function wC(e,n,r){let{startAngle:i,endAngle:a,totalArc:o}=SC(r);switch(n){case`range`:return{startAngle:i,endAngle:i+e*o};case`bipolar`:if(e<.5)return{startAngle:i+e/.5*(bC-i),endAngle:bC};if(e>.5){let n=(e-.5)/.5,r=bC+n*(a-bC);return{startAngle:bC,endAngle:r}}return{startAngle:bC,endAngle:bC};case`unipolar`:{let n=e*o/2;return{startAngle:bC-n,endAngle:bC+n}}default:return{startAngle:i,endAngle:i}}}function TC(e,n,r,i){let{startAngle:a,endAngle:o,totalArc:s}=SC(i),c=CC(e,r,i),l=n*s/2,u=c-l,d=c+l;return u<a&&(u=a),d>o&&(d=o),u>=d?{startAngle:c,endAngle:c}:{startAngle:u,endAngle:d}}function EC(e,n,r,i={x:50,y:50}){if(e===n)return``;let a=n-e;if(a<0&&(a+=yC),a>=yC-.001){let n=e+yC-.001,a=xC(e,r,i),o=xC(n,r,i);return`M ${a.x},${a.y} A ${r},${r} 0 1 1 ${o.x},${o.y}`}let o=xC(e,r,i),s=xC(n,r,i),c=+(a>Math.PI);return`M ${o.x},${o.y} A ${r},${r} 0 ${c} 1 ${s.x},${s.y}`}function DC(e,n,r={x:50,y:50}){let{startAngle:i,endAngle:a}=SC(n);return EC(i,a,e,r)}function OC(e,n,r,i={x:50,y:50},a=!0){if(e===n)return``;let o=n-e;if(o<0&&(o+=yC),o>=yC-.001){let n=xC(e,r,i),o=xC(e+yC-.001,r,i),s=+!!a;return`M ${i.x},${i.y} L ${n.x},${n.y} A ${r},${r} 0 1 ${s} ${o.x},${o.y} Z`}let s=e,c=n,l=a;!a&&o>Math.PI&&(s=n,c=e,l=!0,o=yC-o);let u=xC(s,r,i),d=xC(c,r,i),f=+(o>Math.PI),p=+!!l;return`M ${i.x},${i.y} L ${u.x},${u.y} A ${r},${r} 0 ${f} ${p} ${d.x},${d.y} Z`}function kC(e,n,r){let{startAngle:i,totalArc:a}=SC(r),o=CC(e,n,r);switch(n){case`range`:return{startAngle:i,endAngle:o,clockwise:!0};case`bipolar`:return e<.5?{startAngle:bC,endAngle:o,clockwise:!1}:{startAngle:bC,endAngle:o,clockwise:!0};case`unipolar`:{let n=e*a/2;return{startAngle:bC-n,endAngle:bC+n,clockwise:!0}}default:return{startAngle:i,endAngle:i,clockwise:!0}}}function AC(e,n,r,i,a={x:50,y:50}){let o=CC(e,n,r);return{angle:o,position:xC(o,i,a)}}function jC(e,n={x:50,y:50}){let r=xC(bC,e,n);return{angle:bC,position:r}}function MC(e,n,r){return Math.min(Math.max(e,n),r)}function NC(e,n,r,i,a){return i+(e-n)/(r-n)*(a-i)}const PC={x:50,y:50};let FC=class extends Oy(n){#e;get radius(){return this.#e}set radius(e){this.#e=MC(e,10,50)}#t;#n;#r;#i;#a;#o;constructor(){super(),this.#e=45,this.value=0,this.min=0,this.max=100,this.step=void 0,this.valueMode=`range`,this.flatten=.3,this.markerStyle=`needle`,this.wedge=!1,this.disabled=!1,this.#t=new Map,this.#n=!1,this.#r=0,this.#i=0,this.#o=!1,this.#p=e=>{if(this.disabled)return;e.preventDefault();let n=this.renderRoot.querySelector(`svg`);n?.focus(),this.#n=!0,this.#r=e.clientY,this.#i=this.value,this.toggleAttribute(`dragging`,!0),n&&n.setPointerCapture(e.pointerId),window.addEventListener(`pointermove`,this.#m),window.addEventListener(`pointerup`,this.#h),window.addEventListener(`pointercancel`,this.#h)},this.#m=e=>{if(!this.#n)return;e.preventDefault();let n=this.clientHeight*2*(e.shiftKey?10:1),r=(this.#r-e.clientY)/n*(this.max-this.min),i=NC(this.#i+r,this.min,this.max,0,1);this.#u(MC(i,0,1),!0)},this.#h=()=>{this.#n=!1,this.toggleAttribute(`dragging`,!1);let e=this.renderRoot.querySelector(`svg`);e&&`hasPointerCapture`in e&&typeof e.hasPointerCapture==`function`&&e.hasPointerCapture(1)&&e.releasePointerCapture(1),window.removeEventListener(`pointermove`,this.#m),window.removeEventListener(`pointerup`,this.#h),window.removeEventListener(`pointercancel`,this.#h)},this.#g=e=>{if(this.disabled)return;let n=this.max-this.min,r=Dy(n,this.stops,this.step,e.shiftKey),i=!1;switch(e.key){case`ArrowUp`:case`ArrowRight`:this.#_(r/n,!0),i=!0;break;case`ArrowDown`:case`ArrowLeft`:this.#_(-r/n,!0),i=!0;break;case`Home`:this.#u(0,!0),i=!0;break;case`End`:this.#u(1,!0),i=!0}i&&e.preventDefault()},this.#t.set(`track`,{key:`track`,value:1,type:`fixed`,offset:0,width:.16}),this.#t.set(`value`,{key:`value`,value:0,type:`value`,offset:0,width:.24})}addLane(e,n){let r=this.#s();this.#t.set(e,{key:e,value:n?.value??r,type:n?.type??`value`,offset:n?.offset??0,width:n?.width??.1}),this.requestUpdate()}setLaneValue(e,n){let r=this.#t.get(e);r&&(r.value=MC(n,0,1),this.requestUpdate())}removeLane(e){this.#t.delete(e),this.requestUpdate()}getLanes(){return new Map(this.#t)}getLane(e){return this.#t.get(e)}#s(){return NC(this.value,this.min,this.max,0,1)}#c(){return this.valueMode===`unipolar`&&this.markerStyle===`needle`?`none`:this.markerStyle}#l(e){if(this.stops&&this.stops>1){let n=(this.max-this.min)/this.stops;return Math.round((e-this.min)/n)*n+this.min}return e}#u(e,n=!1){let r=NC(e,0,1,this.min,this.max),i=this.#l(MC(r,this.min,this.max));if(i===this.value)return;let a=this.value;this.value=i,this.#o=n;let o=this.#t.get(`value`);if(o&&o.type===`value`&&(o.value=this.#s()),this.hasAttribute(`data-tooltip-live`)){let e=Math.round(this.#s()*100);this.setAttribute(`data-tooltip`,`${e}%`)}n?(this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value,valueRelative:this.#s()},bubbles:!0,composed:!0})),this.#d(a)):this.#f(a)}#d(e){this.#a!==void 0&&clearTimeout(this.#a),this.#a=window.setTimeout(()=>{this.#f(e),this.#a=void 0},150)}#f(e){this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value,valueRelative:this.#s(),previousValue:e},bubbles:!0,composed:!0}))}#p;#m;#h;#g;#_(e,n){this.#u(MC(this.#s()+e,0,1),n)}_applyWheelDelta(e,n){let r=this.max-this.min,i=Dy(r,this.stops,this.step,n.shiftKey);this.#_(-e*i/r,!0)}#v(){let e=DC(this.radius,this.flatten,PC),n=this.#T(`--dial-border-width`,2),r=getComputedStyle(this).getPropertyValue(`--dial-border-color`).trim()||`var(--surface-4)`;return s`<path class="dial-border" d="${e}" fill="none" stroke="${r}" stroke-width="${n}" stroke-linecap="round" vector-effect="non-scaling-stroke" />`}#y(){let e=DC(this.radius,this.flatten,PC),n=getComputedStyle(this).getPropertyValue(`--dial-fill`).trim()||`transparent`;return s`<path class="dial-fill" d="${e}" fill="${n}" />`}#b(){let{startAngle:e,endAngle:n,clockwise:r}=kC(this.#s(),this.valueMode,this.flatten),i=OC(e,n,this.radius,PC,r);return i?s`<path class="wedge" d="${i}" />`:s``}#x(e){let n=``;if(e.type===`fixed`)n=DC(this.radius-e.offset*this.radius,this.flatten,PC);else if(e.type===`anchored`){let{startAngle:r,endAngle:i}=TC(this.#s(),e.value,this.valueMode,this.flatten);n=EC(r,i,this.radius-e.offset*this.radius,PC)}else{let{startAngle:r,endAngle:i}=wC(e.value,this.valueMode,this.flatten);n=EC(r,i,this.radius-e.offset*this.radius,PC)}return n?s`
8945
+ `]}};E([d({type:Object})],bC.prototype,`root`,void 0),E([d({attribute:!1})],bC.prototype,`model`,void 0),E([d({attribute:!1})],bC.prototype,`loadChildren`,void 0),E([d({reflect:!0,attribute:`exclusivity`})],bC.prototype,`exclusivity`,void 0),E([d({reflect:!0,attribute:`selection-filter`})],bC.prototype,`selectionFilter`,void 0),E([d({type:String,attribute:`interaction-mode`})],bC.prototype,`interactionMode`,void 0),E([d({type:String,reflect:!0})],bC.prototype,`orientation`,void 0),E([d({type:Number,attribute:`max-depth`})],bC.prototype,`maxDepth`,void 0),E([d({type:Number,attribute:`min-label-width`})],bC.prototype,`minLabelWidth`,void 0),E([d({type:Number,attribute:`min-vertical-label-width`})],bC.prototype,`minVerticalLabelWidth`,void 0),E([d({type:Boolean,attribute:`hide-leaves`,reflect:!0})],bC.prototype,`hideLeaves`,void 0),E([d({attribute:!1})],bC.prototype,`valueAccessor`,void 0),E([d({attribute:!1})],bC.prototype,`selectedNode`,void 0),E([m()],bC.prototype,`_selectedNodes`,void 0),E([d({attribute:!1})],bC.prototype,`filterPredicate`,void 0),E([d({type:Boolean,attribute:`disable-keyboard-navigation`})],bC.prototype,`disableKeyboardNavigation`,void 0),E([d({attribute:!1})],bC.prototype,`registry`,void 0),E([d({type:String,attribute:`search-modes`,reflect:!0})],bC.prototype,`searchModes`,void 0),E([m()],bC.prototype,`_zoomKey`,void 0),E([f(`#icicle-tooltip`)],bC.prototype,`_tooltipEl`,void 0),bC=E([T(`ixfx-icicletree-list`)],bC);const xC=Math.PI*2,SC=-Math.PI/2;function CC(e,n,r={x:50,y:50}){return{x:r.x+Math.cos(e)*n,y:r.y+Math.sin(e)*n}}function wC(e){let n=xC*(1-e)/2,r=-Math.PI/2,i=r-n,a=r+n;return{startAngle:i,endAngle:a,totalArc:a-i}}function TC(e,n,r){let{startAngle:i,endAngle:a,totalArc:o}=wC(r);switch(n){case`range`:return i+e*o;case`bipolar`:if(e<=.5)return i+e/.5*(SC-i);{let n=(e-.5)/.5;return SC+n*(a-SC)}case`unipolar`:return SC;default:return i}}function EC(e,n,r){let{startAngle:i,endAngle:a,totalArc:o}=wC(r);switch(n){case`range`:return{startAngle:i,endAngle:i+e*o};case`bipolar`:if(e<.5)return{startAngle:i+e/.5*(SC-i),endAngle:SC};if(e>.5){let n=(e-.5)/.5,r=SC+n*(a-SC);return{startAngle:SC,endAngle:r}}return{startAngle:SC,endAngle:SC};case`unipolar`:{let n=e*o/2;return{startAngle:SC-n,endAngle:SC+n}}default:return{startAngle:i,endAngle:i}}}function DC(e,n,r,i){let{startAngle:a,endAngle:o,totalArc:s}=wC(i),c=TC(e,r,i),l=n*s/2,u=c-l,d=c+l;return u<a&&(u=a),d>o&&(d=o),u>=d?{startAngle:c,endAngle:c}:{startAngle:u,endAngle:d}}function OC(e,n,r,i={x:50,y:50}){if(e===n)return``;let a=n-e;if(a<0&&(a+=xC),a>=xC-.001){let n=e+xC-.001,a=CC(e,r,i),o=CC(n,r,i);return`M ${a.x},${a.y} A ${r},${r} 0 1 1 ${o.x},${o.y}`}let o=CC(e,r,i),s=CC(n,r,i),c=+(a>Math.PI);return`M ${o.x},${o.y} A ${r},${r} 0 ${c} 1 ${s.x},${s.y}`}function kC(e,n,r={x:50,y:50}){let{startAngle:i,endAngle:a}=wC(n);return OC(i,a,e,r)}function AC(e,n,r,i={x:50,y:50},a=!0){if(e===n)return``;let o=n-e;if(o<0&&(o+=xC),o>=xC-.001){let n=CC(e,r,i),o=CC(e+xC-.001,r,i),s=+!!a;return`M ${i.x},${i.y} L ${n.x},${n.y} A ${r},${r} 0 1 ${s} ${o.x},${o.y} Z`}let s=e,c=n,l=a;!a&&o>Math.PI&&(s=n,c=e,l=!0,o=xC-o);let u=CC(s,r,i),d=CC(c,r,i),f=+(o>Math.PI),p=+!!l;return`M ${i.x},${i.y} L ${u.x},${u.y} A ${r},${r} 0 ${f} ${p} ${d.x},${d.y} Z`}function jC(e,n,r){let{startAngle:i,totalArc:a}=wC(r),o=TC(e,n,r);switch(n){case`range`:return{startAngle:i,endAngle:o,clockwise:!0};case`bipolar`:return e<.5?{startAngle:SC,endAngle:o,clockwise:!1}:{startAngle:SC,endAngle:o,clockwise:!0};case`unipolar`:{let n=e*a/2;return{startAngle:SC-n,endAngle:SC+n,clockwise:!0}}default:return{startAngle:i,endAngle:i,clockwise:!0}}}function MC(e,n,r,i,a={x:50,y:50}){let o=TC(e,n,r);return{angle:o,position:CC(o,i,a)}}function NC(e,n={x:50,y:50}){let r=CC(SC,e,n);return{angle:SC,position:r}}function PC(e,n,r){return Math.min(Math.max(e,n),r)}function FC(e,n,r,i,a){return i+(e-n)/(r-n)*(a-i)}const IC={x:50,y:50};let LC=class extends Oy(n){#e;get radius(){return this.#e}set radius(e){this.#e=PC(e,10,50)}#t;#n;#r;#i;#a;#o;constructor(){super(),this.#e=45,this.value=0,this.min=0,this.max=100,this.step=void 0,this.valueMode=`range`,this.flatten=.3,this.markerStyle=`needle`,this.wedge=!1,this.disabled=!1,this.#t=new Map,this.#n=!1,this.#r=0,this.#i=0,this.#o=!1,this.#p=e=>{if(this.disabled)return;e.preventDefault();let n=this.renderRoot.querySelector(`svg`);n?.focus(),this.#n=!0,this.#r=e.clientY,this.#i=this.value,this.toggleAttribute(`dragging`,!0),n&&n.setPointerCapture(e.pointerId),window.addEventListener(`pointermove`,this.#m),window.addEventListener(`pointerup`,this.#h),window.addEventListener(`pointercancel`,this.#h)},this.#m=e=>{if(!this.#n)return;e.preventDefault();let n=this.clientHeight*2*(e.shiftKey?10:1),r=(this.#r-e.clientY)/n*(this.max-this.min),i=FC(this.#i+r,this.min,this.max,0,1);this.#u(PC(i,0,1),!0)},this.#h=()=>{this.#n=!1,this.toggleAttribute(`dragging`,!1);let e=this.renderRoot.querySelector(`svg`);e&&`hasPointerCapture`in e&&typeof e.hasPointerCapture==`function`&&e.hasPointerCapture(1)&&e.releasePointerCapture(1),window.removeEventListener(`pointermove`,this.#m),window.removeEventListener(`pointerup`,this.#h),window.removeEventListener(`pointercancel`,this.#h)},this.#g=e=>{if(this.disabled)return;let n=this.max-this.min,r=Dy(n,this.stops,this.step,e.shiftKey),i=!1;switch(e.key){case`ArrowUp`:case`ArrowRight`:this.#_(r/n,!0),i=!0;break;case`ArrowDown`:case`ArrowLeft`:this.#_(-r/n,!0),i=!0;break;case`Home`:this.#u(0,!0),i=!0;break;case`End`:this.#u(1,!0),i=!0}i&&e.preventDefault()},this.#t.set(`track`,{key:`track`,value:1,type:`fixed`,offset:0,width:.16}),this.#t.set(`value`,{key:`value`,value:0,type:`value`,offset:0,width:.24})}addLane(e,n){let r=this.#s();this.#t.set(e,{key:e,value:n?.value??r,type:n?.type??`value`,offset:n?.offset??0,width:n?.width??.1}),this.requestUpdate()}setLaneValue(e,n){let r=this.#t.get(e);r&&(r.value=PC(n,0,1),this.requestUpdate())}removeLane(e){this.#t.delete(e),this.requestUpdate()}getLanes(){return new Map(this.#t)}getLane(e){return this.#t.get(e)}#s(){return FC(this.value,this.min,this.max,0,1)}#c(){return this.valueMode===`unipolar`&&this.markerStyle===`needle`?`none`:this.markerStyle}#l(e){if(this.stops&&this.stops>1){let n=(this.max-this.min)/this.stops;return Math.round((e-this.min)/n)*n+this.min}return e}#u(e,n=!1){let r=FC(e,0,1,this.min,this.max),i=this.#l(PC(r,this.min,this.max));if(i===this.value)return;let a=this.value;this.value=i,this.#o=n;let o=this.#t.get(`value`);if(o&&o.type===`value`&&(o.value=this.#s()),this.hasAttribute(`data-tooltip-live`)){let e=Math.round(this.#s()*100);this.setAttribute(`data-tooltip`,`${e}%`)}n?(this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value,valueRelative:this.#s()},bubbles:!0,composed:!0})),this.#d(a)):this.#f(a)}#d(e){this.#a!==void 0&&clearTimeout(this.#a),this.#a=window.setTimeout(()=>{this.#f(e),this.#a=void 0},150)}#f(e){this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value,valueRelative:this.#s(),previousValue:e},bubbles:!0,composed:!0}))}#p;#m;#h;#g;#_(e,n){this.#u(PC(this.#s()+e,0,1),n)}_applyWheelDelta(e,n){let r=this.max-this.min,i=Dy(r,this.stops,this.step,n.shiftKey);this.#_(-e*i/r,!0)}#v(){let e=kC(this.radius,this.flatten,IC),n=this.#T(`--dial-border-width`,2),r=getComputedStyle(this).getPropertyValue(`--dial-border-color`).trim()||`var(--surface-4)`;return s`<path class="dial-border" d="${e}" fill="none" stroke="${r}" stroke-width="${n}" stroke-linecap="round" vector-effect="non-scaling-stroke" />`}#y(){let e=kC(this.radius,this.flatten,IC),n=getComputedStyle(this).getPropertyValue(`--dial-fill`).trim()||`transparent`;return s`<path class="dial-fill" d="${e}" fill="${n}" />`}#b(){let{startAngle:e,endAngle:n,clockwise:r}=jC(this.#s(),this.valueMode,this.flatten),i=AC(e,n,this.radius,IC,r);return i?s`<path class="wedge" d="${i}" />`:s``}#x(e){let n=``;if(e.type===`fixed`)n=kC(this.radius-e.offset*this.radius,this.flatten,IC);else if(e.type===`anchored`){let{startAngle:r,endAngle:i}=DC(this.#s(),e.value,this.valueMode,this.flatten);n=OC(r,i,this.radius-e.offset*this.radius,IC)}else{let{startAngle:r,endAngle:i}=EC(e.value,this.valueMode,this.flatten);n=OC(r,i,this.radius-e.offset*this.radius,IC)}return n?s`
8915
8946
  <path
8916
8947
  class="lane"
8917
8948
  data-lane-key="${e.key}"
@@ -8922,7 +8953,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8922
8953
  stroke-linecap: round;
8923
8954
  "
8924
8955
  />
8925
- `:s``}#S(e,n,r){let i=r*this.radius,a=n*this.radius,o={x:PC.x+Math.cos(e)*i,y:PC.y+Math.sin(e)*i},s={x:PC.x+Math.cos(e)*a,y:PC.y+Math.sin(e)*a};return`M ${o.x} ${o.y} L ${s.x} ${s.y}`}#C(e){let{angle:n,position:r}=AC(this.#s(),this.valueMode,this.flatten,this.radius,PC),i=this.#T(`--marker-offset`,1),a=this.#T(`--marker-border-width`,0),o=this.#c();if(o===`dot`){let e=this.#T(`--marker-thickness`,.15)*this.radius,n=PC.x+(r.x-PC.x)*i,o=PC.y+(r.y-PC.y)*i;return a>0?s`
8956
+ `:s``}#S(e,n,r){let i=r*this.radius,a=n*this.radius,o={x:IC.x+Math.cos(e)*i,y:IC.y+Math.sin(e)*i},s={x:IC.x+Math.cos(e)*a,y:IC.y+Math.sin(e)*a};return`M ${o.x} ${o.y} L ${s.x} ${s.y}`}#C(e){let{angle:n,position:r}=MC(this.#s(),this.valueMode,this.flatten,this.radius,IC),i=this.#T(`--marker-offset`,1),a=this.#T(`--marker-border-width`,0),o=this.#c();if(o===`dot`){let e=this.#T(`--marker-thickness`,.15)*this.radius,n=IC.x+(r.x-IC.x)*i,o=IC.y+(r.y-IC.y)*i;return a>0?s`
8926
8957
  <g class="value-marker" part="value-marker">
8927
8958
  <use href="#dot-path" class="marker-border" />
8928
8959
  <use href="#dot-path" class="marker-fill" />
@@ -8940,7 +8971,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8940
8971
  <g class="value-marker" part="value-marker">
8941
8972
  <path d="${o}" />
8942
8973
  </g>
8943
- `}}#w(){if(this.valueMode!==`bipolar`&&this.valueMode!==`unipolar`)return s``;let{position:e}=jC(this.radius,PC);if(this.markerStyle===`dot`){let n=this.#T(`--midpoint-thickness`,.08);return s`
8974
+ `}}#w(){if(this.valueMode!==`bipolar`&&this.valueMode!==`unipolar`)return s``;let{position:e}=NC(this.radius,IC);if(this.markerStyle===`dot`){let n=this.#T(`--midpoint-thickness`,.08);return s`
8944
8975
  <g class="midpoint-marker" part="midpoint-marker">
8945
8976
  <circle
8946
8977
  cx="${e.x}"
@@ -8948,7 +8979,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8948
8979
  r="${n*this.radius}"
8949
8980
  />
8950
8981
  </g>
8951
- `}{let e=this.#T(`--midpoint-length`,.15),n=this.#T(`--midpoint-offset`,.85),r=-Math.PI/2,i=n*this.radius,a=(n+e)*this.radius,o={x:PC.x+Math.cos(r)*i,y:PC.y+Math.sin(r)*i},c={x:PC.x+Math.cos(r)*a,y:PC.y+Math.sin(r)*a};return s`
8982
+ `}{let e=this.#T(`--midpoint-length`,.15),n=this.#T(`--midpoint-offset`,.85),r=-Math.PI/2,i=n*this.radius,a=(n+e)*this.radius,o={x:IC.x+Math.cos(r)*i,y:IC.y+Math.sin(r)*i},c={x:IC.x+Math.cos(r)*a,y:IC.y+Math.sin(r)*a};return s`
8952
8983
  <g class="midpoint-marker" part="midpoint-marker">
8953
8984
  <line
8954
8985
  x1="${o.x}"
@@ -8957,7 +8988,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
8957
8988
  y2="${c.y}"
8958
8989
  />
8959
8990
  </g>
8960
- `}}#T(e,n){let r=getComputedStyle(this),i=r.getPropertyValue(e).trim();if(!i)return n;if(i.includes(`calc(`)){let e=r.getPropertyValue(`--value-relative`).trim();if(!e){let e=Number.parseFloat(i.replace(/[^0-9.-]/g,``));return Number.isNaN(e)?n:e}let a=i.replace(/var\(--value-relative\)/g,e);try{let e=Function(`return ${a.replace(/calc\s*\(([^)]+)\)/g,`$1`)}`)();return typeof e==`number`&&!Number.isNaN(e)?e:n}catch{let e=Number.parseFloat(i.replace(/[^0-9.-]/g,``));return Number.isNaN(e)?n:e}}let a=Number.parseFloat(i);return Number.isNaN(a)?n:a}willUpdate(e){if(super.willUpdate(e),e.has(`value`)||!this.hasUpdated){let e=this.#t.get(`value`);e&&e.type===`value`&&(e.value=this.#s())}}render(){let e=Array.from(this.#t.values()),{angle:n,position:r}=AC(this.#s(),this.valueMode,this.flatten,this.radius,PC),a=this.#T(`--marker-length`,.8),o=this.#T(`--marker-offset`,.2),c=this.#T(`--marker-border-width`,0),l=c>0?this.#S(n,a,o):void 0,u=this.#T(`--marker-thickness`,.15)*this.radius,d=[];return l&&d.push(s`<path id="needle-path" d="${l}" />`),c>0&&d.push(s`<circle id="dot-path" cx="${r.x}" cy="${r.y}" r="${u}" />`),i`
8991
+ `}}#T(e,n){let r=getComputedStyle(this),i=r.getPropertyValue(e).trim();if(!i)return n;if(i.includes(`calc(`)){let e=r.getPropertyValue(`--value-relative`).trim();if(!e){let e=Number.parseFloat(i.replace(/[^0-9.-]/g,``));return Number.isNaN(e)?n:e}let a=i.replace(/var\(--value-relative\)/g,e);try{let e=Function(`return ${a.replace(/calc\s*\(([^)]+)\)/g,`$1`)}`)();return typeof e==`number`&&!Number.isNaN(e)?e:n}catch{let e=Number.parseFloat(i.replace(/[^0-9.-]/g,``));return Number.isNaN(e)?n:e}}let a=Number.parseFloat(i);return Number.isNaN(a)?n:a}willUpdate(e){if(super.willUpdate(e),e.has(`value`)||!this.hasUpdated){let e=this.#t.get(`value`);e&&e.type===`value`&&(e.value=this.#s())}}render(){let e=Array.from(this.#t.values()),{angle:n,position:r}=MC(this.#s(),this.valueMode,this.flatten,this.radius,IC),a=this.#T(`--marker-length`,.8),o=this.#T(`--marker-offset`,.2),c=this.#T(`--marker-border-width`,0),l=c>0?this.#S(n,a,o):void 0,u=this.#T(`--marker-thickness`,.15)*this.radius,d=[];return l&&d.push(s`<path id="needle-path" d="${l}" />`),c>0&&d.push(s`<circle id="dot-path" cx="${r.x}" cy="${r.y}" r="${u}" />`),i`
8961
8992
  <svg
8962
8993
  viewBox="0 0 100 100"
8963
8994
  preserveAspectRatio="xMidYMid meet"
@@ -9091,7 +9122,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9091
9122
  stroke-width: var(--midpoint-border-width, 0);
9092
9123
  vector-effect: non-scaling-stroke;
9093
9124
  }
9094
- `]}};E([d({type:Number})],FC.prototype,`radius`,null),E([d({type:Number})],FC.prototype,`value`,void 0),E([d({type:Number})],FC.prototype,`min`,void 0),E([d({type:Number})],FC.prototype,`max`,void 0),E([d({type:Number})],FC.prototype,`step`,void 0),E([d({type:Number})],FC.prototype,`stops`,void 0),E([d({type:String,attribute:`value-mode`})],FC.prototype,`valueMode`,void 0),E([d({type:Number})],FC.prototype,`flatten`,void 0),E([d({type:String,attribute:`marker-style`})],FC.prototype,`markerStyle`,void 0),E([d({type:Boolean})],FC.prototype,`wedge`,void 0),E([d({type:Boolean,reflect:!0})],FC.prototype,`disabled`,void 0),FC=E([T(`ixfx-radial-input`)],FC);let IC=class extends ag{constructor(...e){super(...e),this.inputSelector=`ixfx-radial-input`,this.max=100,this.step=1,this.radius=45,this.flatten=.3,this.markerStyle=`needle`,this.wedge=!1,this.valueMode=`range`,this.tooltip=!1,this.flip=!1,this.aspectRatioThreshold=1.5,this.lighttouch=!1,this._isWide=!1}_getEffectivePrecision(){if(this.hasAttribute(`precision`))return this.precision;if(this.step!==void 0){let e=String(this.step).split(`.`)[1];return e?e.length:0}return this.max-this.min>10?0:2}_handleResize(e){super._handleResize(e);let{width:n,height:r}=e[0].contentRect;this._isWide=r>0&&n/r>=this.aspectRatioThreshold}_renderEditableNumber(){if(this._isMini)return a;let e=Math.max(this.label?.length??0,3)+1;return i`
9125
+ `]}};E([d({type:Number})],LC.prototype,`radius`,null),E([d({type:Number})],LC.prototype,`value`,void 0),E([d({type:Number})],LC.prototype,`min`,void 0),E([d({type:Number})],LC.prototype,`max`,void 0),E([d({type:Number})],LC.prototype,`step`,void 0),E([d({type:Number})],LC.prototype,`stops`,void 0),E([d({type:String,attribute:`value-mode`})],LC.prototype,`valueMode`,void 0),E([d({type:Number})],LC.prototype,`flatten`,void 0),E([d({type:String,attribute:`marker-style`})],LC.prototype,`markerStyle`,void 0),E([d({type:Boolean})],LC.prototype,`wedge`,void 0),E([d({type:Boolean,reflect:!0})],LC.prototype,`disabled`,void 0),LC=E([T(`ixfx-radial-input`)],LC);let RC=class extends ag{constructor(...e){super(...e),this.inputSelector=`ixfx-radial-input`,this.max=100,this.step=1,this.radius=45,this.flatten=.3,this.markerStyle=`needle`,this.wedge=!1,this.valueMode=`range`,this.tooltip=!1,this.flip=!1,this.aspectRatioThreshold=1.5,this.lighttouch=!1,this._isWide=!1}_getEffectivePrecision(){if(this.hasAttribute(`precision`))return this.precision;if(this.step!==void 0){let e=String(this.step).split(`.`)[1];return e?e.length:0}return this.max-this.min>10?0:2}_handleResize(e){super._handleResize(e);let{width:n,height:r}=e[0].contentRect;this._isWide=r>0&&n/r>=this.aspectRatioThreshold}_renderEditableNumber(){if(this._isMini)return a;let e=Math.max(this.label?.length??0,3)+1;return i`
9095
9126
  <ixfx-editable-number
9096
9127
  class="number"
9097
9128
  mode="label"
@@ -9202,8 +9233,8 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9202
9233
  width: 100%;
9203
9234
  height: 100%;
9204
9235
  }
9205
- `]}};E([d({type:Number})],IC.prototype,`radius`,void 0),E([d({type:Number})],IC.prototype,`flatten`,void 0),E([d({type:String,attribute:`marker-style`})],IC.prototype,`markerStyle`,void 0),E([d({type:Boolean})],IC.prototype,`wedge`,void 0),E([d({type:String,attribute:`value-mode`})],IC.prototype,`valueMode`,void 0),E([d({type:Boolean})],IC.prototype,`tooltip`,void 0),E([d({type:Boolean})],IC.prototype,`flip`,void 0),E([d({type:Number,attribute:`aspect-ratio-threshold`})],IC.prototype,`aspectRatioThreshold`,void 0),E([d({type:Boolean})],IC.prototype,`lighttouch`,void 0),E([m()],IC.prototype,`_isWide`,void 0),IC=E([T(`ixfx-labelled-radial-input`)],IC);function LC(e,n=24,r=5,i=5){let a=r,o=100-i;return{trackStart:a,trackEnd:o,centre:(a+o)/2,cross:n,crossCentre:n/2}}function RC(e,n,r,i){let a=r.trackEnd-r.trackStart,o=r.centre,s=r.crossCentre,c;if(n===`range`)c=r.trackStart+e*a;else if(n===`bipolar`){if(e<=.5){let n=e/.5;c=r.trackStart+n*(o-r.trackStart)}else c=o+(e-.5)/.5*(r.trackEnd-o)}else c=o+e*a/2;return i===`horizontal`?{x:c,y:s}:{x:s,y:100-c}}function zC(e,n,r,i,a){if(r===`unipolar`){let e=i.trackEnd-i.trackStart,r=i.centre,o=i.crossCentre,s=n*e/2;return a===`horizontal`?{start:{x:r-s,y:o},end:{x:r+s,y:o}}:{start:{x:o,y:r-s},end:{x:o,y:r+s}}}return{start:RC(e,r,i,a),end:RC(n,r,i,a)}}function BC(e,n,r,i,a){let o=n*(i.trackEnd-i.trackStart)/2,s=r===`unipolar`?a===`horizontal`?{x:i.centre,y:i.crossCentre}:{x:i.crossCentre,y:i.centre}:RC(e,r,i,a),c,l;return a===`horizontal`?(c=s.x-o,l=s.x+o):(c=s.y-o,l=s.y+o),{start:a===`horizontal`?{x:c,y:s.y}:{x:s.x,y:c},end:a===`horizontal`?{x:l,y:s.y}:{x:s.x,y:l}}}function VC(e,n){return Math.abs(e.x-n.x)<.001&&Math.abs(e.y-n.y)<.001?``:`M ${e.x} ${e.y} L ${n.x} ${n.y}`}function Y(e,n,r){return Math.min(Math.max(e,n),r)}function HC(e,n,r,i,a){return r===n?i:i+(e-n)/(r-n)*(a-i)}function UC(e,n,r){return HC(e,n,r,0,1)}const WC=.06;function GC(e){let n=0,r=()=>{for(;n<e.length;){let r=e[n];if(r!==` `&&r!==` `&&r!==`
9206
- `&&r!==`\r`)break;n++}};function i(){r();let i=/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i.exec(e.slice(n));if(i)return n+=i[0].length,Number.parseFloat(i[0])}function a(){r();let o=e[n];if(o===`+`||o===`-`){n++;let e=a();return e===void 0?void 0:o===`-`?-e:e}if(o===`(`){n++;let i=s();return i===void 0||(r(),e[n]!==`)`)?void 0:(n++,i)}return i()}function o(){let i=a();if(i!==void 0)for(;;){r();let o=e[n];if(o!==`*`&&o!==`/`)return i;n++;let s=a();if(s===void 0)return;i=o===`*`?i*s:i/s}}function s(){let i=o();if(i!==void 0)for(;;){r();let a=e[n];if(a!==`+`&&a!==`-`)return i;n++;let s=o();if(s===void 0)return;i=a===`+`?i+s:i-s}}let c=s();if(c!==void 0)return r(),n===e.length?c:void 0}let KC=class extends Oy(n){#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;constructor(){super(),this.valueA=50,this.valueB=0,this.valueC=void 0,this.min=0,this.max=100,this.step=void 0,this.stops=void 0,this.valueMode=`single`,this.singleStyle=`range`,this.orientation=`horizontal`,this.markerStyle=`needle`,this.markerStyleC=void 0,this.crossover=`allow`,this.valueDrag=`none`,this.valueCFollow=`none`,this.valueMin=1,this.disabled=!1,this.swipeable=!1,this.#e=new Map,this.#t=50,this.#n=0,this.#r=void 0,this.#i=!1,this.#a=void 0,this.#o=0,this.#s=0,this.#c=void 0,this.#l=void 0,this.#u=void 0,this.#d=void 0,this.#f=0,this.#p=0,this.#m=0,this.#h=`a`,this.#g={x:0,y:0},this.#_=void 0,this.#v=!1,this.#y=!1,this.#C=()=>{let e=this.getBoundingClientRect(),n=this.orientation===`vertical`?e.width:e.height,r=this.orientation===`vertical`?e.height:e.width;(n!==this.#$||r!==this.#ee)&&this.requestUpdate()},this.#w=e=>{this.#be(e)},this.#E=()=>{let e=this.querySelectorAll(`linearGradient, radialGradient`);if(e.length===0)return;let n=this.#T();for(let r of e)n.append(r)},this.#q=24,this.#J=5,this.#Y=5,this.#Q=0,this.#$=0,this.#ee=0,this.#pe=e=>{!this.swipeable||this.disabled||(e.preventDefault(),this.#fe(e))},this.#me=e=>{!this.swipeable||this.disabled||e.buttons===0||this.#fe(e)},this.#he=e=>{!this.swipeable||this.disabled||e.buttons===0||this.#fe(e)},this.#ge=e=>{if(this.disabled||this.swipeable)return;let n=this.renderRoot.querySelector(`svg.slider-svg`);if(!n)return;e.preventDefault(),this.focus(),n.style.cursor=`grabbing`;let r=this.orientation===`vertical`?e.clientY:e.clientX,i=this.#le(r);if(this.valueMode===`single`&&this.singleStyle===`unipolar`&&(i=Math.abs(2*i-1)),this.valueMode===`single`){this.#h=`a`,this.#c=`a`,this.#I(i,!0),this.#i=!0,this.toggleAttribute(`dragging`,!0),this.#a=e.pointerId;try{n.setPointerCapture(e.pointerId)}catch{}this.#o=r,this.#s=this.valueA,window.addEventListener(`pointermove`,this.#_e),window.addEventListener(`pointerup`,this.#ye),window.addEventListener(`pointercancel`,this.#ye);return}let a=this.#D(),o=this.#O(),s=Math.min(a,o),c=Math.max(a,o),l=this.#t<=this.#n?`a`:`b`,u=this.#t>this.#n?`a`:`b`,d=a,f=o,p=this.valueMode===`triple`,m=p?this.#k():0,h=Math.abs(i-d)<WC,g=Math.abs(i-f)<WC,_=p&&Math.abs(i-m)<WC,v,y=e=>e.find(e=>e!==this.#h)??e[0];v=h&&g&&_?y([l,u,`c`]):h&&g?y([l,u]):h&&_?y([l,`c`]):g&&_?y([u,`c`]):h?l:g?u:_?`c`:this.valueDrag!==`none`&&i>s&&i<c?`length`:this.valueDrag===`none`&&i<=s?this.#M():this.valueDrag===`none`&&i>=c?this.#N():void 0,this.#i=!0,this.toggleAttribute(`dragging`,!0),this.#a=e.pointerId;try{n.setPointerCapture(e.pointerId)}catch{}if(this.#o=r,v===void 0){window.addEventListener(`pointermove`,this.#_e),window.addEventListener(`pointerup`,this.#ye),window.addEventListener(`pointercancel`,this.#ye);return}this.#c=v,v===`length`?(this.#l={poleA:this.#t,poleB:this.#n},this.#u=this.#M(),this.#d=this.#N(),this.#f=this.#n-this.#t<0?this.#t-this.#n:this.#n-this.#t,this.#p=Math.min(this.#t,this.#n),this.#m=i):(this.#h=v,this.#s=v===`a`?this.#t:this.#n,this.#L(i,v,!0)),window.addEventListener(`pointermove`,this.#_e),window.addEventListener(`pointerup`,this.#ye),window.addEventListener(`pointercancel`,this.#ye)},this.#_e=e=>{if(!this.#i)return;e.preventDefault();let n=this.orientation===`vertical`?e.clientY:e.clientX,r=this.#le(n);if(this.valueMode===`single`&&this.singleStyle===`unipolar`&&(r=Math.abs(2*r-1)),this.valueMode===`single`){this.#I(r,!0);return}this.#c===`length`?this.#ve(r):this.#c&&this.#L(r,this.#c,!0)},this.#ye=()=>{this.#i=!1,this.#c=void 0,this.#l=void 0,this.#u=void 0,this.#d=void 0,this.toggleAttribute(`dragging`,!1),this.#Ne(new PointerEvent(`pointermove`,{clientX:this.#g.x,clientY:this.#g.y}));let e=this.renderRoot.querySelector(`svg.slider-svg`);if(e&&this.#a!==void 0&&`hasPointerCapture`in e&&typeof e.hasPointerCapture==`function`&&e.hasPointerCapture.call(e,this.#a))try{e.releasePointerCapture(this.#a)}catch{}this.#a=void 0,window.removeEventListener(`pointermove`,this.#_e),window.removeEventListener(`pointerup`,this.#ye),window.removeEventListener(`pointercancel`,this.#ye)},this.#be=e=>{if(this.disabled)return;let n=this.max-this.min,r=Dy(n,this.stops,this.step,e.shiftKey),i=`a`,a=e.target;if(a&&typeof a.closest==`function`){let e=a.closest(`[data-handle]`);if(e){let n=e.dataset?.handle;(n===`a`||n===`b`||n===`c`)&&(i=n)}}this.valueMode===`single`&&(i=`a`),this.#h=i;let o=!1;switch(e.key){case`ArrowUp`:case`ArrowRight`:if(this.valueMode===`single`){let e=this.#D()+r/n;this.#I(Y(e,0,1),!0)}else{let e=UC(i===`a`?this.#t:i===`b`?this.#n:this.#r??this.#A(),this.min,this.max)+r/n;this.#xe(i,e)}o=!0;break;case`ArrowDown`:case`ArrowLeft`:if(this.valueMode===`single`){let e=this.#D()-r/n;this.#I(Y(e,0,1),!0)}else{let e=UC(i===`a`?this.#t:i===`b`?this.#n:this.#r??this.#A(),this.min,this.max)-r/n;this.#xe(i,e)}o=!0;break;case`Home`:this.valueMode===`single`?this.#I(0,!0):this.#xe(i,0),o=!0;break;case`End`:this.valueMode===`single`?this.#I(1,!0):this.#xe(i,1),o=!0}o&&e.preventDefault()},this.#Se=e=>{let n=e.target;if(n&&typeof n.closest==`function`){let e=n.closest(`[data-handle]`);if(e){let n=e.dataset?.handle;(n===`a`||n===`b`||n===`c`)&&(this.#h=n)}}},this.#Ne=e=>{let n=this.renderRoot.querySelector(`svg.slider-svg`);if(!n)return;this.#g={x:e.clientX,y:e.clientY};let r=this.orientation===`vertical`?e.clientY:e.clientX,i=this.#le(r),a=this.#Me(i);n.style.cursor!==a&&(n.style.cursor=a)},this.#Pe=()=>{let e=this.renderRoot.querySelector(`svg.slider-svg`);if(!e)return;let n=this.disabled?`not-allowed`:`default`;e.style.cursor!==n&&(e.style.cursor=n)},this.disabled||this.setAttribute(`tabindex`,`0`),this.#e.set(`track`,{key:`track`,value:1,type:`fixed`,offset:0,width:.16}),this.#e.set(`value`,{key:`value`,valueMin:0,valueMax:0,type:`value`,offset:0,width:.24})}connectedCallback(){super.connectedCallback(),this.setAttribute(`tabindex`,this.disabled?`-1`:`0`),this.addEventListener(`keydown`,this.#w),this.addEventListener(`pointerdown`,this.#pe),this.addEventListener(`pointermove`,this.#me),this.addEventListener(`pointerenter`,this.#he),this.#E(),this.#x=new MutationObserver(this.#E),this.#x.observe(this,{childList:!0,subtree:!0}),this.#S=new ResizeObserver(this.#C),this.#S.observe(this)}#C;#w;#T(){if(this.#b)return this.#b;let e=`http://www.w3.org/2000/svg`,n=document.createElementNS(e,`svg`);n.setAttribute(`width`,`0`),n.setAttribute(`height`,`0`),n.setAttribute(`aria-hidden`,`true`),n.style.cssText=`position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none;`;let r=document.createElementNS(e,`defs`);return n.append(r),this.renderRoot.append(n),this.#b=r,r}#E;addLane(e,n){let r=this.#D();this.#e.set(e,{key:e,value:n?.value??r,valueMin:n?.valueMin??0,valueMax:n?.valueMax??r,type:n?.type??`value`,offset:n?.offset??0,width:n?.width??.1}),this.requestUpdate()}setLaneValue(e,n){let r=this.#e.get(e);r&&(r.value=Y(n,0,1),this.requestUpdate())}setLaneRange(e,n,r){let i=this.#e.get(e);if(!i)return;let a=Y(Math.min(n,r),0,1),o=Y(Math.max(n,r),0,1);i.valueMin=a,i.valueMax=o,this.requestUpdate()}removeLane(e){this.#e.delete(e),this.requestUpdate()}getLanes(){return new Map(this.#e)}getLane(e){return this.#e.get(e)}#D(){return UC(this.valueA,this.min,this.max)}#O(){return UC(this.valueB,this.min,this.max)}#k(){return UC(this.valueC??(this.#t+this.#n)/2,this.min,this.max)}#A(){return Math.min(this.#t,this.#n)}#j(){return Math.max(this.#t,this.#n)}#M(){return this.#t<=this.#n?`a`:`b`}#N(){return this.#t>this.#n?`a`:`b`}#P(){let e=this.max-this.min;return this.valueMin&&this.valueMin>0?this.valueMin:e*.01}#F(e){if(this.stops&&this.stops>1){let n=(this.max-this.min)/this.stops;return Y(Math.round((e-this.min)/n)*n+this.min,this.min,this.max)}return this.step!==void 0&&this.step>0?Y(Math.round((e-this.min)/this.step)*this.step+this.min,this.min,this.max):e}#I(e,n=!1){let r=HC(e,0,1,this.min,this.max),i=this.#F(Y(r,this.min,this.max));if(i===this.valueA)return;let a=this.valueA;this.valueA=i,this.#t=i,this.#v=n;let o=this.#e.get(`value`);if(o&&o.type===`value`&&this.#je(o,this.#D()),this.hasAttribute(`data-tooltip-live`)){let e=Math.round(this.#D()*100);this.setAttribute(`data-tooltip`,`${e}%`)}this.#H({previousValue:a},n)}#L(e,n,r=!1){let i=Y(HC(e,0,1,this.min,this.max),this.min,this.max),a=this.#B(n,i,this.#h);if(!a)return;let o={...this.#R()};this.#t=a.poleA,this.#n=a.poleB,a.poleC!==void 0&&(this.#r=a.poleC),this.#z();let s=this.#V(o,this.#R());this.#v=r;let c=this.#e.get(`value`);if(c&&c.type===`value`&&(c.valueMin=UC(this.#A(),this.min,this.max),c.valueMax=UC(this.#j(),this.min,this.max)),this.hasAttribute(`data-tooltip-live`)){let e=Math.round(UC(this.#j(),this.min,this.max)*100);this.setAttribute(`data-tooltip`,`${e}%`)}this.#H({previousValue:Math.max(o.poleA,o.poleB),previousValueMin:Math.min(o.poleA,o.poleB),previousValueMax:Math.max(o.poleA,o.poleB),previousValueC:o.poleC},r,s)}#R(){return{poleA:this.#t,poleB:this.#n,poleC:this.#r}}#z(){this.valueA=this.#t,this.valueB=this.#n,this.valueMode===`triple`&&this.#r!==void 0&&(this.valueC=this.#r,this.#y=!0)}#B(e,n,r){let i=this.#t,a=this.#n,o=this.#r;if(this.valueMode===`triple`&&e===`c`){let e=Y(n,this.#A(),this.#j()),r=this.#F(e);return r===this.#r?null:{poleA:i,poleB:a,poleC:r}}let s=this.#P(),c=e===`a`?a:i,l=this.#F(Y(n,this.min,this.max));if(this.crossover===`none`?l=(e===`a`?i:a)<=c?Math.min(l,c-s):Math.max(l,c+s):l>c-s&&l<c+s&&(l=Math.abs(l-(c-s))<=Math.abs(l-(c+s))?c-s:c+s),l=Y(l,this.min,this.max),e===`a`){if(l===i)return null;i=l}else{if(l===a)return null;a=l}if(this.valueMode===`triple`&&o!==void 0){let e=Math.min(this.#t,this.#n),n=Math.max(this.#t,this.#n),r=Math.min(i,a),s=Math.max(i,a);this.valueCFollow===`proportional`&&n>e?o=r+Y((o-e)/(n-e),0,1)*(s-r):(o<r&&(o=r),o>s&&(o=s))}return{poleA:i,poleB:a,poleC:o}}#V(e,n){let r=e.poleA!==n.poleA,i=e.poleB!==n.poleB,a=e.poleC!==n.poleC;return this.valueMode===`triple`?r&&i&&!a||r&&i?`both`:r?`min`:i?`max`:a?`c`:`min`:r&&i?`both`:r?`min`:i?`max`:`min`}#H(e,n,r){let i=this.#U(r),a=this.#W(e,r);n?(this.dispatchEvent(new CustomEvent(`input`,{detail:i,bubbles:!0,composed:!0})),this.#G(a)):this.#K(a)}#U(e){if(this.valueMode===`single`)return{value:this.valueA,valueRelative:this.#D()};let n=this.#A(),r=this.#j(),i=UC(n,this.min,this.max),a=UC(r,this.min,this.max);return this.valueMode===`triple`&&this.#r!==void 0?{value:r,valueRelative:a,valueMin:n,valueMax:r,valueMinRelative:i,valueMaxRelative:a,valueC:this.#r,valueCRelative:UC(this.#r,this.min,this.max),changed:e}:{value:r,valueRelative:a,valueMin:n,valueMax:r,valueMinRelative:i,valueMaxRelative:a,changed:e}}#W(e,n){if(this.valueMode===`single`)return{value:this.valueA,valueRelative:this.#D(),previousValue:e.previousValue};let r=this.#A(),i=this.#j(),a=UC(i,this.min,this.max);return this.valueMode===`triple`&&this.#r!==void 0?{value:i,valueRelative:a,previousValue:e.previousValue,valueMin:r,valueMax:i,previousValueMin:e.previousValueMin??r,previousValueMax:e.previousValueMax??i,valueC:this.#r,previousValueC:e.previousValueC??this.#r,changed:n}:{value:i,valueRelative:a,previousValue:e.previousValue,valueMin:r,valueMax:i,previousValueMin:e.previousValueMin??r,previousValueMax:e.previousValueMax??i,changed:n}}#G(e){this.#_!==void 0&&clearTimeout(this.#_),this.#_=window.setTimeout(()=>{this.#K(e),this.#_=void 0},150)}#K(e){this.dispatchEvent(new CustomEvent(`change`,{detail:e,bubbles:!0,composed:!0}))}#q;#J;#Y;#X(e,n){let r=getComputedStyle(this),i=e=>{let n=e.trim();if(!n)return;let r=Number.parseFloat(n);return Number.isNaN(r)?void 0:r},a=i(r.getPropertyValue(`--lane-${e}-width`));if(a!==void 0)return a;if(e===`value`){let e=i(r.getPropertyValue(`--lane-track-width`));return e===void 0?n:e}if(e!==`track`){let e=i(r.getPropertyValue(`--lane-width`));if(e!==void 0)return e}return n}#Z(e){let n=e===`track`?.08:e===`value`?.12:.16;return this.#X(e,n)*this.#$}#Q;#$;#ee;#te(){let e=this.getBoundingClientRect(),n=this.orientation===`vertical`?e.width:e.height;if(this.#$=n,this.#ee=this.orientation===`vertical`?e.height:e.width,e.width<=0||e.height<=0){this.#Q=0;return}let r=0;for(let e of this.#e.values()){let i=e.key===`track`?.08:e.key===`value`?.12:.16;r=Math.max(r,Math.abs(this.#X(e.key,i))*n)}this.#Q=r}#ne(){return this.#$<=0?Math.abs(this.#ue(`--marker-thickness`,.15))/2:this.#re()/this.#$}#re(){let e=Math.abs(this.#ue(`--marker-thickness`,.15));return this.#$<=0?0:Math.max(e*this.#$/2,this.#Q/2+1)}#ie(e,n){let r=this.#ee,i=this.#$;if(r<=0||i<=0||n<=0)return{rx:e,ry:e};let a=r/100,o=i/n;return this.orientation===`vertical`?{rx:e/o,ry:e/a}:{rx:e/a,ry:e/o}}#ae(){return this.valueMode===`single`?[this.markerStyle]:this.valueMode===`triple`&&this.markerStyleC?[...new Set([this.markerStyle,this.markerStyleC])]:[this.markerStyle]}#oe(){let e=0;for(let n of this.#e.values()){let r=n.key===`track`?.08:n.key===`value`?.12:.16,i=this.#X(n.key,r);e=Math.max(e,Math.abs(i)/2+Math.abs(n.offset)/2)}let n=Math.abs(this.#ue(`--marker-offset`,0)),r=Math.abs(this.#ue(`--marker-length`,.8)),i=e=>e===`none`?0:e===`dot`?this.#ne()+n/2:r/4+n/2;for(let n of this.#ae())e=Math.max(e,i(n));if(this.valueMode===`single`&&(this.singleStyle===`bipolar`||this.singleStyle===`unipolar`)){let n=Math.abs(this.#ue(`--midpoint-length`,.15));e=Math.max(e,n/4)}let a=Math.abs(this.#ue(`--track-width`,2));return e=Math.max(e,a/2/24),Math.min(e,.45)}#se(){return Y(2/(.5-this.#oe()),4,40)}#ce(e){let n=Math.abs(this.#ue(`--marker-thickness`,.15)),r=this.#ee>0?this.#re()*100/this.#ee:this.#ne()*e,i=0;for(let a of this.#ae())a===`dot`?i=Math.max(i,r):a===`triangle`&&(i=Math.max(i,n*e/4));let a=Y(i+1.5,1,5),o=Math.max(0,this.#ue(`--track-margin`,0)),s=Math.max(0,this.#ue(`--track-margin-start`,o)),c=Math.max(0,this.#ue(`--track-margin-end`,o)),l=a+s,u=a+c;if(l+u>90&&l+u>0){let e=90/(l+u);l*=e,u*=e}return{start:l,end:u}}#le(e){let n=this.getBoundingClientRect(),r=this.orientation===`vertical`,i=r?n.top:n.left,a=r?n.height:n.width;if(a<=0)return 0;let o=i+a*this.#J/100,s=a*(100-this.#J-this.#Y)/100;if(s<=0)return 0;let c=Y((e-o)/s,0,1);return r?1-c:c}#ue(e,n){let r=getComputedStyle(this),i=r.getPropertyValue(e).trim();if(!i)return n;if(i.includes(`calc(`)){let e=r.getPropertyValue(`--value-relative`).trim();if(!e){let e=Number.parseFloat(i.replace(/[^0-9.-]/g,``));return Number.isNaN(e)?n:e}let a=GC(i.replace(/var\(--value-relative\)/g,e).replace(/calc\s*\(([^)]+)\)/g,`$1`));if(a!==void 0)return Number.isNaN(a)?n:a;let o=Number.parseFloat(i.replace(/[^0-9.-]/g,``));return Number.isNaN(o)?n:o}let a=Number.parseFloat(i);return Number.isNaN(a)?n:a}#de(e){let n=this.orientation===`vertical`?e.clientY:e.clientX,r=this.#le(n);return this.valueMode===`single`&&this.singleStyle===`unipolar`?Math.abs(2*r-1):r}#fe(e){this.focus();let n=this.#de(e);if(this.valueMode===`single`){this.#h=`a`,this.#I(n,!0);return}let r=this.#D(),i=this.#O(),a=Math.abs(n-r)<=Math.abs(n-i)?`a`:`b`;if(this.valueMode===`triple`){let e=this.#k(),o=Math.abs(n-r),s=Math.abs(n-i),c=Math.abs(n-e);a=o<=s&&o<=c?`a`:s<=c?`b`:`c`}this.#h=a===`a`||a===`b`?a:`c`,this.#L(n,a,!0)}#pe;#me;#he;#ge;#_e;#ve(e){if(!this.#l)return;let n=this.max-this.min,r=(e-this.#m)*n,i=this.#p+r,a=i+this.#f;if(this.valueDrag===`stop`){let e=this.#f,n=i,r=i+e;if(n<this.min){let i=this.min-this.#p;n=this.#p+i,r=n+e}if(r>this.max){let e=this.max-r;n+=e,r+=e}i=n,a=r}else this.valueDrag===`flex`&&(i=Y(i,this.min,this.max),a=Y(a,this.min,this.max));let o=this.#u??this.#M(),s=this.#d??this.#N(),c=this.#R(),l=o===`a`?i:a,u=s===`b`?a:i;if(this.#t=l,this.#n=u,this.valueMode===`triple`&&this.#r!==void 0){let e=Math.min(c.poleA,c.poleB),n=Math.max(c.poleA,c.poleB),r=Math.min(l,u),i=Math.max(l,u);if(this.valueCFollow===`proportional`&&n>e){let a=Y((this.#r-e)/(n-e),0,1);this.#r=r+a*(i-r)}else this.#r<r&&(this.#r=r),this.#r>i&&(this.#r=i)}this.#z(),this.#v=!0;let d=this.#e.get(`value`);d&&d.type===`value`&&(d.valueMin=UC(this.#A(),this.min,this.max),d.valueMax=UC(this.#j(),this.min,this.max)),this.#H({previousValue:c.poleA,previousValueMin:Math.min(c.poleA,c.poleB),previousValueMax:Math.max(c.poleA,c.poleB),previousValueC:c.poleC},!0,`both`)}#ye;#be;#xe(e,n){if(this.valueMode===`single`){this.#I(Y(n,0,1),!0);return}if(e===`c`){let e=this.#A(),r=this.#j(),i=Y(HC(Y(n,0,1),0,1,this.min,this.max),e,r),a=this.#F(i);if(a===this.#r)return;let o=this.#R();this.#r=a,this.#z(),this.#v=!0,this.#H({previousValue:o.poleA,previousValueMin:Math.min(o.poleA,o.poleB),previousValueMax:Math.max(o.poleA,o.poleB),previousValueC:o.poleC},!0,`c`);return}this.#L(Y(n,0,1),e,!0)}_applyWheelDelta(e,n){let r=this.#h,i=n.target;if(i&&typeof i.closest==`function`){let e=i.closest(`[data-handle]`);if(e){let n=e.dataset?.handle;(n===`a`||n===`b`||n===`c`)&&(r=n)}}this.valueMode===`single`&&(r=`a`),this.#h=r;let a=this.max-this.min,o=Dy(a,this.stops,this.step,n.shiftKey),s=Y(UC(r===`a`?this.#t:r===`b`?this.#n:this.#r??this.#A(),this.min,this.max)-e*o/a,0,1);this.#xe(r,s)}#Se;#Ce(){let e=this.#q;return this.orientation===`horizontal`?`0 0 100 ${e}`:`0 0 ${e} 100`}#we(){let e=this.orientation===`vertical`,n=this.#q,r=this.#J,i=this.#Y,a=this.#ue(`--track-width`,2),o=this.#Te(`--track-color`,`var(--surface-4)`),c=this.#Te(`--track-fill`,`transparent`);return e?s`
9236
+ `]}};E([d({type:Number})],RC.prototype,`radius`,void 0),E([d({type:Number})],RC.prototype,`flatten`,void 0),E([d({type:String,attribute:`marker-style`})],RC.prototype,`markerStyle`,void 0),E([d({type:Boolean})],RC.prototype,`wedge`,void 0),E([d({type:String,attribute:`value-mode`})],RC.prototype,`valueMode`,void 0),E([d({type:Boolean})],RC.prototype,`tooltip`,void 0),E([d({type:Boolean})],RC.prototype,`flip`,void 0),E([d({type:Number,attribute:`aspect-ratio-threshold`})],RC.prototype,`aspectRatioThreshold`,void 0),E([d({type:Boolean})],RC.prototype,`lighttouch`,void 0),E([m()],RC.prototype,`_isWide`,void 0),RC=E([T(`ixfx-labelled-radial-input`)],RC);function zC(e,n=24,r=5,i=5){let a=r,o=100-i;return{trackStart:a,trackEnd:o,centre:(a+o)/2,cross:n,crossCentre:n/2}}function BC(e,n,r,i){let a=r.trackEnd-r.trackStart,o=r.centre,s=r.crossCentre,c;if(n===`range`)c=r.trackStart+e*a;else if(n===`bipolar`){if(e<=.5){let n=e/.5;c=r.trackStart+n*(o-r.trackStart)}else c=o+(e-.5)/.5*(r.trackEnd-o)}else c=o+e*a/2;return i===`horizontal`?{x:c,y:s}:{x:s,y:100-c}}function VC(e,n,r,i,a){if(r===`unipolar`){let e=i.trackEnd-i.trackStart,r=i.centre,o=i.crossCentre,s=n*e/2;return a===`horizontal`?{start:{x:r-s,y:o},end:{x:r+s,y:o}}:{start:{x:o,y:r-s},end:{x:o,y:r+s}}}return{start:BC(e,r,i,a),end:BC(n,r,i,a)}}function HC(e,n,r,i,a){let o=n*(i.trackEnd-i.trackStart)/2,s=r===`unipolar`?a===`horizontal`?{x:i.centre,y:i.crossCentre}:{x:i.crossCentre,y:i.centre}:BC(e,r,i,a),c,l;return a===`horizontal`?(c=s.x-o,l=s.x+o):(c=s.y-o,l=s.y+o),{start:a===`horizontal`?{x:c,y:s.y}:{x:s.x,y:c},end:a===`horizontal`?{x:l,y:s.y}:{x:s.x,y:l}}}function UC(e,n){return Math.abs(e.x-n.x)<.001&&Math.abs(e.y-n.y)<.001?``:`M ${e.x} ${e.y} L ${n.x} ${n.y}`}function Y(e,n,r){return Math.min(Math.max(e,n),r)}function WC(e,n,r,i,a){return r===n?i:i+(e-n)/(r-n)*(a-i)}function GC(e,n,r){return WC(e,n,r,0,1)}const KC=.06;function qC(e){let n=0,r=()=>{for(;n<e.length;){let r=e[n];if(r!==` `&&r!==` `&&r!==`
9237
+ `&&r!==`\r`)break;n++}};function i(){r();let i=/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i.exec(e.slice(n));if(i)return n+=i[0].length,Number.parseFloat(i[0])}function a(){r();let o=e[n];if(o===`+`||o===`-`){n++;let e=a();return e===void 0?void 0:o===`-`?-e:e}if(o===`(`){n++;let i=s();return i===void 0||(r(),e[n]!==`)`)?void 0:(n++,i)}return i()}function o(){let i=a();if(i!==void 0)for(;;){r();let o=e[n];if(o!==`*`&&o!==`/`)return i;n++;let s=a();if(s===void 0)return;i=o===`*`?i*s:i/s}}function s(){let i=o();if(i!==void 0)for(;;){r();let a=e[n];if(a!==`+`&&a!==`-`)return i;n++;let s=o();if(s===void 0)return;i=a===`+`?i+s:i-s}}let c=s();if(c!==void 0)return r(),n===e.length?c:void 0}let JC=class extends Oy(n){#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;constructor(){super(),this.valueA=50,this.valueB=0,this.valueC=void 0,this.min=0,this.max=100,this.step=void 0,this.stops=void 0,this.valueMode=`single`,this.singleStyle=`range`,this.orientation=`horizontal`,this.markerStyle=`needle`,this.markerStyleC=void 0,this.crossover=`allow`,this.valueDrag=`none`,this.valueCFollow=`none`,this.valueMin=1,this.disabled=!1,this.swipeable=!1,this.#e=new Map,this.#t=50,this.#n=0,this.#r=void 0,this.#i=!1,this.#a=void 0,this.#o=0,this.#s=0,this.#c=void 0,this.#l=void 0,this.#u=void 0,this.#d=void 0,this.#f=0,this.#p=0,this.#m=0,this.#h=`a`,this.#g={x:0,y:0},this.#_=void 0,this.#v=!1,this.#y=!1,this.#C=()=>{let e=this.getBoundingClientRect(),n=this.orientation===`vertical`?e.width:e.height,r=this.orientation===`vertical`?e.height:e.width;(n!==this.#$||r!==this.#ee)&&this.requestUpdate()},this.#w=e=>{this.#be(e)},this.#E=()=>{let e=this.querySelectorAll(`linearGradient, radialGradient`);if(e.length===0)return;let n=this.#T();for(let r of e)n.append(r)},this.#q=24,this.#J=5,this.#Y=5,this.#Q=0,this.#$=0,this.#ee=0,this.#pe=e=>{!this.swipeable||this.disabled||(e.preventDefault(),this.#fe(e))},this.#me=e=>{!this.swipeable||this.disabled||e.buttons===0||this.#fe(e)},this.#he=e=>{!this.swipeable||this.disabled||e.buttons===0||this.#fe(e)},this.#ge=e=>{if(this.disabled||this.swipeable)return;let n=this.renderRoot.querySelector(`svg.slider-svg`);if(!n)return;e.preventDefault(),this.focus(),n.style.cursor=`grabbing`;let r=this.orientation===`vertical`?e.clientY:e.clientX,i=this.#le(r);if(this.valueMode===`single`&&this.singleStyle===`unipolar`&&(i=Math.abs(2*i-1)),this.valueMode===`single`){this.#h=`a`,this.#c=`a`,this.#I(i,!0),this.#i=!0,this.toggleAttribute(`dragging`,!0),this.#a=e.pointerId;try{n.setPointerCapture(e.pointerId)}catch{}this.#o=r,this.#s=this.valueA,window.addEventListener(`pointermove`,this.#_e),window.addEventListener(`pointerup`,this.#ye),window.addEventListener(`pointercancel`,this.#ye);return}let a=this.#D(),o=this.#O(),s=Math.min(a,o),c=Math.max(a,o),l=this.#t<=this.#n?`a`:`b`,u=this.#t>this.#n?`a`:`b`,d=a,f=o,p=this.valueMode===`triple`,m=p?this.#k():0,h=Math.abs(i-d)<KC,g=Math.abs(i-f)<KC,_=p&&Math.abs(i-m)<KC,v,y=e=>e.find(e=>e!==this.#h)??e[0];v=h&&g&&_?y([l,u,`c`]):h&&g?y([l,u]):h&&_?y([l,`c`]):g&&_?y([u,`c`]):h?l:g?u:_?`c`:this.valueDrag!==`none`&&i>s&&i<c?`length`:this.valueDrag===`none`&&i<=s?this.#M():this.valueDrag===`none`&&i>=c?this.#N():void 0,this.#i=!0,this.toggleAttribute(`dragging`,!0),this.#a=e.pointerId;try{n.setPointerCapture(e.pointerId)}catch{}if(this.#o=r,v===void 0){window.addEventListener(`pointermove`,this.#_e),window.addEventListener(`pointerup`,this.#ye),window.addEventListener(`pointercancel`,this.#ye);return}this.#c=v,v===`length`?(this.#l={poleA:this.#t,poleB:this.#n},this.#u=this.#M(),this.#d=this.#N(),this.#f=this.#n-this.#t<0?this.#t-this.#n:this.#n-this.#t,this.#p=Math.min(this.#t,this.#n),this.#m=i):(this.#h=v,this.#s=v===`a`?this.#t:this.#n,this.#L(i,v,!0)),window.addEventListener(`pointermove`,this.#_e),window.addEventListener(`pointerup`,this.#ye),window.addEventListener(`pointercancel`,this.#ye)},this.#_e=e=>{if(!this.#i)return;e.preventDefault();let n=this.orientation===`vertical`?e.clientY:e.clientX,r=this.#le(n);if(this.valueMode===`single`&&this.singleStyle===`unipolar`&&(r=Math.abs(2*r-1)),this.valueMode===`single`){this.#I(r,!0);return}this.#c===`length`?this.#ve(r):this.#c&&this.#L(r,this.#c,!0)},this.#ye=()=>{this.#i=!1,this.#c=void 0,this.#l=void 0,this.#u=void 0,this.#d=void 0,this.toggleAttribute(`dragging`,!1),this.#Ne(new PointerEvent(`pointermove`,{clientX:this.#g.x,clientY:this.#g.y}));let e=this.renderRoot.querySelector(`svg.slider-svg`);if(e&&this.#a!==void 0&&`hasPointerCapture`in e&&typeof e.hasPointerCapture==`function`&&e.hasPointerCapture.call(e,this.#a))try{e.releasePointerCapture(this.#a)}catch{}this.#a=void 0,window.removeEventListener(`pointermove`,this.#_e),window.removeEventListener(`pointerup`,this.#ye),window.removeEventListener(`pointercancel`,this.#ye)},this.#be=e=>{if(this.disabled)return;let n=this.max-this.min,r=Dy(n,this.stops,this.step,e.shiftKey),i=`a`,a=e.target;if(a&&typeof a.closest==`function`){let e=a.closest(`[data-handle]`);if(e){let n=e.dataset?.handle;(n===`a`||n===`b`||n===`c`)&&(i=n)}}this.valueMode===`single`&&(i=`a`),this.#h=i;let o=!1;switch(e.key){case`ArrowUp`:case`ArrowRight`:if(this.valueMode===`single`){let e=this.#D()+r/n;this.#I(Y(e,0,1),!0)}else{let e=GC(i===`a`?this.#t:i===`b`?this.#n:this.#r??this.#A(),this.min,this.max)+r/n;this.#xe(i,e)}o=!0;break;case`ArrowDown`:case`ArrowLeft`:if(this.valueMode===`single`){let e=this.#D()-r/n;this.#I(Y(e,0,1),!0)}else{let e=GC(i===`a`?this.#t:i===`b`?this.#n:this.#r??this.#A(),this.min,this.max)-r/n;this.#xe(i,e)}o=!0;break;case`Home`:this.valueMode===`single`?this.#I(0,!0):this.#xe(i,0),o=!0;break;case`End`:this.valueMode===`single`?this.#I(1,!0):this.#xe(i,1),o=!0}o&&e.preventDefault()},this.#Se=e=>{let n=e.target;if(n&&typeof n.closest==`function`){let e=n.closest(`[data-handle]`);if(e){let n=e.dataset?.handle;(n===`a`||n===`b`||n===`c`)&&(this.#h=n)}}},this.#Ne=e=>{let n=this.renderRoot.querySelector(`svg.slider-svg`);if(!n)return;this.#g={x:e.clientX,y:e.clientY};let r=this.orientation===`vertical`?e.clientY:e.clientX,i=this.#le(r),a=this.#Me(i);n.style.cursor!==a&&(n.style.cursor=a)},this.#Pe=()=>{let e=this.renderRoot.querySelector(`svg.slider-svg`);if(!e)return;let n=this.disabled?`not-allowed`:`default`;e.style.cursor!==n&&(e.style.cursor=n)},this.disabled||this.setAttribute(`tabindex`,`0`),this.#e.set(`track`,{key:`track`,value:1,type:`fixed`,offset:0,width:.16}),this.#e.set(`value`,{key:`value`,valueMin:0,valueMax:0,type:`value`,offset:0,width:.24})}connectedCallback(){super.connectedCallback(),this.setAttribute(`tabindex`,this.disabled?`-1`:`0`),this.addEventListener(`keydown`,this.#w),this.addEventListener(`pointerdown`,this.#pe),this.addEventListener(`pointermove`,this.#me),this.addEventListener(`pointerenter`,this.#he),this.#E(),this.#x=new MutationObserver(this.#E),this.#x.observe(this,{childList:!0,subtree:!0}),this.#S=new ResizeObserver(this.#C),this.#S.observe(this)}#C;#w;#T(){if(this.#b)return this.#b;let e=`http://www.w3.org/2000/svg`,n=document.createElementNS(e,`svg`);n.setAttribute(`width`,`0`),n.setAttribute(`height`,`0`),n.setAttribute(`aria-hidden`,`true`),n.style.cssText=`position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none;`;let r=document.createElementNS(e,`defs`);return n.append(r),this.renderRoot.append(n),this.#b=r,r}#E;addLane(e,n){let r=this.#D();this.#e.set(e,{key:e,value:n?.value??r,valueMin:n?.valueMin??0,valueMax:n?.valueMax??r,type:n?.type??`value`,offset:n?.offset??0,width:n?.width??.1}),this.requestUpdate()}setLaneValue(e,n){let r=this.#e.get(e);r&&(r.value=Y(n,0,1),this.requestUpdate())}setLaneRange(e,n,r){let i=this.#e.get(e);if(!i)return;let a=Y(Math.min(n,r),0,1),o=Y(Math.max(n,r),0,1);i.valueMin=a,i.valueMax=o,this.requestUpdate()}removeLane(e){this.#e.delete(e),this.requestUpdate()}getLanes(){return new Map(this.#e)}getLane(e){return this.#e.get(e)}#D(){return GC(this.valueA,this.min,this.max)}#O(){return GC(this.valueB,this.min,this.max)}#k(){return GC(this.valueC??(this.#t+this.#n)/2,this.min,this.max)}#A(){return Math.min(this.#t,this.#n)}#j(){return Math.max(this.#t,this.#n)}#M(){return this.#t<=this.#n?`a`:`b`}#N(){return this.#t>this.#n?`a`:`b`}#P(){let e=this.max-this.min;return this.valueMin&&this.valueMin>0?this.valueMin:e*.01}#F(e){if(this.stops&&this.stops>1){let n=(this.max-this.min)/this.stops;return Y(Math.round((e-this.min)/n)*n+this.min,this.min,this.max)}return this.step!==void 0&&this.step>0?Y(Math.round((e-this.min)/this.step)*this.step+this.min,this.min,this.max):e}#I(e,n=!1){let r=WC(e,0,1,this.min,this.max),i=this.#F(Y(r,this.min,this.max));if(i===this.valueA)return;let a=this.valueA;this.valueA=i,this.#t=i,this.#v=n;let o=this.#e.get(`value`);if(o&&o.type===`value`&&this.#je(o,this.#D()),this.hasAttribute(`data-tooltip-live`)){let e=Math.round(this.#D()*100);this.setAttribute(`data-tooltip`,`${e}%`)}this.#H({previousValue:a},n)}#L(e,n,r=!1){let i=Y(WC(e,0,1,this.min,this.max),this.min,this.max),a=this.#B(n,i,this.#h);if(!a)return;let o={...this.#R()};this.#t=a.poleA,this.#n=a.poleB,a.poleC!==void 0&&(this.#r=a.poleC),this.#z();let s=this.#V(o,this.#R());this.#v=r;let c=this.#e.get(`value`);if(c&&c.type===`value`&&(c.valueMin=GC(this.#A(),this.min,this.max),c.valueMax=GC(this.#j(),this.min,this.max)),this.hasAttribute(`data-tooltip-live`)){let e=Math.round(GC(this.#j(),this.min,this.max)*100);this.setAttribute(`data-tooltip`,`${e}%`)}this.#H({previousValue:Math.max(o.poleA,o.poleB),previousValueMin:Math.min(o.poleA,o.poleB),previousValueMax:Math.max(o.poleA,o.poleB),previousValueC:o.poleC},r,s)}#R(){return{poleA:this.#t,poleB:this.#n,poleC:this.#r}}#z(){this.valueA=this.#t,this.valueB=this.#n,this.valueMode===`triple`&&this.#r!==void 0&&(this.valueC=this.#r,this.#y=!0)}#B(e,n,r){let i=this.#t,a=this.#n,o=this.#r;if(this.valueMode===`triple`&&e===`c`){let e=Y(n,this.#A(),this.#j()),r=this.#F(e);return r===this.#r?null:{poleA:i,poleB:a,poleC:r}}let s=this.#P(),c=e===`a`?a:i,l=this.#F(Y(n,this.min,this.max));if(this.crossover===`none`?l=(e===`a`?i:a)<=c?Math.min(l,c-s):Math.max(l,c+s):l>c-s&&l<c+s&&(l=Math.abs(l-(c-s))<=Math.abs(l-(c+s))?c-s:c+s),l=Y(l,this.min,this.max),e===`a`){if(l===i)return null;i=l}else{if(l===a)return null;a=l}if(this.valueMode===`triple`&&o!==void 0){let e=Math.min(this.#t,this.#n),n=Math.max(this.#t,this.#n),r=Math.min(i,a),s=Math.max(i,a);this.valueCFollow===`proportional`&&n>e?o=r+Y((o-e)/(n-e),0,1)*(s-r):(o<r&&(o=r),o>s&&(o=s))}return{poleA:i,poleB:a,poleC:o}}#V(e,n){let r=e.poleA!==n.poleA,i=e.poleB!==n.poleB,a=e.poleC!==n.poleC;return this.valueMode===`triple`?r&&i&&!a||r&&i?`both`:r?`min`:i?`max`:a?`c`:`min`:r&&i?`both`:r?`min`:i?`max`:`min`}#H(e,n,r){let i=this.#U(r),a=this.#W(e,r);n?(this.dispatchEvent(new CustomEvent(`input`,{detail:i,bubbles:!0,composed:!0})),this.#G(a)):this.#K(a)}#U(e){if(this.valueMode===`single`)return{value:this.valueA,valueRelative:this.#D()};let n=this.#A(),r=this.#j(),i=GC(n,this.min,this.max),a=GC(r,this.min,this.max);return this.valueMode===`triple`&&this.#r!==void 0?{value:r,valueRelative:a,valueMin:n,valueMax:r,valueMinRelative:i,valueMaxRelative:a,valueC:this.#r,valueCRelative:GC(this.#r,this.min,this.max),changed:e}:{value:r,valueRelative:a,valueMin:n,valueMax:r,valueMinRelative:i,valueMaxRelative:a,changed:e}}#W(e,n){if(this.valueMode===`single`)return{value:this.valueA,valueRelative:this.#D(),previousValue:e.previousValue};let r=this.#A(),i=this.#j(),a=GC(i,this.min,this.max);return this.valueMode===`triple`&&this.#r!==void 0?{value:i,valueRelative:a,previousValue:e.previousValue,valueMin:r,valueMax:i,previousValueMin:e.previousValueMin??r,previousValueMax:e.previousValueMax??i,valueC:this.#r,previousValueC:e.previousValueC??this.#r,changed:n}:{value:i,valueRelative:a,previousValue:e.previousValue,valueMin:r,valueMax:i,previousValueMin:e.previousValueMin??r,previousValueMax:e.previousValueMax??i,changed:n}}#G(e){this.#_!==void 0&&clearTimeout(this.#_),this.#_=window.setTimeout(()=>{this.#K(e),this.#_=void 0},150)}#K(e){this.dispatchEvent(new CustomEvent(`change`,{detail:e,bubbles:!0,composed:!0}))}#q;#J;#Y;#X(e,n){let r=getComputedStyle(this),i=e=>{let n=e.trim();if(!n)return;let r=Number.parseFloat(n);return Number.isNaN(r)?void 0:r},a=i(r.getPropertyValue(`--lane-${e}-width`));if(a!==void 0)return a;if(e===`value`){let e=i(r.getPropertyValue(`--lane-track-width`));return e===void 0?n:e}if(e!==`track`){let e=i(r.getPropertyValue(`--lane-width`));if(e!==void 0)return e}return n}#Z(e){let n=e===`track`?.08:e===`value`?.12:.16;return this.#X(e,n)*this.#$}#Q;#$;#ee;#te(){let e=this.getBoundingClientRect(),n=this.orientation===`vertical`?e.width:e.height;if(this.#$=n,this.#ee=this.orientation===`vertical`?e.height:e.width,e.width<=0||e.height<=0){this.#Q=0;return}let r=0;for(let e of this.#e.values()){let i=e.key===`track`?.08:e.key===`value`?.12:.16;r=Math.max(r,Math.abs(this.#X(e.key,i))*n)}this.#Q=r}#ne(){return this.#$<=0?Math.abs(this.#ue(`--marker-thickness`,.15))/2:this.#re()/this.#$}#re(){let e=Math.abs(this.#ue(`--marker-thickness`,.15));return this.#$<=0?0:Math.max(e*this.#$/2,this.#Q/2+1)}#ie(e,n){let r=this.#ee,i=this.#$;if(r<=0||i<=0||n<=0)return{rx:e,ry:e};let a=r/100,o=i/n;return this.orientation===`vertical`?{rx:e/o,ry:e/a}:{rx:e/a,ry:e/o}}#ae(){return this.valueMode===`single`?[this.markerStyle]:this.valueMode===`triple`&&this.markerStyleC?[...new Set([this.markerStyle,this.markerStyleC])]:[this.markerStyle]}#oe(){let e=0;for(let n of this.#e.values()){let r=n.key===`track`?.08:n.key===`value`?.12:.16,i=this.#X(n.key,r);e=Math.max(e,Math.abs(i)/2+Math.abs(n.offset)/2)}let n=Math.abs(this.#ue(`--marker-offset`,0)),r=Math.abs(this.#ue(`--marker-length`,.8)),i=e=>e===`none`?0:e===`dot`?this.#ne()+n/2:r/4+n/2;for(let n of this.#ae())e=Math.max(e,i(n));if(this.valueMode===`single`&&(this.singleStyle===`bipolar`||this.singleStyle===`unipolar`)){let n=Math.abs(this.#ue(`--midpoint-length`,.15));e=Math.max(e,n/4)}let a=Math.abs(this.#ue(`--track-width`,2));return e=Math.max(e,a/2/24),Math.min(e,.45)}#se(){return Y(2/(.5-this.#oe()),4,40)}#ce(e){let n=Math.abs(this.#ue(`--marker-thickness`,.15)),r=this.#ee>0?this.#re()*100/this.#ee:this.#ne()*e,i=0;for(let a of this.#ae())a===`dot`?i=Math.max(i,r):a===`triangle`&&(i=Math.max(i,n*e/4));let a=Y(i+1.5,1,5),o=Math.max(0,this.#ue(`--track-margin`,0)),s=Math.max(0,this.#ue(`--track-margin-start`,o)),c=Math.max(0,this.#ue(`--track-margin-end`,o)),l=a+s,u=a+c;if(l+u>90&&l+u>0){let e=90/(l+u);l*=e,u*=e}return{start:l,end:u}}#le(e){let n=this.getBoundingClientRect(),r=this.orientation===`vertical`,i=r?n.top:n.left,a=r?n.height:n.width;if(a<=0)return 0;let o=i+a*this.#J/100,s=a*(100-this.#J-this.#Y)/100;if(s<=0)return 0;let c=Y((e-o)/s,0,1);return r?1-c:c}#ue(e,n){let r=getComputedStyle(this),i=r.getPropertyValue(e).trim();if(!i)return n;if(i.includes(`calc(`)){let e=r.getPropertyValue(`--value-relative`).trim();if(!e){let e=Number.parseFloat(i.replace(/[^0-9.-]/g,``));return Number.isNaN(e)?n:e}let a=qC(i.replace(/var\(--value-relative\)/g,e).replace(/calc\s*\(([^)]+)\)/g,`$1`));if(a!==void 0)return Number.isNaN(a)?n:a;let o=Number.parseFloat(i.replace(/[^0-9.-]/g,``));return Number.isNaN(o)?n:o}let a=Number.parseFloat(i);return Number.isNaN(a)?n:a}#de(e){let n=this.orientation===`vertical`?e.clientY:e.clientX,r=this.#le(n);return this.valueMode===`single`&&this.singleStyle===`unipolar`?Math.abs(2*r-1):r}#fe(e){this.focus();let n=this.#de(e);if(this.valueMode===`single`){this.#h=`a`,this.#I(n,!0);return}let r=this.#D(),i=this.#O(),a=Math.abs(n-r)<=Math.abs(n-i)?`a`:`b`;if(this.valueMode===`triple`){let e=this.#k(),o=Math.abs(n-r),s=Math.abs(n-i),c=Math.abs(n-e);a=o<=s&&o<=c?`a`:s<=c?`b`:`c`}this.#h=a===`a`||a===`b`?a:`c`,this.#L(n,a,!0)}#pe;#me;#he;#ge;#_e;#ve(e){if(!this.#l)return;let n=this.max-this.min,r=(e-this.#m)*n,i=this.#p+r,a=i+this.#f;if(this.valueDrag===`stop`){let e=this.#f,n=i,r=i+e;if(n<this.min){let i=this.min-this.#p;n=this.#p+i,r=n+e}if(r>this.max){let e=this.max-r;n+=e,r+=e}i=n,a=r}else this.valueDrag===`flex`&&(i=Y(i,this.min,this.max),a=Y(a,this.min,this.max));let o=this.#u??this.#M(),s=this.#d??this.#N(),c=this.#R(),l=o===`a`?i:a,u=s===`b`?a:i;if(this.#t=l,this.#n=u,this.valueMode===`triple`&&this.#r!==void 0){let e=Math.min(c.poleA,c.poleB),n=Math.max(c.poleA,c.poleB),r=Math.min(l,u),i=Math.max(l,u);if(this.valueCFollow===`proportional`&&n>e){let a=Y((this.#r-e)/(n-e),0,1);this.#r=r+a*(i-r)}else this.#r<r&&(this.#r=r),this.#r>i&&(this.#r=i)}this.#z(),this.#v=!0;let d=this.#e.get(`value`);d&&d.type===`value`&&(d.valueMin=GC(this.#A(),this.min,this.max),d.valueMax=GC(this.#j(),this.min,this.max)),this.#H({previousValue:c.poleA,previousValueMin:Math.min(c.poleA,c.poleB),previousValueMax:Math.max(c.poleA,c.poleB),previousValueC:c.poleC},!0,`both`)}#ye;#be;#xe(e,n){if(this.valueMode===`single`){this.#I(Y(n,0,1),!0);return}if(e===`c`){let e=this.#A(),r=this.#j(),i=Y(WC(Y(n,0,1),0,1,this.min,this.max),e,r),a=this.#F(i);if(a===this.#r)return;let o=this.#R();this.#r=a,this.#z(),this.#v=!0,this.#H({previousValue:o.poleA,previousValueMin:Math.min(o.poleA,o.poleB),previousValueMax:Math.max(o.poleA,o.poleB),previousValueC:o.poleC},!0,`c`);return}this.#L(Y(n,0,1),e,!0)}_applyWheelDelta(e,n){let r=this.#h,i=n.target;if(i&&typeof i.closest==`function`){let e=i.closest(`[data-handle]`);if(e){let n=e.dataset?.handle;(n===`a`||n===`b`||n===`c`)&&(r=n)}}this.valueMode===`single`&&(r=`a`),this.#h=r;let a=this.max-this.min,o=Dy(a,this.stops,this.step,n.shiftKey),s=Y(GC(r===`a`?this.#t:r===`b`?this.#n:this.#r??this.#A(),this.min,this.max)-e*o/a,0,1);this.#xe(r,s)}#Se;#Ce(){let e=this.#q;return this.orientation===`horizontal`?`0 0 100 ${e}`:`0 0 ${e} 100`}#we(){let e=this.orientation===`vertical`,n=this.#q,r=this.#J,i=this.#Y,a=this.#ue(`--track-width`,2),o=this.#Te(`--track-color`,`var(--surface-4)`),c=this.#Te(`--track-fill`,`transparent`);return e?s`
9207
9238
  <rect
9208
9239
  class="track"
9209
9240
  x="${n/2-a/2}"
@@ -9225,7 +9256,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9225
9256
  stroke="${o}"
9226
9257
  stroke-width="0"
9227
9258
  />
9228
- `}#Te(e,n){return getComputedStyle(this).getPropertyValue(e).trim()||n}#Ee(e){let n=LC(this.orientation,this.#q,this.#J,this.#Y),r=``;if(e.type===`fixed`)r=VC(this.orientation===`horizontal`?{x:n.trackStart,y:n.crossCentre}:{x:n.crossCentre,y:n.trackStart},this.orientation===`horizontal`?{x:n.trackEnd,y:n.crossCentre}:{x:n.crossCentre,y:n.trackEnd});else if(e.type===`anchored`){let i=BC(this.#D(),e.value??.1,this.singleStyle,n,this.orientation);r=VC(i.start,i.end)}else{let i=zC(e.valueMin??0,e.valueMax??0,this.singleStyle,n,this.orientation);r=VC(i.start,i.end)}if(!r)return s``;let i=`${this.#Z(e.key)}px`,a=e.offset*this.#$/2,o=this.orientation===`horizontal`?`translateY(${a}px)`:`translateX(${a}px)`;return s`
9259
+ `}#Te(e,n){return getComputedStyle(this).getPropertyValue(e).trim()||n}#Ee(e){let n=zC(this.orientation,this.#q,this.#J,this.#Y),r=``;if(e.type===`fixed`)r=UC(this.orientation===`horizontal`?{x:n.trackStart,y:n.crossCentre}:{x:n.crossCentre,y:n.trackStart},this.orientation===`horizontal`?{x:n.trackEnd,y:n.crossCentre}:{x:n.crossCentre,y:n.trackEnd});else if(e.type===`anchored`){let i=HC(this.#D(),e.value??.1,this.singleStyle,n,this.orientation);r=UC(i.start,i.end)}else{let i=VC(e.valueMin??0,e.valueMax??0,this.singleStyle,n,this.orientation);r=UC(i.start,i.end)}if(!r)return s``;let i=`${this.#Z(e.key)}px`,a=e.offset*this.#$/2,o=this.orientation===`horizontal`?`translateY(${a}px)`:`translateX(${a}px)`;return s`
9229
9260
  <path
9230
9261
  class="lane"
9231
9262
  data-lane-key="${e.key}"
@@ -9237,7 +9268,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9237
9268
  transform: ${o};
9238
9269
  "
9239
9270
  />
9240
- `}#De(e,n){let r=LC(this.orientation,this.#q,this.#J,this.#Y),i=r.cross,a=this.orientation===`horizontal`,o;o=this.valueMode===`single`||e===`a`?this.#D():e===`b`?this.#O():this.#k();let c=RC(o,this.singleStyle,r,this.orientation),l=this.#ue(`--marker-offset`,0),u=this.#ue(`--marker-length`,.8),d=this.#ue(`--marker-thickness`,.15),f=this.#ue(`--marker-border-width`,0),p=a?{x:c.x,y:r.crossCentre+i/2*l}:{x:r.crossCentre+i/2*l,y:c.y},m=this.valueMode===`single`&&this.singleStyle===`unipolar`?a?{x:2*r.centre-p.x,y:p.y}:{x:p.x,y:2*r.centre-p.y}:void 0,h=e??`s`,g=e===`c`&&this.markerStyleC?this.markerStyleC:this.markerStyle;if(g===`dot`){let{rx:e,ry:r}=this.#ie(this.#re(),i),a=(i,a,o)=>f>0?(n.push(s`<ellipse id="dot-${o}-path" cx="${i}" cy="${a}" rx="${e}" ry="${r}" />`),s`
9271
+ `}#De(e,n){let r=zC(this.orientation,this.#q,this.#J,this.#Y),i=r.cross,a=this.orientation===`horizontal`,o;o=this.valueMode===`single`||e===`a`?this.#D():e===`b`?this.#O():this.#k();let c=BC(o,this.singleStyle,r,this.orientation),l=this.#ue(`--marker-offset`,0),u=this.#ue(`--marker-length`,.8),d=this.#ue(`--marker-thickness`,.15),f=this.#ue(`--marker-border-width`,0),p=a?{x:c.x,y:r.crossCentre+i/2*l}:{x:r.crossCentre+i/2*l,y:c.y},m=this.valueMode===`single`&&this.singleStyle===`unipolar`?a?{x:2*r.centre-p.x,y:p.y}:{x:p.x,y:2*r.centre-p.y}:void 0,h=e??`s`,g=e===`c`&&this.markerStyleC?this.markerStyleC:this.markerStyle;if(g===`dot`){let{rx:e,ry:r}=this.#ie(this.#re(),i),a=(i,a,o)=>f>0?(n.push(s`<ellipse id="dot-${o}-path" cx="${i}" cy="${a}" rx="${e}" ry="${r}" />`),s`
9241
9272
  <use href="#dot-${o}-path" class="marker-border" />
9242
9273
  <use href="#dot-${o}-path" class="marker-fill" />
9243
9274
  `):s`<ellipse cx="${i}" cy="${a}" rx="${e}" ry="${r}" />`,o=a(p.x,p.y,h);return m?s`${o}${a(m.x,m.y,`${h}-low`)}`:o}if(g===`needle`){let e=u*i/4,r=(r,i,o)=>{let c,l;a?(c={x:r,y:i-e},l={x:r,y:i+e}):(c={x:r-e,y:i},l={x:r+e,y:i});let u=`M ${c.x} ${c.y} L ${l.x} ${l.y}`;return f>0?(n.push(s`<path id="needle-${o}-path" d="${u}" />`),s`
@@ -9246,7 +9277,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9246
9277
  `):s`<path d="${u}" stroke-linecap="round" />`},o=r(p.x,p.y,h);return m?s`${o}${r(m.x,m.y,`${h}-low`)}`:o}if(g===`triangle`){let e=u*i/4,r=d*i/4,o=(i,o,c)=>{let l,u,d;a?(l={x:i,y:o},u={x:i-r,y:o+e},d={x:i+r,y:o+e}):(l={x:i,y:o},u={x:i+e,y:o-r},d={x:i+e,y:o+r});let p=`${l.x},${l.y} ${u.x},${u.y} ${d.x},${d.y}`;return f>0?(n.push(s`<polygon id="triangle-${c}-path" points="${p}" />`),s`
9247
9278
  <use href="#triangle-${c}-path" class="marker-border" />
9248
9279
  <use href="#triangle-${c}-path" class="marker-fill" />
9249
- `):s`<polygon points="${p}" />`},c=o(p.x,p.y,h);return m?s`${c}${o(m.x,m.y,`${h}-low`)}`:c}return s``}#Oe(){if(this.valueMode!==`single`||this.singleStyle!==`bipolar`&&this.singleStyle!==`unipolar`)return s``;let e=LC(this.orientation,this.#q,this.#J,this.#Y),n=e.cross,r=this.orientation===`horizontal`,i=this.#ue(`--midpoint-length`,.15)*n/4,a=r?{x:e.centre,y:e.crossCentre}:{x:e.crossCentre,y:e.centre};if(this.markerStyle===`dot`){let e=this.#ue(`--midpoint-thickness`,.08),r=this.#$>0?e*this.#$/2:n/2*e,{rx:i,ry:o}=this.#ie(r,n);return s`
9280
+ `):s`<polygon points="${p}" />`},c=o(p.x,p.y,h);return m?s`${c}${o(m.x,m.y,`${h}-low`)}`:c}return s``}#Oe(){if(this.valueMode!==`single`||this.singleStyle!==`bipolar`&&this.singleStyle!==`unipolar`)return s``;let e=zC(this.orientation,this.#q,this.#J,this.#Y),n=e.cross,r=this.orientation===`horizontal`,i=this.#ue(`--midpoint-length`,.15)*n/4,a=r?{x:e.centre,y:e.crossCentre}:{x:e.crossCentre,y:e.centre};if(this.markerStyle===`dot`){let e=this.#ue(`--midpoint-thickness`,.08),r=this.#$>0?e*this.#$/2:n/2*e,{rx:i,ry:o}=this.#ie(r,n);return s`
9250
9281
  <g class="midpoint-marker" part="midpoint-marker">
9251
9282
  <ellipse cx="${a.x}" cy="${a.y}" rx="${i}" ry="${o}" />
9252
9283
  </g>
@@ -9266,7 +9297,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9266
9297
  aria-orientation="${this.orientation}"
9267
9298
  aria-valuemin="${this.min}" aria-valuemax="${this.max}"
9268
9299
  aria-valuenow="${i}"
9269
- part="${r}">${n}</g>`}#Ae(){return this.valueMode!==`single`}willUpdate(e){if(super.willUpdate(e),(e.has(`valueA`)||e.has(`valueB`)||!this.hasUpdated)&&(this.#t=this.valueA,this.#n=this.valueB),this.valueMode===`triple`){this.valueC===void 0||!this.#y||e.has(`valueMode`)?(this.#r=(this.#t+this.#n)/2,this.valueC=this.#r,this.#y=!0):this.#r=this.valueC;let n=Math.min(this.#t,this.#n),r=Math.max(this.#t,this.#n);this.#r<n&&(this.#r=n),this.#r>r&&(this.#r=r),this.valueC=this.#r}else this.#r=void 0;if(e.has(`valueA`)||e.has(`valueB`)||e.has(`valueMode`)||e.has(`singleStyle`)||!this.hasUpdated){let e=this.#e.get(`value`);e&&e.type===`value`&&(this.valueMode===`single`?this.#je(e,this.#D()):(e.valueMin=UC(this.#A(),this.min,this.max),e.valueMax=UC(this.#j(),this.min,this.max)))}}#je(e,n){this.singleStyle===`bipolar`?(e.valueMin=Math.min(.5,n),e.valueMax=Math.max(.5,n)):(e.valueMin=0,e.valueMax=n)}render(){this.#te(),this.#q=this.#se();let e=this.#ce(this.#q);this.#J=e.start,this.#Y=e.end;let n=Array.from(this.#e.values()),r=this.disabled?`not-allowed`:this.valueMode===`single`?`pointer`:`default`,a=this.#Ae()?this.valueMode===`triple`?[`a`,`b`,`c`]:[`a`,`b`]:[],o=[],c=this.#Ae()?a.map(e=>this.#ke(e,this.#De(e,o))):this.#ke(void 0,this.#De(void 0,o));return i`
9300
+ part="${r}">${n}</g>`}#Ae(){return this.valueMode!==`single`}willUpdate(e){if(super.willUpdate(e),(e.has(`valueA`)||e.has(`valueB`)||!this.hasUpdated)&&(this.#t=this.valueA,this.#n=this.valueB),this.valueMode===`triple`){this.valueC===void 0||!this.#y||e.has(`valueMode`)?(this.#r=(this.#t+this.#n)/2,this.valueC=this.#r,this.#y=!0):this.#r=this.valueC;let n=Math.min(this.#t,this.#n),r=Math.max(this.#t,this.#n);this.#r<n&&(this.#r=n),this.#r>r&&(this.#r=r),this.valueC=this.#r}else this.#r=void 0;if(e.has(`valueA`)||e.has(`valueB`)||e.has(`valueMode`)||e.has(`singleStyle`)||!this.hasUpdated){let e=this.#e.get(`value`);e&&e.type===`value`&&(this.valueMode===`single`?this.#je(e,this.#D()):(e.valueMin=GC(this.#A(),this.min,this.max),e.valueMax=GC(this.#j(),this.min,this.max)))}}#je(e,n){this.singleStyle===`bipolar`?(e.valueMin=Math.min(.5,n),e.valueMax=Math.max(.5,n)):(e.valueMin=0,e.valueMax=n)}render(){this.#te(),this.#q=this.#se();let e=this.#ce(this.#q);this.#J=e.start,this.#Y=e.end;let n=Array.from(this.#e.values()),r=this.disabled?`not-allowed`:this.valueMode===`single`?`pointer`:`default`,a=this.#Ae()?this.valueMode===`triple`?[`a`,`b`,`c`]:[`a`,`b`]:[],o=[],c=this.#Ae()?a.map(e=>this.#ke(e,this.#De(e,o))):this.#ke(void 0,this.#De(void 0,o));return i`
9270
9301
  <svg
9271
9302
  class="slider-svg"
9272
9303
  viewBox="${this.#Ce()}"
@@ -9285,7 +9316,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9285
9316
  ${this.#Oe()}
9286
9317
  ${c}
9287
9318
  </svg>
9288
- `}#Me(e){if(this.disabled)return`not-allowed`;if(this.#i)return`grabbing`;let n=.06;if(this.valueMode===`single`){if(this.singleStyle===`unipolar`){let r=this.#D()/2,i=.5-r,a=.5+r;return Math.abs(e-i)<n||Math.abs(e-a)<n?`grab`:`pointer`}let r=this.#D();return Math.abs(e-r)<n?`grab`:`pointer`}let r=this.#D(),i=this.#O(),a=Math.min(r,i),o=Math.max(r,i);if(Math.abs(e-r)<n||Math.abs(e-i)<n)return`grab`;if(this.valueMode===`triple`){let r=this.#k();if(Math.abs(e-r)<n)return`grab`}return e>a&&e<o?this.valueDrag===`none`?`default`:`move`:`pointer`}#Ne;#Pe;updated(e){if(super.updated(e),this.valueMode===`single`)this.style.setProperty(`--value-relative`,this.#D().toString());else{let e=UC(this.#A(),this.min,this.max),n=UC(this.#j(),this.min,this.max);this.style.setProperty(`--value-min-relative`,e.toString()),this.style.setProperty(`--value-max-relative`,n.toString()),this.style.setProperty(`--value-relative`,n.toString()),this.valueMode===`triple`&&this.#r!==void 0&&this.style.setProperty(`--value-c-relative`,UC(this.#r,this.min,this.max).toString())}}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`keydown`,this.#w),this.removeEventListener(`pointerdown`,this.#pe),this.removeEventListener(`pointermove`,this.#me),this.removeEventListener(`pointerenter`,this.#he),this.#x?.disconnect(),this.#x=void 0,this.#S?.disconnect(),this.#S=void 0,this.#_!==void 0&&(clearTimeout(this.#_),this.#_=void 0),this.#ye()}static{this.styles=[w,sn,r`
9319
+ `}#Me(e){if(this.disabled)return`not-allowed`;if(this.#i)return`grabbing`;let n=.06;if(this.valueMode===`single`){if(this.singleStyle===`unipolar`){let r=this.#D()/2,i=.5-r,a=.5+r;return Math.abs(e-i)<n||Math.abs(e-a)<n?`grab`:`pointer`}let r=this.#D();return Math.abs(e-r)<n?`grab`:`pointer`}let r=this.#D(),i=this.#O(),a=Math.min(r,i),o=Math.max(r,i);if(Math.abs(e-r)<n||Math.abs(e-i)<n)return`grab`;if(this.valueMode===`triple`){let r=this.#k();if(Math.abs(e-r)<n)return`grab`}return e>a&&e<o?this.valueDrag===`none`?`default`:`move`:`pointer`}#Ne;#Pe;updated(e){if(super.updated(e),this.valueMode===`single`)this.style.setProperty(`--value-relative`,this.#D().toString());else{let e=GC(this.#A(),this.min,this.max),n=GC(this.#j(),this.min,this.max);this.style.setProperty(`--value-min-relative`,e.toString()),this.style.setProperty(`--value-max-relative`,n.toString()),this.style.setProperty(`--value-relative`,n.toString()),this.valueMode===`triple`&&this.#r!==void 0&&this.style.setProperty(`--value-c-relative`,GC(this.#r,this.min,this.max).toString())}}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`keydown`,this.#w),this.removeEventListener(`pointerdown`,this.#pe),this.removeEventListener(`pointermove`,this.#me),this.removeEventListener(`pointerenter`,this.#he),this.#x?.disconnect(),this.#x=void 0,this.#S?.disconnect(),this.#S=void 0,this.#_!==void 0&&(clearTimeout(this.#_),this.#_=void 0),this.#ye()}static{this.styles=[w,sn,r`
9289
9320
  :host {
9290
9321
  display: inline-block;
9291
9322
  width: 200px;
@@ -9430,7 +9461,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9430
9461
  stroke-width: var(--midpoint-border-width, 0);
9431
9462
  vector-effect: non-scaling-stroke;
9432
9463
  }
9433
- `]}};E([d({type:Number,attribute:`value-a`})],KC.prototype,`valueA`,void 0),E([d({type:Number,attribute:`value-b`})],KC.prototype,`valueB`,void 0),E([d({type:Number,attribute:`value-c`})],KC.prototype,`valueC`,void 0),E([d({type:Number})],KC.prototype,`min`,void 0),E([d({type:Number})],KC.prototype,`max`,void 0),E([d({type:Number})],KC.prototype,`step`,void 0),E([d({type:Number})],KC.prototype,`stops`,void 0),E([d({type:String,attribute:`value-mode`})],KC.prototype,`valueMode`,void 0),E([d({type:String,attribute:`single-style`})],KC.prototype,`singleStyle`,void 0),E([d({type:String})],KC.prototype,`orientation`,void 0),E([d({type:String,attribute:`marker-style`})],KC.prototype,`markerStyle`,void 0),E([d({type:String,attribute:`marker-style-c`})],KC.prototype,`markerStyleC`,void 0),E([d({type:String})],KC.prototype,`crossover`,void 0),E([d({type:String,attribute:`value-drag`})],KC.prototype,`valueDrag`,void 0),E([d({type:String,attribute:`value-c-follow`})],KC.prototype,`valueCFollow`,void 0),E([d({type:Number,attribute:`value-min`})],KC.prototype,`valueMin`,void 0),E([d({type:Boolean,reflect:!0})],KC.prototype,`disabled`,void 0),E([d({type:Boolean,reflect:!0})],KC.prototype,`swipeable`,void 0),KC=E([T(`ixfx-slider-input`)],KC);let qC=class extends ag{constructor(...e){super(...e),this.inputSelector=`ixfx-slider-input`,this.orientation=`horizontal`,this.singleStyle=`range`,this.markerStyle=`needle`,this.stops=void 0,this.disabled=!1,this.swipeable=!1,this.lighttouch=!1,this.switchHeight=80}_renderEditableNumber(){return this._isMini?i``:i`
9464
+ `]}};E([d({type:Number,attribute:`value-a`})],JC.prototype,`valueA`,void 0),E([d({type:Number,attribute:`value-b`})],JC.prototype,`valueB`,void 0),E([d({type:Number,attribute:`value-c`})],JC.prototype,`valueC`,void 0),E([d({type:Number})],JC.prototype,`min`,void 0),E([d({type:Number})],JC.prototype,`max`,void 0),E([d({type:Number})],JC.prototype,`step`,void 0),E([d({type:Number})],JC.prototype,`stops`,void 0),E([d({type:String,attribute:`value-mode`})],JC.prototype,`valueMode`,void 0),E([d({type:String,attribute:`single-style`})],JC.prototype,`singleStyle`,void 0),E([d({type:String})],JC.prototype,`orientation`,void 0),E([d({type:String,attribute:`marker-style`})],JC.prototype,`markerStyle`,void 0),E([d({type:String,attribute:`marker-style-c`})],JC.prototype,`markerStyleC`,void 0),E([d({type:String})],JC.prototype,`crossover`,void 0),E([d({type:String,attribute:`value-drag`})],JC.prototype,`valueDrag`,void 0),E([d({type:String,attribute:`value-c-follow`})],JC.prototype,`valueCFollow`,void 0),E([d({type:Number,attribute:`value-min`})],JC.prototype,`valueMin`,void 0),E([d({type:Boolean,reflect:!0})],JC.prototype,`disabled`,void 0),E([d({type:Boolean,reflect:!0})],JC.prototype,`swipeable`,void 0),JC=E([T(`ixfx-slider-input`)],JC);let YC=class extends ag{constructor(...e){super(...e),this.inputSelector=`ixfx-slider-input`,this.orientation=`horizontal`,this.singleStyle=`range`,this.markerStyle=`needle`,this.stops=void 0,this.disabled=!1,this.swipeable=!1,this.lighttouch=!1,this.switchHeight=80}_renderEditableNumber(){return this._isMini?i``:i`
9434
9465
  <ixfx-editable-number
9435
9466
  class="number"
9436
9467
  mode="label"
@@ -9569,7 +9600,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9569
9600
  width: 100%;
9570
9601
  height: 100%;
9571
9602
  }
9572
- `}};E([d({type:String})],qC.prototype,`orientation`,void 0),E([d({type:String,attribute:`single-style`})],qC.prototype,`singleStyle`,void 0),E([d({type:String,attribute:`marker-style`})],qC.prototype,`markerStyle`,void 0),E([d({type:Number})],qC.prototype,`stops`,void 0),E([d({type:Boolean,reflect:!0})],qC.prototype,`disabled`,void 0),E([d({type:Boolean,reflect:!0})],qC.prototype,`swipeable`,void 0),E([d({type:Boolean})],qC.prototype,`lighttouch`,void 0),E([d({type:Number,attribute:`switch-height`})],qC.prototype,`switchHeight`,void 0),qC=E([T(`ixfx-labelled-slider-input`)],qC);let JC=class extends n{constructor(...e){super(...e),this.value=0,this.lit=!1,this.color=`oklch(50% 0.15 25)`,this.glow=!1,this.mode=`brightness`,this.blinking=!1,this.rate=500,this.attackTime=40,this.releaseTime=400,this.pulseRetrigger=!1,this.#t=`brightness`,this.#r=0,this.#i=0,this.#a=0,this.#o=0,this.#c=e=>{let n=Math.max(0,this.attackTime),r=Math.max(0,this.releaseTime),i=this.#a,a=this.#i,o=e-this.#r,s;s=n>0&&o<n?i+(a-i)*(o/n):o<n+r&&r>0?a*(1-(o-n)/r):0,s=Math.max(0,Math.min(Math.max(i,a),s)),this.#o=s,this.style.setProperty(`--value`,String(s)),o<n+r?this.#n=requestAnimationFrame(this.#c):(this.#n=void 0,this.#o=0)}}#e;#t;#n;#r;#i;#a;#o;willUpdate(e){if(e.has(`blinking`)&&(this.blinking?this.mode=`blink`:this.mode===`blink`&&(this.mode=`brightness`)),this.mode!==this.#t&&(this.#t=this.mode,this.#s()),e.has(`lit`)&&(this.lit?this.value=1:e.get(`lit`)!==void 0&&(this.value=0)),e.has(`color`)&&this.style.setProperty(`--_color-attr`,this.color),this.mode!==`pulse`&&(e.has(`value`)||e.has(`lit`))&&this.style.setProperty(`--value`,String(this.value)),e.has(`rate`)){this.#u();let e=this.rate<300?this.rate*.5:150;this.style.setProperty(`--transition-duration`,`${e}ms`)}}disconnectedCallback(){super.disconnectedCallback(),this.#d(),this.#l()}pulse(){this.mode===`pulse`&&(this.#i=this.value,this.#a=this.pulseRetrigger?0:this.#o,this.#r=performance.now(),this.#n===void 0&&(this.#n=requestAnimationFrame(this.#c)))}#s(){this.#l(),this.#o=0,this.blinking=this.mode===`blink`,this.#u(),this.style.setProperty(`--value`,this.mode===`pulse`?`0`:String(this.value))}#c;#l(){this.#n!==void 0&&(cancelAnimationFrame(this.#n),this.#n=void 0)}#u(){let e=this.#e!==void 0;this.#d(),this.mode===`blink`&&this.rate>0?this.#e=window.setInterval(()=>{this.value=+(this.value===0)},this.rate):(e||this.mode===`blink`)&&(this.value=0)}#d(){this.#e!==void 0&&(clearInterval(this.#e),this.#e=void 0)}render(){return i`<div part="circle"></div>`}static{this.styles=r`
9603
+ `}};E([d({type:String})],YC.prototype,`orientation`,void 0),E([d({type:String,attribute:`single-style`})],YC.prototype,`singleStyle`,void 0),E([d({type:String,attribute:`marker-style`})],YC.prototype,`markerStyle`,void 0),E([d({type:Number})],YC.prototype,`stops`,void 0),E([d({type:Boolean,reflect:!0})],YC.prototype,`disabled`,void 0),E([d({type:Boolean,reflect:!0})],YC.prototype,`swipeable`,void 0),E([d({type:Boolean})],YC.prototype,`lighttouch`,void 0),E([d({type:Number,attribute:`switch-height`})],YC.prototype,`switchHeight`,void 0),YC=E([T(`ixfx-labelled-slider-input`)],YC);let XC=class extends n{constructor(...e){super(...e),this.value=0,this.lit=!1,this.color=`oklch(50% 0.15 25)`,this.glow=!1,this.mode=`brightness`,this.blinking=!1,this.rate=500,this.attackTime=40,this.releaseTime=400,this.pulseRetrigger=!1,this.#t=`brightness`,this.#r=0,this.#i=0,this.#a=0,this.#o=0,this.#c=e=>{let n=Math.max(0,this.attackTime),r=Math.max(0,this.releaseTime),i=this.#a,a=this.#i,o=e-this.#r,s;s=n>0&&o<n?i+(a-i)*(o/n):o<n+r&&r>0?a*(1-(o-n)/r):0,s=Math.max(0,Math.min(Math.max(i,a),s)),this.#o=s,this.style.setProperty(`--value`,String(s)),o<n+r?this.#n=requestAnimationFrame(this.#c):(this.#n=void 0,this.#o=0)}}#e;#t;#n;#r;#i;#a;#o;willUpdate(e){if(e.has(`blinking`)&&(this.blinking?this.mode=`blink`:this.mode===`blink`&&(this.mode=`brightness`)),this.mode!==this.#t&&(this.#t=this.mode,this.#s()),e.has(`lit`)&&(this.lit?this.value=1:e.get(`lit`)!==void 0&&(this.value=0)),e.has(`color`)&&this.style.setProperty(`--_color-attr`,this.color),this.mode!==`pulse`&&(e.has(`value`)||e.has(`lit`))&&this.style.setProperty(`--value`,String(this.value)),e.has(`rate`)){this.#u();let e=this.rate<300?this.rate*.5:150;this.style.setProperty(`--transition-duration`,`${e}ms`)}}disconnectedCallback(){super.disconnectedCallback(),this.#d(),this.#l()}pulse(){this.mode===`pulse`&&(this.#i=this.value,this.#a=this.pulseRetrigger?0:this.#o,this.#r=performance.now(),this.#n===void 0&&(this.#n=requestAnimationFrame(this.#c)))}#s(){this.#l(),this.#o=0,this.blinking=this.mode===`blink`,this.#u(),this.style.setProperty(`--value`,this.mode===`pulse`?`0`:String(this.value))}#c;#l(){this.#n!==void 0&&(cancelAnimationFrame(this.#n),this.#n=void 0)}#u(){let e=this.#e!==void 0;this.#d(),this.mode===`blink`&&this.rate>0?this.#e=window.setInterval(()=>{this.value=+(this.value===0)},this.rate):(e||this.mode===`blink`)&&(this.value=0)}#d(){this.#e!==void 0&&(clearInterval(this.#e),this.#e=void 0)}render(){return i`<div part="circle"></div>`}static{this.styles=r`
9573
9604
  :host {
9574
9605
  --_size: var(--size, 1ex);
9575
9606
  /* Resolved colour: explicit --colour wins, then the \`color\` attribute, then a default. */
@@ -9638,7 +9669,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9638
9669
  :host([mode="pulse"]) div {
9639
9670
  transition: none;
9640
9671
  }
9641
- `}};E([d({type:Number})],JC.prototype,`value`,void 0),E([d({type:Boolean,attribute:`lit`,reflect:!0})],JC.prototype,`lit`,void 0),E([d({type:String})],JC.prototype,`color`,void 0),E([d({type:Boolean,attribute:`glow`,reflect:!0})],JC.prototype,`glow`,void 0),E([d({type:String,reflect:!0})],JC.prototype,`mode`,void 0),E([d({type:Boolean,attribute:`blinking`,reflect:!0})],JC.prototype,`blinking`,void 0),E([d({type:Number,attribute:`rate`})],JC.prototype,`rate`,void 0),E([d({type:Number,attribute:`attack-time`})],JC.prototype,`attackTime`,void 0),E([d({type:Number,attribute:`release-time`})],JC.prototype,`releaseTime`,void 0),E([d({type:Boolean,attribute:`pulse-retrigger`})],JC.prototype,`pulseRetrigger`,void 0),JC=E([T(`ixfx-led`)],JC);let YC=class extends n{constructor(...e){super(...e),this.headers=!1,this.stretchLastColumn=!1,this.interactionMode=`standard`,this.selectionFilter=`leaf`,this.exclusivity=`none`,this._columns=[],this._selectedByDepth=new Map,this._selectedKeys=new Set,this._selectedNodes=new Set,this.#n=new Map,this.#o=-1,this.#s=0,this.#c=0,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.label`,highlightKey:`incr-search-highlight`})}),this.tickled=new ie(this,{getItems:()=>{let e=[];for(let n=0;n<this._columns.length;n++){let r=this._columns[n];if(r)for(let i of r)e.push({id:this.#m(i,n)})}return e}}),this.#_=`user`,this.#v=!1,this.#Y=e=>{if(this.search.isOpen)return;let n=this.#U(),r=this._columns[n];if(!r||r.length===0){let e=this._columns[0];e&&e.length>0&&(this.tickled.setTickled(this.#m(e[0],0)),this.requestUpdate());return}switch(e.key){case`ArrowDown`:e.preventDefault(),this.#J(r,n,e,e=>Math.min(e+1,r.length-1));break;case`ArrowUp`:e.preventDefault(),this.#J(r,n,e,e=>Math.max(e-1,0));break;case`Home`:e.preventDefault(),this.#J(r,n,e,()=>0,!0);break;case`End`:e.preventDefault(),this.#J(r,n,e,()=>r.length-1,!0);break;case`PageUp`:e.preventDefault(),this.#J(r,n,e,e=>Math.max(e-this.#q(n),0),!0);break;case`PageDown`:e.preventDefault(),this.#J(r,n,e,e=>Math.min(e+this.#q(n),r.length-1),!0);break;case`ArrowRight`:{e.preventDefault();let i=this.#W();if(!i){r.length>0&&(this.#K(r[0],n),this.requestUpdate());return}let{node:a,depth:o}=i;if(this.interactionMode===`vscode`||this.interactionMode===`standard`?(this._selectedByDepth.set(o,a),this.#R(a,o)):this.#F(a,o),this._columns.length>o+1){let e=this._columns[o+1];e&&e.length>0&&this.#K(e[0],o+1)}this.requestUpdate();break}case`ArrowLeft`:if(e.preventDefault(),n>0){this.#M(),this._columns=this._columns.slice(0,n);let e=this._columns[n-1];if(e&&e.length>0){let r=this._selectedByDepth.get(n-1),i=r&&e.includes(r)?r:e[0];this.#K(i,n-1)}this.requestUpdate()}break;case`Enter`:{e.preventDefault();let n=this.#W();if(!n)return;let{node:i,depth:a,index:o}=n;if(this.interactionMode===`standard`||this.interactionMode===`vscode`){if(e.shiftKey&&this.#t?.depth===a){let e=Math.min(this.#t.index,o),n=Math.max(this.#t.index,o);this._selectedKeys=new Set(r.slice(e,n+1).map(e=>e.item.key))}else this._selectedKeys.add(i.item.key),this.#t={key:i.item.key,depth:a,index:o}}else this._selectedByDepth.set(a,i);this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:i,depth:a},bubbles:!0,composed:!0})),this.requestUpdate();break}case`Escape`:if(e.preventDefault(),this.#M(),this._columns.length>1){this._columns=this._columns.slice(0,-1);let e=Math.max(0,n-1),r=this._columns[e];if(r&&r.length>0){let n=this._selectedByDepth.get(e),i=n&&r.includes(n)?n:r[0];this.#K(i,e)}this.requestUpdate()}}},this.#X=(e,n)=>{e.preventDefault(),e.stopPropagation(),this.#o=n,this.#s=e.clientX;let r=this.shadowRoot?.querySelectorAll(`.column`)[n];this.#c=r?r.getBoundingClientRect().width:200,window.addEventListener(`pointermove`,this.#$),window.addEventListener(`pointerup`,this.#te)},this.#Z=null,this.#Q=0,this.#$=e=>{this.#o<0||(this.#Q=Math.max(32,this.#c+(e.clientX-this.#s)),this.#Z??=requestAnimationFrame(this.#ee))},this.#ee=()=>{this.#Z=null,!(this.#o<0)&&(this.shadowRoot?.querySelectorAll(`.column`)[this.#o])?.setAttribute(`style`,this.#re(this.#Q))},this.#te=()=>{this.#Z!==null&&(cancelAnimationFrame(this.#Z),this.#Z=null),this.#o>=0&&this.#Q>0&&(this.#n.set(this.#o,this.#Q),this.requestUpdate()),this.#Q=0,this.#o=-1,window.removeEventListener(`pointermove`,this.#$),window.removeEventListener(`pointerup`,this.#te)}}#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;get registry(){return this.#u}#f(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#p(){this.#u&&(this.search.setModes(this.#f()),this.#d?.(),this.#d=Lt(this.#u,this.search))}#m(e,n){return`${n}:${e.item.key}`}get#h(){return this.viewRoot??this.root}#g(){let e=this.tickled.tickledId;if(!e)return;let n=e.indexOf(`:`);if(!(n<0))return Number(e.substring(0,n))}updated(e){if(e.has(`searchModes`)&&this.#p(),e.has(`root`)&&this.root){this.#M(),this.viewRoot!==void 0&&(this.viewRoot=void 0),this._selectedByDepth.clear(),this._selectedKeys=new Set,this._selectedNodes.clear(),this.#e=void 0,this.#t=void 0,this.tickled.clearTickled();let e=this.#h;this._columns=e?.children?[e.children]:[]}if(e.has(`viewRoot`)&&this.#x(),e.has(`model`)){this.#l?.(),this.#l=void 0;let e=this.model;e&&(this.root=e.root,this.#l=e._subscribe(e=>{if(e.type===`root`)this.root=e.root,this.requestUpdate();else if(e.type===`invalidate`){for(let n=0;n<this._columns.length-1;n++)if(this._columns[n]?.some(n=>n.item.key===e.key)){this._columns=this._columns.slice(0,n+1),this.requestUpdate();break}}}))}if(this.#r?.children!==void 0&&this._loadingDepth!==void 0){let e=this._loadingDepth,n=this.#r.children;this.#r=void 0,this.#i=void 0,this._loadingDepth=void 0;let r=this._columns.slice(0,e);n.length>0&&r.push(n),this._columns=r}let n=e.get(`_columns`),r=e.has(`_columns`)&&(n?.length??0)<this._columns.length,i=e.has(`_loadingDepth`)&&this._loadingDepth!==void 0;if(r||i){let e=this.shadowRoot?.querySelector(`#container`);e?.scrollTo({left:e.scrollWidth,behavior:`smooth`})}}connectedCallback(){super.connectedCallback(),this.#u??=Jt(),this.#p()}disconnectedCallback(){super.disconnectedCallback(),this.#l?.(),this.#l=void 0,this.#d?.(),this.#d=void 0,this.#u=void 0}getConfig(){let e={};for(let[n,r]of this.#n)e[n]=r;return{columnWidths:e}}setConfig(e){this.#n.clear();for(let[n,r]of Object.entries(e.columnWidths))this.#n.set(Number(n),r);this.requestUpdate()}get selectedKeys(){return this._selectedKeys}set selectedKeys(e){this._selectedKeys=new Set(e),this.requestUpdate()}get selectedNode(){return this.#e}set selectedNode(e){this.#e=e,e&&(this.interactionMode===`implicit`||this.interactionMode===`standard`)&&(this._selectedKeys=new Set([e.item.key])),this.requestUpdate()}get selectedNodes(){return this._selectedNodes}select(e){if(!this.#A(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.add(e),this._selectedKeys.add(e.item.key),this.#e=e,this.#j(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this._selectedKeys.delete(e.item.key),this.#e===e&&(this.#e=[...this._selectedNodes].at(-1)),this.#j(n),this.requestUpdate()}clearSelection(){let e=new Set(this._selectedNodes);this._selectedKeys=new Set,this._selectedNodes.clear(),this.#e=void 0,e.size>0&&this.#j(e),this.requestUpdate()}selectAll(){}deselectAll(){}setSelected(e,n){this.interactionMode===`checked`?this.#H(e,n):n?(this._selectedKeys.add(e.item.key),this._selectedNodes.add(e)):(this._selectedKeys.delete(e.item.key),this._selectedNodes.delete(e)),this.requestUpdate()}getSelected(){let e=[];for(let n of this._columns)for(let r of n)this._selectedKeys.has(r.item.key)&&e.push(r);return e}navigateTo(e,n={}){let r=this.#h;if(!r?.children)return!1;let i=this.#_,a=this.#v;this.#_=`programmatic`,this.#v=n.silent===!0;try{return this.#y(r.children,e,n.reveal??`edge`)}finally{this.#_=i,this.#v=a}}invalidateStructure(){let e=new Set;for(let n of this._columns)for(let r of n)e.add(r);for(let e=0;e<this._columns.length;e++){let n=this._selectedByDepth.get(e);if(n&&!this._columns[e].includes(n)){this._columns=this._columns.slice(0,e+1);for(let n of[...this._selectedByDepth.keys()])n>=e&&this._selectedByDepth.delete(n);break}}for(let n of[...this._selectedNodes])e.has(n)||this._selectedNodes.delete(n);this.requestUpdate()}#_;#v;#y(e,n,r){this.#M(),this._selectedByDepth.clear(),this.tickled.clearTickled();let i=[e],a=e,o=!0,s,c=0;for(let e=0;e<n.length;e++){let r=a.findIndex(r=>r.item.key===n[e]);if(r<0){o=!1;break}let l=a[r];if(this._selectedByDepth.set(e,l),s=l,c=e,l.item.isLeaf||!l.children||l.children.length===0){e<n.length-1&&(o=!1);break}i.push(l.children),a=l.children}if(this._columns=i,s&&this.tickled.setTickled(this.#m(s,c)),this.interactionMode!==`implicit`&&this.interactionMode!==`manual`){let e=n.at(-1);e&&(this._selectedKeys=new Set([e]))}return this.requestUpdate(),this.#G(r===`center-if-hidden`?`auto`:`smooth`,r),o}navigateToNode(e){let n=this.#h;if(!n?.children)return!1;let r=this.#b(n.children,e);return r?this.navigateTo(r):!1}revealKey(e){let n=this.#h;if(!n?.children)return!1;let r=this.#b(n.children,n=>n.item.key===e);if(!r)return!1;let i=[n.children],a=n.children,o,s=0;for(let e=0;e<r.length;e++){let n=a.find(n=>n.item.key===r[e]);if(!n)return!1;if(o=n,s=e,n.children&&n.children.length>0)i.push(n.children),a=n.children;else break}return this._columns=i,o&&this.tickled.setTickled(this.#m(o,s)),this.requestUpdate(),this.#G(),!0}selectMany(e){let n=this.selectionFilter===`none`?[]:[...e],r=new Set(this._selectedNodes);this._selectedNodes=new Set(n),this._selectedKeys=new Set(n.map(e=>e.item.key)),this.#e=n.at(-1),this.#j(r),this.requestUpdate()}getNodes(){let e=this.#h;if(!e?.children)return[];let n=[],r=(e,i)=>{if(n.push({node:e,depth:i}),e.children)for(let n of e.children)r(n,i+1)};for(let n of e.children)r(n,0);return n}#b(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;if(i.children?.length){let r=this.#b(i.children,n,e);if(r)return r}}}#x(){this.#M();let e=new Set(this._selectedNodes);this._selectedByDepth.clear(),this._selectedKeys=new Set,this._selectedNodes.clear(),this.#e=void 0,this.#t=void 0,this.tickled.clearTickled();let n=this.#h;n?.children===void 0?n?(this._columns=[],this.#z(n,-1,!1)):(this._columns=[],this._loadingDepth=void 0):(this._columns=n.children?[n.children]:[],this._loadingDepth=void 0),e.size>0&&this.#j(e)}rebaseTo(e){if(e===void 0)return this.#S();let n=typeof e==`string`?this.#w(e):e;return!n||n.item.isLeaf===!0||n===this.viewRoot||n.item.key===this.viewRoot?.item.key?!1:n===this.root||!this.viewRoot&&n.item.key===this.root?.item.key?this.#S():(this.viewRoot=n,this.#C(),!0)}rebaseUp(){if(!this.viewRoot)return!1;let e=this.#E(this.viewRoot);return e?e===this.root?this.#S():(this.viewRoot=e,this.#C(),!0):!1}#S(){return this.viewRoot!==void 0&&(this.viewRoot=void 0,this.#C(),!0)}#C(){let e=this.viewRoot,n={viewRoot:e,path:e?this.#O(e):[]};this.dispatchEvent(new CustomEvent(`rebase`,{detail:n,bubbles:!0,composed:!0}))}#w(e){if(this.root)return this.root.item.key===e?this.root:this.#T(this.root.children??[],e)}#T(e,n){for(let r of e){if(r.item.key===n)return r;if(r.children){let e=this.#T(r.children,n);if(e)return e}}}#E(e){if(!(!this.root||e===this.root))return this.#D(this.root,e)}#D(e,n){if(e.children)for(let r of e.children){if(r===n||r.item.key===n.item.key)return e;let i=this.#D(r,n);if(i)return i}}#O(e){let n=[e],r=this.#E(e);for(;r&&(n.unshift(r),r!==this.root);)r=this.#E(r);return n}renderColumnContent(e,n){return console.warn(`ixfx-miller-base: renderColumnContent not overridden. depth=${n}, nodes=${e.length}`),a}_handleItemClick(e,n,r){this.#F(e,n,r)}_handleCheckboxClick(e,n,r){e.stopPropagation(),this.#B(n)}_handleItemDblClick(e,n,r){this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}_handleItemRightClick(e,n,r){this.dispatchEvent(new CustomEvent(`item-rightclick`,{detail:{node:e,depth:n,mouseEvent:r},bubbles:!0,composed:!0}))}_handleHeaderRightClick(e,n){let r=this.#ne(n),i=this.#N(n);this.dispatchEvent(new CustomEvent(`header-rightclick`,{detail:{depth:n,label:r,path:i,mouseEvent:e},bubbles:!0,composed:!0}))}_isSelected(e,n){return this.interactionMode===`implicit`?this._selectedByDepth.get(n)===e:this._selectedKeys.has(e.item.key)}#k(e,n){let r=this._columns[n+1];return r!==void 0&&e.children===r}_isOpen(e,n){return this.#k(e,n)}getItemState(e,n){let r=this._columns[n]?.find(n=>n.item.key===e);if(r)return{selected:this._isSelected(r,n),open:this.#k(r,n),focused:this._isFocused(r,n),isLeaf:r.item.isLeaf??!1}}#A(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf!==!1:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#j(e){if(this.#v)return;let n={selected:new Set(this._selectedNodes),previous:e,origin:this.#_};this.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}#M(){if(this.#a!==void 0&&(clearTimeout(this.#a),this.#a=void 0),this.#i){let e=this.#r,n=this._loadingDepth;this.#i.abort(),this.#i=void 0,this.#r=void 0,this._loadingDepth=void 0,e&&n!==void 0&&this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}}#N(e){let n=[];this.#h&&n.push(this.#h);for(let r=0;r<e;r++){let e=this._selectedByDepth.get(r);e&&n.push(e)}return n}#P(e){let n={depth:e,label:this.#ne(e),path:this.#N(e)};this.dispatchEvent(new CustomEvent(`header-click`,{detail:n,bubbles:!0,composed:!0}))}#F(e,n,r){switch(this._loadingDepth!==void 0&&this._loadingDepth>n&&this.#M(),this.tickled.setTickled(this.#m(e,n)),this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e,depth:n},bubbles:!0,composed:!0})),this.interactionMode){case`implicit`:this.#I(e,n);break;case`standard`:this.#L(e,n,r);break;case`vscode`:this.#L(e,n,r);break;case`manual`:break;case`checked`:this.#R(e,n,!0)}}#I(e,n){let r=new Set(this._selectedNodes);this._selectedByDepth.set(n,e),this.#e=e,this._selectedKeys=new Set([e.item.key]),this._selectedNodes.clear(),this._selectedNodes.add(e),this.#R(e,n,!0),r.has(e)||this.#j(r)}#L(e,n,r){let i=this._columns[n],a=i?i.indexOf(e):-1,o=r?r.metaKey||r.ctrlKey:!1,s=r?r.shiftKey:!1;if(o){this._selectedKeys.has(e.item.key)?(this._selectedKeys.delete(e.item.key),this._selectedNodes.delete(e)):(this._selectedKeys.add(e.item.key),this._selectedNodes.add(e)),this.#t=a>=0?{key:e.item.key,depth:n,index:a}:this.#t,this.requestUpdate();return}if(s&&this.#t&&this.#t.depth===n&&i){let e=Math.min(this.#t.index,a),n=Math.max(this.#t.index,a),r=i.slice(e,n+1);this._selectedKeys=new Set(r.map(e=>e.item.key)),this._selectedNodes=new Set(r),this.requestUpdate();return}let c=new Set(this._selectedNodes);this._selectedKeys=new Set([e.item.key]),this._selectedNodes=new Set([e]),this.#t=a>=0?{key:e.item.key,depth:n,index:a}:void 0,this._selectedByDepth.set(n,e),this.#e=e,this.#R(e,n,!0),(!c.has(e)||c.size!==1)&&this.#j(c)}#R(e,n,r=!1){if(e.item.isLeaf){this._columns=this._columns.slice(0,n+1),this.requestUpdate();return}if(e.children===void 0)this.#z(e,n,!0,r);else{let r=this._columns.slice(0,n+1);r.push(e.children),this._columns=r,this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}}#z(e,n,r,i=!1){let a=n+1;this._columns=this._columns.slice(0,a),this._loadingDepth=a,this.#i?.abort(),this.#r=e;let o=new AbortController;this.#i=o,r&&this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}));let s=n=>{if(o.signal.aborted)return;e.children=n,this.#r=void 0,this.#i=void 0,this._loadingDepth=void 0;let r=this._columns.slice(0,a);n.length>0&&r.push(n),this._columns=r},c=n=>{n.name!==`AbortError`&&console.error(n),e.children=[],this.#r=void 0,this.#i=void 0,this._loadingDepth=void 0,this.requestUpdate()};if(this.model||this.loadChildren){this.#a!==void 0&&(clearTimeout(this.#a),this.#a=void 0);let n=()=>{this.#a=void 0,this.#r===e&&(this.model?this.model.getChildren(e,a-1,o.signal):dg(this.loadChildren({node:e,depth:a-1},o.signal),o.signal)).then(e=>s([...e])).catch(c)};i?n():this.#a=setTimeout(n,150)}else{this._loadingDepth=void 0,this.#r=void 0,this.#i=void 0;let e=this._columns.slice(0,a);e.push([]),this._columns=e}}#B(e){let n=new Set(this._selectedNodes),r=this._selectedKeys.has(e.item.key);(e.children?.length?this.#V(e):r)?this.#H(e,!1):this.#H(e,!0),this.requestUpdate(),this.#j(n)}#V(e){return this._selectedKeys.has(e.item.key)?!e.children?.length||e.children.every(e=>this.#V(e)):!1}#H(e,n){if(n?(this._selectedKeys.add(e.item.key),this._selectedNodes.add(e)):(this._selectedKeys.delete(e.item.key),this._selectedNodes.delete(e)),e.children)for(let r of e.children)this.#H(r,n)}#U(){return this.#g()??0}#W(){let e=this.tickled.tickledId;if(!e)return;let n=e.indexOf(`:`);if(n<0)return;let r=Number(e.substring(0,n)),i=e.substring(n+1),a=this._columns[r];if(!a)return;let o=a.findIndex(e=>e.item.key===i);if(!(o<0))return{node:a[o],depth:r,index:o}}#G(e=`smooth`,n=`edge`){requestAnimationFrame(()=>{let r=this.#W();if(!r)return;let i=this.shadowRoot?.querySelectorAll(`.column`)[r.depth]?.querySelector(`.column-content`);if(!i)return;let a=i.querySelectorAll(`.item`)[r.index];if(a){if(n===`center-if-hidden`){let n=a.getBoundingClientRect(),r=i.getBoundingClientRect(),o=n.top<r.top||n.bottom>r.bottom;a.scrollIntoView({block:o?`center`:`nearest`,inline:`nearest`,behavior:e});return}a.scrollIntoView({block:`nearest`,behavior:e})}})}#K(e,n){this.tickled.setTickled(this.#m(e,n)),this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}#q(e){let n=this.shadowRoot?.querySelectorAll(`.column`)[e]?.querySelector(`.column-content`),r=n?.querySelector(`.item`);return!n||!r||r.offsetHeight===0?10:Math.max(1,Math.floor(n.clientHeight/r.offsetHeight)-1)}#J(e,n,r,i,a=!1){let o=this.#W(),s=i(o!==void 0&&o.depth===n?o.index:-1),c=e[s];if(c){if(this.#K(c,n),this.interactionMode===`standard`||this.interactionMode===`vscode`){let i=o?.index??0;if(r.shiftKey){if(!this.#t||this.#t.depth!==n){let r=e[i];r&&(this.#t={key:r.item.key,depth:n,index:i,selectionSnapshot:this.interactionMode===`vscode`?new Set(this._selectedKeys):void 0})}if(this.#t){let n=Math.min(this.#t.index,s),r=Math.max(this.#t.index,s),i=e.slice(n,r+1).map(e=>e.item.key);if(this.interactionMode===`vscode`){let e=this.#t.selectionSnapshot;for(let n of i)e.has(n)?this._selectedKeys.delete(n):this._selectedKeys.add(n)}else this._selectedKeys=new Set(i)}}else this.#t=this.interactionMode===`standard`?{key:c.item.key,depth:n,index:s}:void 0}this.requestUpdate(),a&&this.#G(`auto`)}}#Y;#X;#Z;#Q;#$;#ee;#te;#ne(e){if(e===0)return this.#h?.item.label??``;let n=this._selectedByDepth.get(e-1);if(n)return n.item.label;let r=this._columns[e-1],i=this._columns[e];if(r&&i){let e=r.find(e=>e.children===i);if(e)return e.item.label}return``}#re(e){return`width:${e}px;flex-grow:0;flex-shrink:0;flex-basis:auto;max-width:none`}#ie(e,n){let r=this.#n.get(e);return r===void 0?this.stretchLastColumn&&n?`width:max-content;flex-grow:1;flex-shrink:0;flex-basis:auto;min-width:0`:`width:max-content;flex-grow:0;flex-shrink:0;flex-basis:auto`:this.#re(r)}#ae(e,n){return this.tickled.isTickled(this.#m(e,n))}renderLoadingIndicator(){return i`<div class="loading-spinner"></div>`}#oe(){let e=this._loadingDepth,n=this.stretchLastColumn&&this.#n.get(e)===void 0;return i`
9672
+ `}};E([d({type:Number})],XC.prototype,`value`,void 0),E([d({type:Boolean,attribute:`lit`,reflect:!0})],XC.prototype,`lit`,void 0),E([d({type:String})],XC.prototype,`color`,void 0),E([d({type:Boolean,attribute:`glow`,reflect:!0})],XC.prototype,`glow`,void 0),E([d({type:String,reflect:!0})],XC.prototype,`mode`,void 0),E([d({type:Boolean,attribute:`blinking`,reflect:!0})],XC.prototype,`blinking`,void 0),E([d({type:Number,attribute:`rate`})],XC.prototype,`rate`,void 0),E([d({type:Number,attribute:`attack-time`})],XC.prototype,`attackTime`,void 0),E([d({type:Number,attribute:`release-time`})],XC.prototype,`releaseTime`,void 0),E([d({type:Boolean,attribute:`pulse-retrigger`})],XC.prototype,`pulseRetrigger`,void 0),XC=E([T(`ixfx-led`)],XC);let ZC=class extends n{constructor(...e){super(...e),this.headers=!1,this.stretchLastColumn=!1,this.interactionMode=`standard`,this.selectionFilter=`leaf`,this.exclusivity=`none`,this._columns=[],this._selectedByDepth=new Map,this._selectedKeys=new Set,this._selectedNodes=new Set,this.#n=new Map,this.#o=-1,this.#s=0,this.#c=0,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.label`,highlightKey:`incr-search-highlight`})}),this.tickled=new ie(this,{getItems:()=>{let e=[];for(let n=0;n<this._columns.length;n++){let r=this._columns[n];if(r)for(let i of r)e.push({id:this.#m(i,n)})}return e}}),this.#_=`user`,this.#v=!1,this.#Y=e=>{if(this.search.isOpen)return;let n=this.#U(),r=this._columns[n];if(!r||r.length===0){let e=this._columns[0];e&&e.length>0&&(this.tickled.setTickled(this.#m(e[0],0)),this.requestUpdate());return}switch(e.key){case`ArrowDown`:e.preventDefault(),this.#J(r,n,e,e=>Math.min(e+1,r.length-1));break;case`ArrowUp`:e.preventDefault(),this.#J(r,n,e,e=>Math.max(e-1,0));break;case`Home`:e.preventDefault(),this.#J(r,n,e,()=>0,!0);break;case`End`:e.preventDefault(),this.#J(r,n,e,()=>r.length-1,!0);break;case`PageUp`:e.preventDefault(),this.#J(r,n,e,e=>Math.max(e-this.#q(n),0),!0);break;case`PageDown`:e.preventDefault(),this.#J(r,n,e,e=>Math.min(e+this.#q(n),r.length-1),!0);break;case`ArrowRight`:{e.preventDefault();let i=this.#W();if(!i){r.length>0&&(this.#K(r[0],n),this.requestUpdate());return}let{node:a,depth:o}=i;if(this.interactionMode===`vscode`||this.interactionMode===`standard`?(this._selectedByDepth.set(o,a),this.#R(a,o)):this.#F(a,o),this._columns.length>o+1){let e=this._columns[o+1];e&&e.length>0&&this.#K(e[0],o+1)}this.requestUpdate();break}case`ArrowLeft`:if(e.preventDefault(),n>0){this.#M(),this._columns=this._columns.slice(0,n);let e=this._columns[n-1];if(e&&e.length>0){let r=this._selectedByDepth.get(n-1),i=r&&e.includes(r)?r:e[0];this.#K(i,n-1)}this.requestUpdate()}break;case`Enter`:{e.preventDefault();let n=this.#W();if(!n)return;let{node:i,depth:a,index:o}=n;if(this.interactionMode===`standard`||this.interactionMode===`vscode`){if(e.shiftKey&&this.#t?.depth===a){let e=Math.min(this.#t.index,o),n=Math.max(this.#t.index,o);this._selectedKeys=new Set(r.slice(e,n+1).map(e=>e.item.key))}else this._selectedKeys.add(i.item.key),this.#t={key:i.item.key,depth:a,index:o}}else this._selectedByDepth.set(a,i);this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:i,depth:a},bubbles:!0,composed:!0})),this.requestUpdate();break}case`Escape`:if(e.preventDefault(),this.#M(),this._columns.length>1){this._columns=this._columns.slice(0,-1);let e=Math.max(0,n-1),r=this._columns[e];if(r&&r.length>0){let n=this._selectedByDepth.get(e),i=n&&r.includes(n)?n:r[0];this.#K(i,e)}this.requestUpdate()}}},this.#X=(e,n)=>{e.preventDefault(),e.stopPropagation(),this.#o=n,this.#s=e.clientX;let r=this.shadowRoot?.querySelectorAll(`.column`)[n];this.#c=r?r.getBoundingClientRect().width:200,window.addEventListener(`pointermove`,this.#$),window.addEventListener(`pointerup`,this.#te)},this.#Z=null,this.#Q=0,this.#$=e=>{this.#o<0||(this.#Q=Math.max(32,this.#c+(e.clientX-this.#s)),this.#Z??=requestAnimationFrame(this.#ee))},this.#ee=()=>{this.#Z=null,!(this.#o<0)&&(this.shadowRoot?.querySelectorAll(`.column`)[this.#o])?.setAttribute(`style`,this.#re(this.#Q))},this.#te=()=>{this.#Z!==null&&(cancelAnimationFrame(this.#Z),this.#Z=null),this.#o>=0&&this.#Q>0&&(this.#n.set(this.#o,this.#Q),this.requestUpdate()),this.#Q=0,this.#o=-1,window.removeEventListener(`pointermove`,this.#$),window.removeEventListener(`pointerup`,this.#te)}}#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;get registry(){return this.#u}#f(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#p(){this.#u&&(this.search.setModes(this.#f()),this.#d?.(),this.#d=Lt(this.#u,this.search))}#m(e,n){return`${n}:${e.item.key}`}get#h(){return this.viewRoot??this.root}#g(){let e=this.tickled.tickledId;if(!e)return;let n=e.indexOf(`:`);if(!(n<0))return Number(e.substring(0,n))}updated(e){if(e.has(`searchModes`)&&this.#p(),e.has(`root`)&&this.root){this.#M(),this.viewRoot!==void 0&&(this.viewRoot=void 0),this._selectedByDepth.clear(),this._selectedKeys=new Set,this._selectedNodes.clear(),this.#e=void 0,this.#t=void 0,this.tickled.clearTickled();let e=this.#h;this._columns=e?.children?[e.children]:[]}if(e.has(`viewRoot`)&&this.#x(),e.has(`model`)){this.#l?.(),this.#l=void 0;let e=this.model;e&&(this.root=e.root,this.#l=e._subscribe(e=>{if(e.type===`root`)this.root=e.root,this.requestUpdate();else if(e.type===`invalidate`){for(let n=0;n<this._columns.length-1;n++)if(this._columns[n]?.some(n=>n.item.key===e.key)){this._columns=this._columns.slice(0,n+1),this.requestUpdate();break}}}))}if(this.#r?.children!==void 0&&this._loadingDepth!==void 0){let e=this._loadingDepth,n=this.#r.children;this.#r=void 0,this.#i=void 0,this._loadingDepth=void 0;let r=this._columns.slice(0,e);n.length>0&&r.push(n),this._columns=r}let n=e.get(`_columns`),r=e.has(`_columns`)&&(n?.length??0)<this._columns.length,i=e.has(`_loadingDepth`)&&this._loadingDepth!==void 0;if(r||i){let e=this.shadowRoot?.querySelector(`#container`);e?.scrollTo({left:e.scrollWidth,behavior:`smooth`})}}connectedCallback(){super.connectedCallback(),this.#u??=Jt(),this.#p()}disconnectedCallback(){super.disconnectedCallback(),this.#l?.(),this.#l=void 0,this.#d?.(),this.#d=void 0,this.#u=void 0}getConfig(){let e={};for(let[n,r]of this.#n)e[n]=r;return{columnWidths:e}}setConfig(e){this.#n.clear();for(let[n,r]of Object.entries(e.columnWidths))this.#n.set(Number(n),r);this.requestUpdate()}get selectedKeys(){return this._selectedKeys}set selectedKeys(e){this._selectedKeys=new Set(e),this.requestUpdate()}get selectedNode(){return this.#e}set selectedNode(e){this.#e=e,e&&(this.interactionMode===`implicit`||this.interactionMode===`standard`)&&(this._selectedKeys=new Set([e.item.key])),this.requestUpdate()}get selectedNodes(){return this._selectedNodes}select(e){if(!this.#A(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.add(e),this._selectedKeys.add(e.item.key),this.#e=e,this.#j(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this._selectedKeys.delete(e.item.key),this.#e===e&&(this.#e=[...this._selectedNodes].at(-1)),this.#j(n),this.requestUpdate()}clearSelection(){let e=new Set(this._selectedNodes);this._selectedKeys=new Set,this._selectedNodes.clear(),this.#e=void 0,e.size>0&&this.#j(e),this.requestUpdate()}selectAll(){}deselectAll(){}setSelected(e,n){this.interactionMode===`checked`?this.#H(e,n):n?(this._selectedKeys.add(e.item.key),this._selectedNodes.add(e)):(this._selectedKeys.delete(e.item.key),this._selectedNodes.delete(e)),this.requestUpdate()}getSelected(){let e=[];for(let n of this._columns)for(let r of n)this._selectedKeys.has(r.item.key)&&e.push(r);return e}navigateTo(e,n={}){let r=this.#h;if(!r?.children)return!1;let i=this.#_,a=this.#v;this.#_=`programmatic`,this.#v=n.silent===!0;try{return this.#y(r.children,e,n.reveal??`edge`)}finally{this.#_=i,this.#v=a}}invalidateStructure(){let e=new Set;for(let n of this._columns)for(let r of n)e.add(r);for(let e=0;e<this._columns.length;e++){let n=this._selectedByDepth.get(e);if(n&&!this._columns[e].includes(n)){this._columns=this._columns.slice(0,e+1);for(let n of[...this._selectedByDepth.keys()])n>=e&&this._selectedByDepth.delete(n);break}}for(let n of[...this._selectedNodes])e.has(n)||this._selectedNodes.delete(n);this.requestUpdate()}#_;#v;#y(e,n,r){this.#M(),this._selectedByDepth.clear(),this.tickled.clearTickled();let i=[e],a=e,o=!0,s,c=0;for(let e=0;e<n.length;e++){let r=a.findIndex(r=>r.item.key===n[e]);if(r<0){o=!1;break}let l=a[r];if(this._selectedByDepth.set(e,l),s=l,c=e,l.item.isLeaf||!l.children||l.children.length===0){e<n.length-1&&(o=!1);break}i.push(l.children),a=l.children}if(this._columns=i,s&&this.tickled.setTickled(this.#m(s,c)),this.interactionMode!==`implicit`&&this.interactionMode!==`manual`){let e=n.at(-1);e&&(this._selectedKeys=new Set([e]))}return this.requestUpdate(),this.#G(r===`center-if-hidden`?`auto`:`smooth`,r),o}navigateToNode(e){let n=this.#h;if(!n?.children)return!1;let r=this.#b(n.children,e);return r?this.navigateTo(r):!1}revealKey(e){let n=this.#h;if(!n?.children)return!1;let r=this.#b(n.children,n=>n.item.key===e);if(!r)return!1;let i=[n.children],a=n.children,o,s=0;for(let e=0;e<r.length;e++){let n=a.find(n=>n.item.key===r[e]);if(!n)return!1;if(o=n,s=e,n.children&&n.children.length>0)i.push(n.children),a=n.children;else break}return this._columns=i,o&&this.tickled.setTickled(this.#m(o,s)),this.requestUpdate(),this.#G(),!0}selectMany(e){let n=this.selectionFilter===`none`?[]:[...e],r=new Set(this._selectedNodes);this._selectedNodes=new Set(n),this._selectedKeys=new Set(n.map(e=>e.item.key)),this.#e=n.at(-1),this.#j(r),this.requestUpdate()}getNodes(){let e=this.#h;if(!e?.children)return[];let n=[],r=(e,i)=>{if(n.push({node:e,depth:i}),e.children)for(let n of e.children)r(n,i+1)};for(let n of e.children)r(n,0);return n}#b(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;if(i.children?.length){let r=this.#b(i.children,n,e);if(r)return r}}}#x(){this.#M();let e=new Set(this._selectedNodes);this._selectedByDepth.clear(),this._selectedKeys=new Set,this._selectedNodes.clear(),this.#e=void 0,this.#t=void 0,this.tickled.clearTickled();let n=this.#h;n?.children===void 0?n?(this._columns=[],this.#z(n,-1,!1)):(this._columns=[],this._loadingDepth=void 0):(this._columns=n.children?[n.children]:[],this._loadingDepth=void 0),e.size>0&&this.#j(e)}rebaseTo(e){if(e===void 0)return this.#S();let n=typeof e==`string`?this.#w(e):e;return!n||n.item.isLeaf===!0||n===this.viewRoot||n.item.key===this.viewRoot?.item.key?!1:n===this.root||!this.viewRoot&&n.item.key===this.root?.item.key?this.#S():(this.viewRoot=n,this.#C(),!0)}rebaseUp(){if(!this.viewRoot)return!1;let e=this.#E(this.viewRoot);return e?e===this.root?this.#S():(this.viewRoot=e,this.#C(),!0):!1}#S(){return this.viewRoot!==void 0&&(this.viewRoot=void 0,this.#C(),!0)}#C(){let e=this.viewRoot,n={viewRoot:e,path:e?this.#O(e):[]};this.dispatchEvent(new CustomEvent(`rebase`,{detail:n,bubbles:!0,composed:!0}))}#w(e){if(this.root)return this.root.item.key===e?this.root:this.#T(this.root.children??[],e)}#T(e,n){for(let r of e){if(r.item.key===n)return r;if(r.children){let e=this.#T(r.children,n);if(e)return e}}}#E(e){if(!(!this.root||e===this.root))return this.#D(this.root,e)}#D(e,n){if(e.children)for(let r of e.children){if(r===n||r.item.key===n.item.key)return e;let i=this.#D(r,n);if(i)return i}}#O(e){let n=[e],r=this.#E(e);for(;r&&(n.unshift(r),r!==this.root);)r=this.#E(r);return n}renderColumnContent(e,n){return console.warn(`ixfx-miller-base: renderColumnContent not overridden. depth=${n}, nodes=${e.length}`),a}_handleItemClick(e,n,r){this.#F(e,n,r)}_handleCheckboxClick(e,n,r){e.stopPropagation(),this.#B(n)}_handleItemDblClick(e,n,r){this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}_handleItemRightClick(e,n,r){this.dispatchEvent(new CustomEvent(`item-rightclick`,{detail:{node:e,depth:n,mouseEvent:r},bubbles:!0,composed:!0}))}_handleHeaderRightClick(e,n){let r=this.#ne(n),i=this.#N(n);this.dispatchEvent(new CustomEvent(`header-rightclick`,{detail:{depth:n,label:r,path:i,mouseEvent:e},bubbles:!0,composed:!0}))}_isSelected(e,n){return this.interactionMode===`implicit`?this._selectedByDepth.get(n)===e:this._selectedKeys.has(e.item.key)}#k(e,n){let r=this._columns[n+1];return r!==void 0&&e.children===r}_isOpen(e,n){return this.#k(e,n)}getItemState(e,n){let r=this._columns[n]?.find(n=>n.item.key===e);if(r)return{selected:this._isSelected(r,n),open:this.#k(r,n),focused:this._isFocused(r,n),isLeaf:r.item.isLeaf??!1}}#A(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf!==!1:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#j(e){if(this.#v)return;let n={selected:new Set(this._selectedNodes),previous:e,origin:this.#_};this.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}#M(){if(this.#a!==void 0&&(clearTimeout(this.#a),this.#a=void 0),this.#i){let e=this.#r,n=this._loadingDepth;this.#i.abort(),this.#i=void 0,this.#r=void 0,this._loadingDepth=void 0,e&&n!==void 0&&this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}}#N(e){let n=[];this.#h&&n.push(this.#h);for(let r=0;r<e;r++){let e=this._selectedByDepth.get(r);e&&n.push(e)}return n}#P(e){let n={depth:e,label:this.#ne(e),path:this.#N(e)};this.dispatchEvent(new CustomEvent(`header-click`,{detail:n,bubbles:!0,composed:!0}))}#F(e,n,r){switch(this._loadingDepth!==void 0&&this._loadingDepth>n&&this.#M(),this.tickled.setTickled(this.#m(e,n)),this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e,depth:n},bubbles:!0,composed:!0})),this.interactionMode){case`implicit`:this.#I(e,n);break;case`standard`:this.#L(e,n,r);break;case`vscode`:this.#L(e,n,r);break;case`manual`:break;case`checked`:this.#R(e,n,!0)}}#I(e,n){let r=new Set(this._selectedNodes);this._selectedByDepth.set(n,e),this.#e=e,this._selectedKeys=new Set([e.item.key]),this._selectedNodes.clear(),this._selectedNodes.add(e),this.#R(e,n,!0),r.has(e)||this.#j(r)}#L(e,n,r){let i=this._columns[n],a=i?i.indexOf(e):-1,o=r?r.metaKey||r.ctrlKey:!1,s=r?r.shiftKey:!1;if(o){this._selectedKeys.has(e.item.key)?(this._selectedKeys.delete(e.item.key),this._selectedNodes.delete(e)):(this._selectedKeys.add(e.item.key),this._selectedNodes.add(e)),this.#t=a>=0?{key:e.item.key,depth:n,index:a}:this.#t,this.requestUpdate();return}if(s&&this.#t&&this.#t.depth===n&&i){let e=Math.min(this.#t.index,a),n=Math.max(this.#t.index,a),r=i.slice(e,n+1);this._selectedKeys=new Set(r.map(e=>e.item.key)),this._selectedNodes=new Set(r),this.requestUpdate();return}let c=new Set(this._selectedNodes);this._selectedKeys=new Set([e.item.key]),this._selectedNodes=new Set([e]),this.#t=a>=0?{key:e.item.key,depth:n,index:a}:void 0,this._selectedByDepth.set(n,e),this.#e=e,this.#R(e,n,!0),(!c.has(e)||c.size!==1)&&this.#j(c)}#R(e,n,r=!1){if(e.item.isLeaf){this._columns=this._columns.slice(0,n+1),this.requestUpdate();return}if(e.children===void 0)this.#z(e,n,!0,r);else{let r=this._columns.slice(0,n+1);r.push(e.children),this._columns=r,this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}}#z(e,n,r,i=!1){let a=n+1;this._columns=this._columns.slice(0,a),this._loadingDepth=a,this.#i?.abort(),this.#r=e;let o=new AbortController;this.#i=o,r&&this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}));let s=n=>{if(o.signal.aborted)return;e.children=n,this.#r=void 0,this.#i=void 0,this._loadingDepth=void 0;let r=this._columns.slice(0,a);n.length>0&&r.push(n),this._columns=r},c=n=>{n.name!==`AbortError`&&console.error(n),e.children=[],this.#r=void 0,this.#i=void 0,this._loadingDepth=void 0,this.requestUpdate()};if(this.model||this.loadChildren){this.#a!==void 0&&(clearTimeout(this.#a),this.#a=void 0);let n=()=>{this.#a=void 0,this.#r===e&&(this.model?this.model.getChildren(e,a-1,o.signal):dg(this.loadChildren({node:e,depth:a-1},o.signal),o.signal)).then(e=>s([...e])).catch(c)};i?n():this.#a=setTimeout(n,150)}else{this._loadingDepth=void 0,this.#r=void 0,this.#i=void 0;let e=this._columns.slice(0,a);e.push([]),this._columns=e}}#B(e){let n=new Set(this._selectedNodes),r=this._selectedKeys.has(e.item.key);(e.children?.length?this.#V(e):r)?this.#H(e,!1):this.#H(e,!0),this.requestUpdate(),this.#j(n)}#V(e){return this._selectedKeys.has(e.item.key)?!e.children?.length||e.children.every(e=>this.#V(e)):!1}#H(e,n){if(n?(this._selectedKeys.add(e.item.key),this._selectedNodes.add(e)):(this._selectedKeys.delete(e.item.key),this._selectedNodes.delete(e)),e.children)for(let r of e.children)this.#H(r,n)}#U(){return this.#g()??0}#W(){let e=this.tickled.tickledId;if(!e)return;let n=e.indexOf(`:`);if(n<0)return;let r=Number(e.substring(0,n)),i=e.substring(n+1),a=this._columns[r];if(!a)return;let o=a.findIndex(e=>e.item.key===i);if(!(o<0))return{node:a[o],depth:r,index:o}}#G(e=`smooth`,n=`edge`){requestAnimationFrame(()=>{let r=this.#W();if(!r)return;let i=this.shadowRoot?.querySelectorAll(`.column`)[r.depth]?.querySelector(`.column-content`);if(!i)return;let a=i.querySelectorAll(`.item`)[r.index];if(a){if(n===`center-if-hidden`){let n=a.getBoundingClientRect(),r=i.getBoundingClientRect(),o=n.top<r.top||n.bottom>r.bottom;a.scrollIntoView({block:o?`center`:`nearest`,inline:`nearest`,behavior:e});return}a.scrollIntoView({block:`nearest`,behavior:e})}})}#K(e,n){this.tickled.setTickled(this.#m(e,n)),this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}#q(e){let n=this.shadowRoot?.querySelectorAll(`.column`)[e]?.querySelector(`.column-content`),r=n?.querySelector(`.item`);return!n||!r||r.offsetHeight===0?10:Math.max(1,Math.floor(n.clientHeight/r.offsetHeight)-1)}#J(e,n,r,i,a=!1){let o=this.#W(),s=i(o!==void 0&&o.depth===n?o.index:-1),c=e[s];if(c){if(this.#K(c,n),this.interactionMode===`standard`||this.interactionMode===`vscode`){let i=o?.index??0;if(r.shiftKey){if(!this.#t||this.#t.depth!==n){let r=e[i];r&&(this.#t={key:r.item.key,depth:n,index:i,selectionSnapshot:this.interactionMode===`vscode`?new Set(this._selectedKeys):void 0})}if(this.#t){let n=Math.min(this.#t.index,s),r=Math.max(this.#t.index,s),i=e.slice(n,r+1).map(e=>e.item.key);if(this.interactionMode===`vscode`){let e=this.#t.selectionSnapshot;for(let n of i)e.has(n)?this._selectedKeys.delete(n):this._selectedKeys.add(n)}else this._selectedKeys=new Set(i)}}else this.#t=this.interactionMode===`standard`?{key:c.item.key,depth:n,index:s}:void 0}this.requestUpdate(),a&&this.#G(`auto`)}}#Y;#X;#Z;#Q;#$;#ee;#te;#ne(e){if(e===0)return this.#h?.item.label??``;let n=this._selectedByDepth.get(e-1);if(n)return n.item.label;let r=this._columns[e-1],i=this._columns[e];if(r&&i){let e=r.find(e=>e.children===i);if(e)return e.item.label}return``}#re(e){return`width:${e}px;flex-grow:0;flex-shrink:0;flex-basis:auto;max-width:none`}#ie(e,n){let r=this.#n.get(e);return r===void 0?this.stretchLastColumn&&n?`width:max-content;flex-grow:1;flex-shrink:0;flex-basis:auto;min-width:0`:`width:max-content;flex-grow:0;flex-shrink:0;flex-basis:auto`:this.#re(r)}#ae(e,n){return this.tickled.isTickled(this.#m(e,n))}renderLoadingIndicator(){return i`<div class="loading-spinner"></div>`}#oe(){let e=this._loadingDepth,n=this.stretchLastColumn&&this.#n.get(e)===void 0;return i`
9642
9673
  <div class="column loading-column ${n?`stretch-last`:``}" style=${this.#ie(e,!0)}>
9643
9674
  ${this.headers?i`
9644
9675
  <div class="column-header">${this.#ne(e)}</div>
@@ -9793,7 +9824,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9793
9824
  border-radius: 2px;
9794
9825
  padding: 0 1px;
9795
9826
  }
9796
- `]}};E([d({type:Object})],YC.prototype,`root`,void 0),E([d({attribute:!1})],YC.prototype,`model`,void 0),E([d({type:Boolean})],YC.prototype,`headers`,void 0),E([d({type:Boolean,attribute:`stretch-last-column`,reflect:!0})],YC.prototype,`stretchLastColumn`,void 0),E([d({attribute:!1})],YC.prototype,`viewRoot`,void 0),E([d({type:String})],YC.prototype,`interactionMode`,void 0),E([d({reflect:!0,attribute:`selection-filter`})],YC.prototype,`selectionFilter`,void 0),E([d({reflect:!0,attribute:`exclusivity`})],YC.prototype,`exclusivity`,void 0),E([d({type:Object})],YC.prototype,`loadChildren`,void 0),E([d({attribute:!1})],YC.prototype,`filterPredicate`,void 0),E([d({type:String,attribute:`search-modes`,reflect:!0})],YC.prototype,`searchModes`,void 0),E([m()],YC.prototype,`_columns`,void 0),E([m()],YC.prototype,`_loadingDepth`,void 0),E([m()],YC.prototype,`_selectedNodes`,void 0),YC=E([T(`ixfx-miller-base`)],YC);function XC(e,n){if(e.item.isLeaf||!e.children?.length)return n.has(e.item.key)?1:2;let r=0;for(let i of e.children)if(r|=XC(i,n),r===3)break;return r}function ZC(e,n){let r=XC(e,n);return r===1?`checked`:r===2?`unchecked`:`indeterminate`}let QC=class extends YC{renderColumnContent(e,n){let r=e.some(e=>!!e.item.icon),a=this.interactionMode===`checked`;return i`
9827
+ `]}};E([d({type:Object})],ZC.prototype,`root`,void 0),E([d({attribute:!1})],ZC.prototype,`model`,void 0),E([d({type:Boolean})],ZC.prototype,`headers`,void 0),E([d({type:Boolean,attribute:`stretch-last-column`,reflect:!0})],ZC.prototype,`stretchLastColumn`,void 0),E([d({attribute:!1})],ZC.prototype,`viewRoot`,void 0),E([d({type:String})],ZC.prototype,`interactionMode`,void 0),E([d({reflect:!0,attribute:`selection-filter`})],ZC.prototype,`selectionFilter`,void 0),E([d({reflect:!0,attribute:`exclusivity`})],ZC.prototype,`exclusivity`,void 0),E([d({type:Object})],ZC.prototype,`loadChildren`,void 0),E([d({attribute:!1})],ZC.prototype,`filterPredicate`,void 0),E([d({type:String,attribute:`search-modes`,reflect:!0})],ZC.prototype,`searchModes`,void 0),E([m()],ZC.prototype,`_columns`,void 0),E([m()],ZC.prototype,`_loadingDepth`,void 0),E([m()],ZC.prototype,`_selectedNodes`,void 0),ZC=E([T(`ixfx-miller-base`)],ZC);function QC(e,n){if(e.item.isLeaf||!e.children?.length)return n.has(e.item.key)?1:2;let r=0;for(let i of e.children)if(r|=QC(i,n),r===3)break;return r}function $C(e,n){let r=QC(e,n);return r===1?`checked`:r===2?`unchecked`:`indeterminate`}let ew=class extends ZC{renderColumnContent(e,n){let r=e.some(e=>!!e.item.icon),a=this.interactionMode===`checked`;return i`
9797
9828
  <ul
9798
9829
  class="item-list ${r?`has-icons`:``} ${a?`checked-mode`:``}"
9799
9830
  role="listbox"
@@ -9802,7 +9833,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9802
9833
  >
9803
9834
  ${e.map(e=>this.#e(e,n))}
9804
9835
  </ul>
9805
- `}#e(e,n){let r=this._isSelected(e,n),o=this._isFocused(e,n),s=this._isOpen(e,n),c=e.item.isLeaf!==!0,l=e.item.icon,u=Ig(e.item.iconColor),d=Ig(e.item.textColor),f=Fg(e.item.badge)?void 0:e.item.badge,p=e.item.tooltip,m=this.interactionMode===`checked`,h=a;if(m){let r=ZC(e,this._selectedKeys);h=i`
9836
+ `}#e(e,n){let r=this._isSelected(e,n),o=this._isFocused(e,n),s=this._isOpen(e,n),c=e.item.isLeaf!==!0,l=e.item.icon,u=Ig(e.item.iconColor),d=Ig(e.item.textColor),f=Fg(e.item.badge)?void 0:e.item.badge,p=e.item.tooltip,m=this.interactionMode===`checked`,h=a;if(m){let r=$C(e,this._selectedKeys);h=i`
9806
9837
  <input
9807
9838
  type="checkbox"
9808
9839
  class="item-checkbox"
@@ -9828,7 +9859,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9828
9859
  ${p?i`<ixfx-tooltip class="item-tooltip" anchor="--tooltip-miller-${n}-${e.item.key}" .value=${p}></ixfx-tooltip>`:a}
9829
9860
  ${c?i`<span class="caret" aria-hidden="true">›</span>`:a}
9830
9861
  </li>
9831
- `}static{this.styles=[w,...YC.styles,oe,r`
9862
+ `}static{this.styles=[w,...ZC.styles,oe,r`
9832
9863
  .item-list {
9833
9864
  list-style: none;
9834
9865
  margin: 0;
@@ -9916,7 +9947,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
9916
9947
  }
9917
9948
 
9918
9949
 
9919
- `]}};QC=E([T(`ixfx-miller-list`)],QC);var $C=class{#e;#t;#n;#r=new WeakMap;#i=new Map;#a=new Map;#o=new Map;#s=new WeakMap;#c;constructor(e,n,r){this.#e=e,this.#t=n,this.#n=r}connect(){this.disconnect(),this.#c=new AbortController,this.#s=new WeakMap,this.#i.clear(),this.#o.clear(),this.#a.clear();let e={item:this.#f(this.#e)};this.#r.set(e,this.#e),e.children=this.#p(this.#e),this.#t.root=e,this.#t.loadChildren=this.#n.loadChildren??(({node:e})=>{let n=this.#r.get(e);return n?this.#p(n):[]})}disconnect(){this.#c?.abort(),this.#c=void 0,this.#t.loadChildren=void 0}navigateToValue(e,n){let r=this.#_(this.#e,e);return r?this.#l(r,n):!1}navigateToKeyPath(e,n){let r=this.#t.viewRoot??this.#t.root;if(!r||e.length===0)return!1;this.#u(r);let i=r.children??[];for(let n=0;n<e.length-1;n++){let r=i.find(r=>r.item.key===e[n]);if(!r)return!1;this.#u(r),i=r.children??[]}return this.#t.navigateTo(e,n)}navigateToIdentity(e,n){let r=this.#d(e);if(!r)return!1;let i=[],a=this.#e.getIdentity();for(let e=r;e;e=e.getParent())if(i.unshift(e),e.getIdentity()===a)return this.#l(i,n);return!1}lookupByKey(e){return this.#a.get(e)}sync(){let e=this.#t.root;if(!e)return;this.#s=new WeakMap,this.#i.clear(),this.#o.clear(),this.#a.clear(),this.#r.set(e,this.#e),e.item=this.#f(this.#e);let n=new Set([e]);e.children&&this.#g(this.#e,e.children,n);let r=this.#t.viewRoot;r&&!n.has(r)&&(this.#t.viewRoot=void 0),this.#t.invalidateStructure()}#l(e,n){let r=this.#t.viewRoot??this.#t.root;if(!r)return!1;let i=1;if(this.#t.viewRoot){let n=this.#r.get(r);if(!n)return!1;let a=n.getIdentity(),o=e.findIndex(e=>e.getIdentity()===a);if(o<0)return!1;i=o+1}return i>=e.length?!1:this.navigateToKeyPath(e.slice(i).map(e=>this.#f(e).key),n)}#u(e){if(e.children!==void 0)return;let n=this.#r.get(e);n&&(e.children=this.#p(n))}#d(e){return this.#o.get(e)}#f(e){let n=e.getIdentity(),r=this.#s.get(n);return r||(r=this.#n.valueToItem(e.getValue(),e),this.#s.set(n,r)),r}#p(e){return Array.from(e.children(),e=>this.#m(e))}#m(e){let n=[...e.children()];for(let e of n)this.#o.set(e.getIdentity(),e);let r=this.#f(e),i=r.isLeaf??n.length===0,a={item:{...r,isLeaf:i},children:i?[]:void 0};return this.#h(a,e),a}#h(e,n){this.#r.set(e,n),this.#i.set(n.getIdentity(),e),this.#o.set(n.getIdentity(),n),this.#a.set(e.item.key,n)}#g(e,n,r){let i=new Map(n.map(e=>[e.item.key,e])),a=Array.from(e.children(),e=>{let n=this.#m(e),a=i.get(n.item.key);return a?(a.item=n.item,this.#h(a,e),r.add(a),n.item.isLeaf?a.children=[]:a.children===void 0?a.children=void 0:this.#g(e,a.children,r),a):(r.add(n),n)});n.splice(0,n.length,...a)}#_(e,n,r=[]){let i=[...r,e];if(n(e.getValue()))return i;for(let r of e.children()){let e=this.#_(r,n,i);if(e)return e}}};const ew=`__all__`;function tw(e,n){let r=n===`desc`?-1:1;return[...e].sort((e,n)=>r*e.label.localeCompare(n.label,void 0,{sensitivity:`base`,numeric:!0}))}function nw(e,n,r,i){if(r===0)return{insert:0,caretOffset:0};let a=2**53-1,o=i;for(let s=0;s<r;s++){if(s===i)continue;let r=e[s],c=e[s+1]??e[e.length-1],l=(r+c)/2,u=Math.abs(n-(n<l?r:c));u<a&&(a=u,o=n<l?s:s+1)}let s=o>i?o-1:o;return{insert:Math.max(0,Math.min(r-1,s)),caretOffset:e[o]??e[e.length-1]}}var rw=class{#e;#t;#n;#r;#i;#a;#o=void 0;#s;#c;#l;#u=[];#d=!0;#f=[];#p=!1;#m;constructor(e){this.id=e.id,this.#e=e.category,this.#t=e.categoryDefaults,this.#n=e.selectionMode,this.#r=e.dataProvider,this.#i=e.onSelectionChange,this.#a=e.onRequestData,this.#m={id:e.id,categoryKey:e.category.key,sort:e.categoryDefaults?.sort??`asc`,grouped:e.categoryDefaults?.grouped??!1,width:220}}get state(){return this.getState()}get categoryKey(){return this.#e.key}getState(){return{...this.#m}}updateState(e){let n=e;if(e.width!==void 0&&!Number.isFinite(e.width)){let{width:r,...i}=e;n=i}let r=n.sort!==void 0&&n.sort!==this.#m.sort,i=n.grouped!==void 0&&n.grouped!==this.#m.grouped;this.#m={...this.#m,...n},r&&this.#_(),i&&this.#v()}setWidth(e){Number.isFinite(e)&&(this.#m={...this.#m,width:Math.max(80,Math.min(480,Math.round(e)))})}setSort(e){e!==this.#m.sort&&(this.#m={...this.#m,sort:e},this.#_())}setGrouped(e){e!==this.#m.grouped&&(this.#m={...this.#m,grouped:e},this.#v())}setSelectionMode(e){if(e!==this.#n){this.#n=e;for(let n of this.#y())n.selectionMode=e}}setCategory(e){this.#e=e,this.#t=e.defaults,this.#m={...this.#m,categoryKey:e.key,sort:e.defaults?.sort??`asc`,grouped:e.defaults?.grouped??!1},this.clearSelection(),this.#v()}get listerHost(){return this.#s}get isMounted(){return this.#s!==void 0}setDataProvider(e){this.#r=e}mount(e){if(this.#s)return;this.#s=e;let n=document.createElement(`div`);n.className=`all-row`,n.dataset.key=ew,n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`);let r=document.createElement(`span`);r.className=`all-label`,n.appendChild(r);let i=()=>{this.#d||this.#x()};n.addEventListener(`click`,i),n.addEventListener(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i())}),this.#c=n;let a=document.createElement(`ixfx-grouped-item-lister`);a.crossGroupSelection=!0,a.factory=()=>Vb(iw,{selectionMode:this.#n,interactionMode:`standard`}),a.addEventListener(`select`,this.#b),this.#l=a,this.#v(),this.#C(),e.append(n,a),this.#f.length>0&&(this.#g(),this.#S())}unmount(){this.#w(),this.#c?.remove(),this.#l?.remove(),this.#c=void 0,this.#l=void 0,this.#s=void 0}requestData(e){if(!this.#r)return;this.#w();let n=new AbortController;this.#o=n;let{signal:r}=n;this.#a(this.id,e,r),Promise.resolve().then(async()=>{let n=await dg(this.#r(e,r),r);r.aborted||this.#h(n)}).catch(()=>{})}#h(e){this.#f=e;let n=this.#u.filter(n=>e.some(e=>e.key===n)),r=n.length!==this.#u.length;if(this.#u=n,n.length===0&&(this.#d=!0),!this.#l){r&&this.#i(this.id,n);return}this.#g(),this.#S(),r&&this.#i(this.id,n)}#g(){if(!this.#l)return;let e=tw(this.#f,this.#m.sort);this.#l.provider=()=>e}#_(){!this.#l||this.#f.length===0||(this.#g(),this.#S())}#v(){if(!this.#l)return;let e=this.#t?.groupBy;this.#l.groupBy=e,this.#l.grouped=this.#m.grouped&&e!==void 0,this.#f.length>0&&this.#S()}#y(){return this.#l?this.#l.querySelectorAll(`:scope > .ungrouped-host > *, :scope > ixfx-panel > *`):[]}#b=()=>{if(this.#p)return;let e=[...this.#l?.selectedItems??[]].map(e=>e.key).filter(e=>e!==ew);if(e.length===this.#u.length&&e.every(e=>this.#u.includes(e))){this.#C();return}this.#u=e,this.#d=e.length===0,this.#C(),this.#i(this.id,e)};#x(){let e=this.#u;this.#p=!0;try{this.#u=[],this.#d=!0;for(let e of this.#y())e.clearSelection()}finally{this.#p=!1}this.#C(),e.length>0&&this.#i(this.id,[])}clearSelection(){this.#x()}get selectedValues(){return this.#u}#S(){this.#l&&this.#l.updateComplete.then(()=>{if(!(!this.#l||!this.#s)){this.#p=!0;try{let e=this.#u;for(let n of this.#l.querySelectorAll(`ixfx-vertical-list`))n.selectKeys(e);let n=[...this.#l.selectedItems].map(e=>e.key).filter(e=>e!==ew);this.#u=n,this.#d=n.length===0}finally{this.#p=!1}this.#C()}})}#C(){if(!this.#c)return;let e=this.#t?.allLabel??`All`,n=this.#c.querySelector(`.all-label`);n&&(n.textContent=e),this.#c.toggleAttribute(`data-selected`,this.#d)}#w(){this.#o&&=(this.#o.abort(),void 0)}};function iw(e){let n=document.createElement(`li`);n.dataset.key=e.key;let r=document.createElement(`span`);if(r.className=`item-label`,r.textContent=e.label,n.appendChild(r),e.count!==void 0){let r=document.createElement(`span`);r.className=`count`,r.textContent=String(e.count),n.appendChild(r)}return n}ge(`menu`,`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12h16"/><path d="M4 18h16"/><path d="M4 6h16"/></svg>`);let aw=class extends n{constructor(...e){super(...e),this.categories=[],this.selectionMode=`multiple`,this.minColumns=1,this.maxColumns=5,this._columns=[],this._colOffsets=[0],this._resizingColumnId=void 0,this._draggingColumnId=void 0,this._dropCaretX=void 0,this._idCounter=0,this._autoSeeded=!1,this._drag={pointerId:-1,from:-1,startX:0,startY:0,active:!1,ghost:null,insert:-1}}static{this.styles=[w,Yt,r`
9950
+ `]}};ew=E([T(`ixfx-miller-list`)],ew);var tw=class{#e;#t;#n;#r=new WeakMap;#i=new Map;#a=new Map;#o=new Map;#s=new WeakMap;#c;constructor(e,n,r){this.#e=e,this.#t=n,this.#n=r}connect(){this.disconnect(),this.#c=new AbortController,this.#s=new WeakMap,this.#i.clear(),this.#o.clear(),this.#a.clear();let e={item:this.#f(this.#e)};this.#r.set(e,this.#e),e.children=this.#p(this.#e),this.#t.root=e,this.#t.loadChildren=this.#n.loadChildren??(({node:e})=>{let n=this.#r.get(e);return n?this.#p(n):[]})}disconnect(){this.#c?.abort(),this.#c=void 0,this.#t.loadChildren=void 0}navigateToValue(e,n){let r=this.#_(this.#e,e);return r?this.#l(r,n):!1}navigateToKeyPath(e,n){let r=this.#t.viewRoot??this.#t.root;if(!r||e.length===0)return!1;this.#u(r);let i=r.children??[];for(let n=0;n<e.length-1;n++){let r=i.find(r=>r.item.key===e[n]);if(!r)return!1;this.#u(r),i=r.children??[]}return this.#t.navigateTo(e,n)}navigateToIdentity(e,n){let r=this.#d(e);if(!r)return!1;let i=[],a=this.#e.getIdentity();for(let e=r;e;e=e.getParent())if(i.unshift(e),e.getIdentity()===a)return this.#l(i,n);return!1}lookupByKey(e){return this.#a.get(e)}sync(){let e=this.#t.root;if(!e)return;this.#s=new WeakMap,this.#i.clear(),this.#o.clear(),this.#a.clear(),this.#r.set(e,this.#e),e.item=this.#f(this.#e);let n=new Set([e]);e.children&&this.#g(this.#e,e.children,n);let r=this.#t.viewRoot;r&&!n.has(r)&&(this.#t.viewRoot=void 0),this.#t.invalidateStructure()}#l(e,n){let r=this.#t.viewRoot??this.#t.root;if(!r)return!1;let i=1;if(this.#t.viewRoot){let n=this.#r.get(r);if(!n)return!1;let a=n.getIdentity(),o=e.findIndex(e=>e.getIdentity()===a);if(o<0)return!1;i=o+1}return i>=e.length?!1:this.navigateToKeyPath(e.slice(i).map(e=>this.#f(e).key),n)}#u(e){if(e.children!==void 0)return;let n=this.#r.get(e);n&&(e.children=this.#p(n))}#d(e){return this.#o.get(e)}#f(e){let n=e.getIdentity(),r=this.#s.get(n);return r||(r=this.#n.valueToItem(e.getValue(),e),this.#s.set(n,r)),r}#p(e){return Array.from(e.children(),e=>this.#m(e))}#m(e){let n=[...e.children()];for(let e of n)this.#o.set(e.getIdentity(),e);let r=this.#f(e),i=r.isLeaf??n.length===0,a={item:{...r,isLeaf:i},children:i?[]:void 0};return this.#h(a,e),a}#h(e,n){this.#r.set(e,n),this.#i.set(n.getIdentity(),e),this.#o.set(n.getIdentity(),n),this.#a.set(e.item.key,n)}#g(e,n,r){let i=new Map(n.map(e=>[e.item.key,e])),a=Array.from(e.children(),e=>{let n=this.#m(e),a=i.get(n.item.key);return a?(a.item=n.item,this.#h(a,e),r.add(a),n.item.isLeaf?a.children=[]:a.children===void 0?a.children=void 0:this.#g(e,a.children,r),a):(r.add(n),n)});n.splice(0,n.length,...a)}#_(e,n,r=[]){let i=[...r,e];if(n(e.getValue()))return i;for(let r of e.children()){let e=this.#_(r,n,i);if(e)return e}}};const nw=`__all__`;function rw(e,n){let r=n===`desc`?-1:1;return[...e].sort((e,n)=>r*e.label.localeCompare(n.label,void 0,{sensitivity:`base`,numeric:!0}))}function iw(e,n,r,i){if(r===0)return{insert:0,caretOffset:0};let a=2**53-1,o=i;for(let s=0;s<r;s++){if(s===i)continue;let r=e[s],c=e[s+1]??e[e.length-1],l=(r+c)/2,u=Math.abs(n-(n<l?r:c));u<a&&(a=u,o=n<l?s:s+1)}let s=o>i?o-1:o;return{insert:Math.max(0,Math.min(r-1,s)),caretOffset:e[o]??e[e.length-1]}}var aw=class{#e;#t;#n;#r;#i;#a;#o=void 0;#s;#c;#l;#u=[];#d=!0;#f=[];#p=!1;#m;constructor(e){this.id=e.id,this.#e=e.category,this.#t=e.categoryDefaults,this.#n=e.selectionMode,this.#r=e.dataProvider,this.#i=e.onSelectionChange,this.#a=e.onRequestData,this.#m={id:e.id,categoryKey:e.category.key,sort:e.categoryDefaults?.sort??`asc`,grouped:e.categoryDefaults?.grouped??!1,width:220}}get state(){return this.getState()}get categoryKey(){return this.#e.key}getState(){return{...this.#m}}updateState(e){let n=e;if(e.width!==void 0&&!Number.isFinite(e.width)){let{width:r,...i}=e;n=i}let r=n.sort!==void 0&&n.sort!==this.#m.sort,i=n.grouped!==void 0&&n.grouped!==this.#m.grouped;this.#m={...this.#m,...n},r&&this.#_(),i&&this.#v()}setWidth(e){Number.isFinite(e)&&(this.#m={...this.#m,width:Math.max(80,Math.min(480,Math.round(e)))})}setSort(e){e!==this.#m.sort&&(this.#m={...this.#m,sort:e},this.#_())}setGrouped(e){e!==this.#m.grouped&&(this.#m={...this.#m,grouped:e},this.#v())}setSelectionMode(e){if(e!==this.#n){this.#n=e;for(let n of this.#y())n.selectionMode=e}}setCategory(e){this.#e=e,this.#t=e.defaults,this.#m={...this.#m,categoryKey:e.key,sort:e.defaults?.sort??`asc`,grouped:e.defaults?.grouped??!1},this.clearSelection(),this.#v()}get listerHost(){return this.#s}get isMounted(){return this.#s!==void 0}setDataProvider(e){this.#r=e}mount(e){if(this.#s)return;this.#s=e;let n=document.createElement(`div`);n.className=`all-row`,n.dataset.key=nw,n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`);let r=document.createElement(`span`);r.className=`all-label`,n.appendChild(r);let i=()=>{this.#d||this.#x()};n.addEventListener(`click`,i),n.addEventListener(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i())}),this.#c=n;let a=document.createElement(`ixfx-grouped-item-lister`);a.crossGroupSelection=!0,a.factory=()=>Vb(ow,{selectionMode:this.#n,interactionMode:`standard`}),a.addEventListener(`select`,this.#b),this.#l=a,this.#v(),this.#C(),e.append(n,a),this.#f.length>0&&(this.#g(),this.#S())}unmount(){this.#w(),this.#c?.remove(),this.#l?.remove(),this.#c=void 0,this.#l=void 0,this.#s=void 0}requestData(e){if(!this.#r)return;this.#w();let n=new AbortController;this.#o=n;let{signal:r}=n;this.#a(this.id,e,r),Promise.resolve().then(async()=>{let n=await dg(this.#r(e,r),r);r.aborted||this.#h(n)}).catch(()=>{})}#h(e){this.#f=e;let n=this.#u.filter(n=>e.some(e=>e.key===n)),r=n.length!==this.#u.length;if(this.#u=n,n.length===0&&(this.#d=!0),!this.#l){r&&this.#i(this.id,n);return}this.#g(),this.#S(),r&&this.#i(this.id,n)}#g(){if(!this.#l)return;let e=rw(this.#f,this.#m.sort);this.#l.provider=()=>e}#_(){!this.#l||this.#f.length===0||(this.#g(),this.#S())}#v(){if(!this.#l)return;let e=this.#t?.groupBy;this.#l.groupBy=e,this.#l.grouped=this.#m.grouped&&e!==void 0,this.#f.length>0&&this.#S()}#y(){return this.#l?this.#l.querySelectorAll(`:scope > .ungrouped-host > *, :scope > ixfx-panel > *`):[]}#b=()=>{if(this.#p)return;let e=[...this.#l?.selectedItems??[]].map(e=>e.key).filter(e=>e!==nw);if(e.length===this.#u.length&&e.every(e=>this.#u.includes(e))){this.#C();return}this.#u=e,this.#d=e.length===0,this.#C(),this.#i(this.id,e)};#x(){let e=this.#u;this.#p=!0;try{this.#u=[],this.#d=!0;for(let e of this.#y())e.clearSelection()}finally{this.#p=!1}this.#C(),e.length>0&&this.#i(this.id,[])}clearSelection(){this.#x()}get selectedValues(){return this.#u}#S(){this.#l&&this.#l.updateComplete.then(()=>{if(!(!this.#l||!this.#s)){this.#p=!0;try{let e=this.#u;for(let n of this.#l.querySelectorAll(`ixfx-vertical-list`))n.selectKeys(e);let n=[...this.#l.selectedItems].map(e=>e.key).filter(e=>e!==nw);this.#u=n,this.#d=n.length===0}finally{this.#p=!1}this.#C()}})}#C(){if(!this.#c)return;let e=this.#t?.allLabel??`All`,n=this.#c.querySelector(`.all-label`);n&&(n.textContent=e),this.#c.toggleAttribute(`data-selected`,this.#d)}#w(){this.#o&&=(this.#o.abort(),void 0)}};function ow(e){let n=document.createElement(`li`);n.dataset.key=e.key;let r=document.createElement(`span`);if(r.className=`item-label`,r.textContent=e.label,n.appendChild(r),e.count!==void 0){let r=document.createElement(`span`);r.className=`count`,r.textContent=String(e.count),n.appendChild(r)}return n}ge(`menu`,`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12h16"/><path d="M4 18h16"/><path d="M4 6h16"/></svg>`);let sw=class extends n{constructor(...e){super(...e),this.categories=[],this.selectionMode=`multiple`,this.minColumns=1,this.maxColumns=5,this._columns=[],this._colOffsets=[0],this._resizingColumnId=void 0,this._draggingColumnId=void 0,this._dropCaretX=void 0,this._idCounter=0,this._autoSeeded=!1,this._drag={pointerId:-1,from:-1,startX:0,startY:0,active:!1,ghost:null,insert:-1}}static{this.styles=[w,Yt,r`
9920
9951
  :host {
9921
9952
  --multicol-list-bg: var(--surface-3);
9922
9953
  --multicol-list-header-bg: var(--surface-2);
@@ -10120,7 +10151,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10120
10151
  ><span class="ixfx-handle" data-handle="dotted" data-shape="vertical" part="reorder-handle"></span></span>
10121
10152
  <button
10122
10153
  class="column-label"
10123
- data-tooltip="Change category"
10154
+ data-tooltip=${this._getCategoryTooltip(e.categoryKey)}
10124
10155
  @click=${n=>{n.stopPropagation(),this._openCategoryPicker(e,n.currentTarget)}}
10125
10156
  >${this._getCategoryLabel(e.categoryKey)}</button>
10126
10157
  <button
@@ -10139,7 +10170,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10139
10170
  </div>
10140
10171
  <div class="lister-host"></div>
10141
10172
  </div>
10142
- `}_getCategoryLabel(e){return this.categories.find(n=>n.key===e)?.label??e}#e(e,n){return new rw({id:e,category:n,categoryDefaults:n.defaults,selectionMode:this.selectionMode,dataProvider:this.dataProvider,onSelectionChange:this._onColumnSelectionChange.bind(this),onRequestData:this._onColumnRequestData.bind(this)})}_onHeaderPointerDown(e,n,r){e.stopPropagation(),this._drag={pointerId:e.pointerId,from:r,startX:e.clientX,startY:e.clientY,active:!1,ghost:null,insert:r};let i=e=>{if(e.pointerId!==this._drag.pointerId)return;let r=e.clientX-this._drag.startX,i=e.clientY-this._drag.startY;if(!this._drag.active){if(Math.hypot(r,i)<5)return;this._drag.active=!0,this._draggingColumnId=n.id;let a=this.shadowRoot?.querySelector(`[data-col-id="${n.id}"] .column-header`),o=document.createElement(`span`);o.textContent=this._getCategoryLabel(n.categoryKey);try{a&&(this._drag.ghost=zg({anchor:a,content:o}),this._drag.ghost.move(e.clientX,e.clientY))}catch{}try{this._containerEl?.setPointerCapture(e.pointerId)}catch{}}this._drag.ghost?.move(e.clientX,e.clientY);let a=this._containerEl;if(!a)return;let o=a.getBoundingClientRect(),s=e.clientX-o.left+a.scrollLeft,c=nw(this._colOffsets,s,this._columns.length,this._drag.from);this._drag.insert=c.insert,this._dropCaretX=c.caretOffset,this.requestUpdate()},a=e=>{if(e.pointerId!==this._drag.pointerId)return;let n=this._drag.active,r=this._drag.from,o=this._drag.insert;this._drag.ghost?.destroy(),this._drag.ghost=null,this._draggingColumnId=void 0,this._dropCaretX=void 0;try{this._containerEl?.releasePointerCapture(e.pointerId)}catch{}if(window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,a),n&&o!==r){let[e]=this._columns.splice(r,1);this._columns.splice(o,0,e),this._updateColOffsets(),this._emitColumnsChange(`reorder`),this.requestUpdate()}};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a),window.addEventListener(`pointercancel`,a)}_onResizePointerDown(e,n){e.preventDefault(),e.stopPropagation();let r=e.clientX,i=n.getState().width??220,a=Number.isFinite(i)?i:220;this._resizingColumnId=n.id;let o=e=>{let i=Math.max(80,Math.min(480,a+e-r));return n.setWidth(i),i},s=n=>{n.pointerId===e.pointerId&&(o(n.clientX),this._updateColOffsets(),this.requestUpdate())},c=e=>{window.removeEventListener(`pointermove`,s),window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),o(e.type===`pointercancel`?r:e.clientX),this._resizingColumnId=void 0,this._updateColOffsets(),this._emitColumnsChange(`resize`),this.requestUpdate()};window.addEventListener(`pointermove`,s),window.addEventListener(`pointerup`,c),window.addEventListener(`pointercancel`,c)}#t(e,n,r){let i=e.getBoundingClientRect(),a=document.createElement(`ixfx-menu-trigger`);a.mode=`dropdown`,a.tabStop=!1,a.placement=n,a.style.position=`fixed`,a.style.left=`${i.left}px`,a.style.top=`${i.bottom}px`;let o=document.createElement(`ixfx-menu-container`);o.setAttribute(`slot`,`menu`),r(o),a.appendChild(o),a.addEventListener(`menu-trigger-close`,()=>a.remove(),{once:!0}),document.body.appendChild(a),a.updateComplete.then(()=>a.openMenu())}#n(e){return{item:{key:e.key,label:e.label},children:e.children&&e.children.length>0?e.children.map(e=>this.#n(e)):void 0}}_openCategoryPicker(e,n){this.#t(n,`bottom-start`,n=>{let r=e_(this.categories.map(e=>this.#n(e)),{onCommand:n=>{n.command!==void 0&&this._changeColumnCategory(e,n.command)}});for(let e of r)n.appendChild(e);for(let r of n.querySelectorAll(`ixfx-menu-item`))r.getAttribute(`command`)===e.categoryKey&&r.setAttribute(`disabled`,``)})}#r(e,n,r,i){let a=document.createElement(`ixfx-menu-item`);return a.setAttribute(`command`,n),a.setAttribute(`label`,e),i&&a.setAttribute(`icon-name`,i),r&&a.addEventListener(`command`,()=>r()),a}_openBurgerMenu(e,n){this.#t(n,`bottom-end`,n=>{let r=this.#r(`Remove this column`,`remove`,()=>this.removeColumn(e.id));r.toggleAttribute(`disabled`,this._columns.length<=this.minColumns),n.appendChild(r);let i=document.createElement(`ixfx-menu-separator`);n.appendChild(i);let a=this.maxColumns>0&&this._columns.length>=this.maxColumns,o=new Set(this._columns.map(e=>e.categoryKey)),s=this.categories.filter(e=>!o.has(e.key)),c=!a&&s.length>0,l=document.createElement(`ixfx-menu-sub-trigger`);l.setAttribute(`label`,`Add column`);let u=document.createElement(`ixfx-menu-container`);u.setAttribute(`slot`,`submenu`);let d=this._columns.findIndex(n=>n.id===e.id);for(let[e,n]of[[`Left`,-1],[`Right`,1]]){let r=this.#r(e,`add-${e.toLowerCase()}`,()=>{this.#i(s[0].key,Math.max(0,d+Math.max(0,n)))});r.toggleAttribute(`disabled`,!c),u.appendChild(r)}l.appendChild(u),n.appendChild(l);let f=document.createElement(`ixfx-menu-sub-trigger`);f.setAttribute(`label`,`Sort`);let p=document.createElement(`ixfx-menu-container`);p.setAttribute(`slot`,`submenu`),p.appendChild(this.#r(`Ascending`,`sort-asc`,()=>{e.setSort(`asc`),this._emitColumnsChange(`sort`),this.requestUpdate()},e.getState().sort===`asc`?`check`:void 0)),p.appendChild(this.#r(`Descending`,`sort-desc`,()=>{e.setSort(`desc`),this._emitColumnsChange(`sort`),this.requestUpdate()},e.getState().sort===`desc`?`check`:void 0)),f.appendChild(p),n.appendChild(f);let m=e.getState().grouped;n.appendChild(this.#r(m?`Ungroup`:`Group`,`toggle-group`,()=>{e.setGrouped(!m),this._emitColumnsChange(`grouping`),this.requestUpdate()},m?`check`:void 0))})}#i(e,n){this.addColumn(e,n)}_changeColumnCategory(e,n){let r=this.categories.find(e=>e.key===n);r&&(e.setCategory(r),this._emitColumnsChange(`category`),this._requeryAllColumns(),this.requestUpdate())}_onColumnSelectionChange(e,n){if(!this._columns.find(n=>n.id===e))return;for(let n of this._columns)n.id!==e&&n.requestData(this._buildQuery(n));let r={columnId:e,columns:this.getSelection()};this.dispatchEvent(new CustomEvent(`multicol-select`,{detail:r,bubbles:!0,composed:!0})),this.requestUpdate()}_onColumnRequestData(e,n,r){}_buildQuery(e){let n=new Map;for(let r of this._columns)r.id!==e.id&&n.set(r.id,r.selectedValues);return{columnId:e.id,categoryKey:e.categoryKey,otherSelections:n}}_requeryAllColumns(){for(let e of this._columns)e.requestData(this._buildQuery(e))}_syncColumnsWithCategories(){let e=!1;for(let n of this._columns)this.categories.some(e=>e.key===n.categoryKey)||this.categories.length!==0&&(n.setCategory(this.categories[0]),e=!0);e&&this._emitColumnsChange(`category`)}_updateColOffsets(){let e=[0],n=0;for(let r of this._columns){let i=r.getState().width??220;n+=Number.isFinite(i)?i:220,e.push(n)}e.length===this._colOffsets.length&&e.every((e,n)=>e===this._colOffsets[n]||Number.isNaN(e)&&Number.isNaN(this._colOffsets[n]))||(this._colOffsets=e)}_emitColumnsChange(e){this.dispatchEvent(new CustomEvent(`multicol-columns-change`,{detail:{columns:this.columns,reason:e},bubbles:!0,composed:!0}))}async autoSizeColumns(e){return new Promise(n=>{setTimeout(()=>{let r=e?.minWidth??80,i=e?.maxWidth??480,a=e=>{let n=document.createElement(`span`);n.style.position=`absolute`,n.style.visibility=`hidden`,n.style.whiteSpace=`nowrap`,n.style.font=getComputedStyle(this).font,n.textContent=e,document.body.appendChild(n);let r=n.getBoundingClientRect().width;return document.body.removeChild(n),Number.isFinite(r)?r:0};for(let e of this._columns){let n=this.shadowRoot?.querySelector(`[data-col-id="${e.id}"]`);if(!n)continue;let o=n.querySelector(`.column-header`),s=n.querySelector(`.lister-host`),c=0;if(s){let e=s.querySelector(`.all-label`);e&&(c=Math.max(c,a(e.textContent??``)));let n=s.querySelector(`ixfx-grouped-item-lister`);if(n){let e=n.querySelectorAll(`ixfx-vertical-list`);for(let n of e){let e=n.querySelectorAll(`li`);for(let n of e){let e=n.querySelector(`.item-label`),r=n.querySelector(`.count`),i=(e?.textContent??``)+(r?.textContent??``);c=Math.max(c,a(i))}}}}let l=0;if(o){let e=o.querySelector(`.column-label`);if(e){let n=a(e.textContent??``),r=getComputedStyle(e),i=(Number.parseFloat(r.paddingLeft)||0)+(Number.parseFloat(r.paddingRight)||0),s=o.querySelector(`.burger-btn`),c=s&&Number.parseFloat(getComputedStyle(s).width)||0,u=getComputedStyle(o),d=Number.parseFloat(u.gap)||0;l=n+i+c+d}}let u=Math.max(l,c+24+16),d=Math.max(r,Math.min(i,Math.ceil(u)));Number.isFinite(d)&&e.setWidth(d)}this._updateColOffsets(),this._emitColumnsChange(`resize`),this.requestUpdate(),n()},0)})}};E([d({attribute:!1})],aw.prototype,`categories`,void 0),E([d({attribute:!1})],aw.prototype,`dataProvider`,void 0),E([d({type:String,attribute:`selection-mode`})],aw.prototype,`selectionMode`,void 0),E([d({type:Number})],aw.prototype,`minColumns`,void 0),E([d({type:Number})],aw.prototype,`maxColumns`,void 0),E([m()],aw.prototype,`_columns`,void 0),E([m()],aw.prototype,`_colOffsets`,void 0),E([m()],aw.prototype,`_resizingColumnId`,void 0),E([m()],aw.prototype,`_draggingColumnId`,void 0),E([m()],aw.prototype,`_dropCaretX`,void 0),E([f(`#container`)],aw.prototype,`_containerEl`,void 0),aw=E([T(`ixfx-multicol-list`)],aw);let ow=class extends n{constructor(...e){super(...e),this.notificationType=`info`,this.message=``,this.dismissing=!1,this.notificationId=``}#e(){this.#n()}#t(e){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.#n())}#n(){this.dispatchEvent(new CustomEvent(`pill-tap`,{detail:{id:this.notificationId},bubbles:!0,composed:!0}))}#r(){return this.icon?this.icon.startsWith(`<svg`)?i`<span class="pill-icon">${g(this.icon)}</span>`:be(this.icon)?i`<ixfx-icon class="pill-icon" name="${this.icon}"></ixfx-icon>`:a:a}render(){return i`
10173
+ `}_getCategoryLabel(e){return this.categories.find(n=>n.key===e)?.label??e}_getCategoryTooltip(e){return this.categories.find(n=>n.key===e)?.description??`Change category`}#e(e,n){return new aw({id:e,category:n,categoryDefaults:n.defaults,selectionMode:this.selectionMode,dataProvider:this.dataProvider,onSelectionChange:this._onColumnSelectionChange.bind(this),onRequestData:this._onColumnRequestData.bind(this)})}_onHeaderPointerDown(e,n,r){e.stopPropagation(),this._drag={pointerId:e.pointerId,from:r,startX:e.clientX,startY:e.clientY,active:!1,ghost:null,insert:r};let i=e=>{if(e.pointerId!==this._drag.pointerId)return;let r=e.clientX-this._drag.startX,i=e.clientY-this._drag.startY;if(!this._drag.active){if(Math.hypot(r,i)<5)return;this._drag.active=!0,this._draggingColumnId=n.id;let a=this.shadowRoot?.querySelector(`[data-col-id="${n.id}"] .column-header`),o=document.createElement(`span`);o.textContent=this._getCategoryLabel(n.categoryKey);try{a&&(this._drag.ghost=zg({anchor:a,content:o}),this._drag.ghost.move(e.clientX,e.clientY))}catch{}try{this._containerEl?.setPointerCapture(e.pointerId)}catch{}}this._drag.ghost?.move(e.clientX,e.clientY);let a=this._containerEl;if(!a)return;let o=a.getBoundingClientRect(),s=e.clientX-o.left+a.scrollLeft,c=iw(this._colOffsets,s,this._columns.length,this._drag.from);this._drag.insert=c.insert,this._dropCaretX=c.caretOffset,this.requestUpdate()},a=e=>{if(e.pointerId!==this._drag.pointerId)return;let n=this._drag.active,r=this._drag.from,o=this._drag.insert;this._drag.ghost?.destroy(),this._drag.ghost=null,this._draggingColumnId=void 0,this._dropCaretX=void 0;try{this._containerEl?.releasePointerCapture(e.pointerId)}catch{}if(window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,a),n&&o!==r){let[e]=this._columns.splice(r,1);this._columns.splice(o,0,e),this._updateColOffsets(),this._emitColumnsChange(`reorder`),this.requestUpdate()}};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a),window.addEventListener(`pointercancel`,a)}_onResizePointerDown(e,n){e.preventDefault(),e.stopPropagation();let r=e.clientX,i=n.getState().width??220,a=Number.isFinite(i)?i:220;this._resizingColumnId=n.id;let o=e=>{let i=Math.max(80,Math.min(480,a+e-r));return n.setWidth(i),i},s=n=>{n.pointerId===e.pointerId&&(o(n.clientX),this._updateColOffsets(),this.requestUpdate())},c=e=>{window.removeEventListener(`pointermove`,s),window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),o(e.type===`pointercancel`?r:e.clientX),this._resizingColumnId=void 0,this._updateColOffsets(),this._emitColumnsChange(`resize`),this.requestUpdate()};window.addEventListener(`pointermove`,s),window.addEventListener(`pointerup`,c),window.addEventListener(`pointercancel`,c)}#t(e,n,r){let i=e.getBoundingClientRect(),a=document.createElement(`ixfx-menu-trigger`);a.mode=`dropdown`,a.tabStop=!1,a.placement=n,a.style.position=`fixed`,a.style.left=`${i.left}px`,a.style.top=`${i.bottom}px`;let o=document.createElement(`ixfx-menu-container`);o.setAttribute(`slot`,`menu`),r(o),a.appendChild(o),a.addEventListener(`menu-trigger-close`,()=>a.remove(),{once:!0}),document.body.appendChild(a),a.updateComplete.then(()=>a.openMenu())}#n(e){return{item:{key:e.key,label:e.label},children:e.children&&e.children.length>0?e.children.map(e=>this.#n(e)):void 0}}_openCategoryPicker(e,n){this.#t(n,`bottom-start`,n=>{let r=e_(this.categories.map(e=>this.#n(e)),{onCommand:n=>{n.command!==void 0&&this._changeColumnCategory(e,n.command)}});for(let e of r)n.appendChild(e);for(let r of n.querySelectorAll(`ixfx-menu-item`))r.getAttribute(`command`)===e.categoryKey&&r.setAttribute(`disabled`,``)})}#r(e,n,r,i){let a=document.createElement(`ixfx-menu-item`);return a.setAttribute(`command`,n),a.setAttribute(`label`,e),i&&a.setAttribute(`icon-name`,i),r&&a.addEventListener(`command`,()=>r()),a}_openBurgerMenu(e,n){this.#t(n,`bottom-end`,n=>{let r=this.#r(`Remove this column`,`remove`,()=>this.removeColumn(e.id));r.toggleAttribute(`disabled`,this._columns.length<=this.minColumns),n.appendChild(r);let i=document.createElement(`ixfx-menu-separator`);n.appendChild(i);let a=this.maxColumns>0&&this._columns.length>=this.maxColumns,o=new Set(this._columns.map(e=>e.categoryKey)),s=this.categories.filter(e=>!o.has(e.key)),c=!a&&s.length>0,l=document.createElement(`ixfx-menu-sub-trigger`);l.setAttribute(`label`,`Add column`);let u=document.createElement(`ixfx-menu-container`);u.setAttribute(`slot`,`submenu`);let d=this._columns.findIndex(n=>n.id===e.id);for(let[e,n]of[[`Left`,-1],[`Right`,1]]){let r=this.#r(e,`add-${e.toLowerCase()}`,()=>{this.#i(s[0].key,Math.max(0,d+Math.max(0,n)))});r.toggleAttribute(`disabled`,!c),u.appendChild(r)}l.appendChild(u),n.appendChild(l);let f=document.createElement(`ixfx-menu-sub-trigger`);f.setAttribute(`label`,`Sort`);let p=document.createElement(`ixfx-menu-container`);p.setAttribute(`slot`,`submenu`),p.appendChild(this.#r(`Ascending`,`sort-asc`,()=>{e.setSort(`asc`),this._emitColumnsChange(`sort`),this.requestUpdate()},e.getState().sort===`asc`?`check`:void 0)),p.appendChild(this.#r(`Descending`,`sort-desc`,()=>{e.setSort(`desc`),this._emitColumnsChange(`sort`),this.requestUpdate()},e.getState().sort===`desc`?`check`:void 0)),f.appendChild(p),n.appendChild(f);let m=e.getState().grouped;n.appendChild(this.#r(m?`Ungroup`:`Group`,`toggle-group`,()=>{e.setGrouped(!m),this._emitColumnsChange(`grouping`),this.requestUpdate()},m?`check`:void 0))})}#i(e,n){this.addColumn(e,n)}_changeColumnCategory(e,n){let r=this.categories.find(e=>e.key===n);r&&(e.setCategory(r),this._emitColumnsChange(`category`),this._requeryAllColumns(),this.requestUpdate())}_onColumnSelectionChange(e,n){if(!this._columns.find(n=>n.id===e))return;for(let n of this._columns)n.id!==e&&n.requestData(this._buildQuery(n));let r={columnId:e,columns:this.getSelection()};this.dispatchEvent(new CustomEvent(`multicol-select`,{detail:r,bubbles:!0,composed:!0})),this.requestUpdate()}_onColumnRequestData(e,n,r){}_buildQuery(e){let n=new Map;for(let r of this._columns)r.id!==e.id&&n.set(r.id,r.selectedValues);return{columnId:e.id,categoryKey:e.categoryKey,otherSelections:n}}_requeryAllColumns(){for(let e of this._columns)e.requestData(this._buildQuery(e))}_syncColumnsWithCategories(){let e=!1;for(let n of this._columns)this.categories.some(e=>e.key===n.categoryKey)||this.categories.length!==0&&(n.setCategory(this.categories[0]),e=!0);e&&this._emitColumnsChange(`category`)}_updateColOffsets(){let e=[0],n=0;for(let r of this._columns){let i=r.getState().width??220;n+=Number.isFinite(i)?i:220,e.push(n)}e.length===this._colOffsets.length&&e.every((e,n)=>e===this._colOffsets[n]||Number.isNaN(e)&&Number.isNaN(this._colOffsets[n]))||(this._colOffsets=e)}_emitColumnsChange(e){this.dispatchEvent(new CustomEvent(`multicol-columns-change`,{detail:{columns:this.columns,reason:e},bubbles:!0,composed:!0}))}async autoSizeColumns(e){return new Promise(n=>{setTimeout(()=>{let r=e?.minWidth??80,i=e?.maxWidth??480,a=e=>{let n=document.createElement(`span`);n.style.position=`absolute`,n.style.visibility=`hidden`,n.style.whiteSpace=`nowrap`,n.style.font=getComputedStyle(this).font,n.textContent=e,document.body.appendChild(n);let r=n.getBoundingClientRect().width;return document.body.removeChild(n),Number.isFinite(r)?r:0};for(let e of this._columns){let n=this.shadowRoot?.querySelector(`[data-col-id="${e.id}"]`);if(!n)continue;let o=n.querySelector(`.column-header`),s=n.querySelector(`.lister-host`),c=0;if(s){let e=s.querySelector(`.all-label`);e&&(c=Math.max(c,a(e.textContent??``)));let n=s.querySelector(`ixfx-grouped-item-lister`);if(n){let e=n.querySelectorAll(`ixfx-vertical-list`);for(let n of e){let e=n.querySelectorAll(`li`);for(let n of e){let e=n.querySelector(`.item-label`),r=n.querySelector(`.count`),i=(e?.textContent??``)+(r?.textContent??``);c=Math.max(c,a(i))}}}}let l=0;if(o){let e=o.querySelector(`.column-label`);if(e){let n=a(e.textContent??``),r=getComputedStyle(e),i=(Number.parseFloat(r.paddingLeft)||0)+(Number.parseFloat(r.paddingRight)||0),s=o.querySelector(`.burger-btn`),c=s&&Number.parseFloat(getComputedStyle(s).width)||0,u=getComputedStyle(o),d=Number.parseFloat(u.gap)||0;l=n+i+c+d}}let u=Math.max(l,c+24+16),d=Math.max(r,Math.min(i,Math.ceil(u)));Number.isFinite(d)&&e.setWidth(d)}this._updateColOffsets(),this._emitColumnsChange(`resize`),this.requestUpdate(),n()},0)})}};E([d({attribute:!1})],sw.prototype,`categories`,void 0),E([d({attribute:!1})],sw.prototype,`dataProvider`,void 0),E([d({type:String,attribute:`selection-mode`})],sw.prototype,`selectionMode`,void 0),E([d({type:Number})],sw.prototype,`minColumns`,void 0),E([d({type:Number})],sw.prototype,`maxColumns`,void 0),E([m()],sw.prototype,`_columns`,void 0),E([m()],sw.prototype,`_colOffsets`,void 0),E([m()],sw.prototype,`_resizingColumnId`,void 0),E([m()],sw.prototype,`_draggingColumnId`,void 0),E([m()],sw.prototype,`_dropCaretX`,void 0),E([f(`#container`)],sw.prototype,`_containerEl`,void 0),sw=E([T(`ixfx-multicol-list`)],sw);let cw=class extends n{constructor(...e){super(...e),this.notificationType=`info`,this.message=``,this.dismissing=!1,this.notificationId=``}#e(){this.#n()}#t(e){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.#n())}#n(){this.dispatchEvent(new CustomEvent(`pill-tap`,{detail:{id:this.notificationId},bubbles:!0,composed:!0}))}#r(){return this.icon?this.icon.startsWith(`<svg`)?i`<span class="pill-icon">${g(this.icon)}</span>`:be(this.icon)?i`<ixfx-icon class="pill-icon" name="${this.icon}"></ixfx-icon>`:a:a}render(){return i`
10143
10174
  <button
10144
10175
  type="button"
10145
10176
  class="pill"
@@ -10222,7 +10253,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10222
10253
  transform: none !important;
10223
10254
  }
10224
10255
  }
10225
- `]}};E([d({type:String,attribute:`notification-type`})],ow.prototype,`notificationType`,void 0),E([d({type:String})],ow.prototype,`message`,void 0),E([d({type:String})],ow.prototype,`icon`,void 0),E([d({type:Boolean,reflect:!0})],ow.prototype,`dismissing`,void 0),E([d({type:String,attribute:`notification-id`})],ow.prototype,`notificationId`,void 0),ow=E([T(`ixfx-notification-pill`)],ow);function sw(e){return{vertical:e.startsWith(`top`)?`top`:`bottom`,horizontal:e.endsWith(`-left`)?`left`:e.endsWith(`-right`)?`right`:`middle`}}function cw(e,n){let{vertical:r,horizontal:i}=sw(e),a=`calc(var(--space-l, 12px) + ${(r===`top`?n.top:n.bottom)??0}px)`,o=`position: fixed; `;if(o+=r===`top`?`top: ${a}; bottom: auto; `:`bottom: ${a}; top: auto; `,i===`left`){let e=`calc(var(--space-l, 12px) + ${n.left??0}px)`;o+=`left: ${e}; right: auto;`}else if(i===`right`){let e=`calc(var(--space-l, 12px) + ${n.right??0}px)`;o+=`right: ${e}; left: auto;`}else o+=`left: 50%; right: auto;`;return o}function lw(e){let n=e.vertical===`top`?-20:20;return e.horizontal===`middle`?`translateX(-50%) translate(0, ${n}px)`:`translate(${e.horizontal===`left`?-20:20}px, ${n}px)`}function uw(e,n,r){return e.horizontal===`middle`?`translateX(-50%) translate(${n}px, ${r}px)`:`translate(${n}px, ${r}px)`}function dw(e={}){let n=e.position??`top-right`,r=e.queueDisplay??`list`,i=e.safeArea??{},a=sw(n),o=null,s=null,c=new Map,l=40,u=!1;function d(){return o||(o=document.createElement(`div`),o.className=`ixfx-notification-container`,o.setAttribute(`role`,`region`),o.setAttribute(`aria-label`,`Notifications`),document.body.appendChild(o),o)}function f(e,n){e.setAttribute(`notification-type`,n.type),e.setAttribute(`message`,n.message),n.icon?e.setAttribute(`icon`,n.icon):e.removeAttribute(`icon`)}function p(e){let r=document.createElement(`ixfx-notification-pill`);return r.setAttribute(`notification-id`,e.id),r.style.cssText=cw(n,i),f(r,e),r.style.opacity=`0`,r.style.transform=lw(a),r.addEventListener(`pill-tap`,e=>{let n=e;s?.onTap(n.detail.id)}),r}function m(e){u||requestAnimationFrame(()=>{let n=e.getBoundingClientRect().height;n>0&&(l=n,u=!0)})}function h(e){let n=e.length;e.forEach((e,i)=>{let o=c.get(e.id);if(!o)return;let s=o.element,u=0,d=0,f=1,p=`auto`,m=`none`;if(r===`list`){let e=i*(l+8);d=a.vertical===`top`?e:-e}else{let e=i*4;if(d=a.vertical===`top`?e:-e,u=a.horizontal===`left`?e:a.horizontal===`right`?-e:0,i>0){let e=i-1;f=Math.max(.2,.7-e*.15),p=`none`,m=`saturate(0.6)`}}s.style.transition=`opacity 0.2s ease-out, transform 0.2s ease-out`,s.style.opacity=`${f}`,s.style.zIndex=`${n-i}`,s.style.pointerEvents=p,s.style.filter=m,s.style.transform=uw(a,u,d)})}function g(e){let n=c.get(e);if(!n)return;let r=n.element;r.setAttribute(`dismissing`,`true`);let i=()=>{r.removeEventListener(`transitionend`,i),r.remove(),c.delete(e),o&&c.size===0&&(o.remove(),o=null,u=!1,l=40)};r.addEventListener(`transitionend`,i),setTimeout(i,300)}function _(e,n){let r=d(),i=new Set(e.map(e=>e.id));for(let n of e){let e=c.get(n.id);if(e){e.notification=n,f(e.element,n);continue}let i=p(n);c.set(n.id,{element:i,notification:n}),r.appendChild(i),m(i)}for(let[e]of c)i.has(e)||g(e);requestAnimationFrame(()=>h(e))}return{attach(e){s=e},detach(){for(let[e]of c)g(e);o&&=(o.remove(),null)},setNotifications:_}}const fw={renderer:void 0,timeout:4e3,timeoutError:8e3,queue:!0,queueSize:3,tapBehaviour:`dismiss`,tapHandlerDefault:void 0},pw=[];let mw=null,hw=null;function gw(){return hw??=dw({position:`top-right`}),hw}function _w(){return mw??gw()}function vw(){_w().setNotifications([...pw],fw.queueSize)}function yw(e){e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}function bw(e){let n=e.type===`error`?fw.timeoutError:fw.timeout,r=e.wasQueued?n/fw.queueSize:n;e.timer=window.setTimeout(Cw,r,e.id)}function xw(){let e=pw[0];e&&e.timer===null&&bw(e)}const Sw={configure(e){if(e.renderer!==void 0&&(mw?.detach?.(),mw=e.renderer,mw.attach({onTap(e){let n=pw.find(n=>n.id===e);n&&(n.onTap?n.onTap(e):fw.tapHandlerDefault?.(n),fw.tapBehaviour===`dismiss`&&Cw(e))}}),vw()),e.timeout!==void 0&&(fw.timeout=e.timeout),e.timeoutError!==void 0&&(fw.timeoutError=e.timeoutError),e.queue!==void 0&&(fw.queue=e.queue),e.queueSize!==void 0){for(fw.queueSize=Math.max(1,e.queueSize);pw.length>fw.queueSize;)yw(pw.shift());xw(),vw()}e.tapBehaviour!==void 0&&(fw.tapBehaviour=e.tapBehaviour),e.tapHandlerDefault!==void 0&&(fw.tapHandlerDefault=e.tapHandlerDefault)},notify(e){let n=crypto.randomUUID(),r=Date.now(),i=e.icon??(e.type===`error`?`error`:void 0),a={...e,icon:i,id:n,createdAt:r,updatedAt:r,timer:null,wasQueued:!1};if(fw.queue)pw.length>=fw.queueSize&&yw(pw.shift()),a.wasQueued=pw.length>0,pw.push(a);else{for(;pw.length>0;)yw(pw.pop());pw.push(a)}return xw(),vw(),n},update(e,n){let r=pw.find(n=>n.id===e);r&&(Object.assign(r,n),r.updatedAt=Date.now(),pw[0]===r&&(yw(r),bw(r)),vw())},dismiss(e){Cw(e)},dismissAll(){for(let e of pw)yw(e);pw.length=0,vw()}};function Cw(e){let n=pw.findIndex(n=>n.id===e);n!==-1&&(yw(pw.splice(n,1)[0]),xw(),vw())}function ww(e,n){let r=0,i=1/0;for(let a=0;a<e.length;a++){let[o,s]=e[a];if(n<(o+s)/2){let e=Math.abs(n-o);e<i&&(i=e,r=a)}else{let e=Math.abs(n-s);e<i&&(i=e,r=a+1)}}return r}let Tw=!1;function Ew(){if(Tw)return;Tw=!0;let e=document.createElement(`style`);e.textContent=`
10256
+ `]}};E([d({type:String,attribute:`notification-type`})],cw.prototype,`notificationType`,void 0),E([d({type:String})],cw.prototype,`message`,void 0),E([d({type:String})],cw.prototype,`icon`,void 0),E([d({type:Boolean,reflect:!0})],cw.prototype,`dismissing`,void 0),E([d({type:String,attribute:`notification-id`})],cw.prototype,`notificationId`,void 0),cw=E([T(`ixfx-notification-pill`)],cw);function lw(e){return{vertical:e.startsWith(`top`)?`top`:`bottom`,horizontal:e.endsWith(`-left`)?`left`:e.endsWith(`-right`)?`right`:`middle`}}function uw(e,n){let{vertical:r,horizontal:i}=lw(e),a=`calc(var(--space-l, 12px) + ${(r===`top`?n.top:n.bottom)??0}px)`,o=`position: fixed; `;if(o+=r===`top`?`top: ${a}; bottom: auto; `:`bottom: ${a}; top: auto; `,i===`left`){let e=`calc(var(--space-l, 12px) + ${n.left??0}px)`;o+=`left: ${e}; right: auto;`}else if(i===`right`){let e=`calc(var(--space-l, 12px) + ${n.right??0}px)`;o+=`right: ${e}; left: auto;`}else o+=`left: 50%; right: auto;`;return o}function dw(e){let n=e.vertical===`top`?-20:20;return e.horizontal===`middle`?`translateX(-50%) translate(0, ${n}px)`:`translate(${e.horizontal===`left`?-20:20}px, ${n}px)`}function fw(e,n,r){return e.horizontal===`middle`?`translateX(-50%) translate(${n}px, ${r}px)`:`translate(${n}px, ${r}px)`}function pw(e={}){let n=e.position??`top-right`,r=e.queueDisplay??`list`,i=e.safeArea??{},a=lw(n),o=null,s=null,c=new Map,l=40,u=!1;function d(){return o||(o=document.createElement(`div`),o.className=`ixfx-notification-container`,o.setAttribute(`role`,`region`),o.setAttribute(`aria-label`,`Notifications`),document.body.appendChild(o),o)}function f(e,n){e.setAttribute(`notification-type`,n.type),e.setAttribute(`message`,n.message),n.icon?e.setAttribute(`icon`,n.icon):e.removeAttribute(`icon`)}function p(e){let r=document.createElement(`ixfx-notification-pill`);return r.setAttribute(`notification-id`,e.id),r.style.cssText=uw(n,i),f(r,e),r.style.opacity=`0`,r.style.transform=dw(a),r.addEventListener(`pill-tap`,e=>{let n=e;s?.onTap(n.detail.id)}),r}function m(e){u||requestAnimationFrame(()=>{let n=e.getBoundingClientRect().height;n>0&&(l=n,u=!0)})}function h(e){let n=e.length;e.forEach((e,i)=>{let o=c.get(e.id);if(!o)return;let s=o.element,u=0,d=0,f=1,p=`auto`,m=`none`;if(r===`list`){let e=i*(l+8);d=a.vertical===`top`?e:-e}else{let e=i*4;if(d=a.vertical===`top`?e:-e,u=a.horizontal===`left`?e:a.horizontal===`right`?-e:0,i>0){let e=i-1;f=Math.max(.2,.7-e*.15),p=`none`,m=`saturate(0.6)`}}s.style.transition=`opacity 0.2s ease-out, transform 0.2s ease-out`,s.style.opacity=`${f}`,s.style.zIndex=`${n-i}`,s.style.pointerEvents=p,s.style.filter=m,s.style.transform=fw(a,u,d)})}function g(e){let n=c.get(e);if(!n)return;let r=n.element;r.setAttribute(`dismissing`,`true`);let i=()=>{r.removeEventListener(`transitionend`,i),r.remove(),c.delete(e),o&&c.size===0&&(o.remove(),o=null,u=!1,l=40)};r.addEventListener(`transitionend`,i),setTimeout(i,300)}function _(e,n){let r=d(),i=new Set(e.map(e=>e.id));for(let n of e){let e=c.get(n.id);if(e){e.notification=n,f(e.element,n);continue}let i=p(n);c.set(n.id,{element:i,notification:n}),r.appendChild(i),m(i)}for(let[e]of c)i.has(e)||g(e);requestAnimationFrame(()=>h(e))}return{attach(e){s=e},detach(){for(let[e]of c)g(e);o&&=(o.remove(),null)},setNotifications:_}}const mw={renderer:void 0,timeout:4e3,timeoutError:8e3,queue:!0,queueSize:3,tapBehaviour:`dismiss`,tapHandlerDefault:void 0},hw=[];let gw=null,_w=null;function vw(){return _w??=pw({position:`top-right`}),_w}function yw(){return gw??vw()}function bw(){yw().setNotifications([...hw],mw.queueSize)}function xw(e){e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}function Sw(e){let n=e.type===`error`?mw.timeoutError:mw.timeout,r=e.wasQueued?n/mw.queueSize:n;e.timer=window.setTimeout(Tw,r,e.id)}function Cw(){let e=hw[0];e&&e.timer===null&&Sw(e)}const ww={configure(e){if(e.renderer!==void 0&&(gw?.detach?.(),gw=e.renderer,gw.attach({onTap(e){let n=hw.find(n=>n.id===e);n&&(n.onTap?n.onTap(e):mw.tapHandlerDefault?.(n),mw.tapBehaviour===`dismiss`&&Tw(e))}}),bw()),e.timeout!==void 0&&(mw.timeout=e.timeout),e.timeoutError!==void 0&&(mw.timeoutError=e.timeoutError),e.queue!==void 0&&(mw.queue=e.queue),e.queueSize!==void 0){for(mw.queueSize=Math.max(1,e.queueSize);hw.length>mw.queueSize;)xw(hw.shift());Cw(),bw()}e.tapBehaviour!==void 0&&(mw.tapBehaviour=e.tapBehaviour),e.tapHandlerDefault!==void 0&&(mw.tapHandlerDefault=e.tapHandlerDefault)},notify(e){let n=crypto.randomUUID(),r=Date.now(),i=e.icon??(e.type===`error`?`error`:void 0),a={...e,icon:i,id:n,createdAt:r,updatedAt:r,timer:null,wasQueued:!1};if(mw.queue)hw.length>=mw.queueSize&&xw(hw.shift()),a.wasQueued=hw.length>0,hw.push(a);else{for(;hw.length>0;)xw(hw.pop());hw.push(a)}return Cw(),bw(),n},update(e,n){let r=hw.find(n=>n.id===e);r&&(Object.assign(r,n),r.updatedAt=Date.now(),hw[0]===r&&(xw(r),Sw(r)),bw())},dismiss(e){Tw(e)},dismissAll(){for(let e of hw)xw(e);hw.length=0,bw()}};function Tw(e){let n=hw.findIndex(n=>n.id===e);n!==-1&&(xw(hw.splice(n,1)[0]),Cw(),bw())}function Ew(e,n){let r=0,i=1/0;for(let a=0;a<e.length;a++){let[o,s]=e[a];if(n<(o+s)/2){let e=Math.abs(n-o);e<i&&(i=e,r=a)}else{let e=Math.abs(n-s);e<i&&(i=e,r=a+1)}}return r}let Dw=!1;function Ow(){if(Dw)return;Dw=!0;let e=document.createElement(`style`);e.textContent=`
10226
10257
  .ixfx-drag-ghost.ixfx-panel-group-ghost {
10227
10258
  padding: var(--space-s, 8px) var(--space-m, 16px);
10228
10259
  background: var(--surface-4);
@@ -10241,7 +10272,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10241
10272
  height: 1.25em;
10242
10273
  flex-shrink: 0;
10243
10274
  }
10244
- `,document.head.appendChild(e)}let Dw=class extends n{constructor(...e){super(...e),this.orientation=`horizontal`,this.variant=`titlebar`,this.toggleInteraction=`implicit`,this.collapsible=!0,this.accordion=!1,this.allowReorder=!1,this._dragState=null,this._suppressNextClick=!1,this._onClickCapture=e=>{this._suppressNextClick&&(this._suppressNextClick=!1,e.preventDefault(),e.stopPropagation())},this._onKeyDown=e=>{let n=this._dragState;if(e.key!==`Escape`||!n?.active)return;e.preventDefault();let r=n.pointerId;this._abortDrag(),this._endDrag(r)},this._onPointerDown=e=>{if(!this.allowReorder||e.button!==0)return;let n=this._findDragTarget(e);if(!n?.parentNode)return;let r=Array.prototype.indexOf.call(n.parentNode.children,n);r<0||(this._dragState={pointerId:e.pointerId,source:n,fromIndex:r,startX:e.clientX,startY:e.clientY,active:!1,ghost:null,gapIndex:void 0},window.addEventListener(`pointermove`,this._onPointerMove),window.addEventListener(`pointerup`,this._onPointerUp),window.addEventListener(`pointercancel`,this._onPointerCancel))},this._onPointerMove=e=>{let n=this._dragState;if(!n||e.pointerId!==n.pointerId)return;let r=Math.hypot(e.clientX-n.startX,e.clientY-n.startY);if(!n.active){if(r<5)return;this._beginDrag(e)}n.ghost?.move(e.clientX,e.clientY);let i=this._computeGapIndex(e.clientX,e.clientY);i!==n.gapIndex&&(n.gapIndex=i,this.requestUpdate())},this._onPointerUp=e=>{let n=this._dragState;if(!(!n||e.pointerId!==n.pointerId)){if(n.active){let r=this._computeGapIndex(e.clientX,e.clientY);this._commitDrag(n.source,n.fromIndex,r)}this._endDrag(e.pointerId)}},this._onPointerCancel=e=>{let n=this._dragState;!n||e.pointerId!==n.pointerId||(this._abortDrag(),this._endDrag(e.pointerId))}}_onPanelToggle(e){let n=e.target;if(!n.collapsed&&this.accordion)for(let e of this._panels)e!==n&&(e.collapsed=!0)}connectedCallback(){super.connectedCallback(),this.addEventListener(`click`,this._onClickCapture,!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClickCapture,!0),this._dragState&&(this._abortDrag(),this._endDrag(this._dragState.pointerId)),super.disconnectedCallback()}firstUpdated(){this.gap!==void 0&&this.style.setProperty(`--group-gap`,this.gap),this.updateComplete.then(()=>{this._propagateAll()})}updated(e){super.updated(e),e.has(`gap`)&&(this.gap===void 0?this.style.removeProperty(`--group-gap`):this.style.setProperty(`--group-gap`,this.gap)),(e.has(`variant`)||e.has(`toggleInteraction`)||e.has(`orientation`)||e.has(`collapsible`))&&this.updateComplete.then(()=>{this._propagateAll()})}_propagateAll(){let e=this.orientation===`horizontal`?`vertical`:`horizontal`;for(let n of this._panels)n.setAttribute(`variant`,this.variant),n.setAttribute(`toggle-interaction`,this.toggleInteraction),n.setAttribute(`orientation`,e),this.collapsible?n.setAttribute(`collapsible`,``):n.removeAttribute(`collapsible`)}_onSlotChange(){this.updateComplete.then(()=>{this._propagateAll()})}_findDragTarget(e){if(!this.allowReorder)return null;let n=e.composedPath(),r=null,i=!1;for(let e of n){if(!(e instanceof HTMLElement))continue;let n=e.tagName;if(n===`BUTTON`||n===`A`||n===`INPUT`||n===`SELECT`||n===`TEXTAREA`||e.classList.contains(`toolbar`)||e.classList.contains(`close-btn`)||e.classList.contains(`caret-btn`)||e.hasAttribute?.(`slot`)&&e.getAttribute(`slot`)===`toolbar`)return null;n===`IXFX-TITLEBAR`&&(i=!0),!r&&n===`IXFX-PANEL`&&(r=e)}return!r||!i?null:r}_beginDrag(e){let n=this._dragState;if(!(!n||n.active)){try{this.setPointerCapture(e.pointerId)}catch{}n.active=!0,this.setAttribute(`dragging`,``),n.source.setAttribute(`drag-source`,``),n.ghost=this._createGhost(n.source),n.ghost?.move(e.clientX,e.clientY)}}_abortDrag(){let e=this._dragState;e&&(e.source.removeAttribute(`drag-source`),e.gapIndex!==void 0&&(e.gapIndex=void 0,this.requestUpdate()))}_endDrag(e){let n=this._dragState;if(n){n.ghost?.destroy(),n.ghost=null,this.removeAttribute(`dragging`),this._dragState=null,window.removeEventListener(`pointermove`,this._onPointerMove),window.removeEventListener(`pointerup`,this._onPointerUp),window.removeEventListener(`pointercancel`,this._onPointerCancel);try{this.releasePointerCapture(e)}catch{}this.requestUpdate()}}_commitDrag(e,n,r){e.removeAttribute(`drag-source`);let i=(this._panels??[]).filter(n=>n!==e),a=r===void 0?i.length:Math.max(0,Math.min(r,i.length)),o=e.parentNode;if(!o)return;let s=i[a]??null;o.insertBefore(e,s);let c=Array.prototype.indexOf.call(o.children,e);c!==n&&(this._suppressNextClick=!0,this.dispatchEvent(new CustomEvent(`reorder`,{bubbles:!0,composed:!0,detail:{fromIndex:n,toIndex:c,panel:e}})))}_createGhost(e){let n=document.createElement(`span`);if(n.style.display=`inline-flex`,n.style.alignItems=`center`,n.style.padding=`0 var(--space-s, 8px)`,n.style.minWidth=`0`,e.iconName){let r=document.createElement(`ixfx-icon`);r.name=e.iconName,n.appendChild(r)}let r=document.createElement(`span`);r.textContent=(e.title||(e.textContent??``).trim()).slice(0,60),r.style.paddingLeft=`1ch`,r.style.overflow=`hidden`,r.style.textOverflow=`ellipsis`,r.style.whiteSpace=`nowrap`,n.appendChild(r);try{return Ew(),zg({anchor:e,content:n,className:`ixfx-panel-group-ghost`})}catch{return null}}_computeGapIndex(e,n){let r=this._dragState;if(!r)return;let i=(this._panels??[]).filter(e=>e!==r.source);if(i.length===0)return 0;let a=this.orientation===`horizontal`,o=a?e:n;return ww(i.map(e=>{let n=e.getBoundingClientRect();return[a?n.left:n.top,a?n.right:n.bottom]}),o)}_computeCaretStyle(){let e=this._dragState;if(!e?.active||e.gapIndex===void 0)return;let n=(this._panels??[]).filter(n=>n!==e.source);if(n.length===0)return;let r=this.getBoundingClientRect();if(!r)return;let i=Math.max(0,Math.min(e.gapIndex,n.length)),a=i<n.length?n[i].getBoundingClientRect():n[n.length-1].getBoundingClientRect();return this.orientation===`horizontal`?`transform: translate(${(i<n.length?a.left:a.right)-r.left-1}px, 0); width: 2px; height: ${r.height}px;`:`transform: translate(0, ${(i<n.length?a.top:a.bottom)-r.top-1}px); width: ${r.width}px; height: 2px;`}render(){let e=this._computeCaretStyle();return i`
10275
+ `,document.head.appendChild(e)}let kw=class extends n{constructor(...e){super(...e),this.orientation=`horizontal`,this.variant=`titlebar`,this.toggleInteraction=`implicit`,this.collapsible=!0,this.accordion=!1,this.allowReorder=!1,this._dragState=null,this._suppressNextClick=!1,this._onClickCapture=e=>{this._suppressNextClick&&(this._suppressNextClick=!1,e.preventDefault(),e.stopPropagation())},this._onKeyDown=e=>{let n=this._dragState;if(e.key!==`Escape`||!n?.active)return;e.preventDefault();let r=n.pointerId;this._abortDrag(),this._endDrag(r)},this._onPointerDown=e=>{if(!this.allowReorder||e.button!==0)return;let n=this._findDragTarget(e);if(!n?.parentNode)return;let r=Array.prototype.indexOf.call(n.parentNode.children,n);r<0||(this._dragState={pointerId:e.pointerId,source:n,fromIndex:r,startX:e.clientX,startY:e.clientY,active:!1,ghost:null,gapIndex:void 0},window.addEventListener(`pointermove`,this._onPointerMove),window.addEventListener(`pointerup`,this._onPointerUp),window.addEventListener(`pointercancel`,this._onPointerCancel))},this._onPointerMove=e=>{let n=this._dragState;if(!n||e.pointerId!==n.pointerId)return;let r=Math.hypot(e.clientX-n.startX,e.clientY-n.startY);if(!n.active){if(r<5)return;this._beginDrag(e)}n.ghost?.move(e.clientX,e.clientY);let i=this._computeGapIndex(e.clientX,e.clientY);i!==n.gapIndex&&(n.gapIndex=i,this.requestUpdate())},this._onPointerUp=e=>{let n=this._dragState;if(!(!n||e.pointerId!==n.pointerId)){if(n.active){let r=this._computeGapIndex(e.clientX,e.clientY);this._commitDrag(n.source,n.fromIndex,r)}this._endDrag(e.pointerId)}},this._onPointerCancel=e=>{let n=this._dragState;!n||e.pointerId!==n.pointerId||(this._abortDrag(),this._endDrag(e.pointerId))}}_onPanelToggle(e){let n=e.target;if(!n.collapsed&&this.accordion)for(let e of this._panels)e!==n&&(e.collapsed=!0)}connectedCallback(){super.connectedCallback(),this.addEventListener(`click`,this._onClickCapture,!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClickCapture,!0),this._dragState&&(this._abortDrag(),this._endDrag(this._dragState.pointerId)),super.disconnectedCallback()}firstUpdated(){this.gap!==void 0&&this.style.setProperty(`--group-gap`,this.gap),this.updateComplete.then(()=>{this._propagateAll()})}updated(e){super.updated(e),e.has(`gap`)&&(this.gap===void 0?this.style.removeProperty(`--group-gap`):this.style.setProperty(`--group-gap`,this.gap)),(e.has(`variant`)||e.has(`toggleInteraction`)||e.has(`orientation`)||e.has(`collapsible`))&&this.updateComplete.then(()=>{this._propagateAll()})}_propagateAll(){let e=this.orientation===`horizontal`?`vertical`:`horizontal`;for(let n of this._panels)n.setAttribute(`variant`,this.variant),n.setAttribute(`toggle-interaction`,this.toggleInteraction),n.setAttribute(`orientation`,e),this.collapsible?n.setAttribute(`collapsible`,``):n.removeAttribute(`collapsible`)}_onSlotChange(){this.updateComplete.then(()=>{this._propagateAll()})}_findDragTarget(e){if(!this.allowReorder)return null;let n=e.composedPath(),r=null,i=!1;for(let e of n){if(!(e instanceof HTMLElement))continue;let n=e.tagName;if(n===`BUTTON`||n===`A`||n===`INPUT`||n===`SELECT`||n===`TEXTAREA`||e.classList.contains(`toolbar`)||e.classList.contains(`close-btn`)||e.classList.contains(`caret-btn`)||e.hasAttribute?.(`slot`)&&e.getAttribute(`slot`)===`toolbar`)return null;n===`IXFX-TITLEBAR`&&(i=!0),!r&&n===`IXFX-PANEL`&&(r=e)}return!r||!i?null:r}_beginDrag(e){let n=this._dragState;if(!(!n||n.active)){try{this.setPointerCapture(e.pointerId)}catch{}n.active=!0,this.setAttribute(`dragging`,``),n.source.setAttribute(`drag-source`,``),n.ghost=this._createGhost(n.source),n.ghost?.move(e.clientX,e.clientY)}}_abortDrag(){let e=this._dragState;e&&(e.source.removeAttribute(`drag-source`),e.gapIndex!==void 0&&(e.gapIndex=void 0,this.requestUpdate()))}_endDrag(e){let n=this._dragState;if(n){n.ghost?.destroy(),n.ghost=null,this.removeAttribute(`dragging`),this._dragState=null,window.removeEventListener(`pointermove`,this._onPointerMove),window.removeEventListener(`pointerup`,this._onPointerUp),window.removeEventListener(`pointercancel`,this._onPointerCancel);try{this.releasePointerCapture(e)}catch{}this.requestUpdate()}}_commitDrag(e,n,r){e.removeAttribute(`drag-source`);let i=(this._panels??[]).filter(n=>n!==e),a=r===void 0?i.length:Math.max(0,Math.min(r,i.length)),o=e.parentNode;if(!o)return;let s=i[a]??null;o.insertBefore(e,s);let c=Array.prototype.indexOf.call(o.children,e);c!==n&&(this._suppressNextClick=!0,this.dispatchEvent(new CustomEvent(`reorder`,{bubbles:!0,composed:!0,detail:{fromIndex:n,toIndex:c,panel:e}})))}_createGhost(e){let n=document.createElement(`span`);if(n.style.display=`inline-flex`,n.style.alignItems=`center`,n.style.padding=`0 var(--space-s, 8px)`,n.style.minWidth=`0`,e.iconName){let r=document.createElement(`ixfx-icon`);r.name=e.iconName,n.appendChild(r)}let r=document.createElement(`span`);r.textContent=(e.title||(e.textContent??``).trim()).slice(0,60),r.style.paddingLeft=`1ch`,r.style.overflow=`hidden`,r.style.textOverflow=`ellipsis`,r.style.whiteSpace=`nowrap`,n.appendChild(r);try{return Ow(),zg({anchor:e,content:n,className:`ixfx-panel-group-ghost`})}catch{return null}}_computeGapIndex(e,n){let r=this._dragState;if(!r)return;let i=(this._panels??[]).filter(e=>e!==r.source);if(i.length===0)return 0;let a=this.orientation===`horizontal`,o=a?e:n;return Ew(i.map(e=>{let n=e.getBoundingClientRect();return[a?n.left:n.top,a?n.right:n.bottom]}),o)}_computeCaretStyle(){let e=this._dragState;if(!e?.active||e.gapIndex===void 0)return;let n=(this._panels??[]).filter(n=>n!==e.source);if(n.length===0)return;let r=this.getBoundingClientRect();if(!r)return;let i=Math.max(0,Math.min(e.gapIndex,n.length)),a=i<n.length?n[i].getBoundingClientRect():n[n.length-1].getBoundingClientRect();return this.orientation===`horizontal`?`transform: translate(${(i<n.length?a.left:a.right)-r.left-1}px, 0); width: 2px; height: ${r.height}px;`:`transform: translate(0, ${(i<n.length?a.top:a.bottom)-r.top-1}px); width: ${r.width}px; height: 2px;`}render(){let e=this._computeCaretStyle();return i`
10245
10276
  <slot
10246
10277
  @toggle=${this._onPanelToggle}
10247
10278
  @slotchange=${this._onSlotChange}
@@ -10305,7 +10336,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10305
10336
  pointer-events: none;
10306
10337
  z-index: 1;
10307
10338
  }
10308
- `}};E([d({type:String,reflect:!0})],Dw.prototype,`orientation`,void 0),E([d({type:String})],Dw.prototype,`variant`,void 0),E([d({type:String,attribute:`toggle-interaction`})],Dw.prototype,`toggleInteraction`,void 0),E([d({type:Boolean})],Dw.prototype,`collapsible`,void 0),E([d({type:Boolean,attribute:`accordion`,reflect:!0})],Dw.prototype,`accordion`,void 0),E([d({type:Boolean,attribute:`allow-reorder`,reflect:!0})],Dw.prototype,`allowReorder`,void 0),E([d()],Dw.prototype,`gap`,void 0),E([p({slot:``})],Dw.prototype,`_panels`,void 0),Dw=E([T(`ixfx-panel-group`)],Dw);var Ow=Object.defineProperty,kw=(e,n)=>{let r={};for(var i in e)Ow(r,i,{get:e[i],enumerable:!0});return n||Ow(r,Symbol.toStringTag,{value:`Module`}),r};const Aw=Math.pow,jw=1/Math.sqrt(2*Math.PI),Mw=(e=.4)=>n=>{let r=jw/e,i=-2.5,a=(n-.5)/e;a*=a,i*=a;let o=r*Aw(Math.E,i);return o>1?1:o<0?0:o};var Nw=kw({arch:()=>Hw,backIn:()=>sT,backInOut:()=>uT,backOut:()=>cT,bell:()=>mT,bounceIn:()=>pT,bounceInOut:()=>gT,bounceOut:()=>zw,circIn:()=>aT,circInOut:()=>lT,circOut:()=>oT,cubicIn:()=>Zw,cubicOut:()=>Qw,elasticIn:()=>dT,elasticInOut:()=>hT,elasticOut:()=>fT,expoIn:()=>tT,expoInOut:()=>iT,expoOut:()=>nT,quadIn:()=>qw,quadInOut:()=>Xw,quadOut:()=>Jw,quartIn:()=>$w,quartOut:()=>eT,quintIn:()=>Bw,quintInOut:()=>rT,quintOut:()=>Vw,sineIn:()=>Gw,sineInOut:()=>Yw,sineOut:()=>Kw,smootherstep:()=>Ww,smoothstep:()=>Uw});const Pw=Math.sqrt,Fw=Math.pow,Iw=Math.cos,Lw=Math.PI,Rw=Math.sin,zw=e=>{let n=7.5625,r=2.75;return e<1/r?n*e*e:e<2/r?n*(e-=1.5/r)*e+.75:e<2.5/r?n*(e-=2.25/r)*e+.9375:n*(e-=2.625/r)*e+.984375},Bw=e=>e*e*e*e*e,Vw=e=>1-Fw(1-e,5),Hw=e=>e*(1-e)*4,Uw=e=>e*e*(3-2*e),Ww=e=>(e*(e*6-15)+10)*e*e*e,Gw=e=>1-Iw(e*Lw/2),Kw=e=>Rw(e*Lw/2),qw=e=>e*e,Jw=e=>1-(1-e)*(1-e),Yw=e=>-(Iw(Lw*e)-1)/2,Xw=e=>e<.5?2*e*e:1-Fw(-2*e+2,2)/2,Zw=e=>e*e*e,Qw=e=>1-Fw(1-e,3),$w=e=>e*e*e*e,eT=e=>1-Fw(1-e,4),tT=e=>e===0?0:Fw(2,10*e-10),nT=e=>e===1?1:1-Fw(2,-10*e),rT=e=>e<.5?16*e*e*e*e*e:1-Fw(-2*e+2,5)/2,iT=e=>e===0?0:e===1?1:e<.5?Fw(2,20*e-10)/2:(2-Fw(2,-20*e+10))/2,aT=e=>1-Pw(1-Fw(e,2)),oT=e=>Pw(1-Fw(e-1,2)),sT=e=>2.70158*e*e*e-1.70158*e*e,cT=e=>1+2.70158*Fw(e-1,3)+1.70158*Fw(e-1,2),lT=e=>e<.5?(1-Pw(1-Fw(2*e,2)))/2:(Pw(1-Fw(-2*e+2,2))+1)/2,uT=e=>{let n=2.5949095;return e<.5?Fw(2*e,2)*(7.189819*e-n)/2:(Fw(2*e-2,2)*(3.5949095*(e*2-2)+n)+2)/2},dT=e=>{let n=2*Lw/3;return e===0?0:e===1?1:-Fw(2,10*e-10)*Rw((e*10-10.75)*n)},fT=e=>{let n=2*Lw/3;return e===0?0:e===1?1:Fw(2,-10*e)*Rw((e*10-.75)*n)+1},pT=e=>1-zw(1-e),mT=Mw(),hT=e=>{let n=2*Lw/4.5;return e===0?0:e===1?1:e<.5?-(Fw(2,20*e-10)*Rw((20*e-11.125)*n))/2:Fw(2,-20*e+10)*Rw((20*e-11.125)*n)/2+1},gT=e=>e<.5?(1-zw(1-2*e))/2:(1+zw(2*e-1))/2,_T=(e=0,n=0)=>{let r={x:oi(e,-1,1,0,1),y:oi(e,-1,1,1,0)},i=Nd.interpolate(Math.abs(e),Nd.Empty,r);e!==0&&n>0&&(i=e>0?Nd.interpolate(n,i,{x:0,y:r.x*2}):Nd.interpolate(n,i,{x:r.y*2,y:0}));let a=Ba.cubic(Nd.Empty,Nd.Unit,i,r),o=Ba.interpolator(a);return e=>o(e)},vT=(e,n)=>{O(Pr(e,`fn`));let r;return()=>(r===void 0&&(r=Tu(n,{clampValue:!0})),e(r()))},yT=(e,n)=>{O(Pr(e,`fn`));let r=Au(),i=Ao(n);if(i===void 0)throw Error(`Param 'duration' not provided`);let a=ku(i,{timer:r,clampValue:!0});return Mu(e,a)},bT=(e,n)=>{O(Pr(e,`fn`));let r;return()=>(r===void 0&&(r=Eu(n,{clampValue:!0})),e(r()))},xT=(e,n)=>{O(Pr(e,`fn`));let r=ju(),i=ku(n,{timer:r,clampValue:!0});return Mu(e,i)};var ST=kw({Named:()=>Nw,create:()=>CT,get:()=>AT,getEasingNames:()=>MT,line:()=>_T,tickEasing:()=>DT,ticks:()=>ET,time:()=>TT,timeEasing:()=>wT});const CT=e=>{let n=OT(e.name??`quintIn`)??e.fn;if(n===void 0)throw Error(`Either 'name' or 'fn' must be set`);if(`duration`in e)return TT(n,e.duration);if(`ticks`in e)return ET(n,e.ticks);throw Error(`Expected 'duration' or 'ticks' in options`)},wT=(e,n)=>yT(OT(e),n),TT=(e,n)=>vT(OT(e),n),ET=(e,n)=>bT(OT(e),n),DT=(e,n)=>xT(OT(e),n),OT=e=>{let n=typeof e==`function`?e:AT(e);if(n===void 0)throw Error(typeof e==`string`?`Easing function not found: '${e}'`:`Easing function not found`);return n};let kT;const AT=function(e){O(Fr(e,`non-empty`,`easingName`));let n=jT().get(e.toLowerCase());if(n===void 0)throw Error(`Easing not found: '${e}'`);return n};function jT(){if(kT===void 0){kT=new Map;for(let[e,n]of Object.entries(Nw))kT.set(e.toLowerCase(),n);return kT}return kT}function*MT(){yield*jT().keys()}const NT=[`green`,`yellow`,`red`],PT=new Map;function FT(e){let n=e.join(`\0`);return PT.has(n)||PT.set(n,eg.scale(e,{stepsBetween:99})),PT.get(n)}function IT(e,n){let r=getComputedStyle(e),i=r.getPropertyValue(n).trim(),a=/var\((--[\w-]+)(?:,(.*))?\)/g;for(let e=0;e<5&&i.includes(`var(`);e++)i=i.replace(a,(e,n,i)=>r.getPropertyValue(n).trim()||(i?i.trim():``));return i}function LT(e){return IT(e,`--plot-color`)||`oklch(60% 0.15 140)`}function RT(e){if(!e.trim())return NT;let n=e.split(`,`).map(e=>e.trim()).filter(Boolean);return n.length>=2?n:NT}function zT(e){try{let n=eg.HslSpace.fromCss(e,{scalar:!0});return{h:n.h,s:n.s,l:n.l}}catch{return{h:.39,s:.5,l:.55}}}function BT(e,n){let r=Math.max(0,Math.min(1,e));if(n.easingName)try{return Math.max(0,Math.min(1,ST.get(n.easingName)(r)))}catch{}return n.valueMap?Math.max(0,Math.min(1,n.valueMap(r))):r}function VT(e,n,r){let i=BT(e,r);switch(r.mode){case`fixed`:return{fill:n,opacity:1};case`opacity`:return{fill:n,opacity:Math.max(.04,i)};case`hue`:{let e=zT(n);return{fill:`hsl(${Math.round(i*360)}deg ${Math.round(e.s*100)}% ${Math.round(e.l*100)}%)`,opacity:1}}case`saturation`:{let e=zT(n);return{fill:`hsl(${Math.round(e.h*360)}deg ${Math.round(i*100)}% ${Math.round(e.l*100)}%)`,opacity:1}}case`lightness`:{let e=zT(n);return{fill:`hsl(${Math.round(e.h*360)}deg ${Math.round(e.s*100)}% ${Math.round(i*100)}%)`,opacity:1}}case`scale`:{let e=FT(r.palette.length>=2?r.palette:NT);return{fill:e[Math.min(e.length-1,Math.floor(i*e.length))],opacity:1}}default:return{fill:n,opacity:1}}}function HT(e,n,r){if(r===`opacity`)return{...e,opacity:e.opacity*Math.max(.08,n**.6)};if(r===`desaturation`){let r=zT(e.fill),i=r.s*n;return{fill:`hsl(${Math.round(r.h*360)}deg ${Math.round(i*100)}% ${Math.round(r.l*100)}%)`,opacity:e.opacity}}return e}var UT=class{#e;#t;#n;#r;constructor(e={}){this.values=[],this.#e=ui(),this.#t={min:0,max:0},this.#n=null,this.#r={capacityLimit:100,persistentScaling:!0,fixedRange:null,...e},this.#r.fixedRange!==null&&(this.#n=this.#r.fixedRange)}setRange(e,n){this.#n={min:e,max:n}}unsetRange(){this.#n=null,this.#i()}get isAutoRange(){return this.#n===null}add(e){if(typeof e==`number`)this.values.push(e),this.isAutoRange&&(this.#t=this.#e.seen(e));else if(this.values.push(...e),this.isAutoRange)for(let n of e)this.#t=this.#e.seen(n);this.values.length>this.#r.capacityLimit&&(this.values=this.values.slice(this.values.length-this.#r.capacityLimit),!this.#r.persistentScaling&&this.isAutoRange&&this.#i())}#i(){this.#r.persistentScaling||(this.#e=ui());for(let e=0;e<this.values.length;e++)this.#t=this.#e.seen(this.values[e])}set(e){e.length>this.#r.capacityLimit&&(e=e.slice(e.length-this.#r.capacityLimit)),this.values=e,this.#i()}get range(){return this.#n?this.#n:this.#t}clear(){let e=this.values.length===0;return this.values=[],this.#r.persistentScaling||this.#i(),!e}};function WT(e){if(typeof e==`number`)return!0;if(typeof e!=`string`)return!1;let n=e.trim();return n!==``&&!Number.isNaN(Number(n))}var GT;let KT=!1;function qT(){if(KT)return;KT=!0;let e=document.createElement(`style`);e.textContent=`
10339
+ `}};E([d({type:String,reflect:!0})],kw.prototype,`orientation`,void 0),E([d({type:String})],kw.prototype,`variant`,void 0),E([d({type:String,attribute:`toggle-interaction`})],kw.prototype,`toggleInteraction`,void 0),E([d({type:Boolean})],kw.prototype,`collapsible`,void 0),E([d({type:Boolean,attribute:`accordion`,reflect:!0})],kw.prototype,`accordion`,void 0),E([d({type:Boolean,attribute:`allow-reorder`,reflect:!0})],kw.prototype,`allowReorder`,void 0),E([d()],kw.prototype,`gap`,void 0),E([p({slot:``})],kw.prototype,`_panels`,void 0),kw=E([T(`ixfx-panel-group`)],kw);var Aw=Object.defineProperty,jw=(e,n)=>{let r={};for(var i in e)Aw(r,i,{get:e[i],enumerable:!0});return n||Aw(r,Symbol.toStringTag,{value:`Module`}),r};const Mw=Math.pow,Nw=1/Math.sqrt(2*Math.PI),Pw=(e=.4)=>n=>{let r=Nw/e,i=-2.5,a=(n-.5)/e;a*=a,i*=a;let o=r*Mw(Math.E,i);return o>1?1:o<0?0:o};var Fw=jw({arch:()=>Ww,backIn:()=>lT,backInOut:()=>fT,backOut:()=>uT,bell:()=>gT,bounceIn:()=>hT,bounceInOut:()=>vT,bounceOut:()=>Vw,circIn:()=>sT,circInOut:()=>dT,circOut:()=>cT,cubicIn:()=>$w,cubicOut:()=>eT,elasticIn:()=>pT,elasticInOut:()=>_T,elasticOut:()=>mT,expoIn:()=>rT,expoInOut:()=>oT,expoOut:()=>iT,quadIn:()=>Yw,quadInOut:()=>Qw,quadOut:()=>Xw,quartIn:()=>tT,quartOut:()=>nT,quintIn:()=>Hw,quintInOut:()=>aT,quintOut:()=>Uw,sineIn:()=>qw,sineInOut:()=>Zw,sineOut:()=>Jw,smootherstep:()=>Kw,smoothstep:()=>Gw});const Iw=Math.sqrt,Lw=Math.pow,Rw=Math.cos,zw=Math.PI,Bw=Math.sin,Vw=e=>{let n=7.5625,r=2.75;return e<1/r?n*e*e:e<2/r?n*(e-=1.5/r)*e+.75:e<2.5/r?n*(e-=2.25/r)*e+.9375:n*(e-=2.625/r)*e+.984375},Hw=e=>e*e*e*e*e,Uw=e=>1-Lw(1-e,5),Ww=e=>e*(1-e)*4,Gw=e=>e*e*(3-2*e),Kw=e=>(e*(e*6-15)+10)*e*e*e,qw=e=>1-Rw(e*zw/2),Jw=e=>Bw(e*zw/2),Yw=e=>e*e,Xw=e=>1-(1-e)*(1-e),Zw=e=>-(Rw(zw*e)-1)/2,Qw=e=>e<.5?2*e*e:1-Lw(-2*e+2,2)/2,$w=e=>e*e*e,eT=e=>1-Lw(1-e,3),tT=e=>e*e*e*e,nT=e=>1-Lw(1-e,4),rT=e=>e===0?0:Lw(2,10*e-10),iT=e=>e===1?1:1-Lw(2,-10*e),aT=e=>e<.5?16*e*e*e*e*e:1-Lw(-2*e+2,5)/2,oT=e=>e===0?0:e===1?1:e<.5?Lw(2,20*e-10)/2:(2-Lw(2,-20*e+10))/2,sT=e=>1-Iw(1-Lw(e,2)),cT=e=>Iw(1-Lw(e-1,2)),lT=e=>2.70158*e*e*e-1.70158*e*e,uT=e=>1+2.70158*Lw(e-1,3)+1.70158*Lw(e-1,2),dT=e=>e<.5?(1-Iw(1-Lw(2*e,2)))/2:(Iw(1-Lw(-2*e+2,2))+1)/2,fT=e=>{let n=2.5949095;return e<.5?Lw(2*e,2)*(7.189819*e-n)/2:(Lw(2*e-2,2)*(3.5949095*(e*2-2)+n)+2)/2},pT=e=>{let n=2*zw/3;return e===0?0:e===1?1:-Lw(2,10*e-10)*Bw((e*10-10.75)*n)},mT=e=>{let n=2*zw/3;return e===0?0:e===1?1:Lw(2,-10*e)*Bw((e*10-.75)*n)+1},hT=e=>1-Vw(1-e),gT=Pw(),_T=e=>{let n=2*zw/4.5;return e===0?0:e===1?1:e<.5?-(Lw(2,20*e-10)*Bw((20*e-11.125)*n))/2:Lw(2,-20*e+10)*Bw((20*e-11.125)*n)/2+1},vT=e=>e<.5?(1-Vw(1-2*e))/2:(1+Vw(2*e-1))/2,yT=(e=0,n=0)=>{let r={x:oi(e,-1,1,0,1),y:oi(e,-1,1,1,0)},i=Nd.interpolate(Math.abs(e),Nd.Empty,r);e!==0&&n>0&&(i=e>0?Nd.interpolate(n,i,{x:0,y:r.x*2}):Nd.interpolate(n,i,{x:r.y*2,y:0}));let a=Ba.cubic(Nd.Empty,Nd.Unit,i,r),o=Ba.interpolator(a);return e=>o(e)},bT=(e,n)=>{O(Pr(e,`fn`));let r;return()=>(r===void 0&&(r=Tu(n,{clampValue:!0})),e(r()))},xT=(e,n)=>{O(Pr(e,`fn`));let r=Au(),i=Ao(n);if(i===void 0)throw Error(`Param 'duration' not provided`);let a=ku(i,{timer:r,clampValue:!0});return Mu(e,a)},ST=(e,n)=>{O(Pr(e,`fn`));let r;return()=>(r===void 0&&(r=Eu(n,{clampValue:!0})),e(r()))},CT=(e,n)=>{O(Pr(e,`fn`));let r=ju(),i=ku(n,{timer:r,clampValue:!0});return Mu(e,i)};var wT=jw({Named:()=>Fw,create:()=>TT,get:()=>MT,getEasingNames:()=>PT,line:()=>yT,tickEasing:()=>kT,ticks:()=>OT,time:()=>DT,timeEasing:()=>ET});const TT=e=>{let n=AT(e.name??`quintIn`)??e.fn;if(n===void 0)throw Error(`Either 'name' or 'fn' must be set`);if(`duration`in e)return DT(n,e.duration);if(`ticks`in e)return OT(n,e.ticks);throw Error(`Expected 'duration' or 'ticks' in options`)},ET=(e,n)=>xT(AT(e),n),DT=(e,n)=>bT(AT(e),n),OT=(e,n)=>ST(AT(e),n),kT=(e,n)=>CT(AT(e),n),AT=e=>{let n=typeof e==`function`?e:MT(e);if(n===void 0)throw Error(typeof e==`string`?`Easing function not found: '${e}'`:`Easing function not found`);return n};let jT;const MT=function(e){O(Fr(e,`non-empty`,`easingName`));let n=NT().get(e.toLowerCase());if(n===void 0)throw Error(`Easing not found: '${e}'`);return n};function NT(){if(jT===void 0){jT=new Map;for(let[e,n]of Object.entries(Fw))jT.set(e.toLowerCase(),n);return jT}return jT}function*PT(){yield*NT().keys()}const FT=[`green`,`yellow`,`red`],IT=new Map;function LT(e){let n=e.join(`\0`);return IT.has(n)||IT.set(n,eg.scale(e,{stepsBetween:99})),IT.get(n)}function RT(e,n){let r=getComputedStyle(e),i=r.getPropertyValue(n).trim(),a=/var\((--[\w-]+)(?:,(.*))?\)/g;for(let e=0;e<5&&i.includes(`var(`);e++)i=i.replace(a,(e,n,i)=>r.getPropertyValue(n).trim()||(i?i.trim():``));return i}function zT(e){return RT(e,`--plot-color`)||`oklch(60% 0.15 140)`}function BT(e){if(!e.trim())return FT;let n=e.split(`,`).map(e=>e.trim()).filter(Boolean);return n.length>=2?n:FT}function VT(e){try{let n=eg.HslSpace.fromCss(e,{scalar:!0});return{h:n.h,s:n.s,l:n.l}}catch{return{h:.39,s:.5,l:.55}}}function HT(e,n){let r=Math.max(0,Math.min(1,e));if(n.easingName)try{return Math.max(0,Math.min(1,wT.get(n.easingName)(r)))}catch{}return n.valueMap?Math.max(0,Math.min(1,n.valueMap(r))):r}function UT(e,n,r){let i=HT(e,r);switch(r.mode){case`fixed`:return{fill:n,opacity:1};case`opacity`:return{fill:n,opacity:Math.max(.04,i)};case`hue`:{let e=VT(n);return{fill:`hsl(${Math.round(i*360)}deg ${Math.round(e.s*100)}% ${Math.round(e.l*100)}%)`,opacity:1}}case`saturation`:{let e=VT(n);return{fill:`hsl(${Math.round(e.h*360)}deg ${Math.round(i*100)}% ${Math.round(e.l*100)}%)`,opacity:1}}case`lightness`:{let e=VT(n);return{fill:`hsl(${Math.round(e.h*360)}deg ${Math.round(e.s*100)}% ${Math.round(i*100)}%)`,opacity:1}}case`scale`:{let e=LT(r.palette.length>=2?r.palette:FT);return{fill:e[Math.min(e.length-1,Math.floor(i*e.length))],opacity:1}}default:return{fill:n,opacity:1}}}function WT(e,n,r){if(r===`opacity`)return{...e,opacity:e.opacity*Math.max(.08,n**.6)};if(r===`desaturation`){let r=VT(e.fill),i=r.s*n;return{fill:`hsl(${Math.round(r.h*360)}deg ${Math.round(i*100)}% ${Math.round(r.l*100)}%)`,opacity:e.opacity}}return e}var GT=class{#e;#t;#n;#r;constructor(e={}){this.values=[],this.#e=ui(),this.#t={min:0,max:0},this.#n=null,this.#r={capacityLimit:100,persistentScaling:!0,fixedRange:null,...e},this.#r.fixedRange!==null&&(this.#n=this.#r.fixedRange)}setRange(e,n){this.#n={min:e,max:n}}unsetRange(){this.#n=null,this.#i()}get isAutoRange(){return this.#n===null}add(e){if(typeof e==`number`)this.values.push(e),this.isAutoRange&&(this.#t=this.#e.seen(e));else if(this.values.push(...e),this.isAutoRange)for(let n of e)this.#t=this.#e.seen(n);this.values.length>this.#r.capacityLimit&&(this.values=this.values.slice(this.values.length-this.#r.capacityLimit),!this.#r.persistentScaling&&this.isAutoRange&&this.#i())}#i(){this.#r.persistentScaling||(this.#e=ui());for(let e=0;e<this.values.length;e++)this.#t=this.#e.seen(this.values[e])}set(e){e.length>this.#r.capacityLimit&&(e=e.slice(e.length-this.#r.capacityLimit)),this.values=e,this.#i()}get range(){return this.#n?this.#n:this.#t}clear(){let e=this.values.length===0;return this.values=[],this.#r.persistentScaling||this.#i(),!e}};function KT(e){if(typeof e==`number`)return!0;if(typeof e!=`string`)return!1;let n=e.trim();return n!==``&&!Number.isNaN(Number(n))}var qT;let JT=!1;function YT(){if(JT)return;JT=!0;let e=document.createElement(`style`);e.textContent=`
10309
10340
  ixfx-tooltip {
10310
10341
  display: inline-block;
10311
10342
  background: var(--surface-5);
@@ -10320,7 +10351,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10320
10351
  ixfx-tooltip .tooltip-type-number {
10321
10352
  font-family: var(--font-mono, ui-monospace, monospace);
10322
10353
  }
10323
- `,document.head.appendChild(e)}let JT=class extends n{static{GT=this}constructor(...e){super(...e),this.valueFormatTooltip=GT.defaultFormatter,this.orientation=`top`,this.anchor=`--tooltip`}connectedCallback(){super.connectedCallback(),qT()}static{this.numberFormatter=e=>Math.floor(e).toString()}static{this.defaultFormatter=e=>typeof e==`number`?Number.isInteger(e)?e.toString():e.toFixed(2):typeof e==`string`?e:JSON.stringify(e)}#e(){return this.icon?this.icon.startsWith(`<svg`)?i`<span class="tooltip-icon" style="display:inline-flex;align-items:center;margin-right:0.25em">${g(this.icon)}</span>`:be(this.icon)?i`<ixfx-icon class="tooltip-icon" style="margin-right:0.25em" name="${this.icon}"></ixfx-icon>`:a:a}render(){let e={tooltip:!0,"tooltip-orientation-top":this.orientation===`top`,"tooltip-orientation-bottom":this.orientation===`bottom`,"tooltip-orientation-right":this.orientation===`right`,"tooltip-orientation-left":this.orientation===`left`,"tooltip-type-text":!0,"tooltip-type-number":!1,"tooltip-style-bubble":!0},n=``;switch(typeof this.value){case`number`:e[`tooltip-type-number`]=!0,n=this.valueFormatTooltip(this.value);break;case`string`:WT(this.value)?(e[`tooltip-type-number`]=!0,n=this.valueFormatTooltip(Number.parseFloat(this.value))):n=this.value;break;default:n=JSON.stringify(this.value)}return i`<output style="--anchor-id: ${this.anchor}" class=${v(e)}>${this.#e()}${n}</output>`}createRenderRoot(){return this}};E([d({type:String})],JT.prototype,`orientation`,void 0),E([d({type:String})],JT.prototype,`anchor`,void 0),E([d()],JT.prototype,`value`,void 0),E([d({type:String})],JT.prototype,`icon`,void 0),JT=GT=E([T(`ixfx-tooltip`)],JT);let YT=null,XT=null;function ZT(){if(YT)return YT;let e=document.createElement(`div`);return e.style.cssText=`
10354
+ `,document.head.appendChild(e)}let XT=class extends n{static{qT=this}constructor(...e){super(...e),this.valueFormatTooltip=qT.defaultFormatter,this.orientation=`top`,this.anchor=`--tooltip`}connectedCallback(){super.connectedCallback(),YT()}static{this.numberFormatter=e=>Math.floor(e).toString()}static{this.defaultFormatter=e=>typeof e==`number`?Number.isInteger(e)?e.toString():e.toFixed(2):typeof e==`string`?e:JSON.stringify(e)}#e(){return this.icon?this.icon.startsWith(`<svg`)?i`<span class="tooltip-icon" style="display:inline-flex;align-items:center;margin-right:0.25em">${g(this.icon)}</span>`:be(this.icon)?i`<ixfx-icon class="tooltip-icon" style="margin-right:0.25em" name="${this.icon}"></ixfx-icon>`:a:a}render(){let e={tooltip:!0,"tooltip-orientation-top":this.orientation===`top`,"tooltip-orientation-bottom":this.orientation===`bottom`,"tooltip-orientation-right":this.orientation===`right`,"tooltip-orientation-left":this.orientation===`left`,"tooltip-type-text":!0,"tooltip-type-number":!1,"tooltip-style-bubble":!0},n=``;switch(typeof this.value){case`number`:e[`tooltip-type-number`]=!0,n=this.valueFormatTooltip(this.value);break;case`string`:KT(this.value)?(e[`tooltip-type-number`]=!0,n=this.valueFormatTooltip(Number.parseFloat(this.value))):n=this.value;break;default:n=JSON.stringify(this.value)}return i`<output style="--anchor-id: ${this.anchor}" class=${v(e)}>${this.#e()}${n}</output>`}createRenderRoot(){return this}};E([d({type:String})],XT.prototype,`orientation`,void 0),E([d({type:String})],XT.prototype,`anchor`,void 0),E([d()],XT.prototype,`value`,void 0),E([d({type:String})],XT.prototype,`icon`,void 0),XT=qT=E([T(`ixfx-tooltip`)],XT);let ZT=null,QT=null;function $T(){if(ZT)return ZT;let e=document.createElement(`div`);return e.style.cssText=`
10324
10355
  position: fixed;
10325
10356
  pointer-events: none;
10326
10357
  z-index: 9999;
@@ -10334,13 +10365,13 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10334
10365
  font-family: ui-monospace, monospace;
10335
10366
  opacity: 0;
10336
10367
  transition: opacity 0.1s ease;
10337
- `,document.body.appendChild(e),YT=e,e}function QT(e,n,r,i){let a=ZT();XT=e,a.textContent=i,a.style.whiteSpace=`nowrap`,a.style.left=`${n+14}px`,a.style.top=`${r+14}px`,a.style.opacity=`1`}function $T(e,n,r,i){let a=ZT();XT=e,a.innerHTML=i,a.style.whiteSpace=`normal`,a.style.left=`${n+14}px`,a.style.top=`${r+14}px`,a.style.opacity=`1`}function eE(e){if(XT!==e)return;let n=ZT();n.style.opacity=`0`,XT=null}let tE=null,nE=null;function rE(){if(tE)return tE;let e=document.createElement(`ixfx-tooltip`);return e.style.cssText=`
10368
+ `,document.body.appendChild(e),ZT=e,e}function eE(e,n,r,i){let a=$T();QT=e,a.textContent=i,a.style.whiteSpace=`nowrap`,a.style.left=`${n+14}px`,a.style.top=`${r+14}px`,a.style.opacity=`1`}function tE(e,n,r,i){let a=$T();QT=e,a.innerHTML=i,a.style.whiteSpace=`normal`,a.style.left=`${n+14}px`,a.style.top=`${r+14}px`,a.style.opacity=`1`}function nE(e){if(QT!==e)return;let n=$T();n.style.opacity=`0`,QT=null}let rE=null,iE=null;function aE(){if(rE)return rE;let e=document.createElement(`ixfx-tooltip`);return e.style.cssText=`
10338
10369
  position: fixed;
10339
10370
  z-index: 9999;
10340
10371
  pointer-events: none;
10341
10372
  opacity: 0;
10342
10373
  transition: opacity 0.12s ease;
10343
- `,document.body.appendChild(e),tE=e,e}function iE(e,n,r,i,a){let o=rE();nE=e,o.value=n,a===`horizontal`?(o.style.left=`${r}px`,o.style.top=`${i}px`,o.style.transform=`translate(-50%, -100%)`):(o.style.left=`${i}px`,o.style.top=`${r}px`,o.style.transform=`translate(0, -50%)`),o.style.opacity=`1`}function aE(e){if(nE!==e)return;let n=rE();n.style.opacity=`0`,nE=null}function oE(e,n){return Math.max(1,Math.min(e,n)/25)}function sE(e,n,r){if(r===0)return 3;let i=e/r;return Math.max(1.5,Math.min(i*.45,n*.2,8))}function cE(e,n,r){let i=r-n;return i===0?.5:(e-n)/i}const lE=[`oklch(60% 0.15 30)`,`oklch(60% 0.15 90)`,`oklch(60% 0.15 150)`,`oklch(60% 0.15 210)`,`oklch(60% 0.15 270)`,`oklch(60% 0.15 330)`,`oklch(60% 0.15 60)`,`oklch(60% 0.15 180)`];let uE=class extends n{constructor(...e){super(...e),this.layout=`overlap`,this.gridMinWidth=200,this.valueFormat=e=>e?e.toFixed(2):``,this.#e=new Map,this.#t=[],this.#n=new Set,this.#r=new Map}#e;#t;#n;#r;addData(e,n,r=!1){return this.#i(e,n,r)}setData(e,n,r=!1){let[i,a]=this.#a(e);return this.#n.has(e)||(this.#n.add(e),this.#t.push(e)),i.set(n,r),a&&this.requestUpdate(),i}setObjects(e,n=!1){let r=Object.entries(e);for(let[e,n]of r)this.setData(e,n,!0);n||this.redraw()}redraw(){for(let e of this.#e.values())e.redraw()}addObject(e,n=!1){let r=Object.entries(e);for(let[e,n]of r)this.#i(e,n,!0);n||this.redraw()}styleSeries(e,n){let r={};for(let[e,i]of Object.entries(n))r[e.startsWith(`--`)?e:`--${e}`]=i;let i=this.#e.get(e);if(!i){this.#r.set(e,r);return}for(let[e,n]of Object.entries(r))i.style.setProperty(e,n)}clear(){let e=!1;for(let n of this.#e.values())e||=n.clear();return e}clearSeries(e){let n=this.#e.get(e);return n?(n.clear(),!0):!1}get series(){return[...this.#t]}#i(e,n,r=!1){let[i,a]=this.#a(e);return this.#n.has(e)||(this.#n.add(e),this.#t.push(e)),i.add(n,r),a&&this.requestUpdate(),i}#a(e){let n=this.#e.get(e);if(n)return[n,!1];n=document.createElement(`ixfx-plot-single-axis`),n.tooltips=!1,this.#e.set(e,n);let r=this.#e.size%lE.length;n.style.setProperty(`--plot-color`,lE[r]);let i=this.#r.get(e);if(i){for(let[e,r]of Object.entries(i))n.style.setProperty(e,r);this.#r.delete(e)}return n.addEventListener(`plot-datapoint-click`,n=>{let r=n;this.dispatchEvent(new CustomEvent(`plot-datapoint-click`,{detail:{...r.detail,series:e},bubbles:!0,composed:!0}))}),n.addEventListener(`plot-pointer-move`,e=>{let n=e;this.#o(n.detail.clientX,n.detail.clientY,n.detail.index)}),n.addEventListener(`plot-pointer-leave`,()=>{this.#s()}),[n,!0]}#o(e,n,r){if(r<0){eE(this);return}let i=[];for(let[e,n]of this.#e){let a=n.getValueAt(r);if(a===void 0)continue;let o=getComputedStyle(n).getPropertyValue(`--plot-color`).trim();i.push(`<span style="color:${o}">${this.#c(e)}</span> ${this.valueFormat(a)}`)}if(i.length===0){eE(this);return}$T(this,e,n,i.join(`<br>`))}#s(){eE(this)}#c(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}render(){let e=this.layout===`grid`?`--grid-min-width: ${this.gridMinWidth}px`:``;return i`
10374
+ `,document.body.appendChild(e),rE=e,e}function oE(e,n,r,i,a){let o=aE();iE=e,o.value=n,a===`horizontal`?(o.style.left=`${r}px`,o.style.top=`${i}px`,o.style.transform=`translate(-50%, -100%)`):(o.style.left=`${i}px`,o.style.top=`${r}px`,o.style.transform=`translate(0, -50%)`),o.style.opacity=`1`}function sE(e){if(iE!==e)return;let n=aE();n.style.opacity=`0`,iE=null}function cE(e,n){return Math.max(1,Math.min(e,n)/25)}function lE(e,n,r){if(r===0)return 3;let i=e/r;return Math.max(1.5,Math.min(i*.45,n*.2,8))}function uE(e,n,r){let i=r-n;return i===0?.5:(e-n)/i}const dE=[`oklch(60% 0.15 30)`,`oklch(60% 0.15 90)`,`oklch(60% 0.15 150)`,`oklch(60% 0.15 210)`,`oklch(60% 0.15 270)`,`oklch(60% 0.15 330)`,`oklch(60% 0.15 60)`,`oklch(60% 0.15 180)`];let fE=class extends n{constructor(...e){super(...e),this.layout=`overlap`,this.gridMinWidth=200,this.valueFormat=e=>e?e.toFixed(2):``,this.#e=new Map,this.#t=[],this.#n=new Set,this.#r=new Map}#e;#t;#n;#r;addData(e,n,r=!1){return this.#i(e,n,r)}setData(e,n,r=!1){let[i,a]=this.#a(e);return this.#n.has(e)||(this.#n.add(e),this.#t.push(e)),i.set(n,r),a&&this.requestUpdate(),i}setObjects(e,n=!1){let r=Object.entries(e);for(let[e,n]of r)this.setData(e,n,!0);n||this.redraw()}redraw(){for(let e of this.#e.values())e.redraw()}addObject(e,n=!1){let r=Object.entries(e);for(let[e,n]of r)this.#i(e,n,!0);n||this.redraw()}styleSeries(e,n){let r={};for(let[e,i]of Object.entries(n))r[e.startsWith(`--`)?e:`--${e}`]=i;let i=this.#e.get(e);if(!i){this.#r.set(e,r);return}for(let[e,n]of Object.entries(r))i.style.setProperty(e,n)}clear(){let e=!1;for(let n of this.#e.values())e||=n.clear();return e}clearSeries(e){let n=this.#e.get(e);return n?(n.clear(),!0):!1}get series(){return[...this.#t]}#i(e,n,r=!1){let[i,a]=this.#a(e);return this.#n.has(e)||(this.#n.add(e),this.#t.push(e)),i.add(n,r),a&&this.requestUpdate(),i}#a(e){let n=this.#e.get(e);if(n)return[n,!1];n=document.createElement(`ixfx-plot-single-axis`),n.tooltips=!1,this.#e.set(e,n);let r=this.#e.size%dE.length;n.style.setProperty(`--plot-color`,dE[r]);let i=this.#r.get(e);if(i){for(let[e,r]of Object.entries(i))n.style.setProperty(e,r);this.#r.delete(e)}return n.addEventListener(`plot-datapoint-click`,n=>{let r=n;this.dispatchEvent(new CustomEvent(`plot-datapoint-click`,{detail:{...r.detail,series:e},bubbles:!0,composed:!0}))}),n.addEventListener(`plot-pointer-move`,e=>{let n=e;this.#o(n.detail.clientX,n.detail.clientY,n.detail.index)}),n.addEventListener(`plot-pointer-leave`,()=>{this.#s()}),[n,!0]}#o(e,n,r){if(r<0){nE(this);return}let i=[];for(let[e,n]of this.#e){let a=n.getValueAt(r);if(a===void 0)continue;let o=getComputedStyle(n).getPropertyValue(`--plot-color`).trim();i.push(`<span style="color:${o}">${this.#c(e)}</span> ${this.valueFormat(a)}`)}if(i.length===0){nE(this);return}tE(this,e,n,i.join(`<br>`))}#s(){nE(this)}#c(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}render(){let e=this.layout===`grid`?`--grid-min-width: ${this.gridMinWidth}px`:``;return i`
10344
10375
  <div
10345
10376
  id="container"
10346
10377
  class="layout layout-${this.layout}"
@@ -10396,7 +10427,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10396
10427
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-min-width, 200px), 1fr));
10397
10428
  gap: var(--space-s, 4px);
10398
10429
  }
10399
- `}};E([d()],uE.prototype,`layout`,void 0),E([d({attribute:`grid-min-width`,type:Number})],uE.prototype,`gridMinWidth`,void 0),uE=E([T(`ixfx-plot-multi-axis`)],uE);let X=class extends n{constructor(...e){super(...e),this.orientation=`horizontal`,this.resolution=.1,this.capacity=100,this.title=``,this.paused=!1,this.valueTooltips=`hover`,this.tooltipDelay=400,this.valueUpdateInterval=500,this.interactionMode=`inspect`,this.valueFormat=(e,n,r)=>`${e.toFixed(2)} - ${n.toFixed(2)}: ${r}`,this._width=100,this._height=40,this._hoveredIndex=null,this._inlineOverlayText=null,this._coloredRangeMin=null,this._coloredRangeMax=null,this._selectionStart=null,this._selectionEnd=null,this._isDragging=!1,this._selectionOverlayText=null,this.#e=new UT({capacityLimit:100,persistentScaling:!0}),this.#t=!1,this.#p=null,this.#m=!1,this.#h=null,this.#g=null,this.#_=null,this.#v=null,this.#O=e=>{if(this.interactionMode===`select`&&this._isDragging){let n=this.#f(e.clientX,e.clientY);if(n===this._selectionEnd)return;this._selectionEnd=n;let r=Math.min(this._selectionStart,this._selectionEnd),i=Math.max(this._selectionStart,this._selectionEnd),a=this.#l();if(r<=i){let e=a[r],n=a[i];this.setColoredRange(e.valueMin,n.valueMax),this._selectionOverlayText=`Select: ${e.valueMin.toFixed(2)} – ${n.valueMax.toFixed(2)}`}this.requestUpdate(),this.#s(!1);return}if(this.interactionMode===`select`||this.valueTooltips===`none`)return;let n=this.#d(e.clientX,e.clientY),r=n>=0?n:null;this.valueTooltips===`inline`?this.#D(r):this.#T(r,e.clientX,e.clientY)},this.#k=()=>{if(this.interactionMode===`select`){this._isDragging&&(this._isDragging=!1,this._selectionOverlayText=null,this.requestUpdate(),this.#s(!0));return}this.valueTooltips!==`none`&&(this.valueTooltips===`inline`?this.#D(null):this.#T(null,0,0))},this.#A=e=>{if(this.interactionMode!==`select`)return;let n=this.#f(e.clientX,e.clientY);this._isDragging=!0,this._selectionStart=n,this._selectionEnd=n;let r=this.#l(),i=r[n],a=r[n];this.setColoredRange(i.valueMin,a.valueMax),this._selectionOverlayText=`Select: ${i.valueMin.toFixed(2)} – ${a.valueMax.toFixed(2)}`,this.requestUpdate(),this.#s(!1)},this.#j=()=>{this.interactionMode===`select`&&this._isDragging&&(this._isDragging=!1,this.#s(!0))}}#e;#t;#n(e){return e?e.trim().split(/[,\s;]+/).map(e=>Number.parseFloat(e)).filter(e=>!Number.isNaN(e)):[]}add(e){this.#t=!0,this.#e.add(e),!this.paused&&this.requestUpdate()}set(e){this.#t=!0,this.#e.set(e),!this.paused&&this.requestUpdate()}clear(){this.#e.clear(),this.requestUpdate()}setColoredRange(e,n){this._coloredRangeMin=e,this._coloredRangeMax=n,this.requestUpdate()}clearColoredRange(){this._coloredRangeMin=null,this._coloredRangeMax=null,this.requestUpdate()}setSelection(e,n){let r=this.#l(),i=Math.min(e,n),a=Math.max(e,n),o=Math.max(0,Math.min(i,r.length-1)),s=Math.max(0,Math.min(a,r.length-1));if(this._selectionStart=o,this._selectionEnd=s,o<=s){let e=r[o],n=r[s];this.setColoredRange(e.valueMin,n.valueMax)}this.requestUpdate(),this.#s(!0)}clearSelection(){let e=this._selectionStart!==null||this._selectionEnd!==null;this._selectionStart=null,this._selectionEnd=null,this.requestUpdate(),e&&this.#s(!0)}getSelectedRange(){if(this._selectionStart===null||this._selectionEnd===null)return{barIndices:null,dataValues:null};let e=this.#l(),n=Math.min(this._selectionStart,this._selectionEnd),r=Math.max(this._selectionStart,this._selectionEnd),i=Math.max(0,Math.min(n,e.length-1)),a=Math.max(0,Math.min(r,e.length-1)),o=e[i],s=e[a];return{barIndices:{start:i,end:a},dataValues:{min:o.valueMin,max:s.valueMax}}}firstUpdated(e){if(this._width=this.clientWidth||100,this._height=this.clientHeight||40,new ResizeObserver(e=>{let n=e[0];this._width=n.contentRect.width,this._height=n.contentRect.height}).observe(this),!this.#t){let e=this.#n(this.textContent??``);e.length>0&&this.#e.set(e)}let n=this.getAttribute(`title`);n!==null&&(this.title=n,this.removeAttribute(`title`))}updated(e){if(e.has(`capacity`)){let e=[...this.#e.values];this.#e=new UT({capacityLimit:this.capacity,persistentScaling:!0}),e.length>0&&this.#e.set(e)}e.has(`valueTooltips`)&&this.#S()}disconnectedCallback(){super.disconnectedCallback(),this.#S()}#r(e){return getComputedStyle(this).getPropertyValue(e).trim()}#i(){let e=this.#r(`--plot-histogram-gap`);if(e===``)return 1;let n=Number.parseFloat(e);return Number.isFinite(n)?Math.max(0,n):1}#a(){let e=this.#r(`--plot-histogram-bar-length`);if(e===``||e===`auto`)return null;let n=Number.parseFloat(e);return Number.isFinite(n)?Math.max(0,Math.min(1,n)):null}#o(e,n,r,i){this.dispatchEvent(new CustomEvent(`plot-bucket-click`,{detail:{bucketIndex:e,valueMin:n,valueMax:r,relativeValue:i},bubbles:!0,composed:!0}))}#s(e){this.dispatchEvent(new CustomEvent(`plot-selection-change`,{detail:{...this.getSelectedRange(),committed:e},bubbles:!0,composed:!0}))}#c(){let{values:e,range:n}=this.#e,r=this._width,i=this._height,a=this.orientation===`horizontal`,o=Math.min(4,(a?i:r)*.05),s=this.min??n.min,c=this.max??n.max,l=c-s||1,u=Math.max(1,Math.floor(1/this.resolution)),d=(a?r:i)-o*2,f=(a?i:r)-o*2,p=Array.from({length:u}).fill(0);for(let n of e){let e=(n-s)/l,r=Math.min(u-1,Math.max(0,Math.floor(e*u)));p[r]++}return{w:r,h:i,isHorizontal:a,padding:o,dataMin:s,dataMax:c,dataSpan:l,bucketCount:u,availableMain:d,availableCross:f,buckets:p}}#l(){let{isHorizontal:e,padding:n,dataMin:r,dataSpan:i,bucketCount:a,availableMain:o,availableCross:s,buckets:c}=this.#c(),l=o/a,u=this.#i(),d=this.#a(),f=Math.max(1,...c);return c.map((c,p)=>{let m=c/f,h=d===null?m*s:d*s,g=r+p/a*i,_=r+(p+1)/a*i;if(e){let e=n+p*l,r=p===a-1?Math.max(0,n+o-e):Math.max(0,l-u);return{count:c,valueMin:g,valueMax:_,relativeValue:m,x:e,y:n+s-h,width:r,height:h}}{let e=n+p*l,r=p===a-1?Math.max(0,n+o-e):Math.max(0,l-u);return{count:c,valueMin:g,valueMax:_,relativeValue:m,x:n,y:e,width:h,height:r}}})}#u(e){return this._coloredRangeMin===null||this._coloredRangeMax===null||e.valueMin<this._coloredRangeMax&&e.valueMax>this._coloredRangeMin}#d(e,n){let r=this.getBoundingClientRect(),i=e-r.left,a=n-r.top;return this.#l().findIndex(e=>i>=e.x&&i<=e.x+e.width&&a>=e.y&&a<=e.y+e.height)}#f(e,n){let{isHorizontal:r,padding:i,bucketCount:a,availableMain:o}=this.#c(),s=this.getBoundingClientRect(),c=e-s.left,l=n-s.top,u;return u=r?(c-i)/o:(l-i)/o,u=Math.max(0,Math.min(1,u)),Math.floor(u*a)}#p;#m;#h;#g;#_;#v;#y(){this.#v!==null&&(clearTimeout(this.#v),this.#v=null)}#b(e){this.#y(),this.#v=window.setTimeout(()=>{this.#v=null,e(),this.#b(e)},this.valueUpdateInterval)}#x(){this.#h!==null&&(clearTimeout(this.#h),this.#h=null),this.#g!==null&&(clearTimeout(this.#g),this.#g=null),this.#m&&(this.#m=!1,aE(this)),this.#p=null,this.#_=null}#S(){this.#y(),this.#x(),this._hoveredIndex=null,this._inlineOverlayText=null}#C(e,n,r){let i=this.getBoundingClientRect();return this.orientation===`horizontal`?{mainClient:i.left+e.x+e.width/2,crossClient:r-14}:{mainClient:i.top+e.y+e.height/2,crossClient:n+14}}#w(){if(this.#p===null||!this.#m||!this.#_)return;let e=this.#l()[this.#p];if(!e)return;let n=this.valueFormat(e.valueMin,e.valueMax,e.count);iE(this,n,this.#_.mainClient,this.#_.crossClient,this.orientation)}#T(e,n,r){if(e===this.#p)return;if(this.#p=e,this.#y(),e===null){this.#h!==null&&(clearTimeout(this.#h),this.#h=null),this.#m&&(this.#g=window.setTimeout(()=>{this.#g=null,this.#m=!1,this.#_=null,aE(this)},this.tooltipDelay));return}this.#g!==null&&(clearTimeout(this.#g),this.#g=null);let i=this.#l()[e];if(!i)return;let a=this.valueFormat(i.valueMin,i.valueMax,i.count),o=this.#C(i,n,r);if(this.#_=o,this.#m){iE(this,a,o.mainClient,o.crossClient,this.orientation),this.#b(()=>this.#w());return}this.#h!==null&&clearTimeout(this.#h),this.#h=window.setTimeout(()=>{this.#h=null,this.#m=!0,iE(this,a,o.mainClient,o.crossClient,this.orientation),this.#b(()=>this.#w())},this.tooltipDelay)}#E(e){let n=this.#l()[e];return n?this.valueFormat(n.valueMin,n.valueMax,n.count):null}#D(e){if(e!==this._hoveredIndex){if(this._hoveredIndex=e,this.#y(),e===null){this._inlineOverlayText=null;return}this._inlineOverlayText=this.#E(e),this.#b(()=>{this._hoveredIndex!==null&&(this._inlineOverlayText=this.#E(this._hoveredIndex))})}}#O;#k;#A;#j;render(){let{w:e,h:n,padding:r}=this.#c(),a=this.#l().map((e,n)=>{let r=this.#u(e)?``:`filter: grayscale(1)`;return s`
10430
+ `}};E([d()],fE.prototype,`layout`,void 0),E([d({attribute:`grid-min-width`,type:Number})],fE.prototype,`gridMinWidth`,void 0),fE=E([T(`ixfx-plot-multi-axis`)],fE);let X=class extends n{constructor(...e){super(...e),this.orientation=`horizontal`,this.resolution=.1,this.capacity=100,this.title=``,this.paused=!1,this.valueTooltips=`hover`,this.tooltipDelay=400,this.valueUpdateInterval=500,this.interactionMode=`inspect`,this.valueFormat=(e,n,r)=>`${e.toFixed(2)} - ${n.toFixed(2)}: ${r}`,this._width=100,this._height=40,this._hoveredIndex=null,this._inlineOverlayText=null,this._coloredRangeMin=null,this._coloredRangeMax=null,this._selectionStart=null,this._selectionEnd=null,this._isDragging=!1,this._selectionOverlayText=null,this.#e=new GT({capacityLimit:100,persistentScaling:!0}),this.#t=!1,this.#p=null,this.#m=!1,this.#h=null,this.#g=null,this.#_=null,this.#v=null,this.#O=e=>{if(this.interactionMode===`select`&&this._isDragging){let n=this.#f(e.clientX,e.clientY);if(n===this._selectionEnd)return;this._selectionEnd=n;let r=Math.min(this._selectionStart,this._selectionEnd),i=Math.max(this._selectionStart,this._selectionEnd),a=this.#l();if(r<=i){let e=a[r],n=a[i];this.setColoredRange(e.valueMin,n.valueMax),this._selectionOverlayText=`Select: ${e.valueMin.toFixed(2)} – ${n.valueMax.toFixed(2)}`}this.requestUpdate(),this.#s(!1);return}if(this.interactionMode===`select`||this.valueTooltips===`none`)return;let n=this.#d(e.clientX,e.clientY),r=n>=0?n:null;this.valueTooltips===`inline`?this.#D(r):this.#T(r,e.clientX,e.clientY)},this.#k=()=>{if(this.interactionMode===`select`){this._isDragging&&(this._isDragging=!1,this._selectionOverlayText=null,this.requestUpdate(),this.#s(!0));return}this.valueTooltips!==`none`&&(this.valueTooltips===`inline`?this.#D(null):this.#T(null,0,0))},this.#A=e=>{if(this.interactionMode!==`select`)return;let n=this.#f(e.clientX,e.clientY);this._isDragging=!0,this._selectionStart=n,this._selectionEnd=n;let r=this.#l(),i=r[n],a=r[n];this.setColoredRange(i.valueMin,a.valueMax),this._selectionOverlayText=`Select: ${i.valueMin.toFixed(2)} – ${a.valueMax.toFixed(2)}`,this.requestUpdate(),this.#s(!1)},this.#j=()=>{this.interactionMode===`select`&&this._isDragging&&(this._isDragging=!1,this.#s(!0))}}#e;#t;#n(e){return e?e.trim().split(/[,\s;]+/).map(e=>Number.parseFloat(e)).filter(e=>!Number.isNaN(e)):[]}add(e){this.#t=!0,this.#e.add(e),!this.paused&&this.requestUpdate()}set(e){this.#t=!0,this.#e.set(e),!this.paused&&this.requestUpdate()}clear(){this.#e.clear(),this.requestUpdate()}setColoredRange(e,n){this._coloredRangeMin=e,this._coloredRangeMax=n,this.requestUpdate()}clearColoredRange(){this._coloredRangeMin=null,this._coloredRangeMax=null,this.requestUpdate()}setSelection(e,n){let r=this.#l(),i=Math.min(e,n),a=Math.max(e,n),o=Math.max(0,Math.min(i,r.length-1)),s=Math.max(0,Math.min(a,r.length-1));if(this._selectionStart=o,this._selectionEnd=s,o<=s){let e=r[o],n=r[s];this.setColoredRange(e.valueMin,n.valueMax)}this.requestUpdate(),this.#s(!0)}clearSelection(){let e=this._selectionStart!==null||this._selectionEnd!==null;this._selectionStart=null,this._selectionEnd=null,this.requestUpdate(),e&&this.#s(!0)}getSelectedRange(){if(this._selectionStart===null||this._selectionEnd===null)return{barIndices:null,dataValues:null};let e=this.#l(),n=Math.min(this._selectionStart,this._selectionEnd),r=Math.max(this._selectionStart,this._selectionEnd),i=Math.max(0,Math.min(n,e.length-1)),a=Math.max(0,Math.min(r,e.length-1)),o=e[i],s=e[a];return{barIndices:{start:i,end:a},dataValues:{min:o.valueMin,max:s.valueMax}}}firstUpdated(e){if(this._width=this.clientWidth||100,this._height=this.clientHeight||40,new ResizeObserver(e=>{let n=e[0];this._width=n.contentRect.width,this._height=n.contentRect.height}).observe(this),!this.#t){let e=this.#n(this.textContent??``);e.length>0&&this.#e.set(e)}let n=this.getAttribute(`title`);n!==null&&(this.title=n,this.removeAttribute(`title`))}updated(e){if(e.has(`capacity`)){let e=[...this.#e.values];this.#e=new GT({capacityLimit:this.capacity,persistentScaling:!0}),e.length>0&&this.#e.set(e)}e.has(`valueTooltips`)&&this.#S()}disconnectedCallback(){super.disconnectedCallback(),this.#S()}#r(e){return getComputedStyle(this).getPropertyValue(e).trim()}#i(){let e=this.#r(`--plot-histogram-gap`);if(e===``)return 1;let n=Number.parseFloat(e);return Number.isFinite(n)?Math.max(0,n):1}#a(){let e=this.#r(`--plot-histogram-bar-length`);if(e===``||e===`auto`)return null;let n=Number.parseFloat(e);return Number.isFinite(n)?Math.max(0,Math.min(1,n)):null}#o(e,n,r,i){this.dispatchEvent(new CustomEvent(`plot-bucket-click`,{detail:{bucketIndex:e,valueMin:n,valueMax:r,relativeValue:i},bubbles:!0,composed:!0}))}#s(e){this.dispatchEvent(new CustomEvent(`plot-selection-change`,{detail:{...this.getSelectedRange(),committed:e},bubbles:!0,composed:!0}))}#c(){let{values:e,range:n}=this.#e,r=this._width,i=this._height,a=this.orientation===`horizontal`,o=Math.min(4,(a?i:r)*.05),s=this.min??n.min,c=this.max??n.max,l=c-s||1,u=Math.max(1,Math.floor(1/this.resolution)),d=(a?r:i)-o*2,f=(a?i:r)-o*2,p=Array.from({length:u}).fill(0);for(let n of e){let e=(n-s)/l,r=Math.min(u-1,Math.max(0,Math.floor(e*u)));p[r]++}return{w:r,h:i,isHorizontal:a,padding:o,dataMin:s,dataMax:c,dataSpan:l,bucketCount:u,availableMain:d,availableCross:f,buckets:p}}#l(){let{isHorizontal:e,padding:n,dataMin:r,dataSpan:i,bucketCount:a,availableMain:o,availableCross:s,buckets:c}=this.#c(),l=o/a,u=this.#i(),d=this.#a(),f=Math.max(1,...c);return c.map((c,p)=>{let m=c/f,h=d===null?m*s:d*s,g=r+p/a*i,_=r+(p+1)/a*i;if(e){let e=n+p*l,r=p===a-1?Math.max(0,n+o-e):Math.max(0,l-u);return{count:c,valueMin:g,valueMax:_,relativeValue:m,x:e,y:n+s-h,width:r,height:h}}{let e=n+p*l,r=p===a-1?Math.max(0,n+o-e):Math.max(0,l-u);return{count:c,valueMin:g,valueMax:_,relativeValue:m,x:n,y:e,width:h,height:r}}})}#u(e){return this._coloredRangeMin===null||this._coloredRangeMax===null||e.valueMin<this._coloredRangeMax&&e.valueMax>this._coloredRangeMin}#d(e,n){let r=this.getBoundingClientRect(),i=e-r.left,a=n-r.top;return this.#l().findIndex(e=>i>=e.x&&i<=e.x+e.width&&a>=e.y&&a<=e.y+e.height)}#f(e,n){let{isHorizontal:r,padding:i,bucketCount:a,availableMain:o}=this.#c(),s=this.getBoundingClientRect(),c=e-s.left,l=n-s.top,u;return u=r?(c-i)/o:(l-i)/o,u=Math.max(0,Math.min(1,u)),Math.floor(u*a)}#p;#m;#h;#g;#_;#v;#y(){this.#v!==null&&(clearTimeout(this.#v),this.#v=null)}#b(e){this.#y(),this.#v=window.setTimeout(()=>{this.#v=null,e(),this.#b(e)},this.valueUpdateInterval)}#x(){this.#h!==null&&(clearTimeout(this.#h),this.#h=null),this.#g!==null&&(clearTimeout(this.#g),this.#g=null),this.#m&&(this.#m=!1,sE(this)),this.#p=null,this.#_=null}#S(){this.#y(),this.#x(),this._hoveredIndex=null,this._inlineOverlayText=null}#C(e,n,r){let i=this.getBoundingClientRect();return this.orientation===`horizontal`?{mainClient:i.left+e.x+e.width/2,crossClient:r-14}:{mainClient:i.top+e.y+e.height/2,crossClient:n+14}}#w(){if(this.#p===null||!this.#m||!this.#_)return;let e=this.#l()[this.#p];if(!e)return;let n=this.valueFormat(e.valueMin,e.valueMax,e.count);oE(this,n,this.#_.mainClient,this.#_.crossClient,this.orientation)}#T(e,n,r){if(e===this.#p)return;if(this.#p=e,this.#y(),e===null){this.#h!==null&&(clearTimeout(this.#h),this.#h=null),this.#m&&(this.#g=window.setTimeout(()=>{this.#g=null,this.#m=!1,this.#_=null,sE(this)},this.tooltipDelay));return}this.#g!==null&&(clearTimeout(this.#g),this.#g=null);let i=this.#l()[e];if(!i)return;let a=this.valueFormat(i.valueMin,i.valueMax,i.count),o=this.#C(i,n,r);if(this.#_=o,this.#m){oE(this,a,o.mainClient,o.crossClient,this.orientation),this.#b(()=>this.#w());return}this.#h!==null&&clearTimeout(this.#h),this.#h=window.setTimeout(()=>{this.#h=null,this.#m=!0,oE(this,a,o.mainClient,o.crossClient,this.orientation),this.#b(()=>this.#w())},this.tooltipDelay)}#E(e){let n=this.#l()[e];return n?this.valueFormat(n.valueMin,n.valueMax,n.count):null}#D(e){if(e!==this._hoveredIndex){if(this._hoveredIndex=e,this.#y(),e===null){this._inlineOverlayText=null;return}this._inlineOverlayText=this.#E(e),this.#b(()=>{this._hoveredIndex!==null&&(this._inlineOverlayText=this.#E(this._hoveredIndex))})}}#O;#k;#A;#j;render(){let{w:e,h:n,padding:r}=this.#c(),a=this.#l().map((e,n)=>{let r=this.#u(e)?``:`filter: grayscale(1)`;return s`
10400
10431
  <rect class="bar" x=${e.x} y=${e.y} width=${e.width} height=${e.height}
10401
10432
  style="--value: ${e.relativeValue}; ${r}"
10402
10433
  @click=${()=>this.#o(n,e.valueMin,e.valueMax,e.relativeValue)} />
@@ -10445,37 +10476,37 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10445
10476
  dominant-baseline: hanging;
10446
10477
  pointer-events: none;
10447
10478
  }
10448
- `}};E([d({attribute:`orientation`})],X.prototype,`orientation`,void 0),E([d({type:Number})],X.prototype,`resolution`,void 0),E([d({type:Number})],X.prototype,`min`,void 0),E([d({type:Number})],X.prototype,`max`,void 0),E([d({type:Number})],X.prototype,`capacity`,void 0),E([d({attribute:!1})],X.prototype,`title`,void 0),E([d({type:Boolean,reflect:!0})],X.prototype,`paused`,void 0),E([d({attribute:`value-tooltips`})],X.prototype,`valueTooltips`,void 0),E([d({type:Number,attribute:`tooltip-delay`})],X.prototype,`tooltipDelay`,void 0),E([d({type:Number,attribute:`value-update-interval`})],X.prototype,`valueUpdateInterval`,void 0),E([d({attribute:`interaction-mode`})],X.prototype,`interactionMode`,void 0),E([m()],X.prototype,`_width`,void 0),E([m()],X.prototype,`_height`,void 0),E([m()],X.prototype,`_hoveredIndex`,void 0),E([m()],X.prototype,`_inlineOverlayText`,void 0),E([m()],X.prototype,`_coloredRangeMin`,void 0),E([m()],X.prototype,`_coloredRangeMax`,void 0),E([m()],X.prototype,`_selectionStart`,void 0),E([m()],X.prototype,`_selectionEnd`,void 0),E([m()],X.prototype,`_isDragging`,void 0),E([m()],X.prototype,`_selectionOverlayText`,void 0),X=E([T(`ixfx-plot-histogram`)],X);function dE(e){if(e.length===0)return``;let n=`M ${e[0].x},${e[0].y}`;for(let r=1;r<e.length;r++)n+=` L ${e[r].x},${e[r].y}`;return n}function fE(e,n,r,i){return s`<path
10449
- d=${dE(e)}
10479
+ `}};E([d({attribute:`orientation`})],X.prototype,`orientation`,void 0),E([d({type:Number})],X.prototype,`resolution`,void 0),E([d({type:Number})],X.prototype,`min`,void 0),E([d({type:Number})],X.prototype,`max`,void 0),E([d({type:Number})],X.prototype,`capacity`,void 0),E([d({attribute:!1})],X.prototype,`title`,void 0),E([d({type:Boolean,reflect:!0})],X.prototype,`paused`,void 0),E([d({attribute:`value-tooltips`})],X.prototype,`valueTooltips`,void 0),E([d({type:Number,attribute:`tooltip-delay`})],X.prototype,`tooltipDelay`,void 0),E([d({type:Number,attribute:`value-update-interval`})],X.prototype,`valueUpdateInterval`,void 0),E([d({attribute:`interaction-mode`})],X.prototype,`interactionMode`,void 0),E([m()],X.prototype,`_width`,void 0),E([m()],X.prototype,`_height`,void 0),E([m()],X.prototype,`_hoveredIndex`,void 0),E([m()],X.prototype,`_inlineOverlayText`,void 0),E([m()],X.prototype,`_coloredRangeMin`,void 0),E([m()],X.prototype,`_coloredRangeMax`,void 0),E([m()],X.prototype,`_selectionStart`,void 0),E([m()],X.prototype,`_selectionEnd`,void 0),E([m()],X.prototype,`_isDragging`,void 0),E([m()],X.prototype,`_selectionOverlayText`,void 0),X=E([T(`ixfx-plot-histogram`)],X);function pE(e){if(e.length===0)return``;let n=`M ${e[0].x},${e[0].y}`;for(let r=1;r<e.length;r++)n+=` L ${e[r].x},${e[r].y}`;return n}function mE(e,n,r,i){return s`<path
10480
+ d=${pE(e)}
10450
10481
  fill="none"
10451
10482
  stroke=${n.fill}
10452
10483
  stroke-width=${r}
10453
10484
  opacity=${n.opacity}
10454
10485
  stroke-linecap=${i?`round`:`butt`}
10455
10486
  stroke-linejoin=${i?`round`:`miter`}
10456
- />`}function pE(e,n,r,i){if(e.length<2)return s``;let a=dE(e),o=i||n.fill,c=`${a} L ${e[e.length-1].x},${r} L ${e[0].x},${r} Z`;return s`<path d=${c} fill=${o} opacity=${n.opacity*.2} />`}function mE(e,n,r,i){return e.map((e,a)=>{let o=i===`size`?r*Math.max(.2,e.ageFraction):r;return s`<circle cx=${e.x} cy=${e.y} r=${o} fill=${n[a].fill} opacity=${n[a].opacity} />`})}function hE(e,n,r,i){return e.map((e,a)=>{let o=i===`size`?r*Math.max(.2,e.ageFraction):r;return s`<rect
10487
+ />`}function hE(e,n,r,i){if(e.length<2)return s``;let a=pE(e),o=i||n.fill,c=`${a} L ${e[e.length-1].x},${r} L ${e[0].x},${r} Z`;return s`<path d=${c} fill=${o} opacity=${n.opacity*.2} />`}function gE(e,n,r,i){return e.map((e,a)=>{let o=i===`size`?r*Math.max(.2,e.ageFraction):r;return s`<circle cx=${e.x} cy=${e.y} r=${o} fill=${n[a].fill} opacity=${n[a].opacity} />`})}function _E(e,n,r,i){return e.map((e,a)=>{let o=i===`size`?r*Math.max(.2,e.ageFraction):r;return s`<rect
10457
10488
  x=${e.x-o/2} y=${e.y-o/2}
10458
10489
  width=${o} height=${o}
10459
10490
  fill=${n[a].fill} opacity=${n[a].opacity}
10460
- />`})}function gE(e,n,r,i,a){return e.map((e,o)=>{let c=a===`size`?r*Math.max(.2,e.ageFraction):r;return s`<line
10491
+ />`})}function vE(e,n,r,i,a){return e.map((e,o)=>{let c=a===`size`?r*Math.max(.2,e.ageFraction):r;return s`<line
10461
10492
  x1=${e.x} y1=${i} x2=${e.x} y2=${e.y}
10462
10493
  stroke=${n[o].fill} stroke-width=${c} opacity=${n[o].opacity}
10463
- />`})}function _E(e,n,r,i,a){return e.map((e,o)=>{let c=a===`size`?i*Math.max(.2,e.ageFraction):i;return s`<line
10494
+ />`})}function yE(e,n,r,i,a){return e.map((e,o)=>{let c=a===`size`?i*Math.max(.2,e.ageFraction):i;return s`<line
10464
10495
  x1=${e.x-c/2} y1=${e.y} x2=${e.x+c/2} y2=${e.y}
10465
10496
  stroke=${n[o].fill} stroke-width=${r} opacity=${n[o].opacity}
10466
- />`})}function vE(e,n,r,i,a){return e.map((e,o)=>{let c=a===`size`?r*Math.max(.2,e.ageFraction):r;return s`<rect
10497
+ />`})}function bE(e,n,r,i,a){return e.map((e,o)=>{let c=a===`size`?r*Math.max(.2,e.ageFraction):r;return s`<rect
10467
10498
  x=${e.x-c/2} y=${e.y}
10468
10499
  width=${c} height=${Math.max(1,i-e.y)}
10469
10500
  fill=${n[o].fill} opacity=${n[o].opacity}
10470
- />`})}function yE(e,n,r,i,a){return e.map((e,o)=>{let c=a===`size`?r*Math.max(.2,e.ageFraction):r;return s`<rect
10501
+ />`})}function xE(e,n,r,i,a){return e.map((e,o)=>{let c=a===`size`?r*Math.max(.2,e.ageFraction):r;return s`<rect
10471
10502
  x=${e.x-c/2} y=${i}
10472
10503
  width=${c} height=${Math.max(1,e.y-i)}
10473
10504
  fill=${n[o].fill} opacity=${n[o].opacity}
10474
- />`})}function bE(e,n,r,i,a){return e.map((e,o)=>{let c=a===`size`?r*Math.max(.2,e.ageFraction):r;return s`<rect
10505
+ />`})}function SE(e,n,r,i,a){return e.map((e,o)=>{let c=a===`size`?r*Math.max(.2,e.ageFraction):r;return s`<rect
10475
10506
  x=${e.x-c/2} y=${Math.min(e.y,i)}
10476
10507
  width=${c} height=${Math.max(1,Math.abs(e.y-i))}
10477
10508
  fill=${n[o].fill} opacity=${n[o].opacity}
10478
- />`})}let xE=class extends n{constructor(...e){super(...e),this.drawStyle=`line-sharp`,this.ageStyle=`none`,this.title=``,this.precise=!1,this.tooltips=!0,this.capacity=100,this.rangeMin=NaN,this.rangeMax=NaN,this.persistentScale=!0,this.paused=!1,this.clickPauses=!1,this.shaded=!1,this.areaColor=``,this.colorMode=`fixed`,this.colorEasing=``,this.colorScale=``,this.colorValueMap=null,this._width=100,this._height=40,this.#e=new UT,this.#t=!1,this.#n=null,this.#r=null,this.valueFormat=e=>e?e.toFixed(2):``,this.#c=e=>{this.#n=e.clientX,this.#r=e.clientY,this.#o(e.clientX,e.clientY);let n=this.#a(e.clientX,this.getBoundingClientRect());this.dispatchEvent(new CustomEvent(`plot-pointer-move`,{detail:{clientX:e.clientX,clientY:e.clientY,index:n},bubbles:!0,composed:!0}))},this.#l=()=>{this.#n=null,this.#r=null,eE(this),this.dispatchEvent(new CustomEvent(`plot-pointer-leave`,{bubbles:!0,composed:!0}))},this.#u=e=>{this.clickPauses&&(this.paused=!this.paused);let n=this.#a(e.clientX,this.getBoundingClientRect());n<0||this.dispatchEvent(new CustomEvent(`plot-datapoint-click`,{detail:{value:this.#e.values[n],index:n},bubbles:!0,composed:!0}))}}#e;#t;#n;#r;#i(e){return e?e.trim().split(/[,\s;]+/).map(e=>Number.parseFloat(e)).filter(e=>!Number.isNaN(e)):[]}add(e,n=!1){this.#t=!0,this.#e.add(e),!this.paused&&(n||this.redraw())}redraw(){this.requestUpdate(),this.#s()}set(e,n=!1){this.#t=!0,this.#e.set(e),!this.paused&&(n||this.redraw())}clear(){let e=this.#e.clear();return this.requestUpdate(),e}firstUpdated(e){if(this._width=this.clientWidth||100,this._height=this.clientHeight||40,new ResizeObserver(e=>{let n=e[0];this._width=n.contentRect.width,this._height=n.contentRect.height}).observe(this),!this.#t){let e=this.#i(this.textContent??``);e.length>0&&this.#e.set(e)}}updated(e){if(e.has(`capacity`)||e.has(`persistentScale`)||e.has(`rangeMin`)||e.has(`rangeMax`)){let e=[...this.#e.values],n=!Number.isNaN(this.rangeMin)&&!Number.isNaN(this.rangeMax)?{min:this.rangeMin,max:this.rangeMax}:null;this.#e=new UT({capacityLimit:this.capacity,persistentScaling:this.persistentScale,fixedRange:n}),e.length>0&&this.#e.set(e)}}#a(e,n){let r=this.#e.values.length;if(r===0)return-1;let i=e-n.left;if(i<0||i>n.width)return-1;let a=n.height<20?0:Math.min(4,n.height*.05),o=n.width-a*2,s=Math.floor((i-a)/(o/r));return s>=0&&s<r?s:-1}#o(e,n){if(!this.tooltips)return;let r=this.getBoundingClientRect(),i=this.#a(e,r);if(i<0){eE(this);return}QT(this,e,n,this.valueFormat(this.#e.values[i]))}#s(){this.#n!==null&&this.#r!==null&&this.#o(this.#n,this.#r)}#c;#l;#u;#d(e,n,r,i,a,o){let s=e.length,c=s>0?a/s:a,l=e=>i+(e+.5)*c;return e.map((e,a)=>{let c=$r(cE(e,n,r)),u=s>1?a/(s-1):1;return{x:l(a),y:i+(1-c)*o,value:e,scaledValue:c,index:a,ageFraction:u}})}get series(){return this.#e}get values(){return this.#e.values}get dataLength(){return this.#e.values.length}getValueAt(e){return this.#e.values[e]}getIndexFromClientX(e){return this.#a(e,this.getBoundingClientRect())}#f(e,n,r,i,a,o,s,c){let l=n.at(-1)??{fill:`currentColor`,opacity:1},u=(this.drawStyle===`line-sharp`||this.drawStyle===`line-round`)&&this.shaded,d=this.areaColor||void 0;if(u)return[pE(e,l,o,d),this.drawStyle===`line-sharp`?fE(e,l,r,!1):fE(e,l,r,!0)];switch(this.drawStyle){case`line-sharp`:return[fE(e,l,r,!1)];case`line-round`:return[fE(e,l,r,!0)];case`circles`:return mE(e,n,i,this.ageStyle);case`squares`:return hE(e,n,i*2,this.ageStyle);case`vbar`:return gE(e,n,r,o,this.ageStyle);case`hbar`:return _E(e,n,r,a,this.ageStyle);case`hist-bottom`:return vE(e,n,a,o,this.ageStyle);case`hist-top`:return yE(e,n,a,s,this.ageStyle);case`hist-middle`:return bE(e,n,a,c,this.ageStyle);default:return[]}}render(){let{values:e,range:n}=this.#e,r=this._width,a=this._height,o=a<20?0:Math.min(4,a*.05),c=Math.max(1,r-o*2),l=Math.max(1,a-o*2),u=o+l,d=o,f=o+l/2,p=oE(r,a),m=sE(r,a,e.length),h=e.length>0?Math.max(1,c/e.length*.85):c,g=`var(--plot-text, var(--surface-2-text, #fff))`,_=e.length>0?this.#d(e,n.min,n.max,o,c,l):[],v=_.length>0?LT(this):``,y={mode:this.colorMode,palette:RT(this.colorScale),easingName:this.colorEasing,valueMap:this.colorValueMap},b=this.drawStyle!==`line-sharp`&&this.drawStyle!==`line-round`,x=_.map(e=>{let n=VT(e.scaledValue,v,y);return b?HT(n,e.ageFraction,this.ageStyle):n}),S=_.length>0?this.#f(_,x,p,m,h,u,d,f):[],ee=this.title?s`<text
10509
+ />`})}let CE=class extends n{constructor(...e){super(...e),this.drawStyle=`line-sharp`,this.ageStyle=`none`,this.title=``,this.precise=!1,this.tooltips=!0,this.capacity=100,this.rangeMin=NaN,this.rangeMax=NaN,this.persistentScale=!0,this.paused=!1,this.clickPauses=!1,this.shaded=!1,this.areaColor=``,this.colorMode=`fixed`,this.colorEasing=``,this.colorScale=``,this.colorValueMap=null,this._width=100,this._height=40,this.#e=new GT,this.#t=!1,this.#n=null,this.#r=null,this.valueFormat=e=>e?e.toFixed(2):``,this.#c=e=>{this.#n=e.clientX,this.#r=e.clientY,this.#o(e.clientX,e.clientY);let n=this.#a(e.clientX,this.getBoundingClientRect());this.dispatchEvent(new CustomEvent(`plot-pointer-move`,{detail:{clientX:e.clientX,clientY:e.clientY,index:n},bubbles:!0,composed:!0}))},this.#l=()=>{this.#n=null,this.#r=null,nE(this),this.dispatchEvent(new CustomEvent(`plot-pointer-leave`,{bubbles:!0,composed:!0}))},this.#u=e=>{this.clickPauses&&(this.paused=!this.paused);let n=this.#a(e.clientX,this.getBoundingClientRect());n<0||this.dispatchEvent(new CustomEvent(`plot-datapoint-click`,{detail:{value:this.#e.values[n],index:n},bubbles:!0,composed:!0}))}}#e;#t;#n;#r;#i(e){return e?e.trim().split(/[,\s;]+/).map(e=>Number.parseFloat(e)).filter(e=>!Number.isNaN(e)):[]}add(e,n=!1){this.#t=!0,this.#e.add(e),!this.paused&&(n||this.redraw())}redraw(){this.requestUpdate(),this.#s()}set(e,n=!1){this.#t=!0,this.#e.set(e),!this.paused&&(n||this.redraw())}clear(){let e=this.#e.clear();return this.requestUpdate(),e}firstUpdated(e){if(this._width=this.clientWidth||100,this._height=this.clientHeight||40,new ResizeObserver(e=>{let n=e[0];this._width=n.contentRect.width,this._height=n.contentRect.height}).observe(this),!this.#t){let e=this.#i(this.textContent??``);e.length>0&&this.#e.set(e)}}updated(e){if(e.has(`capacity`)||e.has(`persistentScale`)||e.has(`rangeMin`)||e.has(`rangeMax`)){let e=[...this.#e.values],n=!Number.isNaN(this.rangeMin)&&!Number.isNaN(this.rangeMax)?{min:this.rangeMin,max:this.rangeMax}:null;this.#e=new GT({capacityLimit:this.capacity,persistentScaling:this.persistentScale,fixedRange:n}),e.length>0&&this.#e.set(e)}}#a(e,n){let r=this.#e.values.length;if(r===0)return-1;let i=e-n.left;if(i<0||i>n.width)return-1;let a=n.height<20?0:Math.min(4,n.height*.05),o=n.width-a*2,s=Math.floor((i-a)/(o/r));return s>=0&&s<r?s:-1}#o(e,n){if(!this.tooltips)return;let r=this.getBoundingClientRect(),i=this.#a(e,r);if(i<0){nE(this);return}eE(this,e,n,this.valueFormat(this.#e.values[i]))}#s(){this.#n!==null&&this.#r!==null&&this.#o(this.#n,this.#r)}#c;#l;#u;#d(e,n,r,i,a,o){let s=e.length,c=s>0?a/s:a,l=e=>i+(e+.5)*c;return e.map((e,a)=>{let c=$r(uE(e,n,r)),u=s>1?a/(s-1):1;return{x:l(a),y:i+(1-c)*o,value:e,scaledValue:c,index:a,ageFraction:u}})}get series(){return this.#e}get values(){return this.#e.values}get dataLength(){return this.#e.values.length}getValueAt(e){return this.#e.values[e]}getIndexFromClientX(e){return this.#a(e,this.getBoundingClientRect())}#f(e,n,r,i,a,o,s,c){let l=n.at(-1)??{fill:`currentColor`,opacity:1},u=(this.drawStyle===`line-sharp`||this.drawStyle===`line-round`)&&this.shaded,d=this.areaColor||void 0;if(u)return[hE(e,l,o,d),this.drawStyle===`line-sharp`?mE(e,l,r,!1):mE(e,l,r,!0)];switch(this.drawStyle){case`line-sharp`:return[mE(e,l,r,!1)];case`line-round`:return[mE(e,l,r,!0)];case`circles`:return gE(e,n,i,this.ageStyle);case`squares`:return _E(e,n,i*2,this.ageStyle);case`vbar`:return vE(e,n,r,o,this.ageStyle);case`hbar`:return yE(e,n,r,a,this.ageStyle);case`hist-bottom`:return bE(e,n,a,o,this.ageStyle);case`hist-top`:return xE(e,n,a,s,this.ageStyle);case`hist-middle`:return SE(e,n,a,c,this.ageStyle);default:return[]}}render(){let{values:e,range:n}=this.#e,r=this._width,a=this._height,o=a<20?0:Math.min(4,a*.05),c=Math.max(1,r-o*2),l=Math.max(1,a-o*2),u=o+l,d=o,f=o+l/2,p=cE(r,a),m=lE(r,a,e.length),h=e.length>0?Math.max(1,c/e.length*.85):c,g=`var(--plot-text, var(--surface-2-text, #fff))`,_=e.length>0?this.#d(e,n.min,n.max,o,c,l):[],v=_.length>0?zT(this):``,y={mode:this.colorMode,palette:BT(this.colorScale),easingName:this.colorEasing,valueMap:this.colorValueMap},b=this.drawStyle!==`line-sharp`&&this.drawStyle!==`line-round`,x=_.map(e=>{let n=UT(e.scaledValue,v,y);return b?WT(n,e.ageFraction,this.ageStyle):n}),S=_.length>0?this.#f(_,x,p,m,h,u,d,f):[],ee=this.title?s`<text
10479
10510
  x=${o+2} y=${d+Math.min(10,a*.6)}
10480
10511
  class="overlay-text"
10481
10512
  fill=${g}
@@ -10521,7 +10552,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10521
10552
  dominant-baseline: hanging;
10522
10553
  pointer-events: none;
10523
10554
  }
10524
- `}};E([d({attribute:`draw-style`})],xE.prototype,`drawStyle`,void 0),E([d({attribute:`age-style`})],xE.prototype,`ageStyle`,void 0),E([d()],xE.prototype,`title`,void 0),E([d({type:Boolean})],xE.prototype,`precise`,void 0),E([d({type:Boolean})],xE.prototype,`tooltips`,void 0),E([d({type:Number})],xE.prototype,`capacity`,void 0),E([d({type:Number})],xE.prototype,`rangeMin`,void 0),E([d({type:Number})],xE.prototype,`rangeMax`,void 0),E([d({type:Boolean,attribute:`persistent-scale`})],xE.prototype,`persistentScale`,void 0),E([d({type:Boolean,reflect:!0})],xE.prototype,`paused`,void 0),E([d({type:Boolean,attribute:`click-pauses`})],xE.prototype,`clickPauses`,void 0),E([d({type:Boolean,attribute:`shaded`})],xE.prototype,`shaded`,void 0),E([d({attribute:`area-color`})],xE.prototype,`areaColor`,void 0),E([d({attribute:`color-mode`})],xE.prototype,`colorMode`,void 0),E([d({attribute:`color-easing`})],xE.prototype,`colorEasing`,void 0),E([d({attribute:`color-scale`})],xE.prototype,`colorScale`,void 0),E([m()],xE.prototype,`_width`,void 0),E([m()],xE.prototype,`_height`,void 0),xE=E([T(`ixfx-plot-single-axis`)],xE);let SE=class extends n{constructor(...e){super(...e),this.drawStyle=`circles`,this.ageStyle=`none`,this.title=``,this.precise=!1,this.tooltips=!0,this.capacity=100,this.persistentScale=!0,this.paused=!1,this.clickPauses=!1,this.colorMode=`fixed`,this.colorEasing=``,this.colorScale=``,this.colorValueMap=null,this._width=100,this._height=100,this.#e=new UT({capacityLimit:100,persistentScaling:!0}),this.#t=new UT({capacityLimit:100,persistentScaling:!0}),this.valueFormat=(e,n)=>`${e.toFixed(2)}, ${n.toFixed(2)}`,this.#a=[],this.#o=null,this.#s=null,this.#u=e=>{this.#o=e.clientX,this.#s=e.clientY,this.#c(e.clientX,e.clientY)},this.#d=()=>{this.#o=null,this.#s=null,eE(this)},this.#f=e=>{this.clickPauses&&(this.paused=!this.paused);let n=e.currentTarget.getBoundingClientRect(),r=this.#i(e.clientX,e.clientY,this.#a,n);r&&this.dispatchEvent(new CustomEvent(`plot-datapoint-click`,{detail:{x:r.xVal,y:r.yVal,index:r.index},bubbles:!0,composed:!0}))}}#e;#t;add(e,n){this.#e.add(e),this.#t.add(n),!this.paused&&(this.requestUpdate(),this.#l())}setXY(e,n){this.#e.set(e),this.#t.set(n),!this.paused&&(this.requestUpdate(),this.#l())}clear(){this.#e.clear(),this.#t.clear(),this.requestUpdate()}firstUpdated(e){this._width=this.clientWidth||100,this._height=this.clientHeight||100,new ResizeObserver(e=>{let n=e[0];this._width=n.contentRect.width,this._height=n.contentRect.height}).observe(this)}updated(e){if(e.has(`capacity`)||e.has(`persistentScale`)){let e={capacityLimit:this.capacity,persistentScaling:this.persistentScale},n=[...this.#e.values],r=[...this.#t.values];this.#e=new UT(e),this.#t=new UT(e),n.length>0&&(this.#e.set(n),this.#t.set(r))}}#n(e,n,r){let i=this.#e.values,a=this.#t.values,o=Math.min(i.length,a.length);if(o===0)return[];let{min:s,max:c}=this.#e.range,{min:l,max:u}=this.#t.range;return Array.from({length:o},(d,f)=>({x:e+cE(i[f],s,c)*n,y:e+(1-cE(a[f],l,u))*r,xVal:i[f],yVal:a[f],index:f,ageFraction:o>1?f/(o-1):1}))}#r(e,n){let r={mode:this.colorMode,palette:RT(this.colorScale),easingName:this.colorEasing,valueMap:this.colorValueMap};return e.map(e=>HT(VT(e.ageFraction,n,r),e.ageFraction,this.ageStyle))}#i(e,n,r,i){let a=e-i.left,o=n-i.top,s=null,c=1/0;for(let e of r){let n=e.x-a,r=e.y-o,i=n*n+r*r;i<c&&(c=i,s=e)}return s&&Math.sqrt(c)<30?s:null}#a;#o;#s;#c(e,n){if(!this.tooltips)return;let r=this.getBoundingClientRect(),i=this.#i(e,n,this.#a,r);if(!i){eE(this);return}QT(this,e,n,this.valueFormat(i.xVal,i.yVal))}#l(){this.#o!==null&&this.#s!==null&&this.#c(this.#o,this.#s)}#u;#d;#f;render(){let e=this._width,n=this._height,r=Math.min(6,Math.min(e,n)*.06),a=Math.max(1,e-r*2),o=Math.max(1,n-r*2),c=this.#n(r,a,o);this.#a=c;let l=c.length>0?LT(this):``,u=this.#r(c,l),d=sE(e,n,c.length),f=`var(--plot-text, var(--surface-2-text, #fff))`,p=c.map((e,n)=>{let r=u[n],i=this.ageStyle===`size`?Math.max(.2,e.ageFraction):1;if(this.drawStyle===`circles`){let n=d*i;return s`<circle cx=${e.x} cy=${e.y} r=${n} fill=${r.fill} opacity=${r.opacity} />`}let a=d*2*i;return s`<rect x=${e.x-a/2} y=${e.y-a/2} width=${a} height=${a} fill=${r.fill} opacity=${r.opacity} />`}),m=this.title?s`<text
10555
+ `}};E([d({attribute:`draw-style`})],CE.prototype,`drawStyle`,void 0),E([d({attribute:`age-style`})],CE.prototype,`ageStyle`,void 0),E([d()],CE.prototype,`title`,void 0),E([d({type:Boolean})],CE.prototype,`precise`,void 0),E([d({type:Boolean})],CE.prototype,`tooltips`,void 0),E([d({type:Number})],CE.prototype,`capacity`,void 0),E([d({type:Number})],CE.prototype,`rangeMin`,void 0),E([d({type:Number})],CE.prototype,`rangeMax`,void 0),E([d({type:Boolean,attribute:`persistent-scale`})],CE.prototype,`persistentScale`,void 0),E([d({type:Boolean,reflect:!0})],CE.prototype,`paused`,void 0),E([d({type:Boolean,attribute:`click-pauses`})],CE.prototype,`clickPauses`,void 0),E([d({type:Boolean,attribute:`shaded`})],CE.prototype,`shaded`,void 0),E([d({attribute:`area-color`})],CE.prototype,`areaColor`,void 0),E([d({attribute:`color-mode`})],CE.prototype,`colorMode`,void 0),E([d({attribute:`color-easing`})],CE.prototype,`colorEasing`,void 0),E([d({attribute:`color-scale`})],CE.prototype,`colorScale`,void 0),E([m()],CE.prototype,`_width`,void 0),E([m()],CE.prototype,`_height`,void 0),CE=E([T(`ixfx-plot-single-axis`)],CE);let wE=class extends n{constructor(...e){super(...e),this.drawStyle=`circles`,this.ageStyle=`none`,this.title=``,this.precise=!1,this.tooltips=!0,this.capacity=100,this.persistentScale=!0,this.paused=!1,this.clickPauses=!1,this.colorMode=`fixed`,this.colorEasing=``,this.colorScale=``,this.colorValueMap=null,this._width=100,this._height=100,this.#e=new GT({capacityLimit:100,persistentScaling:!0}),this.#t=new GT({capacityLimit:100,persistentScaling:!0}),this.valueFormat=(e,n)=>`${e.toFixed(2)}, ${n.toFixed(2)}`,this.#a=[],this.#o=null,this.#s=null,this.#u=e=>{this.#o=e.clientX,this.#s=e.clientY,this.#c(e.clientX,e.clientY)},this.#d=()=>{this.#o=null,this.#s=null,nE(this)},this.#f=e=>{this.clickPauses&&(this.paused=!this.paused);let n=e.currentTarget.getBoundingClientRect(),r=this.#i(e.clientX,e.clientY,this.#a,n);r&&this.dispatchEvent(new CustomEvent(`plot-datapoint-click`,{detail:{x:r.xVal,y:r.yVal,index:r.index},bubbles:!0,composed:!0}))}}#e;#t;add(e,n){this.#e.add(e),this.#t.add(n),!this.paused&&(this.requestUpdate(),this.#l())}setXY(e,n){this.#e.set(e),this.#t.set(n),!this.paused&&(this.requestUpdate(),this.#l())}clear(){this.#e.clear(),this.#t.clear(),this.requestUpdate()}firstUpdated(e){this._width=this.clientWidth||100,this._height=this.clientHeight||100,new ResizeObserver(e=>{let n=e[0];this._width=n.contentRect.width,this._height=n.contentRect.height}).observe(this)}updated(e){if(e.has(`capacity`)||e.has(`persistentScale`)){let e={capacityLimit:this.capacity,persistentScaling:this.persistentScale},n=[...this.#e.values],r=[...this.#t.values];this.#e=new GT(e),this.#t=new GT(e),n.length>0&&(this.#e.set(n),this.#t.set(r))}}#n(e,n,r){let i=this.#e.values,a=this.#t.values,o=Math.min(i.length,a.length);if(o===0)return[];let{min:s,max:c}=this.#e.range,{min:l,max:u}=this.#t.range;return Array.from({length:o},(d,f)=>({x:e+uE(i[f],s,c)*n,y:e+(1-uE(a[f],l,u))*r,xVal:i[f],yVal:a[f],index:f,ageFraction:o>1?f/(o-1):1}))}#r(e,n){let r={mode:this.colorMode,palette:BT(this.colorScale),easingName:this.colorEasing,valueMap:this.colorValueMap};return e.map(e=>WT(UT(e.ageFraction,n,r),e.ageFraction,this.ageStyle))}#i(e,n,r,i){let a=e-i.left,o=n-i.top,s=null,c=1/0;for(let e of r){let n=e.x-a,r=e.y-o,i=n*n+r*r;i<c&&(c=i,s=e)}return s&&Math.sqrt(c)<30?s:null}#a;#o;#s;#c(e,n){if(!this.tooltips)return;let r=this.getBoundingClientRect(),i=this.#i(e,n,this.#a,r);if(!i){nE(this);return}eE(this,e,n,this.valueFormat(i.xVal,i.yVal))}#l(){this.#o!==null&&this.#s!==null&&this.#c(this.#o,this.#s)}#u;#d;#f;render(){let e=this._width,n=this._height,r=Math.min(6,Math.min(e,n)*.06),a=Math.max(1,e-r*2),o=Math.max(1,n-r*2),c=this.#n(r,a,o);this.#a=c;let l=c.length>0?zT(this):``,u=this.#r(c,l),d=lE(e,n,c.length),f=`var(--plot-text, var(--surface-2-text, #fff))`,p=c.map((e,n)=>{let r=u[n],i=this.ageStyle===`size`?Math.max(.2,e.ageFraction):1;if(this.drawStyle===`circles`){let n=d*i;return s`<circle cx=${e.x} cy=${e.y} r=${n} fill=${r.fill} opacity=${r.opacity} />`}let a=d*2*i;return s`<rect x=${e.x-a/2} y=${e.y-a/2} width=${a} height=${a} fill=${r.fill} opacity=${r.opacity} />`}),m=this.title?s`<text
10525
10556
  x=${r+2} y=${r+2}
10526
10557
  class="overlay-text"
10527
10558
  fill=${f}
@@ -10566,7 +10597,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10566
10597
  dominant-baseline: hanging;
10567
10598
  pointer-events: none;
10568
10599
  }
10569
- `}};E([d({attribute:`draw-style`})],SE.prototype,`drawStyle`,void 0),E([d({attribute:`age-style`})],SE.prototype,`ageStyle`,void 0),E([d()],SE.prototype,`title`,void 0),E([d({type:Boolean})],SE.prototype,`precise`,void 0),E([d({type:Boolean})],SE.prototype,`tooltips`,void 0),E([d({type:Number})],SE.prototype,`capacity`,void 0),E([d({type:Boolean,attribute:`persistent-scale`})],SE.prototype,`persistentScale`,void 0),E([d({type:Boolean,reflect:!0})],SE.prototype,`paused`,void 0),E([d({type:Boolean,attribute:`click-pauses`})],SE.prototype,`clickPauses`,void 0),E([d({attribute:`color-mode`})],SE.prototype,`colorMode`,void 0),E([d({attribute:`color-easing`})],SE.prototype,`colorEasing`,void 0),E([d({attribute:`color-scale`})],SE.prototype,`colorScale`,void 0),E([m()],SE.prototype,`_width`,void 0),E([m()],SE.prototype,`_height`,void 0),SE=E([T(`ixfx-plot-xy-axis`)],SE);const CE=Math.PI/180,wE=180/Math.PI;function TE(e,n){let r=n*50;return{x:50+Math.cos(e)*r,y:50+Math.sin(e)*r}}function EE(e,n){let r=e-50,i=n-50,a=Math.sqrt(r*r+i*i),o=Math.min(1,a/50);return{angleRad:(Math.atan2(i,r)%(2*Math.PI)+2*Math.PI)%(2*Math.PI),radius:o}}const DE=e=>Math.max(0,Math.min(1,e));function OE(e,n,r,i){if(r<=0||!i)return e;let a=360/r,o=(e%360+360)%360,s=Math.round(o/a)*a,c=o%a;if(Math.abs(c)<1e-4||Math.abs(a-c)<1e-4){let r=e-n;return r>180&&(r-=360),r<-180&&(r+=360),(s+(r>=0?1:-1)*a+360)%360}return s}function kE(e,n,r,i){if(r<=0||!i)return e;let a=1/r,o=Math.round(e/a)*a,s=e%a;return Math.abs(s)<1e-4||Math.abs(a-s)<1e-4?Math.max(0,Math.min(1,o+(e>=n?1:-1)*a)):o}function AE(e,n){if(!n||n<=1)return e;let r=360/n,i=(e%360+360)%360;return Math.round(i/r)*r}function jE(e,n){if(!n||n<=1)return e;let r=1/n;return Math.round(e/r)*r}let ME=class extends Oy(n){constructor(...e){super(...e),this.angle=0,this.radius=.5,this.rings=0,this.rays=0,this.showRay=!1,this.showOrigin=!1,this.hideCursor=!1,this.snapValue=!1,this.disabled=!1,this._dragging=!1,this._dragStartAngle=0,this._dragStartRadius=0,this._pressedKeys=new Set,this._prevAngle=0,this._prevRadius=0,this._onPointerDown=e=>{e.preventDefault(),this.renderRoot.querySelector(`svg`)?.focus();let n=this.renderRoot.querySelector(`.polar-pad-area`);n&&n.setPointerCapture(e.pointerId),this._dragging=!0,this._dragStartAngle=this.angle,this._dragStartRadius=this.radius,this.setAttribute(`dragging`,``),this._updateFromPointer(e),globalThis.addEventListener(`pointermove`,this._onPointerMove),globalThis.addEventListener(`pointerup`,this._onPointerUp)},this._onPointerMove=e=>{this._dragging&&(e.preventDefault(),this._updateFromPointer(e))},this._onPointerUp=()=>{let e=this.angle!==this._dragStartAngle||this.radius!==this._dragStartRadius;this._dragging=!1,this.removeAttribute(`dragging`),globalThis.removeEventListener(`pointermove`,this._onPointerMove),globalThis.removeEventListener(`pointerup`,this._onPointerUp),e&&this.dispatchEvent(new CustomEvent(`change`,{detail:{angle:this.angle,radius:this.radius},bubbles:!0,composed:!0}))},this._onKeyDown=e=>{if(!this.disabled){if([`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`].includes(e.key))e.preventDefault(),this._pressedKeys.add(e.key),this._handleKeyboardMove(e.shiftKey);else if(e.key===`Home`||e.key===`End`){e.preventDefault();let n=e.key===`Home`?0:1;n!==this.radius&&(this._prevRadius=this.radius,this.radius=n,this.dispatchEvent(new CustomEvent(`input`,{detail:{angle:this.angle,radius:this.radius},bubbles:!0,composed:!0})))}}},this._onKeyUp=e=>{this._pressedKeys.delete(e.key)},this._handleKeyboardMove=e=>{let n=this.stopsAngle??this.stops,r=this.stopsRadius??this.stops,i=Dy(360,n,this.stepAngle,e),a=Dy(1,r,this.stepRadius,e);this._prevAngle=this.angle,this._prevRadius=this.radius;let o=this.angle,s=this.radius;this._pressedKeys.has(`ArrowLeft`)&&(o-=i),this._pressedKeys.has(`ArrowRight`)&&(o+=i),this._pressedKeys.has(`ArrowUp`)&&(s=Math.min(1,s+a)),this._pressedKeys.has(`ArrowDown`)&&(s=Math.max(0,s-a)),o=(o%360+360)%360;let c=OE(o,this._prevAngle,this.rays,this.snapValue),l=kE(s,this._prevRadius,this.rings,this.snapValue);c=AE(c,n),l=jE(l,r),(c!==this.angle||l!==this.radius)&&(this.angle=c,this.radius=l,this.dispatchEvent(new CustomEvent(`input`,{detail:{angle:this.angle,radius:this.radius},bubbles:!0,composed:!0})))},this._uid=Math.random().toString(36).slice(2,8)}static{this.styles=[sn,w,r`
10600
+ `}};E([d({attribute:`draw-style`})],wE.prototype,`drawStyle`,void 0),E([d({attribute:`age-style`})],wE.prototype,`ageStyle`,void 0),E([d()],wE.prototype,`title`,void 0),E([d({type:Boolean})],wE.prototype,`precise`,void 0),E([d({type:Boolean})],wE.prototype,`tooltips`,void 0),E([d({type:Number})],wE.prototype,`capacity`,void 0),E([d({type:Boolean,attribute:`persistent-scale`})],wE.prototype,`persistentScale`,void 0),E([d({type:Boolean,reflect:!0})],wE.prototype,`paused`,void 0),E([d({type:Boolean,attribute:`click-pauses`})],wE.prototype,`clickPauses`,void 0),E([d({attribute:`color-mode`})],wE.prototype,`colorMode`,void 0),E([d({attribute:`color-easing`})],wE.prototype,`colorEasing`,void 0),E([d({attribute:`color-scale`})],wE.prototype,`colorScale`,void 0),E([m()],wE.prototype,`_width`,void 0),E([m()],wE.prototype,`_height`,void 0),wE=E([T(`ixfx-plot-xy-axis`)],wE);const TE=Math.PI/180,EE=180/Math.PI;function DE(e,n){let r=n*50;return{x:50+Math.cos(e)*r,y:50+Math.sin(e)*r}}function OE(e,n){let r=e-50,i=n-50,a=Math.sqrt(r*r+i*i),o=Math.min(1,a/50);return{angleRad:(Math.atan2(i,r)%(2*Math.PI)+2*Math.PI)%(2*Math.PI),radius:o}}const kE=e=>Math.max(0,Math.min(1,e));function AE(e,n,r,i){if(r<=0||!i)return e;let a=360/r,o=(e%360+360)%360,s=Math.round(o/a)*a,c=o%a;if(Math.abs(c)<1e-4||Math.abs(a-c)<1e-4){let r=e-n;return r>180&&(r-=360),r<-180&&(r+=360),(s+(r>=0?1:-1)*a+360)%360}return s}function jE(e,n,r,i){if(r<=0||!i)return e;let a=1/r,o=Math.round(e/a)*a,s=e%a;return Math.abs(s)<1e-4||Math.abs(a-s)<1e-4?Math.max(0,Math.min(1,o+(e>=n?1:-1)*a)):o}function ME(e,n){if(!n||n<=1)return e;let r=360/n,i=(e%360+360)%360;return Math.round(i/r)*r}function NE(e,n){if(!n||n<=1)return e;let r=1/n;return Math.round(e/r)*r}let PE=class extends Oy(n){constructor(...e){super(...e),this.angle=0,this.radius=.5,this.rings=0,this.rays=0,this.showRay=!1,this.showOrigin=!1,this.hideCursor=!1,this.snapValue=!1,this.disabled=!1,this._dragging=!1,this._dragStartAngle=0,this._dragStartRadius=0,this._pressedKeys=new Set,this._prevAngle=0,this._prevRadius=0,this._onPointerDown=e=>{e.preventDefault(),this.renderRoot.querySelector(`svg`)?.focus();let n=this.renderRoot.querySelector(`.polar-pad-area`);n&&n.setPointerCapture(e.pointerId),this._dragging=!0,this._dragStartAngle=this.angle,this._dragStartRadius=this.radius,this.setAttribute(`dragging`,``),this._updateFromPointer(e),globalThis.addEventListener(`pointermove`,this._onPointerMove),globalThis.addEventListener(`pointerup`,this._onPointerUp)},this._onPointerMove=e=>{this._dragging&&(e.preventDefault(),this._updateFromPointer(e))},this._onPointerUp=()=>{let e=this.angle!==this._dragStartAngle||this.radius!==this._dragStartRadius;this._dragging=!1,this.removeAttribute(`dragging`),globalThis.removeEventListener(`pointermove`,this._onPointerMove),globalThis.removeEventListener(`pointerup`,this._onPointerUp),e&&this.dispatchEvent(new CustomEvent(`change`,{detail:{angle:this.angle,radius:this.radius},bubbles:!0,composed:!0}))},this._onKeyDown=e=>{if(!this.disabled){if([`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`].includes(e.key))e.preventDefault(),this._pressedKeys.add(e.key),this._handleKeyboardMove(e.shiftKey);else if(e.key===`Home`||e.key===`End`){e.preventDefault();let n=e.key===`Home`?0:1;n!==this.radius&&(this._prevRadius=this.radius,this.radius=n,this.dispatchEvent(new CustomEvent(`input`,{detail:{angle:this.angle,radius:this.radius},bubbles:!0,composed:!0})))}}},this._onKeyUp=e=>{this._pressedKeys.delete(e.key)},this._handleKeyboardMove=e=>{let n=this.stopsAngle??this.stops,r=this.stopsRadius??this.stops,i=Dy(360,n,this.stepAngle,e),a=Dy(1,r,this.stepRadius,e);this._prevAngle=this.angle,this._prevRadius=this.radius;let o=this.angle,s=this.radius;this._pressedKeys.has(`ArrowLeft`)&&(o-=i),this._pressedKeys.has(`ArrowRight`)&&(o+=i),this._pressedKeys.has(`ArrowUp`)&&(s=Math.min(1,s+a)),this._pressedKeys.has(`ArrowDown`)&&(s=Math.max(0,s-a)),o=(o%360+360)%360;let c=AE(o,this._prevAngle,this.rays,this.snapValue),l=jE(s,this._prevRadius,this.rings,this.snapValue);c=ME(c,n),l=NE(l,r),(c!==this.angle||l!==this.radius)&&(this.angle=c,this.radius=l,this.dispatchEvent(new CustomEvent(`input`,{detail:{angle:this.angle,radius:this.radius},bubbles:!0,composed:!0})))},this._uid=Math.random().toString(36).slice(2,8)}static{this.styles=[sn,w,r`
10570
10601
  :host {
10571
10602
  display: block;
10572
10603
  width: 200px;
@@ -10699,7 +10730,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10699
10730
  stroke: var(--accent);
10700
10731
  stroke-width: 3;
10701
10732
  }
10702
- `]}_updateFromPointer(e){let n=this.renderRoot.querySelector(`.polar-pad-area`);if(!n)return;let r=n.getBoundingClientRect(),i=Math.min(r.width,r.height),{angleRad:a,radius:o}=EE((e.clientX-r.left)/i*100,(e.clientY-r.top)/i*100),s=a*wE,c=DE(o);this._prevAngle=this.angle,this._prevRadius=this.radius;let l=OE(s,this._prevAngle,this.rays,this.snapValue),u=kE(c,this._prevRadius,this.rings,this.snapValue),d=this.stopsAngle??this.stops,f=this.stopsRadius??this.stops;this.angle=AE(l,d),this.radius=jE(u,f),this._prevAngle=s,this._prevRadius=c,this.dispatchEvent(new CustomEvent(`input`,{detail:{angle:this.angle,radius:this.radius},bubbles:!0,composed:!0}))}_stepRadiusByDelta(e,n){let r=this.stopsRadius??this.stops,i=Dy(1,r,this.stepRadius,n);this._prevRadius=this.radius;let a=jE(kE(e===1?Math.min(1,this.radius+i):Math.max(0,this.radius-i),this._prevRadius,this.rings,this.snapValue),r);a!==this.radius&&(this.radius=a,this.dispatchEvent(new CustomEvent(`input`,{detail:{angle:this.angle,radius:this.radius},bubbles:!0,composed:!0})))}_applyWheelDelta(e,n){this._stepRadiusByDelta(e,n.shiftKey)}_setCssVars(){this.style.setProperty(`--angle-deg`,`${this.angle}`),this.style.setProperty(`--angle-rad`,`${this.angle*CE}`),this.style.setProperty(`--radius-pct`,`${DE(this.radius)*100}`)}updated(e){super.updated(e),this._setCssVars()}disconnectedCallback(){super.disconnectedCallback(),this._onPointerUp(),this._pressedKeys.clear()}_renderRings(){if(this.rings<=0)return``;let e=[];for(let n=1;n<=this.rings;n++){let r=n/this.rings*50;e.push(s`<circle class="ring" cx="50" cy="50" r="${r}" />`)}return e}_renderSpokes(){if(this.rays<=0)return``;let e=[];for(let n=0;n<this.rays;n++){let r=n/this.rays*2*Math.PI,i=Math.cos(r),a=Math.sin(r),o=50+i*50,c=50+a*50,l=50-i*50,u=50-a*50;e.push(s`<line class="spoke" x1="${o}" y1="${c}" x2="${l}" y2="${u}" />`)}return e}_renderRay(e,n){return this.showRay?s`<line class="ray" x1="50" y1="50" x2="${e}" y2="${n}" />`:``}_renderOrigin(){return this.showOrigin?s`<circle class="origin-dot" cx="50" cy="50" r="3" style="r: calc(var(--origin-size) / 2)" />`:``}render(){let{x:e,y:n}=TE(this.angle*CE,DE(this.radius));return i`
10733
+ `]}_updateFromPointer(e){let n=this.renderRoot.querySelector(`.polar-pad-area`);if(!n)return;let r=n.getBoundingClientRect(),i=Math.min(r.width,r.height),{angleRad:a,radius:o}=OE((e.clientX-r.left)/i*100,(e.clientY-r.top)/i*100),s=a*EE,c=kE(o);this._prevAngle=this.angle,this._prevRadius=this.radius;let l=AE(s,this._prevAngle,this.rays,this.snapValue),u=jE(c,this._prevRadius,this.rings,this.snapValue),d=this.stopsAngle??this.stops,f=this.stopsRadius??this.stops;this.angle=ME(l,d),this.radius=NE(u,f),this._prevAngle=s,this._prevRadius=c,this.dispatchEvent(new CustomEvent(`input`,{detail:{angle:this.angle,radius:this.radius},bubbles:!0,composed:!0}))}_stepRadiusByDelta(e,n){let r=this.stopsRadius??this.stops,i=Dy(1,r,this.stepRadius,n);this._prevRadius=this.radius;let a=NE(jE(e===1?Math.min(1,this.radius+i):Math.max(0,this.radius-i),this._prevRadius,this.rings,this.snapValue),r);a!==this.radius&&(this.radius=a,this.dispatchEvent(new CustomEvent(`input`,{detail:{angle:this.angle,radius:this.radius},bubbles:!0,composed:!0})))}_applyWheelDelta(e,n){this._stepRadiusByDelta(e,n.shiftKey)}_setCssVars(){this.style.setProperty(`--angle-deg`,`${this.angle}`),this.style.setProperty(`--angle-rad`,`${this.angle*TE}`),this.style.setProperty(`--radius-pct`,`${kE(this.radius)*100}`)}updated(e){super.updated(e),this._setCssVars()}disconnectedCallback(){super.disconnectedCallback(),this._onPointerUp(),this._pressedKeys.clear()}_renderRings(){if(this.rings<=0)return``;let e=[];for(let n=1;n<=this.rings;n++){let r=n/this.rings*50;e.push(s`<circle class="ring" cx="50" cy="50" r="${r}" />`)}return e}_renderSpokes(){if(this.rays<=0)return``;let e=[];for(let n=0;n<this.rays;n++){let r=n/this.rays*2*Math.PI,i=Math.cos(r),a=Math.sin(r),o=50+i*50,c=50+a*50,l=50-i*50,u=50-a*50;e.push(s`<line class="spoke" x1="${o}" y1="${c}" x2="${l}" y2="${u}" />`)}return e}_renderRay(e,n){return this.showRay?s`<line class="ray" x1="50" y1="50" x2="${e}" y2="${n}" />`:``}_renderOrigin(){return this.showOrigin?s`<circle class="origin-dot" cx="50" cy="50" r="3" style="r: calc(var(--origin-size) / 2)" />`:``}render(){let{x:e,y:n}=DE(this.angle*TE,kE(this.radius));return i`
10703
10734
  <div class="polar-pad-area"
10704
10735
  @pointerdown=${this._onPointerDown}
10705
10736
  @keydown=${this._onKeyDown}
@@ -10738,7 +10769,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10738
10769
  />
10739
10770
  </svg>
10740
10771
  </div>
10741
- `}};E([d({type:Number})],ME.prototype,`angle`,void 0),E([d({type:Number})],ME.prototype,`radius`,void 0),E([d({type:Number})],ME.prototype,`rings`,void 0),E([d({type:Number})],ME.prototype,`rays`,void 0),E([d({type:Boolean,reflect:!0,attribute:`show-ray`})],ME.prototype,`showRay`,void 0),E([d({type:Boolean,reflect:!0,attribute:`show-origin`})],ME.prototype,`showOrigin`,void 0),E([d({type:Boolean,reflect:!0,attribute:`hide-cursor`})],ME.prototype,`hideCursor`,void 0),E([d({type:Boolean,attribute:`snap-value`,reflect:!0})],ME.prototype,`snapValue`,void 0),E([d({type:Boolean,reflect:!0})],ME.prototype,`disabled`,void 0),E([d({type:Number})],ME.prototype,`stops`,void 0),E([d({type:Number,attribute:`stops-angle`})],ME.prototype,`stopsAngle`,void 0),E([d({type:Number,attribute:`stops-radius`})],ME.prototype,`stopsRadius`,void 0),E([d({type:Number,attribute:`step-angle`})],ME.prototype,`stepAngle`,void 0),E([d({type:Number,attribute:`step-radius`})],ME.prototype,`stepRadius`,void 0),ME=E([T(`ixfx-polar-pad`)],ME);const NE=r`
10772
+ `}};E([d({type:Number})],PE.prototype,`angle`,void 0),E([d({type:Number})],PE.prototype,`radius`,void 0),E([d({type:Number})],PE.prototype,`rings`,void 0),E([d({type:Number})],PE.prototype,`rays`,void 0),E([d({type:Boolean,reflect:!0,attribute:`show-ray`})],PE.prototype,`showRay`,void 0),E([d({type:Boolean,reflect:!0,attribute:`show-origin`})],PE.prototype,`showOrigin`,void 0),E([d({type:Boolean,reflect:!0,attribute:`hide-cursor`})],PE.prototype,`hideCursor`,void 0),E([d({type:Boolean,attribute:`snap-value`,reflect:!0})],PE.prototype,`snapValue`,void 0),E([d({type:Boolean,reflect:!0})],PE.prototype,`disabled`,void 0),E([d({type:Number})],PE.prototype,`stops`,void 0),E([d({type:Number,attribute:`stops-angle`})],PE.prototype,`stopsAngle`,void 0),E([d({type:Number,attribute:`stops-radius`})],PE.prototype,`stopsRadius`,void 0),E([d({type:Number,attribute:`step-angle`})],PE.prototype,`stepAngle`,void 0),E([d({type:Number,attribute:`step-radius`})],PE.prototype,`stepRadius`,void 0),PE=E([T(`ixfx-polar-pad`)],PE);const FE=r`
10742
10773
 
10743
10774
  output.tooltip {
10744
10775
  user-select: none;
@@ -10835,7 +10866,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10835
10866
  100% calc(50% + var(--b)/2));
10836
10867
  }
10837
10868
  }
10838
- `;function PE(e,n,r){return r===n?0:(e-n)/(r-n)}let FE=class extends Oy(n){constructor(...e){super(...e),this.min=0,this.max=1,this.value=0,this.step=.01,this.orientation=`horizontal`,this.swipeable=!1,this.tooltip=!1,this.tooltipOrientation=`top`,this._swipeModified=!1,this._onPointerDown=e=>{this.swipeable&&(e.preventDefault(),this._swipeModified=!1,this._applySwipeValue(this._valueFromPointer(e)),window.addEventListener(`pointerup`,this._onWindowPointerUp,{once:!0}))},this._onPointerMove=e=>{!this.swipeable||e.buttons===0||this._applySwipeValue(this._valueFromPointer(e))},this._onPointerEnter=e=>{!this.swipeable||e.buttons===0||(this._swipeModified=!1,this._applySwipeValue(this._valueFromPointer(e)),window.addEventListener(`pointerup`,this._onWindowPointerUp,{once:!0}))},this._onPointerLeave=e=>{!this.swipeable||!this._swipeModified||(this._swipeModified=!1,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value},bubbles:!0,composed:!0})))},this._onWindowPointerUp=()=>{this._swipeModified&&(this._swipeModified=!1,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value},bubbles:!0,composed:!0})))},this._handleInput=e=>{e.preventDefault(),e.stopImmediatePropagation();let n=e.target,r=Number.parseFloat(n.value);this.value=r,this.style.setProperty(`--value`,String(PE(r,this.min,this.max))),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:r},bubbles:!0,composed:!0}))},this._handleChange=()=>{let e=Number.parseFloat(this._inputEl.value);this.dispatchEvent(new CustomEvent(`change`,{detail:{value:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.addEventListener(`pointerdown`,this._onPointerDown),this.addEventListener(`pointermove`,this._onPointerMove),this.addEventListener(`pointerenter`,this._onPointerEnter),this.addEventListener(`pointerleave`,this._onPointerLeave)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`pointerdown`,this._onPointerDown),this.removeEventListener(`pointermove`,this._onPointerMove),this.removeEventListener(`pointerenter`,this._onPointerEnter),this.removeEventListener(`pointerleave`,this._onPointerLeave),window.removeEventListener(`pointerup`,this._onWindowPointerUp)}_valueFromPointer(e){let n=this.getBoundingClientRect(),r=this.orientation===`vertical`?Math.max(0,Math.min(1,1-(e.clientY-n.top)/n.height)):Math.max(0,Math.min(1,(e.clientX-n.left)/n.width)),i=this.min+r*(this.max-this.min),a=Math.round((i-this.min)/this.step)*this.step+this.min;return Math.max(this.min,Math.min(this.max,a))}_applySwipeValue(e){this.value=e,this._inputEl&&(this._inputEl.value=String(e)),this.style.setProperty(`--value`,String(PE(e,this.min,this.max))),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:e},bubbles:!0,composed:!0})),this._swipeModified=!0}updated(e){super.updated(e),(e.has(`value`)||e.has(`min`)||e.has(`max`))&&this.style.setProperty(`--value`,String(PE(this.value,this.min,this.max))),this._tooltipEl&&(this._tooltipEl.valueFormatTooltip=e=>{let n=typeof e==`number`?e:Number(e);if(this.labelFormatter)return this.labelFormatter(n,PE(n,this.min,this.max));let r=this.step>=1?0:this.step>=.1?1:2;return n.toFixed(r)})}_formatTooltipLabel(){let e=PE(this.value,this.min,this.max);if(this.labelFormatter)return this.labelFormatter(this.value,e);let n=this.step>=1?0:this.step>=.1?1:2;return this.value.toFixed(n)}_applyWheelDelta(e,n){let r=this._inputEl;if(!r)return;let i=this.step>0?this.step:Math.max((this.max-this.min)/100,.01),a=this.value+e*i,o=Math.min(this.max,Math.max(this.min,a));o!==this.value&&(r.value=String(o),r.dispatchEvent(new CustomEvent(`input`,{detail:{value:o},bubbles:!0})),r.dispatchEvent(new CustomEvent(`change`,{detail:{value:o},bubbles:!0})))}render(){let e=this.tooltip?i`
10869
+ `;function IE(e,n,r){return r===n?0:(e-n)/(r-n)}let LE=class extends Oy(n){constructor(...e){super(...e),this.min=0,this.max=1,this.value=0,this.step=.01,this.orientation=`horizontal`,this.swipeable=!1,this.tooltip=!1,this.tooltipOrientation=`top`,this._swipeModified=!1,this._onPointerDown=e=>{this.swipeable&&(e.preventDefault(),this._swipeModified=!1,this._applySwipeValue(this._valueFromPointer(e)),window.addEventListener(`pointerup`,this._onWindowPointerUp,{once:!0}))},this._onPointerMove=e=>{!this.swipeable||e.buttons===0||this._applySwipeValue(this._valueFromPointer(e))},this._onPointerEnter=e=>{!this.swipeable||e.buttons===0||(this._swipeModified=!1,this._applySwipeValue(this._valueFromPointer(e)),window.addEventListener(`pointerup`,this._onWindowPointerUp,{once:!0}))},this._onPointerLeave=e=>{!this.swipeable||!this._swipeModified||(this._swipeModified=!1,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value},bubbles:!0,composed:!0})))},this._onWindowPointerUp=()=>{this._swipeModified&&(this._swipeModified=!1,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value},bubbles:!0,composed:!0})))},this._handleInput=e=>{e.preventDefault(),e.stopImmediatePropagation();let n=e.target,r=Number.parseFloat(n.value);this.value=r,this.style.setProperty(`--value`,String(IE(r,this.min,this.max))),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:r},bubbles:!0,composed:!0}))},this._handleChange=()=>{let e=Number.parseFloat(this._inputEl.value);this.dispatchEvent(new CustomEvent(`change`,{detail:{value:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.addEventListener(`pointerdown`,this._onPointerDown),this.addEventListener(`pointermove`,this._onPointerMove),this.addEventListener(`pointerenter`,this._onPointerEnter),this.addEventListener(`pointerleave`,this._onPointerLeave)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`pointerdown`,this._onPointerDown),this.removeEventListener(`pointermove`,this._onPointerMove),this.removeEventListener(`pointerenter`,this._onPointerEnter),this.removeEventListener(`pointerleave`,this._onPointerLeave),window.removeEventListener(`pointerup`,this._onWindowPointerUp)}_valueFromPointer(e){let n=this.getBoundingClientRect(),r=this.orientation===`vertical`?Math.max(0,Math.min(1,1-(e.clientY-n.top)/n.height)):Math.max(0,Math.min(1,(e.clientX-n.left)/n.width)),i=this.min+r*(this.max-this.min),a=Math.round((i-this.min)/this.step)*this.step+this.min;return Math.max(this.min,Math.min(this.max,a))}_applySwipeValue(e){this.value=e,this._inputEl&&(this._inputEl.value=String(e)),this.style.setProperty(`--value`,String(IE(e,this.min,this.max))),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:e},bubbles:!0,composed:!0})),this._swipeModified=!0}updated(e){super.updated(e),(e.has(`value`)||e.has(`min`)||e.has(`max`))&&this.style.setProperty(`--value`,String(IE(this.value,this.min,this.max))),this._tooltipEl&&(this._tooltipEl.valueFormatTooltip=e=>{let n=typeof e==`number`?e:Number(e);if(this.labelFormatter)return this.labelFormatter(n,IE(n,this.min,this.max));let r=this.step>=1?0:this.step>=.1?1:2;return n.toFixed(r)})}_formatTooltipLabel(){let e=IE(this.value,this.min,this.max);if(this.labelFormatter)return this.labelFormatter(this.value,e);let n=this.step>=1?0:this.step>=.1?1:2;return this.value.toFixed(n)}_applyWheelDelta(e,n){let r=this._inputEl;if(!r)return;let i=this.step>0?this.step:Math.max((this.max-this.min)/100,.01),a=this.value+e*i,o=Math.min(this.max,Math.max(this.min,a));o!==this.value&&(r.value=String(o),r.dispatchEvent(new CustomEvent(`input`,{detail:{value:o},bubbles:!0})),r.dispatchEvent(new CustomEvent(`change`,{detail:{value:o},bubbles:!0})))}render(){let e=this.tooltip?i`
10839
10870
  <ixfx-tooltip
10840
10871
  style="--tooltip-background: var(--surface-5); --tooltip-color: var(--surface-5-text)"
10841
10872
  .orientation=${this.tooltipOrientation}
@@ -10855,7 +10886,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
10855
10886
  @change=${this._handleChange}
10856
10887
  >${e}
10857
10888
  </div>
10858
- `}static{this.styles=[w,NE,r`
10889
+ `}static{this.styles=[w,FE,r`
10859
10890
  :host {
10860
10891
  display: block;
10861
10892
  container-type: size;
@@ -11135,14 +11166,14 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11135
11166
  :host([swipeable][orientation="vertical"]):hover .range-bg {
11136
11167
  background: var(--background-track-hover-vertical, var(--_bg-track-hover));
11137
11168
  }
11138
- `]}};E([d({type:Number})],FE.prototype,`min`,void 0),E([d({type:Number})],FE.prototype,`max`,void 0),E([d({type:Number})],FE.prototype,`value`,void 0),E([d({type:Number})],FE.prototype,`step`,void 0),E([d({type:String,reflect:!0})],FE.prototype,`orientation`,void 0),E([d({type:Boolean,reflect:!0})],FE.prototype,`swipeable`,void 0),E([d({type:Boolean})],FE.prototype,`tooltip`,void 0),E([d({type:String,attribute:`tooltip-orientation`})],FE.prototype,`tooltipOrientation`,void 0),E([d({attribute:!1})],FE.prototype,`labelFormatter`,void 0),E([f(`input`)],FE.prototype,`_inputEl`,void 0),E([f(`ixfx-tooltip`)],FE.prototype,`_tooltipEl`,void 0),FE=E([T(`ixfx-range-input`)],FE);function IE(e){return{client:{x:e.clientX,y:e.clientY},offset:{x:e.offsetX,y:e.offsetY}}}function LE(e,n){let r=IE(e),i=e=>{n.progress(IE(e),r)},a=e=>{document.removeEventListener(`pointermove`,i),document.removeEventListener(`pointerup`,a),n.complete(IE(e),r)};document.addEventListener(`pointermove`,i),document.addEventListener(`pointerup`,a)}function RE(e,n){let r=e-n,i=e+n;return e=>e>=r&&e<=i}let zE=class extends n{constructor(...e){super(...e),this.tooltip=!0,this.tooltipOrientation=`top`,this.crossover=`allow`,this.resizeMode=`dual`,this.orientation=`horizontal`,this.step=1,this.a=0,this.b=50,this.#e=100,this.#t=0,this.#n=e=>e,this.#r=e=>e,this.#i=e=>e,this.draggingThumb=`none`}#e;#t;#n;#r;#i;#a(){this.#n=si(this.#t,this.#e,0,100),this.#r=si(0,100,this.#t,this.#e),this.#i=ei(this.#t,this.#e),this.a=this.#i(this.a),this.b=this.#i(this.b)}set max(e){this.#e=e,this.#a()}get max(){return this.#e}set min(e){this.#t=e,this.#a()}get min(){return this.#t}_onInput(e){e.stopPropagation();let n=e.target,r=this.#r(n.valueAsNumber),i=n.id,a=this.a,o=this.b;if(this.resizeMode===`none`){let e=r-(i===`a`?this.a:this.b),s=this.a+e,c=this.b+e;if(s<this.min&&(e=this.min-this.a),c>this.max&&(e=this.max-this.b),e===0){n.valueAsNumber=this.#n(i===`a`?this.a:this.b);return}a=this.a+e,o=this.b+e}else if(this.resizeMode===`bipolar`){let e,s;if(i===`a`){let n=r-this.a;e=r,s=this.b-n}else{let n=r-this.b;e=this.a-n,s=r}if(e<this.min||s>this.max||e>this.max||s<this.min){n.valueAsNumber=this.#n(i===`a`?this.a:this.b);return}a=e,o=s}else if(this.resizeMode===`bipolar-flex`){let e,s;if(i===`a`){if(e=r,this.b<=this.min)s=this.min;else if(this.b>=this.max)s=this.max;else{let e=r-this.a;s=this.b-e}}else if(s=r,this.a<=this.min)e=this.min;else if(this.a>=this.max)e=this.max;else{let n=r-this.b;e=this.a-n}if(e<this.min&&(e=this.min),e>this.max&&(e=this.max),s<this.min&&(s=this.min),s>this.max&&(s=this.max),e>s){n.valueAsNumber=this.#n(i===`a`?this.a:this.b);return}a=e,o=s}else if(i===`a`)r>this.b&&this.crossover===`stop`?n.valueAsNumber=this.#n(this.a):a=r;else if(i===`b`)r<a&&this.crossover===`stop`?n.valueAsNumber=this.#n(this.b):o=r;else throw Error(`Expected 'a' or 'b', got: '${n.id}'`);this.setPoles(a,o)}setPoles(e,n){let r=e!==this.a,i=n!==this.b;this.a=this.#i(e),this.b=this.#i(n),this.dispatchEvent(new CustomEvent(`input`,{detail:{a:this.a,b:this.b,changed:r&&i?`both`:r?`a`:`b`}}))}_onPointerDown(e){let n=this.a,r=this.b;this.valuesAtPointerDown={a:n,b:r};let i=e.target.getBoundingClientRect(),a=this.orientation===`vertical`,o=a?i.height:i.width,s=o/(this.max-this.min),c=a?e.offsetY:e.offsetX,l=e=>a?this.max-e*s:e*s,u=e=>a?o-e*s:e*s,d=u(n),f=u(r);if(a?(this.b<this.a?c>f:c<f)||(this.b<this.a?c<d:c>d):this.b<this.a&&c<f||this.b>this.a&&c>f||this.a<this.b&&c<d||this.a>this.b&&c>d){if(this.resizeMode===`none`||this.resizeMode===`bipolar`||this.resizeMode===`bipolar-flex`){let e=l(c)-this.b;this.a+e<this.min&&(e=this.min-this.a),this.b+e>this.max&&(e=this.max-this.b);let n=this.a+e,r=this.b+e;n>=this.min&&r<=this.max&&this.setPoles(n,r)}else this.b=l(c);return}let p=RE(d,10),m=RE(f,10),h=i=>{let o=this.setPoles.bind(this),c=this.resizeMode,u=this.min,p=this.max,m=a?e.offsetY:e.offsetX,h=!1;LE(e,{progress(e,l){let d=a?e.offset.y:e.offset.x,f=(a?m-d:d-m)/s;if(h=!0,i===`a`){if(c===`bipolar`){let e=n+f,i=r-f;if(e<u||i>p||e>p||i<u)return;o(e,i)}else if(c===`bipolar-flex`){let e=n+f,i=r;if(r<=u?i=u:r>=p?i=p:(e=n+f,i=r-f),e<u&&(e=u),e>p&&(e=p),i<u&&(i=u),i>p&&(i=p),e>i)return;o(e,i)}else{let e=f;n+f<u&&(e=u-n),r+e>p&&(e=p-r);let i=n+e,a=r+e;i>=u&&a<=p&&o(i,a)}}else if(i===`b`){if(c===`bipolar`){let e=n-f,i=r+f;if(e<u||i>p||e>p||i<u)return;o(e,i)}else if(c===`bipolar-flex`){let e=n,i=r+f;if(n<=u?e=u:n>=p?e=p:(e=n-f,i=r+f),e<u&&(e=u),e>p&&(e=p),i<u&&(i=u),i>p&&(i=p),e>i)return;o(e,i)}else{let e=f;n+f<u&&(e=u-n),r+e>p&&(e=p-r);let i=n+e,a=r+e;i>=u&&a<=p&&o(i,a)}}else if(c===`bipolar`){let e=n+f,i=r+f;if(e<u||i>p)return;o(e,i)}else if(c===`bipolar-flex`){let e=n+f,i=r+f;if(e<u?(e=u,i=u+(r-n)):i>p&&(i=p,e=p-(r-n)),e<u||i>p||e>i)return;o(e,i)}else{let e=f;n+f<u&&(e=u-n),r+e>p&&(e=p-r);let i=n+e,a=r+e;i>=u&&a<=p&&o(i,a)}},complete(i,s){if(!h){let i=a?e.offsetY:e.offsetX;Math.abs(i-d)<Math.abs(i-f)?o(l(i),r):o(n,l(i))}}})};if(p(c)){if(this.draggingThumb=`a`,this.resizeMode===`dual`)return!1;e.preventDefault(),e.target.setPointerCapture(e.pointerId),h(`a`);return}if(m(c)){if(this.draggingThumb=`b`,this.resizeMode===`dual`)return!1;e.preventDefault(),e.target.setPointerCapture(e.pointerId),h(`b`);return}this.draggingThumb=`none`,e.preventDefault(),e.target.setPointerCapture(e.pointerId),h(`none`)}firstUpdated(e){this.#a()}render(){let e=this.tooltip?i`<ixfx-tooltip style="--tooltip-background: var(--surface-5); --tooltip-color: var(--surface-5-text)" anchor="--a-tooltip" .orientation=${this.tooltipOrientation} .value=${this.a}></ixfx-tooltip>`:a,n=this.tooltip?i`<ixfx-tooltip style="--tooltip-background: var(--surface-5); --tooltip-color: var(--surface-5-text)" anchor="--b-tooltip" .orientation=${this.tooltipOrientation} .value=${this.b}></ixfx-tooltip>`:a,r=this.#n(this.a),o=this.#n(this.b),s=this.orientation===`vertical`?`writing-mode: vertical-lr; direction: rtl;`:a;return i`
11169
+ `]}};E([d({type:Number})],LE.prototype,`min`,void 0),E([d({type:Number})],LE.prototype,`max`,void 0),E([d({type:Number})],LE.prototype,`value`,void 0),E([d({type:Number})],LE.prototype,`step`,void 0),E([d({type:String,reflect:!0})],LE.prototype,`orientation`,void 0),E([d({type:Boolean,reflect:!0})],LE.prototype,`swipeable`,void 0),E([d({type:Boolean})],LE.prototype,`tooltip`,void 0),E([d({type:String,attribute:`tooltip-orientation`})],LE.prototype,`tooltipOrientation`,void 0),E([d({attribute:!1})],LE.prototype,`labelFormatter`,void 0),E([f(`input`)],LE.prototype,`_inputEl`,void 0),E([f(`ixfx-tooltip`)],LE.prototype,`_tooltipEl`,void 0),LE=E([T(`ixfx-range-input`)],LE);function RE(e){return{client:{x:e.clientX,y:e.clientY},offset:{x:e.offsetX,y:e.offsetY}}}function zE(e,n){let r=RE(e),i=e=>{n.progress(RE(e),r)},a=e=>{document.removeEventListener(`pointermove`,i),document.removeEventListener(`pointerup`,a),n.complete(RE(e),r)};document.addEventListener(`pointermove`,i),document.addEventListener(`pointerup`,a)}function BE(e,n){let r=e-n,i=e+n;return e=>e>=r&&e<=i}let VE=class extends n{constructor(...e){super(...e),this.tooltip=!0,this.tooltipOrientation=`top`,this.crossover=`allow`,this.resizeMode=`dual`,this.orientation=`horizontal`,this.step=1,this.a=0,this.b=50,this.#e=100,this.#t=0,this.#n=e=>e,this.#r=e=>e,this.#i=e=>e,this.draggingThumb=`none`}#e;#t;#n;#r;#i;#a(){this.#n=si(this.#t,this.#e,0,100),this.#r=si(0,100,this.#t,this.#e),this.#i=ei(this.#t,this.#e),this.a=this.#i(this.a),this.b=this.#i(this.b)}set max(e){this.#e=e,this.#a()}get max(){return this.#e}set min(e){this.#t=e,this.#a()}get min(){return this.#t}_onInput(e){e.stopPropagation();let n=e.target,r=this.#r(n.valueAsNumber),i=n.id,a=this.a,o=this.b;if(this.resizeMode===`none`){let e=r-(i===`a`?this.a:this.b),s=this.a+e,c=this.b+e;if(s<this.min&&(e=this.min-this.a),c>this.max&&(e=this.max-this.b),e===0){n.valueAsNumber=this.#n(i===`a`?this.a:this.b);return}a=this.a+e,o=this.b+e}else if(this.resizeMode===`bipolar`){let e,s;if(i===`a`){let n=r-this.a;e=r,s=this.b-n}else{let n=r-this.b;e=this.a-n,s=r}if(e<this.min||s>this.max||e>this.max||s<this.min){n.valueAsNumber=this.#n(i===`a`?this.a:this.b);return}a=e,o=s}else if(this.resizeMode===`bipolar-flex`){let e,s;if(i===`a`){if(e=r,this.b<=this.min)s=this.min;else if(this.b>=this.max)s=this.max;else{let e=r-this.a;s=this.b-e}}else if(s=r,this.a<=this.min)e=this.min;else if(this.a>=this.max)e=this.max;else{let n=r-this.b;e=this.a-n}if(e<this.min&&(e=this.min),e>this.max&&(e=this.max),s<this.min&&(s=this.min),s>this.max&&(s=this.max),e>s){n.valueAsNumber=this.#n(i===`a`?this.a:this.b);return}a=e,o=s}else if(i===`a`)r>this.b&&this.crossover===`stop`?n.valueAsNumber=this.#n(this.a):a=r;else if(i===`b`)r<a&&this.crossover===`stop`?n.valueAsNumber=this.#n(this.b):o=r;else throw Error(`Expected 'a' or 'b', got: '${n.id}'`);this.setPoles(a,o)}setPoles(e,n){let r=e!==this.a,i=n!==this.b;this.a=this.#i(e),this.b=this.#i(n),this.dispatchEvent(new CustomEvent(`input`,{detail:{a:this.a,b:this.b,changed:r&&i?`both`:r?`a`:`b`}}))}_onPointerDown(e){let n=this.a,r=this.b;this.valuesAtPointerDown={a:n,b:r};let i=e.target.getBoundingClientRect(),a=this.orientation===`vertical`,o=a?i.height:i.width,s=o/(this.max-this.min),c=a?e.offsetY:e.offsetX,l=e=>a?this.max-e*s:e*s,u=e=>a?o-e*s:e*s,d=u(n),f=u(r);if(a?(this.b<this.a?c>f:c<f)||(this.b<this.a?c<d:c>d):this.b<this.a&&c<f||this.b>this.a&&c>f||this.a<this.b&&c<d||this.a>this.b&&c>d){if(this.resizeMode===`none`||this.resizeMode===`bipolar`||this.resizeMode===`bipolar-flex`){let e=l(c)-this.b;this.a+e<this.min&&(e=this.min-this.a),this.b+e>this.max&&(e=this.max-this.b);let n=this.a+e,r=this.b+e;n>=this.min&&r<=this.max&&this.setPoles(n,r)}else this.b=l(c);return}let p=BE(d,10),m=BE(f,10),h=i=>{let o=this.setPoles.bind(this),c=this.resizeMode,u=this.min,p=this.max,m=a?e.offsetY:e.offsetX,h=!1;zE(e,{progress(e,l){let d=a?e.offset.y:e.offset.x,f=(a?m-d:d-m)/s;if(h=!0,i===`a`){if(c===`bipolar`){let e=n+f,i=r-f;if(e<u||i>p||e>p||i<u)return;o(e,i)}else if(c===`bipolar-flex`){let e=n+f,i=r;if(r<=u?i=u:r>=p?i=p:(e=n+f,i=r-f),e<u&&(e=u),e>p&&(e=p),i<u&&(i=u),i>p&&(i=p),e>i)return;o(e,i)}else{let e=f;n+f<u&&(e=u-n),r+e>p&&(e=p-r);let i=n+e,a=r+e;i>=u&&a<=p&&o(i,a)}}else if(i===`b`){if(c===`bipolar`){let e=n-f,i=r+f;if(e<u||i>p||e>p||i<u)return;o(e,i)}else if(c===`bipolar-flex`){let e=n,i=r+f;if(n<=u?e=u:n>=p?e=p:(e=n-f,i=r+f),e<u&&(e=u),e>p&&(e=p),i<u&&(i=u),i>p&&(i=p),e>i)return;o(e,i)}else{let e=f;n+f<u&&(e=u-n),r+e>p&&(e=p-r);let i=n+e,a=r+e;i>=u&&a<=p&&o(i,a)}}else if(c===`bipolar`){let e=n+f,i=r+f;if(e<u||i>p)return;o(e,i)}else if(c===`bipolar-flex`){let e=n+f,i=r+f;if(e<u?(e=u,i=u+(r-n)):i>p&&(i=p,e=p-(r-n)),e<u||i>p||e>i)return;o(e,i)}else{let e=f;n+f<u&&(e=u-n),r+e>p&&(e=p-r);let i=n+e,a=r+e;i>=u&&a<=p&&o(i,a)}},complete(i,s){if(!h){let i=a?e.offsetY:e.offsetX;Math.abs(i-d)<Math.abs(i-f)?o(l(i),r):o(n,l(i))}}})};if(p(c)){if(this.draggingThumb=`a`,this.resizeMode===`dual`)return!1;e.preventDefault(),e.target.setPointerCapture(e.pointerId),h(`a`);return}if(m(c)){if(this.draggingThumb=`b`,this.resizeMode===`dual`)return!1;e.preventDefault(),e.target.setPointerCapture(e.pointerId),h(`b`);return}this.draggingThumb=`none`,e.preventDefault(),e.target.setPointerCapture(e.pointerId),h(`none`)}firstUpdated(e){this.#a()}render(){let e=this.tooltip?i`<ixfx-tooltip style="--tooltip-background: var(--surface-5); --tooltip-color: var(--surface-5-text)" anchor="--a-tooltip" .orientation=${this.tooltipOrientation} .value=${this.a}></ixfx-tooltip>`:a,n=this.tooltip?i`<ixfx-tooltip style="--tooltip-background: var(--surface-5); --tooltip-color: var(--surface-5-text)" anchor="--b-tooltip" .orientation=${this.tooltipOrientation} .value=${this.b}></ixfx-tooltip>`:a,r=this.#n(this.a),o=this.#n(this.b),s=this.orientation===`vertical`?`writing-mode: vertical-lr; direction: rtl;`:a;return i`
11139
11170
  <div @pointerdown=${this._onPointerDown} @input=${this._onInput} style="--a: ${r}; --b: ${o}">
11140
11171
  <input class="thumb-round" .value=${r} id="a" step=${this.step} type="range" style="${s}" anchor="--a-tooltip" />
11141
11172
  ${e}
11142
11173
 
11143
11174
  <input class="thumb-round" .value=${o} id="b" step=${this.step} type="range" style="${s}" anchor="--b-tooltip" />
11144
11175
  ${n}
11145
- </div>`}static{this.styles=[w,NE,sn,r`
11176
+ </div>`}static{this.styles=[w,FE,sn,r`
11146
11177
  :host {
11147
11178
  display: grid;
11148
11179
  --value-label-color: unset;
@@ -11287,14 +11318,14 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11287
11318
  [type=range]:focus, [type=range]:focus + ixfx-tooltip, [type=range]:hover, [type=range]:hover + ixfx-tooltip {
11288
11319
  --sel: 1 ;
11289
11320
  }
11290
- `]}};E([d({type:Boolean})],zE.prototype,`tooltip`,void 0),E([d({type:String,attribute:`tooltip-orientation`})],zE.prototype,`tooltipOrientation`,void 0),E([d({type:String})],zE.prototype,`crossover`,void 0),E([d({type:String,attribute:`resize-mode`})],zE.prototype,`resizeMode`,void 0),E([d({type:String,reflect:!0})],zE.prototype,`orientation`,void 0),E([d()],zE.prototype,`step`,void 0),E([d({type:Number})],zE.prototype,`a`,void 0),E([d({type:Number})],zE.prototype,`b`,void 0),E([d({type:Number})],zE.prototype,`max`,null),E([d({type:Number})],zE.prototype,`min`,null),E([u({capture:!0})],zE.prototype,`_onInput`,null),E([u({capture:!0})],zE.prototype,`_onPointerDown`,null),zE=E([T(`ixfx-range-multi`)],zE);let BE=class extends Oy(n){constructor(...e){super(...e),this.tooltip=!0,this.tooltipOrientation=`top`,this.orientation=`horizontal`,this.disabled=!1,this.min=0,this.max=100,this.#e=0,this.step=0}set value(e){this.#e=e}get value(){return this.#e}#e;onRangeInput(e){let n=e.target.valueAsNumber,r=e.target.value;if(this.#e=n,this.tooltip){let e=this.shadowRoot?.querySelector(`output`);e?e.value=r:console.warn(`Output element not found`)}}_applyWheelDelta(e,n){let r=this.renderRoot?.querySelector(`input[type=range]`);if(!r)return;let i=this.step>0?this.step:Math.max((this.max-this.min)/100,.01),a=this.#e+e*i,o=Math.min(this.max,Math.max(this.min,a));o!==this.#e&&(r.value=String(o),r.dispatchEvent(new Event(`input`,{bubbles:!0})),r.dispatchEvent(new Event(`change`,{bubbles:!0})))}render(){let e=this.tooltip?i`<ixfx-tooltip
11321
+ `]}};E([d({type:Boolean})],VE.prototype,`tooltip`,void 0),E([d({type:String,attribute:`tooltip-orientation`})],VE.prototype,`tooltipOrientation`,void 0),E([d({type:String})],VE.prototype,`crossover`,void 0),E([d({type:String,attribute:`resize-mode`})],VE.prototype,`resizeMode`,void 0),E([d({type:String,reflect:!0})],VE.prototype,`orientation`,void 0),E([d()],VE.prototype,`step`,void 0),E([d({type:Number})],VE.prototype,`a`,void 0),E([d({type:Number})],VE.prototype,`b`,void 0),E([d({type:Number})],VE.prototype,`max`,null),E([d({type:Number})],VE.prototype,`min`,null),E([u({capture:!0})],VE.prototype,`_onInput`,null),E([u({capture:!0})],VE.prototype,`_onPointerDown`,null),VE=E([T(`ixfx-range-multi`)],VE);let HE=class extends Oy(n){constructor(...e){super(...e),this.tooltip=!0,this.tooltipOrientation=`top`,this.orientation=`horizontal`,this.disabled=!1,this.min=0,this.max=100,this.#e=0,this.step=0}set value(e){this.#e=e}get value(){return this.#e}#e;onRangeInput(e){let n=e.target.valueAsNumber,r=e.target.value;if(this.#e=n,this.tooltip){let e=this.shadowRoot?.querySelector(`output`);e?e.value=r:console.warn(`Output element not found`)}}_applyWheelDelta(e,n){let r=this.renderRoot?.querySelector(`input[type=range]`);if(!r)return;let i=this.step>0?this.step:Math.max((this.max-this.min)/100,.01),a=this.#e+e*i,o=Math.min(this.max,Math.max(this.min,a));o!==this.#e&&(r.value=String(o),r.dispatchEvent(new Event(`input`,{bubbles:!0})),r.dispatchEvent(new Event(`change`,{bubbles:!0})))}render(){let e=this.tooltip?i`<ixfx-tooltip
11291
11322
  style="--tooltip-background: var(--surface-5); --tooltip-color: var(--surface-5-text)"
11292
11323
  .orientation=${this.tooltipOrientation}
11293
11324
  anchor="--thumb-tooltip"
11294
11325
  .value=${this.value}></ixfx-tooltip>`:a,n=this.orientation===`vertical`?`writing-mode: vertical-lr; direction: rtl;`:a;return i`
11295
11326
  <input ?disabled=${this.disabled} step=${this.step} min=${this.min} max=${this.max} value=${this.value} @input=${this.onRangeInput} type="range" style=${n}>
11296
11327
  ${e}
11297
- `}static{this.styles=[w,sn,NE,r`
11328
+ `}static{this.styles=[w,sn,FE,r`
11298
11329
  :host {
11299
11330
  display: inline-block;
11300
11331
  --value-label-color: unset;
@@ -11353,7 +11384,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11353
11384
  [type="range"]:focus {
11354
11385
  outline: none;
11355
11386
  }
11356
- `]}};E([d({type:Boolean})],BE.prototype,`tooltip`,void 0),E([d({type:String,attribute:`tooltip-orientation`})],BE.prototype,`tooltipOrientation`,void 0),E([d({type:String,reflect:!0})],BE.prototype,`orientation`,void 0),E([d({type:Boolean,attribute:!0})],BE.prototype,`disabled`,void 0),E([d({type:Number})],BE.prototype,`min`,void 0),E([d({type:Number})],BE.prototype,`max`,void 0),E([d({type:Number})],BE.prototype,`value`,null),E([d({type:Number})],BE.prototype,`step`,void 0),BE=E([T(`ixfx-range`)],BE);let VE=class extends n{constructor(...e){super(...e),this.value=0,this.max=5,this.allowHalf=!1,this.disabled=!1,this.readonly=!1,this.variant=`star`,this._preview=null}static{this.styles=[sn,r`
11387
+ `]}};E([d({type:Boolean})],HE.prototype,`tooltip`,void 0),E([d({type:String,attribute:`tooltip-orientation`})],HE.prototype,`tooltipOrientation`,void 0),E([d({type:String,reflect:!0})],HE.prototype,`orientation`,void 0),E([d({type:Boolean,attribute:!0})],HE.prototype,`disabled`,void 0),E([d({type:Number})],HE.prototype,`min`,void 0),E([d({type:Number})],HE.prototype,`max`,void 0),E([d({type:Number})],HE.prototype,`value`,null),E([d({type:Number})],HE.prototype,`step`,void 0),HE=E([T(`ixfx-range`)],HE);let UE=class extends n{constructor(...e){super(...e),this.value=0,this.max=5,this.allowHalf=!1,this.disabled=!1,this.readonly=!1,this.variant=`star`,this._preview=null}static{this.styles=[sn,r`
11357
11388
  :host {
11358
11389
  --ixfx-rating-size: 1.5rem;
11359
11390
  --ixfx-rating-gap: 0.2rem;
@@ -11391,7 +11422,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11391
11422
  @click=${e=>this._commit(this._calc(e,a))}>
11392
11423
  <svg viewBox="0 0 24 24" class="bg" fill="currentColor"><path d=${d}></path></svg>
11393
11424
  ${s||c?i`<svg viewBox="0 0 24 24" class="fill" fill="currentColor"><path d=${d}></path></svg>`:``}
11394
- </span>`})}`}firstUpdated(){this.addEventListener(`pointerleave`,()=>this._preview=null),this.addEventListener(`keydown`,e=>{if(this.disabled||this.readonly)return;let n=this.allowHalf?.5:1;if(e.key===`ArrowRight`||e.key===`ArrowUp`)e.preventDefault(),this._commit(Math.min(this.max,this.value+n));else if(e.key===`ArrowLeft`||e.key===`ArrowDown`)e.preventDefault(),this._commit(Math.max(0,this.value-n));else if(e.key===`Home`)e.preventDefault(),this._commit(0);else if(e.key===`End`)e.preventDefault(),this._commit(this.max);else if(/^\d$/.test(e.key)){e.preventDefault();let n=parseInt(e.key,10);this._commit(Math.min(n,this.max))}})}};E([d({type:Number})],VE.prototype,`value`,void 0),E([d({type:Number})],VE.prototype,`max`,void 0),E([d({type:Boolean,attribute:`allow-half`})],VE.prototype,`allowHalf`,void 0),E([d({type:Boolean,reflect:!0})],VE.prototype,`disabled`,void 0),E([d({type:Boolean,reflect:!0})],VE.prototype,`readonly`,void 0),E([d({type:String})],VE.prototype,`variant`,void 0),E([m()],VE.prototype,`_preview`,void 0),VE=E([T(`ixfx-rating`)],VE);let HE=class extends Oy(n){constructor(...e){super(...e),this._selectedIndex=-1,this._slottedItems=[],this.tickled=new ie(this,{getItems:()=>this._slottedItems.map((e,n)=>({id:n,enabled:!0})),onStateChange:()=>this._syncTickled()}),this._onSlotChange=()=>{this._slottedItems=Array.from(this.shadowRoot?.querySelector(`slot`)?.assignedElements()??[]);let e=this._slottedItems.findIndex(e=>e.hasAttribute(`selected`)),n=e>=0?e:this._selectedIndex;n>=this._slottedItems.length&&(n=this._slottedItems.length-1),n<0&&this._slottedItems.length>0&&(n=0),this.selectedIndex=n},this._syncTickled=()=>{this._slottedItems.forEach((e,n)=>{let r=this.tickled.isTickled(n);e.classList.toggle(`tickled`,r),e.tabIndex=r&&this.tickled.inputMode===`keyboard`?0:-1})},this._findSlottedItem=e=>{let n=e instanceof Element?e:null;for(;n;){if(this._slottedItems.includes(n))return n;n=n.parentElement}},this._handlePointerOver=e=>{let n=this._findSlottedItem(e.target);n&&this.tickled.handlePointerEnter(this._slottedItems.indexOf(n))},this._handleKeyDown=e=>{e.key===`ArrowLeft`?(e.preventDefault(),this.tickled.handleKeyboardNavigation(`previous`),this._applyTickledSelection()):e.key===`ArrowRight`?(e.preventDefault(),this.tickled.handleKeyboardNavigation(`next`),this._applyTickledSelection()):e.key===`Home`?(e.preventDefault(),this.tickled.handleKeyboardNavigation(`first`),this._applyTickledSelection()):e.key===`End`&&(e.preventDefault(),this.tickled.handleKeyboardNavigation(`last`),this._applyTickledSelection())},this._applyTickledSelection=()=>{let e=this.tickled.tickledId;e!==void 0&&e!==this._selectedIndex&&(this.selectedIndex=e)},this._wheelCooldown=!1,this._handleClick=e=>{e.currentTarget.focus();let n=this._findSlottedItem(e.target),r=n?this._slottedItems.indexOf(n):-1;r>=0&&r!==this._selectedIndex&&(this.selectedIndex=r)},this._updateSelectedAttribute=()=>{this._slottedItems.forEach((e,n)=>{n===this._selectedIndex?e.setAttribute(`selected`,``):e.removeAttribute(`selected`)})},this._scrollSelectedIntoView=()=>{let e=this._slottedItems[this._selectedIndex];e&&e.scrollIntoView({inline:`center`,behavior:`smooth`})},this._emitChange=()=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{selectedIndex:this._selectedIndex,selectedItem:this.selectedItem,selectedValue:this.selectedValue},bubbles:!0,composed:!0}))}}static{this.styles=[w,ae,oe,Og(`x`),r`
11425
+ </span>`})}`}firstUpdated(){this.addEventListener(`pointerleave`,()=>this._preview=null),this.addEventListener(`keydown`,e=>{if(this.disabled||this.readonly)return;let n=this.allowHalf?.5:1;if(e.key===`ArrowRight`||e.key===`ArrowUp`)e.preventDefault(),this._commit(Math.min(this.max,this.value+n));else if(e.key===`ArrowLeft`||e.key===`ArrowDown`)e.preventDefault(),this._commit(Math.max(0,this.value-n));else if(e.key===`Home`)e.preventDefault(),this._commit(0);else if(e.key===`End`)e.preventDefault(),this._commit(this.max);else if(/^\d$/.test(e.key)){e.preventDefault();let n=parseInt(e.key,10);this._commit(Math.min(n,this.max))}})}};E([d({type:Number})],UE.prototype,`value`,void 0),E([d({type:Number})],UE.prototype,`max`,void 0),E([d({type:Boolean,attribute:`allow-half`})],UE.prototype,`allowHalf`,void 0),E([d({type:Boolean,reflect:!0})],UE.prototype,`disabled`,void 0),E([d({type:Boolean,reflect:!0})],UE.prototype,`readonly`,void 0),E([d({type:String})],UE.prototype,`variant`,void 0),E([m()],UE.prototype,`_preview`,void 0),UE=E([T(`ixfx-rating`)],UE);let WE=class extends Oy(n){constructor(...e){super(...e),this._selectedIndex=-1,this._slottedItems=[],this.tickled=new ie(this,{getItems:()=>this._slottedItems.map((e,n)=>({id:n,enabled:!0})),onStateChange:()=>this._syncTickled()}),this._onSlotChange=()=>{this._slottedItems=Array.from(this.shadowRoot?.querySelector(`slot`)?.assignedElements()??[]);let e=this._slottedItems.findIndex(e=>e.hasAttribute(`selected`)),n=e>=0?e:this._selectedIndex;n>=this._slottedItems.length&&(n=this._slottedItems.length-1),n<0&&this._slottedItems.length>0&&(n=0),this.selectedIndex=n},this._syncTickled=()=>{this._slottedItems.forEach((e,n)=>{let r=this.tickled.isTickled(n);e.classList.toggle(`tickled`,r),e.tabIndex=r&&this.tickled.inputMode===`keyboard`?0:-1})},this._findSlottedItem=e=>{let n=e instanceof Element?e:null;for(;n;){if(this._slottedItems.includes(n))return n;n=n.parentElement}},this._handlePointerOver=e=>{let n=this._findSlottedItem(e.target);n&&this.tickled.handlePointerEnter(this._slottedItems.indexOf(n))},this._handleKeyDown=e=>{e.key===`ArrowLeft`?(e.preventDefault(),this.tickled.handleKeyboardNavigation(`previous`),this._applyTickledSelection()):e.key===`ArrowRight`?(e.preventDefault(),this.tickled.handleKeyboardNavigation(`next`),this._applyTickledSelection()):e.key===`Home`?(e.preventDefault(),this.tickled.handleKeyboardNavigation(`first`),this._applyTickledSelection()):e.key===`End`&&(e.preventDefault(),this.tickled.handleKeyboardNavigation(`last`),this._applyTickledSelection())},this._applyTickledSelection=()=>{let e=this.tickled.tickledId;e!==void 0&&e!==this._selectedIndex&&(this.selectedIndex=e)},this._wheelCooldown=!1,this._handleClick=e=>{e.currentTarget.focus();let n=this._findSlottedItem(e.target),r=n?this._slottedItems.indexOf(n):-1;r>=0&&r!==this._selectedIndex&&(this.selectedIndex=r)},this._updateSelectedAttribute=()=>{this._slottedItems.forEach((e,n)=>{n===this._selectedIndex?e.setAttribute(`selected`,``):e.removeAttribute(`selected`)})},this._scrollSelectedIntoView=()=>{let e=this._slottedItems[this._selectedIndex];e&&e.scrollIntoView({inline:`center`,behavior:`smooth`})},this._emitChange=()=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{selectedIndex:this._selectedIndex,selectedItem:this.selectedItem,selectedValue:this.selectedValue},bubbles:!0,composed:!0}))}}static{this.styles=[w,ae,oe,Og(`x`),r`
11395
11426
  :host {
11396
11427
  --select-horiz-item-width: 80%;
11397
11428
  --select-horiz-gap: var(--space-s);
@@ -11487,7 +11518,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11487
11518
  <slot @slotchange=${this._onSlotChange}></slot>
11488
11519
  <div class="spacer"></div>
11489
11520
  </div>
11490
- `}willUpdate(e){super.willUpdate(e),this.setAttribute(`data-input-mode`,this.tickled.inputMode)}_applyWheelDelta(e,n){this._wheelCooldown||(this._wheelCooldown=!0,this.tickled.handleKeyboardNavigation(e===1?`next`:`previous`),this._applyTickledSelection(),setTimeout(()=>{this._wheelCooldown=!1},250))}};E([m()],HE.prototype,`_selectedIndex`,void 0),E([m()],HE.prototype,`_slottedItems`,void 0),E([d({type:Number,reflect:!0,attribute:`selected-index`})],HE.prototype,`selectedIndex`,null),E([d({type:String})],HE.prototype,`selectedValue`,null),HE=E([T(`ixfx-select-horiz`)],HE);function UE(e,n,r){return Math.min(Math.max(e,n),r)}function WE(e,n,r,i,a){return r===n?i:i+(e-n)/(r-n)*(a-i)}let GE=class extends Oy(n){constructor(...e){super(...e),this.display=`circle`,this.fillMode=`centre`,this.value=0,this.min=0,this.max=100,this.step=void 0,this.disabled=!1,this.#e=!1,this.#t=0,this.#n=0,this.#r=0,this.#d=e=>{if(this.disabled)return;e.preventDefault();let n=this.renderRoot.querySelector(`svg`);n?.focus(),this.#e=!0,this.#t=e.clientY,this.#r=e.clientY,this.#n=this.value,this.#i=this.value,this.toggleAttribute(`dragging`,!0),n&&n.setPointerCapture(e.pointerId),window.addEventListener(`pointermove`,this.#f),window.addEventListener(`pointerup`,this.#p),window.addEventListener(`pointercancel`,this.#p)},this.#f=e=>{if(!this.#e)return;e.preventDefault(),this.value!==this.#i&&(this.#n=this.value,this.#t=this.#r,this.#i=this.value);let n=this.clientHeight*2*(e.shiftKey?10:1),r=(this.#t-e.clientY)/n*(this.max-this.min),i=WE(this.#n+r,this.min,this.max,0,1);this.#c(UE(i,0,1),!0),this.#r=e.clientY},this.#p=()=>{this.#e=!1,this.toggleAttribute(`dragging`,!1);let e=this.renderRoot.querySelector(`svg`);e&&`hasPointerCapture`in e&&typeof e.hasPointerCapture==`function`&&e.hasPointerCapture(1)&&e.releasePointerCapture(1),window.removeEventListener(`pointermove`,this.#f),window.removeEventListener(`pointerup`,this.#p),window.removeEventListener(`pointercancel`,this.#p)},this.#m=e=>{if(this.disabled)return;let n=this.max-this.min,r=Dy(n,this.stops,this.step,e.shiftKey),i=!1;switch(e.key){case`ArrowUp`:case`ArrowRight`:this.#h(r/n,!0),i=!0;break;case`ArrowDown`:case`ArrowLeft`:this.#h(-r/n,!0),i=!0;break;case`Home`:this.#c(0,!0),i=!0;break;case`End`:this.#c(1,!0),i=!0}i&&e.preventDefault()}}#e;#t;#n;#r;#i;#a;#o(){return WE(this.value,this.min,this.max,0,1)}#s(e){if(this.stops&&this.stops>1){let n=(this.max-this.min)/this.stops;return Math.round((e-this.min)/n)*n+this.min}return e}#c(e,n=!1){let r=WE(e,0,1,this.min,this.max),i=this.#s(UE(r,this.min,this.max));if(i===this.value)return;let a=this.value;if(this.value=i,this.#i=i,this.hasAttribute(`data-tooltip-live`)){let e=Math.round(this.#o()*100);this.setAttribute(`data-tooltip`,`${e}%`)}n?(this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value,valueRelative:this.#o()},bubbles:!0,composed:!0})),this.#l(a)):this.#u(a)}#l(e){this.#a!==void 0&&clearTimeout(this.#a),this.#a=window.setTimeout(()=>{this.#u(e),this.#a=void 0},150)}#u(e){this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value,valueRelative:this.#o(),previousValue:e},bubbles:!0,composed:!0}))}#d;#f;#p;#m;#h(e,n){this.#c(UE(this.#o()+e,0,1),n)}_applyWheelDelta(e,n){let r=this.max-this.min,i=Dy(r,this.stops,this.step,n.shiftKey);this.#h(e*i/r,!0)}#g(){let e=this.#o(),n=45*e,r=50;return this.fillMode===`left`?r=5+45*e:this.fillMode===`right`&&(r=95-45*e),s`
11521
+ `}willUpdate(e){super.willUpdate(e),this.setAttribute(`data-input-mode`,this.tickled.inputMode)}_applyWheelDelta(e,n){this._wheelCooldown||(this._wheelCooldown=!0,this.tickled.handleKeyboardNavigation(e===1?`next`:`previous`),this._applyTickledSelection(),setTimeout(()=>{this._wheelCooldown=!1},250))}};E([m()],WE.prototype,`_selectedIndex`,void 0),E([m()],WE.prototype,`_slottedItems`,void 0),E([d({type:Number,reflect:!0,attribute:`selected-index`})],WE.prototype,`selectedIndex`,null),E([d({type:String})],WE.prototype,`selectedValue`,null),WE=E([T(`ixfx-select-horiz`)],WE);function GE(e,n,r){return Math.min(Math.max(e,n),r)}function KE(e,n,r,i,a){return r===n?i:i+(e-n)/(r-n)*(a-i)}let qE=class extends Oy(n){constructor(...e){super(...e),this.display=`circle`,this.fillMode=`centre`,this.value=0,this.min=0,this.max=100,this.step=void 0,this.disabled=!1,this.#e=!1,this.#t=0,this.#n=0,this.#r=0,this.#d=e=>{if(this.disabled)return;e.preventDefault();let n=this.renderRoot.querySelector(`svg`);n?.focus(),this.#e=!0,this.#t=e.clientY,this.#r=e.clientY,this.#n=this.value,this.#i=this.value,this.toggleAttribute(`dragging`,!0),n&&n.setPointerCapture(e.pointerId),window.addEventListener(`pointermove`,this.#f),window.addEventListener(`pointerup`,this.#p),window.addEventListener(`pointercancel`,this.#p)},this.#f=e=>{if(!this.#e)return;e.preventDefault(),this.value!==this.#i&&(this.#n=this.value,this.#t=this.#r,this.#i=this.value);let n=this.clientHeight*2*(e.shiftKey?10:1),r=(this.#t-e.clientY)/n*(this.max-this.min),i=KE(this.#n+r,this.min,this.max,0,1);this.#c(GE(i,0,1),!0),this.#r=e.clientY},this.#p=()=>{this.#e=!1,this.toggleAttribute(`dragging`,!1);let e=this.renderRoot.querySelector(`svg`);e&&`hasPointerCapture`in e&&typeof e.hasPointerCapture==`function`&&e.hasPointerCapture(1)&&e.releasePointerCapture(1),window.removeEventListener(`pointermove`,this.#f),window.removeEventListener(`pointerup`,this.#p),window.removeEventListener(`pointercancel`,this.#p)},this.#m=e=>{if(this.disabled)return;let n=this.max-this.min,r=Dy(n,this.stops,this.step,e.shiftKey),i=!1;switch(e.key){case`ArrowUp`:case`ArrowRight`:this.#h(r/n,!0),i=!0;break;case`ArrowDown`:case`ArrowLeft`:this.#h(-r/n,!0),i=!0;break;case`Home`:this.#c(0,!0),i=!0;break;case`End`:this.#c(1,!0),i=!0}i&&e.preventDefault()}}#e;#t;#n;#r;#i;#a;#o(){return KE(this.value,this.min,this.max,0,1)}#s(e){if(this.stops&&this.stops>1){let n=(this.max-this.min)/this.stops;return Math.round((e-this.min)/n)*n+this.min}return e}#c(e,n=!1){let r=KE(e,0,1,this.min,this.max),i=this.#s(GE(r,this.min,this.max));if(i===this.value)return;let a=this.value;if(this.value=i,this.#i=i,this.hasAttribute(`data-tooltip-live`)){let e=Math.round(this.#o()*100);this.setAttribute(`data-tooltip`,`${e}%`)}n?(this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value,valueRelative:this.#o()},bubbles:!0,composed:!0})),this.#l(a)):this.#u(a)}#l(e){this.#a!==void 0&&clearTimeout(this.#a),this.#a=window.setTimeout(()=>{this.#u(e),this.#a=void 0},150)}#u(e){this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value,valueRelative:this.#o(),previousValue:e},bubbles:!0,composed:!0}))}#d;#f;#p;#m;#h(e,n){this.#c(GE(this.#o()+e,0,1),n)}_applyWheelDelta(e,n){let r=this.max-this.min,i=Dy(r,this.stops,this.step,n.shiftKey);this.#h(e*i/r,!0)}#g(){let e=this.#o(),n=45*e,r=50;return this.fillMode===`left`?r=5+45*e:this.fillMode===`right`&&(r=95-45*e),s`
11491
11522
  <circle class="fill" cx="${r}" cy="${50}" r="${n}" />
11492
11523
  <circle class="outline" cx="${50}" cy="${50}" r="${45}" fill="none" />
11493
11524
  `}#_(){let e=this.#o();if(this.fillMode===`left`||this.fillMode===`right`){let n=90*e,r=this.fillMode===`left`?5:95-n;return s`
@@ -11554,10 +11585,10 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11554
11585
  fill: var(--shapefill-value-fill-color, var(--accent));
11555
11586
  transition: var(--shapefill-value-fill-transition, none);
11556
11587
  }
11557
- `]}};E([d({type:String})],GE.prototype,`display`,void 0),E([d({type:String,attribute:`fill-mode`})],GE.prototype,`fillMode`,void 0),E([d({type:Number})],GE.prototype,`value`,void 0),E([d({type:Number})],GE.prototype,`min`,void 0),E([d({type:Number})],GE.prototype,`max`,void 0),E([d({type:Number})],GE.prototype,`step`,void 0),E([d({type:Number})],GE.prototype,`stops`,void 0),E([d({type:Boolean,reflect:!0})],GE.prototype,`disabled`,void 0),GE=E([T(`ixfx-shapefill-value`)],GE);const KE=Array.from({length:30},(e,n)=>n%10),qE={lead:0,integer:1,decimal:2,fraction:3,trail:4};function JE(e,n){return(e%n+n)%n}function YE(e){let n=e.trim();return n===``?0:n.endsWith(`ms`)?Number.parseFloat(n)||0:n.endsWith(`s`)?(Number.parseFloat(n)||0)*1e3:Number.parseFloat(n)||0}let XE=class extends n{constructor(...e){super(...e),this.value=0,this.prefix=``,this.suffix=``,this.trend=`auto`,this.noAnimate=!1,this.respectMotionPreference=!0,this._cells=[],this._formatted=``,this._ready=!1,this._pendingSpins=[],this._pendingDir=`none`,this._reelAnims=new Map,this._reapTimer=0}connectedCallback(){super.connectedCallback(),this.hasAttribute(`role`)||this.setAttribute(`role`,`img`)}disconnectedCallback(){super.disconnectedCallback();for(let e of this._reelAnims.values())e.cancel();this._reelAnims.clear(),this._reapTimer&&clearTimeout(this._reapTimer)}_motionOK(){return!(this.noAnimate||this.respectMotionPreference&&typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)}_timing(e){let n=getComputedStyle(this);return{duration:this._motionOK()?YE(n.getPropertyValue(`--sliding-number-${e}-duration`)):0,easing:n.getPropertyValue(`--sliding-number-${e}-easing`).trim()||`ease`}}_numberFormat(){try{return new Intl.NumberFormat(this.locales||void 0,this.format||void 0)}catch{return new Intl.NumberFormat(this.locales||void 0)}}_resolveDir(e){switch(this.trend){case`up`:case`increasing`:return`up`;case`down`:case`decreasing`:return`down`;case`none`:return`none`;default:return e||this._prevValue===void 0||this.value===this._prevValue?`none`:this.value>this._prevValue?`up`:`down`}}_buildCells(e){let n=[],r=[],i=[],a=[],o=``,s=!1,c=!1;for(let l of e)switch(l.type){case`integer`:s=!0;for(let e of l.value)n.push({digit:!0,char:e});break;case`group`:n.push({digit:!1,char:l.value});break;case`decimal`:c=!0,o=l.value;break;case`fraction`:for(let e of l.value)r.push(e);break;default:(s||c?a:i).push(l.value)}let l=[],u=n.filter(e=>e.digit).length;i.forEach((e,n)=>{l.push({key:`lead:${n}`,kind:`symbol`,section:`lead`,char:e,pos:n-100,phase:`active`})});let d=0;for(let e of n)if(e.digit){let n=u-1-d;d++,l.push({key:`int:${n}`,kind:`digit`,section:`integer`,char:e.char,pos:-n,phase:`active`})}else{let n=u-d;l.push({key:`grp:${n}`,kind:`symbol`,section:`integer`,char:e.char,pos:-n+.5,phase:`active`})}return c&&l.push({key:`decimal`,kind:`symbol`,section:`decimal`,char:o,pos:0,phase:`active`}),r.forEach((e,n)=>{l.push({key:`frac:${n}`,kind:`digit`,section:`fraction`,char:e,pos:n+1,phase:`active`})}),a.forEach((e,n)=>{l.push({key:`trail:${n}`,kind:`symbol`,section:`trail`,char:e,pos:n+100,phase:`active`})}),l}willUpdate(e){if(![`value`,`format`,`locales`,`prefix`,`suffix`,`noAnimate`].some(n=>e.has(n))&&this._ready)return;let n=this._numberFormat();this._formatted=`${this.prefix}${n.format(this.value)}${this.suffix}`,this.setAttribute(`aria-label`,this._formatted),this.toggleAttribute(`data-static`,!this._motionOK());let r=!this._ready,i=this._motionOK()&&!r,a=this._buildCells(n.formatToParts(this.value)),o=new Set(a.map(e=>e.key)),s=this._cells.filter(e=>e.phase!==`leave`),c=new Map(s.map(e=>[e.key,e])),l=this._resolveDir(r),u=[],d=[];for(let e of a){let n=c.get(e.key);n?(i&&e.kind===`digit`&&n.char!==e.char&&u.push({key:e.key,from:Number(n.char),to:Number(e.char)}),d.push({...e,phase:`active`})):d.push({...e,phase:i?`enter`:`active`})}if(i)for(let e of s)o.has(e.key)||d.push({...e,phase:`leave`});d.sort((e,n)=>qE[e.section]-qE[n.section]||e.pos-n.pos),this._cells=d,this._pendingSpins=u,this._pendingDir=l}updated(){for(let e of this._pendingSpins)this._spin(e.key,e.from,e.to,this._pendingDir);this._pendingSpins=[],this._cells.some(e=>e.phase===`enter`)&&requestAnimationFrame(()=>requestAnimationFrame(()=>{let e=!1;for(let n of this._cells)n.phase===`enter`&&(n.phase=`active`,e=!0);e&&(this._cells=[...this._cells],this.requestUpdate())})),this._cells.some(e=>e.phase===`leave`)&&(this._reapTimer&&clearTimeout(this._reapTimer),this._reapTimer=window.setTimeout(()=>{this._reapTimer=0;let e=this._cells.filter(e=>e.phase!==`leave`);e.length!==this._cells.length&&(this._cells=e,this.requestUpdate())},this._timing(`transform`).duration+120)),this._prevValue=this.value,this._ready=!0}_spin(e,n,r,i){let a=this.renderRoot.querySelector(`[data-key="${e}"] .reel`);if(!a)return;let o=10+n,s;s=i===`up`?o+JE(r-n,10):i===`down`?o-JE(n-r,10):[r,10+r,20+r].reduce((e,n)=>Math.abs(n-o)<Math.abs(e-o)?n:e);let{duration:c,easing:l}=this._timing(`spin`);if(this._reelAnims.get(e)?.cancel(),c===0){a.style.setProperty(`--o`,String(10+r));return}let u=a.animate([{transform:`translateY(calc(-1em * ${o}))`},{transform:`translateY(calc(-1em * ${s}))`}],{duration:c,easing:l,fill:`both`});this._reelAnims.set(e,u),u.finished.then(()=>{a.style.setProperty(`--o`,String(10+r)),u.cancel(),this._reelAnims.delete(e)}).catch(()=>{})}_renderCell(e){return e.kind===`digit`?i`
11588
+ `]}};E([d({type:String})],qE.prototype,`display`,void 0),E([d({type:String,attribute:`fill-mode`})],qE.prototype,`fillMode`,void 0),E([d({type:Number})],qE.prototype,`value`,void 0),E([d({type:Number})],qE.prototype,`min`,void 0),E([d({type:Number})],qE.prototype,`max`,void 0),E([d({type:Number})],qE.prototype,`step`,void 0),E([d({type:Number})],qE.prototype,`stops`,void 0),E([d({type:Boolean,reflect:!0})],qE.prototype,`disabled`,void 0),qE=E([T(`ixfx-shapefill-value`)],qE);const JE=Array.from({length:30},(e,n)=>n%10),YE={lead:0,integer:1,decimal:2,fraction:3,trail:4};function XE(e,n){return(e%n+n)%n}function ZE(e){let n=e.trim();return n===``?0:n.endsWith(`ms`)?Number.parseFloat(n)||0:n.endsWith(`s`)?(Number.parseFloat(n)||0)*1e3:Number.parseFloat(n)||0}let QE=class extends n{constructor(...e){super(...e),this.value=0,this.prefix=``,this.suffix=``,this.trend=`auto`,this.noAnimate=!1,this.respectMotionPreference=!0,this._cells=[],this._formatted=``,this._ready=!1,this._pendingSpins=[],this._pendingDir=`none`,this._reelAnims=new Map,this._reapTimer=0}connectedCallback(){super.connectedCallback(),this.hasAttribute(`role`)||this.setAttribute(`role`,`img`)}disconnectedCallback(){super.disconnectedCallback();for(let e of this._reelAnims.values())e.cancel();this._reelAnims.clear(),this._reapTimer&&clearTimeout(this._reapTimer)}_motionOK(){return!(this.noAnimate||this.respectMotionPreference&&typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)}_timing(e){let n=getComputedStyle(this);return{duration:this._motionOK()?ZE(n.getPropertyValue(`--sliding-number-${e}-duration`)):0,easing:n.getPropertyValue(`--sliding-number-${e}-easing`).trim()||`ease`}}_numberFormat(){try{return new Intl.NumberFormat(this.locales||void 0,this.format||void 0)}catch{return new Intl.NumberFormat(this.locales||void 0)}}_resolveDir(e){switch(this.trend){case`up`:case`increasing`:return`up`;case`down`:case`decreasing`:return`down`;case`none`:return`none`;default:return e||this._prevValue===void 0||this.value===this._prevValue?`none`:this.value>this._prevValue?`up`:`down`}}_buildCells(e){let n=[],r=[],i=[],a=[],o=``,s=!1,c=!1;for(let l of e)switch(l.type){case`integer`:s=!0;for(let e of l.value)n.push({digit:!0,char:e});break;case`group`:n.push({digit:!1,char:l.value});break;case`decimal`:c=!0,o=l.value;break;case`fraction`:for(let e of l.value)r.push(e);break;default:(s||c?a:i).push(l.value)}let l=[],u=n.filter(e=>e.digit).length;i.forEach((e,n)=>{l.push({key:`lead:${n}`,kind:`symbol`,section:`lead`,char:e,pos:n-100,phase:`active`})});let d=0;for(let e of n)if(e.digit){let n=u-1-d;d++,l.push({key:`int:${n}`,kind:`digit`,section:`integer`,char:e.char,pos:-n,phase:`active`})}else{let n=u-d;l.push({key:`grp:${n}`,kind:`symbol`,section:`integer`,char:e.char,pos:-n+.5,phase:`active`})}return c&&l.push({key:`decimal`,kind:`symbol`,section:`decimal`,char:o,pos:0,phase:`active`}),r.forEach((e,n)=>{l.push({key:`frac:${n}`,kind:`digit`,section:`fraction`,char:e,pos:n+1,phase:`active`})}),a.forEach((e,n)=>{l.push({key:`trail:${n}`,kind:`symbol`,section:`trail`,char:e,pos:n+100,phase:`active`})}),l}willUpdate(e){if(![`value`,`format`,`locales`,`prefix`,`suffix`,`noAnimate`].some(n=>e.has(n))&&this._ready)return;let n=this._numberFormat();this._formatted=`${this.prefix}${n.format(this.value)}${this.suffix}`,this.setAttribute(`aria-label`,this._formatted),this.toggleAttribute(`data-static`,!this._motionOK());let r=!this._ready,i=this._motionOK()&&!r,a=this._buildCells(n.formatToParts(this.value)),o=new Set(a.map(e=>e.key)),s=this._cells.filter(e=>e.phase!==`leave`),c=new Map(s.map(e=>[e.key,e])),l=this._resolveDir(r),u=[],d=[];for(let e of a){let n=c.get(e.key);n?(i&&e.kind===`digit`&&n.char!==e.char&&u.push({key:e.key,from:Number(n.char),to:Number(e.char)}),d.push({...e,phase:`active`})):d.push({...e,phase:i?`enter`:`active`})}if(i)for(let e of s)o.has(e.key)||d.push({...e,phase:`leave`});d.sort((e,n)=>YE[e.section]-YE[n.section]||e.pos-n.pos),this._cells=d,this._pendingSpins=u,this._pendingDir=l}updated(){for(let e of this._pendingSpins)this._spin(e.key,e.from,e.to,this._pendingDir);this._pendingSpins=[],this._cells.some(e=>e.phase===`enter`)&&requestAnimationFrame(()=>requestAnimationFrame(()=>{let e=!1;for(let n of this._cells)n.phase===`enter`&&(n.phase=`active`,e=!0);e&&(this._cells=[...this._cells],this.requestUpdate())})),this._cells.some(e=>e.phase===`leave`)&&(this._reapTimer&&clearTimeout(this._reapTimer),this._reapTimer=window.setTimeout(()=>{this._reapTimer=0;let e=this._cells.filter(e=>e.phase!==`leave`);e.length!==this._cells.length&&(this._cells=e,this.requestUpdate())},this._timing(`transform`).duration+120)),this._prevValue=this.value,this._ready=!0}_spin(e,n,r,i){let a=this.renderRoot.querySelector(`[data-key="${e}"] .reel`);if(!a)return;let o=10+n,s;s=i===`up`?o+XE(r-n,10):i===`down`?o-XE(n-r,10):[r,10+r,20+r].reduce((e,n)=>Math.abs(n-o)<Math.abs(e-o)?n:e);let{duration:c,easing:l}=this._timing(`spin`);if(this._reelAnims.get(e)?.cancel(),c===0){a.style.setProperty(`--o`,String(10+r));return}let u=a.animate([{transform:`translateY(calc(-1em * ${o}))`},{transform:`translateY(calc(-1em * ${s}))`}],{duration:c,easing:l,fill:`both`});this._reelAnims.set(e,u),u.finished.then(()=>{a.style.setProperty(`--o`,String(10+r)),u.cancel(),this._reelAnims.delete(e)}).catch(()=>{})}_renderCell(e){return e.kind===`digit`?i`
11558
11589
  <span class="cell digit" part="digit" data-key=${e.key} data-phase=${e.phase}>
11559
11590
  <span class="reel" style=${`--o:${10+Number(e.char)}`}>
11560
- ${KE.map(e=>i`<span>${e}</span>`)}
11591
+ ${JE.map(e=>i`<span>${e}</span>`)}
11561
11592
  </span>
11562
11593
  </span>
11563
11594
  `:i`
@@ -11666,7 +11697,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11666
11697
  :host([data-static]) .cell {
11667
11698
  transition: none;
11668
11699
  }
11669
- `}};E([d({type:Number})],XE.prototype,`value`,void 0),E([d({type:String})],XE.prototype,`locales`,void 0),E([d({type:Object})],XE.prototype,`format`,void 0),E([d({type:String})],XE.prototype,`prefix`,void 0),E([d({type:String})],XE.prototype,`suffix`,void 0),E([d({type:String})],XE.prototype,`trend`,void 0),E([d({type:Boolean,attribute:`no-animate`})],XE.prototype,`noAnimate`,void 0),E([d({type:Boolean,attribute:!1})],XE.prototype,`respectMotionPreference`,void 0),E([m()],XE.prototype,`_cells`,void 0),XE=E([T(`ixfx-sliding-number`)],XE);let ZE=0,QE=class extends n{constructor(...e){super(...e),this.for=``,this.mode=`explicit`,this.placement=`top`,this.dismiss=`auto`,this.showDelay=150,this.hideDelay=500,this._isOpen=!1,this._anchorName=`--ixfx-snackbar-anchor-${++ZE}`,this._addedTabindex=!1,this._addedRole=!1,this._onTargetClick=()=>this.toggle(),this._onTargetKeydown=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.toggle())},this._onTickleIn=()=>this._scheduleShow(),this._onTickleOut=()=>this._scheduleHide(),this._onPanelClick=()=>{this.dismiss===`auto`&&this.hide()},this._onToggle=e=>{let{newState:n}=e;this._isOpen=n===`open`,n===`closed`&&this.contains(document.activeElement)&&this._target?.focus()},this._onBeforeToggle=e=>{let{newState:n}=e;this._recentCloseAt=n===`closed`?performance.now():void 0}}get isOpen(){return this._isOpen}show(){if(this.popover)try{this.showPopover()}catch{}}hide(){if(this.popover)try{this.hidePopover()}catch{}}toggle(){if(this.popover){if(this._recentCloseAt!==void 0&&performance.now()-this._recentCloseAt<50){this._recentCloseAt=void 0;return}try{this.togglePopover()}catch{}}}connectedCallback(){super.connectedCallback(),this.hasAttribute(`popover`)||(this.popover=`auto`),this.classList.add(`popup-surface`),this.addEventListener(`toggle`,this._onToggle),this.addEventListener(`beforetoggle`,this._onBeforeToggle),this.addEventListener(`click`,this._onPanelClick),this.style.setProperty(`position-anchor`,this._anchorName),this._attachToTarget()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`toggle`,this._onToggle),this.removeEventListener(`beforetoggle`,this._onBeforeToggle),this.removeEventListener(`click`,this._onPanelClick),this._detachFromTarget(),this._cancelShow(),this._cancelHide()}updated(e){super.updated(e),(e.has(`for`)||e.has(`mode`))&&this._attachToTarget()}_resolveTarget(){if(this.for)return this.getRootNode().getElementById(this.for)??void 0}_attachToTarget(){this._detachFromTarget();let e=this._resolveTarget();if(!e){this.for&&console.warn(`ixfx-snackbar: no element found with id "${this.for}"`);return}if(this._target=e,e.style.setProperty(`anchor-name`,this._anchorName),this.mode===`explicit`){let n=e.tabIndex>=0;n||(e.setAttribute(`tabindex`,`0`),this._addedTabindex=!0),!e.hasAttribute(`role`)&&!n&&(e.setAttribute(`role`,`button`),this._addedRole=!0),e.setAttribute(`aria-haspopup`,`true`),e.addEventListener(`click`,this._onTargetClick),n||e.addEventListener(`keydown`,this._onTargetKeydown)}else this.mode===`implicit`&&(e.addEventListener(`pointerenter`,this._onTickleIn),e.addEventListener(`focus`,this._onTickleIn),e.addEventListener(`pointerleave`,this._onTickleOut),e.addEventListener(`blur`,this._onTickleOut),this.addEventListener(`pointerenter`,this._onTickleIn),this.addEventListener(`focusin`,this._onTickleIn),this.addEventListener(`pointerleave`,this._onTickleOut),this.addEventListener(`focusout`,this._onTickleOut))}_detachFromTarget(){let e=this._target;e&&(e.style.removeProperty(`anchor-name`),this._addedTabindex&&=(e.removeAttribute(`tabindex`),!1),this._addedRole&&=(e.removeAttribute(`role`),!1),e.removeAttribute(`aria-haspopup`),e.removeEventListener(`click`,this._onTargetClick),e.removeEventListener(`keydown`,this._onTargetKeydown),e.removeEventListener(`pointerenter`,this._onTickleIn),e.removeEventListener(`focus`,this._onTickleIn),e.removeEventListener(`pointerleave`,this._onTickleOut),e.removeEventListener(`blur`,this._onTickleOut),this.removeEventListener(`pointerenter`,this._onTickleIn),this.removeEventListener(`focusin`,this._onTickleIn),this.removeEventListener(`pointerleave`,this._onTickleOut),this.removeEventListener(`focusout`,this._onTickleOut),this._target=void 0)}_scheduleShow(){if(this._cancelHide(),this._cancelShow(),this.showDelay<=0){this.show();return}this._showTimeout=window.setTimeout(()=>this.show(),this.showDelay)}_scheduleHide(){if(this._cancelShow(),this._cancelHide(),this.hideDelay<=0){this.hide();return}this._hideTimeout=window.setTimeout(()=>this.hide(),this.hideDelay)}_cancelShow(){this._showTimeout!==void 0&&(window.clearTimeout(this._showTimeout),this._showTimeout=void 0)}_cancelHide(){this._hideTimeout!==void 0&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=void 0)}static{this.styles=[w,ue,r`
11700
+ `}};E([d({type:Number})],QE.prototype,`value`,void 0),E([d({type:String})],QE.prototype,`locales`,void 0),E([d({type:Object})],QE.prototype,`format`,void 0),E([d({type:String})],QE.prototype,`prefix`,void 0),E([d({type:String})],QE.prototype,`suffix`,void 0),E([d({type:String})],QE.prototype,`trend`,void 0),E([d({type:Boolean,attribute:`no-animate`})],QE.prototype,`noAnimate`,void 0),E([d({type:Boolean,attribute:!1})],QE.prototype,`respectMotionPreference`,void 0),E([m()],QE.prototype,`_cells`,void 0),QE=E([T(`ixfx-sliding-number`)],QE);let $E=0,eD=class extends n{constructor(...e){super(...e),this.for=``,this.mode=`explicit`,this.placement=`top`,this.dismiss=`auto`,this.showDelay=150,this.hideDelay=500,this._isOpen=!1,this._anchorName=`--ixfx-snackbar-anchor-${++$E}`,this._addedTabindex=!1,this._addedRole=!1,this._onTargetClick=()=>this.toggle(),this._onTargetKeydown=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.toggle())},this._onTickleIn=()=>this._scheduleShow(),this._onTickleOut=()=>this._scheduleHide(),this._onPanelClick=()=>{this.dismiss===`auto`&&this.hide()},this._onToggle=e=>{let{newState:n}=e;this._isOpen=n===`open`,n===`closed`&&this.contains(document.activeElement)&&this._target?.focus()},this._onBeforeToggle=e=>{let{newState:n}=e;this._recentCloseAt=n===`closed`?performance.now():void 0}}get isOpen(){return this._isOpen}show(){if(this.popover)try{this.showPopover()}catch{}}hide(){if(this.popover)try{this.hidePopover()}catch{}}toggle(){if(this.popover){if(this._recentCloseAt!==void 0&&performance.now()-this._recentCloseAt<50){this._recentCloseAt=void 0;return}try{this.togglePopover()}catch{}}}connectedCallback(){super.connectedCallback(),this.hasAttribute(`popover`)||(this.popover=`auto`),this.classList.add(`popup-surface`),this.addEventListener(`toggle`,this._onToggle),this.addEventListener(`beforetoggle`,this._onBeforeToggle),this.addEventListener(`click`,this._onPanelClick),this.style.setProperty(`position-anchor`,this._anchorName),this._attachToTarget()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`toggle`,this._onToggle),this.removeEventListener(`beforetoggle`,this._onBeforeToggle),this.removeEventListener(`click`,this._onPanelClick),this._detachFromTarget(),this._cancelShow(),this._cancelHide()}updated(e){super.updated(e),(e.has(`for`)||e.has(`mode`))&&this._attachToTarget()}_resolveTarget(){if(this.for)return this.getRootNode().getElementById(this.for)??void 0}_attachToTarget(){this._detachFromTarget();let e=this._resolveTarget();if(!e){this.for&&console.warn(`ixfx-snackbar: no element found with id "${this.for}"`);return}if(this._target=e,e.style.setProperty(`anchor-name`,this._anchorName),this.mode===`explicit`){let n=e.tabIndex>=0;n||(e.setAttribute(`tabindex`,`0`),this._addedTabindex=!0),!e.hasAttribute(`role`)&&!n&&(e.setAttribute(`role`,`button`),this._addedRole=!0),e.setAttribute(`aria-haspopup`,`true`),e.addEventListener(`click`,this._onTargetClick),n||e.addEventListener(`keydown`,this._onTargetKeydown)}else this.mode===`implicit`&&(e.addEventListener(`pointerenter`,this._onTickleIn),e.addEventListener(`focus`,this._onTickleIn),e.addEventListener(`pointerleave`,this._onTickleOut),e.addEventListener(`blur`,this._onTickleOut),this.addEventListener(`pointerenter`,this._onTickleIn),this.addEventListener(`focusin`,this._onTickleIn),this.addEventListener(`pointerleave`,this._onTickleOut),this.addEventListener(`focusout`,this._onTickleOut))}_detachFromTarget(){let e=this._target;e&&(e.style.removeProperty(`anchor-name`),this._addedTabindex&&=(e.removeAttribute(`tabindex`),!1),this._addedRole&&=(e.removeAttribute(`role`),!1),e.removeAttribute(`aria-haspopup`),e.removeEventListener(`click`,this._onTargetClick),e.removeEventListener(`keydown`,this._onTargetKeydown),e.removeEventListener(`pointerenter`,this._onTickleIn),e.removeEventListener(`focus`,this._onTickleIn),e.removeEventListener(`pointerleave`,this._onTickleOut),e.removeEventListener(`blur`,this._onTickleOut),this.removeEventListener(`pointerenter`,this._onTickleIn),this.removeEventListener(`focusin`,this._onTickleIn),this.removeEventListener(`pointerleave`,this._onTickleOut),this.removeEventListener(`focusout`,this._onTickleOut),this._target=void 0)}_scheduleShow(){if(this._cancelHide(),this._cancelShow(),this.showDelay<=0){this.show();return}this._showTimeout=window.setTimeout(()=>this.show(),this.showDelay)}_scheduleHide(){if(this._cancelShow(),this._cancelHide(),this.hideDelay<=0){this.hide();return}this._hideTimeout=window.setTimeout(()=>this.hide(),this.hideDelay)}_cancelShow(){this._showTimeout!==void 0&&(window.clearTimeout(this._showTimeout),this._showTimeout=void 0)}_cancelHide(){this._hideTimeout!==void 0&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=void 0)}static{this.styles=[w,ue,r`
11670
11701
  :host {
11671
11702
  display: flex;
11672
11703
  align-items: center;
@@ -11718,7 +11749,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11718
11749
  position-area: inline-end;
11719
11750
  margin-inline-start: var(--space-s);
11720
11751
  }
11721
- `]}render(){return i`<slot></slot>`}};E([d({type:String})],QE.prototype,`for`,void 0),E([d({type:String})],QE.prototype,`mode`,void 0),E([d({type:String,reflect:!0})],QE.prototype,`placement`,void 0),E([d({type:String})],QE.prototype,`dismiss`,void 0),E([d({type:Number,attribute:`show-delay`})],QE.prototype,`showDelay`,void 0),E([d({type:Number,attribute:`hide-delay`})],QE.prototype,`hideDelay`,void 0),E([m()],QE.prototype,`_isOpen`,void 0),QE=E([T(`ixfx-snackbar`)],QE);let $E=class extends n{constructor(...e){super(...e),this.orientation=`horizontal`,this.snapPositions=3,this.snapLogic=`balanced`,this.clickSnap=`closest`,this.snap=0,this._dragging=!1,this._dragStart=0,this._dragThreshold=10,this._thresholdReached=!1,this._currentDragIndex=0,this._child=null,this._onPointerDown=e=>{let n=this._getChild();if(!n)return;let r=this.getBoundingClientRect(),i=this._getSnapIndex(this._isHorizontal?e.clientX:e.clientY,r);if(n.contains(e.target))e.preventDefault(),e.stopPropagation(),this._dragging=!0,this._thresholdReached=!1,this._dragStart=this._isHorizontal?e.clientX:e.clientY,this._currentDragIndex=i,n.classList.add(`dragging`),document.addEventListener(`pointermove`,this._onPointerMove),document.addEventListener(`pointerup`,this._onPointerUp);else{let r;if(this.clickSnap===`step`){r=this.snap;let i=n.getBoundingClientRect(),a=this._isHorizontal?i.left+i.width/2:i.top+i.height/2,o=this._isHorizontal?e.clientX:e.clientY;o>a?r=Math.min(this.snapPositions-1,this.snap+1):o<a&&(r=Math.max(0,this.snap-1))}else r=i;if(r!==this.snap){let e=this.snap;this.snap=r,this._updateChildPosition(this.snap),this.dispatchEvent(new CustomEvent(`snap-change`,{detail:{previousSnap:e,newSnap:this.snap},bubbles:!0,composed:!0}))}else this._updateChildPosition(this.snap)}},this._onPointerMove=e=>{if(!this._dragging)return;let n=this._isHorizontal?e.clientX:e.clientY,r=n-this._dragStart,i=this.getBoundingClientRect();if(!this._thresholdReached&&Math.abs(r)<this._dragThreshold)return;this._thresholdReached=!0;let a=this._getSnapIndex(n,i);this._currentDragIndex=a,this._updateChildPosition(a),this.dispatchEvent(new CustomEvent(`snap-input`,{detail:{index:a},bubbles:!0,composed:!0}))},this._onPointerUp=()=>{if(!this._dragging)return;this._dragging=!1;let e=this._getChild();if(e&&e.classList.remove(`dragging`),document.removeEventListener(`pointermove`,this._onPointerMove),document.removeEventListener(`pointerup`,this._onPointerUp),this._thresholdReached&&this._currentDragIndex!==this.snap){let e=this.snap;this.snap=this._currentDragIndex,this._updateChildPosition(this.snap),this.dispatchEvent(new CustomEvent(`snap-change`,{detail:{previousSnap:e,newSnap:this.snap},bubbles:!0,composed:!0}))}else this._updateChildPosition(this.snap)},this._onKeyDown=e=>{let n=this.snap;if(this._isHorizontal){if(e.key===`ArrowLeft`)n=Math.max(0,this.snap-1);else if(e.key===`ArrowRight`)n=Math.min(this.snapPositions-1,this.snap+1);else return}else if(e.key===`ArrowUp`)n=Math.max(0,this.snap-1);else if(e.key===`ArrowDown`)n=Math.min(this.snapPositions-1,this.snap+1);else return;if(e.preventDefault(),n!==this.snap){let e=this.snap;this.snap=n,this._updateChildPosition(this.snap),this.dispatchEvent(new CustomEvent(`snap-change`,{detail:{previousSnap:e,newSnap:this.snap},bubbles:!0,composed:!0}))}}}static{this.styles=r`
11752
+ `]}render(){return i`<slot></slot>`}};E([d({type:String})],eD.prototype,`for`,void 0),E([d({type:String})],eD.prototype,`mode`,void 0),E([d({type:String,reflect:!0})],eD.prototype,`placement`,void 0),E([d({type:String})],eD.prototype,`dismiss`,void 0),E([d({type:Number,attribute:`show-delay`})],eD.prototype,`showDelay`,void 0),E([d({type:Number,attribute:`hide-delay`})],eD.prototype,`hideDelay`,void 0),E([m()],eD.prototype,`_isOpen`,void 0),eD=E([T(`ixfx-snackbar`)],eD);let tD=class extends n{constructor(...e){super(...e),this.orientation=`horizontal`,this.snapPositions=3,this.snapLogic=`balanced`,this.clickSnap=`closest`,this.snap=0,this._dragging=!1,this._dragStart=0,this._dragThreshold=10,this._thresholdReached=!1,this._currentDragIndex=0,this._child=null,this._onPointerDown=e=>{let n=this._getChild();if(!n)return;let r=this.getBoundingClientRect(),i=this._getSnapIndex(this._isHorizontal?e.clientX:e.clientY,r);if(n.contains(e.target))e.preventDefault(),e.stopPropagation(),this._dragging=!0,this._thresholdReached=!1,this._dragStart=this._isHorizontal?e.clientX:e.clientY,this._currentDragIndex=i,n.classList.add(`dragging`),document.addEventListener(`pointermove`,this._onPointerMove),document.addEventListener(`pointerup`,this._onPointerUp);else{let r;if(this.clickSnap===`step`){r=this.snap;let i=n.getBoundingClientRect(),a=this._isHorizontal?i.left+i.width/2:i.top+i.height/2,o=this._isHorizontal?e.clientX:e.clientY;o>a?r=Math.min(this.snapPositions-1,this.snap+1):o<a&&(r=Math.max(0,this.snap-1))}else r=i;if(r!==this.snap){let e=this.snap;this.snap=r,this._updateChildPosition(this.snap),this.dispatchEvent(new CustomEvent(`snap-change`,{detail:{previousSnap:e,newSnap:this.snap},bubbles:!0,composed:!0}))}else this._updateChildPosition(this.snap)}},this._onPointerMove=e=>{if(!this._dragging)return;let n=this._isHorizontal?e.clientX:e.clientY,r=n-this._dragStart,i=this.getBoundingClientRect();if(!this._thresholdReached&&Math.abs(r)<this._dragThreshold)return;this._thresholdReached=!0;let a=this._getSnapIndex(n,i);this._currentDragIndex=a,this._updateChildPosition(a),this.dispatchEvent(new CustomEvent(`snap-input`,{detail:{index:a},bubbles:!0,composed:!0}))},this._onPointerUp=()=>{if(!this._dragging)return;this._dragging=!1;let e=this._getChild();if(e&&e.classList.remove(`dragging`),document.removeEventListener(`pointermove`,this._onPointerMove),document.removeEventListener(`pointerup`,this._onPointerUp),this._thresholdReached&&this._currentDragIndex!==this.snap){let e=this.snap;this.snap=this._currentDragIndex,this._updateChildPosition(this.snap),this.dispatchEvent(new CustomEvent(`snap-change`,{detail:{previousSnap:e,newSnap:this.snap},bubbles:!0,composed:!0}))}else this._updateChildPosition(this.snap)},this._onKeyDown=e=>{let n=this.snap;if(this._isHorizontal){if(e.key===`ArrowLeft`)n=Math.max(0,this.snap-1);else if(e.key===`ArrowRight`)n=Math.min(this.snapPositions-1,this.snap+1);else return}else if(e.key===`ArrowUp`)n=Math.max(0,this.snap-1);else if(e.key===`ArrowDown`)n=Math.min(this.snapPositions-1,this.snap+1);else return;if(e.preventDefault(),n!==this.snap){let e=this.snap;this.snap=n,this._updateChildPosition(this.snap),this.dispatchEvent(new CustomEvent(`snap-change`,{detail:{previousSnap:e,newSnap:this.snap},bubbles:!0,composed:!0}))}}}static{this.styles=r`
11722
11753
  :host {
11723
11754
  display: block;
11724
11755
  position: relative;
@@ -11782,7 +11813,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11782
11813
  >
11783
11814
  <slot></slot>
11784
11815
  </div>
11785
- `}};E([d({type:String,attribute:`orientation`})],$E.prototype,`orientation`,void 0),E([d({type:Number,attribute:`snap-positions`})],$E.prototype,`snapPositions`,void 0),E([d({type:String,attribute:`snap-logic`})],$E.prototype,`snapLogic`,void 0),E([d({type:String,attribute:`click-snap`})],$E.prototype,`clickSnap`,void 0),E([d({type:Number})],$E.prototype,`snap`,void 0),E([m()],$E.prototype,`_dragging`,void 0),$E=E([T(`ixfx-snap-container`)],$E);let eD=class extends Oy(n){constructor(...e){super(...e),this.barSpacing=20,this.barWidth=14,this.debounceMs=200,this.retractDurationMs=400,this._startX=0,this._currentX=0,this._pointerId=null,this._componentWidth=0,this._isDragging=!1,this._offset=0,this._width=0,this._height=0,this._animRafId=null,this._debounceTimer=null,this._animStartOffset=0,this._animStartTime=null,this._resizeObserver=null,this.#e=e=>{if(e.pointerId!==this._pointerId)return;this.#r();let n=this.getBoundingClientRect();if(e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom){let e=this._currentX-this._startX,n=Math.max(-1,Math.min(1,e/this._componentWidth));this.#n(n)}this._isDragging=!1,this._pointerId=null,this.#i()},this.#t=e=>{e.pointerId===this._pointerId&&(this.#r(),this._isDragging=!1,this._pointerId=null,this.#i())},this._onPointerDown=e=>{e.preventDefault(),this.#o(),e.target.setPointerCapture(e.pointerId),this._pointerId=e.pointerId,this._startX=e.clientX,this._currentX=e.clientX,this._componentWidth=this.getBoundingClientRect().width,this._isDragging=!0,window.addEventListener(`pointerup`,this.#e),window.addEventListener(`pointercancel`,this.#t)},this._onPointerMove=e=>{if(!this._isDragging||e.pointerId!==this._pointerId)return;this._currentX=e.clientX;let n=this._currentX-this._startX,r=Math.max(-1,Math.min(1,n/this._componentWidth));this._offset=r*this._height*.5,this.requestUpdate()}}#e;#t;#n(e){this.dispatchEvent(new CustomEvent(`input`,{detail:{value:e},bubbles:!0,composed:!0}))}_applyWheelDelta(e,n){this.#o();let r=n.shiftKey?.05:.1,i=Math.max(-1,Math.min(1,e*r));this.#n(i),this._offset=i*this._height*.5,this.requestUpdate(),this.#i()}connectedCallback(){super.connectedCallback(),this._resizeObserver=new ResizeObserver(e=>{let n=e[0];n&&(this._width=n.contentRect.width,this._height=n.contentRect.height,this.requestUpdate())}),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),this._resizeObserver=null,this.#o(),this.#r(),this._isDragging=!1,this._pointerId=null}#r(){window.removeEventListener(`pointerup`,this.#e),window.removeEventListener(`pointercancel`,this.#t)}#i(){this._debounceTimer!==null&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>{this._debounceTimer=null,this.#a()},this.debounceMs)}#a(){this._animStartOffset=this._offset,this._animStartTime=null;let e=n=>{this._animStartTime===null&&(this._animStartTime=n);let r=n-this._animStartTime,i=Math.min(r/this.retractDurationMs,1),a=1-(1-i)**3;this._offset=this._animStartOffset*(1-a),this.requestUpdate(),i<1?this._animRafId=requestAnimationFrame(e):(this._offset=0,this._animRafId=null,this.requestUpdate())};this._animRafId=requestAnimationFrame(e)}#o(){this._animRafId!==null&&(cancelAnimationFrame(this._animRafId),this._animRafId=null),this._debounceTimer!==null&&(clearTimeout(this._debounceTimer),this._debounceTimer=null)}#s(){let e=this._width,n=this._height,r=this._offset,{barSpacing:i,barWidth:a}=this;if(e===0||n===0)return s``;let o=a/2,c=n/2,l=Math.ceil(e/i)+1;return s`${Array.from({length:l},(e,a)=>{let l=a*i,u=l-o,d=l+o,f=a%2==0?`var(--swipe-color-a, var(--surface-4))`:`var(--swipe-color-b, var(--surface-5))`,p=`M${u},0 L${d},0 L${d+r},${c} L${d},${n} L${u},${n} L${u+r},${c}Z`;return s`<path d=${p} style="fill:${f}"></path>`})}`}static{this.styles=[w,sn,r`
11816
+ `}};E([d({type:String,attribute:`orientation`})],tD.prototype,`orientation`,void 0),E([d({type:Number,attribute:`snap-positions`})],tD.prototype,`snapPositions`,void 0),E([d({type:String,attribute:`snap-logic`})],tD.prototype,`snapLogic`,void 0),E([d({type:String,attribute:`click-snap`})],tD.prototype,`clickSnap`,void 0),E([d({type:Number})],tD.prototype,`snap`,void 0),E([m()],tD.prototype,`_dragging`,void 0),tD=E([T(`ixfx-snap-container`)],tD);let nD=class extends Oy(n){constructor(...e){super(...e),this.barSpacing=20,this.barWidth=14,this.debounceMs=200,this.retractDurationMs=400,this._startX=0,this._currentX=0,this._pointerId=null,this._componentWidth=0,this._isDragging=!1,this._offset=0,this._width=0,this._height=0,this._animRafId=null,this._debounceTimer=null,this._animStartOffset=0,this._animStartTime=null,this._resizeObserver=null,this.#e=e=>{if(e.pointerId!==this._pointerId)return;this.#r();let n=this.getBoundingClientRect();if(e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom){let e=this._currentX-this._startX,n=Math.max(-1,Math.min(1,e/this._componentWidth));this.#n(n)}this._isDragging=!1,this._pointerId=null,this.#i()},this.#t=e=>{e.pointerId===this._pointerId&&(this.#r(),this._isDragging=!1,this._pointerId=null,this.#i())},this._onPointerDown=e=>{e.preventDefault(),this.#o(),e.target.setPointerCapture(e.pointerId),this._pointerId=e.pointerId,this._startX=e.clientX,this._currentX=e.clientX,this._componentWidth=this.getBoundingClientRect().width,this._isDragging=!0,window.addEventListener(`pointerup`,this.#e),window.addEventListener(`pointercancel`,this.#t)},this._onPointerMove=e=>{if(!this._isDragging||e.pointerId!==this._pointerId)return;this._currentX=e.clientX;let n=this._currentX-this._startX,r=Math.max(-1,Math.min(1,n/this._componentWidth));this._offset=r*this._height*.5,this.requestUpdate()}}#e;#t;#n(e){this.dispatchEvent(new CustomEvent(`input`,{detail:{value:e},bubbles:!0,composed:!0}))}_applyWheelDelta(e,n){this.#o();let r=n.shiftKey?.05:.1,i=Math.max(-1,Math.min(1,e*r));this.#n(i),this._offset=i*this._height*.5,this.requestUpdate(),this.#i()}connectedCallback(){super.connectedCallback(),this._resizeObserver=new ResizeObserver(e=>{let n=e[0];n&&(this._width=n.contentRect.width,this._height=n.contentRect.height,this.requestUpdate())}),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),this._resizeObserver=null,this.#o(),this.#r(),this._isDragging=!1,this._pointerId=null}#r(){window.removeEventListener(`pointerup`,this.#e),window.removeEventListener(`pointercancel`,this.#t)}#i(){this._debounceTimer!==null&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>{this._debounceTimer=null,this.#a()},this.debounceMs)}#a(){this._animStartOffset=this._offset,this._animStartTime=null;let e=n=>{this._animStartTime===null&&(this._animStartTime=n);let r=n-this._animStartTime,i=Math.min(r/this.retractDurationMs,1),a=1-(1-i)**3;this._offset=this._animStartOffset*(1-a),this.requestUpdate(),i<1?this._animRafId=requestAnimationFrame(e):(this._offset=0,this._animRafId=null,this.requestUpdate())};this._animRafId=requestAnimationFrame(e)}#o(){this._animRafId!==null&&(cancelAnimationFrame(this._animRafId),this._animRafId=null),this._debounceTimer!==null&&(clearTimeout(this._debounceTimer),this._debounceTimer=null)}#s(){let e=this._width,n=this._height,r=this._offset,{barSpacing:i,barWidth:a}=this;if(e===0||n===0)return s``;let o=a/2,c=n/2,l=Math.ceil(e/i)+1;return s`${Array.from({length:l},(e,a)=>{let l=a*i,u=l-o,d=l+o,f=a%2==0?`var(--swipe-color-a, var(--surface-4))`:`var(--swipe-color-b, var(--surface-5))`,p=`M${u},0 L${d},0 L${d+r},${c} L${d},${n} L${u},${n} L${u+r},${c}Z`;return s`<path d=${p} style="fill:${f}"></path>`})}`}static{this.styles=[w,sn,r`
11786
11817
  :host {
11787
11818
  display: block;
11788
11819
  user-select: none;
@@ -11818,7 +11849,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11818
11849
  >
11819
11850
  <svg aria-hidden="true">${this.#s()}</svg>
11820
11851
  </div>
11821
- `}};E([d({type:Number})],eD.prototype,`barSpacing`,void 0),E([d({type:Number})],eD.prototype,`barWidth`,void 0),E([d({type:Number})],eD.prototype,`debounceMs`,void 0),E([d({type:Number})],eD.prototype,`retractDurationMs`,void 0),eD=E([T(`ixfx-swipe`)],eD);let tD=class extends n{render(){return i`<slot></slot>`}static{this.styles=[w,r`
11852
+ `}};E([d({type:Number})],nD.prototype,`barSpacing`,void 0),E([d({type:Number})],nD.prototype,`barWidth`,void 0),E([d({type:Number})],nD.prototype,`debounceMs`,void 0),E([d({type:Number})],nD.prototype,`retractDurationMs`,void 0),nD=E([T(`ixfx-swipe`)],nD);let rD=class extends n{render(){return i`<slot></slot>`}static{this.styles=[w,r`
11822
11853
  :host {
11823
11854
  display:none;
11824
11855
  height:100%;
@@ -11829,12 +11860,12 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11829
11860
  background: var(--surface-3);
11830
11861
  display:block;
11831
11862
  }
11832
- `]}};tD=E([T(`ixfx-tab-panel`)],tD);var nD=class{#e;#t;#n;#r=[];#i;#a;#o;#s=new Set;constructor(e,n,r={}){this.#e=e,this.#t=n,this.#n=r,this.#o=r.commands}connect(){this.disconnect(),this.#i=new AbortController;let{signal:e}=this.#i;this.#e.addEventListener(`change`,this.#c,{signal:e}),this.#e.addEventListener(`reorder`,this.#l,{signal:e}),this.#e.addEventListener(`close`,this.#u,{signal:e}),this.#a=new MutationObserver(()=>this.#x()),this.#a.observe(this.#e,{childList:!0}),this.#a.observe(this.#t,{childList:!0}),this.#x(),this.#t.syncWithList(this.#e);for(let e of this.#r)this.#C(e)}disconnect(){this.#i?.abort(),this.#i=void 0,this.#a?.disconnect(),this.#a=void 0;for(let e of this.#r)this.#w(e);this.#s.clear(),this.#r=[]}selectTab(e){let n=this.#f(e);if(!n)return!1;let r=this.getSelected();return r?.id===n.id?(this.#t.selectPanel(n.forId),!0):(this.#e.selectElement(n.item),this.#t.selectPanel(n.forId),this.#n.onSelect?.(n,r),!0)}selectNext(){return this.#d(1)}selectPrevious(){return this.#d(-1)}getSelected(){return this.#r.find(e=>e.item.hasAttribute(`selected`))}getTabs(){return[...this.#r]}getTab(e){return this.#r.find(n=>n.id===e)}addTab(e){let{id:n,forId:r}=this.#g(e),i=document.createElement(`ixfx-tab-list-item`);i.id=n,i.setAttribute(`for`,r),i.closeable=e.closeable??!0,i.append(e.label),e.iconName&&(i.iconName=e.iconName),e.description&&(i.description=e.description);for(let n of e.toolbar??[])n.slot=`toolbar`,i.append(n);let a=document.createElement(`ixfx-tab-panel`);a.id=r,e.content!==void 0&&this.#y(a,e.content);let o=Math.max(0,Math.min(e.index??this.#r.length,this.#r.length));this.#b(this.#e,i,o),this.#b(this.#t,a,o);let s={id:n,forId:r,item:i,panel:a,label:e.label,iconName:e.iconName};return this.#r.splice(o,0,s),this.#C(s),this.#n.onAdd?.(s),(e.select??!0)&&this.selectTab(n),s}removeTab(e){let n=this.#f(e);if(!n)return!1;let r=this.#r.indexOf(n),i=n.item.hasAttribute(`selected`)?this.#m(r):void 0;return n.item.remove(),n.panel.remove(),this.#h(n),this.#w(n),this.#n.onRemove?.(n),i&&this.selectTab(i.id),!0}renameTab(e,n){let r=this.#f(e);if(!r)return!1;for(let e of[...r.item.childNodes])(e.nodeType!==Node.ELEMENT_NODE||e.slot!==`toolbar`)&&r.item.removeChild(e);return r.item.prepend(n),r.label=n,this.#T(r),!0}setTabIcon(e,n){let r=this.#f(e);return r?(n?(r.item.iconName=n,r.iconName=n):(r.item.iconName=void 0,r.item.removeAttribute(`icon-name`),r.iconName=void 0),!0):!1}#c=e=>{let n=e.detail;this.#t.selectPanel(n.for);let r=this.#r.find(e=>e.forId===n.for);if(!r)return;let i=n.previous?this.#r.find(e=>e.id===n.previous):void 0;this.#n.onSelect?.(r,i)};#l=()=>{this.#x(),this.#n.onReorder?.(this.#r)};#u=e=>{let n=e.target?.closest(`ixfx-tab-list-item`),r=n?this.#p(n):void 0;if(!r)return;let i=this.#r.indexOf(r),a=r.item.hasAttribute(`selected`)?this.#m(i):void 0;r.panel.remove(),this.#h(r),this.#w(r),this.#n.onRemove?.(r),a&&this.selectTab(a.id)};#d(e){let n=this.#r;if(n.length===0)return!1;let r=this.getSelected(),i=((r?n.indexOf(r):e===1?-1:0)+e+n.length)%n.length;return this.selectTab(n[i].id)}#f(e){if(typeof e!=`string`)return this.#r.find(n=>n.item===e);let n=e.trim().toLowerCase();return this.#r.find(n=>n.id===e)??this.#r.find(n=>n.forId===e)??this.#r.find(e=>e.label.toLowerCase()===n)}#p(e){return this.#r.find(n=>n.item===e)}#m(e){let n=this.#r;if(!(n.length<=1))return n[e+1]??n[e-1]}#h(e){let n=this.#r.indexOf(e);n>=0&&this.#r.splice(n,1)}#g(e){let n=this.#_(e.label)||`tab`;return{id:e.id??this.#v(`tab-${n}`),forId:e.forId??this.#v(`panel-${n}`)}}#_(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)}#v(e){let n=e,r=2;for(;document.getElementById(n);)n=`${e}-${r++}`;return n}#y(e,n){if(typeof n==`function`){n(e);return}if(typeof n==`string`){e.append(document.createTextNode(n));return}e.append(n)}#b(e,n,r){let i=Array.from(e.children);e.insertBefore(n,i[r]??null)}#x(){let e=new Map;for(let n of this.#t.querySelectorAll(`ixfx-tab-panel`))e.set(n.id,n);let n=[];for(let r of this.#e.querySelectorAll(`ixfx-tab-list-item`)){let i=r.getAttribute(`for`)??``,a=e.get(i);a&&n.push({id:r.id||i,forId:i,item:r,panel:a,label:this.#S(r),iconName:r.iconName})}this.#r=n}#S(e){let n=``;for(let r of e.childNodes)r instanceof Element&&r.getAttribute(`slot`)===`toolbar`||(n+=r.textContent??``);return n.trim()}#C(e){this.#o&&(e.item.commandActive||this.#o.has(e.id)||(this.#o.register({id:e.id,label:e.label,description:e.item.description??e.label,icon:e.iconName,execute:()=>{this.selectTab(e.id)}}),this.#s.add(e.id)))}#w(e){this.#o&&this.#s.has(e.id)&&(this.#o.unregister(e.id),this.#s.delete(e.id))}#T(e){if(!this.#o||!this.#s.has(e.id))return;let n=this.#o.get(e.id);n&&(this.#o.unregister(e.id),this.#o.register({...n,label:e.label}))}};let rD=class extends n{#e;render(){return i`<slot></slot>`}getSelectedElement(){for(let e of this._listItems)if(this.#t(e))return e}#t(e){return e.hasAttribute(`selected`)}#n(e){e.removeAttribute(`selected`),this.onUnselectedPanel&&this.onUnselectedPanel(e.id,e)}#r(e){this.onSelectingPanel&&this.onSelectingPanel(e.id,e),e.setAttribute(`selected`,``),this.onSelectedPanel&&this.onSelectedPanel(e.id,e)}syncWithList(e){this.#e=e,Promise.all([e.updateComplete,this.updateComplete]).then(()=>{let n=e.getSelectedElement();if(!n)return;let r=n.getAttribute(`for`);r&&this.selectPanel(r)})}selectPanel(e){let n=this.getSelectedElement();if(n){if(n.id===e)return;this.#n(n)}let r=!1;for(let n of this._listItems)n.id===e&&(this.#r(n),r=!0);return r}selectTab(e){let n=this.#i(e);return n?(this.#e?.selectElement(n),this.selectPanel(n.getAttribute(`for`)??``)===!0):this.selectPanel(e)===!0}#i(e){let n=this.#e;if(!n)return;let r=Array.from(n.querySelectorAll(`ixfx-tab-list-item`));for(let n of r)if(n.getAttribute(`for`)===e)return n;let i=e.trim().toLowerCase();for(let e of r)if(this.#a(e).toLowerCase()===i)return e}#a(e){let n=``;for(let r of e.childNodes)r instanceof Element&&r.getAttribute(`slot`)===`toolbar`||(n+=r.textContent??``);return n.trim()}static{this.styles=r`
11863
+ `]}};rD=E([T(`ixfx-tab-panel`)],rD);var iD=class{#e;#t;#n;#r=[];#i;#a;#o;#s=new Set;constructor(e,n,r={}){this.#e=e,this.#t=n,this.#n=r,this.#o=r.commands}connect(){this.disconnect(),this.#i=new AbortController;let{signal:e}=this.#i;this.#e.addEventListener(`change`,this.#c,{signal:e}),this.#e.addEventListener(`reorder`,this.#l,{signal:e}),this.#e.addEventListener(`close`,this.#u,{signal:e}),this.#a=new MutationObserver(()=>this.#x()),this.#a.observe(this.#e,{childList:!0}),this.#a.observe(this.#t,{childList:!0}),this.#x(),this.#t.syncWithList(this.#e);for(let e of this.#r)this.#C(e)}disconnect(){this.#i?.abort(),this.#i=void 0,this.#a?.disconnect(),this.#a=void 0;for(let e of this.#r)this.#w(e);this.#s.clear(),this.#r=[]}selectTab(e){let n=this.#f(e);if(!n)return!1;let r=this.getSelected();return r?.id===n.id?(this.#t.selectPanel(n.forId),!0):(this.#e.selectElement(n.item),this.#t.selectPanel(n.forId),this.#n.onSelect?.(n,r),!0)}selectNext(){return this.#d(1)}selectPrevious(){return this.#d(-1)}getSelected(){return this.#r.find(e=>e.item.hasAttribute(`selected`))}getTabs(){return[...this.#r]}getTab(e){return this.#r.find(n=>n.id===e)}addTab(e){let{id:n,forId:r}=this.#g(e),i=document.createElement(`ixfx-tab-list-item`);i.id=n,i.setAttribute(`for`,r),i.closeable=e.closeable??!0,i.append(e.label),e.iconName&&(i.iconName=e.iconName),e.description&&(i.description=e.description);for(let n of e.toolbar??[])n.slot=`toolbar`,i.append(n);let a=document.createElement(`ixfx-tab-panel`);a.id=r,e.content!==void 0&&this.#y(a,e.content);let o=Math.max(0,Math.min(e.index??this.#r.length,this.#r.length));this.#b(this.#e,i,o),this.#b(this.#t,a,o);let s={id:n,forId:r,item:i,panel:a,label:e.label,iconName:e.iconName};return this.#r.splice(o,0,s),this.#C(s),this.#n.onAdd?.(s),(e.select??!0)&&this.selectTab(n),s}removeTab(e){let n=this.#f(e);if(!n)return!1;let r=this.#r.indexOf(n),i=n.item.hasAttribute(`selected`)?this.#m(r):void 0;return n.item.remove(),n.panel.remove(),this.#h(n),this.#w(n),this.#n.onRemove?.(n),i&&this.selectTab(i.id),!0}renameTab(e,n){let r=this.#f(e);if(!r)return!1;for(let e of[...r.item.childNodes])(e.nodeType!==Node.ELEMENT_NODE||e.slot!==`toolbar`)&&r.item.removeChild(e);return r.item.prepend(n),r.label=n,this.#T(r),!0}setTabIcon(e,n){let r=this.#f(e);return r?(n?(r.item.iconName=n,r.iconName=n):(r.item.iconName=void 0,r.item.removeAttribute(`icon-name`),r.iconName=void 0),!0):!1}#c=e=>{let n=e.detail;this.#t.selectPanel(n.for);let r=this.#r.find(e=>e.forId===n.for);if(!r)return;let i=n.previous?this.#r.find(e=>e.id===n.previous):void 0;this.#n.onSelect?.(r,i)};#l=()=>{this.#x(),this.#n.onReorder?.(this.#r)};#u=e=>{let n=e.target?.closest(`ixfx-tab-list-item`),r=n?this.#p(n):void 0;if(!r)return;let i=this.#r.indexOf(r),a=r.item.hasAttribute(`selected`)?this.#m(i):void 0;r.panel.remove(),this.#h(r),this.#w(r),this.#n.onRemove?.(r),a&&this.selectTab(a.id)};#d(e){let n=this.#r;if(n.length===0)return!1;let r=this.getSelected(),i=((r?n.indexOf(r):e===1?-1:0)+e+n.length)%n.length;return this.selectTab(n[i].id)}#f(e){if(typeof e!=`string`)return this.#r.find(n=>n.item===e);let n=e.trim().toLowerCase();return this.#r.find(n=>n.id===e)??this.#r.find(n=>n.forId===e)??this.#r.find(e=>e.label.toLowerCase()===n)}#p(e){return this.#r.find(n=>n.item===e)}#m(e){let n=this.#r;if(!(n.length<=1))return n[e+1]??n[e-1]}#h(e){let n=this.#r.indexOf(e);n>=0&&this.#r.splice(n,1)}#g(e){let n=this.#_(e.label)||`tab`;return{id:e.id??this.#v(`tab-${n}`),forId:e.forId??this.#v(`panel-${n}`)}}#_(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)}#v(e){let n=e,r=2;for(;document.getElementById(n);)n=`${e}-${r++}`;return n}#y(e,n){if(typeof n==`function`){n(e);return}if(typeof n==`string`){e.append(document.createTextNode(n));return}e.append(n)}#b(e,n,r){let i=Array.from(e.children);e.insertBefore(n,i[r]??null)}#x(){let e=new Map;for(let n of this.#t.querySelectorAll(`ixfx-tab-panel`))e.set(n.id,n);let n=[];for(let r of this.#e.querySelectorAll(`ixfx-tab-list-item`)){let i=r.getAttribute(`for`)??``,a=e.get(i);a&&n.push({id:r.id||i,forId:i,item:r,panel:a,label:this.#S(r),iconName:r.iconName})}this.#r=n}#S(e){let n=``;for(let r of e.childNodes)r instanceof Element&&r.getAttribute(`slot`)===`toolbar`||(n+=r.textContent??``);return n.trim()}#C(e){this.#o&&(e.item.commandActive||this.#o.has(e.id)||(this.#o.register({id:e.id,label:e.label,description:e.item.description??e.label,icon:e.iconName,execute:()=>{this.selectTab(e.id)}}),this.#s.add(e.id)))}#w(e){this.#o&&this.#s.has(e.id)&&(this.#o.unregister(e.id),this.#s.delete(e.id))}#T(e){if(!this.#o||!this.#s.has(e.id))return;let n=this.#o.get(e.id);n&&(this.#o.unregister(e.id),this.#o.register({...n,label:e.label}))}};let aD=class extends n{#e;render(){return i`<slot></slot>`}getSelectedElement(){for(let e of this._listItems)if(this.#t(e))return e}#t(e){return e.hasAttribute(`selected`)}#n(e){e.removeAttribute(`selected`),this.onUnselectedPanel&&this.onUnselectedPanel(e.id,e)}#r(e){this.onSelectingPanel&&this.onSelectingPanel(e.id,e),e.setAttribute(`selected`,``),this.onSelectedPanel&&this.onSelectedPanel(e.id,e)}syncWithList(e){this.#e=e,Promise.all([e.updateComplete,this.updateComplete]).then(()=>{let n=e.getSelectedElement();if(!n)return;let r=n.getAttribute(`for`);r&&this.selectPanel(r)})}selectPanel(e){let n=this.getSelectedElement();if(n){if(n.id===e)return;this.#n(n)}let r=!1;for(let n of this._listItems)n.id===e&&(this.#r(n),r=!0);return r}selectTab(e){let n=this.#i(e);return n?(this.#e?.selectElement(n),this.selectPanel(n.getAttribute(`for`)??``)===!0):this.selectPanel(e)===!0}#i(e){let n=this.#e;if(!n)return;let r=Array.from(n.querySelectorAll(`ixfx-tab-list-item`));for(let n of r)if(n.getAttribute(`for`)===e)return n;let i=e.trim().toLowerCase();for(let e of r)if(this.#a(e).toLowerCase()===i)return e}#a(e){let n=``;for(let r of e.childNodes)r instanceof Element&&r.getAttribute(`slot`)===`toolbar`||(n+=r.textContent??``);return n.trim()}static{this.styles=r`
11833
11864
  :host {
11834
11865
  display: block;
11835
11866
  }
11836
11867
 
11837
- `}};E([p()],rD.prototype,`_listItems`,void 0),rD=E([T(`ixfx-tab-panels`)],rD);let iD=class extends n{constructor(...e){super(...e),this.text=``,this.paused=!1}render(){return i`<span class="shimmer" part="text"
11868
+ `}};E([p()],aD.prototype,`_listItems`,void 0),aD=E([T(`ixfx-tab-panels`)],aD);let oD=class extends n{constructor(...e){super(...e),this.text=``,this.paused=!1}render(){return i`<span class="shimmer" part="text"
11838
11869
  >${this.text===``?i`<slot></slot>`:this.text}</span
11839
11870
  >`}static{this.styles=r`
11840
11871
  :host {
@@ -11890,7 +11921,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
11890
11921
  -webkit-text-fill-color: var(--text-shimmer-color);
11891
11922
  }
11892
11923
  }
11893
- `}};E([d({type:String})],iD.prototype,`text`,void 0),E([d({type:Boolean,reflect:!0})],iD.prototype,`paused`,void 0),iD=E([T(`ixfx-text-shimmer`)],iD);var aD=class{#e;#t;#n=120;#r=4;#i=4;constructor(e,n){this.#e=e,this.#t=n,e.min=n.logicalMin,e.max=n.logicalMax,n.labelFormatter&&(e.formatLabel=n.labelFormatter),e.addEventListener(`track-select`,this.#a)}setTempo(e){this.#n=e,this.#o()}setTimeSignature(e,n){this.#r=e,this.#i=n,this.#o()}setViewRange(e){this.#e.setViewRange(e)}dispose(){this.#e.removeEventListener(`track-select`,this.#a)}#a=e=>{let n=e.detail,r=this.#e.getTrackEvents(n.trackKey).map(e=>e.id);if(n.shiftKey){let e=new Set(this.#e.selectedIds);for(let n of r)e.has(n)?e.delete(n):e.add(n);this.#e.selectedIds=[...e]}else this.#e.selectedIds=r};#o(){if(this.#t.labelFormatter)return;this.#n;let e=this.#r;this.#e.formatLabel=n=>{let r=e,i=n;return`${Math.floor(i/r)+1}.${Math.floor(i%r)+1}`}}};const oD=[1,2,5,10];function sD(e,n,r,i=`adaptive`,a,o){return i===`fixed`&&a!==void 0&&o!==void 0?lD(a,o):cD(e,n,r)}function cD(e,n,r){let i=e.max-e.min;if(i<=0||r<=0)return{majorStep:100,minorDivisions:4,minorStep:25};let a=80*uD(n),o=i/Math.max(2,Math.floor(r/a)),s=10**Math.floor(Math.log10(o)),c=s;for(let e of oD){let n=e*s;if(n>=o*.8){c=n;break}}let l=c/s,u=l===5||l===10?5:4,d=c/u;return{majorStep:c,minorDivisions:u,minorStep:d}}function lD(e,n){let r=e;for(;r*n<5&&r<0xe8d4a51000;)r*=2;return{majorStep:r*4,minorDivisions:4,minorStep:r}}function uD(e){switch(e){case`x-wide`:return 2;case`wide`:return 1.5;case`normal`:return 1;case`slim`:return .7;case`x-slim`:return .5;default:return 1}}function dD(e,n,r,i,a,o){let{majorStep:s,minorStep:c}=r;if(s<=0)return;let l=n.x+n.width;if(i){e.fillStyle=a[`--timeline-alt-major-bg`]??`rgba(255,255,255,0.03)`;let r=Math.floor(n.x/s);for(let i=r;i*s<l;i++)if(i%2!=0){let r=i*s*o;e.fillRect(r,n.y,s*o,n.height)}}if(c>0){e.strokeStyle=a[`--timeline-grid-minor-color`]??`rgba(255,255,255,0.05)`,e.lineWidth=Number.parseFloat(a[`--timeline-grid-minor-width`]??`0.5`),e.beginPath();let r=Math.floor(n.x/c)*c;for(let i=r;i<l;i+=c){if(Math.abs(i%s)<c*.01)continue;let r=i*o;e.moveTo(r,n.y),e.lineTo(r,n.y+n.height)}e.stroke()}e.strokeStyle=a[`--timeline-grid-major-color`]??`rgba(255,255,255,0.12)`,e.lineWidth=Number.parseFloat(a[`--timeline-grid-major-width`]??`1`),e.beginPath();let u=Math.floor(n.x/s)*s;for(let r=u;r<l;r+=s){let i=r*o;e.moveTo(i,n.y),e.lineTo(i,n.y+n.height)}e.stroke()}function fD(e,n,r,i,a,o,s,c=0){let{majorStep:l}=r;if(l<=0||i<=0)return;let u=c,d=c+i;if(n.y+n.height<u||n.y>d)return;let f=n.x+n.width,p=i-6;e.fillStyle=o[`--timeline-bg`]??`#111`;let m=n.x*s;e.fillRect(m,u,n.width*s,p),e.strokeStyle=o[`--timeline-grid-major-color`]??`rgba(255,255,255,0.12)`,e.lineWidth=Number.parseFloat(o[`--timeline-grid-major-width`]??`1`),e.beginPath();let h=Math.ceil(n.x/l)*l;for(let n=h;n<f;n+=l){let r=n*s;e.moveTo(r,u+p),e.lineTo(r,d)}e.stroke(),e.strokeStyle=o[`--timeline-grid-major-color`]??`rgba(255,255,255,0.12)`,e.lineWidth=1,e.beginPath(),e.moveTo(m,d),e.lineTo(m+n.width*s,d),e.stroke(),e.fillStyle=o[`--timeline-axis-label-color`]??`rgba(255,255,255,0.5)`,e.font=`11px system-ui, sans-serif`,e.textBaseline=`middle`,e.textAlign=`left`;for(let n=h;n<f;n+=l){let r=n*s;e.fillText(a(n),r+4,u+p/2)}e.textAlign=`start`}function pD(e,n,r,i,a,o){let s=a[`--timeline-track-bg`]??`#1a1a1a`,c=a[`--timeline-track-bg-alt`]??`#1e1e1e`;for(let l=0;l<r.length;l++){let u=r[l];if(u.y+u.height<n.y)continue;if(u.y>n.y+n.height)break;let d=i.find(e=>e.key===u.trackKey);e.fillStyle=d?.color?`${d.color}22`:l%2==0?s:c,e.fillRect(n.x*o,u.y,n.width*o,u.height),e.strokeStyle=a[`--timeline-grid-major-color`]??`rgba(255,255,255,0.12)`,e.lineWidth=.5,e.beginPath(),e.moveTo(n.x*o,u.y+u.height),e.lineTo((n.x+n.width)*o,u.y+u.height),e.stroke()}}function mD(e,n,r,i,a,o,s,c,l){let u=c[`--timeline-event-bg`]??`#3498db`,d=c[`--timeline-event-selected-bg`]??`#5dade2`,f=c[`--timeline-event-tickled-bg`]??`#444`,p=c[`--timeline-event-label-color`]??`#fff`,m=Number.parseFloat(c[`--timeline-event-radius`]??`4`),h=n.x+n.width;for(let c of r){if(c.end<n.x||c.start>h)continue;let r=i.find(e=>e.trackKey===c.trackKey);if(!r||r.y+r.height<n.y||r.y>n.y+n.height)continue;let g=!1;(s.kind===`event-move`&&s.eventId===c.id||s.kind===`event-start`&&s.eventId===c.id||s.kind===`event-end`&&s.eventId===c.id)&&(g=!0);let _=c.start*l,v=(c.end-c.start)*l,y=r.y+3,b=r.height-6;if(v<1)continue;let x=a.has(c.id),S=o===c.id,ee;ee=x?d:S?f:c.color??u,e.fillStyle=ee,e.beginPath(),gD(e,_,y,v,b,Math.min(m,v/2,b/2)),e.fill(),g&&(e.strokeStyle=`#fff`,e.lineWidth=1.5,e.beginPath(),gD(e,_,y,v,b,Math.min(m,v/2,b/2)),e.stroke()),x&&!g&&(e.strokeStyle=d,e.lineWidth=1,e.beginPath(),gD(e,_,y,v,b,Math.min(m,v/2,b/2)),e.stroke()),v>=40&&c.label&&(e.fillStyle=p,e.font=`11px system-ui, sans-serif`,e.textBaseline=`middle`,e.save(),e.beginPath(),e.rect(_+4,y,v-8,b),e.clip(),e.fillText(c.label,_+6,y+b/2),e.restore())}}function hD(e,n,r){if(n.kind!==`marquee`)return;let i=Math.min(n.startLogicalX,n.currentLogicalX)*r,a=Math.max(n.startLogicalX,n.currentLogicalX)*r,o=Math.min(n.startY,n.currentY),s=Math.max(n.startY,n.currentY);e.fillStyle=`rgba(100, 150, 255, 0.15)`,e.fillRect(i,o,a-i,s-o),e.strokeStyle=`rgba(100, 150, 255, 0.6)`,e.lineWidth=1,e.strokeRect(i,o,a-i,s-o)}function gD(e,n,r,i,a,o){o=Math.max(0,o),e.moveTo(n+o,r),e.arcTo(n+i,r,n+i,r+a,o),e.arcTo(n+i,r+a,n,r+a,o),e.arcTo(n,r+a,n,r,o),e.arcTo(n,r,n+i,r,o),e.closePath()}const _D=[`--timeline-bg`,`--timeline-track-bg`,`--timeline-track-bg-alt`,`--timeline-alt-major-bg`,`--timeline-grid-major-color`,`--timeline-grid-minor-color`,`--timeline-grid-major-width`,`--timeline-grid-minor-width`,`--timeline-event-bg`,`--timeline-event-selected-bg`,`--timeline-event-tickled-bg`,`--timeline-event-label-color`,`--timeline-event-radius`,`--timeline-axis-label-color`];function vD(e){let n=getComputedStyle(e),r={};for(let e of _D)r[e]=n.getPropertyValue(e).trim();return r}function yD(e,n,r){return e/n+r}function bD(e){return e>0?1/e:1}function xD(e,n,r,i,a){let o=i.find(e=>n>=e.y&&n<e.y+e.height);if(!o)return{kind:`empty`,logicalX:e,y:n,trackKey:void 0};let s=8*bD(a),c=r.filter(e=>e.trackKey===o.trackKey);for(let n of c)if(!(e<n.start||e>n.end))return e<=n.start+s?{kind:`event-start`,eventId:n.id}:e>=n.end-s?{kind:`event-end`,eventId:n.id}:{kind:`event-move`,eventId:n.id,trackKey:o.trackKey,offsetX:e-n.start};return{kind:`empty`,logicalX:e,y:n,trackKey:o.trackKey}}function SD(e,n){return n.find(n=>e>=n.y&&e<n.y+n.height)?.trackKey}function CD(e,n){return Math.abs(e)>n?e-Math.sign(e)*n:0}function wD(e,n,r,i,a){let o=n*Math.exp(-a/100),s=r-(r-e)*n/o;return o>0&&(s+=-i/o),{ppu:o,viewMin:s}}function TD(e,n,r,i,a,o){let s=n-e,c=s*Math.exp(-a/100),l=i-(s>0?(i-e)/s:.5)*c;return r>0&&(l+=o/r),{vMin:l,vMax:l+c}}function ED(e,n){let r=new AbortController,i=r.signal;return n.addEventListener(`pointerdown`,r=>{let i=e.pxPerUnit,a=n.convertFromViewportToCanvas(r.offsetX,r.offsetY),o=yD(a.x,i,e.min),s=a.y,c=n.logicalScrollTop;if(s>=c&&s<c+e.axisHeight){n.setPointerCapture(r.pointerId),e._drag={kind:`axis-zoom`,anchorUnit:o,startScreenX:r.screenX,startScreenY:r.screenY,startViewMin:e._viewRange.min,startPpu:i};return}let l=xD(o,s,e._internalEvents,e._trackLayout,i);if(r.shiftKey&&l.kind===`event-move`){OD(e,l.eventId);return}if(l.kind===`event-move`){n.setPointerCapture(r.pointerId),e._drag={kind:`event-move`,eventId:l.eventId,originTrackKey:l.trackKey,offsetX:l.offsetX};return}if(l.kind===`event-start`){n.setPointerCapture(r.pointerId),e._drag={kind:`event-start`,eventId:l.eventId};return}if(l.kind===`event-end`){n.setPointerCapture(r.pointerId),e._drag={kind:`event-end`,eventId:l.eventId};return}l.kind===`empty`&&(n.setPointerCapture(r.pointerId),e._drag={kind:`marquee`,startLogicalX:o,startY:s,currentLogicalX:o,currentY:s})},{signal:i}),n.addEventListener(`pointermove`,r=>{let i=e._drag;if(i.kind===`none`){DD(e,n,r);return}let a=e.pxPerUnit,o=n.convertFromViewportToCanvas(r.offsetX,r.offsetY),s=yD(o.x,a,e.min),c=o.y;if(i.kind===`axis-zoom`){let n=r.screenX-i.startScreenX,a=r.screenY-i.startScreenY;if(Math.abs(n)+Math.abs(a)<5)return;let o=CD(n,4),s=CD(a,4),c=wD(i.startViewMin,i.startPpu,i.anchorUnit,o,s);e.setZoomPan(c.viewMin,c.ppu);return}if(i.kind===`marquee`){e._drag={...i,currentLogicalX:s,currentY:c},n.invalidateAll();return}if(i.kind===`event-move`){let r=e._internalEvents.find(e=>e.id===i.eventId);if(!r)return;let a=r.end-r.start,o=s,l=c,u=s-i.offsetX,d=u+a,f=SD(c,e._trackLayout)??r.trackKey,p=e.pxPerUnit,m=sD(e._viewRange,e.userScale,n.viewportWidth,e.gridMode,e.minorStep,p),h=e.processDrag(i.eventId,o,l,u,d,f,i.originTrackKey,m);e._internalEvents=e._internalEvents.map(e=>e.id===i.eventId?{...e,start:h.start,end:h.end,trackKey:h.trackKey}:e),n.invalidateAll();return}if(i.kind===`event-start`){let r=e._internalEvents.find(e=>e.id===i.eventId);if(!r)return;let a=Math.min(s,r.end-1);e._internalEvents=e._internalEvents.map(e=>e.id===i.eventId?{...e,start:a}:e),n.invalidateAll();return}if(i.kind===`event-end`){let r=e._internalEvents.find(e=>e.id===i.eventId);if(!r)return;let a=Math.max(s,r.start+1);e._internalEvents=e._internalEvents.map(e=>e.id===i.eventId?{...e,end:a}:e),n.invalidateAll()}},{signal:i}),n.addEventListener(`pointerup`,r=>{let i=e._drag;if(n.releasePointerCapture(r.pointerId),i.kind===`axis-zoom`){e._drag={kind:`none`};return}if(i.kind===`marquee`){let r=Math.min(i.startLogicalX,i.currentLogicalX),a=Math.max(i.startLogicalX,i.currentLogicalX),o=Math.min(i.startY,i.currentY),s=Math.max(i.startY,i.currentY);if(Math.abs(a-r)<2&&Math.abs(s-o)<2)e._selectedIds=new Set,kD(e);else{let n=new Set;for(let i of e._internalEvents){let c=e._trackLayout.find(e=>e.trackKey===i.trackKey);if(!c)continue;let l=c.y+3,u=c.y+c.height-3;i.end>=r&&i.start<=a&&u>=o&&l<=s&&n.add(i.id)}e._selectedIds=n,kD(e)}e._drag={kind:`none`},n.invalidateAll();return}if(i.kind===`event-move`){let n=e._internalEvents.find(e=>e.id===i.eventId);n&&e.dispatchEvent(new CustomEvent(`event-move`,{detail:{eventId:n.id,fromTrackKey:i.originTrackKey,toTrackKey:n.trackKey,start:n.start,end:n.end},bubbles:!0,composed:!0})),e._drag={kind:`none`};return}if(i.kind===`event-start`||i.kind===`event-end`){let n=e._internalEvents.find(e=>e.id===i.eventId);n&&e.dispatchEvent(new CustomEvent(`event-resize`,{detail:{eventId:n.id,start:n.start,end:n.end},bubbles:!0,composed:!0})),e._drag={kind:`none`};return}e._drag={kind:`none`}},{signal:i}),n.addEventListener(`pointerleave`,()=>{e._tickledId!==void 0&&(e._tickledId=void 0,n.invalidateAll())},{signal:i}),()=>r.abort()}function DD(e,n,r){let i=e.pxPerUnit,a=n.convertFromViewportToCanvas(r.offsetX,r.offsetY),o=yD(a.x,i,e.min),s=a.y,c=n.logicalScrollTop;if(s>=c&&s<c+e.axisHeight){n.style.cursor=`col-resize`,e._tickledId!==void 0&&(e._tickledId=void 0,n.invalidateAll());return}let l=xD(o,s,e._internalEvents,e._trackLayout,i),u;(l.kind===`event-move`||l.kind===`event-start`||l.kind===`event-end`)&&(u=l.eventId),l.kind===`event-start`||l.kind===`event-end`?n.style.cursor=`ew-resize`:l.kind===`event-move`?n.style.cursor=`grab`:n.style.cursor=`crosshair`,u!==e._tickledId&&(e._tickledId=u,n.invalidateAll())}function OD(e,n){let r=new Set(e._selectedIds);r.has(n)?r.delete(n):r.add(n),e._selectedIds=r,kD(e),e.getVCanvas()?.invalidateAll()}function kD(e){e.dispatchEvent(new CustomEvent(`selection-change`,{detail:{selectedIds:[...e._selectedIds]},bubbles:!0,composed:!0}))}const AD=r`
11924
+ `}};E([d({type:String})],oD.prototype,`text`,void 0),E([d({type:Boolean,reflect:!0})],oD.prototype,`paused`,void 0),oD=E([T(`ixfx-text-shimmer`)],oD);var sD=class{#e;#t;#n=120;#r=4;#i=4;constructor(e,n){this.#e=e,this.#t=n,e.min=n.logicalMin,e.max=n.logicalMax,n.labelFormatter&&(e.formatLabel=n.labelFormatter),e.addEventListener(`track-select`,this.#a)}setTempo(e){this.#n=e,this.#o()}setTimeSignature(e,n){this.#r=e,this.#i=n,this.#o()}setViewRange(e){this.#e.setViewRange(e)}dispose(){this.#e.removeEventListener(`track-select`,this.#a)}#a=e=>{let n=e.detail,r=this.#e.getTrackEvents(n.trackKey).map(e=>e.id);if(n.shiftKey){let e=new Set(this.#e.selectedIds);for(let n of r)e.has(n)?e.delete(n):e.add(n);this.#e.selectedIds=[...e]}else this.#e.selectedIds=r};#o(){if(this.#t.labelFormatter)return;this.#n;let e=this.#r;this.#e.formatLabel=n=>{let r=e,i=n;return`${Math.floor(i/r)+1}.${Math.floor(i%r)+1}`}}};const cD=[1,2,5,10];function lD(e,n,r,i=`adaptive`,a,o){return i===`fixed`&&a!==void 0&&o!==void 0?dD(a,o):uD(e,n,r)}function uD(e,n,r){let i=e.max-e.min;if(i<=0||r<=0)return{majorStep:100,minorDivisions:4,minorStep:25};let a=80*fD(n),o=i/Math.max(2,Math.floor(r/a)),s=10**Math.floor(Math.log10(o)),c=s;for(let e of cD){let n=e*s;if(n>=o*.8){c=n;break}}let l=c/s,u=l===5||l===10?5:4,d=c/u;return{majorStep:c,minorDivisions:u,minorStep:d}}function dD(e,n){let r=e;for(;r*n<5&&r<0xe8d4a51000;)r*=2;return{majorStep:r*4,minorDivisions:4,minorStep:r}}function fD(e){switch(e){case`x-wide`:return 2;case`wide`:return 1.5;case`normal`:return 1;case`slim`:return .7;case`x-slim`:return .5;default:return 1}}function pD(e,n,r,i,a,o){let{majorStep:s,minorStep:c}=r;if(s<=0)return;let l=n.x+n.width;if(i){e.fillStyle=a[`--timeline-alt-major-bg`]??`rgba(255,255,255,0.03)`;let r=Math.floor(n.x/s);for(let i=r;i*s<l;i++)if(i%2!=0){let r=i*s*o;e.fillRect(r,n.y,s*o,n.height)}}if(c>0){e.strokeStyle=a[`--timeline-grid-minor-color`]??`rgba(255,255,255,0.05)`,e.lineWidth=Number.parseFloat(a[`--timeline-grid-minor-width`]??`0.5`),e.beginPath();let r=Math.floor(n.x/c)*c;for(let i=r;i<l;i+=c){if(Math.abs(i%s)<c*.01)continue;let r=i*o;e.moveTo(r,n.y),e.lineTo(r,n.y+n.height)}e.stroke()}e.strokeStyle=a[`--timeline-grid-major-color`]??`rgba(255,255,255,0.12)`,e.lineWidth=Number.parseFloat(a[`--timeline-grid-major-width`]??`1`),e.beginPath();let u=Math.floor(n.x/s)*s;for(let r=u;r<l;r+=s){let i=r*o;e.moveTo(i,n.y),e.lineTo(i,n.y+n.height)}e.stroke()}function mD(e,n,r,i,a,o,s,c=0){let{majorStep:l}=r;if(l<=0||i<=0)return;let u=c,d=c+i;if(n.y+n.height<u||n.y>d)return;let f=n.x+n.width,p=i-6;e.fillStyle=o[`--timeline-bg`]??`#111`;let m=n.x*s;e.fillRect(m,u,n.width*s,p),e.strokeStyle=o[`--timeline-grid-major-color`]??`rgba(255,255,255,0.12)`,e.lineWidth=Number.parseFloat(o[`--timeline-grid-major-width`]??`1`),e.beginPath();let h=Math.ceil(n.x/l)*l;for(let n=h;n<f;n+=l){let r=n*s;e.moveTo(r,u+p),e.lineTo(r,d)}e.stroke(),e.strokeStyle=o[`--timeline-grid-major-color`]??`rgba(255,255,255,0.12)`,e.lineWidth=1,e.beginPath(),e.moveTo(m,d),e.lineTo(m+n.width*s,d),e.stroke(),e.fillStyle=o[`--timeline-axis-label-color`]??`rgba(255,255,255,0.5)`,e.font=`11px system-ui, sans-serif`,e.textBaseline=`middle`,e.textAlign=`left`;for(let n=h;n<f;n+=l){let r=n*s;e.fillText(a(n),r+4,u+p/2)}e.textAlign=`start`}function hD(e,n,r,i,a,o){let s=a[`--timeline-track-bg`]??`#1a1a1a`,c=a[`--timeline-track-bg-alt`]??`#1e1e1e`;for(let l=0;l<r.length;l++){let u=r[l];if(u.y+u.height<n.y)continue;if(u.y>n.y+n.height)break;let d=i.find(e=>e.key===u.trackKey);e.fillStyle=d?.color?`${d.color}22`:l%2==0?s:c,e.fillRect(n.x*o,u.y,n.width*o,u.height),e.strokeStyle=a[`--timeline-grid-major-color`]??`rgba(255,255,255,0.12)`,e.lineWidth=.5,e.beginPath(),e.moveTo(n.x*o,u.y+u.height),e.lineTo((n.x+n.width)*o,u.y+u.height),e.stroke()}}function gD(e,n,r,i,a,o,s,c,l){let u=c[`--timeline-event-bg`]??`#3498db`,d=c[`--timeline-event-selected-bg`]??`#5dade2`,f=c[`--timeline-event-tickled-bg`]??`#444`,p=c[`--timeline-event-label-color`]??`#fff`,m=Number.parseFloat(c[`--timeline-event-radius`]??`4`),h=n.x+n.width;for(let c of r){if(c.end<n.x||c.start>h)continue;let r=i.find(e=>e.trackKey===c.trackKey);if(!r||r.y+r.height<n.y||r.y>n.y+n.height)continue;let g=!1;(s.kind===`event-move`&&s.eventId===c.id||s.kind===`event-start`&&s.eventId===c.id||s.kind===`event-end`&&s.eventId===c.id)&&(g=!0);let _=c.start*l,v=(c.end-c.start)*l,y=r.y+3,b=r.height-6;if(v<1)continue;let x=a.has(c.id),S=o===c.id,ee;ee=x?d:S?f:c.color??u,e.fillStyle=ee,e.beginPath(),vD(e,_,y,v,b,Math.min(m,v/2,b/2)),e.fill(),g&&(e.strokeStyle=`#fff`,e.lineWidth=1.5,e.beginPath(),vD(e,_,y,v,b,Math.min(m,v/2,b/2)),e.stroke()),x&&!g&&(e.strokeStyle=d,e.lineWidth=1,e.beginPath(),vD(e,_,y,v,b,Math.min(m,v/2,b/2)),e.stroke()),v>=40&&c.label&&(e.fillStyle=p,e.font=`11px system-ui, sans-serif`,e.textBaseline=`middle`,e.save(),e.beginPath(),e.rect(_+4,y,v-8,b),e.clip(),e.fillText(c.label,_+6,y+b/2),e.restore())}}function _D(e,n,r){if(n.kind!==`marquee`)return;let i=Math.min(n.startLogicalX,n.currentLogicalX)*r,a=Math.max(n.startLogicalX,n.currentLogicalX)*r,o=Math.min(n.startY,n.currentY),s=Math.max(n.startY,n.currentY);e.fillStyle=`rgba(100, 150, 255, 0.15)`,e.fillRect(i,o,a-i,s-o),e.strokeStyle=`rgba(100, 150, 255, 0.6)`,e.lineWidth=1,e.strokeRect(i,o,a-i,s-o)}function vD(e,n,r,i,a,o){o=Math.max(0,o),e.moveTo(n+o,r),e.arcTo(n+i,r,n+i,r+a,o),e.arcTo(n+i,r+a,n,r+a,o),e.arcTo(n,r+a,n,r,o),e.arcTo(n,r,n+i,r,o),e.closePath()}const yD=[`--timeline-bg`,`--timeline-track-bg`,`--timeline-track-bg-alt`,`--timeline-alt-major-bg`,`--timeline-grid-major-color`,`--timeline-grid-minor-color`,`--timeline-grid-major-width`,`--timeline-grid-minor-width`,`--timeline-event-bg`,`--timeline-event-selected-bg`,`--timeline-event-tickled-bg`,`--timeline-event-label-color`,`--timeline-event-radius`,`--timeline-axis-label-color`];function bD(e){let n=getComputedStyle(e),r={};for(let e of yD)r[e]=n.getPropertyValue(e).trim();return r}function xD(e,n,r){return e/n+r}function SD(e){return e>0?1/e:1}function CD(e,n,r,i,a){let o=i.find(e=>n>=e.y&&n<e.y+e.height);if(!o)return{kind:`empty`,logicalX:e,y:n,trackKey:void 0};let s=8*SD(a),c=r.filter(e=>e.trackKey===o.trackKey);for(let n of c)if(!(e<n.start||e>n.end))return e<=n.start+s?{kind:`event-start`,eventId:n.id}:e>=n.end-s?{kind:`event-end`,eventId:n.id}:{kind:`event-move`,eventId:n.id,trackKey:o.trackKey,offsetX:e-n.start};return{kind:`empty`,logicalX:e,y:n,trackKey:o.trackKey}}function wD(e,n){return n.find(n=>e>=n.y&&e<n.y+n.height)?.trackKey}function TD(e,n){return Math.abs(e)>n?e-Math.sign(e)*n:0}function ED(e,n,r,i,a){let o=n*Math.exp(-a/100),s=r-(r-e)*n/o;return o>0&&(s+=-i/o),{ppu:o,viewMin:s}}function DD(e,n,r,i,a,o){let s=n-e,c=s*Math.exp(-a/100),l=i-(s>0?(i-e)/s:.5)*c;return r>0&&(l+=o/r),{vMin:l,vMax:l+c}}function OD(e,n){let r=new AbortController,i=r.signal;return n.addEventListener(`pointerdown`,r=>{let i=e.pxPerUnit,a=n.convertFromViewportToCanvas(r.offsetX,r.offsetY),o=xD(a.x,i,e.min),s=a.y,c=n.logicalScrollTop;if(s>=c&&s<c+e.axisHeight){n.setPointerCapture(r.pointerId),e._drag={kind:`axis-zoom`,anchorUnit:o,startScreenX:r.screenX,startScreenY:r.screenY,startViewMin:e._viewRange.min,startPpu:i};return}let l=CD(o,s,e._internalEvents,e._trackLayout,i);if(r.shiftKey&&l.kind===`event-move`){AD(e,l.eventId);return}if(l.kind===`event-move`){n.setPointerCapture(r.pointerId),e._drag={kind:`event-move`,eventId:l.eventId,originTrackKey:l.trackKey,offsetX:l.offsetX};return}if(l.kind===`event-start`){n.setPointerCapture(r.pointerId),e._drag={kind:`event-start`,eventId:l.eventId};return}if(l.kind===`event-end`){n.setPointerCapture(r.pointerId),e._drag={kind:`event-end`,eventId:l.eventId};return}l.kind===`empty`&&(n.setPointerCapture(r.pointerId),e._drag={kind:`marquee`,startLogicalX:o,startY:s,currentLogicalX:o,currentY:s})},{signal:i}),n.addEventListener(`pointermove`,r=>{let i=e._drag;if(i.kind===`none`){kD(e,n,r);return}let a=e.pxPerUnit,o=n.convertFromViewportToCanvas(r.offsetX,r.offsetY),s=xD(o.x,a,e.min),c=o.y;if(i.kind===`axis-zoom`){let n=r.screenX-i.startScreenX,a=r.screenY-i.startScreenY;if(Math.abs(n)+Math.abs(a)<5)return;let o=TD(n,4),s=TD(a,4),c=ED(i.startViewMin,i.startPpu,i.anchorUnit,o,s);e.setZoomPan(c.viewMin,c.ppu);return}if(i.kind===`marquee`){e._drag={...i,currentLogicalX:s,currentY:c},n.invalidateAll();return}if(i.kind===`event-move`){let r=e._internalEvents.find(e=>e.id===i.eventId);if(!r)return;let a=r.end-r.start,o=s,l=c,u=s-i.offsetX,d=u+a,f=wD(c,e._trackLayout)??r.trackKey,p=e.pxPerUnit,m=lD(e._viewRange,e.userScale,n.viewportWidth,e.gridMode,e.minorStep,p),h=e.processDrag(i.eventId,o,l,u,d,f,i.originTrackKey,m);e._internalEvents=e._internalEvents.map(e=>e.id===i.eventId?{...e,start:h.start,end:h.end,trackKey:h.trackKey}:e),n.invalidateAll();return}if(i.kind===`event-start`){let r=e._internalEvents.find(e=>e.id===i.eventId);if(!r)return;let a=Math.min(s,r.end-1);e._internalEvents=e._internalEvents.map(e=>e.id===i.eventId?{...e,start:a}:e),n.invalidateAll();return}if(i.kind===`event-end`){let r=e._internalEvents.find(e=>e.id===i.eventId);if(!r)return;let a=Math.max(s,r.start+1);e._internalEvents=e._internalEvents.map(e=>e.id===i.eventId?{...e,end:a}:e),n.invalidateAll()}},{signal:i}),n.addEventListener(`pointerup`,r=>{let i=e._drag;if(n.releasePointerCapture(r.pointerId),i.kind===`axis-zoom`){e._drag={kind:`none`};return}if(i.kind===`marquee`){let r=Math.min(i.startLogicalX,i.currentLogicalX),a=Math.max(i.startLogicalX,i.currentLogicalX),o=Math.min(i.startY,i.currentY),s=Math.max(i.startY,i.currentY);if(Math.abs(a-r)<2&&Math.abs(s-o)<2)e._selectedIds=new Set,jD(e);else{let n=new Set;for(let i of e._internalEvents){let c=e._trackLayout.find(e=>e.trackKey===i.trackKey);if(!c)continue;let l=c.y+3,u=c.y+c.height-3;i.end>=r&&i.start<=a&&u>=o&&l<=s&&n.add(i.id)}e._selectedIds=n,jD(e)}e._drag={kind:`none`},n.invalidateAll();return}if(i.kind===`event-move`){let n=e._internalEvents.find(e=>e.id===i.eventId);n&&e.dispatchEvent(new CustomEvent(`event-move`,{detail:{eventId:n.id,fromTrackKey:i.originTrackKey,toTrackKey:n.trackKey,start:n.start,end:n.end},bubbles:!0,composed:!0})),e._drag={kind:`none`};return}if(i.kind===`event-start`||i.kind===`event-end`){let n=e._internalEvents.find(e=>e.id===i.eventId);n&&e.dispatchEvent(new CustomEvent(`event-resize`,{detail:{eventId:n.id,start:n.start,end:n.end},bubbles:!0,composed:!0})),e._drag={kind:`none`};return}e._drag={kind:`none`}},{signal:i}),n.addEventListener(`pointerleave`,()=>{e._tickledId!==void 0&&(e._tickledId=void 0,n.invalidateAll())},{signal:i}),()=>r.abort()}function kD(e,n,r){let i=e.pxPerUnit,a=n.convertFromViewportToCanvas(r.offsetX,r.offsetY),o=xD(a.x,i,e.min),s=a.y,c=n.logicalScrollTop;if(s>=c&&s<c+e.axisHeight){n.style.cursor=`col-resize`,e._tickledId!==void 0&&(e._tickledId=void 0,n.invalidateAll());return}let l=CD(o,s,e._internalEvents,e._trackLayout,i),u;(l.kind===`event-move`||l.kind===`event-start`||l.kind===`event-end`)&&(u=l.eventId),l.kind===`event-start`||l.kind===`event-end`?n.style.cursor=`ew-resize`:l.kind===`event-move`?n.style.cursor=`grab`:n.style.cursor=`crosshair`,u!==e._tickledId&&(e._tickledId=u,n.invalidateAll())}function AD(e,n){let r=new Set(e._selectedIds);r.has(n)?r.delete(n):r.add(n),e._selectedIds=r,jD(e),e.getVCanvas()?.invalidateAll()}function jD(e){e.dispatchEvent(new CustomEvent(`selection-change`,{detail:{selectedIds:[...e._selectedIds]},bubbles:!0,composed:!0}))}const MD=r`
11894
11925
  :host {
11895
11926
  /* Layout */
11896
11927
  --timeline-axis-height: 24px;
@@ -12040,7 +12071,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12040
12071
  .meta-area.visible {
12041
12072
  display: block;
12042
12073
  }
12043
- `;let jD=class extends n{constructor(...e){super(...e),this.label=``,this.trackKey=``,this.selected=!1,this.reorderable=!1,this.resizable=!1,this.#e=!1,this.#t=0,this.#n=0,this.#r=void 0,this.#o=e=>{if(this.#e){let n=e.screenY-this.#t,r=Math.max(24,this.#n+n);this.#a(`track-resize-move`,r);return}this.#i(e)?this.style.cursor=`ns-resize`:this.style.cursor=``},this.#s=e=>{this.#i(e)&&(e.stopPropagation(),e.preventDefault(),this.#e=!0,this.#t=e.screenY,this.#n=this.offsetHeight,this.#r=e.pointerId,this.setPointerCapture(e.pointerId))},this.#c=e=>{if(!this.#e)return;let n=e.screenY-this.#t,r=Math.max(24,this.#n+n);this.#a(`track-resize`,r),this.#u(e.pointerId)},this.#l=e=>{this.#e&&this.#u(this.#r)}}static{this.styles=[w,Yt,r`
12074
+ `;let ND=class extends n{constructor(...e){super(...e),this.label=``,this.trackKey=``,this.selected=!1,this.reorderable=!1,this.resizable=!1,this.#e=!1,this.#t=0,this.#n=0,this.#r=void 0,this.#o=e=>{if(this.#e){let n=e.screenY-this.#t,r=Math.max(24,this.#n+n);this.#a(`track-resize-move`,r);return}this.#i(e)?this.style.cursor=`ns-resize`:this.style.cursor=``},this.#s=e=>{this.#i(e)&&(e.stopPropagation(),e.preventDefault(),this.#e=!0,this.#t=e.screenY,this.#n=this.offsetHeight,this.#r=e.pointerId,this.setPointerCapture(e.pointerId))},this.#c=e=>{if(!this.#e)return;let n=e.screenY-this.#t,r=Math.max(24,this.#n+n);this.#a(`track-resize`,r),this.#u(e.pointerId)},this.#l=e=>{this.#e&&this.#u(this.#r)}}static{this.styles=[w,Yt,r`
12044
12075
  :host {
12045
12076
  display: flex;
12046
12077
  align-items: center;
@@ -12085,7 +12116,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12085
12116
  `]}#e;#t;#n;#r;connectedCallback(){super.connectedCallback(),this.addEventListener(`pointermove`,this.#o),this.addEventListener(`pointerdown`,this.#s),this.addEventListener(`pointerup`,this.#c),this.addEventListener(`pointercancel`,this.#l),this.addEventListener(`lostpointercapture`,this.#l)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`pointermove`,this.#o),this.removeEventListener(`pointerdown`,this.#s),this.removeEventListener(`pointerup`,this.#c),this.removeEventListener(`pointercancel`,this.#l),this.removeEventListener(`lostpointercapture`,this.#l),this.#e=!1}render(){return i`
12086
12117
  <span class="handle ixfx-handle" data-handle="dotted" data-shape="spot" part="handle"></span>
12087
12118
  <span class="label">${this.label}</span>
12088
- `}#i(e){if(!this.resizable)return!1;let n=this.getBoundingClientRect();return e.clientY>=n.bottom-6}#a(e,n){this.dispatchEvent(new CustomEvent(e,{detail:{trackKey:this.trackKey,height:n},bubbles:!0,composed:!0}))}#o;#s;#c;#l;#u(e){if(this.#e=!1,this.#t=0,this.#n=0,e!==void 0)try{this.releasePointerCapture(e)}catch{}this.#r=void 0,this.style.cursor=``}};E([d({type:String})],jD.prototype,`label`,void 0),E([d({type:String,attribute:`track-key`})],jD.prototype,`trackKey`,void 0),E([d({type:Boolean,reflect:!0})],jD.prototype,`selected`,void 0),E([d({type:Boolean,reflect:!0})],jD.prototype,`reorderable`,void 0),E([d({type:Boolean,reflect:!0})],jD.prototype,`resizable`,void 0),jD=E([T(`ixfx-timeline-track-tab`)],jD);function MD(e,n,r,i,a=0,o=0){return{x:e+r-i,y:n+a-o}}function ND(e,n,r,i,a=0,o=0){return{x:e-r+i,y:n-a+o}}function PD(e,n,r){return Math.max(n,Math.min(e,r))}const FD=r`
12119
+ `}#i(e){if(!this.resizable)return!1;let n=this.getBoundingClientRect();return e.clientY>=n.bottom-6}#a(e,n){this.dispatchEvent(new CustomEvent(e,{detail:{trackKey:this.trackKey,height:n},bubbles:!0,composed:!0}))}#o;#s;#c;#l;#u(e){if(this.#e=!1,this.#t=0,this.#n=0,e!==void 0)try{this.releasePointerCapture(e)}catch{}this.#r=void 0,this.style.cursor=``}};E([d({type:String})],ND.prototype,`label`,void 0),E([d({type:String,attribute:`track-key`})],ND.prototype,`trackKey`,void 0),E([d({type:Boolean,reflect:!0})],ND.prototype,`selected`,void 0),E([d({type:Boolean,reflect:!0})],ND.prototype,`reorderable`,void 0),E([d({type:Boolean,reflect:!0})],ND.prototype,`resizable`,void 0),ND=E([T(`ixfx-timeline-track-tab`)],ND);function PD(e,n,r,i,a=0,o=0){return{x:e+r-i,y:n+a-o}}function FD(e,n,r,i,a=0,o=0){return{x:e-r+i,y:n-a+o}}function ID(e,n,r){return Math.max(n,Math.min(e,r))}const LD=r`
12089
12120
  :host {
12090
12121
  display: block;
12091
12122
  position: relative;
@@ -12174,7 +12205,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12174
12205
  scroll-timeline: --scrollfade x;
12175
12206
  }
12176
12207
 
12177
- `;function ID(e,n){return e*n}function LD(e,n){return n===0||e<=n}function RD(e,n){return e<0||n===0?0:LD(e,n)?(n-e)/2:0}function zD(e,n,r,i,a){if(n===0||e<0)return 0;let o=r+i*a;return e>=o?0:LD(r,i)?r:e+n>o?Math.max(0,o-e):n}function BD(e,n,r,i){if(r===0)return{firstTile:0,lastTile:0,tiles:[]};let a=ID(n,i.tileWidthMultiplier);if(LD(r,n))return{firstTile:0,lastTile:0,tiles:[{index:0,logicalX:0}]};let o=Math.floor(e/a),s=Math.floor((e+n-1)/a),c=Math.max(0,Math.ceil(r/a)-1),l=[],u=o,d=Math.min(s+i.tilesBuffer,c);for(let e=u;e<=d;e++){let n=e*a;if(!(n>=r)&&(l.push({index:e,logicalX:n}),l.length>=i.maxPoolSize))break}return{firstTile:Math.max(0,o),lastTile:l.length>0?l[l.length-1].index:0,tiles:l}}function VD(e,n){return e*n}function HD(e,n){return n===0||e<=n}function UD(e,n){return e<0||n===0?0:HD(e,n)?(n-e)/2:0}function WD(e,n,r,i,a){if(n===0||e<0)return 0;let o=r+i*a;return e>=o?0:HD(r,i)?r:e+n>o?Math.max(0,o-e):n}function GD(e,n,r,i){if(r===0)return{firstRow:0,lastRow:0,rows:[]};let a=VD(n,i.tileHeightMultiplier);if(HD(r,n))return{firstRow:0,lastRow:0,rows:[{row:0,logicalY:0}]};let o=Math.floor(e/a),s=Math.floor((e+n-1)/a),c=Math.max(0,Math.ceil(r/a)-1),l=[],u=Math.min(s+i.tilesBuffer,c);for(let e=o;e<=u;e++){let n=e*a;if(!(n>=r)&&(l.push({row:e,logicalY:n}),l.length>=i.maxPoolSize))break}return{firstRow:Math.max(0,o),lastRow:l.length>0?l[l.length-1].row:0,rows:l}}function KD(e,n){let r=null,i=(...i)=>{r&&clearTimeout(r),r=setTimeout(()=>{e(...i)},n)};return i.cancel=()=>{r&&=(clearTimeout(r),null)},i}const qD=[`#FF6B6B`,`#4ECDC4`,`#45B7D1`,`#96CEB4`,`#FFEAA7`,`#DDA0DD`,`#98D8C8`,`#F7DC6F`,`#BB8FCE`,`#85C1E9`];function JD(e){return qD[e%qD.length]}function YD(e,n,r,i,a){i.fillStyle=`whitesmoke`,i.fillRect(a.x,a.y,a.width,a.height),i.fillStyle=JD(e),i.strokeStyle=JD(e),i.lineWidth=2,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(a.x+a.width,a.y+a.height),i.moveTo(a.x+a.width,a.y),i.lineTo(a.x,a.y+a.height),i.stroke(),i.font=`24pt system-ui`,i.textBaseline=`top`,i.fillText(`#${e}/${n}`,a.x+20,a.y+20),i.font=`18pt system-ui`,i.fillText(`Pos: ${Math.round(a.x)},${Math.round(a.y)}`,a.x+20,a.y+60),i.fillText(`Size: ${Math.round(a.width)}x${Math.round(a.height)}`,a.x+20,a.y+90),i.fillText(`VCanvas width: ${Math.round(r)}`,a.x+20,a.y+120);let o=a.x+a.width/2,s=a.y+a.height/2;i.beginPath(),i.moveTo(a.x,s),i.lineTo(a.x+a.width,s),i.moveTo(o,a.y),i.lineTo(o,a.y+a.height),i.stroke(),i.strokeRect(a.x,a.y,a.width,a.height)}var XD=function(e,n,r,i){var a=arguments.length,o=a<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,r):i,s;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(o=(a<3?s(o):a>3?s(n,r,o):s(n,r))||o);return a>3&&o&&Object.defineProperty(n,r,o),o};const ZD=(e,n)=>`${e},${n}`;let QD=class extends n{_emitScrollEndEvent(e){let n=new CustomEvent(`scrollend-virtual`,{detail:{logicalScrollLeft:this._scrollLeft,logicalScrollTop:this._scrollTop,userGesture:e,containerScrollLeft:this._scrollContainer?.scrollLeft??0,containerScrollTop:this._scrollContainer?.scrollTop??0},bubbles:!0,composed:!0});this.dispatchEvent(n)}constructor(){super(),this.debugTrace=!1,this.debugDraw=!1,this.hinting=!1,this._viewportWidth=0,this._viewportHeight=0,this._scrollLeft=0,this._scrollTop=0,this._logicalHeight=0,this._tilePool=new Map,this._visibleTiles=new Set,this._pendingDraws=new Map,this._scrollContainer=null,this._spacer=null,this._tilePoolEl=null,this._childrenContainerEl=null,this._resizeObserver=null,this._positionedChildren=new Map,this._boundOnScroll=this._onScroll.bind(this),this._renderingOptions={tileWidthMultiplier:.5,tileHeightMultiplier:.5,tilesBuffer:2,overlapPercent:.01,overscrollPadMultiplier:1,maxPoolSize:3,scrollDebounceMs:100},this._dpr=window.devicePixelRatio||1,this._logicalWidth=0,this.logicalWidth=0,this.logicalHeight=0,this.drawCallback=null,this._scrollDebounce=KD(()=>{this._requestRedrawAll(`scrollDebounce`)},this._renderingOptions.scrollDebounceMs),this._scrollEndDebounce=KD(()=>{this._emitScrollEndEvent(!0)},this._renderingOptions.scrollDebounceMs),this._resizeDebounce=KD(()=>{this._onResize()},this._renderingOptions.scrollDebounceMs)}static{this.styles=FD}connectedCallback(){super.connectedCallback(),this._setupResizeObserver()}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),this._resizeObserver=null,this._scrollEndDebounce.cancel(),this._pendingDraws.forEach(e=>e.abort()),this._tilePool.clear(),this._scrollContainer?.removeEventListener(`scroll`,this._boundOnScroll)}firstUpdated(){let e=this.shadowRoot?.querySelector(`.scroll-container`);this._scrollContainer=e,this._spacer=this.shadowRoot?.querySelector(`.spacer`),this._tilePoolEl=this.shadowRoot?.querySelector(`.tile-pool`),this._childrenContainerEl=this.shadowRoot?.querySelector(`.children-container`),this._scrollContainer&&this._scrollContainer.addEventListener(`scroll`,this._boundOnScroll),requestAnimationFrame(()=>{this._updateViewportDimensions(),this._updateSpacer(),this._updateScrollContainerClass(),this._recalculateTiles(`firstUpdated cb`),this._positionChildren(`firstUpdated cb`)})}set logicalWidth(e){this._logicalWidth=e,this._updateSpacer(),this._updateScrollContainerClass(),this.hasUpdated&&(this._updateTileWidths(`set logicalWidth`),this._recalculateTiles(`set logicalWidth`))}get logicalWidth(){return this._logicalWidth}set logicalHeight(e){this._logicalHeight=e,this._updateSpacer(),this._updateScrollContainerClass(),this.hasUpdated&&this._recalculateTiles(`set logicalHeight`)}get logicalHeight(){return this._logicalHeight}get effectiveLogicalWidth(){return this._logicalWidth||this._viewportWidth}get effectiveLogicalHeight(){return this._logicalHeight||this._viewportHeight}_setupResizeObserver(){this._resizeObserver=new ResizeObserver(()=>{this._resizeDebounce()}),this._resizeObserver.observe(this)}_onResize(){let e=this._viewportWidth,n=this._viewportHeight;this._updateViewportDimensions();let r=e!==this._viewportWidth,i=n!==this._viewportHeight;(r||i)&&(this._updateSpacer(),this._updateScrollContainerClass(),this._recalculateTiles(`onResize`))}_updateTileWidths(e){let n=this._getTileWidth();for(let e of this._tilePool.values()){let r=this._getTileClippedWidth(e.logicalX,n);e.canvas.width=r*this._dpr,e.canvas.style.width=`${r}px`,e.ctx.scale(this._dpr,this._dpr)}this._requestRedrawAll(`updateTileWidths (${e})`)}_updateViewportDimensions(){let e=this.getBoundingClientRect();this._viewportWidth=e.width,this._viewportHeight=e.height}_onScroll(){if(!this._scrollContainer)return;let e=this._scrollContainer.scrollLeft,n=this._scrollContainer.scrollTop;(e!==this._scrollLeft||n!==this._scrollTop)&&(this._scrollLeft=e,this._scrollTop=n,this._recalculateTiles(`onScroll`),this._emitScrollEvent(!0),this._scrollDebounce(),this._scrollEndDebounce())}_updateSpacer(){if(!this._spacer)return;let e=LD(this.effectiveLogicalWidth,this._viewportWidth),n=HD(this.effectiveLogicalHeight,this._viewportHeight);e&&n?this._spacer.style.display=`none`:(this._spacer.style.display=`block`,this._spacer.style.width=`${this.effectiveLogicalWidth}px`,this._spacer.style.height=`${this.effectiveLogicalHeight}px`),this._childrenContainerEl&&(this._childrenContainerEl.style.width=`${this.effectiveLogicalWidth}px`,this._childrenContainerEl.style.height=`${this.effectiveLogicalHeight}px`)}_updateScrollContainerClass(){if(!this._scrollContainer)return;let e=this.effectiveLogicalHeight>this._viewportHeight;this._scrollContainer.classList.toggle(`vertical`,e)}_getTileWidth(){return ID(this._viewportWidth,this._renderingOptions.tileWidthMultiplier)}_getTileHeight(){return VD(this._viewportHeight,this._renderingOptions.tileHeightMultiplier)}_getTileClippedWidth(e,n){return zD(e,n,this.effectiveLogicalWidth,this._viewportWidth,this._renderingOptions.overscrollPadMultiplier)}_getTileClippedHeight(e,n){return WD(e,n,this.effectiveLogicalHeight,this._viewportHeight,this._renderingOptions.overscrollPadMultiplier)}_calculateTileRange(){return BD(this._scrollLeft,this._viewportWidth,this.effectiveLogicalWidth,this._renderingOptions)}_calculateTileRowRange(){return GD(this._scrollTop,this._viewportHeight,this.effectiveLogicalHeight,this._renderingOptions)}_recalculateTiles(e){this._updateViewportDimensions();let{tiles:n}=this._calculateTileRange(),{rows:r}=this._calculateTileRowRange(),i=new Set;for(let{index:e,logicalX:a}of n)for(let{row:n,logicalY:o}of r)i.add(ZD(e,n)),this._tilePool.has(ZD(e,n))||this._tilePool.set(ZD(e,n),this._createTile(e,n,a,o));let a=this._renderingOptions.maxPoolSize*Math.max(1,r.length),o=[...this._tilePool.keys()].filter(e=>!i.has(e)),s=[...i].filter(e=>!this._tilePool.has(e)),c=Math.min(o.length,s.length);for(let e=0;e<c;e++){let n=o[e],r=s[e],i=this._tilePool.get(n);if(i&&r){let[e,a]=r.split(`,`),o=Number(e),s=Number(a);this._tilePool.delete(n),i.col=o,i.row=s,i.logicalX=o*this._getTileWidth(),i.logicalY=s*this._getTileHeight(),i.visible=!1,i.canvas.dataset.tileKey=r,this._tilePool.set(r,i)}}let l=[...this._tilePool.keys()];if(l.length>a){let e=l.length-a;l.filter(e=>!i.has(e)).slice(0,e).forEach(e=>{let n=this._tilePool.get(e);n&&(this._tilePool.delete(e),n.canvas.remove())})}this._updateTiles(`recalculateTiles (${e})`)}_createTile(e,n,r,i){let a=document.createElement(`canvas`),o=ZD(e,n);a.dataset.tileKey=o;let s=this._getTileWidth(),c=this._getTileHeight(),l=this._getTileClippedWidth(r,s),u=this._getTileClippedHeight(i,c),d=a.getContext(`2d`);if(!d)throw Error(`Could not get canvas context`);return this._viewportHeight===0&&this.#e(`Warning: Creating tile ${o} with viewport height 0. The VCanvas component may not be properly sized or visible.`),a.width=l*this._dpr,a.height=u*this._dpr,a.style.width=`${l}px`,a.style.height=`${u}px`,d.scale(this._dpr,this._dpr),this.#e(`Created tile ${o} at logicalX ${r} logicalY ${i}`),{canvas:a,ctx:d,logicalX:r,logicalY:i,col:e,row:n,visible:!1,isInDOM:!1}}_updateTiles(e){let{tiles:n,firstTile:r,lastTile:i}=this._calculateTileRange(),{rows:a,firstRow:o,lastRow:s}=this._calculateTileRowRange(),c=this._getTileWidth(),l=this._getTileHeight(),u=LD(this.effectiveLogicalWidth,this._viewportWidth),d=HD(this.effectiveLogicalHeight,this._viewportHeight),f=RD(this.effectiveLogicalWidth,this._viewportWidth),p=UD(this.effectiveLogicalHeight,this._viewportHeight),m=this._renderingOptions.tilesBuffer,h=[];for(let e of this._tilePool.values())e.visible=!1;this._visibleTiles.clear();for(let[n,a]of this._tilePool){let g=u?a.col===0:a.col>=r-m&&a.col<=i+m,_=d?a.row===0:a.row>=o-m&&a.row<=s+m;if(g&&_){this._visibleTiles.add(n);let r=a.col*c,i=a.row*l,o=u?f:r,s=d?p:i,m=this._getTileClippedWidth(r,c),g=this._getTileClippedHeight(i,l);(!a.visible||a.logicalX!==r||a.logicalY!==i||a.canvas.style.left!==`${o}px`||a.canvas.style.top!==`${s}px`||a.canvas.width!==m*this._dpr||a.canvas.height!==g*this._dpr)&&(a.logicalX=r,a.logicalY=i,a.canvas.width=m*this._dpr,a.canvas.style.width=`${m}px`,a.canvas.height=g*this._dpr,a.canvas.style.height=`${g}px`,a.canvas.style.left=`${o}px`,a.canvas.style.top=`${s}px`,a.ctx.scale(this._dpr,this._dpr),!a.isInDOM&&this._tilePoolEl&&(this._tilePoolEl.appendChild(a.canvas),a.isInDOM=!0),a.visible||(h.push(n),this._requestTileDraw(`updateTiles(${e})`,n))),a.visible=!0}else a.visible&&(a.visible=!1,a.isInDOM=!1,a.canvas.remove())}for(let{index:r,logicalX:i}of n)for(let{row:n,logicalY:o}of a){let a=ZD(r,n);if(!this._tilePool.has(a)&&this._tilePoolEl){let s=this._createTile(r,n,i,o),c=u?f:i,l=d?p:o;s.canvas.style.left=`${c}px`,s.canvas.style.top=`${l}px`,s.visible=!0,s.isInDOM=!0,this._tilePoolEl.appendChild(s.canvas),this._tilePool.set(a,s),this._visibleTiles.add(a),h.push(a),this._requestTileDraw(`updateTiles(${e})`,a)}}return h}_requestRedrawAll(e){this.#e(`Requesting _requestRedrawAll: ${e} visible tiles: ${this._visibleTiles.size} pending draws: ${this._pendingDraws.size}`),this._pendingDraws.forEach(e=>e.abort()),this._pendingDraws.clear();for(let n of this._visibleTiles)this._requestTileDraw(`requestRedrawAll(${e})`,n)}#e(e){this.debugTrace&&console.log(`[VCanvas]`,e)}_requestTileDraw(e,n,r){let i=this._tilePool.get(n);if(!i||!this.drawCallback)return;let a=new AbortController;this._pendingDraws.set(n,a);let o=this._getTileWidth(),s=this._getTileHeight(),c=LD(this.effectiveLogicalWidth,this._viewportWidth),l=HD(this.effectiveLogicalHeight,this._viewportHeight),u;if(r)u=r;else{let e=o*this._renderingOptions.overlapPercent,n=s*this._renderingOptions.overlapPercent;u={x:c?0:i.logicalX-e,y:l?0:i.logicalY-n,width:c?this.effectiveLogicalWidth:o+e*2,height:l?this.effectiveLogicalHeight:s+n*2}}i.ctx.save(),i.ctx.translate(-i.logicalX,-i.logicalY);let d=u.x-i.logicalX,f=u.y-i.logicalY;r?(i.ctx.beginPath(),i.ctx.rect(d,f,u.width,u.height),i.ctx.clip(),i.ctx.clearRect(d,f,u.width,u.height)):i.ctx.clearRect(0,0,i.canvas.width,i.canvas.height),this.debugDraw&&YD(i.col,this._tilePool.size,this.effectiveLogicalWidth,i.ctx,u);try{this.drawCallback(i.ctx,u,a.signal)}finally{i&&i.ctx.restore(),this._pendingDraws.delete(n)}}_emitScrollEvent(e){let n=new CustomEvent(`scroll-virtual`,{detail:{logicalScrollLeft:this._scrollLeft,logicalScrollTop:this._scrollTop,userGesture:e,containerScrollLeft:this._scrollContainer?.scrollLeft??0,containerScrollTop:this._scrollContainer?.scrollTop??0,viewportStartLogical:this._scrollLeft,viewportEndLogical:this._scrollLeft+this._viewportWidth,viewportStartLogicalY:this._scrollTop,viewportEndLogicalY:this._scrollTop+this._viewportHeight},bubbles:!0,composed:!0});this.dispatchEvent(n)}isRegionVisible(e){let n=this._scrollLeft,r=this._scrollLeft+this._viewportWidth,i=e.x+e.width>n&&e.x<r,a=this._scrollTop,o=this._scrollTop+this._viewportHeight,s=e.y+e.height>a&&e.y<o;return i&&s}_updateScrollPosition(e){this._scrollContainer&&(this._scrollContainer.scrollLeft=this._scrollLeft,this._scrollContainer.scrollTop=this._scrollTop),this._recalculateTiles(`updateScrollPosition`),this._emitScrollEvent(e),this._scrollDebounce()}get logicalScrollLeft(){return this._scrollLeft}set logicalScrollLeft(e){let n=this._scrollLeft,r=PD(e,0,Math.max(0,this.effectiveLogicalWidth-this._viewportWidth));r!==this._scrollLeft&&(this._scrollLeft=r,this.requestUpdate(`logicalScrollLeft`,n),this._updateScrollPosition(!1))}get logicalScrollTop(){return this._scrollTop}set logicalScrollTop(e){let n=this._scrollTop,r=PD(e,0,Math.max(0,this.effectiveLogicalHeight-this._viewportHeight));r!==this._scrollTop&&(this._scrollTop=r,this.requestUpdate(`logicalScrollTop`,n),this._updateScrollPosition(!1))}get containerScrollLeft(){return this._scrollContainer?.scrollLeft??0}get containerScrollTop(){return this._scrollContainer?.scrollTop??0}get viewportWidth(){return this._viewportWidth}get viewportHeight(){return this._viewportHeight}setRenderingOptions(e){this._renderingOptions={...this._renderingOptions,...e},this._recalculateTiles(`setRenderingOptions`)}getRenderingOptions(){return this._renderingOptions}invalidateAll(){this._requestRedrawAll(`invalidateAll`)}invalidateRegion(e,n,r,i){this.#e(`invalidateRegion: ${e},${n},${r},${i}`);let a=this._getTileWidth(),o=this._getTileHeight(),{firstTile:s,lastTile:c}=this._calculateTileRange(),{firstRow:l,lastRow:u}=this._calculateTileRowRange(),d=this._renderingOptions.overlapPercent,f=Math.floor(e/a),p=Math.ceil((e+r)/a),m=Math.floor(n/o),h=Math.ceil((n+i)/o);for(let g=Math.max(s,f);g<=Math.min(c,p);g++)for(let s=Math.max(l,m);s<=Math.min(u,h);s++){let c=ZD(g,s);if(this._visibleTiles.has(c)){let s=this._tilePool.get(c);if(s){let l=a*d,u=o*d,f=s.logicalX-l,p=s.logicalX+a+l,m=s.logicalY-u,h=s.logicalY+o+u,g=Math.max(e,f),_=Math.min(e+r,p)-g,v=Math.max(n,m),y=Math.min(n+i,h)-v;if(_>0&&y>0){let e={x:g,y:v,width:_,height:y};this._requestTileDraw(`invalidateRegion`,c,e)}}}}}convertFromViewportToCanvas(e,n){let r=RD(this.effectiveLogicalWidth,this._viewportWidth),i=UD(this.effectiveLogicalHeight,this._viewportHeight);return MD(e,n,this._scrollLeft,r,this._scrollTop,i)}convertFromCanvasToViewport(e,n){let r=RD(this.effectiveLogicalWidth,this._viewportWidth),i=UD(this.effectiveLogicalHeight,this._viewportHeight);return ND(e,n,this._scrollLeft,r,this._scrollTop,i)}positionChildRange(e,n,r,i,a){if(Number.isNaN(n)||Number.isNaN(r)){console.warn(`positionChildRange: Invalid startX or endX values: ${n}, ${r}`);return}let o=Array.from(this.children).filter(n=>n.matches?.(e)),s=i??0,c=a??this.effectiveLogicalHeight;for(let e of o)this._positionedChildren.set(e,{startX:n,endX:r,startY:s,endY:c});this._positionChildren(`positionChildRange`)}manualChildPositioningUpdate(){this._positionChildren(`manualChildPositioningUpdate`)}positionChildClear(e){for(let[n]of this._positionedChildren)n.matches?.(e)&&(this._positionedChildren.delete(n),n.removeAttribute(`style`))}_positionChildren(e){if(this.#e(`_positionChildren: ${e} positionedChildren: ${this._positionedChildren.size}`),this.hasUpdated&&this._childrenContainerEl)for(let[e,n]of this._positionedChildren){let r=n.endX-n.startX,i=n.endY-n.startY;e.setAttribute(`style`,`position: absolute; left: ${n.startX}px; top: ${n.startY}px; width: ${r}px; height: ${i}px;`)}}render(){let e=v({"scroll-container":!0,scrollable:this.hinting});return i`
12208
+ `;function RD(e,n){return e*n}function zD(e,n){return n===0||e<=n}function BD(e,n){return e<0||n===0?0:zD(e,n)?(n-e)/2:0}function VD(e,n,r,i,a){if(n===0||e<0)return 0;let o=r+i*a;return e>=o?0:zD(r,i)?r:e+n>o?Math.max(0,o-e):n}function HD(e,n,r,i){if(r===0)return{firstTile:0,lastTile:0,tiles:[]};let a=RD(n,i.tileWidthMultiplier);if(zD(r,n))return{firstTile:0,lastTile:0,tiles:[{index:0,logicalX:0}]};let o=Math.floor(e/a),s=Math.floor((e+n-1)/a),c=Math.max(0,Math.ceil(r/a)-1),l=[],u=o,d=Math.min(s+i.tilesBuffer,c);for(let e=u;e<=d;e++){let n=e*a;if(!(n>=r)&&(l.push({index:e,logicalX:n}),l.length>=i.maxPoolSize))break}return{firstTile:Math.max(0,o),lastTile:l.length>0?l[l.length-1].index:0,tiles:l}}function UD(e,n){return e*n}function WD(e,n){return n===0||e<=n}function GD(e,n){return e<0||n===0?0:WD(e,n)?(n-e)/2:0}function KD(e,n,r,i,a){if(n===0||e<0)return 0;let o=r+i*a;return e>=o?0:WD(r,i)?r:e+n>o?Math.max(0,o-e):n}function qD(e,n,r,i){if(r===0)return{firstRow:0,lastRow:0,rows:[]};let a=UD(n,i.tileHeightMultiplier);if(WD(r,n))return{firstRow:0,lastRow:0,rows:[{row:0,logicalY:0}]};let o=Math.floor(e/a),s=Math.floor((e+n-1)/a),c=Math.max(0,Math.ceil(r/a)-1),l=[],u=Math.min(s+i.tilesBuffer,c);for(let e=o;e<=u;e++){let n=e*a;if(!(n>=r)&&(l.push({row:e,logicalY:n}),l.length>=i.maxPoolSize))break}return{firstRow:Math.max(0,o),lastRow:l.length>0?l[l.length-1].row:0,rows:l}}function JD(e,n){let r=null,i=(...i)=>{r&&clearTimeout(r),r=setTimeout(()=>{e(...i)},n)};return i.cancel=()=>{r&&=(clearTimeout(r),null)},i}const YD=[`#FF6B6B`,`#4ECDC4`,`#45B7D1`,`#96CEB4`,`#FFEAA7`,`#DDA0DD`,`#98D8C8`,`#F7DC6F`,`#BB8FCE`,`#85C1E9`];function XD(e){return YD[e%YD.length]}function ZD(e,n,r,i,a){i.fillStyle=`whitesmoke`,i.fillRect(a.x,a.y,a.width,a.height),i.fillStyle=XD(e),i.strokeStyle=XD(e),i.lineWidth=2,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(a.x+a.width,a.y+a.height),i.moveTo(a.x+a.width,a.y),i.lineTo(a.x,a.y+a.height),i.stroke(),i.font=`24pt system-ui`,i.textBaseline=`top`,i.fillText(`#${e}/${n}`,a.x+20,a.y+20),i.font=`18pt system-ui`,i.fillText(`Pos: ${Math.round(a.x)},${Math.round(a.y)}`,a.x+20,a.y+60),i.fillText(`Size: ${Math.round(a.width)}x${Math.round(a.height)}`,a.x+20,a.y+90),i.fillText(`VCanvas width: ${Math.round(r)}`,a.x+20,a.y+120);let o=a.x+a.width/2,s=a.y+a.height/2;i.beginPath(),i.moveTo(a.x,s),i.lineTo(a.x+a.width,s),i.moveTo(o,a.y),i.lineTo(o,a.y+a.height),i.stroke(),i.strokeRect(a.x,a.y,a.width,a.height)}var QD=function(e,n,r,i){var a=arguments.length,o=a<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,r):i,s;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(o=(a<3?s(o):a>3?s(n,r,o):s(n,r))||o);return a>3&&o&&Object.defineProperty(n,r,o),o};const $D=(e,n)=>`${e},${n}`;let eO=class extends n{_emitScrollEndEvent(e){let n=new CustomEvent(`scrollend-virtual`,{detail:{logicalScrollLeft:this._scrollLeft,logicalScrollTop:this._scrollTop,userGesture:e,containerScrollLeft:this._scrollContainer?.scrollLeft??0,containerScrollTop:this._scrollContainer?.scrollTop??0},bubbles:!0,composed:!0});this.dispatchEvent(n)}constructor(){super(),this.debugTrace=!1,this.debugDraw=!1,this.hinting=!1,this._viewportWidth=0,this._viewportHeight=0,this._scrollLeft=0,this._scrollTop=0,this._logicalHeight=0,this._tilePool=new Map,this._visibleTiles=new Set,this._pendingDraws=new Map,this._scrollContainer=null,this._spacer=null,this._tilePoolEl=null,this._childrenContainerEl=null,this._resizeObserver=null,this._positionedChildren=new Map,this._boundOnScroll=this._onScroll.bind(this),this._renderingOptions={tileWidthMultiplier:.5,tileHeightMultiplier:.5,tilesBuffer:2,overlapPercent:.01,overscrollPadMultiplier:1,maxPoolSize:3,scrollDebounceMs:100},this._dpr=window.devicePixelRatio||1,this._logicalWidth=0,this.logicalWidth=0,this.logicalHeight=0,this.drawCallback=null,this._scrollDebounce=JD(()=>{this._requestRedrawAll(`scrollDebounce`)},this._renderingOptions.scrollDebounceMs),this._scrollEndDebounce=JD(()=>{this._emitScrollEndEvent(!0)},this._renderingOptions.scrollDebounceMs),this._resizeDebounce=JD(()=>{this._onResize()},this._renderingOptions.scrollDebounceMs)}static{this.styles=LD}connectedCallback(){super.connectedCallback(),this._setupResizeObserver()}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),this._resizeObserver=null,this._scrollEndDebounce.cancel(),this._pendingDraws.forEach(e=>e.abort()),this._tilePool.clear(),this._scrollContainer?.removeEventListener(`scroll`,this._boundOnScroll)}firstUpdated(){let e=this.shadowRoot?.querySelector(`.scroll-container`);this._scrollContainer=e,this._spacer=this.shadowRoot?.querySelector(`.spacer`),this._tilePoolEl=this.shadowRoot?.querySelector(`.tile-pool`),this._childrenContainerEl=this.shadowRoot?.querySelector(`.children-container`),this._scrollContainer&&this._scrollContainer.addEventListener(`scroll`,this._boundOnScroll),requestAnimationFrame(()=>{this._updateViewportDimensions(),this._updateSpacer(),this._updateScrollContainerClass(),this._recalculateTiles(`firstUpdated cb`),this._positionChildren(`firstUpdated cb`)})}set logicalWidth(e){this._logicalWidth=e,this._updateSpacer(),this._updateScrollContainerClass(),this.hasUpdated&&(this._updateTileWidths(`set logicalWidth`),this._recalculateTiles(`set logicalWidth`))}get logicalWidth(){return this._logicalWidth}set logicalHeight(e){this._logicalHeight=e,this._updateSpacer(),this._updateScrollContainerClass(),this.hasUpdated&&this._recalculateTiles(`set logicalHeight`)}get logicalHeight(){return this._logicalHeight}get effectiveLogicalWidth(){return this._logicalWidth||this._viewportWidth}get effectiveLogicalHeight(){return this._logicalHeight||this._viewportHeight}_setupResizeObserver(){this._resizeObserver=new ResizeObserver(()=>{this._resizeDebounce()}),this._resizeObserver.observe(this)}_onResize(){let e=this._viewportWidth,n=this._viewportHeight;this._updateViewportDimensions();let r=e!==this._viewportWidth,i=n!==this._viewportHeight;(r||i)&&(this._updateSpacer(),this._updateScrollContainerClass(),this._recalculateTiles(`onResize`))}_updateTileWidths(e){let n=this._getTileWidth();for(let e of this._tilePool.values()){let r=this._getTileClippedWidth(e.logicalX,n);e.canvas.width=r*this._dpr,e.canvas.style.width=`${r}px`,e.ctx.scale(this._dpr,this._dpr)}this._requestRedrawAll(`updateTileWidths (${e})`)}_updateViewportDimensions(){let e=this.getBoundingClientRect();this._viewportWidth=e.width,this._viewportHeight=e.height}_onScroll(){if(!this._scrollContainer)return;let e=this._scrollContainer.scrollLeft,n=this._scrollContainer.scrollTop;(e!==this._scrollLeft||n!==this._scrollTop)&&(this._scrollLeft=e,this._scrollTop=n,this._recalculateTiles(`onScroll`),this._emitScrollEvent(!0),this._scrollDebounce(),this._scrollEndDebounce())}_updateSpacer(){if(!this._spacer)return;let e=zD(this.effectiveLogicalWidth,this._viewportWidth),n=WD(this.effectiveLogicalHeight,this._viewportHeight);e&&n?this._spacer.style.display=`none`:(this._spacer.style.display=`block`,this._spacer.style.width=`${this.effectiveLogicalWidth}px`,this._spacer.style.height=`${this.effectiveLogicalHeight}px`),this._childrenContainerEl&&(this._childrenContainerEl.style.width=`${this.effectiveLogicalWidth}px`,this._childrenContainerEl.style.height=`${this.effectiveLogicalHeight}px`)}_updateScrollContainerClass(){if(!this._scrollContainer)return;let e=this.effectiveLogicalHeight>this._viewportHeight;this._scrollContainer.classList.toggle(`vertical`,e)}_getTileWidth(){return RD(this._viewportWidth,this._renderingOptions.tileWidthMultiplier)}_getTileHeight(){return UD(this._viewportHeight,this._renderingOptions.tileHeightMultiplier)}_getTileClippedWidth(e,n){return VD(e,n,this.effectiveLogicalWidth,this._viewportWidth,this._renderingOptions.overscrollPadMultiplier)}_getTileClippedHeight(e,n){return KD(e,n,this.effectiveLogicalHeight,this._viewportHeight,this._renderingOptions.overscrollPadMultiplier)}_calculateTileRange(){return HD(this._scrollLeft,this._viewportWidth,this.effectiveLogicalWidth,this._renderingOptions)}_calculateTileRowRange(){return qD(this._scrollTop,this._viewportHeight,this.effectiveLogicalHeight,this._renderingOptions)}_recalculateTiles(e){this._updateViewportDimensions();let{tiles:n}=this._calculateTileRange(),{rows:r}=this._calculateTileRowRange(),i=new Set;for(let{index:e,logicalX:a}of n)for(let{row:n,logicalY:o}of r)i.add($D(e,n)),this._tilePool.has($D(e,n))||this._tilePool.set($D(e,n),this._createTile(e,n,a,o));let a=this._renderingOptions.maxPoolSize*Math.max(1,r.length),o=[...this._tilePool.keys()].filter(e=>!i.has(e)),s=[...i].filter(e=>!this._tilePool.has(e)),c=Math.min(o.length,s.length);for(let e=0;e<c;e++){let n=o[e],r=s[e],i=this._tilePool.get(n);if(i&&r){let[e,a]=r.split(`,`),o=Number(e),s=Number(a);this._tilePool.delete(n),i.col=o,i.row=s,i.logicalX=o*this._getTileWidth(),i.logicalY=s*this._getTileHeight(),i.visible=!1,i.canvas.dataset.tileKey=r,this._tilePool.set(r,i)}}let l=[...this._tilePool.keys()];if(l.length>a){let e=l.length-a;l.filter(e=>!i.has(e)).slice(0,e).forEach(e=>{let n=this._tilePool.get(e);n&&(this._tilePool.delete(e),n.canvas.remove())})}this._updateTiles(`recalculateTiles (${e})`)}_createTile(e,n,r,i){let a=document.createElement(`canvas`),o=$D(e,n);a.dataset.tileKey=o;let s=this._getTileWidth(),c=this._getTileHeight(),l=this._getTileClippedWidth(r,s),u=this._getTileClippedHeight(i,c),d=a.getContext(`2d`);if(!d)throw Error(`Could not get canvas context`);return this._viewportHeight===0&&this.#e(`Warning: Creating tile ${o} with viewport height 0. The VCanvas component may not be properly sized or visible.`),a.width=l*this._dpr,a.height=u*this._dpr,a.style.width=`${l}px`,a.style.height=`${u}px`,d.scale(this._dpr,this._dpr),this.#e(`Created tile ${o} at logicalX ${r} logicalY ${i}`),{canvas:a,ctx:d,logicalX:r,logicalY:i,col:e,row:n,visible:!1,isInDOM:!1}}_updateTiles(e){let{tiles:n,firstTile:r,lastTile:i}=this._calculateTileRange(),{rows:a,firstRow:o,lastRow:s}=this._calculateTileRowRange(),c=this._getTileWidth(),l=this._getTileHeight(),u=zD(this.effectiveLogicalWidth,this._viewportWidth),d=WD(this.effectiveLogicalHeight,this._viewportHeight),f=BD(this.effectiveLogicalWidth,this._viewportWidth),p=GD(this.effectiveLogicalHeight,this._viewportHeight),m=this._renderingOptions.tilesBuffer,h=[];for(let e of this._tilePool.values())e.visible=!1;this._visibleTiles.clear();for(let[n,a]of this._tilePool){let g=u?a.col===0:a.col>=r-m&&a.col<=i+m,_=d?a.row===0:a.row>=o-m&&a.row<=s+m;if(g&&_){this._visibleTiles.add(n);let r=a.col*c,i=a.row*l,o=u?f:r,s=d?p:i,m=this._getTileClippedWidth(r,c),g=this._getTileClippedHeight(i,l);(!a.visible||a.logicalX!==r||a.logicalY!==i||a.canvas.style.left!==`${o}px`||a.canvas.style.top!==`${s}px`||a.canvas.width!==m*this._dpr||a.canvas.height!==g*this._dpr)&&(a.logicalX=r,a.logicalY=i,a.canvas.width=m*this._dpr,a.canvas.style.width=`${m}px`,a.canvas.height=g*this._dpr,a.canvas.style.height=`${g}px`,a.canvas.style.left=`${o}px`,a.canvas.style.top=`${s}px`,a.ctx.scale(this._dpr,this._dpr),!a.isInDOM&&this._tilePoolEl&&(this._tilePoolEl.appendChild(a.canvas),a.isInDOM=!0),a.visible||(h.push(n),this._requestTileDraw(`updateTiles(${e})`,n))),a.visible=!0}else a.visible&&(a.visible=!1,a.isInDOM=!1,a.canvas.remove())}for(let{index:r,logicalX:i}of n)for(let{row:n,logicalY:o}of a){let a=$D(r,n);if(!this._tilePool.has(a)&&this._tilePoolEl){let s=this._createTile(r,n,i,o),c=u?f:i,l=d?p:o;s.canvas.style.left=`${c}px`,s.canvas.style.top=`${l}px`,s.visible=!0,s.isInDOM=!0,this._tilePoolEl.appendChild(s.canvas),this._tilePool.set(a,s),this._visibleTiles.add(a),h.push(a),this._requestTileDraw(`updateTiles(${e})`,a)}}return h}_requestRedrawAll(e){this.#e(`Requesting _requestRedrawAll: ${e} visible tiles: ${this._visibleTiles.size} pending draws: ${this._pendingDraws.size}`),this._pendingDraws.forEach(e=>e.abort()),this._pendingDraws.clear();for(let n of this._visibleTiles)this._requestTileDraw(`requestRedrawAll(${e})`,n)}#e(e){this.debugTrace&&console.log(`[VCanvas]`,e)}_requestTileDraw(e,n,r){let i=this._tilePool.get(n);if(!i||!this.drawCallback)return;let a=new AbortController;this._pendingDraws.set(n,a);let o=this._getTileWidth(),s=this._getTileHeight(),c=zD(this.effectiveLogicalWidth,this._viewportWidth),l=WD(this.effectiveLogicalHeight,this._viewportHeight),u;if(r)u=r;else{let e=o*this._renderingOptions.overlapPercent,n=s*this._renderingOptions.overlapPercent;u={x:c?0:i.logicalX-e,y:l?0:i.logicalY-n,width:c?this.effectiveLogicalWidth:o+e*2,height:l?this.effectiveLogicalHeight:s+n*2}}i.ctx.save(),i.ctx.translate(-i.logicalX,-i.logicalY);let d=u.x-i.logicalX,f=u.y-i.logicalY;r?(i.ctx.beginPath(),i.ctx.rect(d,f,u.width,u.height),i.ctx.clip(),i.ctx.clearRect(d,f,u.width,u.height)):i.ctx.clearRect(0,0,i.canvas.width,i.canvas.height),this.debugDraw&&ZD(i.col,this._tilePool.size,this.effectiveLogicalWidth,i.ctx,u);try{this.drawCallback(i.ctx,u,a.signal)}finally{i&&i.ctx.restore(),this._pendingDraws.delete(n)}}_emitScrollEvent(e){let n=new CustomEvent(`scroll-virtual`,{detail:{logicalScrollLeft:this._scrollLeft,logicalScrollTop:this._scrollTop,userGesture:e,containerScrollLeft:this._scrollContainer?.scrollLeft??0,containerScrollTop:this._scrollContainer?.scrollTop??0,viewportStartLogical:this._scrollLeft,viewportEndLogical:this._scrollLeft+this._viewportWidth,viewportStartLogicalY:this._scrollTop,viewportEndLogicalY:this._scrollTop+this._viewportHeight},bubbles:!0,composed:!0});this.dispatchEvent(n)}isRegionVisible(e){let n=this._scrollLeft,r=this._scrollLeft+this._viewportWidth,i=e.x+e.width>n&&e.x<r,a=this._scrollTop,o=this._scrollTop+this._viewportHeight,s=e.y+e.height>a&&e.y<o;return i&&s}_updateScrollPosition(e){this._scrollContainer&&(this._scrollContainer.scrollLeft=this._scrollLeft,this._scrollContainer.scrollTop=this._scrollTop),this._recalculateTiles(`updateScrollPosition`),this._emitScrollEvent(e),this._scrollDebounce()}get logicalScrollLeft(){return this._scrollLeft}set logicalScrollLeft(e){let n=this._scrollLeft,r=ID(e,0,Math.max(0,this.effectiveLogicalWidth-this._viewportWidth));r!==this._scrollLeft&&(this._scrollLeft=r,this.requestUpdate(`logicalScrollLeft`,n),this._updateScrollPosition(!1))}get logicalScrollTop(){return this._scrollTop}set logicalScrollTop(e){let n=this._scrollTop,r=ID(e,0,Math.max(0,this.effectiveLogicalHeight-this._viewportHeight));r!==this._scrollTop&&(this._scrollTop=r,this.requestUpdate(`logicalScrollTop`,n),this._updateScrollPosition(!1))}get containerScrollLeft(){return this._scrollContainer?.scrollLeft??0}get containerScrollTop(){return this._scrollContainer?.scrollTop??0}get viewportWidth(){return this._viewportWidth}get viewportHeight(){return this._viewportHeight}setRenderingOptions(e){this._renderingOptions={...this._renderingOptions,...e},this._recalculateTiles(`setRenderingOptions`)}getRenderingOptions(){return this._renderingOptions}invalidateAll(){this._requestRedrawAll(`invalidateAll`)}invalidateRegion(e,n,r,i){this.#e(`invalidateRegion: ${e},${n},${r},${i}`);let a=this._getTileWidth(),o=this._getTileHeight(),{firstTile:s,lastTile:c}=this._calculateTileRange(),{firstRow:l,lastRow:u}=this._calculateTileRowRange(),d=this._renderingOptions.overlapPercent,f=Math.floor(e/a),p=Math.ceil((e+r)/a),m=Math.floor(n/o),h=Math.ceil((n+i)/o);for(let g=Math.max(s,f);g<=Math.min(c,p);g++)for(let s=Math.max(l,m);s<=Math.min(u,h);s++){let c=$D(g,s);if(this._visibleTiles.has(c)){let s=this._tilePool.get(c);if(s){let l=a*d,u=o*d,f=s.logicalX-l,p=s.logicalX+a+l,m=s.logicalY-u,h=s.logicalY+o+u,g=Math.max(e,f),_=Math.min(e+r,p)-g,v=Math.max(n,m),y=Math.min(n+i,h)-v;if(_>0&&y>0){let e={x:g,y:v,width:_,height:y};this._requestTileDraw(`invalidateRegion`,c,e)}}}}}convertFromViewportToCanvas(e,n){let r=BD(this.effectiveLogicalWidth,this._viewportWidth),i=GD(this.effectiveLogicalHeight,this._viewportHeight);return PD(e,n,this._scrollLeft,r,this._scrollTop,i)}convertFromCanvasToViewport(e,n){let r=BD(this.effectiveLogicalWidth,this._viewportWidth),i=GD(this.effectiveLogicalHeight,this._viewportHeight);return FD(e,n,this._scrollLeft,r,this._scrollTop,i)}positionChildRange(e,n,r,i,a){if(Number.isNaN(n)||Number.isNaN(r)){console.warn(`positionChildRange: Invalid startX or endX values: ${n}, ${r}`);return}let o=Array.from(this.children).filter(n=>n.matches?.(e)),s=i??0,c=a??this.effectiveLogicalHeight;for(let e of o)this._positionedChildren.set(e,{startX:n,endX:r,startY:s,endY:c});this._positionChildren(`positionChildRange`)}manualChildPositioningUpdate(){this._positionChildren(`manualChildPositioningUpdate`)}positionChildClear(e){for(let[n]of this._positionedChildren)n.matches?.(e)&&(this._positionedChildren.delete(n),n.removeAttribute(`style`))}_positionChildren(e){if(this.#e(`_positionChildren: ${e} positionedChildren: ${this._positionedChildren.size}`),this.hasUpdated&&this._childrenContainerEl)for(let[e,n]of this._positionedChildren){let r=n.endX-n.startX,i=n.endY-n.startY;e.setAttribute(`style`,`position: absolute; left: ${n.startX}px; top: ${n.startY}px; width: ${r}px; height: ${i}px;`)}}render(){let e=v({"scroll-container":!0,scrollable:this.hinting});return i`
12178
12209
  <div class=${e}>
12179
12210
  <div class="spacer"></div>
12180
12211
  <div class="tile-pool"></div>
@@ -12182,7 +12213,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12182
12213
  <slot></slot>
12183
12214
  </div>
12184
12215
  </div>
12185
- `}};XD([d({type:Boolean})],QD.prototype,`hinting`,void 0),XD([d()],QD.prototype,`logicalWidth`,null),XD([d()],QD.prototype,`logicalHeight`,null),XD([d({type:Number})],QD.prototype,`logicalScrollLeft`,null),XD([d({type:Number})],QD.prototype,`logicalScrollTop`,null),QD=XD([l(`x-vcanvas`)],QD);const $D=1e4;let Z=class extends n{constructor(...e){super(...e),this.tracks=[],this.events=[],this.min=0,this.max=1e3,this.trackHeight=`fixed`,this.userScale=`normal`,this.reorderable=!1,this.metaEnabled=!1,this.altMajorBg=!1,this.defaultTrackHeight=48,this.gridMode=`adaptive`,this.minorStep=10,this.onDragging=null,this.formatLabel=String,this._ppu=1,this._viewRange={min:0,max:4e3},this._vViewRange={min:0,max:1},this._vScale=1,this._selectedIds=new Set,this._tickledId=void 0,this._drag={kind:`none`},this._metaHeight=120,this._trackHeightOverrides=new Map,this._trackLayout=[],this._internalEvents=[],this._internalTracks=[],this.#e=null,this.#t={},this.#n=null,this.#r=24,this.#i=void 0,this.#a=null,this.#o=!1,this.#s=!1,this.#C=e=>{this.#s?(this._viewRange=this.#_(this._viewRange.min,this._ppu),this.#m(this._vViewRange.min,this._vViewRange.max)):(this.#s=!0,this.#v(),this.#h(),this.#E()),this.#y(),this.#S()},this.#w=(e,n,r)=>{let i=this._ppu,a={x:n.x/i+this.min,y:n.y,width:n.width/i,height:n.height};this.#t=vD(this);let o=sD(this._viewRange,this.userScale,this.#c(),this.gridMode,this.minorStep,i),s=this._internalTracks.map(e=>({key:e.key,color:e.color}));pD(e,a,this._trackLayout,s,this.#t,i),dD(e,a,o,this.altMajorBg,this.#t,i),mD(e,a,this._internalEvents,this._trackLayout,this._selectedIds,this._tickledId,this._drag,this.#t,i),hD(e,this._drag,i);let c=this.#e?.logicalScrollTop??0;fD(e,a,o,this.#r,this.formatLabel,this.#t,i,c)},this.#T=e=>{let n=e.detail;if(n.userGesture===!1)return;let r=this._ppu;if(r<=0)return;let i=n.logicalScrollLeft/r+this.min;if(this._viewRange=this.#_(i,r),this._vScale>0){let e=this._vViewRange.max-this._vViewRange.min,r=n.logicalScrollTop/this._vScale;this.#m(r,r+e)}},this.#D=e=>{let n=e.detail,r=n.b-n.a,i=this.#c();r>0&&(this._ppu=Math.max(this.#l(),Math.min(i/r,$D))),this._viewRange=this.#_(n.a,this._ppu),this.#y()},this.#O=e=>{let n=e.detail;this.#m(n.a,n.b)},this.#k=e=>{let n=e.currentTarget;n.setPointerCapture(e.pointerId),e.stopPropagation(),e.preventDefault();let r=n.getBoundingClientRect(),i=r.height>0?(e.clientY-r.top)/r.height:.5,a=this._vViewRange.max-this._vViewRange.min,o=this._vViewRange.min+i*a;this._drag={kind:`v-axis-zoom`,anchorBaseY:o,startScreenX:e.screenX,startScreenY:e.screenY,startVMin:this._vViewRange.min,startVMax:this._vViewRange.max,startVScale:this._vScale}},this.#A=e=>{if(this._drag.kind!==`v-axis-zoom`)return;let n=this._drag,r=e.screenX-n.startScreenX,i=e.screenY-n.startScreenY;if(Math.abs(r)+Math.abs(i)<5)return;let a=CD(r,4),o=CD(i,4),s=TD(n.startVMin,n.startVMax,n.startVScale,n.anchorBaseY,a,o);this.setVerticalZoomPan(s.vMin,s.vMax)},this.#j=e=>{this._drag.kind===`v-axis-zoom`&&(e.currentTarget.releasePointerCapture(e.pointerId),this._drag={kind:`none`})},this.#F=e=>{let{trackKey:n,height:r}=e.detail;this.#L(n,r)},this.#I=e=>{let{trackKey:n,height:r}=e.detail;this.#L(n,r),this.dispatchEvent(new CustomEvent(`track-resize`,{detail:{trackKey:n,height:r},bubbles:!0,composed:!0}))}}static{this.styles=[AD]}#e;#t;#n;#r;#i;#a;#o;#s;get pxPerUnit(){return this._ppu}get axisHeight(){return this.#r}get tabWidth(){return this.#P}#c(){return this.#e?.viewportWidth??this.#e?.clientWidth??800}#l(){let e=this.max-this.min;return e<=0?1:this.#c()/e}#u(){return this.#e?.viewportHeight??this.#e?.clientHeight??300}#d(){let e=0;for(let n of this._internalTracks){if(n.hidden)continue;let r=this._trackHeightOverrides.get(n.key);e+=r??n.height??this.defaultTrackHeight}return e||1}#f(){let e=1/0;for(let n of this._internalTracks){if(n.hidden)continue;let r=this._trackHeightOverrides.get(n.key)??n.height??this.defaultTrackHeight;r<e&&(e=r)}return e===1/0?this.defaultTrackHeight:e}#p(){let e=0;for(let n of this._internalTracks){if(n.hidden)continue;let r=this._trackHeightOverrides.get(n.key)??n.height??this.defaultTrackHeight;r>e&&(e=r)}return e||this.defaultTrackHeight}#m(e,n){let r=this.#d(),i=this.#u()-this.#r,a=e,o=n,s=this.#p(),c=Math.max(s,r*.05),l=this.#f(),u=i>0?i*l/24:r,d=Math.min(r,u),f=o-a;if(f<c){let e=(a+o)/2;a=e-c/2,o=e+c/2,f=c}if(f>d){let e=(a+o)/2;a=e-d/2,o=e+d/2,f=d}o>r&&(o=r,a=Math.max(0,o-f)),a<0&&(a=0,o=Math.min(r,a+f)),this._vViewRange={min:a,max:o},this._vScale=i>0?i/(o-a):1}#h(){let e=this.#d();this.#m(0,e)}get#g(){return this._vViewRange.min*this._vScale}#_(e,n){let r=this.#c(),i=n>0?r/n:this.max-this.min,a=e,o=a+i;return o>this.max&&(o=this.max,a=Math.max(this.min,o-i)),a<this.min&&(a=this.min,o=Math.min(this.max,a+i)),{min:a,max:o}}setPpu(e){this._ppu=Math.max(this.#l(),Math.min(e,$D)),this._viewRange=this.#_(this._viewRange.min,this._ppu)}setViewRange(e){let n=this.#c(),r=e.max-e.min;r>0&&(this._ppu=Math.max(this.#l(),Math.min(n/r,$D))),this._viewRange=this.#_(e.min,this._ppu)}setZoomPan(e,n){this._ppu=Math.max(this.#l(),Math.min(n,$D)),this._viewRange=this.#_(e,this._ppu)}setVerticalZoomPan(e,n){this.#m(e,n)}selectAll(){this._selectedIds=new Set(this._internalEvents.map(e=>e.id)),this.#R(),this.#S()}deselectAll(){this._selectedIds=new Set,this.#R(),this.#S()}getTrackEvents(e){return this._internalEvents.filter(n=>n.trackKey===e)}get selectedIds(){return[...this._selectedIds]}set selectedIds(e){this._selectedIds=new Set(e),this.#R(),this.#S()}selectTrack(e,n=!1){this.dispatchEvent(new CustomEvent(`track-select`,{detail:{trackKey:e,shiftKey:n},bubbles:!0,composed:!0}))}resetTrackHeights(){this._trackHeightOverrides=new Map,this.#o=!0}static{this.defaultDragSnapping=()=>({})}static{this.gridSnapping=e=>{let{gridResolution:n,currentStart:r,currentEnd:i}=e,{minorStep:a}=n;return{start:Math.round(r/a)*a,end:Math.round(i/a)*a}}}processDrag(e,n,r,i,a,o,s,c){let l=i,u=a,d=o;if(this.onDragging){let f=this.onDragging({eventId:e,rawLogicalX:n,rawY:r,currentStart:i,currentEnd:a,currentTrackKey:o,gridResolution:c,originTrackKey:s});l=f.start??i,u=f.end??a,d=f.trackKey??o}return this.dispatchEvent(new CustomEvent(`dragging`,{detail:{eventId:e,start:l,end:u,trackKey:d,rawLogicalX:n,rawY:r,originTrackKey:s},bubbles:!0,composed:!0})),{start:l,end:u,trackKey:d}}getVCanvas(){return this.#e}get tickledEvent(){return this._tickledId===void 0?null:this._internalEvents.find(e=>e.id===this._tickledId)??null}firstUpdated(){this.#e=this.shadowRoot?.querySelector(`x-vcanvas`),this.#e&&(this.#e.drawCallback=this.#w,this.#e.addEventListener(`scroll-virtual`,this.#T),this.#n=ED(this,this.#e),this.#a=new ResizeObserver(this.#C),this.#a.observe(this.#e))}disconnectedCallback(){super.disconnectedCallback(),this.#n?.(),this.#n=null,this.#a?.disconnect(),this.#a=null}willUpdate(e){let n=!1,r=!1,i=!1;e.has(`tracks`)&&(this._internalTracks=[...this.tracks],n=!0,r=!0),e.has(`events`)&&(this._internalEvents=[...this.events]),e.has(`trackHeight`)&&(this.trackHeight!==`free`&&this._trackHeightOverrides.size>0&&(this._trackHeightOverrides=new Map),n=!0,r=!0),(e.has(`_vScale`)||e.has(`defaultTrackHeight`)||e.has(`_trackHeightOverrides`))&&(n=!0),(e.has(`min`)||e.has(`max`))&&(i=!0),this.#o&&(this.#o=!1,r=!0),i&&this.#v(),r&&this.#h(),n&&this.#E()}updated(e){(e.has(`_ppu`)||e.has(`_viewRange`)||e.has(`min`)||e.has(`max`))&&(this.#y(),this.#S()),(e.has(`events`)||e.has(`userScale`)||e.has(`altMajorBg`)||e.has(`gridMode`)||e.has(`minorStep`))&&this.#S(),e.has(`_trackLayout`)&&(this.#b(),this.#N(),this.#S()),(e.has(`_vViewRange`)||e.has(`_vScale`))&&(this.#M(),this.#S()),this._tickledId!==this.#i&&(this.#i=this._tickledId,this.dispatchEvent(new CustomEvent(`tickle-change`,{detail:{event:this.tickledEvent},bubbles:!0,composed:!0})))}render(){let e=this.#d();return i`
12216
+ `}};QD([d({type:Boolean})],eO.prototype,`hinting`,void 0),QD([d()],eO.prototype,`logicalWidth`,null),QD([d()],eO.prototype,`logicalHeight`,null),QD([d({type:Number})],eO.prototype,`logicalScrollLeft`,null),QD([d({type:Number})],eO.prototype,`logicalScrollTop`,null),eO=QD([l(`x-vcanvas`)],eO);const tO=1e4;let Z=class extends n{constructor(...e){super(...e),this.tracks=[],this.events=[],this.min=0,this.max=1e3,this.trackHeight=`fixed`,this.userScale=`normal`,this.reorderable=!1,this.metaEnabled=!1,this.altMajorBg=!1,this.defaultTrackHeight=48,this.gridMode=`adaptive`,this.minorStep=10,this.onDragging=null,this.formatLabel=String,this._ppu=1,this._viewRange={min:0,max:4e3},this._vViewRange={min:0,max:1},this._vScale=1,this._selectedIds=new Set,this._tickledId=void 0,this._drag={kind:`none`},this._metaHeight=120,this._trackHeightOverrides=new Map,this._trackLayout=[],this._internalEvents=[],this._internalTracks=[],this.#e=null,this.#t={},this.#n=null,this.#r=24,this.#i=void 0,this.#a=null,this.#o=!1,this.#s=!1,this.#C=e=>{this.#s?(this._viewRange=this.#_(this._viewRange.min,this._ppu),this.#m(this._vViewRange.min,this._vViewRange.max)):(this.#s=!0,this.#v(),this.#h(),this.#E()),this.#y(),this.#S()},this.#w=(e,n,r)=>{let i=this._ppu,a={x:n.x/i+this.min,y:n.y,width:n.width/i,height:n.height};this.#t=bD(this);let o=lD(this._viewRange,this.userScale,this.#c(),this.gridMode,this.minorStep,i),s=this._internalTracks.map(e=>({key:e.key,color:e.color}));hD(e,a,this._trackLayout,s,this.#t,i),pD(e,a,o,this.altMajorBg,this.#t,i),gD(e,a,this._internalEvents,this._trackLayout,this._selectedIds,this._tickledId,this._drag,this.#t,i),_D(e,this._drag,i);let c=this.#e?.logicalScrollTop??0;mD(e,a,o,this.#r,this.formatLabel,this.#t,i,c)},this.#T=e=>{let n=e.detail;if(n.userGesture===!1)return;let r=this._ppu;if(r<=0)return;let i=n.logicalScrollLeft/r+this.min;if(this._viewRange=this.#_(i,r),this._vScale>0){let e=this._vViewRange.max-this._vViewRange.min,r=n.logicalScrollTop/this._vScale;this.#m(r,r+e)}},this.#D=e=>{let n=e.detail,r=n.b-n.a,i=this.#c();r>0&&(this._ppu=Math.max(this.#l(),Math.min(i/r,tO))),this._viewRange=this.#_(n.a,this._ppu),this.#y()},this.#O=e=>{let n=e.detail;this.#m(n.a,n.b)},this.#k=e=>{let n=e.currentTarget;n.setPointerCapture(e.pointerId),e.stopPropagation(),e.preventDefault();let r=n.getBoundingClientRect(),i=r.height>0?(e.clientY-r.top)/r.height:.5,a=this._vViewRange.max-this._vViewRange.min,o=this._vViewRange.min+i*a;this._drag={kind:`v-axis-zoom`,anchorBaseY:o,startScreenX:e.screenX,startScreenY:e.screenY,startVMin:this._vViewRange.min,startVMax:this._vViewRange.max,startVScale:this._vScale}},this.#A=e=>{if(this._drag.kind!==`v-axis-zoom`)return;let n=this._drag,r=e.screenX-n.startScreenX,i=e.screenY-n.startScreenY;if(Math.abs(r)+Math.abs(i)<5)return;let a=TD(r,4),o=TD(i,4),s=DD(n.startVMin,n.startVMax,n.startVScale,n.anchorBaseY,a,o);this.setVerticalZoomPan(s.vMin,s.vMax)},this.#j=e=>{this._drag.kind===`v-axis-zoom`&&(e.currentTarget.releasePointerCapture(e.pointerId),this._drag={kind:`none`})},this.#F=e=>{let{trackKey:n,height:r}=e.detail;this.#L(n,r)},this.#I=e=>{let{trackKey:n,height:r}=e.detail;this.#L(n,r),this.dispatchEvent(new CustomEvent(`track-resize`,{detail:{trackKey:n,height:r},bubbles:!0,composed:!0}))}}static{this.styles=[MD]}#e;#t;#n;#r;#i;#a;#o;#s;get pxPerUnit(){return this._ppu}get axisHeight(){return this.#r}get tabWidth(){return this.#P}#c(){return this.#e?.viewportWidth??this.#e?.clientWidth??800}#l(){let e=this.max-this.min;return e<=0?1:this.#c()/e}#u(){return this.#e?.viewportHeight??this.#e?.clientHeight??300}#d(){let e=0;for(let n of this._internalTracks){if(n.hidden)continue;let r=this._trackHeightOverrides.get(n.key);e+=r??n.height??this.defaultTrackHeight}return e||1}#f(){let e=1/0;for(let n of this._internalTracks){if(n.hidden)continue;let r=this._trackHeightOverrides.get(n.key)??n.height??this.defaultTrackHeight;r<e&&(e=r)}return e===1/0?this.defaultTrackHeight:e}#p(){let e=0;for(let n of this._internalTracks){if(n.hidden)continue;let r=this._trackHeightOverrides.get(n.key)??n.height??this.defaultTrackHeight;r>e&&(e=r)}return e||this.defaultTrackHeight}#m(e,n){let r=this.#d(),i=this.#u()-this.#r,a=e,o=n,s=this.#p(),c=Math.max(s,r*.05),l=this.#f(),u=i>0?i*l/24:r,d=Math.min(r,u),f=o-a;if(f<c){let e=(a+o)/2;a=e-c/2,o=e+c/2,f=c}if(f>d){let e=(a+o)/2;a=e-d/2,o=e+d/2,f=d}o>r&&(o=r,a=Math.max(0,o-f)),a<0&&(a=0,o=Math.min(r,a+f)),this._vViewRange={min:a,max:o},this._vScale=i>0?i/(o-a):1}#h(){let e=this.#d();this.#m(0,e)}get#g(){return this._vViewRange.min*this._vScale}#_(e,n){let r=this.#c(),i=n>0?r/n:this.max-this.min,a=e,o=a+i;return o>this.max&&(o=this.max,a=Math.max(this.min,o-i)),a<this.min&&(a=this.min,o=Math.min(this.max,a+i)),{min:a,max:o}}setPpu(e){this._ppu=Math.max(this.#l(),Math.min(e,tO)),this._viewRange=this.#_(this._viewRange.min,this._ppu)}setViewRange(e){let n=this.#c(),r=e.max-e.min;r>0&&(this._ppu=Math.max(this.#l(),Math.min(n/r,tO))),this._viewRange=this.#_(e.min,this._ppu)}setZoomPan(e,n){this._ppu=Math.max(this.#l(),Math.min(n,tO)),this._viewRange=this.#_(e,this._ppu)}setVerticalZoomPan(e,n){this.#m(e,n)}selectAll(){this._selectedIds=new Set(this._internalEvents.map(e=>e.id)),this.#R(),this.#S()}deselectAll(){this._selectedIds=new Set,this.#R(),this.#S()}getTrackEvents(e){return this._internalEvents.filter(n=>n.trackKey===e)}get selectedIds(){return[...this._selectedIds]}set selectedIds(e){this._selectedIds=new Set(e),this.#R(),this.#S()}selectTrack(e,n=!1){this.dispatchEvent(new CustomEvent(`track-select`,{detail:{trackKey:e,shiftKey:n},bubbles:!0,composed:!0}))}resetTrackHeights(){this._trackHeightOverrides=new Map,this.#o=!0}static{this.defaultDragSnapping=()=>({})}static{this.gridSnapping=e=>{let{gridResolution:n,currentStart:r,currentEnd:i}=e,{minorStep:a}=n;return{start:Math.round(r/a)*a,end:Math.round(i/a)*a}}}processDrag(e,n,r,i,a,o,s,c){let l=i,u=a,d=o;if(this.onDragging){let f=this.onDragging({eventId:e,rawLogicalX:n,rawY:r,currentStart:i,currentEnd:a,currentTrackKey:o,gridResolution:c,originTrackKey:s});l=f.start??i,u=f.end??a,d=f.trackKey??o}return this.dispatchEvent(new CustomEvent(`dragging`,{detail:{eventId:e,start:l,end:u,trackKey:d,rawLogicalX:n,rawY:r,originTrackKey:s},bubbles:!0,composed:!0})),{start:l,end:u,trackKey:d}}getVCanvas(){return this.#e}get tickledEvent(){return this._tickledId===void 0?null:this._internalEvents.find(e=>e.id===this._tickledId)??null}firstUpdated(){this.#e=this.shadowRoot?.querySelector(`x-vcanvas`),this.#e&&(this.#e.drawCallback=this.#w,this.#e.addEventListener(`scroll-virtual`,this.#T),this.#n=OD(this,this.#e),this.#a=new ResizeObserver(this.#C),this.#a.observe(this.#e))}disconnectedCallback(){super.disconnectedCallback(),this.#n?.(),this.#n=null,this.#a?.disconnect(),this.#a=null}willUpdate(e){let n=!1,r=!1,i=!1;e.has(`tracks`)&&(this._internalTracks=[...this.tracks],n=!0,r=!0),e.has(`events`)&&(this._internalEvents=[...this.events]),e.has(`trackHeight`)&&(this.trackHeight!==`free`&&this._trackHeightOverrides.size>0&&(this._trackHeightOverrides=new Map),n=!0,r=!0),(e.has(`_vScale`)||e.has(`defaultTrackHeight`)||e.has(`_trackHeightOverrides`))&&(n=!0),(e.has(`min`)||e.has(`max`))&&(i=!0),this.#o&&(this.#o=!1,r=!0),i&&this.#v(),r&&this.#h(),n&&this.#E()}updated(e){(e.has(`_ppu`)||e.has(`_viewRange`)||e.has(`min`)||e.has(`max`))&&(this.#y(),this.#S()),(e.has(`events`)||e.has(`userScale`)||e.has(`altMajorBg`)||e.has(`gridMode`)||e.has(`minorStep`))&&this.#S(),e.has(`_trackLayout`)&&(this.#b(),this.#N(),this.#S()),(e.has(`_vViewRange`)||e.has(`_vScale`))&&(this.#M(),this.#S()),this._tickledId!==this.#i&&(this.#i=this._tickledId,this.dispatchEvent(new CustomEvent(`tickle-change`,{detail:{event:this.tickledEvent},bubbles:!0,composed:!0})))}render(){let e=this.#d();return i`
12186
12217
  <div class="content-wrapper">
12187
12218
  <div class="content-area">
12188
12219
  <div class="v-axis-zone"
@@ -12235,7 +12266,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12235
12266
 
12236
12267
  <div class="meta-resizer ${this.metaEnabled?`visible`:``}"></div>
12237
12268
  <div class="meta-area ${this.metaEnabled?`visible`:``}" style="height:${this._metaHeight}px"></div>
12238
- `}#v(){let e=this.#c(),n=this.max-this.min,r=.8;this._ppu=n>0?e/(n*r):1,this._viewRange={min:this.min,max:this.min+n*r},this.#y()}#y(){if(!this.#e)return;let e=this.max-this.min;this.#e.logicalWidth=e*this._ppu,this.#b(),this.#x()}#b(){if(!this.#e)return;let e=this._trackLayout.reduce((e,n)=>e+n.height,0),n=Math.max(e,40)+this.#r;this.#e.logicalHeight=n,this.#e.logicalScrollTop=this.#g}#x(){this.#e&&(this.#e.logicalScrollLeft=(this._viewRange.min-this.min)*this._ppu)}#S(){this.#e?.invalidateAll()}#C;#w;#T;#E(){let e=[],n=this.#r;for(let r of this._internalTracks){if(r.hidden)continue;let i=this._trackHeightOverrides.get(r.key)??r.height??this.defaultTrackHeight,a=Math.round(i*this._vScale);e.push({trackKey:r.key,y:n,height:a}),n+=a}this._trackLayout=e}#D;#O;#k;#A;#j;#M(){this.#b(),this.#N()}#N(){let e=this.shadowRoot?.querySelector(`.tab-column`);if(!e)return;let n=this.#e?.logicalScrollTop??0;e.style.transform=`translateY(${-n}px)`;for(let n of this._trackLayout){let r=e.querySelector(`ixfx-timeline-track-tab[track-key="${n.trackKey}"]`);r&&(r.style.top=`${n.y}px`,r.style.height=`${n.height}px`)}}get#P(){let e=getComputedStyle(this).getPropertyValue(`--timeline-tab-width`).trim();return Number.parseInt(e,10)||120}#F;#I;#L(e,n){if(this.trackHeight===`fixed`)this.defaultTrackHeight=n;else if(this.trackHeight===`free`){let r=new Map(this._trackHeightOverrides);r.set(e,n),this._trackHeightOverrides=r}}#R(){this.dispatchEvent(new CustomEvent(`selection-change`,{detail:{selectedIds:[...this._selectedIds]},bubbles:!0,composed:!0}))}};E([d({type:Array})],Z.prototype,`tracks`,void 0),E([d({type:Array})],Z.prototype,`events`,void 0),E([d({type:Number})],Z.prototype,`min`,void 0),E([d({type:Number})],Z.prototype,`max`,void 0),E([d({type:String,attribute:`track-height`})],Z.prototype,`trackHeight`,void 0),E([d({type:String,attribute:`user-scale`})],Z.prototype,`userScale`,void 0),E([d({type:Boolean})],Z.prototype,`reorderable`,void 0),E([d({type:Boolean,attribute:`meta`})],Z.prototype,`metaEnabled`,void 0),E([d({type:Boolean,attribute:`alt-major-bg`})],Z.prototype,`altMajorBg`,void 0),E([d({type:Number,attribute:`default-track-height`})],Z.prototype,`defaultTrackHeight`,void 0),E([d({type:String,attribute:`grid-mode`})],Z.prototype,`gridMode`,void 0),E([d({type:Number,attribute:`minor-step`})],Z.prototype,`minorStep`,void 0),E([d({type:Object})],Z.prototype,`onDragging`,void 0),E([m()],Z.prototype,`_ppu`,void 0),E([m()],Z.prototype,`_viewRange`,void 0),E([m()],Z.prototype,`_vViewRange`,void 0),E([m()],Z.prototype,`_vScale`,void 0),E([m()],Z.prototype,`_selectedIds`,void 0),E([m()],Z.prototype,`_tickledId`,void 0),E([m()],Z.prototype,`_drag`,void 0),E([m()],Z.prototype,`_metaHeight`,void 0),E([m()],Z.prototype,`_trackHeightOverrides`,void 0),E([m()],Z.prototype,`_trackLayout`,void 0),E([m()],Z.prototype,`_internalEvents`,void 0),E([m()],Z.prototype,`_internalTracks`,void 0),Z=E([T(`ixfx-timeline`)],Z);let eO=class extends n{constructor(...e){super(...e),this.label=``,this.grow=!1,this.reorderable=!1}static{this.styles=[w,Yt,r`
12269
+ `}#v(){let e=this.#c(),n=this.max-this.min,r=.8;this._ppu=n>0?e/(n*r):1,this._viewRange={min:this.min,max:this.min+n*r},this.#y()}#y(){if(!this.#e)return;let e=this.max-this.min;this.#e.logicalWidth=e*this._ppu,this.#b(),this.#x()}#b(){if(!this.#e)return;let e=this._trackLayout.reduce((e,n)=>e+n.height,0),n=Math.max(e,40)+this.#r;this.#e.logicalHeight=n,this.#e.logicalScrollTop=this.#g}#x(){this.#e&&(this.#e.logicalScrollLeft=(this._viewRange.min-this.min)*this._ppu)}#S(){this.#e?.invalidateAll()}#C;#w;#T;#E(){let e=[],n=this.#r;for(let r of this._internalTracks){if(r.hidden)continue;let i=this._trackHeightOverrides.get(r.key)??r.height??this.defaultTrackHeight,a=Math.round(i*this._vScale);e.push({trackKey:r.key,y:n,height:a}),n+=a}this._trackLayout=e}#D;#O;#k;#A;#j;#M(){this.#b(),this.#N()}#N(){let e=this.shadowRoot?.querySelector(`.tab-column`);if(!e)return;let n=this.#e?.logicalScrollTop??0;e.style.transform=`translateY(${-n}px)`;for(let n of this._trackLayout){let r=e.querySelector(`ixfx-timeline-track-tab[track-key="${n.trackKey}"]`);r&&(r.style.top=`${n.y}px`,r.style.height=`${n.height}px`)}}get#P(){let e=getComputedStyle(this).getPropertyValue(`--timeline-tab-width`).trim();return Number.parseInt(e,10)||120}#F;#I;#L(e,n){if(this.trackHeight===`fixed`)this.defaultTrackHeight=n;else if(this.trackHeight===`free`){let r=new Map(this._trackHeightOverrides);r.set(e,n),this._trackHeightOverrides=r}}#R(){this.dispatchEvent(new CustomEvent(`selection-change`,{detail:{selectedIds:[...this._selectedIds]},bubbles:!0,composed:!0}))}};E([d({type:Array})],Z.prototype,`tracks`,void 0),E([d({type:Array})],Z.prototype,`events`,void 0),E([d({type:Number})],Z.prototype,`min`,void 0),E([d({type:Number})],Z.prototype,`max`,void 0),E([d({type:String,attribute:`track-height`})],Z.prototype,`trackHeight`,void 0),E([d({type:String,attribute:`user-scale`})],Z.prototype,`userScale`,void 0),E([d({type:Boolean})],Z.prototype,`reorderable`,void 0),E([d({type:Boolean,attribute:`meta`})],Z.prototype,`metaEnabled`,void 0),E([d({type:Boolean,attribute:`alt-major-bg`})],Z.prototype,`altMajorBg`,void 0),E([d({type:Number,attribute:`default-track-height`})],Z.prototype,`defaultTrackHeight`,void 0),E([d({type:String,attribute:`grid-mode`})],Z.prototype,`gridMode`,void 0),E([d({type:Number,attribute:`minor-step`})],Z.prototype,`minorStep`,void 0),E([d({type:Object})],Z.prototype,`onDragging`,void 0),E([m()],Z.prototype,`_ppu`,void 0),E([m()],Z.prototype,`_viewRange`,void 0),E([m()],Z.prototype,`_vViewRange`,void 0),E([m()],Z.prototype,`_vScale`,void 0),E([m()],Z.prototype,`_selectedIds`,void 0),E([m()],Z.prototype,`_tickledId`,void 0),E([m()],Z.prototype,`_drag`,void 0),E([m()],Z.prototype,`_metaHeight`,void 0),E([m()],Z.prototype,`_trackHeightOverrides`,void 0),E([m()],Z.prototype,`_trackLayout`,void 0),E([m()],Z.prototype,`_internalEvents`,void 0),E([m()],Z.prototype,`_internalTracks`,void 0),Z=E([T(`ixfx-timeline`)],Z);let nO=class extends n{constructor(...e){super(...e),this.label=``,this.grow=!1,this.reorderable=!1}static{this.styles=[w,Yt,r`
12239
12270
  :host {
12240
12271
  display: flex;
12241
12272
  flex-direction: column;
@@ -12311,7 +12342,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12311
12342
  <slot></slot>
12312
12343
  </div>
12313
12344
  </div>
12314
- `}};E([d({type:String})],eO.prototype,`label`,void 0),E([d({type:Boolean,reflect:!0})],eO.prototype,`grow`,void 0),E([d({type:Boolean,reflect:!0})],eO.prototype,`reorderable`,void 0),eO=E([T(`ixfx-toolbar-group`)],eO);var tO;function nO(e,n){let r=0,i=1/0;for(let a=0;a<e.length;a++){let[o,s]=e[a];if(n<(o+s)/2){let e=Math.abs(n-o);e<i&&(i=e,r=a)}else{let e=Math.abs(n-s);e<i&&(i=e,r=a+1)}}return r}let rO=!1;function iO(){if(rO)return;rO=!0;let e=document.createElement(`style`);e.textContent=`
12345
+ `}};E([d({type:String})],nO.prototype,`label`,void 0),E([d({type:Boolean,reflect:!0})],nO.prototype,`grow`,void 0),E([d({type:Boolean,reflect:!0})],nO.prototype,`reorderable`,void 0),nO=E([T(`ixfx-toolbar-group`)],nO);var rO;function iO(e,n){let r=0,i=1/0;for(let a=0;a<e.length;a++){let[o,s]=e[a];if(n<(o+s)/2){let e=Math.abs(n-o);e<i&&(i=e,r=a)}else{let e=Math.abs(n-s);e<i&&(i=e,r=a+1)}}return r}let aO=!1;function oO(){if(aO)return;aO=!0;let e=document.createElement(`style`);e.textContent=`
12315
12346
  .ixfx-drag-ghost.ixfx-toolbar-group-ghost {
12316
12347
  padding: var(--space-s, 8px) var(--space-m, 16px);
12317
12348
  background: var(--surface-4);
@@ -12324,7 +12355,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12324
12355
  user-select: none;
12325
12356
  -webkit-user-select: none;
12326
12357
  }
12327
- `,document.head.appendChild(e)}let aO=class extends n{static{tO=this}constructor(...e){super(...e),this.orientation=`horizontal`,this.layout=`one-line`,this.verticalWriting=`auto`,this.toolbarAlign=`near`,this.showGroupLabels=!1,this.invisibleGroups=!1,this.allowReorder=!1,this._overflowCount=0,this._popoverOpen=!1,this._ro=null,this._anchor=`--toolbar-${tO._cnt++}`,this._sizes=new WeakMap,this._measureQueued=!1,this._dragState=null,this._suppressNextClick=!1,this._onClickCapture=e=>{this._suppressNextClick&&(this._suppressNextClick=!1,e.preventDefault(),e.stopPropagation())},this._onKeyDown=e=>{let n=this._dragState;if(e.key!==`Escape`||!n?.active)return;e.preventDefault();let r=n.pointerId;this._abortDrag(),this._endDrag(r)},this._onPointerDown=e=>{if(!this.allowReorder||e.button!==0)return;let n=this._findDragTarget(e);n?.parentNode&&(Array.prototype.indexOf.call(n.parentNode.children,n)<0||(this._dragState={pointerId:e.pointerId,source:n,startX:e.clientX,startY:e.clientY,active:!1,ghost:null,gapIndex:void 0},window.addEventListener(`pointermove`,this._onPointerMove),window.addEventListener(`pointerup`,this._onPointerUp),window.addEventListener(`pointercancel`,this._onPointerCancel)))},this._onPointerMove=e=>{let n=this._dragState;if(!n||e.pointerId!==n.pointerId)return;let r=Math.hypot(e.clientX-n.startX,e.clientY-n.startY);if(!n.active){if(r<5)return;this._beginDrag(e)}n.ghost?.move(e.clientX,e.clientY);let i=this._computeGapIndex(e.clientX,e.clientY);i!==n.gapIndex&&(n.gapIndex=i,this.requestUpdate())},this._onPointerUp=e=>{let n=this._dragState;if(!(!n||e.pointerId!==n.pointerId)){if(n.active){let r=this._computeGapIndex(e.clientX,e.clientY);this._commitDrag(n.source,r)}this._endDrag(e.pointerId)}},this._onPointerCancel=e=>{let n=this._dragState;!n||e.pointerId!==n.pointerId||(this._abortDrag(),this._endDrag(e.pointerId))}}static{this._cnt=0}static{this.styles=[w,ue,r`
12358
+ `,document.head.appendChild(e)}let sO=class extends n{static{rO=this}constructor(...e){super(...e),this.orientation=`horizontal`,this.layout=`one-line`,this.verticalWriting=`auto`,this.toolbarAlign=`near`,this.showGroupLabels=!1,this.invisibleGroups=!1,this.allowReorder=!1,this._overflowCount=0,this._popoverOpen=!1,this._ro=null,this._anchor=`--toolbar-${rO._cnt++}`,this._sizes=new WeakMap,this._measureQueued=!1,this._dragState=null,this._suppressNextClick=!1,this._onClickCapture=e=>{this._suppressNextClick&&(this._suppressNextClick=!1,e.preventDefault(),e.stopPropagation())},this._onKeyDown=e=>{let n=this._dragState;if(e.key!==`Escape`||!n?.active)return;e.preventDefault();let r=n.pointerId;this._abortDrag(),this._endDrag(r)},this._onPointerDown=e=>{if(!this.allowReorder||e.button!==0)return;let n=this._findDragTarget(e);n?.parentNode&&(Array.prototype.indexOf.call(n.parentNode.children,n)<0||(this._dragState={pointerId:e.pointerId,source:n,startX:e.clientX,startY:e.clientY,active:!1,ghost:null,gapIndex:void 0},window.addEventListener(`pointermove`,this._onPointerMove),window.addEventListener(`pointerup`,this._onPointerUp),window.addEventListener(`pointercancel`,this._onPointerCancel)))},this._onPointerMove=e=>{let n=this._dragState;if(!n||e.pointerId!==n.pointerId)return;let r=Math.hypot(e.clientX-n.startX,e.clientY-n.startY);if(!n.active){if(r<5)return;this._beginDrag(e)}n.ghost?.move(e.clientX,e.clientY);let i=this._computeGapIndex(e.clientX,e.clientY);i!==n.gapIndex&&(n.gapIndex=i,this.requestUpdate())},this._onPointerUp=e=>{let n=this._dragState;if(!(!n||e.pointerId!==n.pointerId)){if(n.active){let r=this._computeGapIndex(e.clientX,e.clientY);this._commitDrag(n.source,r)}this._endDrag(e.pointerId)}},this._onPointerCancel=e=>{let n=this._dragState;!n||e.pointerId!==n.pointerId||(this._abortDrag(),this._endDrag(e.pointerId))}}static{this._cnt=0}static{this.styles=[w,ue,r`
12328
12359
  :host {
12329
12360
  --toolbar-gap: var(--space-s);
12330
12361
  --toolbar-group-gap: var(--space-m);
@@ -12422,7 +12453,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12422
12453
  pointer-events: none;
12423
12454
  z-index: 1;
12424
12455
  }
12425
- `]}connectedCallback(){super.connectedCallback(),this.style.setProperty(`--anchor-name`,this._anchor),this.addEventListener(`click`,this._onClickCapture,!0)}firstUpdated(){this._slot.addEventListener(`slotchange`,()=>{this._updateGroups(),this._scheduleMeasure()}),this._ro=new ResizeObserver(()=>this._scheduleMeasure()),this._ro.observe(this._inner),this._popover.addEventListener(`toggle`,()=>{this._popoverOpen=this._popover.matches(`:popover-open`)}),this._scheduleMeasure(),this._updateGroups()}updated(e){(e.has(`showGroupLabels`)||e.has(`allowReorder`))&&this._updateGroups()}_mainGroups(){return Array.from(this.children).filter(e=>e.tagName===`IXFX-TOOLBAR-GROUP`&&e.getAttribute(`slot`)!==`overflow`)}_groupKey(e){return e.id||e.label||``}getGroupOrder(){return this._mainGroups().map(e=>this._groupKey(e))}setGroupOrder(e){let n=this._mainGroups();if(n.length===0)return;let r=new Set,i=[];for(let a of e){let e=n.find(e=>!r.has(e)&&e.id===a&&a!==``)??n.find(e=>!r.has(e)&&this._groupKey(e)===a);e&&(r.add(e),i.push(e))}let a=[...i,...n.filter(e=>!r.has(e))],o=a.length*a.length+1,s=!0;for(;s&&o-->0;){s=!1;for(let e=0;e+1<a.length;e++){let n=a[e],r=a[e+1];n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING||this._insertAndEmit(n,r)&&(s=!0)}}}getLayoutSnapshot(){return{version:1,order:this.getGroupOrder()}}applyLayoutSnapshot(e){if(typeof e!=`object`||!e)return!1;let{version:n,order:r}=e;return n!==1||!Array.isArray(r)||!r.every(e=>typeof e==`string`)?!1:(this.setGroupOrder(r),!0)}_insertAndEmit(e,n){let r=e.parentNode;if(!r)return!1;let i=Array.prototype.indexOf.call(r.children,e);r.insertBefore(e,n);let a=Array.prototype.indexOf.call(r.children,e);return a!==i&&(this.dispatchEvent(new CustomEvent(`reorder`,{bubbles:!0,composed:!0,detail:{fromIndex:i,toIndex:a,group:e}})),this._updateGroups(),this._scheduleMeasure(),!0)}_updateGroups(){for(let e of Array.from(this.children))e.tagName===`IXFX-TOOLBAR-GROUP`&&(this.showGroupLabels?e.setAttribute(`show-label`,``):e.removeAttribute(`show-label`),this.allowReorder&&e.getAttribute(`slot`)!==`overflow`?e.setAttribute(`reorderable`,``):e.removeAttribute(`reorderable`))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`click`,this._onClickCapture,!0),this._ro?.disconnect(),this._dragState&&(this._abortDrag(),this._endDrag(this._dragState.pointerId))}_findDragTarget(e){if(!this.allowReorder)return null;let n=e.composedPath(),r=null,i=!1;for(let e of n)e instanceof HTMLElement&&(e.classList.contains(`grab-handle`)&&(i=!0),!r&&e.tagName===`IXFX-TOOLBAR-GROUP`&&(r=e));return!r||!i||r.getAttribute(`slot`)===`overflow`?null:r}_beginDrag(e){let n=this._dragState;if(!(!n||n.active)){try{this.setPointerCapture(e.pointerId)}catch{}n.active=!0,this.setAttribute(`dragging`,``),n.source.setAttribute(`drag-source`,``),n.ghost=this._createGhost(n.source),n.ghost?.move(e.clientX,e.clientY)}}_abortDrag(){let e=this._dragState;e&&(e.source.removeAttribute(`drag-source`),e.gapIndex!==void 0&&(e.gapIndex=void 0,this.requestUpdate()))}_endDrag(e){let n=this._dragState;if(n){n.ghost?.destroy(),n.ghost=null,this.removeAttribute(`dragging`),this._dragState=null,window.removeEventListener(`pointermove`,this._onPointerMove),window.removeEventListener(`pointerup`,this._onPointerUp),window.removeEventListener(`pointercancel`,this._onPointerCancel);try{this.releasePointerCapture(e)}catch{}this.requestUpdate()}}_commitDrag(e,n){e.removeAttribute(`drag-source`);let r=this._mainGroups().filter(n=>n!==e),i=r.length,a=n===void 0?i:Math.max(0,Math.min(n,i)),o=this.orientation===`vertical-left`?i-a:a;if(!e.parentNode)return;let s=r[o]??null;this._insertAndEmit(e,s)&&(this._suppressNextClick=!0)}_createGhost(e){let n=document.createElement(`span`);n.textContent=(`label`in e&&typeof e.label==`string`&&e.label||(e.textContent??``).trim()).slice(0,60),n.style.overflow=`hidden`,n.style.textOverflow=`ellipsis`,n.style.whiteSpace=`nowrap`;try{return iO(),zg({anchor:e,content:n,className:`ixfx-toolbar-group-ghost`})}catch{return null}}_computeGapIndex(e,n){let r=this._dragState;if(!r)return;let i=this._mainGroups().filter(e=>e!==r.source);if(i.length===0)return 0;let a=this.orientation===`vertical-left`?[...i].reverse():i,o=this.orientation===`horizontal`,s=o?e:n;return nO(a.map(e=>{let n=e.getBoundingClientRect();return[o?n.left:n.top,o?n.right:n.bottom]}),s)}_computeCaretStyle(){let e=this._dragState;if(!e?.active||e.gapIndex===void 0)return;let n=this._mainGroups().filter(n=>n!==e.source);if(n.length===0)return;let r=this.getBoundingClientRect();if(!r)return;let i=this.orientation===`vertical-left`?[...n].reverse():n,a=Math.max(0,Math.min(e.gapIndex,i.length)),o=a<i.length?i[a].getBoundingClientRect():i[i.length-1].getBoundingClientRect();return this.orientation===`horizontal`?`transform: translate(${(a<i.length?o.left:o.right)-r.left-1}px, 0); width: 2px; height: ${r.height}px;`:`transform: translate(0, ${(a<i.length?o.top:o.bottom)-r.top-1}px); width: ${r.width}px; height: 2px;`}_scheduleMeasure(){this._measureQueued||(this._measureQueued=!0,requestAnimationFrame(()=>{this._measureQueued=!1,this._measure()}))}_measure(){let e=Array.from(this.children),n=e=>e.hasAttribute(`grow`)||e.matches(`[grow]`),r=e.filter(e=>!n(e)),i=this.orientation===`horizontal`,a=getComputedStyle(this).getPropertyValue(`--toolbar-overflow`).trim();if(this.layout!==`one-line`||a===`disabled`){let n=!1;for(let r of e)r.getAttribute(`slot`)===`overflow`&&(r.removeAttribute(`slot`),n=!0),r.hasAttribute(`hidden`)&&(r.removeAttribute(`hidden`),n=!0);this._overflowCount!==0&&(this._overflowCount=0,n=!0),n&&this.requestUpdate();return}if(!this._inner)return;let o=getComputedStyle(this._inner),s=(i?Number.parseFloat(o.columnGap):Number.parseFloat(o.rowGap))||0,c=i?this._inner.clientWidth:this._inner.clientHeight,l=r.filter(e=>e.getAttribute(`slot`)!==`overflow`),u=r.filter(e=>e.getAttribute(`slot`)===`overflow`),d=0;l.forEach((e,n)=>{let r=i?e.offsetWidth:e.offsetHeight;r>0&&this._sizes.set(e,r),d+=(n?s:0)+(this._sizes.get(e)??r)});let f=!1;if(a===`collapsed`){if(l.length>0){for(let e of l)e.setAttribute(`slot`,`overflow`);u.push(...l),l.length=0,f=!0}let e=u.length;e!==this._overflowCount&&(this._overflowCount=e,f=!0),f&&this.requestUpdate();return}let p=u.length>0?s+36:0;for(;l.length>0&&d+p>c;){let e=l[l.length-1],n=this._sizes.get(e)??0;e.setAttribute(`slot`,`overflow`),l.pop(),u.unshift(e),d-=(l.length?s:0)+n,f=!0}for(;u.length>0;){let e=u[0],n=this._sizes.get(e);if(n===void 0)break;let r=l.length?s:0,i=u.length>1?s+36:0;if(d+r+n+i>c)break;e.removeAttribute(`slot`),u.shift(),l.push(e),d+=r+n,f=!0}let m=u.length;m!==this._overflowCount&&(this._overflowCount=m,f=!0),f&&this.requestUpdate()}_toggleOverflow(){try{this._popover.togglePopover()}catch{this._popover.showPopover()}}render(){let e=getComputedStyle(this).getPropertyValue(`--toolbar-overflow`).trim(),n=this._overflowCount>0||e===`collapsed`,r=this._computeCaretStyle();return i`
12456
+ `]}connectedCallback(){super.connectedCallback(),this.style.setProperty(`--anchor-name`,this._anchor),this.addEventListener(`click`,this._onClickCapture,!0)}firstUpdated(){this._slot.addEventListener(`slotchange`,()=>{this._updateGroups(),this._scheduleMeasure()}),this._ro=new ResizeObserver(()=>this._scheduleMeasure()),this._ro.observe(this._inner),this._popover.addEventListener(`toggle`,()=>{this._popoverOpen=this._popover.matches(`:popover-open`)}),this._scheduleMeasure(),this._updateGroups()}updated(e){(e.has(`showGroupLabels`)||e.has(`allowReorder`))&&this._updateGroups()}_mainGroups(){return Array.from(this.children).filter(e=>e.tagName===`IXFX-TOOLBAR-GROUP`&&e.getAttribute(`slot`)!==`overflow`)}_groupKey(e){return e.id||e.label||``}getGroupOrder(){return this._mainGroups().map(e=>this._groupKey(e))}setGroupOrder(e){let n=this._mainGroups();if(n.length===0)return;let r=new Set,i=[];for(let a of e){let e=n.find(e=>!r.has(e)&&e.id===a&&a!==``)??n.find(e=>!r.has(e)&&this._groupKey(e)===a);e&&(r.add(e),i.push(e))}let a=[...i,...n.filter(e=>!r.has(e))],o=a.length*a.length+1,s=!0;for(;s&&o-->0;){s=!1;for(let e=0;e+1<a.length;e++){let n=a[e],r=a[e+1];n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING||this._insertAndEmit(n,r)&&(s=!0)}}}getLayoutSnapshot(){return{version:1,order:this.getGroupOrder()}}applyLayoutSnapshot(e){if(typeof e!=`object`||!e)return!1;let{version:n,order:r}=e;return n!==1||!Array.isArray(r)||!r.every(e=>typeof e==`string`)?!1:(this.setGroupOrder(r),!0)}_insertAndEmit(e,n){let r=e.parentNode;if(!r)return!1;let i=Array.prototype.indexOf.call(r.children,e);r.insertBefore(e,n);let a=Array.prototype.indexOf.call(r.children,e);return a!==i&&(this.dispatchEvent(new CustomEvent(`reorder`,{bubbles:!0,composed:!0,detail:{fromIndex:i,toIndex:a,group:e}})),this._updateGroups(),this._scheduleMeasure(),!0)}_updateGroups(){for(let e of Array.from(this.children))e.tagName===`IXFX-TOOLBAR-GROUP`&&(this.showGroupLabels?e.setAttribute(`show-label`,``):e.removeAttribute(`show-label`),this.allowReorder&&e.getAttribute(`slot`)!==`overflow`?e.setAttribute(`reorderable`,``):e.removeAttribute(`reorderable`))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`click`,this._onClickCapture,!0),this._ro?.disconnect(),this._dragState&&(this._abortDrag(),this._endDrag(this._dragState.pointerId))}_findDragTarget(e){if(!this.allowReorder)return null;let n=e.composedPath(),r=null,i=!1;for(let e of n)e instanceof HTMLElement&&(e.classList.contains(`grab-handle`)&&(i=!0),!r&&e.tagName===`IXFX-TOOLBAR-GROUP`&&(r=e));return!r||!i||r.getAttribute(`slot`)===`overflow`?null:r}_beginDrag(e){let n=this._dragState;if(!(!n||n.active)){try{this.setPointerCapture(e.pointerId)}catch{}n.active=!0,this.setAttribute(`dragging`,``),n.source.setAttribute(`drag-source`,``),n.ghost=this._createGhost(n.source),n.ghost?.move(e.clientX,e.clientY)}}_abortDrag(){let e=this._dragState;e&&(e.source.removeAttribute(`drag-source`),e.gapIndex!==void 0&&(e.gapIndex=void 0,this.requestUpdate()))}_endDrag(e){let n=this._dragState;if(n){n.ghost?.destroy(),n.ghost=null,this.removeAttribute(`dragging`),this._dragState=null,window.removeEventListener(`pointermove`,this._onPointerMove),window.removeEventListener(`pointerup`,this._onPointerUp),window.removeEventListener(`pointercancel`,this._onPointerCancel);try{this.releasePointerCapture(e)}catch{}this.requestUpdate()}}_commitDrag(e,n){e.removeAttribute(`drag-source`);let r=this._mainGroups().filter(n=>n!==e),i=r.length,a=n===void 0?i:Math.max(0,Math.min(n,i)),o=this.orientation===`vertical-left`?i-a:a;if(!e.parentNode)return;let s=r[o]??null;this._insertAndEmit(e,s)&&(this._suppressNextClick=!0)}_createGhost(e){let n=document.createElement(`span`);n.textContent=(`label`in e&&typeof e.label==`string`&&e.label||(e.textContent??``).trim()).slice(0,60),n.style.overflow=`hidden`,n.style.textOverflow=`ellipsis`,n.style.whiteSpace=`nowrap`;try{return oO(),zg({anchor:e,content:n,className:`ixfx-toolbar-group-ghost`})}catch{return null}}_computeGapIndex(e,n){let r=this._dragState;if(!r)return;let i=this._mainGroups().filter(e=>e!==r.source);if(i.length===0)return 0;let a=this.orientation===`vertical-left`?[...i].reverse():i,o=this.orientation===`horizontal`,s=o?e:n;return iO(a.map(e=>{let n=e.getBoundingClientRect();return[o?n.left:n.top,o?n.right:n.bottom]}),s)}_computeCaretStyle(){let e=this._dragState;if(!e?.active||e.gapIndex===void 0)return;let n=this._mainGroups().filter(n=>n!==e.source);if(n.length===0)return;let r=this.getBoundingClientRect();if(!r)return;let i=this.orientation===`vertical-left`?[...n].reverse():n,a=Math.max(0,Math.min(e.gapIndex,i.length)),o=a<i.length?i[a].getBoundingClientRect():i[i.length-1].getBoundingClientRect();return this.orientation===`horizontal`?`transform: translate(${(a<i.length?o.left:o.right)-r.left-1}px, 0); width: 2px; height: ${r.height}px;`:`transform: translate(0, ${(a<i.length?o.top:o.bottom)-r.top-1}px); width: ${r.width}px; height: 2px;`}_scheduleMeasure(){this._measureQueued||(this._measureQueued=!0,requestAnimationFrame(()=>{this._measureQueued=!1,this._measure()}))}_measure(){let e=Array.from(this.children),n=e=>e.hasAttribute(`grow`)||e.matches(`[grow]`),r=e.filter(e=>!n(e)),i=this.orientation===`horizontal`,a=getComputedStyle(this).getPropertyValue(`--toolbar-overflow`).trim();if(this.layout!==`one-line`||a===`disabled`){let n=!1;for(let r of e)r.getAttribute(`slot`)===`overflow`&&(r.removeAttribute(`slot`),n=!0),r.hasAttribute(`hidden`)&&(r.removeAttribute(`hidden`),n=!0);this._overflowCount!==0&&(this._overflowCount=0,n=!0),n&&this.requestUpdate();return}if(!this._inner)return;let o=getComputedStyle(this._inner),s=(i?Number.parseFloat(o.columnGap):Number.parseFloat(o.rowGap))||0,c=i?this._inner.clientWidth:this._inner.clientHeight,l=r.filter(e=>e.getAttribute(`slot`)!==`overflow`),u=r.filter(e=>e.getAttribute(`slot`)===`overflow`),d=0;l.forEach((e,n)=>{let r=i?e.offsetWidth:e.offsetHeight;r>0&&this._sizes.set(e,r),d+=(n?s:0)+(this._sizes.get(e)??r)});let f=!1;if(a===`collapsed`){if(l.length>0){for(let e of l)e.setAttribute(`slot`,`overflow`);u.push(...l),l.length=0,f=!0}let e=u.length;e!==this._overflowCount&&(this._overflowCount=e,f=!0),f&&this.requestUpdate();return}let p=u.length>0?s+36:0;for(;l.length>0&&d+p>c;){let e=l[l.length-1],n=this._sizes.get(e)??0;e.setAttribute(`slot`,`overflow`),l.pop(),u.unshift(e),d-=(l.length?s:0)+n,f=!0}for(;u.length>0;){let e=u[0],n=this._sizes.get(e);if(n===void 0)break;let r=l.length?s:0,i=u.length>1?s+36:0;if(d+r+n+i>c)break;e.removeAttribute(`slot`),u.shift(),l.push(e),d+=r+n,f=!0}let m=u.length;m!==this._overflowCount&&(this._overflowCount=m,f=!0),f&&this.requestUpdate()}_toggleOverflow(){try{this._popover.togglePopover()}catch{this._popover.showPopover()}}render(){let e=getComputedStyle(this).getPropertyValue(`--toolbar-overflow`).trim(),n=this._overflowCount>0||e===`collapsed`,r=this._computeCaretStyle();return i`
12426
12457
  <div class="inner" role="toolbar" aria-orientation=${this.orientation}>
12427
12458
  <slot @pointerdown=${this._onPointerDown} @keydown=${this._onKeyDown}></slot>
12428
12459
  <ixfx-button class="overflow-btn" ?hidden=${!n} @click=${this._toggleOverflow} aria-label="More" aria-haspopup="true" aria-expanded=${this._popoverOpen}>⋯</ixfx-button>
@@ -12431,7 +12462,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12431
12462
  <slot name="overflow"></slot>
12432
12463
  </div>
12433
12464
  ${r?i`<div class="drop-caret" style=${r}></div>`:a}
12434
- `}};E([d({type:String,reflect:!0})],aO.prototype,`orientation`,void 0),E([d({type:String,reflect:!0})],aO.prototype,`layout`,void 0),E([d({type:String,attribute:`vertical-writing`,reflect:!0})],aO.prototype,`verticalWriting`,void 0),E([d({type:String,attribute:`toolbar-align`,reflect:!0})],aO.prototype,`toolbarAlign`,void 0),E([d({type:Boolean,attribute:`show-group-labels`,reflect:!0})],aO.prototype,`showGroupLabels`,void 0),E([d({type:Boolean,attribute:`invisible-groups`,reflect:!0})],aO.prototype,`invisibleGroups`,void 0),E([d({type:Boolean,attribute:`allow-reorder`,reflect:!0})],aO.prototype,`allowReorder`,void 0),E([m()],aO.prototype,`_overflowCount`,void 0),E([m()],aO.prototype,`_popoverOpen`,void 0),E([f(`.inner`)],aO.prototype,`_inner`,void 0),E([f(`.overflow-popover`)],aO.prototype,`_popover`,void 0),E([f(`slot`)],aO.prototype,`_slot`,void 0),aO=tO=E([T(`ixfx-toolbar`)],aO);let oO=class extends n{constructor(...e){super(...e),this.text=``,this.effect=`fade`,this.duration=300,this.easing=`ease`,this._currentText=``,this._outgoingText=``,this._transitionId=0,this._queue=[],this.#e=()=>{this._onTransitionEnd()},this.#t=()=>{this._onTransitionEnd()}}setText(e,n){this._pendingEffect=n,this.text=e}updated(e){if(e.has(`text`)&&this.text!==this._currentText){let e=this._pendingEffect??this.effect;this._pendingEffect=void 0,this._activeEffect===void 0?this._startTransition(this.text,e):this._queue.push({text:this.text,effect:e})}}_startTransition(e,n){let r=this._currentText;this._currentText=e,this._outgoingText=r,r!==``&&(this._transitionId++,this._activeEffect=n)}_onTransitionEnd(){if(this._outgoingText=``,this._activeEffect=void 0,this._queue.length>0){let e=this._queue.shift();this._startTransition(e.text,e.effect)}}#e;#t;#n(){let e=Math.round(this.duration*.3),n=Math.round(this.duration*.1),r=this._currentText.split(``),o=this._outgoingText.split(``),s=o.length-1,c=r=>`animation-duration:${e}ms;animation-delay:${r*n}ms;animation-timing-function:${this.easing}`;return i`
12465
+ `}};E([d({type:String,reflect:!0})],sO.prototype,`orientation`,void 0),E([d({type:String,reflect:!0})],sO.prototype,`layout`,void 0),E([d({type:String,attribute:`vertical-writing`,reflect:!0})],sO.prototype,`verticalWriting`,void 0),E([d({type:String,attribute:`toolbar-align`,reflect:!0})],sO.prototype,`toolbarAlign`,void 0),E([d({type:Boolean,attribute:`show-group-labels`,reflect:!0})],sO.prototype,`showGroupLabels`,void 0),E([d({type:Boolean,attribute:`invisible-groups`,reflect:!0})],sO.prototype,`invisibleGroups`,void 0),E([d({type:Boolean,attribute:`allow-reorder`,reflect:!0})],sO.prototype,`allowReorder`,void 0),E([m()],sO.prototype,`_overflowCount`,void 0),E([m()],sO.prototype,`_popoverOpen`,void 0),E([f(`.inner`)],sO.prototype,`_inner`,void 0),E([f(`.overflow-popover`)],sO.prototype,`_popover`,void 0),E([f(`slot`)],sO.prototype,`_slot`,void 0),sO=rO=E([T(`ixfx-toolbar`)],sO);let cO=class extends n{constructor(...e){super(...e),this.text=``,this.effect=`fade`,this.duration=300,this.easing=`ease`,this._currentText=``,this._outgoingText=``,this._transitionId=0,this._queue=[],this.#e=()=>{this._onTransitionEnd()},this.#t=()=>{this._onTransitionEnd()}}setText(e,n){this._pendingEffect=n,this.text=e}updated(e){if(e.has(`text`)&&this.text!==this._currentText){let e=this._pendingEffect??this.effect;this._pendingEffect=void 0,this._activeEffect===void 0?this._startTransition(this.text,e):this._queue.push({text:this.text,effect:e})}}_startTransition(e,n){let r=this._currentText;this._currentText=e,this._outgoingText=r,r!==``&&(this._transitionId++,this._activeEffect=n)}_onTransitionEnd(){if(this._outgoingText=``,this._activeEffect=void 0,this._queue.length>0){let e=this._queue.shift();this._startTransition(e.text,e.effect)}}#e;#t;#n(){let e=Math.round(this.duration*.3),n=Math.round(this.duration*.1),r=this._currentText.split(``),o=this._outgoingText.split(``),s=o.length-1,c=r=>`animation-duration:${e}ms;animation-delay:${r*n}ms;animation-timing-function:${this.easing}`;return i`
12435
12466
  ${S(`cc${this._transitionId}`,i`
12436
12467
  <span class="layer current char-swap">
12437
12468
  ${r.map((e,n)=>i`<span class="char in" style=${c(n)}>${e}</span>`)}
@@ -12591,7 +12622,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12591
12622
  from { opacity: 1; transform: translateY(0) scale(1); }
12592
12623
  to { opacity: 0; transform: translateY(0.3em) scale(0.8); }
12593
12624
  }
12594
- `}};E([d({type:String})],oO.prototype,`text`,void 0),E([d({type:String})],oO.prototype,`effect`,void 0),E([d({type:Number})],oO.prototype,`duration`,void 0),E([d({type:String})],oO.prototype,`easing`,void 0),E([m()],oO.prototype,`_currentText`,void 0),E([m()],oO.prototype,`_outgoingText`,void 0),E([m()],oO.prototype,`_activeEffect`,void 0),E([m()],oO.prototype,`_transitionId`,void 0),oO=E([T(`ixfx-transitory-label`)],oO);var sO=class{#e;#t;#n;#r=new WeakMap;#i=new Map;#a=new Map;#o=new WeakMap;#s;constructor(e,n,r){this.#e=e,this.#t=n,this.#n=r}connect(){this.disconnect(),this.#s=new AbortController;let{signal:e}=this.#s;this.#o=new WeakMap,this.#i.clear(),this.#a.clear();let n={item:this.#c(this.#e)};this.#r.set(n,this.#e),n.children=this.#l(this.#e),this.#t.root=n,this.#t.addEventListener(`expand`,e=>{let{node:n}=e.detail,r=this.#r.get(n);r&&(n.children=this.#l(r),this.#t.invalidateStructure())},{signal:e}),this.#t.addEventListener(`collapse`,e=>{},{signal:e})}disconnect(){this.#s?.abort(),this.#s=void 0}sync(){let e=this.#t.root;e&&(this.#o=new WeakMap,this.#i.clear(),this.#a.clear(),this.#r.set(e,this.#e),e.item=this.#c(this.#e),e.children=this.#f(this.#e,e.children??[]),this.#t.invalidateStructure())}lookupByKey(e){return this.#a.get(e)}navigateToKeyPath(e,n){if(e.length===0)return!1;let r=this.#t.root?.children??[];for(let n=0;n<e.length-1;n++){let i=r.find(r=>r.item.key===e[n]);if(!i)return!1;if(i.children===void 0){let e=this.#r.get(i);e&&(i.children=this.#l(e),this.#t.invalidateStructure())}r=i.children??[]}return this.#t.navigateTo(e,n)}navigateToIdentity(e,n){let r=this.#i.get(e);if(!r)return!1;let i=[],a=this.#e.getIdentity();for(;r&&r.getIdentity()!==a;)i.unshift(this.#c(r).key),r=r.getParent();return r!==void 0&&this.navigateToKeyPath(i,n)}navigateToValue(e,n){let r=this.#p(this.#e,e);return r?this.navigateToKeyPath(r.slice(1).map(e=>this.#c(e).key),n):!1}#c(e,n){let r=e.getIdentity(),i=this.#o.get(r);return i||(i=this.#n.valueToItem(e.getValue(),e),this.#o.set(r,i)),n===void 0?i:{...i,isLeaf:i.isLeaf??n}}#l(e){return Array.from(e.children(),e=>this.#d(e))}#u(e,n){this.#r.set(e,n),this.#i.set(n.getIdentity(),n),this.#a.set(e.item.key,n)}#d(e){let n=[...e.children()];for(let e of n)this.#i.set(e.getIdentity(),e);let r={item:this.#c(e,n.length===0)};return this.#u(r,e),r}#f(e,n){let r=new Map(n.map(e=>[e.item.key,e]));return Array.from(e.children(),e=>{let n=this.#d(e),i=r.get(n.item.key);return i?(i.item=n.item,this.#u(i,e),i.children!==void 0&&(i.children=this.#f(e,i.children)),i):n})}#p(e,n,r=[]){let i=[...r,e];if(n(e.getValue()))return i;for(let r of e.children()){let e=this.#p(r,n,i);if(e)return e}}};function cO(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function lO(e,n){if(e){if(e.item.key===n)return e;for(let r of e.children??[]){let e=lO(r,n);if(e)return e}}}function uO(e,n){if(e){if(e.item.key===n)return[e];for(let r of e.children??[]){let i=uO(r,n);if(i)return[e,...i]}}}function dO(e,n,r){if(e.length===0||n<=0||r<=0)return 1/0;let i=0;for(let a of e){if(a<=0)return 1/0;let e=r*r*a/(n*n);i=Math.max(i,e,1/e)}return i}function fO(e,n){let r=Array.from({length:e.length}),i=n.x,a=n.y,o=n.width,s=n.height,c=0;for(;c<e.length;){let n=Math.min(o,s),l=c+1,u=e.slice(c,l).map(e=>e.area),d=u.reduce((e,n)=>e+n,0),f=dO(u,d,n);for(;l<e.length;){let r=e.slice(c,l+1).map(e=>e.area),i=r.reduce((e,n)=>e+n,0),a=dO(r,i,n);if(a<=f)l++,u=r,d=i,f=a;else break}if(o<=s){let e=d/o,n=i;for(let i=c;i<l;i++){let o=u[i-c]/e;r[i]={x:n,y:a,width:o,height:e},n+=o}a+=e,s-=e}else{let e=d/s,n=a;for(let a=c;a<l;a++){let o=u[a-c]/e;r[a]={x:i,y:n,width:e,height:o},n+=o}i+=e,o-=e}c=l}return r}function pO(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.min(e,1):0}function mO(e,n,r,i){if(e.width<=0||e.height<=0)return n.map(()=>({x:e.x,y:e.y,width:0,height:0}));let a=n.reduce((e,n)=>e+n,0),o=a>0?n.map(e=>e/a):n.map(()=>1/n.length),s=r===`dice`||r===`slice-dice`&&i%2==0,c=r===`slice`||r===`slice-dice`&&i%2==1;if(r===`squarify`){let r=o.map((e,n)=>({share:e,i:n})).filter(e=>e.share>0),i=n.map(()=>({x:e.x,y:e.y,width:0,height:0}));if(r.length>0){let n=e.width*e.height,a=fO(r.map(e=>({area:e.share*n})),e);r.forEach((e,n)=>{i[e.i]=a[n]})}return i}let l=[];if(s){let n=e.x;o.forEach(r=>{let i=e.width*r;l.push({x:n,y:e.y,width:i,height:e.height}),n+=i})}else if(c){let n=e.y;o.forEach(r=>{let i=e.height*r;l.push({x:e.x,y:n,width:e.width,height:i}),n+=i})}return l}function hO(e,n={}){if(!e?.children?.length)return[];let{maxDepth:r=1/0,valueAccessor:i=()=>1,zoomKey:a,tilingMethod:o=`squarify`,hideLeaves:s=!1,presentation:c=`nested`,cascadeOffsetX:l,cascadeOffsetY:u}=n;if(r<=0)return[];let d=c===`cascaded`,f=d?pO(l):0,p=d?pO(u):0,m=e=>{let n=e.children??[];return s?n.filter(e=>e.item.isLeaf!==!0):n},h=a===void 0?e:lO(e,a)??e,g=uO(e,h.item.key),_=g?g.length-2:-1,v=m(h);if(v.length===0)return[];let y=[],b=(e,n,a,s,c)=>{if(e.length===0||s>=r)return;let l=mO(n,e.map(e=>cO(i(e.item))),o,s),u=e.length;e.forEach((e,n)=>{let r=l[n],i=m(e);if(y.push({node:e,depth:a,relativeDepth:s,x:r.x,y:r.y,width:r.width,height:r.height,parentKey:c,index:n,setSize:u,hasChildren:i.length>0||e.children===void 0&&e.item.isLeaf!==!0}),i.length>0){let n=f<=0&&p<=0?r:{x:r.x+f,y:r.y+p,width:Math.max(0,r.width-f),height:Math.max(0,r.height-p)};b(i,n,a+1,s+1,e.item.key)}})};return b(v,{x:0,y:0,width:1,height:1},_+1,0,h.item.key),y}let Q=class extends n{constructor(...e){super(...e),this.exclusivity=`none`,this.selectionFilter=`all`,this.interactionMode=`standard`,this.tilingMethod=`squarify`,this.presentation=`nested`,this.cascadeOffset=6,this.maxDepth=4,this.hideLeaves=!1,this.minLabelArea=1600,this.minTileWidth=24,this.padding=4,this.minChildArea=400,this.valueAccessor=()=>1,this._selectedNodes=new Set,this.disableKeyboardNavigation=!1,this.registry=void 0,this._zoomKey=void 0,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.treemap-label`,highlightKey:`incr-search-highlight`})}),this.tickled=new ie(this,{getItems:()=>this.#u().map(e=>({id:e.node.item.key,enabled:!0})),onStateChange:()=>{this.setAttribute(`data-input-mode`,this.tickled.inputMode)},onTickle:e=>{if(e===void 0)return;let n=this.#u().find(n=>n.node.item.key===e);n&&this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:n.node,depth:n.depth},bubbles:!0,composed:!0}))}}),this.#t=new Set,this.#n=new Map,this.#c=0}get selectedNodes(){return this._selectedNodes}get focusedNode(){if(this._zoomKey!==void 0)return lO(this.#l,this._zoomKey)}#e;#t;#n;#r;#i;#a;#o;#s;#c;get#l(){return this.model?.root??this.root}#u(){return this.#d(this._zoomKey)}#d(e){return hO(this.#l,{valueAccessor:this.valueAccessor,maxDepth:this.maxDepth,zoomKey:e,tilingMethod:this.tilingMethod,hideLeaves:this.hideLeaves,presentation:this.presentation,...this.#f()})}#f(){if(this.presentation!==`cascaded`||!Number.isFinite(this.cascadeOffset)||this.cascadeOffset<=0)return{};let e=this.clientWidth||0,n=this.clientHeight||0;return e<=0||n<=0?{}:{cascadeOffsetX:this.cascadeOffset/e,cascadeOffsetY:this.cascadeOffset/n}}connectedCallback(){super.connectedCallback(),this.setAttribute(`data-input-mode`,`mouse`);let e=this.#i=Jt();e.register({id:`select-all`,label:`Select All`,description:`Select all visible items`,execute:()=>this.selectAll()}),e.register({id:`deselect-all`,label:`Deselect All`,description:`Clear all selection`,execute:()=>this.deselectAll()}),this.registry=e,this.#m(),typeof ResizeObserver<`u`&&(this.#o=new ResizeObserver(()=>this.requestUpdate()),this.#o.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=void 0;for(let e of this.#n.values())e.abort();this.#n.clear(),this.#t.clear(),this.#o?.disconnect(),this.#o=void 0,this.#i&&(this.#i.unregister(`select-all`),this.#i.unregister(`deselect-all`),this.#i=void 0,this.registry=void 0)}#p(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#m(){this.#i&&(this.search.setModes(this.#p()),this.#a?.(),this.#a=Lt(this.#i,this.search))}updated(e){if(e.has(`root`)&&this.root&&this.#h(),e.has(`model`)&&(this.#e?.(),this.#e=void 0,this.model&&(this.#e=this.model._subscribe(e=>{e.type===`root`?(this.#h(),this.requestUpdate()):e.type===`invalidate`&&this.requestUpdate()}),this.#h())),e.has(`interactionMode`)&&(this.#r=void 0,this.clearSelection()),e.has(`searchModes`)&&this.#m(),this._zoomKey!==void 0&&!lO(this.#l,this._zoomKey)&&(this._zoomKey=void 0),this.#g(),this.#s){let e=this.#s;this.#s=void 0,this.#S(e)}}#h(){this.#s=void 0,this.#y(),this.tickled.clearTickled(),this._zoomKey=void 0,this.#r=void 0}#g(){if(!(!this.model&&!this.loadChildren))for(let e of this.#u()){let{node:n}=e;n.children!==void 0||this.#t.has(n.item.key)||this.#_(n,e.depth)}}async#_(e,n){let r=e.item.key;this.#t.add(r);let i=new AbortController;this.#n.set(r,i),this.requestUpdate();try{let r;if(r=this.model?await this.model.getChildren(e,n,i.signal):[...await dg(this.loadChildren({node:e,depth:n},i.signal),i.signal)],i.signal.aborted)return;e.children=r}catch{if(i.signal.aborted)return;e.children=[]}finally{this.#t.delete(r),this.#n.delete(r),i.signal.aborted||this.requestUpdate()}}#v(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf===!0:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#y(){this._selectedNodes.clear(),this.selectedNode=void 0}#b(e){this.dispatchEvent(new CustomEvent(`select`,{detail:{selected:new Set(this._selectedNodes),previous:e},bubbles:!0,composed:!0}))}select(e){if(!this.#v(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#b(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#b(n),this.requestUpdate()}clearSelection(){if(this._selectedNodes.size===0)return;let e=new Set(this._selectedNodes);this.#y(),this.#b(e),this.requestUpdate()}selectAll(){let e=new Set(this._selectedNodes);for(let e of this.#u())this.#v(e.node)&&this._selectedNodes.add(e.node);this.selectedNode=[...this._selectedNodes].at(-1),this.#b(e),this.requestUpdate()}deselectAll(){let e=new Set(this._selectedNodes);this.#y(),this.#b(e),this.requestUpdate()}selectMany(e){let n=new Set(this._selectedNodes);this._selectedNodes=new Set([...e].filter(e=>this.#v(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#b(n),this.requestUpdate()}zoomTo(e){if(this._zoomKey===e.item.key)return;this.#s=this.#x(e.item.key),this._zoomKey=e.item.key,this.tickled.clearTickled();let n=uO(this.#l,e.item.key)?.length,r=n===void 0?-1:n-2;this.dispatchEvent(new CustomEvent(`zoom`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.requestUpdate()}zoomOut(){if(this._zoomKey===void 0)return;this.#s=this.#x(void 0);let e=this.focusedNode,n=this._zoomKey===void 0?void 0:uO(this.#l,this._zoomKey),r=n===void 0?-1:n.length-2;this._zoomKey=void 0,this.tickled.clearTickled(),this.dispatchEvent(new CustomEvent(`zoom`,{detail:{node:void 0,depth:-1},bubbles:!0,composed:!0})),e&&this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.requestUpdate()}#x(e){if(typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;if(e!==void 0){let n=this.#u().find(n=>n.node.item.key===e);if(n)return{direction:`in`,rect:{x:n.x,y:n.y,width:n.width,height:n.height}}}let n=this._zoomKey;if(n===void 0)return;let r=this.#d(e).find(e=>e.node.item.key===n);if(r)return{direction:`out`,rect:{x:r.x,y:r.y,width:r.width,height:r.height}}}#S(e){let n=this.renderRoot.querySelector(`.viewport-inner`),r=this.renderRoot.querySelector(`.viewport`);if(!(n instanceof HTMLElement)||!(r instanceof HTMLElement))return;let i=r.clientWidth,a=r.clientHeight;if(i<=0||a<=0)return;let{rect:o,direction:s}=e,c=s===`in`?`translate(${o.x*i}px, ${o.y*a}px) scale(${Math.max(o.width,1e-4)}, ${Math.max(o.height,1e-4)})`:(()=>{let e=o.width>0?1/o.width:1,n=o.height>0?1/o.height:1;return`translate(${-o.x*e*i}px, ${-o.y*n*a}px) scale(${e}, ${n})`})();n.classList.remove(`flipping`),n.style.transform=c,n.offsetWidth,requestAnimationFrame(()=>{n.classList.add(`flipping`),n.style.transform=`none`}),n.addEventListener(`transitionend`,()=>n.classList.remove(`flipping`),{once:!0})}#C(e){return e.item.isLeaf===!0?!1:e.children===void 0?this.model!==void 0||this.loadChildren!==void 0:this.hideLeaves?e.children.some(e=>e.item.isLeaf!==!0):e.children.length>0}navigateTo(e){let n=this.#l;if(!n?.children)return!1;let r=n,i=[];for(let n of e){let e=r.children?.find(e=>e.item.key===n);if(!e)return!1;i.push(e),r=e}let a=i.at(-1);return i.length>this.maxDepth?this.zoomTo(i[i.length-this.maxDepth-1]):this._zoomKey!==void 0&&this.zoomOut(),this.select(a),this.tickled.setTickled(a.item.key),this.requestUpdate(),!0}navigateToNode(e){let n=this.#l;if(!n?.children)return!1;let r=this.#T(n.children,e);return r?this.navigateTo(r):!1}revealKey(e){let n=this.#l;if(!n?.children)return!1;let r=this.#T(n.children,n=>n.item.key===e);if(!r)return!1;if(r.length>this.maxDepth){let e=this.#w(r.slice(0,r.length-this.maxDepth));e&&this.zoomTo(e)}return this.tickled.setTickled(e),this.requestUpdate(),!0}#w(e){let n=this.#l;for(let r of e){let e=r===n?.item.key?n:n?.children?.find(e=>e.item.key===r);if(!e)return;n=e}return n}#T(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;if(i.children?.length){let r=this.#T(i.children,n,e);if(r)return r}}}getNodes(){return this.#u().map(e=>({node:e.node,depth:e.depth}))}#E(e,n){return!this.filterPredicate||this.filterPredicate(e,n)?!0:e.children?.some(e=>this.#E(e,n+1))??!1}#D(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}#O(e,n){let r=this.#u(),i=this.#D(e),a=r.filter(n=>n!==e&&n.relativeDepth===e.relativeDepth&&n.parentKey===e.parentKey),o,s=1/0;for(let e of a){let r=this.#D(e),a=r.x-i.x,c=r.y-i.y;if(!(n===`left`?a<0:n===`right`?a>0:n===`up`?c<0:c>0))continue;let l=Math.hypot(a,c);l<s&&(s=l,o=e)}return o||(n===`up`||n===`left`?e.parentKey===void 0?void 0:r.find(n=>n.node.item.key===e.parentKey):r.find(n=>n.parentKey===e.node.item.key))}#k(e,n,r){if(this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.interactionMode===`standard`&&(r.ctrlKey||r.metaKey)){if(this._selectedNodes.has(e.node))this.deselect(e.node);else if(this.#v(e.node)){let n=new Set(this._selectedNodes);this._selectedNodes.add(e.node),this.selectedNode=e.node,this.#b(n),this.requestUpdate()}this.#r=n}else if(this.interactionMode===`standard`&&r.shiftKey&&this.#r!==void 0){let e=this.#u(),r=Math.min(this.#r,n),i=Math.max(this.#r,n),a=new Set(this._selectedNodes);this._selectedNodes=new Set(e.slice(r,i+1).map(e=>e.node).filter(e=>this.#v(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#b(a),this.requestUpdate()}else this.interactionMode!==`manual`&&(this.select(e.node),this.#r=n);this.tickled.setTickled(e.node.item.key),this.#C(e.node)&&this.zoomTo(e.node)}#A(e){this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0}))}#j(e){if(this.disableKeyboardNavigation)return;let n=this.#u();if(n.length===0)return;let r=this.tickled.tickledId,i=r===void 0?-1:n.findIndex(e=>e.node.item.key===r),a=i>=0?n[i]:void 0,o=n=>{n&&(e.preventDefault(),this.tickled.setTickled(n.node.item.key),this.interactionMode===`implicit`&&this.select(n.node))};switch(e.key){case`ArrowLeft`:o(a?this.#O(a,`left`):n[0]);return;case`ArrowRight`:o(a?this.#O(a,`right`):n[0]);return;case`ArrowUp`:o(a?this.#O(a,`up`):n[0]);return;case`ArrowDown`:o(a?this.#O(a,`down`):n[0]);return;case`Home`:o(n[0]);return;case`End`:o(n.at(-1));return;case`Enter`:if(!a)return;e.preventDefault(),this.interactionMode!==`manual`&&this.select(a.node),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:a.node,depth:a.depth},bubbles:!0,composed:!0})),this.#C(a.node)&&this.zoomTo(a.node);return;case`Backspace`:case`Escape`:this._zoomKey!==void 0&&(e.preventDefault(),this.zoomOut())}}#M(e){if(!e.metaKey||e.deltaY===0||(e.preventDefault(),performance.now()<this.#c))return;if(e.deltaY>0){if(this._zoomKey===void 0)return;this.#c=performance.now()+260,this.#N();return}let n=(e.target?.closest(`.tile`))?.getAttribute(`data-key`)??void 0;if(n===void 0)return;let r=this.#u().find(e=>e.node.item.key===n);!r||!this.#C(r.node)||(this.#c=performance.now()+260,this.zoomTo(r.node))}#N(){let e=this._zoomKey===void 0?void 0:uO(this.#l,this._zoomKey),n=e&&e.length>2?e[e.length-2]:void 0;n?this.zoomTo(n):this.zoomOut()}#P(){let e=this.focusedNode;return e===void 0?a:i`
12625
+ `}};E([d({type:String})],cO.prototype,`text`,void 0),E([d({type:String})],cO.prototype,`effect`,void 0),E([d({type:Number})],cO.prototype,`duration`,void 0),E([d({type:String})],cO.prototype,`easing`,void 0),E([m()],cO.prototype,`_currentText`,void 0),E([m()],cO.prototype,`_outgoingText`,void 0),E([m()],cO.prototype,`_activeEffect`,void 0),E([m()],cO.prototype,`_transitionId`,void 0),cO=E([T(`ixfx-transitory-label`)],cO);var lO=class{#e;#t;#n;#r=new WeakMap;#i=new Map;#a=new Map;#o=new WeakMap;#s;constructor(e,n,r){this.#e=e,this.#t=n,this.#n=r}connect(){this.disconnect(),this.#s=new AbortController;let{signal:e}=this.#s;this.#o=new WeakMap,this.#i.clear(),this.#a.clear();let n={item:this.#c(this.#e)};this.#r.set(n,this.#e),n.children=this.#l(this.#e),this.#t.root=n,this.#t.addEventListener(`expand`,e=>{let{node:n}=e.detail,r=this.#r.get(n);r&&(n.children=this.#l(r),this.#t.invalidateStructure())},{signal:e}),this.#t.addEventListener(`collapse`,e=>{},{signal:e})}disconnect(){this.#s?.abort(),this.#s=void 0}sync(){let e=this.#t.root;e&&(this.#o=new WeakMap,this.#i.clear(),this.#a.clear(),this.#r.set(e,this.#e),e.item=this.#c(this.#e),e.children=this.#f(this.#e,e.children??[]),this.#t.invalidateStructure())}lookupByKey(e){return this.#a.get(e)}navigateToKeyPath(e,n){if(e.length===0)return!1;let r=this.#t.root?.children??[];for(let n=0;n<e.length-1;n++){let i=r.find(r=>r.item.key===e[n]);if(!i)return!1;if(i.children===void 0){let e=this.#r.get(i);e&&(i.children=this.#l(e),this.#t.invalidateStructure())}r=i.children??[]}return this.#t.navigateTo(e,n)}navigateToIdentity(e,n){let r=this.#i.get(e);if(!r)return!1;let i=[],a=this.#e.getIdentity();for(;r&&r.getIdentity()!==a;)i.unshift(this.#c(r).key),r=r.getParent();return r!==void 0&&this.navigateToKeyPath(i,n)}navigateToValue(e,n){let r=this.#p(this.#e,e);return r?this.navigateToKeyPath(r.slice(1).map(e=>this.#c(e).key),n):!1}#c(e,n){let r=e.getIdentity(),i=this.#o.get(r);return i||(i=this.#n.valueToItem(e.getValue(),e),this.#o.set(r,i)),n===void 0?i:{...i,isLeaf:i.isLeaf??n}}#l(e){return Array.from(e.children(),e=>this.#d(e))}#u(e,n){this.#r.set(e,n),this.#i.set(n.getIdentity(),n),this.#a.set(e.item.key,n)}#d(e){let n=[...e.children()];for(let e of n)this.#i.set(e.getIdentity(),e);let r={item:this.#c(e,n.length===0)};return this.#u(r,e),r}#f(e,n){let r=new Map(n.map(e=>[e.item.key,e]));return Array.from(e.children(),e=>{let n=this.#d(e),i=r.get(n.item.key);return i?(i.item=n.item,this.#u(i,e),i.children!==void 0&&(i.children=this.#f(e,i.children)),i):n})}#p(e,n,r=[]){let i=[...r,e];if(n(e.getValue()))return i;for(let r of e.children()){let e=this.#p(r,n,i);if(e)return e}}};function uO(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function dO(e,n){if(e){if(e.item.key===n)return e;for(let r of e.children??[]){let e=dO(r,n);if(e)return e}}}function fO(e,n){if(e){if(e.item.key===n)return[e];for(let r of e.children??[]){let i=fO(r,n);if(i)return[e,...i]}}}function pO(e,n,r){if(e.length===0||n<=0||r<=0)return 1/0;let i=0;for(let a of e){if(a<=0)return 1/0;let e=r*r*a/(n*n);i=Math.max(i,e,1/e)}return i}function mO(e,n){let r=Array.from({length:e.length}),i=n.x,a=n.y,o=n.width,s=n.height,c=0;for(;c<e.length;){let n=Math.min(o,s),l=c+1,u=e.slice(c,l).map(e=>e.area),d=u.reduce((e,n)=>e+n,0),f=pO(u,d,n);for(;l<e.length;){let r=e.slice(c,l+1).map(e=>e.area),i=r.reduce((e,n)=>e+n,0),a=pO(r,i,n);if(a<=f)l++,u=r,d=i,f=a;else break}if(o<=s){let e=d/o,n=i;for(let i=c;i<l;i++){let o=u[i-c]/e;r[i]={x:n,y:a,width:o,height:e},n+=o}a+=e,s-=e}else{let e=d/s,n=a;for(let a=c;a<l;a++){let o=u[a-c]/e;r[a]={x:i,y:n,width:e,height:o},n+=o}i+=e,o-=e}c=l}return r}function hO(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.min(e,1):0}function gO(e,n,r,i){if(e.width<=0||e.height<=0)return n.map(()=>({x:e.x,y:e.y,width:0,height:0}));let a=n.reduce((e,n)=>e+n,0),o=a>0?n.map(e=>e/a):n.map(()=>1/n.length),s=r===`dice`||r===`slice-dice`&&i%2==0,c=r===`slice`||r===`slice-dice`&&i%2==1;if(r===`squarify`){let r=o.map((e,n)=>({share:e,i:n})).filter(e=>e.share>0),i=n.map(()=>({x:e.x,y:e.y,width:0,height:0}));if(r.length>0){let n=e.width*e.height,a=mO(r.map(e=>({area:e.share*n})),e);r.forEach((e,n)=>{i[e.i]=a[n]})}return i}let l=[];if(s){let n=e.x;o.forEach(r=>{let i=e.width*r;l.push({x:n,y:e.y,width:i,height:e.height}),n+=i})}else if(c){let n=e.y;o.forEach(r=>{let i=e.height*r;l.push({x:e.x,y:n,width:e.width,height:i}),n+=i})}return l}function _O(e,n={}){if(!e?.children?.length)return[];let{maxDepth:r=1/0,valueAccessor:i=()=>1,zoomKey:a,tilingMethod:o=`squarify`,hideLeaves:s=!1,presentation:c=`nested`,cascadeOffsetX:l,cascadeOffsetY:u}=n;if(r<=0)return[];let d=c===`cascaded`,f=d?hO(l):0,p=d?hO(u):0,m=e=>{let n=e.children??[];return s?n.filter(e=>e.item.isLeaf!==!0):n},h=a===void 0?e:dO(e,a)??e,g=fO(e,h.item.key),_=g?g.length-2:-1,v=m(h);if(v.length===0)return[];let y=[],b=(e,n,a,s,c)=>{if(e.length===0||s>=r)return;let l=gO(n,e.map(e=>uO(i(e.item))),o,s),u=e.length;e.forEach((e,n)=>{let r=l[n],i=m(e);if(y.push({node:e,depth:a,relativeDepth:s,x:r.x,y:r.y,width:r.width,height:r.height,parentKey:c,index:n,setSize:u,hasChildren:i.length>0||e.children===void 0&&e.item.isLeaf!==!0}),i.length>0){let n=f<=0&&p<=0?r:{x:r.x+f,y:r.y+p,width:Math.max(0,r.width-f),height:Math.max(0,r.height-p)};b(i,n,a+1,s+1,e.item.key)}})};return b(v,{x:0,y:0,width:1,height:1},_+1,0,h.item.key),y}let Q=class extends n{constructor(...e){super(...e),this.exclusivity=`none`,this.selectionFilter=`all`,this.interactionMode=`standard`,this.tilingMethod=`squarify`,this.presentation=`nested`,this.cascadeOffset=6,this.maxDepth=4,this.hideLeaves=!1,this.minLabelArea=1600,this.minTileWidth=24,this.padding=4,this.minChildArea=400,this.valueAccessor=()=>1,this._selectedNodes=new Set,this.disableKeyboardNavigation=!1,this.registry=void 0,this._zoomKey=void 0,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.treemap-label`,highlightKey:`incr-search-highlight`})}),this.tickled=new ie(this,{getItems:()=>this.#u().map(e=>({id:e.node.item.key,enabled:!0})),onStateChange:()=>{this.setAttribute(`data-input-mode`,this.tickled.inputMode)},onTickle:e=>{if(e===void 0)return;let n=this.#u().find(n=>n.node.item.key===e);n&&this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:n.node,depth:n.depth},bubbles:!0,composed:!0}))}}),this.#t=new Set,this.#n=new Map,this.#c=0}get selectedNodes(){return this._selectedNodes}get focusedNode(){if(this._zoomKey!==void 0)return dO(this.#l,this._zoomKey)}#e;#t;#n;#r;#i;#a;#o;#s;#c;get#l(){return this.model?.root??this.root}#u(){return this.#d(this._zoomKey)}#d(e){return _O(this.#l,{valueAccessor:this.valueAccessor,maxDepth:this.maxDepth,zoomKey:e,tilingMethod:this.tilingMethod,hideLeaves:this.hideLeaves,presentation:this.presentation,...this.#f()})}#f(){if(this.presentation!==`cascaded`||!Number.isFinite(this.cascadeOffset)||this.cascadeOffset<=0)return{};let e=this.clientWidth||0,n=this.clientHeight||0;return e<=0||n<=0?{}:{cascadeOffsetX:this.cascadeOffset/e,cascadeOffsetY:this.cascadeOffset/n}}connectedCallback(){super.connectedCallback(),this.setAttribute(`data-input-mode`,`mouse`);let e=this.#i=Jt();e.register({id:`select-all`,label:`Select All`,description:`Select all visible items`,execute:()=>this.selectAll()}),e.register({id:`deselect-all`,label:`Deselect All`,description:`Clear all selection`,execute:()=>this.deselectAll()}),this.registry=e,this.#m(),typeof ResizeObserver<`u`&&(this.#o=new ResizeObserver(()=>this.requestUpdate()),this.#o.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=void 0;for(let e of this.#n.values())e.abort();this.#n.clear(),this.#t.clear(),this.#o?.disconnect(),this.#o=void 0,this.#i&&(this.#i.unregister(`select-all`),this.#i.unregister(`deselect-all`),this.#i=void 0,this.registry=void 0)}#p(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#m(){this.#i&&(this.search.setModes(this.#p()),this.#a?.(),this.#a=Lt(this.#i,this.search))}updated(e){if(e.has(`root`)&&this.root&&this.#h(),e.has(`model`)&&(this.#e?.(),this.#e=void 0,this.model&&(this.#e=this.model._subscribe(e=>{e.type===`root`?(this.#h(),this.requestUpdate()):e.type===`invalidate`&&this.requestUpdate()}),this.#h())),e.has(`interactionMode`)&&(this.#r=void 0,this.clearSelection()),e.has(`searchModes`)&&this.#m(),this._zoomKey!==void 0&&!dO(this.#l,this._zoomKey)&&(this._zoomKey=void 0),this.#g(),this.#s){let e=this.#s;this.#s=void 0,this.#S(e)}}#h(){this.#s=void 0,this.#y(),this.tickled.clearTickled(),this._zoomKey=void 0,this.#r=void 0}#g(){if(!(!this.model&&!this.loadChildren))for(let e of this.#u()){let{node:n}=e;n.children!==void 0||this.#t.has(n.item.key)||this.#_(n,e.depth)}}async#_(e,n){let r=e.item.key;this.#t.add(r);let i=new AbortController;this.#n.set(r,i),this.requestUpdate();try{let r;if(r=this.model?await this.model.getChildren(e,n,i.signal):[...await dg(this.loadChildren({node:e,depth:n},i.signal),i.signal)],i.signal.aborted)return;e.children=r}catch{if(i.signal.aborted)return;e.children=[]}finally{this.#t.delete(r),this.#n.delete(r),i.signal.aborted||this.requestUpdate()}}#v(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf===!0:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#y(){this._selectedNodes.clear(),this.selectedNode=void 0}#b(e){this.dispatchEvent(new CustomEvent(`select`,{detail:{selected:new Set(this._selectedNodes),previous:e},bubbles:!0,composed:!0}))}select(e){if(!this.#v(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#b(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#b(n),this.requestUpdate()}clearSelection(){if(this._selectedNodes.size===0)return;let e=new Set(this._selectedNodes);this.#y(),this.#b(e),this.requestUpdate()}selectAll(){let e=new Set(this._selectedNodes);for(let e of this.#u())this.#v(e.node)&&this._selectedNodes.add(e.node);this.selectedNode=[...this._selectedNodes].at(-1),this.#b(e),this.requestUpdate()}deselectAll(){let e=new Set(this._selectedNodes);this.#y(),this.#b(e),this.requestUpdate()}selectMany(e){let n=new Set(this._selectedNodes);this._selectedNodes=new Set([...e].filter(e=>this.#v(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#b(n),this.requestUpdate()}zoomTo(e){if(this._zoomKey===e.item.key)return;this.#s=this.#x(e.item.key),this._zoomKey=e.item.key,this.tickled.clearTickled();let n=fO(this.#l,e.item.key)?.length,r=n===void 0?-1:n-2;this.dispatchEvent(new CustomEvent(`zoom`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.requestUpdate()}zoomOut(){if(this._zoomKey===void 0)return;this.#s=this.#x(void 0);let e=this.focusedNode,n=this._zoomKey===void 0?void 0:fO(this.#l,this._zoomKey),r=n===void 0?-1:n.length-2;this._zoomKey=void 0,this.tickled.clearTickled(),this.dispatchEvent(new CustomEvent(`zoom`,{detail:{node:void 0,depth:-1},bubbles:!0,composed:!0})),e&&this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:e,depth:r},bubbles:!0,composed:!0})),this.requestUpdate()}#x(e){if(typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;if(e!==void 0){let n=this.#u().find(n=>n.node.item.key===e);if(n)return{direction:`in`,rect:{x:n.x,y:n.y,width:n.width,height:n.height}}}let n=this._zoomKey;if(n===void 0)return;let r=this.#d(e).find(e=>e.node.item.key===n);if(r)return{direction:`out`,rect:{x:r.x,y:r.y,width:r.width,height:r.height}}}#S(e){let n=this.renderRoot.querySelector(`.viewport-inner`),r=this.renderRoot.querySelector(`.viewport`);if(!(n instanceof HTMLElement)||!(r instanceof HTMLElement))return;let i=r.clientWidth,a=r.clientHeight;if(i<=0||a<=0)return;let{rect:o,direction:s}=e,c=s===`in`?`translate(${o.x*i}px, ${o.y*a}px) scale(${Math.max(o.width,1e-4)}, ${Math.max(o.height,1e-4)})`:(()=>{let e=o.width>0?1/o.width:1,n=o.height>0?1/o.height:1;return`translate(${-o.x*e*i}px, ${-o.y*n*a}px) scale(${e}, ${n})`})();n.classList.remove(`flipping`),n.style.transform=c,n.offsetWidth,requestAnimationFrame(()=>{n.classList.add(`flipping`),n.style.transform=`none`}),n.addEventListener(`transitionend`,()=>n.classList.remove(`flipping`),{once:!0})}#C(e){return e.item.isLeaf===!0?!1:e.children===void 0?this.model!==void 0||this.loadChildren!==void 0:this.hideLeaves?e.children.some(e=>e.item.isLeaf!==!0):e.children.length>0}navigateTo(e){let n=this.#l;if(!n?.children)return!1;let r=n,i=[];for(let n of e){let e=r.children?.find(e=>e.item.key===n);if(!e)return!1;i.push(e),r=e}let a=i.at(-1);return i.length>this.maxDepth?this.zoomTo(i[i.length-this.maxDepth-1]):this._zoomKey!==void 0&&this.zoomOut(),this.select(a),this.tickled.setTickled(a.item.key),this.requestUpdate(),!0}navigateToNode(e){let n=this.#l;if(!n?.children)return!1;let r=this.#T(n.children,e);return r?this.navigateTo(r):!1}revealKey(e){let n=this.#l;if(!n?.children)return!1;let r=this.#T(n.children,n=>n.item.key===e);if(!r)return!1;if(r.length>this.maxDepth){let e=this.#w(r.slice(0,r.length-this.maxDepth));e&&this.zoomTo(e)}return this.tickled.setTickled(e),this.requestUpdate(),!0}#w(e){let n=this.#l;for(let r of e){let e=r===n?.item.key?n:n?.children?.find(e=>e.item.key===r);if(!e)return;n=e}return n}#T(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;if(i.children?.length){let r=this.#T(i.children,n,e);if(r)return r}}}getNodes(){return this.#u().map(e=>({node:e.node,depth:e.depth}))}#E(e,n){return!this.filterPredicate||this.filterPredicate(e,n)?!0:e.children?.some(e=>this.#E(e,n+1))??!1}#D(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}#O(e,n){let r=this.#u(),i=this.#D(e),a=r.filter(n=>n!==e&&n.relativeDepth===e.relativeDepth&&n.parentKey===e.parentKey),o,s=1/0;for(let e of a){let r=this.#D(e),a=r.x-i.x,c=r.y-i.y;if(!(n===`left`?a<0:n===`right`?a>0:n===`up`?c<0:c>0))continue;let l=Math.hypot(a,c);l<s&&(s=l,o=e)}return o||(n===`up`||n===`left`?e.parentKey===void 0?void 0:r.find(n=>n.node.item.key===e.parentKey):r.find(n=>n.parentKey===e.node.item.key))}#k(e,n,r){if(this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.interactionMode===`standard`&&(r.ctrlKey||r.metaKey)){if(this._selectedNodes.has(e.node))this.deselect(e.node);else if(this.#v(e.node)){let n=new Set(this._selectedNodes);this._selectedNodes.add(e.node),this.selectedNode=e.node,this.#b(n),this.requestUpdate()}this.#r=n}else if(this.interactionMode===`standard`&&r.shiftKey&&this.#r!==void 0){let e=this.#u(),r=Math.min(this.#r,n),i=Math.max(this.#r,n),a=new Set(this._selectedNodes);this._selectedNodes=new Set(e.slice(r,i+1).map(e=>e.node).filter(e=>this.#v(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#b(a),this.requestUpdate()}else this.interactionMode!==`manual`&&(this.select(e.node),this.#r=n);this.tickled.setTickled(e.node.item.key),this.#C(e.node)&&this.zoomTo(e.node)}#A(e){this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:e.node,depth:e.depth},bubbles:!0,composed:!0}))}#j(e){if(this.disableKeyboardNavigation)return;let n=this.#u();if(n.length===0)return;let r=this.tickled.tickledId,i=r===void 0?-1:n.findIndex(e=>e.node.item.key===r),a=i>=0?n[i]:void 0,o=n=>{n&&(e.preventDefault(),this.tickled.setTickled(n.node.item.key),this.interactionMode===`implicit`&&this.select(n.node))};switch(e.key){case`ArrowLeft`:o(a?this.#O(a,`left`):n[0]);return;case`ArrowRight`:o(a?this.#O(a,`right`):n[0]);return;case`ArrowUp`:o(a?this.#O(a,`up`):n[0]);return;case`ArrowDown`:o(a?this.#O(a,`down`):n[0]);return;case`Home`:o(n[0]);return;case`End`:o(n.at(-1));return;case`Enter`:if(!a)return;e.preventDefault(),this.interactionMode!==`manual`&&this.select(a.node),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:a.node,depth:a.depth},bubbles:!0,composed:!0})),this.#C(a.node)&&this.zoomTo(a.node);return;case`Backspace`:case`Escape`:this._zoomKey!==void 0&&(e.preventDefault(),this.zoomOut())}}#M(e){if(!e.metaKey||e.deltaY===0||(e.preventDefault(),performance.now()<this.#c))return;if(e.deltaY>0){if(this._zoomKey===void 0)return;this.#c=performance.now()+260,this.#N();return}let n=(e.target?.closest(`.tile`))?.getAttribute(`data-key`)??void 0;if(n===void 0)return;let r=this.#u().find(e=>e.node.item.key===n);!r||!this.#C(r.node)||(this.#c=performance.now()+260,this.zoomTo(r.node))}#N(){let e=this._zoomKey===void 0?void 0:fO(this.#l,this._zoomKey),n=e&&e.length>2?e[e.length-2]:void 0;n?this.zoomTo(n):this.zoomOut()}#P(){let e=this.focusedNode;return e===void 0?a:i`
12595
12626
  <nav class="breadcrumb" part="breadcrumb" aria-label="Treemap zoom path">
12596
12627
  <ixfx-crumb-navigation
12597
12628
  with-up
@@ -12813,7 +12844,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12813
12844
  color: var(--surface-muted-text);
12814
12845
  font-size: var(--text-s);
12815
12846
  }
12816
- `]}};E([d({type:Object})],Q.prototype,`root`,void 0),E([d({attribute:!1})],Q.prototype,`model`,void 0),E([d({attribute:!1})],Q.prototype,`loadChildren`,void 0),E([d({reflect:!0,attribute:`exclusivity`})],Q.prototype,`exclusivity`,void 0),E([d({reflect:!0,attribute:`selection-filter`})],Q.prototype,`selectionFilter`,void 0),E([d({type:String,attribute:`interaction-mode`})],Q.prototype,`interactionMode`,void 0),E([d({type:String,attribute:`tiling-method`})],Q.prototype,`tilingMethod`,void 0),E([d({type:String,attribute:`presentation`})],Q.prototype,`presentation`,void 0),E([d({type:Number,attribute:`cascade-offset`})],Q.prototype,`cascadeOffset`,void 0),E([d({type:Number,attribute:`max-depth`})],Q.prototype,`maxDepth`,void 0),E([d({type:Boolean,attribute:`hide-leaves`})],Q.prototype,`hideLeaves`,void 0),E([d({type:Number,attribute:`min-label-area`})],Q.prototype,`minLabelArea`,void 0),E([d({type:Number,attribute:`min-tile-width`})],Q.prototype,`minTileWidth`,void 0),E([d({type:Number})],Q.prototype,`padding`,void 0),E([d({type:Number,attribute:`min-child-area`})],Q.prototype,`minChildArea`,void 0),E([d({attribute:!1})],Q.prototype,`valueAccessor`,void 0),E([d({attribute:!1})],Q.prototype,`categoryAccessor`,void 0),E([d({attribute:!1})],Q.prototype,`selectedNode`,void 0),E([m()],Q.prototype,`_selectedNodes`,void 0),E([d({attribute:!1})],Q.prototype,`filterPredicate`,void 0),E([d({type:Boolean,attribute:`disable-keyboard-navigation`})],Q.prototype,`disableKeyboardNavigation`,void 0),E([d({attribute:!1})],Q.prototype,`registry`,void 0),E([d({type:String,attribute:`search-modes`,reflect:!0})],Q.prototype,`searchModes`,void 0),E([m()],Q.prototype,`_zoomKey`,void 0),Q=E([T(`ixfx-treemap-list`)],Q);let gO=class extends n{constructor(...e){super(...e),this.layout=`vertical`,this.sizeA=``,this.sizeB=``,this.fixedA=!1,this.fixedB=!1,this.collapsible=!1,this.collapsedA=!1,this.collapsedB=!1,this.minSizeA=``,this.maxSizeA=``,this.minSizeB=``,this.maxSizeB=``,this._hasCorner=!1,this.#t=``,this.#n=``,this.#r=0,this.#i=0,this.#a=``,this.#u=null,this.#p=.1,this.#E=e=>{e.preventDefault();let n=this.getZone();n&&n.classList.add(`user-resizing`),this.#e=this.getBoundingClientRect(),this.#t=this.sizeA,this.#n=this.sizeB,window.addEventListener(`pointerup`,this.#D),window.addEventListener(`pointermove`,this.#O)},this.#D=e=>{e.preventDefault();let n=this.getZone();n&&n.classList.remove(`user-resizing`),window.removeEventListener(`pointerup`,this.#D),window.removeEventListener(`pointermove`,this.#O)},this.#O=e=>{let n=this.#e;if(n){if(this.layout===`horizontal`){let r=$r((e.y-n.y)/n.height);if(this.collapsible&&this.collapsedA){if(r>(this.#d??.05)+this.#p){this.collapsedA=!1,this.#h(`A`,!1),this.#d=void 0;let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.height);this.sizeA=e,this.sizeB=i}}else if(this.collapsible&&!this.collapsedA&&r<5/n.height)this.collapsedA=!0,this.#h(`A`,!0),this.sizeA=`0px`,this.sizeB=`100%`,this.#d=r;else if(!this.collapsedA){let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.height);this.sizeA=e,this.sizeB=i}if(this.collapsible&&this.collapsedB){if(r<(this.#f??.95)-this.#p){this.collapsedB=!1,this.#h(`B`,!1),this.#f=void 0;let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.height);this.sizeA=e,this.sizeB=i}}else this.collapsible&&!this.collapsedB&&r>1-5/n.height&&(this.collapsedB=!0,this.#h(`B`,!0),this.sizeA=`100%`,this.sizeB=`0px`,this.#f=r)}else{let r=$r((e.x-n.x)/n.width);if(this.collapsible&&this.collapsedA){if(r>(this.#d??.05)+this.#p){this.collapsedA=!1,this.#h(`A`,!1),this.#d=void 0;let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.width);this.sizeA=e,this.sizeB=i}}else if(this.collapsible&&!this.collapsedA&&r<5/n.width)this.collapsedA=!0,this.#h(`A`,!0),this.sizeA=`0px`,this.sizeB=`100%`,this.#d=r;else if(!this.collapsedA){let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.width);this.sizeA=e,this.sizeB=i}if(this.collapsible&&this.collapsedB){if(r<(this.#f??.95)-this.#p){this.collapsedB=!1,this.#h(`B`,!1),this.#f=void 0;let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.width);this.sizeA=e,this.sizeB=i}}else this.collapsible&&!this.collapsedB&&r>1-5/n.width&&(this.collapsedB=!0,this.#h(`B`,!0),this.sizeA=`100%`,this.sizeB=`0px`,this.#f=r)}e.preventDefault()}},this.#k=e=>{e.preventDefault(),e.stopPropagation();let n=this.getZone();n&&n.classList.add(`user-resizing`),this.#e=this.getBoundingClientRect(),this.#r=e.clientX,this.#i=e.clientY,this.#t=this.sizeA,this.#n=this.sizeB;let r=this.#v();if(r){this.#a=r.sizeA;let e=r.getBoundingClientRect(),n=r.shadowRoot?.querySelector(`.split-bar`);n&&(this.#s=e,this.#c=n.getBoundingClientRect());let i=r.getZone();i&&i.classList.add(`user-resizing`)}window.addEventListener(`pointerup`,this.#A),window.addEventListener(`pointermove`,this.#M)},this.#A=e=>{e.preventDefault();let n=this.getZone();n&&n.classList.remove(`user-resizing`);let r=this.#v();if(r){let e=r.getZone();e&&e.classList.remove(`user-resizing`)}window.removeEventListener(`pointerup`,this.#A),window.removeEventListener(`pointermove`,this.#M)},this.#M=e=>{let n=this.#e,r=this.getZone(),i=this.#v();if(!n||!r||!i)return;let a=r.getBoundingClientRect(),o=e.clientX-a.left,s=e.clientY-a.top;if(this.layout===`vertical`&&i.layout===`horizontal`){let e=o/n.width,r=s/n.height,{sizeA:i,sizeB:a}=this.#x(`${e*100}%`,`${(1-e)*100}%`,n.width);e=this.#y(i,n.width),this.sizeA=i,this.sizeB=a,this.#u={sizeA:r,sizeB:1-r},requestAnimationFrame(()=>this.#j());let c=this.shadowRoot?.querySelector(`.corner-zone`);c&&(c.style.left=`${o-6}px`,c.style.top=`${s-6}px`)}else if(this.layout===`horizontal`&&i.layout===`vertical`){let e=o/n.width,r=s/n.height,{sizeA:i,sizeB:a}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.height);r=this.#y(i,n.height),this.sizeA=i,this.sizeB=a,this.#u={sizeA:e,sizeB:1-e},requestAnimationFrame(()=>this.#j());let c=this.shadowRoot?.querySelector(`.corner-zone`);c&&(c.style.left=`${o-6}px`,c.style.top=`${s-6}px`)}e.preventDefault()}}get showGrabHandle(){let e=getComputedStyle(this).getPropertyValue(`--handle-size`).trim(),n=Number.parseFloat(e);return!Number.isNaN(n)&&n>3}#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;disconnectedCallback(){super.disconnectedCallback(),this.#l?.disconnect()}firstUpdated(){this.#g()}updated(e){(e.has(`sizeA`)||e.has(`sizeB`)||e.has(`collapsedA`)||e.has(`collapsedB`))&&this.#T(),(e.has(`sizeA`)||e.has(`sizeB`))&&this.#m()}#m(){this.collapsedA?this.setAttribute(`data-collapsed-a`,``):this.removeAttribute(`data-collapsed-a`),this.collapsedB?this.setAttribute(`data-collapsed-b`,``):this.removeAttribute(`data-collapsed-b`)}#h(e,n){this.dispatchEvent(new CustomEvent(`ixfx-split-collapsed`,{detail:{panel:e,collapsed:n},bubbles:!0,composed:!0}))}#g(){let e=this.shadowRoot?.querySelector(`slot[name="a"]`);e&&(this.#l=new MutationObserver(()=>{this.#_()}),this.#l.observe(e,{characterData:!0,childList:!0,subtree:!0}),this.#_())}#_(){let e=this.shadowRoot?.querySelector(`slot[name="a"]`);if(!e)return;let n=e.assignedElements(),r=e=>{for(let n of e){if(n.tagName===`IXFX-SPLIT-LAYOUT`)return n;let e=r(Array.from(n.children));if(e)return e}},i=r(n);i?(this.#o=i,this._hasCorner=!0,requestAnimationFrame(()=>this.#T())):(this.#o=void 0,this._hasCorner=!1)}#v(){if(this.#o)return this.#o;let e=this.shadowRoot?.querySelector(`slot[name="a"]`);if(e)return e.assignedElements().find(e=>e.tagName===`IXFX-SPLIT-LAYOUT`)}#y(e,n){return e.endsWith(`px`)?Number.parseFloat(e.replace(`px`,``))/n:e.endsWith(`%`)?Number.parseFloat(e.replace(`%`,``))/100:.5}#b(e,n){return e.endsWith(`px`)?Number.parseFloat(e.replace(`px`,``)):e.endsWith(`%`)?Number.parseFloat(e.replace(`%`,``))/100*n:null}#x(e,n,r){let i=this.#y(e,r),a=this.#y(n,r),o=this.#S(this.minSizeA,r),s=this.#S(this.minSizeB,r),c=this.#C(this.maxSizeA,r),l=this.#C(this.maxSizeB,r);if(o!==null||s!==null){let e=(o??0)+(s??0);if(e>1){let n=1/e;o!==null&&(i=o===null?0:o*n),s!==null&&(a=s===null?0:s*n)}i<(o??0)&&(i=o??0),a<(s??0)&&(a=s??0)}c!==null&&i>c&&(i=c),l!==null&&a>l&&(a=l),a=1-i;let u=!this.sizeA.endsWith(`px`);return this.sizeB.endsWith(`px`),u?{sizeA:`${i*100}%`,sizeB:`${a*100}%`}:{sizeA:`${i*r}px`,sizeB:`${a*r}px`}}#S(e,n){if(e.length===0)return null;let r=this.#b(e,n);return r===null?e.endsWith(`%`)?Number.parseFloat(e.replace(`%`,``))/100:null:r/n}#C(e,n){if(e.length===0)return null;let r=this.#b(e,n);return r===null?e.endsWith(`%`)?Number.parseFloat(e.replace(`%`,``))/100:null:r/n}#w(){let e=this.getBoundingClientRect(),n=this.getZone();if(!n)return null;let r=this.#v();if(!r)return null;n.getBoundingClientRect();let i=this.#y(this.sizeA||`50%`,e.width),a,o;if(this.layout===`vertical`&&r.layout===`horizontal`)a=i*e.width,o=this.#y(r.sizeA||`50%`,e.height)*e.height;else if(this.layout===`horizontal`&&r.layout===`vertical`)a=this.#y(r.sizeA||`50%`,e.width)*e.width,o=i*e.height;else return null;return{x:a,y:o}}#T(){if(!this._hasCorner)return;let e=this.shadowRoot?.querySelector(`.corner-zone`);if(!e||!this.getZone())return;let n=this.#w();if(!n){e.style.display=`none`;return}let r=n.x-6,i=n.y-6;e.style.left=`${r}px`,e.style.top=`${i}px`,e.style.display=`block`;let a=this.#v();a&&(this.layout===`vertical`&&a.layout===`horizontal`?e.style.cursor=`nwse-resize`:this.layout===`horizontal`&&a.layout===`vertical`&&(e.style.cursor=`nesw-resize`))}getZone(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`#zone`);if(e)return e}#E;#D;#O;#k;#A;#j(){if(!this.#u)return;let{sizeA:e,sizeB:n}=this.#u,r=this.#v();r&&(r.sizeA=`${e*100}%`,r.sizeB=`${n*100}%`),this.#u=null}#M;render(){let e=this.layout===`vertical`?`width`:`height`,n=this.sizeA,r=this.sizeB;return this.collapsedA?n=`0px`:n.length===0&&r.length===0?r=n=`50%`:n.length===0?n=`auto`:r.length===0&&(r=`auto`),this.collapsedB&&(r=`0px`),n=`${e}:${n}`,r=`${e}:${r}`,i`
12847
+ `]}};E([d({type:Object})],Q.prototype,`root`,void 0),E([d({attribute:!1})],Q.prototype,`model`,void 0),E([d({attribute:!1})],Q.prototype,`loadChildren`,void 0),E([d({reflect:!0,attribute:`exclusivity`})],Q.prototype,`exclusivity`,void 0),E([d({reflect:!0,attribute:`selection-filter`})],Q.prototype,`selectionFilter`,void 0),E([d({type:String,attribute:`interaction-mode`})],Q.prototype,`interactionMode`,void 0),E([d({type:String,attribute:`tiling-method`})],Q.prototype,`tilingMethod`,void 0),E([d({type:String,attribute:`presentation`})],Q.prototype,`presentation`,void 0),E([d({type:Number,attribute:`cascade-offset`})],Q.prototype,`cascadeOffset`,void 0),E([d({type:Number,attribute:`max-depth`})],Q.prototype,`maxDepth`,void 0),E([d({type:Boolean,attribute:`hide-leaves`})],Q.prototype,`hideLeaves`,void 0),E([d({type:Number,attribute:`min-label-area`})],Q.prototype,`minLabelArea`,void 0),E([d({type:Number,attribute:`min-tile-width`})],Q.prototype,`minTileWidth`,void 0),E([d({type:Number})],Q.prototype,`padding`,void 0),E([d({type:Number,attribute:`min-child-area`})],Q.prototype,`minChildArea`,void 0),E([d({attribute:!1})],Q.prototype,`valueAccessor`,void 0),E([d({attribute:!1})],Q.prototype,`categoryAccessor`,void 0),E([d({attribute:!1})],Q.prototype,`selectedNode`,void 0),E([m()],Q.prototype,`_selectedNodes`,void 0),E([d({attribute:!1})],Q.prototype,`filterPredicate`,void 0),E([d({type:Boolean,attribute:`disable-keyboard-navigation`})],Q.prototype,`disableKeyboardNavigation`,void 0),E([d({attribute:!1})],Q.prototype,`registry`,void 0),E([d({type:String,attribute:`search-modes`,reflect:!0})],Q.prototype,`searchModes`,void 0),E([m()],Q.prototype,`_zoomKey`,void 0),Q=E([T(`ixfx-treemap-list`)],Q);let vO=class extends n{constructor(...e){super(...e),this.layout=`vertical`,this.sizeA=``,this.sizeB=``,this.fixedA=!1,this.fixedB=!1,this.collapsible=!1,this.collapsedA=!1,this.collapsedB=!1,this.minSizeA=``,this.maxSizeA=``,this.minSizeB=``,this.maxSizeB=``,this._hasCorner=!1,this.#t=``,this.#n=``,this.#r=0,this.#i=0,this.#a=``,this.#u=null,this.#p=.1,this.#E=e=>{e.preventDefault();let n=this.getZone();n&&n.classList.add(`user-resizing`),this.#e=this.getBoundingClientRect(),this.#t=this.sizeA,this.#n=this.sizeB,window.addEventListener(`pointerup`,this.#D),window.addEventListener(`pointermove`,this.#O)},this.#D=e=>{e.preventDefault();let n=this.getZone();n&&n.classList.remove(`user-resizing`),window.removeEventListener(`pointerup`,this.#D),window.removeEventListener(`pointermove`,this.#O)},this.#O=e=>{let n=this.#e;if(n){if(this.layout===`horizontal`){let r=$r((e.y-n.y)/n.height);if(this.collapsible&&this.collapsedA){if(r>(this.#d??.05)+this.#p){this.collapsedA=!1,this.#h(`A`,!1),this.#d=void 0;let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.height);this.sizeA=e,this.sizeB=i}}else if(this.collapsible&&!this.collapsedA&&r<5/n.height)this.collapsedA=!0,this.#h(`A`,!0),this.sizeA=`0px`,this.sizeB=`100%`,this.#d=r;else if(!this.collapsedA){let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.height);this.sizeA=e,this.sizeB=i}if(this.collapsible&&this.collapsedB){if(r<(this.#f??.95)-this.#p){this.collapsedB=!1,this.#h(`B`,!1),this.#f=void 0;let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.height);this.sizeA=e,this.sizeB=i}}else this.collapsible&&!this.collapsedB&&r>1-5/n.height&&(this.collapsedB=!0,this.#h(`B`,!0),this.sizeA=`100%`,this.sizeB=`0px`,this.#f=r)}else{let r=$r((e.x-n.x)/n.width);if(this.collapsible&&this.collapsedA){if(r>(this.#d??.05)+this.#p){this.collapsedA=!1,this.#h(`A`,!1),this.#d=void 0;let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.width);this.sizeA=e,this.sizeB=i}}else if(this.collapsible&&!this.collapsedA&&r<5/n.width)this.collapsedA=!0,this.#h(`A`,!0),this.sizeA=`0px`,this.sizeB=`100%`,this.#d=r;else if(!this.collapsedA){let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.width);this.sizeA=e,this.sizeB=i}if(this.collapsible&&this.collapsedB){if(r<(this.#f??.95)-this.#p){this.collapsedB=!1,this.#h(`B`,!1),this.#f=void 0;let{sizeA:e,sizeB:i}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.width);this.sizeA=e,this.sizeB=i}}else this.collapsible&&!this.collapsedB&&r>1-5/n.width&&(this.collapsedB=!0,this.#h(`B`,!0),this.sizeA=`100%`,this.sizeB=`0px`,this.#f=r)}e.preventDefault()}},this.#k=e=>{e.preventDefault(),e.stopPropagation();let n=this.getZone();n&&n.classList.add(`user-resizing`),this.#e=this.getBoundingClientRect(),this.#r=e.clientX,this.#i=e.clientY,this.#t=this.sizeA,this.#n=this.sizeB;let r=this.#v();if(r){this.#a=r.sizeA;let e=r.getBoundingClientRect(),n=r.shadowRoot?.querySelector(`.split-bar`);n&&(this.#s=e,this.#c=n.getBoundingClientRect());let i=r.getZone();i&&i.classList.add(`user-resizing`)}window.addEventListener(`pointerup`,this.#A),window.addEventListener(`pointermove`,this.#M)},this.#A=e=>{e.preventDefault();let n=this.getZone();n&&n.classList.remove(`user-resizing`);let r=this.#v();if(r){let e=r.getZone();e&&e.classList.remove(`user-resizing`)}window.removeEventListener(`pointerup`,this.#A),window.removeEventListener(`pointermove`,this.#M)},this.#M=e=>{let n=this.#e,r=this.getZone(),i=this.#v();if(!n||!r||!i)return;let a=r.getBoundingClientRect(),o=e.clientX-a.left,s=e.clientY-a.top;if(this.layout===`vertical`&&i.layout===`horizontal`){let e=o/n.width,r=s/n.height,{sizeA:i,sizeB:a}=this.#x(`${e*100}%`,`${(1-e)*100}%`,n.width);e=this.#y(i,n.width),this.sizeA=i,this.sizeB=a,this.#u={sizeA:r,sizeB:1-r},requestAnimationFrame(()=>this.#j());let c=this.shadowRoot?.querySelector(`.corner-zone`);c&&(c.style.left=`${o-6}px`,c.style.top=`${s-6}px`)}else if(this.layout===`horizontal`&&i.layout===`vertical`){let e=o/n.width,r=s/n.height,{sizeA:i,sizeB:a}=this.#x(`${r*100}%`,`${(1-r)*100}%`,n.height);r=this.#y(i,n.height),this.sizeA=i,this.sizeB=a,this.#u={sizeA:e,sizeB:1-e},requestAnimationFrame(()=>this.#j());let c=this.shadowRoot?.querySelector(`.corner-zone`);c&&(c.style.left=`${o-6}px`,c.style.top=`${s-6}px`)}e.preventDefault()}}get showGrabHandle(){let e=getComputedStyle(this).getPropertyValue(`--handle-size`).trim(),n=Number.parseFloat(e);return!Number.isNaN(n)&&n>3}#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;disconnectedCallback(){super.disconnectedCallback(),this.#l?.disconnect()}firstUpdated(){this.#g()}updated(e){(e.has(`sizeA`)||e.has(`sizeB`)||e.has(`collapsedA`)||e.has(`collapsedB`))&&this.#T(),(e.has(`sizeA`)||e.has(`sizeB`))&&this.#m()}#m(){this.collapsedA?this.setAttribute(`data-collapsed-a`,``):this.removeAttribute(`data-collapsed-a`),this.collapsedB?this.setAttribute(`data-collapsed-b`,``):this.removeAttribute(`data-collapsed-b`)}#h(e,n){this.dispatchEvent(new CustomEvent(`ixfx-split-collapsed`,{detail:{panel:e,collapsed:n},bubbles:!0,composed:!0}))}#g(){let e=this.shadowRoot?.querySelector(`slot[name="a"]`);e&&(this.#l=new MutationObserver(()=>{this.#_()}),this.#l.observe(e,{characterData:!0,childList:!0,subtree:!0}),this.#_())}#_(){let e=this.shadowRoot?.querySelector(`slot[name="a"]`);if(!e)return;let n=e.assignedElements(),r=e=>{for(let n of e){if(n.tagName===`IXFX-SPLIT-LAYOUT`)return n;let e=r(Array.from(n.children));if(e)return e}},i=r(n);i?(this.#o=i,this._hasCorner=!0,requestAnimationFrame(()=>this.#T())):(this.#o=void 0,this._hasCorner=!1)}#v(){if(this.#o)return this.#o;let e=this.shadowRoot?.querySelector(`slot[name="a"]`);if(e)return e.assignedElements().find(e=>e.tagName===`IXFX-SPLIT-LAYOUT`)}#y(e,n){return e.endsWith(`px`)?Number.parseFloat(e.replace(`px`,``))/n:e.endsWith(`%`)?Number.parseFloat(e.replace(`%`,``))/100:.5}#b(e,n){return e.endsWith(`px`)?Number.parseFloat(e.replace(`px`,``)):e.endsWith(`%`)?Number.parseFloat(e.replace(`%`,``))/100*n:null}#x(e,n,r){let i=this.#y(e,r),a=this.#y(n,r),o=this.#S(this.minSizeA,r),s=this.#S(this.minSizeB,r),c=this.#C(this.maxSizeA,r),l=this.#C(this.maxSizeB,r);if(o!==null||s!==null){let e=(o??0)+(s??0);if(e>1){let n=1/e;o!==null&&(i=o===null?0:o*n),s!==null&&(a=s===null?0:s*n)}i<(o??0)&&(i=o??0),a<(s??0)&&(a=s??0)}c!==null&&i>c&&(i=c),l!==null&&a>l&&(a=l),a=1-i;let u=!this.sizeA.endsWith(`px`);return this.sizeB.endsWith(`px`),u?{sizeA:`${i*100}%`,sizeB:`${a*100}%`}:{sizeA:`${i*r}px`,sizeB:`${a*r}px`}}#S(e,n){if(e.length===0)return null;let r=this.#b(e,n);return r===null?e.endsWith(`%`)?Number.parseFloat(e.replace(`%`,``))/100:null:r/n}#C(e,n){if(e.length===0)return null;let r=this.#b(e,n);return r===null?e.endsWith(`%`)?Number.parseFloat(e.replace(`%`,``))/100:null:r/n}#w(){let e=this.getBoundingClientRect(),n=this.getZone();if(!n)return null;let r=this.#v();if(!r)return null;n.getBoundingClientRect();let i=this.#y(this.sizeA||`50%`,e.width),a,o;if(this.layout===`vertical`&&r.layout===`horizontal`)a=i*e.width,o=this.#y(r.sizeA||`50%`,e.height)*e.height;else if(this.layout===`horizontal`&&r.layout===`vertical`)a=this.#y(r.sizeA||`50%`,e.width)*e.width,o=i*e.height;else return null;return{x:a,y:o}}#T(){if(!this._hasCorner)return;let e=this.shadowRoot?.querySelector(`.corner-zone`);if(!e||!this.getZone())return;let n=this.#w();if(!n){e.style.display=`none`;return}let r=n.x-6,i=n.y-6;e.style.left=`${r}px`,e.style.top=`${i}px`,e.style.display=`block`;let a=this.#v();a&&(this.layout===`vertical`&&a.layout===`horizontal`?e.style.cursor=`nwse-resize`:this.layout===`horizontal`&&a.layout===`vertical`&&(e.style.cursor=`nesw-resize`))}getZone(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`#zone`);if(e)return e}#E;#D;#O;#k;#A;#j(){if(!this.#u)return;let{sizeA:e,sizeB:n}=this.#u,r=this.#v();r&&(r.sizeA=`${e*100}%`,r.sizeB=`${n*100}%`),this.#u=null}#M;render(){let e=this.layout===`vertical`?`width`:`height`,n=this.sizeA,r=this.sizeB;return this.collapsedA?n=`0px`:n.length===0&&r.length===0?r=n=`50%`:n.length===0?n=`auto`:r.length===0&&(r=`auto`),this.collapsedB&&(r=`0px`),n=`${e}:${n}`,r=`${e}:${r}`,i`
12817
12848
  <div id="zone">
12818
12849
  <slot style=${n} name="a"></slot>
12819
12850
  ${this._hasCorner?i`<div class="corner-zone" @pointerdown=${this.#k}></div>`:``}
@@ -12937,7 +12968,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
12937
12968
  :host([data-collapsed-b]) slot[name="b"] {
12938
12969
  display: none;
12939
12970
  }
12940
- `]}};E([d({type:String})],gO.prototype,`layout`,void 0),E([d({type:String})],gO.prototype,`sizeA`,void 0),E([d({type:String})],gO.prototype,`sizeB`,void 0),E([d({type:Boolean})],gO.prototype,`fixedA`,void 0),E([d({type:Boolean})],gO.prototype,`fixedB`,void 0),E([d({type:Boolean})],gO.prototype,`collapsible`,void 0),E([d({type:Boolean,reflect:!0})],gO.prototype,`collapsedA`,void 0),E([d({type:Boolean,reflect:!0})],gO.prototype,`collapsedB`,void 0),E([d({type:String})],gO.prototype,`minSizeA`,void 0),E([d({type:String})],gO.prototype,`maxSizeA`,void 0),E([d({type:String})],gO.prototype,`minSizeB`,void 0),E([d({type:String})],gO.prototype,`maxSizeB`,void 0),E([m()],gO.prototype,`_hasCorner`,void 0),gO=E([T(`ixfx-twosplit-layout`)],gO);function _O(e){return e instanceof HTMLElement&&`checked`in e}function vO(e){if(typeof e==`string`){let n=document.querySelector(e);if(!(n instanceof HTMLElement))throw Error(`Element not found or not HTMLElement: ${e}`);return n}return e}function yO(e,n){let r=vO(e);if(!_O(r))throw Error(`Target element is not a checkbox-like element`);let i=[];for(let e of n){let n=vO(e);_O(n)&&i.push(n)}let a=()=>{if(i.length===0){r.checked=!1,r.indeterminate=!1;return}let e=0,n=0;for(let r of i)r.checked?e++:n++;e>0&&n>0?(r.checked=!1,r.indeterminate=!0):e===i.length?(r.checked=!0,r.indeterminate=!1):(r.checked=!1,r.indeterminate=!1)},o=()=>{a()};for(let e of i)e.addEventListener(`change`,o);return a(),()=>{for(let e of i)e.removeEventListener(`change`,o)}}function bO(e,n,r,i){return i===`linear`?(e-n)/(r-n):Math.log(e/n)/Math.log(r/n)}function xO(e,n,r,i){return i===`linear`?n+e*(r-n):n*(r/n)**e}function SO(e,n,r,i){if(!i||i<=1)return e;let a=(r-n)/i;return Math.round((e-n)/a)*a+n}let $=class extends Oy(n){constructor(...e){super(...e),this.xMin=1,this.xMax=100,this.x=50,this.yMin=1,this.yMax=100,this.y=50,this.xScale=`linear`,this.yScale=`linear`,this.xLabel=`X`,this.yLabel=`Y`,this.showCrosshairs=!1,this.showGrid=!1,this.hideCursor=!1,this.disabled=!1,this._dragging=!1,this._dragStartX=0,this._dragStartY=0,this._pressedKeys=new Set,this._onKeyDown=e=>{if(!this.disabled){if([`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`].includes(e.key))e.preventDefault(),this._pressedKeys.add(e.key),this._handleKeyboardMove(e.shiftKey);else if(e.key===`Home`||e.key===`End`){e.preventDefault();let n=e.key===`Home`?this.xMin:this.xMax,r=e.key===`Home`?this.yMin:this.yMax;(n!==this.x||r!==this.y)&&(this.x=n,this.y=r,this.dispatchEvent(new CustomEvent(`input`,{detail:{x:this.x,y:this.y},bubbles:!0,composed:!0})))}}},this._onKeyUp=e=>{this._pressedKeys.delete(e.key)},this._handleKeyboardMove=e=>{let n=this.xMax-this.xMin,r=this.yMax-this.yMin,i=this.stopsX??this.stops,a=this.stopsY??this.stops,o=Dy(n,i,this.stepX,e),s=Dy(r,a,this.stepY,e),c=this.x,l=this.y;if(this._pressedKeys.has(`ArrowLeft`)&&(c=Math.max(this.xMin,this.x-o)),this._pressedKeys.has(`ArrowRight`)&&(c=Math.min(this.xMax,this.x+o)),this._pressedKeys.has(`ArrowUp`)&&(l=Math.min(this.yMax,this.y+s)),this._pressedKeys.has(`ArrowDown`)&&(l=Math.max(this.yMin,this.y-s)),c!==this.x||l!==this.y){let e=this.xSnapStep&&this.xSnapStep>0?Math.round(c/this.xSnapStep)*this.xSnapStep:c,n=this.ySnapStep&&this.ySnapStep>0?Math.round(l/this.ySnapStep)*this.ySnapStep:l;e=SO(e,this.xMin,this.xMax,i),n=SO(n,this.yMin,this.yMax,a),this.x=e,this.y=n,this.dispatchEvent(new CustomEvent(`input`,{detail:{x:this.x,y:this.y},bubbles:!0,composed:!0}))}},this._onPointerDown=e=>{e.preventDefault();let n=this.renderRoot.querySelector(`.xy-pad-area`);n?.focus(),n&&n.setPointerCapture(e.pointerId),this._dragging=!0,this._dragStartX=this.x,this._dragStartY=this.y,this.setAttribute(`dragging`,``),this._updateFromPointer(e),globalThis.addEventListener(`pointermove`,this._onPointerMove),globalThis.addEventListener(`pointerup`,this._onPointerUp)},this._onPointerMove=e=>{this._dragging&&(e.preventDefault(),this._updateFromPointer(e))},this._onPointerUp=()=>{let e=this.x!==this._dragStartX||this.y!==this._dragStartY;this._dragging=!1,this.removeAttribute(`dragging`),globalThis.removeEventListener(`pointermove`,this._onPointerMove),globalThis.removeEventListener(`pointerup`,this._onPointerUp),e&&this.dispatchEvent(new CustomEvent(`change`,{detail:{x:this.x,y:this.y},bubbles:!0,composed:!0}))}}static{this.styles=[w,sn,r`
12971
+ `]}};E([d({type:String})],vO.prototype,`layout`,void 0),E([d({type:String})],vO.prototype,`sizeA`,void 0),E([d({type:String})],vO.prototype,`sizeB`,void 0),E([d({type:Boolean})],vO.prototype,`fixedA`,void 0),E([d({type:Boolean})],vO.prototype,`fixedB`,void 0),E([d({type:Boolean})],vO.prototype,`collapsible`,void 0),E([d({type:Boolean,reflect:!0})],vO.prototype,`collapsedA`,void 0),E([d({type:Boolean,reflect:!0})],vO.prototype,`collapsedB`,void 0),E([d({type:String})],vO.prototype,`minSizeA`,void 0),E([d({type:String})],vO.prototype,`maxSizeA`,void 0),E([d({type:String})],vO.prototype,`minSizeB`,void 0),E([d({type:String})],vO.prototype,`maxSizeB`,void 0),E([m()],vO.prototype,`_hasCorner`,void 0),vO=E([T(`ixfx-twosplit-layout`)],vO);function yO(e){return e instanceof HTMLElement&&`checked`in e}function bO(e){if(typeof e==`string`){let n=document.querySelector(e);if(!(n instanceof HTMLElement))throw Error(`Element not found or not HTMLElement: ${e}`);return n}return e}function xO(e,n){let r=bO(e);if(!yO(r))throw Error(`Target element is not a checkbox-like element`);let i=[];for(let e of n){let n=bO(e);yO(n)&&i.push(n)}let a=()=>{if(i.length===0){r.checked=!1,r.indeterminate=!1;return}let e=0,n=0;for(let r of i)r.checked?e++:n++;e>0&&n>0?(r.checked=!1,r.indeterminate=!0):e===i.length?(r.checked=!0,r.indeterminate=!1):(r.checked=!1,r.indeterminate=!1)},o=()=>{a()};for(let e of i)e.addEventListener(`change`,o);return a(),()=>{for(let e of i)e.removeEventListener(`change`,o)}}function SO(e,n,r,i){return i===`linear`?(e-n)/(r-n):Math.log(e/n)/Math.log(r/n)}function CO(e,n,r,i){return i===`linear`?n+e*(r-n):n*(r/n)**e}function wO(e,n,r,i){if(!i||i<=1)return e;let a=(r-n)/i;return Math.round((e-n)/a)*a+n}let $=class extends Oy(n){constructor(...e){super(...e),this.xMin=1,this.xMax=100,this.x=50,this.yMin=1,this.yMax=100,this.y=50,this.xScale=`linear`,this.yScale=`linear`,this.xLabel=`X`,this.yLabel=`Y`,this.showCrosshairs=!1,this.showGrid=!1,this.hideCursor=!1,this.disabled=!1,this._dragging=!1,this._dragStartX=0,this._dragStartY=0,this._pressedKeys=new Set,this._onKeyDown=e=>{if(!this.disabled){if([`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`].includes(e.key))e.preventDefault(),this._pressedKeys.add(e.key),this._handleKeyboardMove(e.shiftKey);else if(e.key===`Home`||e.key===`End`){e.preventDefault();let n=e.key===`Home`?this.xMin:this.xMax,r=e.key===`Home`?this.yMin:this.yMax;(n!==this.x||r!==this.y)&&(this.x=n,this.y=r,this.dispatchEvent(new CustomEvent(`input`,{detail:{x:this.x,y:this.y},bubbles:!0,composed:!0})))}}},this._onKeyUp=e=>{this._pressedKeys.delete(e.key)},this._handleKeyboardMove=e=>{let n=this.xMax-this.xMin,r=this.yMax-this.yMin,i=this.stopsX??this.stops,a=this.stopsY??this.stops,o=Dy(n,i,this.stepX,e),s=Dy(r,a,this.stepY,e),c=this.x,l=this.y;if(this._pressedKeys.has(`ArrowLeft`)&&(c=Math.max(this.xMin,this.x-o)),this._pressedKeys.has(`ArrowRight`)&&(c=Math.min(this.xMax,this.x+o)),this._pressedKeys.has(`ArrowUp`)&&(l=Math.min(this.yMax,this.y+s)),this._pressedKeys.has(`ArrowDown`)&&(l=Math.max(this.yMin,this.y-s)),c!==this.x||l!==this.y){let e=this.xSnapStep&&this.xSnapStep>0?Math.round(c/this.xSnapStep)*this.xSnapStep:c,n=this.ySnapStep&&this.ySnapStep>0?Math.round(l/this.ySnapStep)*this.ySnapStep:l;e=wO(e,this.xMin,this.xMax,i),n=wO(n,this.yMin,this.yMax,a),this.x=e,this.y=n,this.dispatchEvent(new CustomEvent(`input`,{detail:{x:this.x,y:this.y},bubbles:!0,composed:!0}))}},this._onPointerDown=e=>{e.preventDefault();let n=this.renderRoot.querySelector(`.xy-pad-area`);n?.focus(),n&&n.setPointerCapture(e.pointerId),this._dragging=!0,this._dragStartX=this.x,this._dragStartY=this.y,this.setAttribute(`dragging`,``),this._updateFromPointer(e),globalThis.addEventListener(`pointermove`,this._onPointerMove),globalThis.addEventListener(`pointerup`,this._onPointerUp)},this._onPointerMove=e=>{this._dragging&&(e.preventDefault(),this._updateFromPointer(e))},this._onPointerUp=()=>{let e=this.x!==this._dragStartX||this.y!==this._dragStartY;this._dragging=!1,this.removeAttribute(`dragging`),globalThis.removeEventListener(`pointermove`,this._onPointerMove),globalThis.removeEventListener(`pointerup`,this._onPointerUp),e&&this.dispatchEvent(new CustomEvent(`change`,{detail:{x:this.x,y:this.y},bubbles:!0,composed:!0}))}}static{this.styles=[w,sn,r`
12941
12972
  :host {
12942
12973
  display: block;
12943
12974
  width: 200px;
@@ -13051,7 +13082,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
13051
13082
  height:100%;
13052
13083
  text-align:center;
13053
13084
  }
13054
- `]}_stepYByDelta(e,n){let r=this.yMax-this.yMin,i=this.stopsY??this.stops,a=Dy(r,i,this.stepY,n),o=e===1?Math.min(this.yMax,this.y+a):Math.max(this.yMin,this.y-a);if(o===this.y)return;let s=this.ySnapStep&&this.ySnapStep>0?Math.round(o/this.ySnapStep)*this.ySnapStep:o;s=SO(s,this.yMin,this.yMax,i),s!==this.y&&(this.y=s,this.dispatchEvent(new CustomEvent(`input`,{detail:{x:this.x,y:this.y},bubbles:!0,composed:!0})))}_applyWheelDelta(e,n){this._stepYByDelta(e,n.shiftKey)}_updateFromPointer(e){let n=this.renderRoot.querySelector(`.xy-pad-area`);if(!n)return;let r=n.getBoundingClientRect(),i=Math.max(0,Math.min(1,(e.clientX-r.left)/r.width)),a=Math.max(0,Math.min(1,1-(e.clientY-r.top)/r.height)),o=xO(i,this.xMin,this.xMax,this.xScale),s=xO(a,this.yMin,this.yMax,this.yScale),c=this.xSnapStep&&this.xSnapStep>0?Math.round(o/this.xSnapStep)*this.xSnapStep:o,l=this.ySnapStep&&this.ySnapStep>0?Math.round(s/this.ySnapStep)*this.ySnapStep:s,u=this.stopsX??this.stops,d=this.stopsY??this.stops;c=SO(c,this.xMin,this.xMax,u),l=SO(l,this.yMin,this.yMax,d),this.x=c,this.y=l,this.dispatchEvent(new CustomEvent(`input`,{detail:{x:this.x,y:this.y},bubbles:!0,composed:!0}))}_setPctVars(){let e=Math.max(this.xMin,Math.min(this.xMax,this.x)),n=Math.max(this.yMin,Math.min(this.yMax,this.y)),r=bO(e,this.xMin,this.xMax,this.xScale)*100,i=bO(n,this.yMin,this.yMax,this.yScale)*100;this.style.setProperty(`--x-pct`,`${r}`),this.style.setProperty(`--y-pct`,`${i}`);let a=r-50,o=i-50,s=Math.sqrt(a*a+o*o);this.style.setProperty(`--radius-pct`,`${s}`)}getRelativeX(){return bO(Math.max(this.xMin,Math.min(this.xMax,this.x)),this.xMin,this.xMax,this.xScale)}getRelativeY(){return bO(Math.max(this.yMin,Math.min(this.yMax,this.y)),this.yMin,this.yMax,this.yScale)}getPolar(){let e=this.getRelativeX()-.5,n=this.getRelativeY()-.5,r=Math.sqrt(e*e+n*n)*2,i=Math.atan2(n,e);return i<0&&(i+=2*Math.PI),{radius:r,angle:i}}updated(e){super.updated(e),this._setPctVars()}disconnectedCallback(){super.disconnectedCallback(),this._onPointerUp(),this._pressedKeys.clear()}render(){return i`
13085
+ `]}_stepYByDelta(e,n){let r=this.yMax-this.yMin,i=this.stopsY??this.stops,a=Dy(r,i,this.stepY,n),o=e===1?Math.min(this.yMax,this.y+a):Math.max(this.yMin,this.y-a);if(o===this.y)return;let s=this.ySnapStep&&this.ySnapStep>0?Math.round(o/this.ySnapStep)*this.ySnapStep:o;s=wO(s,this.yMin,this.yMax,i),s!==this.y&&(this.y=s,this.dispatchEvent(new CustomEvent(`input`,{detail:{x:this.x,y:this.y},bubbles:!0,composed:!0})))}_applyWheelDelta(e,n){this._stepYByDelta(e,n.shiftKey)}_updateFromPointer(e){let n=this.renderRoot.querySelector(`.xy-pad-area`);if(!n)return;let r=n.getBoundingClientRect(),i=Math.max(0,Math.min(1,(e.clientX-r.left)/r.width)),a=Math.max(0,Math.min(1,1-(e.clientY-r.top)/r.height)),o=CO(i,this.xMin,this.xMax,this.xScale),s=CO(a,this.yMin,this.yMax,this.yScale),c=this.xSnapStep&&this.xSnapStep>0?Math.round(o/this.xSnapStep)*this.xSnapStep:o,l=this.ySnapStep&&this.ySnapStep>0?Math.round(s/this.ySnapStep)*this.ySnapStep:s,u=this.stopsX??this.stops,d=this.stopsY??this.stops;c=wO(c,this.xMin,this.xMax,u),l=wO(l,this.yMin,this.yMax,d),this.x=c,this.y=l,this.dispatchEvent(new CustomEvent(`input`,{detail:{x:this.x,y:this.y},bubbles:!0,composed:!0}))}_setPctVars(){let e=Math.max(this.xMin,Math.min(this.xMax,this.x)),n=Math.max(this.yMin,Math.min(this.yMax,this.y)),r=SO(e,this.xMin,this.xMax,this.xScale)*100,i=SO(n,this.yMin,this.yMax,this.yScale)*100;this.style.setProperty(`--x-pct`,`${r}`),this.style.setProperty(`--y-pct`,`${i}`);let a=r-50,o=i-50,s=Math.sqrt(a*a+o*o);this.style.setProperty(`--radius-pct`,`${s}`)}getRelativeX(){return SO(Math.max(this.xMin,Math.min(this.xMax,this.x)),this.xMin,this.xMax,this.xScale)}getRelativeY(){return SO(Math.max(this.yMin,Math.min(this.yMax,this.y)),this.yMin,this.yMax,this.yScale)}getPolar(){let e=this.getRelativeX()-.5,n=this.getRelativeY()-.5,r=Math.sqrt(e*e+n*n)*2,i=Math.atan2(n,e);return i<0&&(i+=2*Math.PI),{radius:r,angle:i}}updated(e){super.updated(e),this._setPctVars()}disconnectedCallback(){super.disconnectedCallback(),this._onPointerUp(),this._pressedKeys.clear()}render(){return i`
13055
13086
  <div class="xy-pad-area"
13056
13087
  tabindex=${this.disabled?-1:0}
13057
13088
  @pointerdown=${this._onPointerDown}
@@ -13063,4 +13094,4 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
13063
13094
  <div class="xy-pad-label-x">${this.xLabel}</div>
13064
13095
  <div class="xy-pad-label-y">${this.yLabel}</div>
13065
13096
  </div>
13066
- `}};E([d({type:Number})],$.prototype,`xMin`,void 0),E([d({type:Number})],$.prototype,`xMax`,void 0),E([d({type:Number})],$.prototype,`x`,void 0),E([d({type:Number})],$.prototype,`yMin`,void 0),E([d({type:Number})],$.prototype,`yMax`,void 0),E([d({type:Number})],$.prototype,`y`,void 0),E([d({type:String})],$.prototype,`xScale`,void 0),E([d({type:String})],$.prototype,`yScale`,void 0),E([d({type:Number,attribute:`x-snap-step`})],$.prototype,`xSnapStep`,void 0),E([d({type:Number,attribute:`y-snap-step`})],$.prototype,`ySnapStep`,void 0),E([d({type:Number,attribute:`step-x`})],$.prototype,`stepX`,void 0),E([d({type:Number,attribute:`step-y`})],$.prototype,`stepY`,void 0),E([d({type:String})],$.prototype,`xLabel`,void 0),E([d({type:String})],$.prototype,`yLabel`,void 0),E([d({type:Boolean,reflect:!0,attribute:`show-crosshairs`})],$.prototype,`showCrosshairs`,void 0),E([d({type:Boolean,reflect:!0,attribute:`show-grid`})],$.prototype,`showGrid`,void 0),E([d({type:Boolean,reflect:!0,attribute:`hide-cursor`})],$.prototype,`hideCursor`,void 0),E([d({type:Boolean,reflect:!0})],$.prototype,`disabled`,void 0),E([d({type:Number})],$.prototype,`stops`,void 0),E([d({type:Number,attribute:`stops-x`})],$.prototype,`stopsX`,void 0),E([d({type:Number,attribute:`stops-y`})],$.prototype,`stopsY`,void 0),$=E([T(`ixfx-xy-pad`)],$);function CO(){console.log(`Init`)}export{Oe as AcTextElement,Kt as AcTokenElement,$t as BottomDrawerElement,ln as ButtonElement,ar as Checkbox,_r as CheckedSelect,R as ColourPicker,ug as ColourPickerPopup,z as CrumbNavigationElement,Mg as CrumbPathController,B as CrumbPathElement,vS as DEFAULT_SIBLING_SPACING,Ae as DataController,Pg as DataDisplayComponent,V as DataGridElement,l_ as DataTableElement,H as DetailListElement,dy as DockHostElement,ly as DockPanelElement,dn as EMPTY_GROUP_LABEL,wy as EditableLabel,ky as EditableNumber,G as FlatListElement,Uy as FormElement,Ry as FormGroupElement,By as FormPartElement,K as GridListElement,cb as GroupedItemListerElement,J as HyperbolicTreeListElement,tn as ICON_CARET_RIGHT,nn as ICON_CHECK,en as ICON_CHEVRON_DOWN,rn as ICON_CLOSE,vC as IcicleTreeListElement,Dt as IncrSearchMillerController,Dt as IncrSearchTreeController,gx as IxfxHexEditorElement,we as IxfxIconElement,Z as IxfxTimelineElement,kt as KeyedElementIndex,Rn as LIST_ITEM_MOTION_MS,Ft as LIST_SEARCH_COMMAND_IDS,Rt as LIST_SEARCH_MODES,IC as LabelledRadialInput,og as LabelledRangeInput,qC as LabelledSliderInput,JC as LedElement,Ln as ListDragSelectController,g_ as ListGroupHeaderElement,Yn as ListNativeDragController,Bt as ListSearchController,Zn as ListSelectionController,r_ as Menu,YC as MillerBaseElement,QC as MillerListElement,$C as MillerTreeController,aw as MulticolListElement,Ag as NarrowedTextElement,Sw as NotificationManager,ow as NotificationPillElement,a_ as PanTextElement,ob as PanelElement,Dw as PanelGroupElement,UT as PlotDataSeries,X as PlotHistogram,uE as PlotMultiAxis,xE as PlotSingleAxis,SE as PlotXyAxis,ME as PolarPad,FC as RadialInputElement,un as RadioGroup,BE as RangeElement,FE as RangeInput,zE as RangeMultiElement,VE as RatingElement,HE as SelectHorizElement,GE as ShapefillValueElement,KC as SliderInputElement,XE as SlidingNumberElement,QE as SnackbarElement,$E as SnapContainer,ir as SplitButton,ny as SplitLayoutElement,ty as SplitPanelElement,eD as SwipeElement,nD as TabController,ry as TabListElement,cy as TabListItemElement,tD as TabPanelElement,rD as TabPanelsElement,iD as TextShimmerElement,ie as TickledController,aD as TimelineController,jD as TimelineTrackTabElement,Xt as TitlebarElement,aO as ToolbarElement,eO as ToolbarGroupElement,JT as TooltipElement,oO as TransitoryLabelElement,q as TreeBaseElement,sO as TreeController,Dg as TreeDataModel,yb as TreeDropController,Qn as TreeKeyboardNavController,zb as TreeListElement,Q as TreemapListElement,gO as TwoSplitLayoutElement,W as VerticalListElement,$ as XyPad,uv as addPanelToStack,Gn as animateListItemIn,Jn as animateListItemOut,HT as applyAgeModification,C as applyHighlights,Rx as applyIsometry,qv as applySnapshot,bg as applyTreeDrop,ED as attachTimelineInteractions,Zt as bottomDrawerCommandId,ne as buildHighlightTargets,Iv as buildModel,bn as captionForEntry,kx as clampToDisk,te as clearHighlights,sv as collectContainerNames,dg as collectDataResult,iv as collectPanelIds,cv as collectStackPaths,zx as composeIsometry,bS as computeCanonicalPositions,VT as computeColour,TS as computeHyperbolicLayout,_C as computeIcicleLayout,bv as computeLeafGeoms,hO as computeTreemapLayout,Ct as createAcCompletionProvider,Ot as createDataListSearchAdapter,Fn as createDefaultListDragPreview,Pt as createElementIncrSearch,jt as createElementListSearchAdapter,J_ as createEmptyLayout,q_ as createEmptyStack,St as createFuzzySearch,Tt as createIncrSearch,dw as createPillRenderer,X_ as createSplit,Y_ as createStack,Bb as createTreeListAdapter,Ut as createTreeListSearchAdapter,Vb as createVerticalListAdapter,Wx as decomposeViewIsometry,fn as defaultGroupLabel,Uv as distribute,xg as dropTargetFor,Nx as euclideanRadiusForHyperbolicDistance,gv as extractStack,dS as findHyperbolicIdOf,fS as findHyperbolicKeyPath,pS as findHyperbolicNode,mS as findHyperbolicPath,uS as findHyperbolicPathById,hC as findIcicleNode,gC as findIciclePath,ev as findNode,Qv as findPanelNode,tv as findParentOf,nv as findStackOf,av as findStackPathByName,lO as findTreemapNode,uO as findTreemapPath,Ix as geodesicInterpolate,Kx as geodesicPath,Gx as geodesicSegment,G_ as getActiveDragPanelId,ve as getIcon,ye as getIconEntry,Se as getIconFont,Sv as getLeafNeighbours,be as hasIcon,cS as hyperbolicBranchId,oS as hyperbolicChildIds,Px as hyperbolicDistanceForEuclideanRadius,sS as hyperbolicIdDepth,CS as hyperbolicRelativeFrame,he as iconBus,Lx as identityIsometry,CO as init,pv as insertBeside,Bx as invertIsometry,W_ as isDragging,lS as isHyperbolicDescendantId,Xn as isMultiMode,K_ as isSplit,U as isStack,D as keyForElement,Bn as listItemFadeKeyframes,Vt as listSearchStyles,Mx as mobiusAdd,jx as mobiusFromOrigin,Ax as mobiusToOrigin,yO as monitorIndeterminate,Tv as moveLeafNodeToEdge,wv as moveLeafStep,Ox as norm,Hv as normalise,mC as normaliseValue,Z_ as normalize,ww as panelGapIndex,RT as parseColourScaleAttr,Ov as parseLayout,hn as partitionByGroup,Fx as poincareDistance,B_ as pointerOverAnyHost,zn as prefersReducedMotion,Zv as preserveRestoreWeights,yg as pruneDraggedDescendants,LT as readBaseColour,_e as registerFontIcon,ge as registerIcon,Lt as registerListSearchCommands,dv as removePanelFromStack,vD as resolveCssVars,sD as resolveGrid,mn as resolveGroupKey,yv as resolveLeafPath,Wv as resolveTracks,Hx as rotationIsometry,Ev as serializeLayout,fv as setActive,xe as setIconFont,Xv as setPanelRestoreWeight,qn as startListItemOutAnimation,Ce as svgToDataUri,Cv as swapLeaves,oe as tickledItemStyles,ae as tickledStyles,AD as timelineStyles,pn as toGroupKey,Gv as toSnapshot,gn as toggleInSet,nO as toolbarGapIndex,Vx as translationFromOrigin,Ux as viewIsometry,$v as walk,mv as wrapRoot};
13097
+ `}};E([d({type:Number})],$.prototype,`xMin`,void 0),E([d({type:Number})],$.prototype,`xMax`,void 0),E([d({type:Number})],$.prototype,`x`,void 0),E([d({type:Number})],$.prototype,`yMin`,void 0),E([d({type:Number})],$.prototype,`yMax`,void 0),E([d({type:Number})],$.prototype,`y`,void 0),E([d({type:String})],$.prototype,`xScale`,void 0),E([d({type:String})],$.prototype,`yScale`,void 0),E([d({type:Number,attribute:`x-snap-step`})],$.prototype,`xSnapStep`,void 0),E([d({type:Number,attribute:`y-snap-step`})],$.prototype,`ySnapStep`,void 0),E([d({type:Number,attribute:`step-x`})],$.prototype,`stepX`,void 0),E([d({type:Number,attribute:`step-y`})],$.prototype,`stepY`,void 0),E([d({type:String})],$.prototype,`xLabel`,void 0),E([d({type:String})],$.prototype,`yLabel`,void 0),E([d({type:Boolean,reflect:!0,attribute:`show-crosshairs`})],$.prototype,`showCrosshairs`,void 0),E([d({type:Boolean,reflect:!0,attribute:`show-grid`})],$.prototype,`showGrid`,void 0),E([d({type:Boolean,reflect:!0,attribute:`hide-cursor`})],$.prototype,`hideCursor`,void 0),E([d({type:Boolean,reflect:!0})],$.prototype,`disabled`,void 0),E([d({type:Number})],$.prototype,`stops`,void 0),E([d({type:Number,attribute:`stops-x`})],$.prototype,`stopsX`,void 0),E([d({type:Number,attribute:`stops-y`})],$.prototype,`stopsY`,void 0),$=E([T(`ixfx-xy-pad`)],$);function TO(){console.log(`Init`)}export{Oe as AcTextElement,Kt as AcTokenElement,$t as BottomDrawerElement,ln as ButtonElement,ar as Checkbox,_r as CheckedSelect,R as ColourPicker,ug as ColourPickerPopup,z as CrumbNavigationElement,Mg as CrumbPathController,B as CrumbPathElement,bS as DEFAULT_SIBLING_SPACING,Ae as DataController,Pg as DataDisplayComponent,V as DataGridElement,l_ as DataTableElement,H as DetailListElement,dy as DockHostElement,ly as DockPanelElement,dn as EMPTY_GROUP_LABEL,wy as EditableLabel,ky as EditableNumber,G as FlatListElement,Uy as FormElement,Ry as FormGroupElement,By as FormPartElement,K as GridListElement,cb as GroupedItemListerElement,J as HyperbolicTreeListElement,tn as ICON_CARET_RIGHT,nn as ICON_CHECK,en as ICON_CHEVRON_DOWN,rn as ICON_CLOSE,bC as IcicleTreeListElement,Dt as IncrSearchMillerController,Dt as IncrSearchTreeController,gx as IxfxHexEditorElement,we as IxfxIconElement,Z as IxfxTimelineElement,kt as KeyedElementIndex,Rn as LIST_ITEM_MOTION_MS,Ft as LIST_SEARCH_COMMAND_IDS,Rt as LIST_SEARCH_MODES,RC as LabelledRadialInput,og as LabelledRangeInput,YC as LabelledSliderInput,XC as LedElement,Ln as ListDragSelectController,g_ as ListGroupHeaderElement,Yn as ListNativeDragController,Bt as ListSearchController,Zn as ListSelectionController,r_ as Menu,ZC as MillerBaseElement,ew as MillerListElement,tw as MillerTreeController,sw as MulticolListElement,Ag as NarrowedTextElement,ww as NotificationManager,cw as NotificationPillElement,a_ as PanTextElement,ob as PanelElement,kw as PanelGroupElement,GT as PlotDataSeries,X as PlotHistogram,fE as PlotMultiAxis,CE as PlotSingleAxis,wE as PlotXyAxis,PE as PolarPad,LC as RadialInputElement,un as RadioGroup,HE as RangeElement,LE as RangeInput,VE as RangeMultiElement,UE as RatingElement,WE as SelectHorizElement,qE as ShapefillValueElement,JC as SliderInputElement,QE as SlidingNumberElement,eD as SnackbarElement,tD as SnapContainer,ir as SplitButton,ny as SplitLayoutElement,ty as SplitPanelElement,nD as SwipeElement,iD as TabController,ry as TabListElement,cy as TabListItemElement,rD as TabPanelElement,aD as TabPanelsElement,oD as TextShimmerElement,ie as TickledController,sD as TimelineController,ND as TimelineTrackTabElement,Xt as TitlebarElement,sO as ToolbarElement,nO as ToolbarGroupElement,XT as TooltipElement,cO as TransitoryLabelElement,q as TreeBaseElement,lO as TreeController,Dg as TreeDataModel,yb as TreeDropController,Qn as TreeKeyboardNavController,zb as TreeListElement,Q as TreemapListElement,vO as TwoSplitLayoutElement,W as VerticalListElement,$ as XyPad,uv as addPanelToStack,Gn as animateListItemIn,Jn as animateListItemOut,WT as applyAgeModification,C as applyHighlights,Bx as applyIsometry,qv as applySnapshot,bg as applyTreeDrop,OD as attachTimelineInteractions,Zt as bottomDrawerCommandId,ne as buildHighlightTargets,Iv as buildModel,bn as captionForEntry,jx as clampToDisk,te as clearHighlights,sv as collectContainerNames,dg as collectDataResult,iv as collectPanelIds,cv as collectStackPaths,Vx as composeIsometry,SS as computeCanonicalPositions,UT as computeColour,DS as computeHyperbolicLayout,yC as computeIcicleLayout,bv as computeLeafGeoms,_O as computeTreemapLayout,Ct as createAcCompletionProvider,Ot as createDataListSearchAdapter,Fn as createDefaultListDragPreview,Pt as createElementIncrSearch,jt as createElementListSearchAdapter,J_ as createEmptyLayout,q_ as createEmptyStack,St as createFuzzySearch,Tt as createIncrSearch,pw as createPillRenderer,X_ as createSplit,Y_ as createStack,Bb as createTreeListAdapter,Ut as createTreeListSearchAdapter,Vb as createVerticalListAdapter,Kx as decomposeViewIsometry,fn as defaultGroupLabel,Uv as distribute,xg as dropTargetFor,Fx as euclideanRadiusForHyperbolicDistance,gv as extractStack,pS as findHyperbolicIdOf,mS as findHyperbolicKeyPath,hS as findHyperbolicNode,gS as findHyperbolicPath,fS as findHyperbolicPathById,_C as findIcicleNode,vC as findIciclePath,ev as findNode,Qv as findPanelNode,tv as findParentOf,nv as findStackOf,av as findStackPathByName,dO as findTreemapNode,fO as findTreemapPath,Rx as geodesicInterpolate,Jx as geodesicPath,qx as geodesicSegment,G_ as getActiveDragPanelId,ve as getIcon,ye as getIconEntry,Se as getIconFont,Sv as getLeafNeighbours,be as hasIcon,uS as hyperbolicBranchId,cS as hyperbolicChildIds,Ix as hyperbolicDistanceForEuclideanRadius,lS as hyperbolicIdDepth,TS as hyperbolicRelativeFrame,he as iconBus,zx as identityIsometry,TO as init,pv as insertBeside,Hx as invertIsometry,W_ as isDragging,dS as isHyperbolicDescendantId,Xn as isMultiMode,K_ as isSplit,U as isStack,D as keyForElement,Bn as listItemFadeKeyframes,Vt as listSearchStyles,Px as mobiusAdd,Nx as mobiusFromOrigin,Mx as mobiusToOrigin,xO as monitorIndeterminate,Tv as moveLeafNodeToEdge,wv as moveLeafStep,Ax as norm,Hv as normalise,gC as normaliseValue,Z_ as normalize,Ew as panelGapIndex,BT as parseColourScaleAttr,Ov as parseLayout,hn as partitionByGroup,Lx as poincareDistance,B_ as pointerOverAnyHost,zn as prefersReducedMotion,Zv as preserveRestoreWeights,yg as pruneDraggedDescendants,zT as readBaseColour,_e as registerFontIcon,ge as registerIcon,Lt as registerListSearchCommands,dv as removePanelFromStack,bD as resolveCssVars,lD as resolveGrid,mn as resolveGroupKey,yv as resolveLeafPath,Wv as resolveTracks,Wx as rotationIsometry,Ev as serializeLayout,fv as setActive,xe as setIconFont,Xv as setPanelRestoreWeight,qn as startListItemOutAnimation,Ce as svgToDataUri,Cv as swapLeaves,oe as tickledItemStyles,ae as tickledStyles,MD as timelineStyles,pn as toGroupKey,Gv as toSnapshot,gn as toggleInSet,iO as toolbarGapIndex,Ux as translationFromOrigin,Gx as viewIsometry,$v as walk,mv as wrapRoot};