@aquera/nile-elements 1.2.7-beta-1.2 → 1.2.7-beta-1.3

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/demo/index.html CHANGED
@@ -112,10 +112,10 @@
112
112
  <section>
113
113
  <h2>size: small vs large</h2>
114
114
  <button id="small-btn">Small tooltip</button>
115
- <nile-light-tooltip for="small-btn" id="small-tooltip" content="This is a small tooltip." size="small" open interactive></nile-light-tooltip>
115
+ <nile-light-tooltip for="small-btn" id="small-tooltip" content="This is a small tooltip." size="small" open interactive></nile-light-tooltip>
116
116
 
117
117
  <button id="large-btn">Large tooltip</button>
118
- <nile-light-tooltip for="large-btn" id="large-tooltip" content="This is a larger tooltip for longer content that wraps nicely." size="large" open></nile-light-tooltip>
118
+ <nile-light-tooltip for="large-btn" id="large-tooltip" content="This is a larger tooltip for longer content that wraps nicely." size="large" open></nile-light-tooltip>
119
119
  </section>
120
120
 
121
121
  <!-- 3️⃣ Distance & Skidding -->
package/demo/nxtgen.css CHANGED
@@ -1262,6 +1262,4 @@
1262
1262
  /* methods */
1263
1263
  --ng-svg-method-stroke: stroke;
1264
1264
  --ng-svg-method-fill: fill;
1265
-
1266
-
1267
1265
  }
@@ -318,7 +318,7 @@
318
318
  --nile-colors-green-400: #A5F3E1;
319
319
  --nile-colors-green-100: #F6FEFC;
320
320
  --nile-colors-dark-900: #000000;
321
- --nile-colors-dark-500: #7F7F7F;
321
+ --nile-colors-dark-500: #636363;
322
322
  --nile-colors-dark-200: #F5F7F7;
323
323
  --nile-colors-dark-100: rgba(0, 0, 0, 0.1);
324
324
  --nile-colors-blue-700: #1978B8;
package/dist/index.js CHANGED
@@ -4646,7 +4646,7 @@ class{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(this.
4646
4646
  * @license
4647
4647
  * Copyright 2021 Google LLC
4648
4648
  * SPDX-License-Identifier: BSD-3-Clause
4649
- */(this._hostElement,e),this._scrollerController=new AM(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach((e=>{e.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(e),this._hostElementRO.observe(e)})),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach((e=>this._childrenRO.observe(e))),this._scrollEventListeners.forEach((e=>e.addEventListener("scroll",this,this._scrollEventListenerOptions)))}disconnected(){this._scrollEventListeners.forEach((e=>e.removeEventListener("scroll",this,this._scrollEventListenerOptions))),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){const e=this._hostElement;if(!this._sizer){let t=e.querySelector("[virtualizer-sizer]");t||(t=document.createElement("div"),t.setAttribute("virtualizer-sizer",""),e.appendChild(t)),Object.assign(t.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),t.textContent="&nbsp;",t.setAttribute("virtualizer-sizer",""),this._sizer=t}return this._sizer}async updateLayoutConfig(e){await this._layoutInitialized;const t=e.type||xM;if("function"==typeof t&&this._layout instanceof t){const t={...e};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(e){let t,i;if("function"==typeof e.type){i=e.type;const M={...e};delete M.type,t=M}else t=e;void 0===i&&(xM=i=(await Promise.resolve().then((function(){return kw}))).FlowLayout),this._layout=new i((e=>this._handleLayoutMessage(e)),t),this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(null!==this._benchmarkStart){const e=window.performance.now(),t=e-this._benchmarkStart,i=performance.getEntriesByName("uv-virtualizing","measure").filter((t=>t.startTime>=this._benchmarkStart&&t.startTime<e)).reduce(((e,t)=>e+t.duration),0);return this._benchmarkStart=null,{timeElapsed:t,virtualizationTime:i}}return null}_measureChildren(){const e={},t=this._children,i=this._measureChildOverride||this._measureChild;for(let M=0;M<t.length;M++){const n=t[M],o=this._first+M;(this._itemsChanged||this._toBeMeasured.has(n))&&(e[o]=i.call(this,n,this._items[o]))}this._childMeasurements=e,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(e){const{width:t,height:i}=e.getBoundingClientRect();return Object.assign({width:t,height:i},function(e){const t=window.getComputedStyle(e);return{marginTop:SM(t.marginTop),marginRight:SM(t.marginRight),marginBottom:SM(t.marginBottom),marginLeft:SM(t.marginLeft)}}(e))}async _schedule(e){this._scheduled.has(e)||(this._scheduled.add(e),await Promise.resolve(),this._scheduled.delete(e),e.call(this))}async _updateDOM(e){this._scrollSize=e.scrollSize,this._adjustRange(e.range),this._childrenPos=e.childPositions,this._scrollError=e.scrollError||null;const{_rangeChanged:t,_itemsChanged:i}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(t||i)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach((e=>this._childrenRO.observe(e))),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(e){console.warn("Error measuring performance data: ",e)}window.performance.mark("uv-start")}!1===this._scrollerController.correctingScrollError&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(e){if("scroll"===e.type)(e.currentTarget===window||this._clippingAncestors.includes(e.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",e)}_handleLayoutMessage(e){"stateChanged"===e.type?this._updateDOM(e):"visibilityChanged"===e.type?(this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._notifyVisibility()):"unpinned"===e.type&&this._hostElement.dispatchEvent(new yM)}get _children(){const e=[];let t=this._hostElement.firstElementChild;for(;t;)t.hasAttribute("virtualizer-sizer")||e.push(t),t=t.nextElementSibling;return e}_updateView(){const e=this._hostElement,t=this._scrollerController?.element,i=this._layout;if(e&&t&&i){let M,n,o,r;const s=e.getBoundingClientRect();M=0,n=0,o=window.innerHeight,r=window.innerWidth;const a=this._clippingAncestors.map((e=>e.getBoundingClientRect()));a.unshift(s);for(const e of a)M=Math.max(M,e.top),n=Math.max(n,e.left),o=Math.min(o,e.bottom),r=Math.min(r,e.right);const N=t.getBoundingClientRect(),l={left:s.left-N.left,top:s.top-N.top},g={width:t.scrollWidth,height:t.scrollHeight},u=M-s.top+e.scrollTop,D=n-s.left+e.scrollLeft,c=Math.max(0,o-M),j=Math.max(0,r-n);i.viewportSize={width:j,height:c},i.viewportScroll={top:u,left:D},i.totalScrollSize=g,i.offsetWithinScroller=l}}_sizeHostElement(e){const t=82e5,i=e&&null!==e.width?Math.min(t,e.width):0,M=e&&null!==e.height?Math.min(t,e.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${i}px, ${M}px)`;else{const e=this._hostElement.style;e.minWidth=i?`${i}px`:"100%",e.minHeight=M?`${M}px`:"100%"}}_positionChildren(e){e&&e.forEach((({top:e,left:t,width:i,height:M,xOffset:n,yOffset:o},r)=>{const s=this._children[r-this._first];s&&(s.style.position="absolute",s.style.boxSizing="border-box",s.style.transform=`translate(${t}px, ${e}px)`,void 0!==i&&(s.style.width=i+"px"),void 0!==M&&(s.style.height=M+"px"),s.style.left=void 0===n?null:n+"px",s.style.top=void 0===o?null:o+"px")}))}async _adjustRange(e){const{_first:t,_last:i,_firstVisible:M,_lastVisible:n}=this;this._first=e.first,this._last=e.last,this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==t||this._last!==i,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==M||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){const{scrollTop:e,scrollLeft:t}=this._scrollerController,{top:i,left:M}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:e-i,left:t-M})}}element(e){return e===1/0&&(e=this._items.length-1),void 0===this._items?.[e]?void 0:{scrollIntoView:(t={})=>this._scrollElementIntoView({...t,index:e})}}_scrollElementIntoView(e){if(e.index>=this._first&&e.index<=this._last)this._children[e.index-this._first].scrollIntoView(e);else if(e.index=Math.min(e.index,this._items.length-1),"smooth"===e.behavior){const t=this._layout.getScrollIntoViewCoordinates(e),{behavior:i}=e;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(t,{behavior:i}),(()=>this._layout.getScrollIntoViewCoordinates(e)),(()=>this._scrollIntoViewTarget=null)),this._scrollIntoViewTarget=e}else this._layout.pin=e}_checkScrollIntoViewTarget(e){const{index:t}=this._scrollIntoViewTarget||{};t&&e?.has(t)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new TM({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new hM({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(((e,t)=>{this._layoutCompleteResolver=e,this._layoutCompleteRejecter=t}))),this._layoutCompletePromise}_rejectLayoutCompletePromise(e){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(e),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame((()=>requestAnimationFrame((()=>this._resolveLayoutCompletePromise())))))}_resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(e){if(this._layout?.measureChildren){for(const t of e)this._toBeMeasured.set(t.target,t.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function SM(e){const t=e?parseFloat(e):NaN;return Number.isNaN(t)?0:t}function EM(e){if(null!==e.assignedSlot)return e.assignedSlot;if(null!==e.parentElement)return e.parentElement;const t=e.parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host||null}const mM=de(class extends IM{constructor(e){if(super(e),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>((e,t)=>P`${t}: ${JSON.stringify(e,null,2)}`)(e,t+this._first),this._keyFunction=(e,t)=>(e=>e)(e,this._first),this._items=[],e.type!==je)throw new Error("The virtualize directive can only be used in child expressions")}render(e){e&&this._setFunctions(e);const t=[];if(this._first>=0&&this._last>=this._first)for(let e=this._first;e<=this._last;e++)t.push(this._items[e]);return dM(t,this._keyFunction,this._renderItem)}update(e,[t]){this._setFunctions(t);const i=this._items!==t.items;return this._items=t.items||[],this._virtualizer?this._updateVirtualizerConfig(e,t):this._initialize(e,t),i?R:this.render()}async _updateVirtualizerConfig(e,t){if(!await this._virtualizer.updateLayoutConfig(t.layout||{})){const i=e.parentNode;this._makeVirtualizer(i,t)}this._virtualizer.items=this._items}_setFunctions(e){const{renderItem:t,keyFunction:i}=e;t&&(this._renderItem=(e,i)=>t(e,i+this._first)),i&&(this._keyFunction=(e,t)=>i(e,t+this._first))}_makeVirtualizer(e,t){this._virtualizer&&this._virtualizer.disconnected();const{layout:i,scroller:M,items:n}=t;this._virtualizer=new pM({hostElement:e,layout:i,scroller:M}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(e,t){const i=e.parentNode;i&&1===i.nodeType&&(i.addEventListener("rangeChanged",(e=>{this._first=e.first,this._last=e.last,this.setValue(this.render())})),this._makeVirtualizer(i,t))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}});class wM{static getVirtualizedContent(e,t,i,M,n,o,r,s,a,N,l){return P`
4649
+ */(this._hostElement,e),this._scrollerController=new AM(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach((e=>{e.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(e),this._hostElementRO.observe(e)})),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach((e=>this._childrenRO.observe(e))),this._scrollEventListeners.forEach((e=>e.addEventListener("scroll",this,this._scrollEventListenerOptions)))}disconnected(){this._scrollEventListeners.forEach((e=>e.removeEventListener("scroll",this,this._scrollEventListenerOptions))),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){const e=this._hostElement;if(!this._sizer){let t=e.querySelector("[virtualizer-sizer]");t||(t=document.createElement("div"),t.setAttribute("virtualizer-sizer",""),e.appendChild(t)),Object.assign(t.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),t.textContent="&nbsp;",t.setAttribute("virtualizer-sizer",""),this._sizer=t}return this._sizer}async updateLayoutConfig(e){await this._layoutInitialized;const t=e.type||xM;if("function"==typeof t&&this._layout instanceof t){const t={...e};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(e){let t,i;if("function"==typeof e.type){i=e.type;const M={...e};delete M.type,t=M}else t=e;void 0===i&&(xM=i=(await Promise.resolve().then((function(){return Cw}))).FlowLayout),this._layout=new i((e=>this._handleLayoutMessage(e)),t),this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(null!==this._benchmarkStart){const e=window.performance.now(),t=e-this._benchmarkStart,i=performance.getEntriesByName("uv-virtualizing","measure").filter((t=>t.startTime>=this._benchmarkStart&&t.startTime<e)).reduce(((e,t)=>e+t.duration),0);return this._benchmarkStart=null,{timeElapsed:t,virtualizationTime:i}}return null}_measureChildren(){const e={},t=this._children,i=this._measureChildOverride||this._measureChild;for(let M=0;M<t.length;M++){const n=t[M],o=this._first+M;(this._itemsChanged||this._toBeMeasured.has(n))&&(e[o]=i.call(this,n,this._items[o]))}this._childMeasurements=e,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(e){const{width:t,height:i}=e.getBoundingClientRect();return Object.assign({width:t,height:i},function(e){const t=window.getComputedStyle(e);return{marginTop:SM(t.marginTop),marginRight:SM(t.marginRight),marginBottom:SM(t.marginBottom),marginLeft:SM(t.marginLeft)}}(e))}async _schedule(e){this._scheduled.has(e)||(this._scheduled.add(e),await Promise.resolve(),this._scheduled.delete(e),e.call(this))}async _updateDOM(e){this._scrollSize=e.scrollSize,this._adjustRange(e.range),this._childrenPos=e.childPositions,this._scrollError=e.scrollError||null;const{_rangeChanged:t,_itemsChanged:i}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(t||i)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach((e=>this._childrenRO.observe(e))),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(e){console.warn("Error measuring performance data: ",e)}window.performance.mark("uv-start")}!1===this._scrollerController.correctingScrollError&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(e){if("scroll"===e.type)(e.currentTarget===window||this._clippingAncestors.includes(e.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",e)}_handleLayoutMessage(e){"stateChanged"===e.type?this._updateDOM(e):"visibilityChanged"===e.type?(this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._notifyVisibility()):"unpinned"===e.type&&this._hostElement.dispatchEvent(new yM)}get _children(){const e=[];let t=this._hostElement.firstElementChild;for(;t;)t.hasAttribute("virtualizer-sizer")||e.push(t),t=t.nextElementSibling;return e}_updateView(){const e=this._hostElement,t=this._scrollerController?.element,i=this._layout;if(e&&t&&i){let M,n,o,r;const s=e.getBoundingClientRect();M=0,n=0,o=window.innerHeight,r=window.innerWidth;const a=this._clippingAncestors.map((e=>e.getBoundingClientRect()));a.unshift(s);for(const e of a)M=Math.max(M,e.top),n=Math.max(n,e.left),o=Math.min(o,e.bottom),r=Math.min(r,e.right);const N=t.getBoundingClientRect(),l={left:s.left-N.left,top:s.top-N.top},g={width:t.scrollWidth,height:t.scrollHeight},u=M-s.top+e.scrollTop,D=n-s.left+e.scrollLeft,c=Math.max(0,o-M),j=Math.max(0,r-n);i.viewportSize={width:j,height:c},i.viewportScroll={top:u,left:D},i.totalScrollSize=g,i.offsetWithinScroller=l}}_sizeHostElement(e){const t=82e5,i=e&&null!==e.width?Math.min(t,e.width):0,M=e&&null!==e.height?Math.min(t,e.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${i}px, ${M}px)`;else{const e=this._hostElement.style;e.minWidth=i?`${i}px`:"100%",e.minHeight=M?`${M}px`:"100%"}}_positionChildren(e){e&&e.forEach((({top:e,left:t,width:i,height:M,xOffset:n,yOffset:o},r)=>{const s=this._children[r-this._first];s&&(s.style.position="absolute",s.style.boxSizing="border-box",s.style.transform=`translate(${t}px, ${e}px)`,void 0!==i&&(s.style.width=i+"px"),void 0!==M&&(s.style.height=M+"px"),s.style.left=void 0===n?null:n+"px",s.style.top=void 0===o?null:o+"px")}))}async _adjustRange(e){const{_first:t,_last:i,_firstVisible:M,_lastVisible:n}=this;this._first=e.first,this._last=e.last,this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==t||this._last!==i,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==M||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){const{scrollTop:e,scrollLeft:t}=this._scrollerController,{top:i,left:M}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:e-i,left:t-M})}}element(e){return e===1/0&&(e=this._items.length-1),void 0===this._items?.[e]?void 0:{scrollIntoView:(t={})=>this._scrollElementIntoView({...t,index:e})}}_scrollElementIntoView(e){if(e.index>=this._first&&e.index<=this._last)this._children[e.index-this._first].scrollIntoView(e);else if(e.index=Math.min(e.index,this._items.length-1),"smooth"===e.behavior){const t=this._layout.getScrollIntoViewCoordinates(e),{behavior:i}=e;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(t,{behavior:i}),(()=>this._layout.getScrollIntoViewCoordinates(e)),(()=>this._scrollIntoViewTarget=null)),this._scrollIntoViewTarget=e}else this._layout.pin=e}_checkScrollIntoViewTarget(e){const{index:t}=this._scrollIntoViewTarget||{};t&&e?.has(t)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new TM({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new hM({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(((e,t)=>{this._layoutCompleteResolver=e,this._layoutCompleteRejecter=t}))),this._layoutCompletePromise}_rejectLayoutCompletePromise(e){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(e),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame((()=>requestAnimationFrame((()=>this._resolveLayoutCompletePromise())))))}_resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(e){if(this._layout?.measureChildren){for(const t of e)this._toBeMeasured.set(t.target,t.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function SM(e){const t=e?parseFloat(e):NaN;return Number.isNaN(t)?0:t}function EM(e){if(null!==e.assignedSlot)return e.assignedSlot;if(null!==e.parentElement)return e.parentElement;const t=e.parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host||null}const mM=de(class extends IM{constructor(e){if(super(e),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>((e,t)=>P`${t}: ${JSON.stringify(e,null,2)}`)(e,t+this._first),this._keyFunction=(e,t)=>(e=>e)(e,this._first),this._items=[],e.type!==je)throw new Error("The virtualize directive can only be used in child expressions")}render(e){e&&this._setFunctions(e);const t=[];if(this._first>=0&&this._last>=this._first)for(let e=this._first;e<=this._last;e++)t.push(this._items[e]);return dM(t,this._keyFunction,this._renderItem)}update(e,[t]){this._setFunctions(t);const i=this._items!==t.items;return this._items=t.items||[],this._virtualizer?this._updateVirtualizerConfig(e,t):this._initialize(e,t),i?R:this.render()}async _updateVirtualizerConfig(e,t){if(!await this._virtualizer.updateLayoutConfig(t.layout||{})){const i=e.parentNode;this._makeVirtualizer(i,t)}this._virtualizer.items=this._items}_setFunctions(e){const{renderItem:t,keyFunction:i}=e;t&&(this._renderItem=(e,i)=>t(e,i+this._first)),i&&(this._keyFunction=(e,t)=>i(e,t+this._first))}_makeVirtualizer(e,t){this._virtualizer&&this._virtualizer.disconnected();const{layout:i,scroller:M,items:n}=t;this._virtualizer=new pM({hostElement:e,layout:i,scroller:M}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(e,t){const i=e.parentNode;i&&1===i.nodeType&&(i.addEventListener("rangeChanged",(e=>{this._first=e.first,this._last=e.last,this.setValue(this.render())})),this._makeVirtualizer(i,t))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}});class wM{static getVirtualizedContent(e,t,i,M,n,o,r,s,a,N,l){return P`
4650
4650
  <div part="select-options" class="select__options ${t?"select__options__search-enabled":""} ${N?"loading":""}">
4651
4651
  ${s&&!N?P`
4652
4652
  <div part="select-no-results" class="select__no-results">
@@ -14122,7 +14122,7 @@ nile-rte-toolbar-item nile-button[data-active]::part(base):hover {
14122
14122
 
14123
14123
 
14124
14124
 
14125
- `,pS={bold:"format_bold",italic:"format_italic",underline:"format_underline",link:"link_2",left:"format_align_left",center:"format_align_middle",right:"format_align_right",justify:"format_align_justify",ul:"format_list_bulleted",ol:"format_list_numbered",clear:"format_clear"};let SS=class extends oe{constructor(){super(...arguments),this.value="",this.noStyles=!1,this.singleLineEditor=!1,this.mentions={},this.content="",this.previewEl=null,this.toolbarEl=null,this.lastRange=null,this.buttonMap=new Map,this.headingSelect=null,this.fontSelect=null,this.colorInput=null,this.bgColorInput=null,this.colorSwatchEl=null,this.bgSwatchEl=null,this.containerEl=null,this.mentionsEl=null,this.onEditorKeydown=e=>{if(this.singleLineEditor&&"Enter"===e.key&&e.shiftKey)return void e.preventDefault();if(e.ctrlKey&&"i"===e.key.toLowerCase()&&(e.preventDefault(),zS(this.editorEl,"em"),this.updateContent(),this.updateToolbarState()),this.singleLineEditor&&"Enter"===e.key)return void e.preventDefault();if("Tab"!==e.key)return;e.preventDefault(),this.focusAndRestore();const t=window.getSelection();if(!t||0===t.rangeCount)return;const i=t.getRangeAt(0);if(e.shiftKey){if(i.collapsed&&i.startContainer.nodeType===Node.TEXT_NODE){const e=i.startContainer,M=i.startOffset,n=e.data.slice(0,M),o=n.replace(/(\t|[ \u00a0]{2})$/,"");if(o.length!==n.length){e.data=o+e.data.slice(M);const i=document.createRange();i.setStart(e,o.length),i.collapse(!0),t.removeAllRanges(),t.addRange(i),this.updateContent(),this.updateToolbarState()}}return}i.deleteContents();const M=document.createTextNode("\t");i.insertNode(M);const n=document.createRange();n.setStartAfter(M),n.collapse(!0),t.removeAllRanges(),t.addRange(n),this.updateContent(),this.updateToolbarState()},this.onSelectionChange=()=>{if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);this.editorEl.contains(t.commonAncestorContainer)&&(this.lastRange=t.cloneRange(),this.updateToolbarState())}}createRenderRoot(){return this}injectCss(e){if(this.querySelector("style[data-rte-style]"))return;const t=document.createElement("style");t.setAttribute("data-rte-style","true"),t.textContent=e,this.insertBefore(t,this.firstChild)}connectedCallback(){super.connectedCallback(),this.injectCss(xS.cssText),this.ensureStructure(),this.value&&!this.editorEl.innerHTML.trim()&&(this.editorEl.innerHTML=this.value),this.content=this.editorEl.innerHTML,this.toolbarEl&&this.wireAuthoredToolbar(this.toolbarEl),this.mentionsEl=this.querySelector("nile-rte-mentions"),this.mentionsEl&&(this.mentionsEl.attach?.(this.editorEl,this),this.mentionsEl.setExternalConfig?.(this.mentions)),this.wireEditor(),document.addEventListener("selectionchange",this.onSelectionChange,{passive:!0}),this.updateToolbarState(),this.syncPreview()}ensureStructure(){this.toolbarEl=this.querySelector("nile-rte-toolbar"),this.previewEl=this.querySelector("nile-rte-preview"),this.containerEl=this.querySelector(".rte-container"),this.containerEl||(this.containerEl=document.createElement("div"),this.containerEl.className="rte-container",this.appendChild(this.containerEl)),this.ensureEditor(),this.toolbarEl&&this.toolbarEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.toolbarEl),this.editorEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.editorEl),this.previewEl&&(this.previewEl.parentElement!==this&&this.appendChild(this.previewEl),this.previewEl.previousElementSibling!==this.containerEl&&this.insertBefore(this.previewEl,this.containerEl.nextSibling))}updateContentWithMention(e){this.updateContent(),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content,mention:e},bubbles:!0,composed:!0}))}disconnectedCallback(){document.removeEventListener("selectionchange",this.onSelectionChange),this.mentionsEl&&this.mentionsEl.detach&&this.mentionsEl.detach(),super.disconnectedCallback()}updated(e){e.has("value")&&this.editorEl&&this.value!==this.editorEl.innerHTML&&(this.editorEl.innerHTML=this.value||"<p><br></p>",this.content=this.editorEl.innerHTML,this.syncPreview()),e.has("singleLineEditor")&&(this.editorEl&&this.editorEl.classList.toggle("single-line",this.singleLineEditor),this.previewEl&&this.previewEl.classList.toggle("single-line",this.singleLineEditor))}ensureEditor(){if(this.editorEl=this.querySelector(".editor"),!this.editorEl){const e=document.createElement("article");e.className="editor",e.setAttribute("contenteditable","true"),this.editorEl=e}this.editorEl.innerHTML.trim()||(this.editorEl.innerHTML="<p><br></p>")}unwrapMention(e,t=!0){const i=e.parentNode;if(!i)return;const M=t?(e.textContent??"").replace(/\u200B/g,""):"",n=document.createTextNode(M);i.insertBefore(n,e),i.removeChild(e);const o=document.createRange();o.setStartAfter(n),o.collapse(!0);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(o)}scrubBrokenMentions(){if(!this.editorEl)return;this.editorEl.querySelectorAll("span.mention").forEach((e=>{const t=e,i=t.getAttribute("data-mention-key"),M=t.getAttribute("data-mention-label"),n=t.getAttribute("data-mention-trigger")||"",o=(t.textContent??"").replace(/\u200B/g,"").trim(),r=!!i&&!!M&&o.length>0&&o.startsWith(n)&&o.includes(M);o&&r||this.unwrapMention(t,!0)}))}wireEditor(){this.editorEl.addEventListener("input",(()=>{this.ensureAtLeastOneParagraph(),this.scrubBrokenMentions(),this.updateContent(),this.updateToolbarState()})),this.editorEl.addEventListener("mouseup",(()=>{this.saveSelection(),this.updateToolbarState()})),this.editorEl.addEventListener("keyup",(e=>{this.saveSelection(),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)&&this.updateToolbarState()})),this.editorEl.addEventListener("keydown",this.onEditorKeydown)}wireAuthoredToolbar(e){this.buttonMap.clear(),this.headingSelect=null,this.fontSelect=null,this.colorInput=null,Array.from(e.children).forEach((e=>{const t=e.tagName.toLowerCase();if("nile-rte-select"!==t||"align"!==e.getAttribute("type")){if("nile-rte-link"===t)return e.editorEl=this.editorEl,void e.addEventListener("link-changed",(()=>{this.updateContent(),this.updateToolbarState()}));if("nile-rte-toolbar-item"===t){let t=e.querySelector(":scope > nile-button");const i=e.getAttribute("name")||"",M=e.getAttribute("label")||i,n=e.getAttribute("icon"),o=e.innerHTML.trim().length>0;if(t||(t=document.createElement("nile-button"),t.variant="tertiary",t.size="small"),n)t.innerHTML=`<nile-icon name="${n}" aria-label="${M}"></nile-icon>`,e.innerHTML="";else if(o)t.innerHTML=e.innerHTML,e.innerHTML="";else{const n=pS[i];n?t.innerHTML=`<nile-icon name="${n}" size="20" color="black" aria-label="${M}"></nile-icon>`:t.textContent=M||i,e.innerHTML=""}if(!t.isConnected){const i=document.createElement("nile-tooltip");i.setAttribute("content",M),i.appendChild(t),e.appendChild(i)}t.setAttribute("aria-label",M),t.addEventListener("mousedown",(e=>e.preventDefault())),t.addEventListener("click",(()=>this.onToolbarCommand(i)));const r=this.buttonMap.get(i)??[];return r.push(t),void this.buttonMap.set(i,r)}if("nile-rte-select"!==t)"nile-rte-color"!==t||e.addEventListener("change",(e=>{this.focusAndRestore();const{mode:t,value:i}=e.detail;"backColor"===t?yS(this.editorEl,"backgroundColor",i,"data-rte-bg"):function(e,t){yS(e,"color",t,"data-rte-color")}(this.editorEl,i),this.updateContent(),this.updateToolbarState()}));else{const t=e.getAttribute("type")||"";e.addEventListener("change",(e=>{this.focusAndRestore();const i=e.detail;"heading"===t?function(e,t){const i=document.getSelection();if(!i||0===i.rangeCount)return;const M=jS(i.getRangeAt(0).startContainer,e);if(!M)return;if(M.tagName.toLowerCase()===t)return;const n=document.createElement(t);for(;M.firstChild;)n.appendChild(M.firstChild);M.replaceWith(n);const o=document.createRange();o.selectNodeContents(n),o.collapse(!0),i.removeAllRanges(),i.addRange(o)}(this.editorEl,i):"font"===t&&TS(this.editorEl,i),this.updateContent(),this.updateToolbarState()}))}}else e.addEventListener("change",(e=>{this.focusAndRestore();const t=e.detail;IS(this.editorEl,t),this.updateContent(),this.updateToolbarState()}))}))}saveSelection(){const e=window.getSelection();e&&e.rangeCount&&(this.lastRange=e.getRangeAt(0).cloneRange())}restoreSelection(){if(!this.lastRange)return;const e=document.getSelection();e&&(e.removeAllRanges(),e.addRange(this.lastRange))}focusAndRestore(){this.editorEl?.focus(),this.restoreSelection()}getCleanContent(){const e=this.editorEl.cloneNode(!0);return e.querySelectorAll("*").forEach((e=>{e.removeAttribute("style")})),e.innerHTML}insertList(e){if(this.restoreSelection(),!this.lastRange)return;const t=document.createElement(e),i=this.lastRange.extractContents(),M=document.createElement("div");M.appendChild(i),Array.from(M.childNodes).forEach((e=>{if(e.nodeType===Node.TEXT_NODE&&!e.textContent?.trim())return;const i=document.createElement("li");i.appendChild(e),t.appendChild(i)})),this.lastRange.insertNode(t),this.afterListEdit(t)}afterListEdit(e){const t=document.createRange();t.setStartAfter(e),t.collapse(!0);const i=window.getSelection();i?.removeAllRanges(),i?.addRange(t),this.saveSelection(),this.updateContent(),this.updateToolbarState()}ensureAtLeastOneParagraph(){const e=this.editorEl;if(!e)return;const t=""===(e.textContent??"").replace(/\u200B/g,"").trim();if(0===e.childNodes.length||t)return void(e.innerHTML="<p><br></p>");if(!e.querySelector("p,h1,h2,h3,h4,h5,h6,ul,ol,table,blockquote,pre")){const t=document.createElement("p");for(;e.firstChild;)t.appendChild(e.firstChild);return t.hasChildNodes()||t.appendChild(document.createElement("br")),void e.appendChild(t)}e.querySelectorAll("p").forEach((e=>{""===(e.textContent??"").replace(/\u200B/g,"")&&(e.innerHTML.toLowerCase().includes("<br")||(e.innerHTML="<br>"))}))}onToolbarCommand(e){switch(this.focusAndRestore(),e){case"bold":zS(this.editorEl,"strong");break;case"italic":zS(this.editorEl,"em");break;case"underline":zS(this.editorEl,"u");break;case"left":IS(this.editorEl,"left");break;case"center":IS(this.editorEl,"center");break;case"right":IS(this.editorEl,"right");break;case"justify":IS(this.editorEl,"justify");break;case"ul":LS(this.editorEl,"ul"),this.updateContent(),this.updateToolbarState();break;case"ol":LS(this.editorEl,"ol"),this.updateContent(),this.updateToolbarState();break;case"link":break;case"clear":const e=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),t=[];for(;e.nextNode();){const i=e.currentNode;i.removeAttribute("style"),["B","STRONG","I","EM","U","SPAN","FONT"].includes(i.tagName)&&t.push(i)}for(const e of t){for(;e.firstChild;)e.parentNode?.insertBefore(e.firstChild,e);e.remove()}this.ensureAtLeastOneParagraph()}this.updateContent(),this.updateToolbarState()}setBtnActive(e,t){const i=this.buttonMap.get(e);if(i)for(const e of i)e.toggleAttribute("data-active",!!t)}updateToolbarState(){if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);if(!this.editorEl.contains(t.commonAncestorContainer))return;const i=function(e){for(;e&&!(e instanceof HTMLElement);)e=e.parentNode;return e}(t.startContainer)||this.editorEl,M=getComputedStyle(i),n=jS(t.startContainer,this.editorEl)||this.editorEl,o=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("strong"===t||"b"===t)return!0;const i=getComputedStyle(e).fontWeight;if(parseInt(i,10)>=600)return!0}e=e.parentNode}return!1})(),r=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("em"===t||"i"===t)return!0;if("italic"===getComputedStyle(e).fontStyle)return!0}e=e.parentNode}return!1})(),s=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=getComputedStyle(e).textDecorationLine;if(t&&t.includes("underline"))return!0;if("u"===e.tagName.toLowerCase())return!0}e=e.parentNode}return!1})(),a=!!i.closest("a"),N=n.style.textAlign||getComputedStyle(n).textAlign||"start",l="start"===N?"left":N,g=!!i.closest("li")&&i.closest("ul,ol")?.tagName.toLowerCase()||"";if(this.setBtnActive("bold",o),this.setBtnActive("italic",r),this.setBtnActive("underline",s),this.setBtnActive("link",a),this.setBtnActive("left","left"===l&&!["center","right","justify"].includes(l)),this.setBtnActive("center","center"===l),this.setBtnActive("right","right"===l),this.setBtnActive("justify","justify"===l),this.setBtnActive("ul","ul"===g),this.setBtnActive("ol","ol"===g),this.headingSelect){const e=n.tagName.toLowerCase(),t=["h1","h2","h3"].includes(e)?e:"p";this.headingSelect.value!==t&&(this.headingSelect.value=t)}if(this.fontSelect){const e=(M.fontFamily||"").replace(/["']/g,"").split(",")[0].trim().toLowerCase();if(e)for(const t of Array.from(this.fontSelect.options))if(t.value.toLowerCase()===e){this.fontSelect.value=t.value;break}}if(this.colorInput){const e=dS(M.color);e&&this.colorInput.value.toLowerCase()!==e.toLowerCase()&&(this.colorInput.value=e),this.colorSwatchEl&&(this.colorSwatchEl.style.backgroundColor=this.colorInput.value)}if(this.bgColorInput){const e=getComputedStyle(i).backgroundColor;if(e&&!/transparent|rgba\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e)){const t=dS(e);t&&this.bgColorInput.value.toLowerCase()!==t.toLowerCase()&&(this.bgColorInput.value=t)}this.bgSwatchEl&&(this.bgSwatchEl.style.backgroundColor=this.bgColorInput.value)}}syncPreview(){this.updateContent()}updateContent(){if(!this.editorEl)return;this.ensureAtLeastOneParagraph();const e=this.editorEl.cloneNode(!0);if(this.noStyles)e.querySelectorAll("[style]").forEach((e=>e.removeAttribute("style")));else{const t=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),M=["font-weight","font-style","text-decoration","color","background-color","font-size","font-family","text-align","line-height","letter-spacing","white-space","vertical-align","list-style-position","padding-inline-start"];for(;t.nextNode()&&i.nextNode();){const e=t.currentNode,n=i.currentNode,o=window.getComputedStyle(e),r=M.map((e=>`${e}:${o.getPropertyValue(e)}`)).join(";");r.trim()&&n.setAttribute("style",r)}}this.content=e.innerHTML,this.previewEl&&(this.previewEl.innerHTML=this.content),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content},bubbles:!0,composed:!0}))}};e([Ne({type:String,attribute:!0,reflect:!0})],SS.prototype,"value",void 0),e([Ne({type:Boolean,attribute:!0,reflect:!0})],SS.prototype,"noStyles",void 0),e([Ne({type:Boolean,attribute:"singlelineeditor",reflect:!0})],SS.prototype,"singleLineEditor",void 0),e([Ne({attribute:"mentions",reflect:!0,converter:{fromAttribute:e=>{try{const t=JSON.parse(e),i={};for(const e of Object.keys(t)){const M=t[e];Array.isArray(M)&&(i[e]=M.filter((e=>e&&"string"==typeof e.key&&"string"==typeof e.label)).map((e=>({key:e.key,label:e.label}))))}return i}catch{return{}}},toAttribute:e=>JSON.stringify(e)}})],SS.prototype,"mentions",void 0),e([le()],SS.prototype,"content",void 0),SS=e([re("nile-rich-text-editor")],SS);"undefined"!=typeof window&&(window.nileElementsVersion='"1.2.7-beta-1.2"',window.nileVersion="__NILE_VERSION__",window.process=window.process||{env:{NODE_ENV:"production"}});const ES=r`
14125
+ `,pS={bold:"format_bold",italic:"format_italic",underline:"format_underline",link:"link_2",left:"format_align_left",center:"format_align_middle",right:"format_align_right",justify:"format_align_justify",ul:"format_list_bulleted",ol:"format_list_numbered",clear:"format_clear"};let SS=class extends oe{constructor(){super(...arguments),this.value="",this.noStyles=!1,this.singleLineEditor=!1,this.mentions={},this.content="",this.previewEl=null,this.toolbarEl=null,this.lastRange=null,this.buttonMap=new Map,this.headingSelect=null,this.fontSelect=null,this.colorInput=null,this.bgColorInput=null,this.colorSwatchEl=null,this.bgSwatchEl=null,this.containerEl=null,this.mentionsEl=null,this.onEditorKeydown=e=>{if(this.singleLineEditor&&"Enter"===e.key&&e.shiftKey)return void e.preventDefault();if(e.ctrlKey&&"i"===e.key.toLowerCase()&&(e.preventDefault(),zS(this.editorEl,"em"),this.updateContent(),this.updateToolbarState()),this.singleLineEditor&&"Enter"===e.key)return void e.preventDefault();if("Tab"!==e.key)return;e.preventDefault(),this.focusAndRestore();const t=window.getSelection();if(!t||0===t.rangeCount)return;const i=t.getRangeAt(0);if(e.shiftKey){if(i.collapsed&&i.startContainer.nodeType===Node.TEXT_NODE){const e=i.startContainer,M=i.startOffset,n=e.data.slice(0,M),o=n.replace(/(\t|[ \u00a0]{2})$/,"");if(o.length!==n.length){e.data=o+e.data.slice(M);const i=document.createRange();i.setStart(e,o.length),i.collapse(!0),t.removeAllRanges(),t.addRange(i),this.updateContent(),this.updateToolbarState()}}return}i.deleteContents();const M=document.createTextNode("\t");i.insertNode(M);const n=document.createRange();n.setStartAfter(M),n.collapse(!0),t.removeAllRanges(),t.addRange(n),this.updateContent(),this.updateToolbarState()},this.onSelectionChange=()=>{if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);this.editorEl.contains(t.commonAncestorContainer)&&(this.lastRange=t.cloneRange(),this.updateToolbarState())}}createRenderRoot(){return this}injectCss(e){if(this.querySelector("style[data-rte-style]"))return;const t=document.createElement("style");t.setAttribute("data-rte-style","true"),t.textContent=e,this.insertBefore(t,this.firstChild)}connectedCallback(){super.connectedCallback(),this.injectCss(xS.cssText),this.ensureStructure(),this.value&&!this.editorEl.innerHTML.trim()&&(this.editorEl.innerHTML=this.value),this.content=this.editorEl.innerHTML,this.toolbarEl&&this.wireAuthoredToolbar(this.toolbarEl),this.mentionsEl=this.querySelector("nile-rte-mentions"),this.mentionsEl&&(this.mentionsEl.attach?.(this.editorEl,this),this.mentionsEl.setExternalConfig?.(this.mentions)),this.wireEditor(),document.addEventListener("selectionchange",this.onSelectionChange,{passive:!0}),this.updateToolbarState(),this.syncPreview()}ensureStructure(){this.toolbarEl=this.querySelector("nile-rte-toolbar"),this.previewEl=this.querySelector("nile-rte-preview"),this.containerEl=this.querySelector(".rte-container"),this.containerEl||(this.containerEl=document.createElement("div"),this.containerEl.className="rte-container",this.appendChild(this.containerEl)),this.ensureEditor(),this.toolbarEl&&this.toolbarEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.toolbarEl),this.editorEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.editorEl),this.previewEl&&(this.previewEl.parentElement!==this&&this.appendChild(this.previewEl),this.previewEl.previousElementSibling!==this.containerEl&&this.insertBefore(this.previewEl,this.containerEl.nextSibling))}updateContentWithMention(e){this.updateContent(),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content,mention:e},bubbles:!0,composed:!0}))}disconnectedCallback(){document.removeEventListener("selectionchange",this.onSelectionChange),this.mentionsEl&&this.mentionsEl.detach&&this.mentionsEl.detach(),super.disconnectedCallback()}updated(e){e.has("value")&&this.editorEl&&this.value!==this.editorEl.innerHTML&&(this.editorEl.innerHTML=this.value||"<p><br></p>",this.content=this.editorEl.innerHTML,this.syncPreview()),e.has("singleLineEditor")&&(this.editorEl&&this.editorEl.classList.toggle("single-line",this.singleLineEditor),this.previewEl&&this.previewEl.classList.toggle("single-line",this.singleLineEditor))}ensureEditor(){if(this.editorEl=this.querySelector(".editor"),!this.editorEl){const e=document.createElement("article");e.className="editor",e.setAttribute("contenteditable","true"),this.editorEl=e}this.editorEl.innerHTML.trim()||(this.editorEl.innerHTML="<p><br></p>")}unwrapMention(e,t=!0){const i=e.parentNode;if(!i)return;const M=t?(e.textContent??"").replace(/\u200B/g,""):"",n=document.createTextNode(M);i.insertBefore(n,e),i.removeChild(e);const o=document.createRange();o.setStartAfter(n),o.collapse(!0);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(o)}scrubBrokenMentions(){if(!this.editorEl)return;this.editorEl.querySelectorAll("span.mention").forEach((e=>{const t=e,i=t.getAttribute("data-mention-key"),M=t.getAttribute("data-mention-label"),n=t.getAttribute("data-mention-trigger")||"",o=(t.textContent??"").replace(/\u200B/g,"").trim(),r=!!i&&!!M&&o.length>0&&o.startsWith(n)&&o.includes(M);o&&r||this.unwrapMention(t,!0)}))}wireEditor(){this.editorEl.addEventListener("input",(()=>{this.ensureAtLeastOneParagraph(),this.scrubBrokenMentions(),this.updateContent(),this.updateToolbarState()})),this.editorEl.addEventListener("mouseup",(()=>{this.saveSelection(),this.updateToolbarState()})),this.editorEl.addEventListener("keyup",(e=>{this.saveSelection(),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)&&this.updateToolbarState()})),this.editorEl.addEventListener("keydown",this.onEditorKeydown)}wireAuthoredToolbar(e){this.buttonMap.clear(),this.headingSelect=null,this.fontSelect=null,this.colorInput=null,Array.from(e.children).forEach((e=>{const t=e.tagName.toLowerCase();if("nile-rte-select"!==t||"align"!==e.getAttribute("type")){if("nile-rte-link"===t)return e.editorEl=this.editorEl,void e.addEventListener("link-changed",(()=>{this.updateContent(),this.updateToolbarState()}));if("nile-rte-toolbar-item"===t){let t=e.querySelector(":scope > nile-button");const i=e.getAttribute("name")||"",M=e.getAttribute("label")||i,n=e.getAttribute("icon"),o=e.innerHTML.trim().length>0;if(t||(t=document.createElement("nile-button"),t.variant="tertiary",t.size="small"),n)t.innerHTML=`<nile-icon name="${n}" aria-label="${M}"></nile-icon>`,e.innerHTML="";else if(o)t.innerHTML=e.innerHTML,e.innerHTML="";else{const n=pS[i];n?t.innerHTML=`<nile-icon name="${n}" size="20" color="black" aria-label="${M}"></nile-icon>`:t.textContent=M||i,e.innerHTML=""}if(!t.isConnected){const i=document.createElement("nile-tooltip");i.setAttribute("content",M),i.appendChild(t),e.appendChild(i)}t.setAttribute("aria-label",M),t.addEventListener("mousedown",(e=>e.preventDefault())),t.addEventListener("click",(()=>this.onToolbarCommand(i)));const r=this.buttonMap.get(i)??[];return r.push(t),void this.buttonMap.set(i,r)}if("nile-rte-select"!==t)"nile-rte-color"!==t||e.addEventListener("change",(e=>{this.focusAndRestore();const{mode:t,value:i}=e.detail;"backColor"===t?yS(this.editorEl,"backgroundColor",i,"data-rte-bg"):function(e,t){yS(e,"color",t,"data-rte-color")}(this.editorEl,i),this.updateContent(),this.updateToolbarState()}));else{const t=e.getAttribute("type")||"";e.addEventListener("change",(e=>{this.focusAndRestore();const i=e.detail;"heading"===t?function(e,t){const i=document.getSelection();if(!i||0===i.rangeCount)return;const M=jS(i.getRangeAt(0).startContainer,e);if(!M)return;if(M.tagName.toLowerCase()===t)return;const n=document.createElement(t);for(;M.firstChild;)n.appendChild(M.firstChild);M.replaceWith(n);const o=document.createRange();o.selectNodeContents(n),o.collapse(!0),i.removeAllRanges(),i.addRange(o)}(this.editorEl,i):"font"===t&&TS(this.editorEl,i),this.updateContent(),this.updateToolbarState()}))}}else e.addEventListener("change",(e=>{this.focusAndRestore();const t=e.detail;IS(this.editorEl,t),this.updateContent(),this.updateToolbarState()}))}))}saveSelection(){const e=window.getSelection();e&&e.rangeCount&&(this.lastRange=e.getRangeAt(0).cloneRange())}restoreSelection(){if(!this.lastRange)return;const e=document.getSelection();e&&(e.removeAllRanges(),e.addRange(this.lastRange))}focusAndRestore(){this.editorEl?.focus(),this.restoreSelection()}getCleanContent(){const e=this.editorEl.cloneNode(!0);return e.querySelectorAll("*").forEach((e=>{e.removeAttribute("style")})),e.innerHTML}insertList(e){if(this.restoreSelection(),!this.lastRange)return;const t=document.createElement(e),i=this.lastRange.extractContents(),M=document.createElement("div");M.appendChild(i),Array.from(M.childNodes).forEach((e=>{if(e.nodeType===Node.TEXT_NODE&&!e.textContent?.trim())return;const i=document.createElement("li");i.appendChild(e),t.appendChild(i)})),this.lastRange.insertNode(t),this.afterListEdit(t)}afterListEdit(e){const t=document.createRange();t.setStartAfter(e),t.collapse(!0);const i=window.getSelection();i?.removeAllRanges(),i?.addRange(t),this.saveSelection(),this.updateContent(),this.updateToolbarState()}ensureAtLeastOneParagraph(){const e=this.editorEl;if(!e)return;const t=""===(e.textContent??"").replace(/\u200B/g,"").trim();if(0===e.childNodes.length||t)return void(e.innerHTML="<p><br></p>");if(!e.querySelector("p,h1,h2,h3,h4,h5,h6,ul,ol,table,blockquote,pre")){const t=document.createElement("p");for(;e.firstChild;)t.appendChild(e.firstChild);return t.hasChildNodes()||t.appendChild(document.createElement("br")),void e.appendChild(t)}e.querySelectorAll("p").forEach((e=>{""===(e.textContent??"").replace(/\u200B/g,"")&&(e.innerHTML.toLowerCase().includes("<br")||(e.innerHTML="<br>"))}))}onToolbarCommand(e){switch(this.focusAndRestore(),e){case"bold":zS(this.editorEl,"strong");break;case"italic":zS(this.editorEl,"em");break;case"underline":zS(this.editorEl,"u");break;case"left":IS(this.editorEl,"left");break;case"center":IS(this.editorEl,"center");break;case"right":IS(this.editorEl,"right");break;case"justify":IS(this.editorEl,"justify");break;case"ul":LS(this.editorEl,"ul"),this.updateContent(),this.updateToolbarState();break;case"ol":LS(this.editorEl,"ol"),this.updateContent(),this.updateToolbarState();break;case"link":break;case"clear":const e=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),t=[];for(;e.nextNode();){const i=e.currentNode;i.removeAttribute("style"),["B","STRONG","I","EM","U","SPAN","FONT"].includes(i.tagName)&&t.push(i)}for(const e of t){for(;e.firstChild;)e.parentNode?.insertBefore(e.firstChild,e);e.remove()}this.ensureAtLeastOneParagraph()}this.updateContent(),this.updateToolbarState()}setBtnActive(e,t){const i=this.buttonMap.get(e);if(i)for(const e of i)e.toggleAttribute("data-active",!!t)}updateToolbarState(){if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);if(!this.editorEl.contains(t.commonAncestorContainer))return;const i=function(e){for(;e&&!(e instanceof HTMLElement);)e=e.parentNode;return e}(t.startContainer)||this.editorEl,M=getComputedStyle(i),n=jS(t.startContainer,this.editorEl)||this.editorEl,o=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("strong"===t||"b"===t)return!0;const i=getComputedStyle(e).fontWeight;if(parseInt(i,10)>=600)return!0}e=e.parentNode}return!1})(),r=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("em"===t||"i"===t)return!0;if("italic"===getComputedStyle(e).fontStyle)return!0}e=e.parentNode}return!1})(),s=(()=>{let e=i;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=getComputedStyle(e).textDecorationLine;if(t&&t.includes("underline"))return!0;if("u"===e.tagName.toLowerCase())return!0}e=e.parentNode}return!1})(),a=!!i.closest("a"),N=n.style.textAlign||getComputedStyle(n).textAlign||"start",l="start"===N?"left":N,g=!!i.closest("li")&&i.closest("ul,ol")?.tagName.toLowerCase()||"";if(this.setBtnActive("bold",o),this.setBtnActive("italic",r),this.setBtnActive("underline",s),this.setBtnActive("link",a),this.setBtnActive("left","left"===l&&!["center","right","justify"].includes(l)),this.setBtnActive("center","center"===l),this.setBtnActive("right","right"===l),this.setBtnActive("justify","justify"===l),this.setBtnActive("ul","ul"===g),this.setBtnActive("ol","ol"===g),this.headingSelect){const e=n.tagName.toLowerCase(),t=["h1","h2","h3"].includes(e)?e:"p";this.headingSelect.value!==t&&(this.headingSelect.value=t)}if(this.fontSelect){const e=(M.fontFamily||"").replace(/["']/g,"").split(",")[0].trim().toLowerCase();if(e)for(const t of Array.from(this.fontSelect.options))if(t.value.toLowerCase()===e){this.fontSelect.value=t.value;break}}if(this.colorInput){const e=dS(M.color);e&&this.colorInput.value.toLowerCase()!==e.toLowerCase()&&(this.colorInput.value=e),this.colorSwatchEl&&(this.colorSwatchEl.style.backgroundColor=this.colorInput.value)}if(this.bgColorInput){const e=getComputedStyle(i).backgroundColor;if(e&&!/transparent|rgba\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e)){const t=dS(e);t&&this.bgColorInput.value.toLowerCase()!==t.toLowerCase()&&(this.bgColorInput.value=t)}this.bgSwatchEl&&(this.bgSwatchEl.style.backgroundColor=this.bgColorInput.value)}}syncPreview(){this.updateContent()}updateContent(){if(!this.editorEl)return;this.ensureAtLeastOneParagraph();const e=this.editorEl.cloneNode(!0);if(this.noStyles)e.querySelectorAll("[style]").forEach((e=>e.removeAttribute("style")));else{const t=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),M=["font-weight","font-style","text-decoration","color","background-color","font-size","font-family","text-align","line-height","letter-spacing","white-space","vertical-align","list-style-position","padding-inline-start"];for(;t.nextNode()&&i.nextNode();){const e=t.currentNode,n=i.currentNode,o=window.getComputedStyle(e),r=M.map((e=>`${e}:${o.getPropertyValue(e)}`)).join(";");r.trim()&&n.setAttribute("style",r)}}this.content=e.innerHTML,this.previewEl&&(this.previewEl.innerHTML=this.content),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content},bubbles:!0,composed:!0}))}};e([Ne({type:String,attribute:!0,reflect:!0})],SS.prototype,"value",void 0),e([Ne({type:Boolean,attribute:!0,reflect:!0})],SS.prototype,"noStyles",void 0),e([Ne({type:Boolean,attribute:"singlelineeditor",reflect:!0})],SS.prototype,"singleLineEditor",void 0),e([Ne({attribute:"mentions",reflect:!0,converter:{fromAttribute:e=>{try{const t=JSON.parse(e),i={};for(const e of Object.keys(t)){const M=t[e];Array.isArray(M)&&(i[e]=M.filter((e=>e&&"string"==typeof e.key&&"string"==typeof e.label)).map((e=>({key:e.key,label:e.label}))))}return i}catch{return{}}},toAttribute:e=>JSON.stringify(e)}})],SS.prototype,"mentions",void 0),e([le()],SS.prototype,"content",void 0),SS=e([re("nile-rich-text-editor")],SS);"undefined"!=typeof window&&(window.nileElementsVersion='"1.2.7-beta-1.3"',window.nileVersion="__NILE_VERSION__",window.process=window.process||{env:{NODE_ENV:"production"}},console.error=()=>{});const ES=r`
14126
14126
  :host {
14127
14127
  --sidebar-width: 240px;
14128
14128
  --sidebar-collapsed-width: 70px;
@@ -15302,21 +15302,21 @@ a {
15302
15302
  :host {
15303
15303
 
15304
15304
  }
15305
- `;var NE="top",lE="bottom",gE="right",uE="left",DE=[NE,lE,gE,uE],cE=DE.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),jE=[].concat(DE,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),IE=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zE(e){return e?(e.nodeName||"").toLowerCase():null}function dE(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function TE(e){return e instanceof dE(e).Element||e instanceof Element}function hE(e){return e instanceof dE(e).HTMLElement||e instanceof HTMLElement}function yE(e){return"undefined"!=typeof ShadowRoot&&(e instanceof dE(e).ShadowRoot||e instanceof ShadowRoot)}var AE={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},M=t.attributes[e]||{},n=t.elements[e];hE(n)&&zE(n)&&(Object.assign(n.style,i),Object.keys(M).forEach((function(e){var t=M[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var M=t.elements[e],n=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});hE(M)&&zE(M)&&(Object.assign(M.style,o),Object.keys(n).forEach((function(e){M.removeAttribute(e)})))}))}},requires:["computeStyles"]};function OE(e){return e.split("-")[0]}var LE=Math.max,xE=Math.min,pE=Math.round;function SE(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function EE(){return!/^((?!chrome|android).)*safari/i.test(SE())}function mE(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var M=e.getBoundingClientRect(),n=1,o=1;t&&hE(e)&&(n=e.offsetWidth>0&&pE(M.width)/e.offsetWidth||1,o=e.offsetHeight>0&&pE(M.height)/e.offsetHeight||1);var r=(TE(e)?dE(e):window).visualViewport,s=!EE()&&i,a=(M.left+(s&&r?r.offsetLeft:0))/n,N=(M.top+(s&&r?r.offsetTop:0))/o,l=M.width/n,g=M.height/o;return{width:l,height:g,top:N,right:a+l,bottom:N+g,left:a,x:a,y:N}}function wE(e){var t=mE(e),i=e.offsetWidth,M=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-M)<=1&&(M=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:M}}function QE(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&yE(i)){var M=t;do{if(M&&e.isSameNode(M))return!0;M=M.parentNode||M.host}while(M)}return!1}function kE(e){return dE(e).getComputedStyle(e)}function CE(e){return["table","td","th"].indexOf(zE(e))>=0}function bE(e){return((TE(e)?e.ownerDocument:e.document)||window.document).documentElement}function fE(e){return"html"===zE(e)?e:e.assignedSlot||e.parentNode||(yE(e)?e.host:null)||bE(e)}function UE(e){return hE(e)&&"fixed"!==kE(e).position?e.offsetParent:null}function vE(e){for(var t=dE(e),i=UE(e);i&&CE(i)&&"static"===kE(i).position;)i=UE(i);return i&&("html"===zE(i)||"body"===zE(i)&&"static"===kE(i).position)?t:i||function(e){var t=/firefox/i.test(SE());if(/Trident/i.test(SE())&&hE(e)&&"fixed"===kE(e).position)return null;var i=fE(e);for(yE(i)&&(i=i.host);hE(i)&&["html","body"].indexOf(zE(i))<0;){var M=kE(i);if("none"!==M.transform||"none"!==M.perspective||"paint"===M.contain||-1!==["transform","perspective"].indexOf(M.willChange)||t&&"filter"===M.willChange||t&&M.filter&&"none"!==M.filter)return i;i=i.parentNode}return null}(e)||t}function YE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ZE(e,t,i){return LE(e,xE(t,i))}function VE(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function WE(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}var PE={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,M=e.name,n=e.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,s=OE(i.placement),a=YE(s),N=[uE,gE].indexOf(s)>=0?"height":"width";if(o&&r){var l=function(e,t){return VE("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:WE(e,DE))}(n.padding,i),g=wE(o),u="y"===a?NE:uE,D="y"===a?lE:gE,c=i.rects.reference[N]+i.rects.reference[a]-r[a]-i.rects.popper[N],j=r[a]-i.rects.reference[a],I=vE(o),z=I?"y"===a?I.clientHeight||0:I.clientWidth||0:0,d=c/2-j/2,T=l[u],h=z-g[N]-l[D],y=z/2-g[N]/2+d,A=ZE(T,y,h),O=a;i.modifiersData[M]=((t={})[O]=A,t.centerOffset=A-y,t)}},effect:function(e){var t=e.state,i=e.options.element,M=void 0===i?"[data-popper-arrow]":i;null!=M&&("string"!=typeof M||(M=t.elements.popper.querySelector(M)))&&QE(t.elements.popper,M)&&(t.elements.arrow=M)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function RE(e){return e.split("-")[1]}var GE={top:"auto",right:"auto",bottom:"auto",left:"auto"};function BE(e){var t,i=e.popper,M=e.popperRect,n=e.placement,o=e.variation,r=e.offsets,s=e.position,a=e.gpuAcceleration,N=e.adaptive,l=e.roundOffsets,g=e.isFixed,u=r.x,D=void 0===u?0:u,c=r.y,j=void 0===c?0:c,I="function"==typeof l?l({x:D,y:j}):{x:D,y:j};D=I.x,j=I.y;var z=r.hasOwnProperty("x"),d=r.hasOwnProperty("y"),T=uE,h=NE,y=window;if(N){var A=vE(i),O="clientHeight",L="clientWidth";if(A===dE(i)&&"static"!==kE(A=bE(i)).position&&"absolute"===s&&(O="scrollHeight",L="scrollWidth"),n===NE||(n===uE||n===gE)&&"end"===o)h=lE,j-=(g&&A===y&&y.visualViewport?y.visualViewport.height:A[O])-M.height,j*=a?1:-1;if(n===uE||(n===NE||n===lE)&&"end"===o)T=gE,D-=(g&&A===y&&y.visualViewport?y.visualViewport.width:A[L])-M.width,D*=a?1:-1}var x,p=Object.assign({position:s},N&&GE),S=!0===l?function(e,t){var i=e.x,M=e.y,n=t.devicePixelRatio||1;return{x:pE(i*n)/n||0,y:pE(M*n)/n||0}}({x:D,y:j},dE(i)):{x:D,y:j};return D=S.x,j=S.y,a?Object.assign({},p,((x={})[h]=d?"0":"",x[T]=z?"0":"",x.transform=(y.devicePixelRatio||1)<=1?"translate("+D+"px, "+j+"px)":"translate3d("+D+"px, "+j+"px, 0)",x)):Object.assign({},p,((t={})[h]=d?j+"px":"",t[T]=z?D+"px":"",t.transform="",t))}var _E={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,M=i.gpuAcceleration,n=void 0===M||M,o=i.adaptive,r=void 0===o||o,s=i.roundOffsets,a=void 0===s||s,N={placement:OE(t.placement),variation:RE(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,BE(Object.assign({},N,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,BE(Object.assign({},N,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},FE={passive:!0};var HE={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,M=e.options,n=M.scroll,o=void 0===n||n,r=M.resize,s=void 0===r||r,a=dE(t.elements.popper),N=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&N.forEach((function(e){e.addEventListener("scroll",i.update,FE)})),s&&a.addEventListener("resize",i.update,FE),function(){o&&N.forEach((function(e){e.removeEventListener("scroll",i.update,FE)})),s&&a.removeEventListener("resize",i.update,FE)}},data:{}},JE={left:"right",right:"left",bottom:"top",top:"bottom"};function $E(e){return e.replace(/left|right|bottom|top/g,(function(e){return JE[e]}))}var XE={start:"end",end:"start"};function qE(e){return e.replace(/start|end/g,(function(e){return XE[e]}))}function KE(e){var t=dE(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function em(e){return mE(bE(e)).left+KE(e).scrollLeft}function tm(e){var t=kE(e),i=t.overflow,M=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+M)}function im(e){return["html","body","#document"].indexOf(zE(e))>=0?e.ownerDocument.body:hE(e)&&tm(e)?e:im(fE(e))}function Mm(e,t){var i;void 0===t&&(t=[]);var M=im(e),n=M===(null==(i=e.ownerDocument)?void 0:i.body),o=dE(M),r=n?[o].concat(o.visualViewport||[],tm(M)?M:[]):M,s=t.concat(r);return n?s:s.concat(Mm(fE(r)))}function nm(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function om(e,t,i){return"viewport"===t?nm(function(e,t){var i=dE(e),M=bE(e),n=i.visualViewport,o=M.clientWidth,r=M.clientHeight,s=0,a=0;if(n){o=n.width,r=n.height;var N=EE();(N||!N&&"fixed"===t)&&(s=n.offsetLeft,a=n.offsetTop)}return{width:o,height:r,x:s+em(e),y:a}}(e,i)):TE(t)?function(e,t){var i=mE(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}(t,i):nm(function(e){var t,i=bE(e),M=KE(e),n=null==(t=e.ownerDocument)?void 0:t.body,o=LE(i.scrollWidth,i.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=LE(i.scrollHeight,i.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-M.scrollLeft+em(e),a=-M.scrollTop;return"rtl"===kE(n||i).direction&&(s+=LE(i.clientWidth,n?n.clientWidth:0)-o),{width:o,height:r,x:s,y:a}}(bE(e)))}function rm(e,t,i,M){var n="clippingParents"===t?function(e){var t=Mm(fE(e)),i=["absolute","fixed"].indexOf(kE(e).position)>=0&&hE(e)?vE(e):e;return TE(i)?t.filter((function(e){return TE(e)&&QE(e,i)&&"body"!==zE(e)})):[]}(e):[].concat(t),o=[].concat(n,[i]),r=o[0],s=o.reduce((function(t,i){var n=om(e,i,M);return t.top=LE(n.top,t.top),t.right=xE(n.right,t.right),t.bottom=xE(n.bottom,t.bottom),t.left=LE(n.left,t.left),t}),om(e,r,M));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function sm(e){var t,i=e.reference,M=e.element,n=e.placement,o=n?OE(n):null,r=n?RE(n):null,s=i.x+i.width/2-M.width/2,a=i.y+i.height/2-M.height/2;switch(o){case NE:t={x:s,y:i.y-M.height};break;case lE:t={x:s,y:i.y+i.height};break;case gE:t={x:i.x+i.width,y:a};break;case uE:t={x:i.x-M.width,y:a};break;default:t={x:i.x,y:i.y}}var N=o?YE(o):null;if(null!=N){var l="y"===N?"height":"width";switch(r){case"start":t[N]=t[N]-(i[l]/2-M[l]/2);break;case"end":t[N]=t[N]+(i[l]/2-M[l]/2)}}return t}function am(e,t){void 0===t&&(t={});var i=t,M=i.placement,n=void 0===M?e.placement:M,o=i.strategy,r=void 0===o?e.strategy:o,s=i.boundary,a=void 0===s?"clippingParents":s,N=i.rootBoundary,l=void 0===N?"viewport":N,g=i.elementContext,u=void 0===g?"popper":g,D=i.altBoundary,c=void 0!==D&&D,j=i.padding,I=void 0===j?0:j,z=VE("number"!=typeof I?I:WE(I,DE)),d="popper"===u?"reference":"popper",T=e.rects.popper,h=e.elements[c?d:u],y=rm(TE(h)?h:h.contextElement||bE(e.elements.popper),a,l,r),A=mE(e.elements.reference),O=sm({reference:A,element:T,strategy:"absolute",placement:n}),L=nm(Object.assign({},T,O)),x="popper"===u?L:A,p={top:y.top-x.top+z.top,bottom:x.bottom-y.bottom+z.bottom,left:y.left-x.left+z.left,right:x.right-y.right+z.right},S=e.modifiersData.offset;if("popper"===u&&S){var E=S[n];Object.keys(p).forEach((function(e){var t=[gE,lE].indexOf(e)>=0?1:-1,i=[NE,lE].indexOf(e)>=0?"y":"x";p[e]+=E[i]*t}))}return p}function Nm(e,t){void 0===t&&(t={});var i=t,M=i.placement,n=i.boundary,o=i.rootBoundary,r=i.padding,s=i.flipVariations,a=i.allowedAutoPlacements,N=void 0===a?jE:a,l=RE(M),g=l?s?cE:cE.filter((function(e){return RE(e)===l})):DE,u=g.filter((function(e){return N.indexOf(e)>=0}));0===u.length&&(u=g);var D=u.reduce((function(t,i){return t[i]=am(e,{placement:i,boundary:n,rootBoundary:o,padding:r})[OE(i)],t}),{});return Object.keys(D).sort((function(e,t){return D[e]-D[t]}))}var lm={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,M=e.name;if(!t.modifiersData[M]._skip){for(var n=i.mainAxis,o=void 0===n||n,r=i.altAxis,s=void 0===r||r,a=i.fallbackPlacements,N=i.padding,l=i.boundary,g=i.rootBoundary,u=i.altBoundary,D=i.flipVariations,c=void 0===D||D,j=i.allowedAutoPlacements,I=t.options.placement,z=OE(I),d=a||(z===I||!c?[$E(I)]:function(e){if("auto"===OE(e))return[];var t=$E(e);return[qE(e),t,qE(t)]}(I)),T=[I].concat(d).reduce((function(e,i){return e.concat("auto"===OE(i)?Nm(t,{placement:i,boundary:l,rootBoundary:g,padding:N,flipVariations:c,allowedAutoPlacements:j}):i)}),[]),h=t.rects.reference,y=t.rects.popper,A=new Map,O=!0,L=T[0],x=0;x<T.length;x++){var p=T[x],S=OE(p),E="start"===RE(p),m=[NE,lE].indexOf(S)>=0,w=m?"width":"height",Q=am(t,{placement:p,boundary:l,rootBoundary:g,altBoundary:u,padding:N}),k=m?E?gE:uE:E?lE:NE;h[w]>y[w]&&(k=$E(k));var C=$E(k),b=[];if(o&&b.push(Q[S]<=0),s&&b.push(Q[k]<=0,Q[C]<=0),b.every((function(e){return e}))){L=p,O=!1;break}A.set(p,b)}if(O)for(var f=function(e){var t=T.find((function(t){var i=A.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return L=t,"break"},U=c?3:1;U>0;U--){if("break"===f(U))break}t.placement!==L&&(t.modifiersData[M]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function gm(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function um(e){return[NE,gE,lE,uE].some((function(t){return e[t]>=0}))}var Dm={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,M=t.rects.reference,n=t.rects.popper,o=t.modifiersData.preventOverflow,r=am(t,{elementContext:"reference"}),s=am(t,{altBoundary:!0}),a=gm(r,M),N=gm(s,n,o),l=um(a),g=um(N);t.modifiersData[i]={referenceClippingOffsets:a,popperEscapeOffsets:N,isReferenceHidden:l,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":g})}};var cm={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,M=e.name,n=i.offset,o=void 0===n?[0,0]:n,r=jE.reduce((function(e,i){return e[i]=function(e,t,i){var M=OE(e),n=[uE,NE].indexOf(M)>=0?-1:1,o="function"==typeof i?i(Object.assign({},t,{placement:e})):i,r=o[0],s=o[1];return r=r||0,s=(s||0)*n,[uE,gE].indexOf(M)>=0?{x:s,y:r}:{x:r,y:s}}(i,t.rects,o),e}),{}),s=r[t.placement],a=s.x,N=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=N),t.modifiersData[M]=r}};var jm={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=sm({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Im={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,M=e.name,n=i.mainAxis,o=void 0===n||n,r=i.altAxis,s=void 0!==r&&r,a=i.boundary,N=i.rootBoundary,l=i.altBoundary,g=i.padding,u=i.tether,D=void 0===u||u,c=i.tetherOffset,j=void 0===c?0:c,I=am(t,{boundary:a,rootBoundary:N,padding:g,altBoundary:l}),z=OE(t.placement),d=RE(t.placement),T=!d,h=YE(z),y="x"===h?"y":"x",A=t.modifiersData.popperOffsets,O=t.rects.reference,L=t.rects.popper,x="function"==typeof j?j(Object.assign({},t.rects,{placement:t.placement})):j,p="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(A){if(o){var m,w="y"===h?NE:uE,Q="y"===h?lE:gE,k="y"===h?"height":"width",C=A[h],b=C+I[w],f=C-I[Q],U=D?-L[k]/2:0,v="start"===d?O[k]:L[k],Y="start"===d?-L[k]:-O[k],Z=t.elements.arrow,V=D&&Z?wE(Z):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},P=W[w],R=W[Q],G=ZE(0,O[k],V[k]),B=T?O[k]/2-U-G-P-p.mainAxis:v-G-P-p.mainAxis,_=T?-O[k]/2+U+G+R+p.mainAxis:Y+G+R+p.mainAxis,F=t.elements.arrow&&vE(t.elements.arrow),H=F?"y"===h?F.clientTop||0:F.clientLeft||0:0,J=null!=(m=null==S?void 0:S[h])?m:0,$=C+_-J,X=ZE(D?xE(b,C+B-J-H):b,C,D?LE(f,$):f);A[h]=X,E[h]=X-C}if(s){var q,K="x"===h?NE:uE,ee="x"===h?lE:gE,te=A[y],ie="y"===y?"height":"width",Me=te+I[K],ne=te-I[ee],oe=-1!==[NE,uE].indexOf(z),re=null!=(q=null==S?void 0:S[y])?q:0,se=oe?Me:te-O[ie]-L[ie]-re+p.altAxis,ae=oe?te+O[ie]+L[ie]-re-p.altAxis:ne,Ne=D&&oe?function(e,t,i){var M=ZE(e,t,i);return M>i?i:M}(se,te,ae):ZE(D?se:Me,te,D?ae:ne);A[y]=Ne,E[y]=Ne-te}t.modifiersData[M]=E}},requiresIfExists:["offset"]};function zm(e,t,i){void 0===i&&(i=!1);var M,n,o=hE(t),r=hE(t)&&function(e){var t=e.getBoundingClientRect(),i=pE(t.width)/e.offsetWidth||1,M=pE(t.height)/e.offsetHeight||1;return 1!==i||1!==M}(t),s=bE(t),a=mE(e,r,i),N={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!i)&&(("body"!==zE(t)||tm(s))&&(N=(M=t)!==dE(M)&&hE(M)?{scrollLeft:(n=M).scrollLeft,scrollTop:n.scrollTop}:KE(M)),hE(t)?((l=mE(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=em(s))),{x:a.left+N.scrollLeft-l.x,y:a.top+N.scrollTop-l.y,width:a.width,height:a.height}}function dm(e){var t=new Map,i=new Set,M=[];function n(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var M=t.get(e);M&&n(M)}})),M.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||n(e)})),M}var Tm={placement:"bottom",modifiers:[],strategy:"absolute"};function hm(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ym(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,M=void 0===i?[]:i,n=t.defaultOptions,o=void 0===n?Tm:n;return function(e,t,i){void 0===i&&(i=o);var n,r,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Tm,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],N=!1,l={state:s,setOptions:function(i){var n="function"==typeof i?i(s.options):i;g(),s.options=Object.assign({},o,s.options,n),s.scrollParents={reference:TE(e)?Mm(e):e.contextElement?Mm(e.contextElement):[],popper:Mm(t)};var r=function(e){var t=dm(e);return IE.reduce((function(e,i){return e.concat(t.filter((function(e){return e.phase===i})))}),[])}(function(e){var t=e.reduce((function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(M,s.options.modifiers)));return s.orderedModifiers=r.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,i=e.options,M=void 0===i?{}:i,n=e.effect;if("function"==typeof n){var o=n({state:s,name:t,instance:l,options:M}),r=function(){};a.push(o||r)}})),l.update()},forceUpdate:function(){if(!N){var e=s.elements,t=e.reference,i=e.popper;if(hm(t,i)){s.rects={reference:zm(t,vE(i),"fixed"===s.options.strategy),popper:wE(i)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var M=0;M<s.orderedModifiers.length;M++)if(!0!==s.reset){var n=s.orderedModifiers[M],o=n.fn,r=n.options,a=void 0===r?{}:r,g=n.name;"function"==typeof o&&(s=o({state:s,options:a,name:g,instance:l})||s)}else s.reset=!1,M=-1}}},update:(n=function(){return new Promise((function(e){l.forceUpdate(),e(s)}))},function(){return r||(r=new Promise((function(e){Promise.resolve().then((function(){r=void 0,e(n())}))}))),r}),destroy:function(){g(),N=!0}};if(!hm(e,t))return l;function g(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(i).then((function(e){!N&&i.onFirstUpdate&&i.onFirstUpdate(e)})),l}}var Am=ym({defaultModifiers:[HE,jm,_E,AE,cm,lm,Im,PE,Dm]}),Om={passive:!0,capture:!0},Lm=function(){return document.body};function xm(e,t,i){if(Array.isArray(e)){var M=e[t];return null==M?Array.isArray(i)?i[t]:i:M}return e}function pm(e,t){var i={}.toString.call(e);return 0===i.indexOf("[object")&&i.indexOf(t+"]")>-1}function Sm(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Em(e,t){return 0===t?e:function(M){clearTimeout(i),i=setTimeout((function(){e(M)}),t)};var i}function mm(e,t){var i=Object.assign({},e);return t.forEach((function(e){delete i[e]})),i}function wm(e){return[].concat(e)}function Qm(e,t){-1===e.indexOf(t)&&e.push(t)}function km(e){return[].slice.call(e)}function Cm(e){return Object.keys(e).reduce((function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t}),{})}function bm(){return document.createElement("div")}function fm(e){return["Element","Fragment"].some((function(t){return pm(e,t)}))}function Um(e){return pm(e,"MouseEvent")}function vm(e){return fm(e)?[e]:function(e){return pm(e,"NodeList")}(e)?km(e):Array.isArray(e)?e:km(document.querySelectorAll(e))}function Ym(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Zm(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Vm(e){var t,i=wm(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}function Wm(e,t,i){var M=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[M](t,i)}))}function Pm(e,t){for(var i=t;i;){var M;if(e.contains(i))return!0;i=null==i.getRootNode||null==(M=i.getRootNode())?void 0:M.host}return!1}var Rm={isTouch:!1},Gm=0;function Bm(){Rm.isTouch||(Rm.isTouch=!0,window.performance&&document.addEventListener("mousemove",_m))}function _m(){var e=performance.now();e-Gm<20&&(Rm.isTouch=!1,document.removeEventListener("mousemove",_m)),Gm=e}function Fm(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var i=t._tippy;t.blur&&!i.state.isVisible&&t.blur()}}var Hm,Jm=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function $m(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Xm(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function qm(e){return Xm("\n %ctippy.js\n\n %c"+Xm(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function Km(e){return[qm(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function ew(e,t){var i;e&&!Hm.has(t)&&(Hm.add(t),(i=console).warn.apply(i,Km(t)))}function tw(e,t){var i;e&&!Hm.has(t)&&(Hm.add(t),(i=console).error.apply(i,Km(t)))}"production"!==process.env.NODE_ENV&&(Hm=new Set);var iw={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Mw=Object.assign({appendTo:Lm,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},iw,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),nw=Object.keys(Mw);function ow(e){var t=(e.plugins||[]).reduce((function(t,i){var M,n=i.name,o=i.defaultValue;n&&(t[n]=void 0!==e[n]?e[n]:null!=(M=Mw[n])?M:o);return t}),{});return Object.assign({},e,t)}function rw(e,t){var i=Object.assign({},t,{content:Sm(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(ow(Object.assign({},Mw,{plugins:t}))):nw).reduce((function(t,i){var M=(e.getAttribute("data-tippy-"+i)||"").trim();if(!M)return t;if("content"===i)t[i]=M;else try{t[i]=JSON.parse(M)}catch(e){t[i]=M}return t}),{})}(e,t.plugins));return i.aria=Object.assign({},Mw.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}function sw(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach((function(e){var i,M,n=mm(Mw,Object.keys(iw)),o=(i=n,M=e,!{}.hasOwnProperty.call(i,M));o&&(o=0===t.filter((function(t){return t.name===e})).length),ew(o,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))}))}function aw(e,t){e.innerHTML=t}function Nw(e){var t=bm();return!0===e?t.className="tippy-arrow":(t.className="tippy-svg-arrow",fm(e)?t.appendChild(e):aw(t,e)),t}function lw(e,t){fm(t.content)?(aw(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?aw(e,t.content):e.textContent=t.content)}function gw(e){var t=e.firstElementChild,i=km(t.children);return{box:t,content:i.find((function(e){return e.classList.contains("tippy-content")})),arrow:i.find((function(e){return e.classList.contains("tippy-arrow")||e.classList.contains("tippy-svg-arrow")})),backdrop:i.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function uw(e){var t=bm(),i=bm();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var M=bm();function n(i,M){var n=gw(t),o=n.box,r=n.content,s=n.arrow;M.theme?o.setAttribute("data-theme",M.theme):o.removeAttribute("data-theme"),"string"==typeof M.animation?o.setAttribute("data-animation",M.animation):o.removeAttribute("data-animation"),M.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof M.maxWidth?M.maxWidth+"px":M.maxWidth,M.role?o.setAttribute("role",M.role):o.removeAttribute("role"),i.content===M.content&&i.allowHTML===M.allowHTML||lw(r,e.props),M.arrow?s?i.arrow!==M.arrow&&(o.removeChild(s),o.appendChild(Nw(M.arrow))):o.appendChild(Nw(M.arrow)):s&&o.removeChild(s)}return M.className="tippy-content",M.setAttribute("data-state","hidden"),lw(M,e.props),t.appendChild(i),i.appendChild(M),n(e.props,e.props),{popper:t,onUpdate:n}}uw.$$tippy=!0;var Dw=1,cw=[],jw=[];function Iw(e,t){var i,M,n,o,r,s,a,N,l=rw(e,Object.assign({},Mw,ow(Cm(t)))),g=!1,u=!1,D=!1,c=!1,j=[],I=Em(F,l.interactiveDebounce),z=Dw++,d=(N=l.plugins).filter((function(e,t){return N.indexOf(e)===t})),T={id:z,reference:e,popper:bm(),popperInstance:null,props:l,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:d,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(M),cancelAnimationFrame(n)},setProps:function(t){"production"!==process.env.NODE_ENV&&ew(T.state.isDestroyed,$m("setProps"));if(T.state.isDestroyed)return;C("onBeforeUpdate",[T,t]),B();var i=T.props,M=rw(e,Object.assign({},i,Cm(t),{ignoreAttributes:!0}));T.props=M,G(),i.interactiveDebounce!==M.interactiveDebounce&&(U(),I=Em(F,M.interactiveDebounce));i.triggerTarget&&!M.triggerTarget?wm(i.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):M.triggerTarget&&e.removeAttribute("aria-expanded");f(),k(),A&&A(i,M);T.popperInstance&&(X(),K().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));C("onAfterUpdate",[T,t])},setContent:function(e){T.setProps({content:e})},show:function(){"production"!==process.env.NODE_ENV&&ew(T.state.isDestroyed,$m("show"));var e=T.state.isVisible,t=T.state.isDestroyed,i=!T.state.isEnabled,M=Rm.isTouch&&!T.props.touch,n=xm(T.props.duration,0,Mw.duration);if(e||t||i||M)return;if(E().hasAttribute("disabled"))return;if(C("onShow",[T],!1),!1===T.props.onShow(T))return;T.state.isVisible=!0,S()&&(y.style.visibility="visible");k(),V(),T.state.isMounted||(y.style.transition="none");if(S()){var o=w(),r=o.box,a=o.content;Ym([r,a],0)}s=function(){var e;if(T.state.isVisible&&!c){if(c=!0,y.offsetHeight,y.style.transition=T.props.moveTransition,S()&&T.props.animation){var t=w(),i=t.box,M=t.content;Ym([i,M],n),Zm([i,M],"visible")}b(),f(),Qm(jw,T),null==(e=T.popperInstance)||e.forceUpdate(),C("onMount",[T]),T.props.animation&&S()&&function(e,t){P(e,t)}(n,(function(){T.state.isShown=!0,C("onShown",[T])}))}},function(){var e,t=T.props.appendTo,i=E();e=T.props.interactive&&t===Lm||"parent"===t?i.parentNode:Sm(t,[i]);e.contains(y)||e.appendChild(y);T.state.isMounted=!0,X(),"production"!==process.env.NODE_ENV&&ew(T.props.interactive&&t===Mw.appendTo&&i.nextElementSibling!==y,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){"production"!==process.env.NODE_ENV&&ew(T.state.isDestroyed,$m("hide"));var e=!T.state.isVisible,t=T.state.isDestroyed,i=!T.state.isEnabled,M=xm(T.props.duration,1,Mw.duration);if(e||t||i)return;if(C("onHide",[T],!1),!1===T.props.onHide(T))return;T.state.isVisible=!1,T.state.isShown=!1,c=!1,g=!1,S()&&(y.style.visibility="hidden");if(U(),W(),k(!0),S()){var n=w(),o=n.box,r=n.content;T.props.animation&&(Ym([o,r],M),Zm([o,r],"hidden"))}b(),f(),T.props.animation?S()&&function(e,t){P(e,(function(){!T.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&t()}))}(M,T.unmount):T.unmount()},hideWithInteractivity:function(e){"production"!==process.env.NODE_ENV&&ew(T.state.isDestroyed,$m("hideWithInteractivity"));m().addEventListener("mousemove",I),Qm(cw,I),I(e)},enable:function(){T.state.isEnabled=!0},disable:function(){T.hide(),T.state.isEnabled=!1},unmount:function(){"production"!==process.env.NODE_ENV&&ew(T.state.isDestroyed,$m("unmount"));T.state.isVisible&&T.hide();if(!T.state.isMounted)return;q(),K().forEach((function(e){e._tippy.unmount()})),y.parentNode&&y.parentNode.removeChild(y);jw=jw.filter((function(e){return e!==T})),T.state.isMounted=!1,C("onHidden",[T])},destroy:function(){"production"!==process.env.NODE_ENV&&ew(T.state.isDestroyed,$m("destroy"));if(T.state.isDestroyed)return;T.clearDelayTimeouts(),T.unmount(),B(),delete e._tippy,T.state.isDestroyed=!0,C("onDestroy",[T])}};if(!l.render)return"production"!==process.env.NODE_ENV&&tw(!0,"render() function has not been supplied."),T;var h=l.render(T),y=h.popper,A=h.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+T.id,T.popper=y,e._tippy=T,y._tippy=T;var O=d.map((function(e){return e.fn(T)})),L=e.hasAttribute("aria-expanded");return G(),f(),k(),C("onCreate",[T]),l.showOnCreate&&ee(),y.addEventListener("mouseenter",(function(){T.props.interactive&&T.state.isVisible&&T.clearDelayTimeouts()})),y.addEventListener("mouseleave",(function(){T.props.interactive&&T.props.trigger.indexOf("mouseenter")>=0&&m().addEventListener("mousemove",I)})),T;function x(){var e=T.props.touch;return Array.isArray(e)?e:[e,0]}function p(){return"hold"===x()[0]}function S(){var e;return!(null==(e=T.props.render)||!e.$$tippy)}function E(){return a||e}function m(){var e=E().parentNode;return e?Vm(e):document}function w(){return gw(y)}function Q(e){return T.state.isMounted&&!T.state.isVisible||Rm.isTouch||o&&"focus"===o.type?0:xm(T.props.delay,e?0:1,Mw.delay)}function k(e){void 0===e&&(e=!1),y.style.pointerEvents=T.props.interactive&&!e?"":"none",y.style.zIndex=""+T.props.zIndex}function C(e,t,i){var M;(void 0===i&&(i=!0),O.forEach((function(i){i[e]&&i[e].apply(i,t)})),i)&&(M=T.props)[e].apply(M,t)}function b(){var t=T.props.aria;if(t.content){var i="aria-"+t.content,M=y.id;wm(T.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(i);if(T.state.isVisible)e.setAttribute(i,t?t+" "+M:M);else{var n=t&&t.replace(M,"").trim();n?e.setAttribute(i,n):e.removeAttribute(i)}}))}}function f(){!L&&T.props.aria.expanded&&wm(T.props.triggerTarget||e).forEach((function(e){T.props.interactive?e.setAttribute("aria-expanded",T.state.isVisible&&e===E()?"true":"false"):e.removeAttribute("aria-expanded")}))}function U(){m().removeEventListener("mousemove",I),cw=cw.filter((function(e){return e!==I}))}function v(t){if(!Rm.isTouch||!D&&"mousedown"!==t.type){var i=t.composedPath&&t.composedPath()[0]||t.target;if(!T.props.interactive||!Pm(y,i)){if(wm(T.props.triggerTarget||e).some((function(e){return Pm(e,i)}))){if(Rm.isTouch)return;if(T.state.isVisible&&T.props.trigger.indexOf("click")>=0)return}else C("onClickOutside",[T,t]);!0===T.props.hideOnClick&&(T.clearDelayTimeouts(),T.hide(),u=!0,setTimeout((function(){u=!1})),T.state.isMounted||W())}}}function Y(){D=!0}function Z(){D=!1}function V(){var e=m();e.addEventListener("mousedown",v,!0),e.addEventListener("touchend",v,Om),e.addEventListener("touchstart",Z,Om),e.addEventListener("touchmove",Y,Om)}function W(){var e=m();e.removeEventListener("mousedown",v,!0),e.removeEventListener("touchend",v,Om),e.removeEventListener("touchstart",Z,Om),e.removeEventListener("touchmove",Y,Om)}function P(e,t){var i=w().box;function M(e){e.target===i&&(Wm(i,"remove",M),t())}if(0===e)return t();Wm(i,"remove",r),Wm(i,"add",M),r=M}function R(t,i,M){void 0===M&&(M=!1),wm(T.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,i,M),j.push({node:e,eventType:t,handler:i,options:M})}))}function G(){var e;p()&&(R("touchstart",_,{passive:!0}),R("touchend",H,{passive:!0})),(e=T.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(R(e,_),e){case"mouseenter":R("mouseleave",H);break;case"focus":R(Jm?"focusout":"blur",J);break;case"focusin":R("focusout",J)}}))}function B(){j.forEach((function(e){var t=e.node,i=e.eventType,M=e.handler,n=e.options;t.removeEventListener(i,M,n)})),j=[]}function _(e){var t,i=!1;if(T.state.isEnabled&&!$(e)&&!u){var M="focus"===(null==(t=o)?void 0:t.type);o=e,a=e.currentTarget,f(),!T.state.isVisible&&Um(e)&&cw.forEach((function(t){return t(e)})),"click"===e.type&&(T.props.trigger.indexOf("mouseenter")<0||g)&&!1!==T.props.hideOnClick&&T.state.isVisible?i=!0:ee(e),"click"===e.type&&(g=!i),i&&!M&&te(e)}}function F(e){var t=e.target,i=E().contains(t)||y.contains(t);if("mousemove"!==e.type||!i){var M=K().concat(y).map((function(e){var t,i=null==(t=e._tippy.popperInstance)?void 0:t.state;return i?{popperRect:e.getBoundingClientRect(),popperState:i,props:l}:null})).filter(Boolean);(function(e,t){var i=t.clientX,M=t.clientY;return e.every((function(e){var t=e.popperRect,n=e.popperState,o=e.props.interactiveBorder,r=n.placement.split("-")[0],s=n.modifiersData.offset;if(!s)return!0;var a="bottom"===r?s.top.y:0,N="top"===r?s.bottom.y:0,l="right"===r?s.left.x:0,g="left"===r?s.right.x:0,u=t.top-M+a>o,D=M-t.bottom-N>o,c=t.left-i+l>o,j=i-t.right-g>o;return u||D||c||j}))})(M,e)&&(U(),te(e))}}function H(e){$(e)||T.props.trigger.indexOf("click")>=0&&g||(T.props.interactive?T.hideWithInteractivity(e):te(e))}function J(e){T.props.trigger.indexOf("focusin")<0&&e.target!==E()||T.props.interactive&&e.relatedTarget&&y.contains(e.relatedTarget)||te(e)}function $(e){return!!Rm.isTouch&&p()!==e.type.indexOf("touch")>=0}function X(){q();var t=T.props,i=t.popperOptions,M=t.placement,n=t.offset,o=t.getReferenceClientRect,r=t.moveTransition,a=S()?gw(y).arrow:null,N=o?{getBoundingClientRect:o,contextElement:o.contextElement||E()}:e,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var i=w().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?i.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?i.setAttribute("data-"+e,""):i.removeAttribute("data-"+e)})),t.attributes.popper={}}}},g=[{name:"offset",options:{offset:n}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!r}},l];S()&&a&&g.push({name:"arrow",options:{element:a,padding:3}}),g.push.apply(g,(null==i?void 0:i.modifiers)||[]),T.popperInstance=Am(N,y,Object.assign({},i,{placement:M,onFirstUpdate:s,modifiers:g}))}function q(){T.popperInstance&&(T.popperInstance.destroy(),T.popperInstance=null)}function K(){return km(y.querySelectorAll("[data-tippy-root]"))}function ee(e){T.clearDelayTimeouts(),e&&C("onTrigger",[T,e]),V();var t=Q(!0),M=x(),n=M[0],o=M[1];Rm.isTouch&&"hold"===n&&o&&(t=o),t?i=setTimeout((function(){T.show()}),t):T.show()}function te(e){if(T.clearDelayTimeouts(),C("onUntrigger",[T,e]),T.state.isVisible){if(!(T.props.trigger.indexOf("mouseenter")>=0&&T.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&g)){var t=Q(!1);t?M=setTimeout((function(){T.state.isVisible&&T.hide()}),t):n=requestAnimationFrame((function(){T.hide()}))}}else W()}}function zw(e,t){void 0===t&&(t={});var i=Mw.plugins.concat(t.plugins||[]);"production"!==process.env.NODE_ENV&&(!function(e){var t=!e,i="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;tw(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),tw(i,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),sw(t,i)),document.addEventListener("touchstart",Bm,Om),window.addEventListener("blur",Fm);var M=Object.assign({},t,{plugins:i}),n=vm(e);if("production"!==process.env.NODE_ENV){var o=fm(M.content),r=n.length>1;ew(o&&r,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "))}var s=n.reduce((function(e,t){var i=t&&Iw(t,M);return i&&e.push(i),e}),[]);return fm(e)?s[0]:s}zw.defaultProps=Mw,zw.setDefaultProps=function(e){"production"!==process.env.NODE_ENV&&sw(e,[]),Object.keys(e).forEach((function(t){Mw[t]=e[t]}))},zw.currentInput=Rm;var dw=Object.assign({},AE,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}}),Tw={clientX:0,clientY:0},hw=[];function yw(e){var t=e.clientX,i=e.clientY;Tw={clientX:t,clientY:i}}var Aw={name:"followCursor",defaultValue:!1,fn:function(e){var t=e.reference,i=Vm(e.props.triggerTarget||t),M=!1,n=!1,o=!0,r=e.props;function s(){return"initial"===e.props.followCursor&&e.state.isVisible}function a(){i.addEventListener("mousemove",g)}function N(){i.removeEventListener("mousemove",g)}function l(){M=!0,e.setProps({getReferenceClientRect:null}),M=!1}function g(i){var M=!i.target||t.contains(i.target),n=e.props.followCursor,o=i.clientX,r=i.clientY,s=t.getBoundingClientRect(),a=o-s.left,N=r-s.top;!M&&e.props.interactive||e.setProps({getReferenceClientRect:function(){var e=t.getBoundingClientRect(),i=o,M=r;"initial"===n&&(i=e.left+a,M=e.top+N);var s="horizontal"===n?e.top:M,l="vertical"===n?e.right:i,g="horizontal"===n?e.bottom:M,u="vertical"===n?e.left:i;return{width:l-u,height:g-s,top:s,right:l,bottom:g,left:u}}})}function u(){e.props.followCursor&&(hw.push({instance:e,doc:i}),function(e){e.addEventListener("mousemove",yw)}(i))}function D(){0===(hw=hw.filter((function(t){return t.instance!==e}))).filter((function(e){return e.doc===i})).length&&function(e){e.removeEventListener("mousemove",yw)}(i)}return{onCreate:u,onDestroy:D,onBeforeUpdate:function(){r=e.props},onAfterUpdate:function(t,i){var o=i.followCursor;M||void 0!==o&&r.followCursor!==o&&(D(),o?(u(),!e.state.isMounted||n||s()||a()):(N(),l()))},onMount:function(){e.props.followCursor&&!n&&(o&&(g(Tw),o=!1),s()||a())},onTrigger:function(e,t){Um(t)&&(Tw={clientX:t.clientX,clientY:t.clientY}),n="focus"===t.type},onHidden:function(){e.props.followCursor&&(l(),N(),o=!0)}}}};function Ow(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&(!!["initial","horizontal","vertical"].includes(String(e))&&e)}function Lw(e){if(Array.isArray(e))return e;if("number"==typeof e)return e;if("string"==typeof e){if(e.includes(",")){const t=e.split(",").map((e=>parseInt(e.trim(),10)));return t}const t=parseInt(e,10);if(!isNaN(t))return t}return 200}zw.setDefaultProps({render:uw});let xw=class extends Ze{constructor(){super(),this.for=null,this.content="",this.size="small",this.duration=200,this.interactive=!1,this.placement="top",this.disabled=!1,this.distance=8,this.skidding=0,this.open=!1,this.trigger="mouseenter focus",this.hoist=!1,this.allowHTML=!1,this.followCursor=!1,this.arrow="default",this.singleton=!1,this.injectTippyStyles()}static get styles(){return[aE]}createRenderRoot(){return this}injectTippyStyles(){const e="nile-light-tooltip-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent='\n .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0; }\n [data-tippy-root] { max-width: calc(100vw - 10px); }\n .tippy-box {\n position: relative;\n background-color: #333;\n color: #fff;\n border-radius: 4px;\n font-size: 14px;\n line-height: 1.4;\n white-space: normal;\n outline: 0;\n transition-property: transform, visibility, opacity;\n }\n\n /* Placement-specific arrows */\n .tippy-box[data-placement^=top] > .tippy-arrow { bottom: 0; }\n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n bottom: -7px;\n border-width: 8px 8px 0;\n border-top-color: initial;\n }\n\n .tippy-box[data-placement^=bottom] > .tippy-arrow { top: 0; }\n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n top: -7px;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n }\n\n .tippy-box[data-placement^=left] > .tippy-arrow { right: 0; }\n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n right: -7px;\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n }\n\n .tippy-box[data-placement^=right] > .tippy-arrow { left: 0; }\n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n }\n\n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11);\n }\n\n .tippy-box.large { font-size: 16px; padding: 8px 12px; }\n .tippy-arrow { width: 16px; height: 16px; color: #333; }\n .tippy-arrow:before {\n content: "";\n position: absolute;\n border-color: transparent;\n border-style: solid;\n }\n\n .tippy-content {\n position: relative;\n padding: 2px 6px;\n z-index: 1;\n }\n\t\t.tippy-box[data-placement^=top]>.tippy-svg-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-svg-arrow:after,.tippy-box[data-placement^=top]>.tippy-svg-arrow>svg{top:16px;transform:rotate(180deg)}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-placement^=left]>.tippy-svg-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-svg-arrow:after,.tippy-box[data-placement^=left]>.tippy-svg-arrow>svg{transform:rotate(90deg);top:calc(50% - 3px);left:11px}.tippy-box[data-placement^=right]>.tippy-svg-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-svg-arrow:after,.tippy-box[data-placement^=right]>.tippy-svg-arrow>svg{transform:rotate(-90deg);top:calc(50% - 3px);right:11px}.tippy-svg-arrow{width:16px;height:16px;fill:#333;text-align:initial}.tippy-svg-arrow,.tippy-svg-arrow>svg{position:absolute}\n ',document.head.appendChild(t)}firstUpdated(){this.attachTooltip()}attachTooltip(){if(this.destroyTooltips(),this.disabled)return;const e={content:this.content||this.getAttribute("data-tippy-content")||void 0,placement:this.placement,trigger:this.trigger,offset:[this.skidding,this.distance],theme:"light",animation:"fade",interactive:this.interactive,arrow:'<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',duration:Lw(this.duration),allowHTML:this.allowHTML,appendTo:this.hoist?document.body:void 0,followCursor:Ow(this.followCursor),plugins:Ow(this.followCursor)?[Aw]:[],onShow:e=>{this.open=!0,this.dispatchEvent(new CustomEvent("nile-show",{detail:{instance:e,target:e.reference}})),this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!0,instance:e,target:e.reference}}))},onHide:e=>{this.open=!1,this.dispatchEvent(new CustomEvent("nile-hide",{detail:{instance:e,target:e.reference}})),this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!1,instance:e,target:e.reference}}))}};if(this.for){if(this.targetEl=document.getElementById(this.for),!this.targetEl)return;this.id||(this.generatedId=`nile-tooltip-${Math.random().toString(36).slice(2,9)}`,this.id=this.generatedId),this.prevDescribedby=this.targetEl.getAttribute("aria-describedby");const t=this.prevDescribedby?`${this.prevDescribedby} ${this.id}`:this.id;return this.targetEl.setAttribute("aria-describedby",t),this.singleInstance=zw(this.targetEl,e),this.size&&this.singleInstance.popper.querySelector(".tippy-box")?.classList.add(this.size),void(this.open&&queueMicrotask((()=>this.singleInstance?.show())))}const t=Array.from(this.querySelectorAll("*"));t.length>0&&(this.tooltipInstances=t.map((t=>{const i=t,M=i.getAttribute("content")||this.content,n=zw(i,{...e,content:M});return n.popper.querySelector(".tippy-box")?.classList.add(this.size),n})),this.singleton&&this.tooltipInstances.length>1&&(this.singletonInstance=function(e,t){var i;void 0===t&&(t={}),"production"!==process.env.NODE_ENV&&tw(!Array.isArray(e),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(e)].join(" "));var M,n=e,o=[],r=[],s=t.overrides,a=[],N=!1;function l(){r=n.map((function(e){return wm(e.props.triggerTarget||e.reference)})).reduce((function(e,t){return e.concat(t)}),[])}function g(){o=n.map((function(e){return e.reference}))}function u(e){n.forEach((function(t){e?t.enable():t.disable()}))}function D(e){return n.map((function(t){var i=t.setProps;return t.setProps=function(n){i(n),t.reference===M&&e.setProps(n)},function(){t.setProps=i}}))}function c(e,t){var i=r.indexOf(t);if(t!==M){M=t;var a=(s||[]).concat("content").reduce((function(e,t){return e[t]=n[i].props[t],e}),{});e.setProps(Object.assign({},a,{getReferenceClientRect:"function"==typeof a.getReferenceClientRect?a.getReferenceClientRect:function(){var e;return null==(e=o[i])?void 0:e.getBoundingClientRect()}}))}}u(!1),g(),l();var j={fn:function(){return{onDestroy:function(){u(!0)},onHidden:function(){M=null},onClickOutside:function(e){e.props.showOnCreate&&!N&&(N=!0,M=null)},onShow:function(e){e.props.showOnCreate&&!N&&(N=!0,c(e,o[0]))},onTrigger:function(e,t){c(e,t.currentTarget)}}}},I=zw(bm(),Object.assign({},mm(t,["overrides"]),{plugins:[j].concat(t.plugins||[]),triggerTarget:r,popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat((null==(i=t.popperOptions)?void 0:i.modifiers)||[],[dw])})})),z=I.show;I.show=function(e){if(z(),!M&&null==e)return c(I,o[0]);if(!M||null!=e){if("number"==typeof e)return o[e]&&c(I,o[e]);if(n.indexOf(e)>=0){var t=e.reference;return c(I,t)}return o.indexOf(e)>=0?c(I,e):void 0}},I.showNext=function(){var e=o[0];if(!M)return I.show(0);var t=o.indexOf(M);I.show(o[t+1]||e)},I.showPrevious=function(){var e=o[o.length-1];if(!M)return I.show(e);var t=o.indexOf(M),i=o[t-1]||e;I.show(i)};var d=I.setProps;return I.setProps=function(e){s=e.overrides||s,d(e)},I.setInstances=function(e){u(!0),a.forEach((function(e){return e()})),n=e,u(!1),g(),l(),a=D(I),I.setProps({triggerTarget:r})},a=D(I),I}(this.tooltipInstances,{delay:[75,0],moveTransition:"transform 0.15s ease-out"})),this.open&&(this.singletonInstance?this.singletonInstance.show():this.tooltipInstances.forEach((e=>e.show()))))}destroyTooltips(){if(this.tooltipInstances?.forEach((e=>e.destroy())),this.singleInstance?.destroy(),this.singletonInstance?.destroy(),this.tooltipInstances=void 0,this.singleInstance=void 0,this.singletonInstance=void 0,this.targetEl&&this.id){const e=this.targetEl.getAttribute("aria-describedby")?.split(" ").filter((e=>e!==this.id)).join(" ").trim();e?this.targetEl.setAttribute("aria-describedby",e):this.targetEl.removeAttribute("aria-describedby")}}disconnectedCallback(){super.disconnectedCallback(),this.destroyTooltips()}updated(e){super.updated(e),["for","content","placement","distance","skidding","trigger","disabled","hoist","size","arrow","singleton"].some((t=>e.has(t)))&&this.attachTooltip(),e.has("open")&&(this.open?(this.singleInstance?.show(),this.singletonInstance?.show(),this.tooltipInstances?.forEach((e=>e.show()))):(this.singleInstance?.hide(),this.singletonInstance?.hide(),this.tooltipInstances?.forEach((e=>e.hide()))))}};e([Ne({type:String,attribute:"for"})],xw.prototype,"for",void 0),e([Ne({type:String,reflect:!0})],xw.prototype,"content",void 0),e([Ne({type:String,reflect:!0})],xw.prototype,"size",void 0),e([Ne({type:String,reflect:!0})],xw.prototype,"duration",void 0),e([Ne({type:Boolean,reflect:!0})],xw.prototype,"interactive",void 0),e([Ne({type:String})],xw.prototype,"placement",void 0),e([Ne({type:Boolean})],xw.prototype,"disabled",void 0),e([Ne({type:Number})],xw.prototype,"distance",void 0),e([Ne({type:Number})],xw.prototype,"skidding",void 0),e([Ne({type:Boolean,reflect:!0})],xw.prototype,"open",void 0),e([Ne({type:String})],xw.prototype,"trigger",void 0),e([Ne({type:Boolean,reflect:!0})],xw.prototype,"hoist",void 0),e([Ne({type:Boolean,reflect:!0})],xw.prototype,"allowHTML",void 0),e([Ne({type:String,reflect:!0,attribute:!0})],xw.prototype,"followCursor",void 0),e([Ne({type:String,reflect:!0,attribute:!0})],xw.prototype,"arrow",void 0),e([Ne({type:Boolean,reflect:!0})],xw.prototype,"singleton",void 0),xw=e([re("nile-light-tooltip")],xw);
15305
+ `;var NE="top",lE="bottom",gE="right",uE="left",DE=[NE,lE,gE,uE],cE=DE.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),jE=[].concat(DE,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),IE=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zE(e){return e?(e.nodeName||"").toLowerCase():null}function dE(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function TE(e){return e instanceof dE(e).Element||e instanceof Element}function hE(e){return e instanceof dE(e).HTMLElement||e instanceof HTMLElement}function yE(e){return"undefined"!=typeof ShadowRoot&&(e instanceof dE(e).ShadowRoot||e instanceof ShadowRoot)}var AE={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},M=t.attributes[e]||{},n=t.elements[e];hE(n)&&zE(n)&&(Object.assign(n.style,i),Object.keys(M).forEach((function(e){var t=M[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var M=t.elements[e],n=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});hE(M)&&zE(M)&&(Object.assign(M.style,o),Object.keys(n).forEach((function(e){M.removeAttribute(e)})))}))}},requires:["computeStyles"]};function OE(e){return e.split("-")[0]}var LE=Math.max,xE=Math.min,pE=Math.round;function SE(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function EE(){return!/^((?!chrome|android).)*safari/i.test(SE())}function mE(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var M=e.getBoundingClientRect(),n=1,o=1;t&&hE(e)&&(n=e.offsetWidth>0&&pE(M.width)/e.offsetWidth||1,o=e.offsetHeight>0&&pE(M.height)/e.offsetHeight||1);var r=(TE(e)?dE(e):window).visualViewport,s=!EE()&&i,a=(M.left+(s&&r?r.offsetLeft:0))/n,N=(M.top+(s&&r?r.offsetTop:0))/o,l=M.width/n,g=M.height/o;return{width:l,height:g,top:N,right:a+l,bottom:N+g,left:a,x:a,y:N}}function wE(e){var t=mE(e),i=e.offsetWidth,M=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-M)<=1&&(M=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:M}}function QE(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&yE(i)){var M=t;do{if(M&&e.isSameNode(M))return!0;M=M.parentNode||M.host}while(M)}return!1}function kE(e){return dE(e).getComputedStyle(e)}function CE(e){return["table","td","th"].indexOf(zE(e))>=0}function bE(e){return((TE(e)?e.ownerDocument:e.document)||window.document).documentElement}function fE(e){return"html"===zE(e)?e:e.assignedSlot||e.parentNode||(yE(e)?e.host:null)||bE(e)}function UE(e){return hE(e)&&"fixed"!==kE(e).position?e.offsetParent:null}function vE(e){for(var t=dE(e),i=UE(e);i&&CE(i)&&"static"===kE(i).position;)i=UE(i);return i&&("html"===zE(i)||"body"===zE(i)&&"static"===kE(i).position)?t:i||function(e){var t=/firefox/i.test(SE());if(/Trident/i.test(SE())&&hE(e)&&"fixed"===kE(e).position)return null;var i=fE(e);for(yE(i)&&(i=i.host);hE(i)&&["html","body"].indexOf(zE(i))<0;){var M=kE(i);if("none"!==M.transform||"none"!==M.perspective||"paint"===M.contain||-1!==["transform","perspective"].indexOf(M.willChange)||t&&"filter"===M.willChange||t&&M.filter&&"none"!==M.filter)return i;i=i.parentNode}return null}(e)||t}function YE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ZE(e,t,i){return LE(e,xE(t,i))}function VE(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function WE(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}var PE={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,M=e.name,n=e.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,s=OE(i.placement),a=YE(s),N=[uE,gE].indexOf(s)>=0?"height":"width";if(o&&r){var l=function(e,t){return VE("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:WE(e,DE))}(n.padding,i),g=wE(o),u="y"===a?NE:uE,D="y"===a?lE:gE,c=i.rects.reference[N]+i.rects.reference[a]-r[a]-i.rects.popper[N],j=r[a]-i.rects.reference[a],I=vE(o),z=I?"y"===a?I.clientHeight||0:I.clientWidth||0:0,d=c/2-j/2,T=l[u],h=z-g[N]-l[D],y=z/2-g[N]/2+d,A=ZE(T,y,h),O=a;i.modifiersData[M]=((t={})[O]=A,t.centerOffset=A-y,t)}},effect:function(e){var t=e.state,i=e.options.element,M=void 0===i?"[data-popper-arrow]":i;null!=M&&("string"!=typeof M||(M=t.elements.popper.querySelector(M)))&&QE(t.elements.popper,M)&&(t.elements.arrow=M)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function RE(e){return e.split("-")[1]}var GE={top:"auto",right:"auto",bottom:"auto",left:"auto"};function BE(e){var t,i=e.popper,M=e.popperRect,n=e.placement,o=e.variation,r=e.offsets,s=e.position,a=e.gpuAcceleration,N=e.adaptive,l=e.roundOffsets,g=e.isFixed,u=r.x,D=void 0===u?0:u,c=r.y,j=void 0===c?0:c,I="function"==typeof l?l({x:D,y:j}):{x:D,y:j};D=I.x,j=I.y;var z=r.hasOwnProperty("x"),d=r.hasOwnProperty("y"),T=uE,h=NE,y=window;if(N){var A=vE(i),O="clientHeight",L="clientWidth";if(A===dE(i)&&"static"!==kE(A=bE(i)).position&&"absolute"===s&&(O="scrollHeight",L="scrollWidth"),n===NE||(n===uE||n===gE)&&"end"===o)h=lE,j-=(g&&A===y&&y.visualViewport?y.visualViewport.height:A[O])-M.height,j*=a?1:-1;if(n===uE||(n===NE||n===lE)&&"end"===o)T=gE,D-=(g&&A===y&&y.visualViewport?y.visualViewport.width:A[L])-M.width,D*=a?1:-1}var x,p=Object.assign({position:s},N&&GE),S=!0===l?function(e,t){var i=e.x,M=e.y,n=t.devicePixelRatio||1;return{x:pE(i*n)/n||0,y:pE(M*n)/n||0}}({x:D,y:j},dE(i)):{x:D,y:j};return D=S.x,j=S.y,a?Object.assign({},p,((x={})[h]=d?"0":"",x[T]=z?"0":"",x.transform=(y.devicePixelRatio||1)<=1?"translate("+D+"px, "+j+"px)":"translate3d("+D+"px, "+j+"px, 0)",x)):Object.assign({},p,((t={})[h]=d?j+"px":"",t[T]=z?D+"px":"",t.transform="",t))}var _E={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,M=i.gpuAcceleration,n=void 0===M||M,o=i.adaptive,r=void 0===o||o,s=i.roundOffsets,a=void 0===s||s,N={placement:OE(t.placement),variation:RE(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,BE(Object.assign({},N,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,BE(Object.assign({},N,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},FE={passive:!0};var HE={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,M=e.options,n=M.scroll,o=void 0===n||n,r=M.resize,s=void 0===r||r,a=dE(t.elements.popper),N=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&N.forEach((function(e){e.addEventListener("scroll",i.update,FE)})),s&&a.addEventListener("resize",i.update,FE),function(){o&&N.forEach((function(e){e.removeEventListener("scroll",i.update,FE)})),s&&a.removeEventListener("resize",i.update,FE)}},data:{}},JE={left:"right",right:"left",bottom:"top",top:"bottom"};function $E(e){return e.replace(/left|right|bottom|top/g,(function(e){return JE[e]}))}var XE={start:"end",end:"start"};function qE(e){return e.replace(/start|end/g,(function(e){return XE[e]}))}function KE(e){var t=dE(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function em(e){return mE(bE(e)).left+KE(e).scrollLeft}function tm(e){var t=kE(e),i=t.overflow,M=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+M)}function im(e){return["html","body","#document"].indexOf(zE(e))>=0?e.ownerDocument.body:hE(e)&&tm(e)?e:im(fE(e))}function Mm(e,t){var i;void 0===t&&(t=[]);var M=im(e),n=M===(null==(i=e.ownerDocument)?void 0:i.body),o=dE(M),r=n?[o].concat(o.visualViewport||[],tm(M)?M:[]):M,s=t.concat(r);return n?s:s.concat(Mm(fE(r)))}function nm(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function om(e,t,i){return"viewport"===t?nm(function(e,t){var i=dE(e),M=bE(e),n=i.visualViewport,o=M.clientWidth,r=M.clientHeight,s=0,a=0;if(n){o=n.width,r=n.height;var N=EE();(N||!N&&"fixed"===t)&&(s=n.offsetLeft,a=n.offsetTop)}return{width:o,height:r,x:s+em(e),y:a}}(e,i)):TE(t)?function(e,t){var i=mE(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}(t,i):nm(function(e){var t,i=bE(e),M=KE(e),n=null==(t=e.ownerDocument)?void 0:t.body,o=LE(i.scrollWidth,i.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=LE(i.scrollHeight,i.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-M.scrollLeft+em(e),a=-M.scrollTop;return"rtl"===kE(n||i).direction&&(s+=LE(i.clientWidth,n?n.clientWidth:0)-o),{width:o,height:r,x:s,y:a}}(bE(e)))}function rm(e,t,i,M){var n="clippingParents"===t?function(e){var t=Mm(fE(e)),i=["absolute","fixed"].indexOf(kE(e).position)>=0&&hE(e)?vE(e):e;return TE(i)?t.filter((function(e){return TE(e)&&QE(e,i)&&"body"!==zE(e)})):[]}(e):[].concat(t),o=[].concat(n,[i]),r=o[0],s=o.reduce((function(t,i){var n=om(e,i,M);return t.top=LE(n.top,t.top),t.right=xE(n.right,t.right),t.bottom=xE(n.bottom,t.bottom),t.left=LE(n.left,t.left),t}),om(e,r,M));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function sm(e){var t,i=e.reference,M=e.element,n=e.placement,o=n?OE(n):null,r=n?RE(n):null,s=i.x+i.width/2-M.width/2,a=i.y+i.height/2-M.height/2;switch(o){case NE:t={x:s,y:i.y-M.height};break;case lE:t={x:s,y:i.y+i.height};break;case gE:t={x:i.x+i.width,y:a};break;case uE:t={x:i.x-M.width,y:a};break;default:t={x:i.x,y:i.y}}var N=o?YE(o):null;if(null!=N){var l="y"===N?"height":"width";switch(r){case"start":t[N]=t[N]-(i[l]/2-M[l]/2);break;case"end":t[N]=t[N]+(i[l]/2-M[l]/2)}}return t}function am(e,t){void 0===t&&(t={});var i=t,M=i.placement,n=void 0===M?e.placement:M,o=i.strategy,r=void 0===o?e.strategy:o,s=i.boundary,a=void 0===s?"clippingParents":s,N=i.rootBoundary,l=void 0===N?"viewport":N,g=i.elementContext,u=void 0===g?"popper":g,D=i.altBoundary,c=void 0!==D&&D,j=i.padding,I=void 0===j?0:j,z=VE("number"!=typeof I?I:WE(I,DE)),d="popper"===u?"reference":"popper",T=e.rects.popper,h=e.elements[c?d:u],y=rm(TE(h)?h:h.contextElement||bE(e.elements.popper),a,l,r),A=mE(e.elements.reference),O=sm({reference:A,element:T,strategy:"absolute",placement:n}),L=nm(Object.assign({},T,O)),x="popper"===u?L:A,p={top:y.top-x.top+z.top,bottom:x.bottom-y.bottom+z.bottom,left:y.left-x.left+z.left,right:x.right-y.right+z.right},S=e.modifiersData.offset;if("popper"===u&&S){var E=S[n];Object.keys(p).forEach((function(e){var t=[gE,lE].indexOf(e)>=0?1:-1,i=[NE,lE].indexOf(e)>=0?"y":"x";p[e]+=E[i]*t}))}return p}function Nm(e,t){void 0===t&&(t={});var i=t,M=i.placement,n=i.boundary,o=i.rootBoundary,r=i.padding,s=i.flipVariations,a=i.allowedAutoPlacements,N=void 0===a?jE:a,l=RE(M),g=l?s?cE:cE.filter((function(e){return RE(e)===l})):DE,u=g.filter((function(e){return N.indexOf(e)>=0}));0===u.length&&(u=g);var D=u.reduce((function(t,i){return t[i]=am(e,{placement:i,boundary:n,rootBoundary:o,padding:r})[OE(i)],t}),{});return Object.keys(D).sort((function(e,t){return D[e]-D[t]}))}var lm={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,M=e.name;if(!t.modifiersData[M]._skip){for(var n=i.mainAxis,o=void 0===n||n,r=i.altAxis,s=void 0===r||r,a=i.fallbackPlacements,N=i.padding,l=i.boundary,g=i.rootBoundary,u=i.altBoundary,D=i.flipVariations,c=void 0===D||D,j=i.allowedAutoPlacements,I=t.options.placement,z=OE(I),d=a||(z===I||!c?[$E(I)]:function(e){if("auto"===OE(e))return[];var t=$E(e);return[qE(e),t,qE(t)]}(I)),T=[I].concat(d).reduce((function(e,i){return e.concat("auto"===OE(i)?Nm(t,{placement:i,boundary:l,rootBoundary:g,padding:N,flipVariations:c,allowedAutoPlacements:j}):i)}),[]),h=t.rects.reference,y=t.rects.popper,A=new Map,O=!0,L=T[0],x=0;x<T.length;x++){var p=T[x],S=OE(p),E="start"===RE(p),m=[NE,lE].indexOf(S)>=0,w=m?"width":"height",Q=am(t,{placement:p,boundary:l,rootBoundary:g,altBoundary:u,padding:N}),k=m?E?gE:uE:E?lE:NE;h[w]>y[w]&&(k=$E(k));var C=$E(k),b=[];if(o&&b.push(Q[S]<=0),s&&b.push(Q[k]<=0,Q[C]<=0),b.every((function(e){return e}))){L=p,O=!1;break}A.set(p,b)}if(O)for(var f=function(e){var t=T.find((function(t){var i=A.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return L=t,"break"},U=c?3:1;U>0;U--){if("break"===f(U))break}t.placement!==L&&(t.modifiersData[M]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function gm(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function um(e){return[NE,gE,lE,uE].some((function(t){return e[t]>=0}))}var Dm={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,M=t.rects.reference,n=t.rects.popper,o=t.modifiersData.preventOverflow,r=am(t,{elementContext:"reference"}),s=am(t,{altBoundary:!0}),a=gm(r,M),N=gm(s,n,o),l=um(a),g=um(N);t.modifiersData[i]={referenceClippingOffsets:a,popperEscapeOffsets:N,isReferenceHidden:l,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":g})}};var cm={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,M=e.name,n=i.offset,o=void 0===n?[0,0]:n,r=jE.reduce((function(e,i){return e[i]=function(e,t,i){var M=OE(e),n=[uE,NE].indexOf(M)>=0?-1:1,o="function"==typeof i?i(Object.assign({},t,{placement:e})):i,r=o[0],s=o[1];return r=r||0,s=(s||0)*n,[uE,gE].indexOf(M)>=0?{x:s,y:r}:{x:r,y:s}}(i,t.rects,o),e}),{}),s=r[t.placement],a=s.x,N=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=N),t.modifiersData[M]=r}};var jm={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=sm({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Im={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,M=e.name,n=i.mainAxis,o=void 0===n||n,r=i.altAxis,s=void 0!==r&&r,a=i.boundary,N=i.rootBoundary,l=i.altBoundary,g=i.padding,u=i.tether,D=void 0===u||u,c=i.tetherOffset,j=void 0===c?0:c,I=am(t,{boundary:a,rootBoundary:N,padding:g,altBoundary:l}),z=OE(t.placement),d=RE(t.placement),T=!d,h=YE(z),y="x"===h?"y":"x",A=t.modifiersData.popperOffsets,O=t.rects.reference,L=t.rects.popper,x="function"==typeof j?j(Object.assign({},t.rects,{placement:t.placement})):j,p="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(A){if(o){var m,w="y"===h?NE:uE,Q="y"===h?lE:gE,k="y"===h?"height":"width",C=A[h],b=C+I[w],f=C-I[Q],U=D?-L[k]/2:0,v="start"===d?O[k]:L[k],Y="start"===d?-L[k]:-O[k],Z=t.elements.arrow,V=D&&Z?wE(Z):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},P=W[w],R=W[Q],G=ZE(0,O[k],V[k]),B=T?O[k]/2-U-G-P-p.mainAxis:v-G-P-p.mainAxis,_=T?-O[k]/2+U+G+R+p.mainAxis:Y+G+R+p.mainAxis,F=t.elements.arrow&&vE(t.elements.arrow),H=F?"y"===h?F.clientTop||0:F.clientLeft||0:0,J=null!=(m=null==S?void 0:S[h])?m:0,$=C+_-J,X=ZE(D?xE(b,C+B-J-H):b,C,D?LE(f,$):f);A[h]=X,E[h]=X-C}if(s){var q,K="x"===h?NE:uE,ee="x"===h?lE:gE,te=A[y],ie="y"===y?"height":"width",Me=te+I[K],ne=te-I[ee],oe=-1!==[NE,uE].indexOf(z),re=null!=(q=null==S?void 0:S[y])?q:0,se=oe?Me:te-O[ie]-L[ie]-re+p.altAxis,ae=oe?te+O[ie]+L[ie]-re-p.altAxis:ne,Ne=D&&oe?function(e,t,i){var M=ZE(e,t,i);return M>i?i:M}(se,te,ae):ZE(D?se:Me,te,D?ae:ne);A[y]=Ne,E[y]=Ne-te}t.modifiersData[M]=E}},requiresIfExists:["offset"]};function zm(e,t,i){void 0===i&&(i=!1);var M,n,o=hE(t),r=hE(t)&&function(e){var t=e.getBoundingClientRect(),i=pE(t.width)/e.offsetWidth||1,M=pE(t.height)/e.offsetHeight||1;return 1!==i||1!==M}(t),s=bE(t),a=mE(e,r,i),N={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!i)&&(("body"!==zE(t)||tm(s))&&(N=(M=t)!==dE(M)&&hE(M)?{scrollLeft:(n=M).scrollLeft,scrollTop:n.scrollTop}:KE(M)),hE(t)?((l=mE(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=em(s))),{x:a.left+N.scrollLeft-l.x,y:a.top+N.scrollTop-l.y,width:a.width,height:a.height}}function dm(e){var t=new Map,i=new Set,M=[];function n(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var M=t.get(e);M&&n(M)}})),M.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||n(e)})),M}var Tm={placement:"bottom",modifiers:[],strategy:"absolute"};function hm(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ym(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,M=void 0===i?[]:i,n=t.defaultOptions,o=void 0===n?Tm:n;return function(e,t,i){void 0===i&&(i=o);var n,r,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Tm,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],N=!1,l={state:s,setOptions:function(i){var n="function"==typeof i?i(s.options):i;g(),s.options=Object.assign({},o,s.options,n),s.scrollParents={reference:TE(e)?Mm(e):e.contextElement?Mm(e.contextElement):[],popper:Mm(t)};var r=function(e){var t=dm(e);return IE.reduce((function(e,i){return e.concat(t.filter((function(e){return e.phase===i})))}),[])}(function(e){var t=e.reduce((function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(M,s.options.modifiers)));return s.orderedModifiers=r.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,i=e.options,M=void 0===i?{}:i,n=e.effect;if("function"==typeof n){var o=n({state:s,name:t,instance:l,options:M}),r=function(){};a.push(o||r)}})),l.update()},forceUpdate:function(){if(!N){var e=s.elements,t=e.reference,i=e.popper;if(hm(t,i)){s.rects={reference:zm(t,vE(i),"fixed"===s.options.strategy),popper:wE(i)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var M=0;M<s.orderedModifiers.length;M++)if(!0!==s.reset){var n=s.orderedModifiers[M],o=n.fn,r=n.options,a=void 0===r?{}:r,g=n.name;"function"==typeof o&&(s=o({state:s,options:a,name:g,instance:l})||s)}else s.reset=!1,M=-1}}},update:(n=function(){return new Promise((function(e){l.forceUpdate(),e(s)}))},function(){return r||(r=new Promise((function(e){Promise.resolve().then((function(){r=void 0,e(n())}))}))),r}),destroy:function(){g(),N=!0}};if(!hm(e,t))return l;function g(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(i).then((function(e){!N&&i.onFirstUpdate&&i.onFirstUpdate(e)})),l}}var Am=ym({defaultModifiers:[HE,jm,_E,AE,cm,lm,Im,PE,Dm]}),Om='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',Lm={passive:!0,capture:!0},xm=function(){return document.body};function pm(e,t,i){if(Array.isArray(e)){var M=e[t];return null==M?Array.isArray(i)?i[t]:i:M}return e}function Sm(e,t){var i={}.toString.call(e);return 0===i.indexOf("[object")&&i.indexOf(t+"]")>-1}function Em(e,t){return"function"==typeof e?e.apply(void 0,t):e}function mm(e,t){return 0===t?e:function(M){clearTimeout(i),i=setTimeout((function(){e(M)}),t)};var i}function wm(e,t){var i=Object.assign({},e);return t.forEach((function(e){delete i[e]})),i}function Qm(e){return[].concat(e)}function km(e,t){-1===e.indexOf(t)&&e.push(t)}function Cm(e){return[].slice.call(e)}function bm(e){return Object.keys(e).reduce((function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t}),{})}function fm(){return document.createElement("div")}function Um(e){return["Element","Fragment"].some((function(t){return Sm(e,t)}))}function vm(e){return Sm(e,"MouseEvent")}function Ym(e){return Um(e)?[e]:function(e){return Sm(e,"NodeList")}(e)?Cm(e):Array.isArray(e)?e:Cm(document.querySelectorAll(e))}function Zm(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Vm(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Wm(e){var t,i=Qm(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}function Pm(e,t,i){var M=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[M](t,i)}))}function Rm(e,t){for(var i=t;i;){var M;if(e.contains(i))return!0;i=null==i.getRootNode||null==(M=i.getRootNode())?void 0:M.host}return!1}var Gm={isTouch:!1},Bm=0;function _m(){Gm.isTouch||(Gm.isTouch=!0,window.performance&&document.addEventListener("mousemove",Fm))}function Fm(){var e=performance.now();e-Bm<20&&(Gm.isTouch=!1,document.removeEventListener("mousemove",Fm)),Bm=e}function Hm(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var i=t._tippy;t.blur&&!i.state.isVisible&&t.blur()}}var Jm,$m=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function Xm(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function qm(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function Km(e){return qm("\n %ctippy.js\n\n %c"+qm(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function ew(e){return[Km(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function tw(e,t){var i;e&&!Jm.has(t)&&(Jm.add(t),(i=console).warn.apply(i,ew(t)))}function iw(e,t){var i;e&&!Jm.has(t)&&(Jm.add(t),(i=console).error.apply(i,ew(t)))}"production"!==process.env.NODE_ENV&&(Jm=new Set);var Mw={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},nw=Object.assign({appendTo:xm,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Mw,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),ow=Object.keys(nw);function rw(e){var t=(e.plugins||[]).reduce((function(t,i){var M,n=i.name,o=i.defaultValue;n&&(t[n]=void 0!==e[n]?e[n]:null!=(M=nw[n])?M:o);return t}),{});return Object.assign({},e,t)}function sw(e,t){var i=Object.assign({},t,{content:Em(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(rw(Object.assign({},nw,{plugins:t}))):ow).reduce((function(t,i){var M=(e.getAttribute("data-tippy-"+i)||"").trim();if(!M)return t;if("content"===i)t[i]=M;else try{t[i]=JSON.parse(M)}catch(e){t[i]=M}return t}),{})}(e,t.plugins));return i.aria=Object.assign({},nw.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}function aw(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach((function(e){var i,M,n=wm(nw,Object.keys(Mw)),o=(i=n,M=e,!{}.hasOwnProperty.call(i,M));o&&(o=0===t.filter((function(t){return t.name===e})).length),tw(o,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))}))}function Nw(e,t){e.innerHTML=t}function lw(e){var t=fm();return!0===e?t.className="tippy-arrow":(t.className="tippy-svg-arrow",Um(e)?t.appendChild(e):Nw(t,e)),t}function gw(e,t){Um(t.content)?(Nw(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Nw(e,t.content):e.textContent=t.content)}function uw(e){var t=e.firstElementChild,i=Cm(t.children);return{box:t,content:i.find((function(e){return e.classList.contains("tippy-content")})),arrow:i.find((function(e){return e.classList.contains("tippy-arrow")||e.classList.contains("tippy-svg-arrow")})),backdrop:i.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function Dw(e){var t=fm(),i=fm();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var M=fm();function n(i,M){var n=uw(t),o=n.box,r=n.content,s=n.arrow;M.theme?o.setAttribute("data-theme",M.theme):o.removeAttribute("data-theme"),"string"==typeof M.animation?o.setAttribute("data-animation",M.animation):o.removeAttribute("data-animation"),M.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof M.maxWidth?M.maxWidth+"px":M.maxWidth,M.role?o.setAttribute("role",M.role):o.removeAttribute("role"),i.content===M.content&&i.allowHTML===M.allowHTML||gw(r,e.props),M.arrow?s?i.arrow!==M.arrow&&(o.removeChild(s),o.appendChild(lw(M.arrow))):o.appendChild(lw(M.arrow)):s&&o.removeChild(s)}return M.className="tippy-content",M.setAttribute("data-state","hidden"),gw(M,e.props),t.appendChild(i),i.appendChild(M),n(e.props,e.props),{popper:t,onUpdate:n}}Dw.$$tippy=!0;var cw=1,jw=[],Iw=[];function zw(e,t){var i,M,n,o,r,s,a,N,l=sw(e,Object.assign({},nw,rw(bm(t)))),g=!1,u=!1,D=!1,c=!1,j=[],I=mm(F,l.interactiveDebounce),z=cw++,d=(N=l.plugins).filter((function(e,t){return N.indexOf(e)===t})),T={id:z,reference:e,popper:fm(),popperInstance:null,props:l,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:d,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(M),cancelAnimationFrame(n)},setProps:function(t){"production"!==process.env.NODE_ENV&&tw(T.state.isDestroyed,Xm("setProps"));if(T.state.isDestroyed)return;C("onBeforeUpdate",[T,t]),B();var i=T.props,M=sw(e,Object.assign({},i,bm(t),{ignoreAttributes:!0}));T.props=M,G(),i.interactiveDebounce!==M.interactiveDebounce&&(U(),I=mm(F,M.interactiveDebounce));i.triggerTarget&&!M.triggerTarget?Qm(i.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):M.triggerTarget&&e.removeAttribute("aria-expanded");f(),k(),A&&A(i,M);T.popperInstance&&(X(),K().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));C("onAfterUpdate",[T,t])},setContent:function(e){T.setProps({content:e})},show:function(){"production"!==process.env.NODE_ENV&&tw(T.state.isDestroyed,Xm("show"));var e=T.state.isVisible,t=T.state.isDestroyed,i=!T.state.isEnabled,M=Gm.isTouch&&!T.props.touch,n=pm(T.props.duration,0,nw.duration);if(e||t||i||M)return;if(E().hasAttribute("disabled"))return;if(C("onShow",[T],!1),!1===T.props.onShow(T))return;T.state.isVisible=!0,S()&&(y.style.visibility="visible");k(),V(),T.state.isMounted||(y.style.transition="none");if(S()){var o=w(),r=o.box,a=o.content;Zm([r,a],0)}s=function(){var e;if(T.state.isVisible&&!c){if(c=!0,y.offsetHeight,y.style.transition=T.props.moveTransition,S()&&T.props.animation){var t=w(),i=t.box,M=t.content;Zm([i,M],n),Vm([i,M],"visible")}b(),f(),km(Iw,T),null==(e=T.popperInstance)||e.forceUpdate(),C("onMount",[T]),T.props.animation&&S()&&function(e,t){P(e,t)}(n,(function(){T.state.isShown=!0,C("onShown",[T])}))}},function(){var e,t=T.props.appendTo,i=E();e=T.props.interactive&&t===xm||"parent"===t?i.parentNode:Em(t,[i]);e.contains(y)||e.appendChild(y);T.state.isMounted=!0,X(),"production"!==process.env.NODE_ENV&&tw(T.props.interactive&&t===nw.appendTo&&i.nextElementSibling!==y,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){"production"!==process.env.NODE_ENV&&tw(T.state.isDestroyed,Xm("hide"));var e=!T.state.isVisible,t=T.state.isDestroyed,i=!T.state.isEnabled,M=pm(T.props.duration,1,nw.duration);if(e||t||i)return;if(C("onHide",[T],!1),!1===T.props.onHide(T))return;T.state.isVisible=!1,T.state.isShown=!1,c=!1,g=!1,S()&&(y.style.visibility="hidden");if(U(),W(),k(!0),S()){var n=w(),o=n.box,r=n.content;T.props.animation&&(Zm([o,r],M),Vm([o,r],"hidden"))}b(),f(),T.props.animation?S()&&function(e,t){P(e,(function(){!T.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&t()}))}(M,T.unmount):T.unmount()},hideWithInteractivity:function(e){"production"!==process.env.NODE_ENV&&tw(T.state.isDestroyed,Xm("hideWithInteractivity"));m().addEventListener("mousemove",I),km(jw,I),I(e)},enable:function(){T.state.isEnabled=!0},disable:function(){T.hide(),T.state.isEnabled=!1},unmount:function(){"production"!==process.env.NODE_ENV&&tw(T.state.isDestroyed,Xm("unmount"));T.state.isVisible&&T.hide();if(!T.state.isMounted)return;q(),K().forEach((function(e){e._tippy.unmount()})),y.parentNode&&y.parentNode.removeChild(y);Iw=Iw.filter((function(e){return e!==T})),T.state.isMounted=!1,C("onHidden",[T])},destroy:function(){"production"!==process.env.NODE_ENV&&tw(T.state.isDestroyed,Xm("destroy"));if(T.state.isDestroyed)return;T.clearDelayTimeouts(),T.unmount(),B(),delete e._tippy,T.state.isDestroyed=!0,C("onDestroy",[T])}};if(!l.render)return"production"!==process.env.NODE_ENV&&iw(!0,"render() function has not been supplied."),T;var h=l.render(T),y=h.popper,A=h.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+T.id,T.popper=y,e._tippy=T,y._tippy=T;var O=d.map((function(e){return e.fn(T)})),L=e.hasAttribute("aria-expanded");return G(),f(),k(),C("onCreate",[T]),l.showOnCreate&&ee(),y.addEventListener("mouseenter",(function(){T.props.interactive&&T.state.isVisible&&T.clearDelayTimeouts()})),y.addEventListener("mouseleave",(function(){T.props.interactive&&T.props.trigger.indexOf("mouseenter")>=0&&m().addEventListener("mousemove",I)})),T;function x(){var e=T.props.touch;return Array.isArray(e)?e:[e,0]}function p(){return"hold"===x()[0]}function S(){var e;return!(null==(e=T.props.render)||!e.$$tippy)}function E(){return a||e}function m(){var e=E().parentNode;return e?Wm(e):document}function w(){return uw(y)}function Q(e){return T.state.isMounted&&!T.state.isVisible||Gm.isTouch||o&&"focus"===o.type?0:pm(T.props.delay,e?0:1,nw.delay)}function k(e){void 0===e&&(e=!1),y.style.pointerEvents=T.props.interactive&&!e?"":"none",y.style.zIndex=""+T.props.zIndex}function C(e,t,i){var M;(void 0===i&&(i=!0),O.forEach((function(i){i[e]&&i[e].apply(i,t)})),i)&&(M=T.props)[e].apply(M,t)}function b(){var t=T.props.aria;if(t.content){var i="aria-"+t.content,M=y.id;Qm(T.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(i);if(T.state.isVisible)e.setAttribute(i,t?t+" "+M:M);else{var n=t&&t.replace(M,"").trim();n?e.setAttribute(i,n):e.removeAttribute(i)}}))}}function f(){!L&&T.props.aria.expanded&&Qm(T.props.triggerTarget||e).forEach((function(e){T.props.interactive?e.setAttribute("aria-expanded",T.state.isVisible&&e===E()?"true":"false"):e.removeAttribute("aria-expanded")}))}function U(){m().removeEventListener("mousemove",I),jw=jw.filter((function(e){return e!==I}))}function v(t){if(!Gm.isTouch||!D&&"mousedown"!==t.type){var i=t.composedPath&&t.composedPath()[0]||t.target;if(!T.props.interactive||!Rm(y,i)){if(Qm(T.props.triggerTarget||e).some((function(e){return Rm(e,i)}))){if(Gm.isTouch)return;if(T.state.isVisible&&T.props.trigger.indexOf("click")>=0)return}else C("onClickOutside",[T,t]);!0===T.props.hideOnClick&&(T.clearDelayTimeouts(),T.hide(),u=!0,setTimeout((function(){u=!1})),T.state.isMounted||W())}}}function Y(){D=!0}function Z(){D=!1}function V(){var e=m();e.addEventListener("mousedown",v,!0),e.addEventListener("touchend",v,Lm),e.addEventListener("touchstart",Z,Lm),e.addEventListener("touchmove",Y,Lm)}function W(){var e=m();e.removeEventListener("mousedown",v,!0),e.removeEventListener("touchend",v,Lm),e.removeEventListener("touchstart",Z,Lm),e.removeEventListener("touchmove",Y,Lm)}function P(e,t){var i=w().box;function M(e){e.target===i&&(Pm(i,"remove",M),t())}if(0===e)return t();Pm(i,"remove",r),Pm(i,"add",M),r=M}function R(t,i,M){void 0===M&&(M=!1),Qm(T.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,i,M),j.push({node:e,eventType:t,handler:i,options:M})}))}function G(){var e;p()&&(R("touchstart",_,{passive:!0}),R("touchend",H,{passive:!0})),(e=T.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(R(e,_),e){case"mouseenter":R("mouseleave",H);break;case"focus":R($m?"focusout":"blur",J);break;case"focusin":R("focusout",J)}}))}function B(){j.forEach((function(e){var t=e.node,i=e.eventType,M=e.handler,n=e.options;t.removeEventListener(i,M,n)})),j=[]}function _(e){var t,i=!1;if(T.state.isEnabled&&!$(e)&&!u){var M="focus"===(null==(t=o)?void 0:t.type);o=e,a=e.currentTarget,f(),!T.state.isVisible&&vm(e)&&jw.forEach((function(t){return t(e)})),"click"===e.type&&(T.props.trigger.indexOf("mouseenter")<0||g)&&!1!==T.props.hideOnClick&&T.state.isVisible?i=!0:ee(e),"click"===e.type&&(g=!i),i&&!M&&te(e)}}function F(e){var t=e.target,i=E().contains(t)||y.contains(t);if("mousemove"!==e.type||!i){var M=K().concat(y).map((function(e){var t,i=null==(t=e._tippy.popperInstance)?void 0:t.state;return i?{popperRect:e.getBoundingClientRect(),popperState:i,props:l}:null})).filter(Boolean);(function(e,t){var i=t.clientX,M=t.clientY;return e.every((function(e){var t=e.popperRect,n=e.popperState,o=e.props.interactiveBorder,r=n.placement.split("-")[0],s=n.modifiersData.offset;if(!s)return!0;var a="bottom"===r?s.top.y:0,N="top"===r?s.bottom.y:0,l="right"===r?s.left.x:0,g="left"===r?s.right.x:0,u=t.top-M+a>o,D=M-t.bottom-N>o,c=t.left-i+l>o,j=i-t.right-g>o;return u||D||c||j}))})(M,e)&&(U(),te(e))}}function H(e){$(e)||T.props.trigger.indexOf("click")>=0&&g||(T.props.interactive?T.hideWithInteractivity(e):te(e))}function J(e){T.props.trigger.indexOf("focusin")<0&&e.target!==E()||T.props.interactive&&e.relatedTarget&&y.contains(e.relatedTarget)||te(e)}function $(e){return!!Gm.isTouch&&p()!==e.type.indexOf("touch")>=0}function X(){q();var t=T.props,i=t.popperOptions,M=t.placement,n=t.offset,o=t.getReferenceClientRect,r=t.moveTransition,a=S()?uw(y).arrow:null,N=o?{getBoundingClientRect:o,contextElement:o.contextElement||E()}:e,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var i=w().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?i.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?i.setAttribute("data-"+e,""):i.removeAttribute("data-"+e)})),t.attributes.popper={}}}},g=[{name:"offset",options:{offset:n}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!r}},l];S()&&a&&g.push({name:"arrow",options:{element:a,padding:3}}),g.push.apply(g,(null==i?void 0:i.modifiers)||[]),T.popperInstance=Am(N,y,Object.assign({},i,{placement:M,onFirstUpdate:s,modifiers:g}))}function q(){T.popperInstance&&(T.popperInstance.destroy(),T.popperInstance=null)}function K(){return Cm(y.querySelectorAll("[data-tippy-root]"))}function ee(e){T.clearDelayTimeouts(),e&&C("onTrigger",[T,e]),V();var t=Q(!0),M=x(),n=M[0],o=M[1];Gm.isTouch&&"hold"===n&&o&&(t=o),t?i=setTimeout((function(){T.show()}),t):T.show()}function te(e){if(T.clearDelayTimeouts(),C("onUntrigger",[T,e]),T.state.isVisible){if(!(T.props.trigger.indexOf("mouseenter")>=0&&T.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&g)){var t=Q(!1);t?M=setTimeout((function(){T.state.isVisible&&T.hide()}),t):n=requestAnimationFrame((function(){T.hide()}))}}else W()}}function dw(e,t){void 0===t&&(t={});var i=nw.plugins.concat(t.plugins||[]);"production"!==process.env.NODE_ENV&&(!function(e){var t=!e,i="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;iw(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),iw(i,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),aw(t,i)),document.addEventListener("touchstart",_m,Lm),window.addEventListener("blur",Hm);var M=Object.assign({},t,{plugins:i}),n=Ym(e);if("production"!==process.env.NODE_ENV){var o=Um(M.content),r=n.length>1;tw(o&&r,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "))}var s=n.reduce((function(e,t){var i=t&&zw(t,M);return i&&e.push(i),e}),[]);return Um(e)?s[0]:s}dw.defaultProps=nw,dw.setDefaultProps=function(e){"production"!==process.env.NODE_ENV&&aw(e,[]),Object.keys(e).forEach((function(t){nw[t]=e[t]}))},dw.currentInput=Gm;var Tw=Object.assign({},AE,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}}),hw={clientX:0,clientY:0},yw=[];function Aw(e){var t=e.clientX,i=e.clientY;hw={clientX:t,clientY:i}}var Ow={name:"followCursor",defaultValue:!1,fn:function(e){var t=e.reference,i=Wm(e.props.triggerTarget||t),M=!1,n=!1,o=!0,r=e.props;function s(){return"initial"===e.props.followCursor&&e.state.isVisible}function a(){i.addEventListener("mousemove",g)}function N(){i.removeEventListener("mousemove",g)}function l(){M=!0,e.setProps({getReferenceClientRect:null}),M=!1}function g(i){var M=!i.target||t.contains(i.target),n=e.props.followCursor,o=i.clientX,r=i.clientY,s=t.getBoundingClientRect(),a=o-s.left,N=r-s.top;!M&&e.props.interactive||e.setProps({getReferenceClientRect:function(){var e=t.getBoundingClientRect(),i=o,M=r;"initial"===n&&(i=e.left+a,M=e.top+N);var s="horizontal"===n?e.top:M,l="vertical"===n?e.right:i,g="horizontal"===n?e.bottom:M,u="vertical"===n?e.left:i;return{width:l-u,height:g-s,top:s,right:l,bottom:g,left:u}}})}function u(){e.props.followCursor&&(yw.push({instance:e,doc:i}),function(e){e.addEventListener("mousemove",Aw)}(i))}function D(){0===(yw=yw.filter((function(t){return t.instance!==e}))).filter((function(e){return e.doc===i})).length&&function(e){e.removeEventListener("mousemove",Aw)}(i)}return{onCreate:u,onDestroy:D,onBeforeUpdate:function(){r=e.props},onAfterUpdate:function(t,i){var o=i.followCursor;M||void 0!==o&&r.followCursor!==o&&(D(),o?(u(),!e.state.isMounted||n||s()||a()):(N(),l()))},onMount:function(){e.props.followCursor&&!n&&(o&&(g(hw),o=!1),s()||a())},onTrigger:function(e,t){vm(t)&&(hw={clientX:t.clientX,clientY:t.clientY}),n="focus"===t.type},onHidden:function(){e.props.followCursor&&(l(),N(),o=!0)}}}};function Lw(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&(!!["initial","horizontal","vertical"].includes(String(e))&&e)}function xw(e){if(Array.isArray(e))return e;if("number"==typeof e)return e;if("string"==typeof e){if(e.includes(",")){const t=e.split(",").map((e=>parseInt(e.trim(),10)));return t}const t=parseInt(e,10);if(!isNaN(t))return t}return 200}dw.setDefaultProps({render:Dw});let pw=class extends Ze{constructor(){super(),this.for=null,this.content="",this.size="small",this.duration=200,this.interactive=!1,this.placement="top",this.disabled=!1,this.distance=8,this.skidding=0,this.open=!1,this.trigger="mouseenter focus",this.hoist=!1,this.allowHTML=!1,this.followCursor=!1,this.arrow="default",this.singleton=!1,this.delay=0,this.maxWidth="auto",this.zIndex=9999,this.hideOnClick=!0,this.inertia=!1,this.interactiveBorder=2,this.injectTippyStyles()}static get styles(){return[aE]}createRenderRoot(){return this}injectTippyStyles(){const e="nile-light-tooltip-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent='\n .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0; }\n [data-tippy-root] { max-width: calc(100vw - 10px); }\n .tippy-box {\n position: relative;\n background-color: #333;\n color: #fff;\n border-radius: 4px;\n font-size: 14px;\n line-height: 1.4;\n white-space: normal;\n outline: 0;\n transition-property: transform, visibility, opacity;\n }\n\n /* Placement-specific arrows */\n .tippy-box[data-placement^=top] > .tippy-arrow { bottom: 0; }\n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n bottom: -7px;\n border-width: 8px 8px 0;\n border-top-color: initial;\n }\n\n .tippy-box[data-placement^=bottom] > .tippy-arrow { top: 0; }\n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n top: -7px;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n }\n\n .tippy-box[data-placement^=left] > .tippy-arrow { right: 0; }\n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n right: -7px;\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n }\n\n .tippy-box[data-placement^=right] > .tippy-arrow { left: 0; }\n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n }\n\n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11);\n }\n\n .tippy-box.large { font-size: 16px; padding: 8px 12px; }\n .tippy-arrow { width: 16px; height: 16px; color: #333; }\n .tippy-arrow:before {\n content: "";\n position: absolute;\n border-color: transparent;\n border-style: solid;\n }\n\n .tippy-content {\n position: relative;\n padding: 2px 6px;\n z-index: 1;\n }\n\t\t.tippy-box[data-placement^=top]>.tippy-svg-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-svg-arrow:after,.tippy-box[data-placement^=top]>.tippy-svg-arrow>svg{top:16px;transform:rotate(180deg)}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-placement^=left]>.tippy-svg-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-svg-arrow:after,.tippy-box[data-placement^=left]>.tippy-svg-arrow>svg{transform:rotate(90deg);top:calc(50% - 3px);left:11px}.tippy-box[data-placement^=right]>.tippy-svg-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-svg-arrow:after,.tippy-box[data-placement^=right]>.tippy-svg-arrow>svg{transform:rotate(-90deg);top:calc(50% - 3px);right:11px}.tippy-svg-arrow{width:16px;height:16px;fill:#333;text-align:initial}.tippy-svg-arrow,.tippy-svg-arrow>svg{position:absolute}\n ',document.head.appendChild(t)}firstUpdated(){this.attachTooltip()}attachTooltip(){if(this.destroyTooltips(),this.disabled)return;const e={content:this.content||this.getAttribute("data-tippy-content")||void 0,placement:this.placement,trigger:this.trigger,offset:[this.skidding,this.distance],theme:"light",animation:"fade",interactive:this.interactive,arrow:Om,duration:xw(this.duration),allowHTML:this.allowHTML,delay:this.delay,maxWidth:this.maxWidth,zIndex:this.zIndex,hideOnClick:this.hideOnClick,inertia:this.inertia,interactiveBorder:this.interactiveBorder,appendTo:this.hoist?document.body:void 0,followCursor:Lw(this.followCursor),plugins:Lw(this.followCursor)?[Ow]:[],onShow:e=>{this.open=!0,this.dispatchEvent(new CustomEvent("nile-show",{detail:{instance:e,target:e.reference}})),this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!0,instance:e,target:e.reference}}))},onHide:e=>{this.open=!1,this.dispatchEvent(new CustomEvent("nile-hide",{detail:{instance:e,target:e.reference}})),this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!1,instance:e,target:e.reference}}))}};if(this.for){if(this.targetEl=document.getElementById(this.for),!this.targetEl)return;this.id||(this.generatedId=`nile-tooltip-${Math.random().toString(36).slice(2,9)}`,this.id=this.generatedId),this.prevDescribedby=this.targetEl.getAttribute("aria-describedby");const t=this.prevDescribedby?`${this.prevDescribedby} ${this.id}`:this.id;return this.targetEl.setAttribute("aria-describedby",t),this.singleInstance=dw(this.targetEl,e),this.size&&this.singleInstance.popper.querySelector(".tippy-box")?.classList.add(this.size),void(this.open&&queueMicrotask((()=>this.singleInstance?.show())))}const t=Array.from(this.querySelectorAll("*"));t.length>0&&(this.tooltipInstances=t.map((t=>{const i=t,M=i.getAttribute("content")||this.content,n=dw(i,{...e,content:M});return n.popper.querySelector(".tippy-box")?.classList.add(this.size),n})),this.singleton&&this.tooltipInstances.length>1&&(this.singletonInstance=function(e,t){var i;void 0===t&&(t={}),"production"!==process.env.NODE_ENV&&iw(!Array.isArray(e),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(e)].join(" "));var M,n=e,o=[],r=[],s=t.overrides,a=[],N=!1;function l(){r=n.map((function(e){return Qm(e.props.triggerTarget||e.reference)})).reduce((function(e,t){return e.concat(t)}),[])}function g(){o=n.map((function(e){return e.reference}))}function u(e){n.forEach((function(t){e?t.enable():t.disable()}))}function D(e){return n.map((function(t){var i=t.setProps;return t.setProps=function(n){i(n),t.reference===M&&e.setProps(n)},function(){t.setProps=i}}))}function c(e,t){var i=r.indexOf(t);if(t!==M){M=t;var a=(s||[]).concat("content").reduce((function(e,t){return e[t]=n[i].props[t],e}),{});e.setProps(Object.assign({},a,{getReferenceClientRect:"function"==typeof a.getReferenceClientRect?a.getReferenceClientRect:function(){var e;return null==(e=o[i])?void 0:e.getBoundingClientRect()}}))}}u(!1),g(),l();var j={fn:function(){return{onDestroy:function(){u(!0)},onHidden:function(){M=null},onClickOutside:function(e){e.props.showOnCreate&&!N&&(N=!0,M=null)},onShow:function(e){e.props.showOnCreate&&!N&&(N=!0,c(e,o[0]))},onTrigger:function(e,t){c(e,t.currentTarget)}}}},I=dw(fm(),Object.assign({},wm(t,["overrides"]),{plugins:[j].concat(t.plugins||[]),triggerTarget:r,popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat((null==(i=t.popperOptions)?void 0:i.modifiers)||[],[Tw])})})),z=I.show;I.show=function(e){if(z(),!M&&null==e)return c(I,o[0]);if(!M||null!=e){if("number"==typeof e)return o[e]&&c(I,o[e]);if(n.indexOf(e)>=0){var t=e.reference;return c(I,t)}return o.indexOf(e)>=0?c(I,e):void 0}},I.showNext=function(){var e=o[0];if(!M)return I.show(0);var t=o.indexOf(M);I.show(o[t+1]||e)},I.showPrevious=function(){var e=o[o.length-1];if(!M)return I.show(e);var t=o.indexOf(M),i=o[t-1]||e;I.show(i)};var d=I.setProps;return I.setProps=function(e){s=e.overrides||s,d(e)},I.setInstances=function(e){u(!0),a.forEach((function(e){return e()})),n=e,u(!1),g(),l(),a=D(I),I.setProps({triggerTarget:r})},a=D(I),I}(this.tooltipInstances,{delay:[75,0],arrow:Om,moveTransition:"transform 0.15s ease-out"})),this.open&&(this.singletonInstance?this.singletonInstance.show():this.tooltipInstances.forEach((e=>e.show()))))}destroyTooltips(){if(this.tooltipInstances?.forEach((e=>e.destroy())),this.singleInstance?.destroy(),this.singletonInstance?.destroy(),this.tooltipInstances=void 0,this.singleInstance=void 0,this.singletonInstance=void 0,this.targetEl&&this.id){const e=this.targetEl.getAttribute("aria-describedby")?.split(" ").filter((e=>e!==this.id)).join(" ").trim();e?this.targetEl.setAttribute("aria-describedby",e):this.targetEl.removeAttribute("aria-describedby")}}disconnectedCallback(){super.disconnectedCallback(),this.destroyTooltips()}updated(e){super.updated(e),["for","content","placement","distance","skidding","trigger","disabled","hoist","size","arrow","singleton"].some((t=>e.has(t)))&&this.attachTooltip(),e.has("open")&&(this.open?(this.singleInstance?.show(),this.singletonInstance?.show(),this.tooltipInstances?.forEach((e=>e.show()))):(this.singleInstance?.hide(),this.singletonInstance?.hide(),this.tooltipInstances?.forEach((e=>e.hide()))))}};e([Ne({type:String,attribute:"for"})],pw.prototype,"for",void 0),e([Ne({type:String,reflect:!0})],pw.prototype,"content",void 0),e([Ne({type:String,reflect:!0})],pw.prototype,"size",void 0),e([Ne({type:String,reflect:!0})],pw.prototype,"duration",void 0),e([Ne({type:Boolean,reflect:!0})],pw.prototype,"interactive",void 0),e([Ne({type:String})],pw.prototype,"placement",void 0),e([Ne({type:Boolean})],pw.prototype,"disabled",void 0),e([Ne({type:Number})],pw.prototype,"distance",void 0),e([Ne({type:Number})],pw.prototype,"skidding",void 0),e([Ne({type:Boolean,reflect:!0})],pw.prototype,"open",void 0),e([Ne({type:String})],pw.prototype,"trigger",void 0),e([Ne({type:Boolean,reflect:!0})],pw.prototype,"hoist",void 0),e([Ne({type:Boolean,reflect:!0})],pw.prototype,"allowHTML",void 0),e([Ne({type:String,reflect:!0,attribute:!0})],pw.prototype,"followCursor",void 0),e([Ne({type:String,reflect:!0,attribute:!0})],pw.prototype,"arrow",void 0),e([Ne({type:Boolean,reflect:!0})],pw.prototype,"singleton",void 0),e([Ne({type:String,reflect:!0})],pw.prototype,"delay",void 0),e([Ne({type:String,reflect:!0})],pw.prototype,"maxWidth",void 0),e([Ne({type:Number})],pw.prototype,"zIndex",void 0),e([Ne({type:[Boolean,String],reflect:!0})],pw.prototype,"hideOnClick",void 0),e([Ne({type:Boolean,reflect:!0})],pw.prototype,"inertia",void 0),e([Ne({type:Number})],pw.prototype,"interactiveBorder",void 0),pw=e([re("nile-light-tooltip")],pw);
15306
15306
  /**
15307
15307
  * @license
15308
15308
  * Copyright 2021 Google LLC
15309
15309
  * SPDX-License-Identifier: BSD-3-Clause
15310
15310
  */
15311
- class pw{constructor(e){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,!0===e?.roundAverageSize&&(this._roundAverageSize=!0)}set(e,t){const i=this._map.get(e)||0;this._map.set(e,t),this.totalSize+=t-i}get averageSize(){if(this._map.size>0){const e=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(e):e}return 0}getSize(e){return this._map.get(e)}clear(){this._map.clear(),this.totalSize=0}}
15311
+ class Sw{constructor(e){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,!0===e?.roundAverageSize&&(this._roundAverageSize=!0)}set(e,t){const i=this._map.get(e)||0;this._map.set(e,t),this.totalSize+=t-i}get averageSize(){if(this._map.size>0){const e=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(e):e}return 0}getSize(e){return this._map.get(e)}clear(){this._map.clear(),this.totalSize=0}}
15312
15312
  /**
15313
15313
  * @license
15314
15314
  * Copyright 2021 Google LLC
15315
15315
  * SPDX-License-Identifier: BSD-3-Clause
15316
- */function Sw(e){return"horizontal"===e?"width":"height"}
15316
+ */function Ew(e){return"horizontal"===e?"width":"height"}
15317
15317
  /**
15318
15318
  * @license
15319
15319
  * Copyright 2021 Google LLC
15320
15320
  * SPDX-License-Identifier: BSD-3-Clause
15321
15321
  */
15322
- function Ew(e){return"horizontal"===e?"marginLeft":"marginTop"}function mw(e){return"horizontal"===e?"marginRight":"marginBottom"}function ww(e,t){const i=[e,t].sort();return i[1]<=0?Math.min(...i):i[0]>=0?Math.max(...i):i[0]+i[1]}class Qw{constructor(){this._childSizeCache=new pw,this._marginSizeCache=new pw,this._metricsCache=new Map}update(e,t){const i=new Set;Object.keys(e).forEach((M=>{const n=Number(M);this._metricsCache.set(n,e[n]),this._childSizeCache.set(n,e[n][Sw(t)]),i.add(n),i.add(n+1)}));for(const e of i){const i=this._metricsCache.get(e)?.[Ew(t)]||0,M=this._metricsCache.get(e-1)?.[mw(t)]||0;this._marginSizeCache.set(e,ww(i,M))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(e,t){return this._metricsCache.get(e)?.[Ew(t)]||0}getChildSize(e){return this._childSizeCache.getSize(e)}getMarginSize(e){return this._marginSizeCache.getSize(e)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}}var kw=Object.freeze({__proto__:null,FlowLayout:class extends class{_getDefaultConfig(){return{direction:"vertical"}}constructor(e,t){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=e,Promise.resolve().then((()=>this.config=t||this._getDefaultConfig()))}set config(e){Object.assign(this,Object.assign({},this._getDefaultConfig(),e))}get config(){return{direction:this.direction}}get items(){return this._items}set items(e){this._setItems(e)}_setItems(e){e!==this._items&&(this._items=e,this._scheduleReflow())}get direction(){return this._direction}set direction(e){(e="horizontal"===e?e:"vertical")!==this._direction&&(this._direction=e,this._sizeDim="horizontal"===e?"width":"height",this._secondarySizeDim="horizontal"===e?"height":"width",this._positionDim="horizontal"===e?"left":"top",this._secondaryPositionDim="horizontal"===e?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(e){const{_viewDim1:t,_viewDim2:i}=this;Object.assign(this._viewportSize,e),i!==this._viewDim2?this._scheduleLayoutUpdate():t!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(e){Object.assign(this._latestCoords,e);const t=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim];Math.abs(t-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(e=!1){(e||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(e){this._pin=e,this._triggerReflow()}get pin(){if(null!==this._pin){const{index:e,block:t}=this._pin;return{index:Math.max(0,Math.min(e,this.items.length-1)),block:t}}return null}_clampScrollPosition(e){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(e,this.totalScrollSize[Sw(this.direction)]-this._viewDim1))}unpin(){null!==this._pin&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then((()=>this.reflowIfNeeded()))}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(null!==this.pin){const e=this._scrollPosition,{index:t,block:i}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:t,block:i||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=e-this._scrollPosition}}_calculateScrollIntoViewPosition(e){const{block:t}=e,i=Math.min(this.items.length,Math.max(0,e.index)),M=this._getItemPosition(i)[this._positionDim];let n=M;if("start"!==t){const e=this._getItemSize(i)[this._sizeDim];if("center"===t)n=M-.5*this._viewDim1+.5*e;else{const i=M-this._viewDim1+e;if("end"===t)n=i;else{const e=this._scrollPosition;n=Math.abs(e-M)<Math.abs(e-i)?M:i}}}return n+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(n)}getScrollIntoViewCoordinates(e){return{[this._positionDim]:this._calculateScrollIntoViewPosition(e)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){const e=new Map;if(-1!==this._first&&-1!==this._last)for(let t=this._first;t<=this._last;t++)e.set(t,this._getItemPosition(t));const t={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:e};this._scrollError&&(t.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(t)}get _num(){return-1===this._first||-1===this._last?0:this._last-this._first+1}_checkThresholds(){if(0===this._viewDim1&&this._num>0||null!==this._pin)this._scheduleReflow();else{const e=Math.max(0,this._scrollPosition-this._overhang),t=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>e||this._physicalMax<t?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(e){if(-1===this._first||-1===this._last)return;let t=this._first;for(;t<this._last&&Math.round(this._getItemPosition(t)[this._positionDim]+this._getItemSize(t)[this._sizeDim])<=Math.round(this._scrollPosition);)t++;let i=this._last;for(;i>this._first&&Math.round(this._getItemPosition(i)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)i--;t===this._firstVisible&&i===this._lastVisible||(this._firstVisible=t,this._lastVisible=i,e&&e.emit&&this._sendVisibilityChangedMessage())}}{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new Qw,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(e){this._metricsCache.update(e,this.direction),this._scheduleReflow()}_getPhysicalItem(e){return this._newPhysicalItems.get(e)??this._physicalItems.get(e)}_getSize(e){return this._getPhysicalItem(e)&&this._metricsCache.getChildSize(e)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(e){const t=this._metricsCache;if(-1===this._first||-1===this._last)return t.averageMarginSize+e*(t.averageMarginSize+this._getAverageSize());if(e<this._first){const i=this._first-e;return this._getPhysicalItem(this._first).pos-(t.getMarginSize(this._first-1)||t.averageMarginSize)-(i*t.averageChildSize+(i-1)*t.averageMarginSize)}{const i=e-this._last;return this._getPhysicalItem(this._last).pos+(t.getChildSize(this._last)||t.averageChildSize)+(t.getMarginSize(this._last)||t.averageMarginSize)+i*(t.averageChildSize+t.averageMarginSize)}}_getPosition(e){const t=this._getPhysicalItem(e),{averageMarginSize:i}=this._metricsCache;return 0===e?this._metricsCache.getMarginSize(0)??i:t?t.pos:this._estimatePosition(e)}_calculateAnchor(e,t){return e<=0?0:t>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((e+t)/2/this._delta)))}_getAnchor(e,t){if(0===this._physicalItems.size)return this._calculateAnchor(e,t);if(this._first<0)return this._calculateAnchor(e,t);if(this._last<0)return this._calculateAnchor(e,t);const i=this._getPhysicalItem(this._first),M=this._getPhysicalItem(this._last),n=i.pos;if(M.pos+this._metricsCache.getChildSize(this._last)<e)return this._calculateAnchor(e,t);if(n>t)return this._calculateAnchor(e,t);let o=this._firstVisible-1,r=-1/0;for(;r<e;){r=this._getPhysicalItem(++o).pos+this._metricsCache.getChildSize(o)}return o}_getActiveItems(){0===this._viewDim1||0===this.items.length?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;const e=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e,this._stable=!0}_getItems(){const e=this._newPhysicalItems;let t,i;if(this._stable=!0,null!==this.pin){const{index:e}=this.pin;this._anchorIdx=e,this._anchorPos=this._getPosition(e)}if(t=this._scrollPosition-this._overhang,i=this._scrollPosition+this._viewDim1+this._overhang,i<0||t>this._scrollSize)return void this._clearItems();null!==this._anchorIdx&&null!==this._anchorPos||(this._anchorIdx=this._getAnchor(t,i),this._anchorPos=this._getPosition(this._anchorIdx));let M=this._getSize(this._anchorIdx);void 0===M&&(this._stable=!1,M=this._getAverageSize());const n=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,o=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;0===this._anchorIdx&&(this._anchorPos=n),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-o-M);let r=0;for(this._anchorPos+M+o<t&&(r=t-(this._anchorPos+M+o)),this._anchorPos-n>i&&(r=i-(this._anchorPos-n)),r&&(this._scrollPosition-=r,t-=r,i-=r,this._scrollError+=r),e.set(this._anchorIdx,{pos:this._anchorPos,size:M}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-n,this._physicalMax=this._anchorPos+M+o;this._physicalMin>t&&this._first>0;){let t=this._getSize(--this._first);void 0===t&&(this._stable=!1,t=this._getAverageSize());let i=this._metricsCache.getMarginSize(this._first);void 0===i&&(this._stable=!1,i=this._metricsCache.averageMarginSize),this._physicalMin-=t;const M=this._physicalMin;if(e.set(this._first,{pos:M,size:t}),this._physicalMin-=i,!1===this._stable&&!1===this._estimate)break}for(;this._physicalMax<i&&this._last<this.items.length-1;){let t=this._getSize(++this._last);void 0===t&&(this._stable=!1,t=this._getAverageSize());let i=this._metricsCache.getMarginSize(this._last);void 0===i&&(this._stable=!1,i=this._metricsCache.averageMarginSize);const M=this._physicalMax;if(e.set(this._last,{pos:M,size:t}),this._physicalMax+=t+i,!this._stable&&!this._estimate)break}const s=this._calculateError();s&&(this._physicalMin-=s,this._physicalMax-=s,this._anchorPos-=s,this._scrollPosition-=s,e.forEach((e=>e.pos-=s)),this._scrollError+=s),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e)}_calculateError(){return 0===this._first?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){const{_first:e,_last:t}=this;super._reflow(),(-1===this._first&&-1==this._last||this._first===e&&this._last===t)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){const{averageMarginSize:e}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(e+this._getAverageSize())+e)}get _delta(){const{averageMarginSize:e}=this._metricsCache;return this._getAverageSize()+e}_getItemPosition(e){return{[this._positionDim]:this._getPosition(e),[this._secondaryPositionDim]:0,[(t=this.direction,"horizontal"===t?"xOffset":"yOffset")]:-(this._metricsCache.getLeadingMarginValue(e,this.direction)??this._metricsCache.averageMarginSize)};var t}_getItemSize(e){return{[this._sizeDim]:this._getSize(e)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});export{dx as NileAccordion,BM as NileAutoComplete,ZL as NileAvatar,st as NileBadge,sO as NileBreadcrumb,NO as NileBreadcrumbItem,Pe as NileButton,yL as NileButtonFilter,un as NileButtonToggle,cn as NileButtonToggleGroup,rn as NileCalendar,DO as NileCard,Qt as NileCheckbox,FM as NileChip,OL as NileCircularProgressbar,tO as NileCodeEditor,On as NileContentEditor,XM as NileDatePicker,xn as NileDialog,hx as NileDivider,mt as NileDrawer,RM as NileDropdown,RL as NileEmptyState,KM as NileErrorMessage,Sn as NileErrorNotification,Sp as NileFilePreview,ap as NileFileUpload,Cx as NileFilterChip,tn as NileFormErrorMessage,gO as NileFormGroup,nn as NileFormHelpText,tx as NileFormatDate,Hp as NileGrid,$p as NileGridBody,iS as NileGridCellItem,nS as NileGridHead,eS as NileGridHeadItem,qp as NileGridRow,Re as NileHeading,BL as NileHero,XL as NileHeroHeader,Se as NileIcon,rt as NileIconButton,Ex as NileInlineEdit,oE as NileInlineSidebar,ME as NileInlineSidebarGroup,sE as NileInlineSidebarItem,tt as NileInput,xw as NileLightTooltip,Nn as NileLink,Ix as NileList,cx as NileListItem,tM as NileLoader,Mt as NileMenu,WM as NileMenuItem,ZM as NileOption,mp as NileOptionGroup,WL as NilePageHeader,Ux as NilePagination,TL as NilePopover,Ji as NilePopup,MM as NileProgressBar,Ct as NileRadio,ft as NileRadioGroup,SS as NileRichTextEditor,Lx as NileSectionMessage,vM as NileSelect,mS as NileSideBar,JS as NileSideBarAction,tE as NileSideBarActionMenu,KS as NileSideBarActionMenuItem,fS as NileSideBarExpand,BS as NileSideBarFooter,FS as NileSideBarFooterItem,XS as NileSideBarFooterText,vS as NileSideBarGroup,ZS as NileSideBarGroupItem,WS as NileSideBarGroupItemIcon,RS as NileSideBarGroupItemText,QS as NileSideBarHeader,CS as NileSideBarLogo,Ki as NileSlideToggle,Rx as NileSlider,oM as NileSpinner,nx as NileSplitPanel,JL as NileStepper,FL as NileStepperItem,hn as NileSwitcher,kn as NileTab,mn as NileTabGroup,fn as NileTabPanel,wx as NileTable,fL as NileTableBody,QL as NileTableCellItem,vL as NileTableHeaderItem,CL as NileTableRow,aM as NileTag,JM as NileTextarea,Ax as NileTitle,oO as NileToast,px as NileToolbar,Xi as NileTooltip,ux as NileTree,Nx as NileTreeItem,KL as NileVerticalStepperItem,bM as NileVirtualSelect};
15322
+ function mw(e){return"horizontal"===e?"marginLeft":"marginTop"}function ww(e){return"horizontal"===e?"marginRight":"marginBottom"}function Qw(e,t){const i=[e,t].sort();return i[1]<=0?Math.min(...i):i[0]>=0?Math.max(...i):i[0]+i[1]}class kw{constructor(){this._childSizeCache=new Sw,this._marginSizeCache=new Sw,this._metricsCache=new Map}update(e,t){const i=new Set;Object.keys(e).forEach((M=>{const n=Number(M);this._metricsCache.set(n,e[n]),this._childSizeCache.set(n,e[n][Ew(t)]),i.add(n),i.add(n+1)}));for(const e of i){const i=this._metricsCache.get(e)?.[mw(t)]||0,M=this._metricsCache.get(e-1)?.[ww(t)]||0;this._marginSizeCache.set(e,Qw(i,M))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(e,t){return this._metricsCache.get(e)?.[mw(t)]||0}getChildSize(e){return this._childSizeCache.getSize(e)}getMarginSize(e){return this._marginSizeCache.getSize(e)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}}var Cw=Object.freeze({__proto__:null,FlowLayout:class extends class{_getDefaultConfig(){return{direction:"vertical"}}constructor(e,t){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=e,Promise.resolve().then((()=>this.config=t||this._getDefaultConfig()))}set config(e){Object.assign(this,Object.assign({},this._getDefaultConfig(),e))}get config(){return{direction:this.direction}}get items(){return this._items}set items(e){this._setItems(e)}_setItems(e){e!==this._items&&(this._items=e,this._scheduleReflow())}get direction(){return this._direction}set direction(e){(e="horizontal"===e?e:"vertical")!==this._direction&&(this._direction=e,this._sizeDim="horizontal"===e?"width":"height",this._secondarySizeDim="horizontal"===e?"height":"width",this._positionDim="horizontal"===e?"left":"top",this._secondaryPositionDim="horizontal"===e?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(e){const{_viewDim1:t,_viewDim2:i}=this;Object.assign(this._viewportSize,e),i!==this._viewDim2?this._scheduleLayoutUpdate():t!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(e){Object.assign(this._latestCoords,e);const t=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim];Math.abs(t-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(e=!1){(e||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(e){this._pin=e,this._triggerReflow()}get pin(){if(null!==this._pin){const{index:e,block:t}=this._pin;return{index:Math.max(0,Math.min(e,this.items.length-1)),block:t}}return null}_clampScrollPosition(e){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(e,this.totalScrollSize[Ew(this.direction)]-this._viewDim1))}unpin(){null!==this._pin&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then((()=>this.reflowIfNeeded()))}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(null!==this.pin){const e=this._scrollPosition,{index:t,block:i}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:t,block:i||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=e-this._scrollPosition}}_calculateScrollIntoViewPosition(e){const{block:t}=e,i=Math.min(this.items.length,Math.max(0,e.index)),M=this._getItemPosition(i)[this._positionDim];let n=M;if("start"!==t){const e=this._getItemSize(i)[this._sizeDim];if("center"===t)n=M-.5*this._viewDim1+.5*e;else{const i=M-this._viewDim1+e;if("end"===t)n=i;else{const e=this._scrollPosition;n=Math.abs(e-M)<Math.abs(e-i)?M:i}}}return n+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(n)}getScrollIntoViewCoordinates(e){return{[this._positionDim]:this._calculateScrollIntoViewPosition(e)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){const e=new Map;if(-1!==this._first&&-1!==this._last)for(let t=this._first;t<=this._last;t++)e.set(t,this._getItemPosition(t));const t={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:e};this._scrollError&&(t.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(t)}get _num(){return-1===this._first||-1===this._last?0:this._last-this._first+1}_checkThresholds(){if(0===this._viewDim1&&this._num>0||null!==this._pin)this._scheduleReflow();else{const e=Math.max(0,this._scrollPosition-this._overhang),t=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>e||this._physicalMax<t?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(e){if(-1===this._first||-1===this._last)return;let t=this._first;for(;t<this._last&&Math.round(this._getItemPosition(t)[this._positionDim]+this._getItemSize(t)[this._sizeDim])<=Math.round(this._scrollPosition);)t++;let i=this._last;for(;i>this._first&&Math.round(this._getItemPosition(i)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)i--;t===this._firstVisible&&i===this._lastVisible||(this._firstVisible=t,this._lastVisible=i,e&&e.emit&&this._sendVisibilityChangedMessage())}}{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new kw,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(e){this._metricsCache.update(e,this.direction),this._scheduleReflow()}_getPhysicalItem(e){return this._newPhysicalItems.get(e)??this._physicalItems.get(e)}_getSize(e){return this._getPhysicalItem(e)&&this._metricsCache.getChildSize(e)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(e){const t=this._metricsCache;if(-1===this._first||-1===this._last)return t.averageMarginSize+e*(t.averageMarginSize+this._getAverageSize());if(e<this._first){const i=this._first-e;return this._getPhysicalItem(this._first).pos-(t.getMarginSize(this._first-1)||t.averageMarginSize)-(i*t.averageChildSize+(i-1)*t.averageMarginSize)}{const i=e-this._last;return this._getPhysicalItem(this._last).pos+(t.getChildSize(this._last)||t.averageChildSize)+(t.getMarginSize(this._last)||t.averageMarginSize)+i*(t.averageChildSize+t.averageMarginSize)}}_getPosition(e){const t=this._getPhysicalItem(e),{averageMarginSize:i}=this._metricsCache;return 0===e?this._metricsCache.getMarginSize(0)??i:t?t.pos:this._estimatePosition(e)}_calculateAnchor(e,t){return e<=0?0:t>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((e+t)/2/this._delta)))}_getAnchor(e,t){if(0===this._physicalItems.size)return this._calculateAnchor(e,t);if(this._first<0)return this._calculateAnchor(e,t);if(this._last<0)return this._calculateAnchor(e,t);const i=this._getPhysicalItem(this._first),M=this._getPhysicalItem(this._last),n=i.pos;if(M.pos+this._metricsCache.getChildSize(this._last)<e)return this._calculateAnchor(e,t);if(n>t)return this._calculateAnchor(e,t);let o=this._firstVisible-1,r=-1/0;for(;r<e;){r=this._getPhysicalItem(++o).pos+this._metricsCache.getChildSize(o)}return o}_getActiveItems(){0===this._viewDim1||0===this.items.length?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;const e=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e,this._stable=!0}_getItems(){const e=this._newPhysicalItems;let t,i;if(this._stable=!0,null!==this.pin){const{index:e}=this.pin;this._anchorIdx=e,this._anchorPos=this._getPosition(e)}if(t=this._scrollPosition-this._overhang,i=this._scrollPosition+this._viewDim1+this._overhang,i<0||t>this._scrollSize)return void this._clearItems();null!==this._anchorIdx&&null!==this._anchorPos||(this._anchorIdx=this._getAnchor(t,i),this._anchorPos=this._getPosition(this._anchorIdx));let M=this._getSize(this._anchorIdx);void 0===M&&(this._stable=!1,M=this._getAverageSize());const n=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,o=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;0===this._anchorIdx&&(this._anchorPos=n),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-o-M);let r=0;for(this._anchorPos+M+o<t&&(r=t-(this._anchorPos+M+o)),this._anchorPos-n>i&&(r=i-(this._anchorPos-n)),r&&(this._scrollPosition-=r,t-=r,i-=r,this._scrollError+=r),e.set(this._anchorIdx,{pos:this._anchorPos,size:M}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-n,this._physicalMax=this._anchorPos+M+o;this._physicalMin>t&&this._first>0;){let t=this._getSize(--this._first);void 0===t&&(this._stable=!1,t=this._getAverageSize());let i=this._metricsCache.getMarginSize(this._first);void 0===i&&(this._stable=!1,i=this._metricsCache.averageMarginSize),this._physicalMin-=t;const M=this._physicalMin;if(e.set(this._first,{pos:M,size:t}),this._physicalMin-=i,!1===this._stable&&!1===this._estimate)break}for(;this._physicalMax<i&&this._last<this.items.length-1;){let t=this._getSize(++this._last);void 0===t&&(this._stable=!1,t=this._getAverageSize());let i=this._metricsCache.getMarginSize(this._last);void 0===i&&(this._stable=!1,i=this._metricsCache.averageMarginSize);const M=this._physicalMax;if(e.set(this._last,{pos:M,size:t}),this._physicalMax+=t+i,!this._stable&&!this._estimate)break}const s=this._calculateError();s&&(this._physicalMin-=s,this._physicalMax-=s,this._anchorPos-=s,this._scrollPosition-=s,e.forEach((e=>e.pos-=s)),this._scrollError+=s),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e)}_calculateError(){return 0===this._first?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){const{_first:e,_last:t}=this;super._reflow(),(-1===this._first&&-1==this._last||this._first===e&&this._last===t)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){const{averageMarginSize:e}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(e+this._getAverageSize())+e)}get _delta(){const{averageMarginSize:e}=this._metricsCache;return this._getAverageSize()+e}_getItemPosition(e){return{[this._positionDim]:this._getPosition(e),[this._secondaryPositionDim]:0,[(t=this.direction,"horizontal"===t?"xOffset":"yOffset")]:-(this._metricsCache.getLeadingMarginValue(e,this.direction)??this._metricsCache.averageMarginSize)};var t}_getItemSize(e){return{[this._sizeDim]:this._getSize(e)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});export{dx as NileAccordion,BM as NileAutoComplete,ZL as NileAvatar,st as NileBadge,sO as NileBreadcrumb,NO as NileBreadcrumbItem,Pe as NileButton,yL as NileButtonFilter,un as NileButtonToggle,cn as NileButtonToggleGroup,rn as NileCalendar,DO as NileCard,Qt as NileCheckbox,FM as NileChip,OL as NileCircularProgressbar,tO as NileCodeEditor,On as NileContentEditor,XM as NileDatePicker,xn as NileDialog,hx as NileDivider,mt as NileDrawer,RM as NileDropdown,RL as NileEmptyState,KM as NileErrorMessage,Sn as NileErrorNotification,Sp as NileFilePreview,ap as NileFileUpload,Cx as NileFilterChip,tn as NileFormErrorMessage,gO as NileFormGroup,nn as NileFormHelpText,tx as NileFormatDate,Hp as NileGrid,$p as NileGridBody,iS as NileGridCellItem,nS as NileGridHead,eS as NileGridHeadItem,qp as NileGridRow,Re as NileHeading,BL as NileHero,XL as NileHeroHeader,Se as NileIcon,rt as NileIconButton,Ex as NileInlineEdit,oE as NileInlineSidebar,ME as NileInlineSidebarGroup,sE as NileInlineSidebarItem,tt as NileInput,pw as NileLightTooltip,Nn as NileLink,Ix as NileList,cx as NileListItem,tM as NileLoader,Mt as NileMenu,WM as NileMenuItem,ZM as NileOption,mp as NileOptionGroup,WL as NilePageHeader,Ux as NilePagination,TL as NilePopover,Ji as NilePopup,MM as NileProgressBar,Ct as NileRadio,ft as NileRadioGroup,SS as NileRichTextEditor,Lx as NileSectionMessage,vM as NileSelect,mS as NileSideBar,JS as NileSideBarAction,tE as NileSideBarActionMenu,KS as NileSideBarActionMenuItem,fS as NileSideBarExpand,BS as NileSideBarFooter,FS as NileSideBarFooterItem,XS as NileSideBarFooterText,vS as NileSideBarGroup,ZS as NileSideBarGroupItem,WS as NileSideBarGroupItemIcon,RS as NileSideBarGroupItemText,QS as NileSideBarHeader,CS as NileSideBarLogo,Ki as NileSlideToggle,Rx as NileSlider,oM as NileSpinner,nx as NileSplitPanel,JL as NileStepper,FL as NileStepperItem,hn as NileSwitcher,kn as NileTab,mn as NileTabGroup,fn as NileTabPanel,wx as NileTable,fL as NileTableBody,QL as NileTableCellItem,vL as NileTableHeaderItem,CL as NileTableRow,aM as NileTag,JM as NileTextarea,Ax as NileTitle,oO as NileToast,px as NileToolbar,Xi as NileTooltip,ux as NileTree,Nx as NileTreeItem,KL as NileVerticalStepperItem,bM as NileVirtualSelect};