@aquera/nile-elements 1.3.8-beta-1.2 → 1.3.9-beta-1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/index.css +3 -0
- package/demo/index.html +184 -25
- package/demo/nxtgen.css +2 -0
- package/demo/variables.css +2 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +151 -124
- package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.esm.js +8 -2
- package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +10 -6
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.esm.js +8 -2
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +2 -2
- package/dist/nile-side-bar/nile-side-bar.cjs.js +1 -1
- package/dist/nile-side-bar/nile-side-bar.cjs.js.map +1 -1
- package/dist/nile-side-bar/nile-side-bar.css.cjs.js +1 -1
- package/dist/nile-side-bar/nile-side-bar.css.cjs.js.map +1 -1
- package/dist/nile-side-bar/nile-side-bar.css.esm.js +25 -30
- package/dist/nile-side-bar/nile-side-bar.esm.js +7 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js.map +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.css.esm.js +3 -5
- package/dist/nile-side-bar-expand/nile-side-bar-expand.esm.js +8 -8
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +4 -4
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.esm.js +11 -6
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +3 -3
- package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.css.esm.js +4 -7
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js +1 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.esm.js +58 -56
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +2 -4
- package/dist/nile-side-bar-panel/index.cjs.js +2 -0
- package/dist/nile-side-bar-panel/index.cjs.js.map +1 -0
- package/dist/nile-side-bar-panel/index.esm.js +1 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.cjs.js +2 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.cjs.js.map +1 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.css.cjs.js +2 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.css.cjs.js.map +1 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.css.esm.js +8 -0
- package/dist/nile-side-bar-panel/nile-side-bar-panel.esm.js +3 -0
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +9 -8
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js +8 -2
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js +10 -3
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js +6 -0
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.d.ts +1 -0
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js +4 -0
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js.map +1 -1
- package/dist/src/nile-side-bar/nile-side-bar.css.js +23 -28
- package/dist/src/nile-side-bar/nile-side-bar.css.js.map +1 -1
- package/dist/src/nile-side-bar/nile-side-bar.js +7 -1
- package/dist/src/nile-side-bar/nile-side-bar.js.map +1 -1
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js +3 -5
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js.map +1 -1
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.d.ts +2 -0
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js +12 -4
- package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js.map +1 -1
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +2 -2
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +9 -4
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js.map +1 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.d.ts +1 -0
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js +8 -1
- package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js.map +1 -1
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js +2 -5
- package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js.map +1 -1
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js +48 -46
- package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js.map +1 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +2 -4
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
- package/dist/src/nile-side-bar-panel/index.d.ts +1 -0
- package/dist/src/nile-side-bar-panel/index.js +2 -0
- package/dist/src/nile-side-bar-panel/index.js.map +1 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.css.d.ts +12 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.css.js +20 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.css.js.map +1 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.d.ts +32 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.js +43 -0
- package/dist/src/nile-side-bar-panel/nile-side-bar-panel.js.map +1 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +6 -5
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/src/index.ts +2 -0
- package/src/nile-inline-sidebar/nile-inline-sidebar.css.ts +8 -2
- package/src/nile-inline-sidebar/nile-inline-sidebar.ts +16 -5
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts +6 -0
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts +1 -0
- package/src/nile-side-bar/nile-side-bar.css.ts +23 -28
- package/src/nile-side-bar/nile-side-bar.ts +8 -1
- package/src/nile-side-bar-expand/nile-side-bar-expand.css.ts +3 -5
- package/src/nile-side-bar-expand/nile-side-bar-expand.ts +6 -4
- package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +2 -2
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +9 -4
- package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.ts +9 -1
- package/src/nile-side-bar-group/nile-side-bar-group.css.ts +2 -5
- package/src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts +49 -47
- package/src/nile-side-bar-header/nile-side-bar-header.css.ts +2 -4
- package/src/nile-side-bar-panel/index.ts +1 -0
- package/src/nile-side-bar-panel/nile-side-bar-panel.css.ts +22 -0
- package/src/nile-side-bar-panel/nile-side-bar-panel.ts +54 -0
- package/src/nile-slide-toggle/nile-slide-toggle.ts +6 -5
- package/vscode-html-custom-data.json +25 -3
package/dist/index.js
CHANGED
|
@@ -3271,20 +3271,21 @@ const de=1,he=2,Te=3,ye=4,Ae=e=>(...t)=>({_$litDirective$:e,values:t});let Oe=cl
|
|
|
3271
3271
|
`;let nM=class extends Re{constructor(){super(...arguments),this.label="",this.sublabel="",this.textPosition="right",this.isChecked=!1,this.fullWidth=!1,this.disabled=!1,this.helpText="",this.errorMessage=""}connectedCallback(){super.connectedCallback(),this.emit("nile-init"),this.style.setProperty("--slide-toggle-width",this.fullWidth?"100%":"auto")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}toggleValue(){this.isChecked=!this.isChecked,this.emit("change",{checked:this.isChecked,value:this.isChecked}),this.emit("nile-change",{checked:this.isChecked,value:this.isChecked})}render(){const e=!!this.helpText,t=!!this.errorMessage;return R`
|
|
3272
3272
|
<div
|
|
3273
3273
|
class=${pe({"nile-slide-toggle":!0,"nile-slide--disabled":this.disabled,"nile-slide-toggle--reverse":"left"==this.textPosition})}
|
|
3274
|
+
part="base"
|
|
3274
3275
|
>
|
|
3275
3276
|
<label
|
|
3276
3277
|
class="${pe({"nile-slide-toggle__switch":!0,"nile-slide-toggle__switch--left":"right"==this.textPosition,"nile-slide-toggle__switch--right":"left"==this.textPosition})}"
|
|
3277
|
-
class="nile-slide-toggle__switch">
|
|
3278
|
+
class="nile-slide-toggle__switch" part="slide-toggle-switch">
|
|
3278
3279
|
<input
|
|
3279
3280
|
type="checkbox"
|
|
3280
3281
|
.checked=${this.isChecked}
|
|
3281
3282
|
@change=${this.toggleValue}
|
|
3282
3283
|
/>
|
|
3283
|
-
<span class="nile-slide-toggle__slider"></span>
|
|
3284
|
+
<span class="nile-slide-toggle__slider" part="slide-toggle-slider"></span>
|
|
3284
3285
|
</label>
|
|
3285
|
-
<span class="nile-slide-toggle__label">
|
|
3286
|
-
<span>${this.label}</span>
|
|
3287
|
-
<span class="nile-slide-toggle__sublabel">${this.sublabel}</span>
|
|
3286
|
+
<span class="nile-slide-toggle__label" part="slide-toggle-label-container">
|
|
3287
|
+
<span part="slide-toggle-label">${this.label}</span>
|
|
3288
|
+
<span class="nile-slide-toggle__sublabel" part="slide-toggle-sublabel">${this.sublabel}</span>
|
|
3288
3289
|
</span>
|
|
3289
3290
|
</div>
|
|
3290
3291
|
${e?R` <nile-form-help-text>${this.helpText}</nile-form-help-text> `:""}
|
|
@@ -4803,7 +4804,7 @@ class QM{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
|
4803
4804
|
* @license
|
|
4804
4805
|
* Copyright 2021 Google LLC
|
|
4805
4806
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4806
|
-
*/(this._hostElement,e),this._scrollerController=new kM(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(`[${fM}]`);t||(t=document.createElement("div"),t.setAttribute(fM,""),e.appendChild(t)),Object.assign(t.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),t.textContent=" ",t.setAttribute(fM,""),this._sizer=t}return this._sizer}async updateLayoutConfig(e){await this._layoutInitialized;const t=e.type||vM;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&&(vM=i=(await Promise.resolve().then((function(){return aQ}))).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:YM(t.marginTop),marginRight:YM(t.marginRight),marginBottom:YM(t.marginBottom),marginLeft:YM(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 wM)}get _children(){const e=[];let t=this._hostElement.firstElementChild;for(;t;)t.hasAttribute(fM)||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 l=t.getBoundingClientRect(),N={left:s.left-l.left,top:s.top-l.top},g={width:t.scrollWidth,height:t.scrollHeight},u=M-s.top+e.scrollTop,c=n-s.left+e.scrollLeft,D=Math.max(0,o-M),j=Math.max(0,r-n);i.viewportSize={width:j,height:D},i.viewportScroll={top:u,left:c},i.totalScrollSize=g,i.offsetWithinScroller=N}}_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 mM({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new EM({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 YM(e){const t=e?parseFloat(e):NaN;return Number.isNaN(t)?0:t}function ZM(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 VM=Ae(class extends xM{constructor(e){if(super(e),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>((e,t)=>R`${t}: ${JSON.stringify(e,null,2)}`)(e,t+this._first),this._keyFunction=(e,t)=>(e=>e)(e,this._first),this._items=[],e.type!==he)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 SM(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?B: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 UM({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,l,N){return R`
|
|
4807
|
+
*/(this._hostElement,e),this._scrollerController=new kM(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(`[${fM}]`);t||(t=document.createElement("div"),t.setAttribute(fM,""),e.appendChild(t)),Object.assign(t.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),t.textContent=" ",t.setAttribute(fM,""),this._sizer=t}return this._sizer}async updateLayoutConfig(e){await this._layoutInitialized;const t=e.type||vM;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&&(vM=i=(await Promise.resolve().then((function(){return NQ}))).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:YM(t.marginTop),marginRight:YM(t.marginRight),marginBottom:YM(t.marginBottom),marginLeft:YM(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 wM)}get _children(){const e=[];let t=this._hostElement.firstElementChild;for(;t;)t.hasAttribute(fM)||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 l=t.getBoundingClientRect(),N={left:s.left-l.left,top:s.top-l.top},g={width:t.scrollWidth,height:t.scrollHeight},u=M-s.top+e.scrollTop,c=n-s.left+e.scrollLeft,D=Math.max(0,o-M),j=Math.max(0,r-n);i.viewportSize={width:j,height:D},i.viewportScroll={top:u,left:c},i.totalScrollSize=g,i.offsetWithinScroller=N}}_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 mM({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new EM({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 YM(e){const t=e?parseFloat(e):NaN;return Number.isNaN(t)?0:t}function ZM(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 VM=Ae(class extends xM{constructor(e){if(super(e),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>((e,t)=>R`${t}: ${JSON.stringify(e,null,2)}`)(e,t+this._first),this._keyFunction=(e,t)=>(e=>e)(e,this._first),this._items=[],e.type!==he)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 SM(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?B: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 UM({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,l,N){return R`
|
|
4807
4808
|
<div part="select-options" class="select__options ${t?"select__options__search-enabled":""} ${l?"loading":""}">
|
|
4808
4809
|
${s&&!l?R`
|
|
4809
4810
|
<div part="select-no-results" class="select__no-results">
|
|
@@ -14762,7 +14763,7 @@ nile-rte-toolbar-item nile-button[data-active]::part(base):hover {
|
|
|
14762
14763
|
|
|
14763
14764
|
|
|
14764
14765
|
|
|
14765
|
-
`,BS={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 GS=class extends ae{constructor(){super(...arguments),this.value="",this.noStyles=!1,this.singleLineEditor=!1,this.placeholder="",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(),fS(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(RS.cssText),this.ensureStructure(),this.placeholder&&this.editorEl&&(this.editorEl.dataset.placeholder=this.placeholder),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.placeholder&&(this.editorEl.dataset.placeholder=this.placeholder),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=BS[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?ZS(this.editorEl,"backgroundColor",i,"data-rte-bg"):function(e,t){ZS(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=CS(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&&US(this.editorEl,i),this.updateContent(),this.updateToolbarState()}))}}else e.addEventListener("change",(e=>{this.focusAndRestore();const t=e.detail;bS(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":fS(this.editorEl,"strong");break;case"italic":fS(this.editorEl,"em");break;case"underline":fS(this.editorEl,"u");break;case"left":bS(this.editorEl,"left");break;case"center":bS(this.editorEl,"center");break;case"right":bS(this.editorEl,"right");break;case"justify":bS(this.editorEl,"justify");break;case"ul":PS(this.editorEl,"ul"),this.updateContent(),this.updateToolbarState();break;case"ol":PS(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=CS(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"),l=n.style.textAlign||getComputedStyle(n).textAlign||"start",N="start"===l?"left":l,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"===N&&!["center","right","justify"].includes(N)),this.setBtnActive("center","center"===N),this.setBtnActive("right","right"===N),this.setBtnActive("justify","justify"===N),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=vS(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=vS(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.textContent??"").trim();this.editorEl.classList.toggle("empty",e);const t=this.editorEl.cloneNode(!0);if(this.noStyles)t.querySelectorAll("[style]").forEach((e=>e.removeAttribute("style")));else{const e=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),i=document.createTreeWalker(t,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(;e.nextNode()&&i.nextNode();){const t=e.currentNode,n=i.currentNode,o=window.getComputedStyle(t),r=M.map((e=>`${e}:${o.getPropertyValue(e)}`)).join(";");r.trim()&&n.setAttribute("style",r)}}this.content=t.innerHTML,this.previewEl&&(this.previewEl.innerHTML=this.content),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content},bubbles:!0,composed:!0}))}};e([ce({type:String,attribute:!0,reflect:!0})],GS.prototype,"value",void 0),e([ce({type:Boolean,attribute:!0,reflect:!0})],GS.prototype,"noStyles",void 0),e([ce({type:Boolean,attribute:"singlelineeditor",reflect:!0})],GS.prototype,"singleLineEditor",void 0),e([ce({type:String})],GS.prototype,"placeholder",void 0),e([ce({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)}})],GS.prototype,"mentions",void 0),e([De()],GS.prototype,"content",void 0),GS=e([Ne("nile-rich-text-editor")],GS);"undefined"!=typeof window&&(window.nileElementsVersion='"1.3.8-beta-1.2"',window.nileVersion="__NILE_VERSION__",window.process=window.process||{env:{NODE_ENV:"production"}});const _S=r`
|
|
14766
|
+
`,BS={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 GS=class extends ae{constructor(){super(...arguments),this.value="",this.noStyles=!1,this.singleLineEditor=!1,this.placeholder="",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(),fS(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(RS.cssText),this.ensureStructure(),this.placeholder&&this.editorEl&&(this.editorEl.dataset.placeholder=this.placeholder),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.placeholder&&(this.editorEl.dataset.placeholder=this.placeholder),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=BS[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?ZS(this.editorEl,"backgroundColor",i,"data-rte-bg"):function(e,t){ZS(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=CS(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&&US(this.editorEl,i),this.updateContent(),this.updateToolbarState()}))}}else e.addEventListener("change",(e=>{this.focusAndRestore();const t=e.detail;bS(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":fS(this.editorEl,"strong");break;case"italic":fS(this.editorEl,"em");break;case"underline":fS(this.editorEl,"u");break;case"left":bS(this.editorEl,"left");break;case"center":bS(this.editorEl,"center");break;case"right":bS(this.editorEl,"right");break;case"justify":bS(this.editorEl,"justify");break;case"ul":PS(this.editorEl,"ul"),this.updateContent(),this.updateToolbarState();break;case"ol":PS(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=CS(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"),l=n.style.textAlign||getComputedStyle(n).textAlign||"start",N="start"===l?"left":l,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"===N&&!["center","right","justify"].includes(N)),this.setBtnActive("center","center"===N),this.setBtnActive("right","right"===N),this.setBtnActive("justify","justify"===N),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=vS(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=vS(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.textContent??"").trim();this.editorEl.classList.toggle("empty",e);const t=this.editorEl.cloneNode(!0);if(this.noStyles)t.querySelectorAll("[style]").forEach((e=>e.removeAttribute("style")));else{const e=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),i=document.createTreeWalker(t,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(;e.nextNode()&&i.nextNode();){const t=e.currentNode,n=i.currentNode,o=window.getComputedStyle(t),r=M.map((e=>`${e}:${o.getPropertyValue(e)}`)).join(";");r.trim()&&n.setAttribute("style",r)}}this.content=t.innerHTML,this.previewEl&&(this.previewEl.innerHTML=this.content),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content},bubbles:!0,composed:!0}))}};e([ce({type:String,attribute:!0,reflect:!0})],GS.prototype,"value",void 0),e([ce({type:Boolean,attribute:!0,reflect:!0})],GS.prototype,"noStyles",void 0),e([ce({type:Boolean,attribute:"singlelineeditor",reflect:!0})],GS.prototype,"singleLineEditor",void 0),e([ce({type:String})],GS.prototype,"placeholder",void 0),e([ce({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)}})],GS.prototype,"mentions",void 0),e([De()],GS.prototype,"content",void 0),GS=e([Ne("nile-rich-text-editor")],GS);"undefined"!=typeof window&&(window.nileElementsVersion='"1.3.9-beta-1.0"',window.nileVersion="__NILE_VERSION__",window.process=window.process||{env:{NODE_ENV:"production"}});const _S=r`
|
|
14766
14767
|
:host {
|
|
14767
14768
|
--sidebar-width: 240px;
|
|
14768
14769
|
--sidebar-collapsed-width: 70px;
|
|
@@ -14770,8 +14771,9 @@ nile-rte-toolbar-item nile-button[data-active]::part(base):hover {
|
|
|
14770
14771
|
width: var(--sidebar-width);
|
|
14771
14772
|
display: flex;
|
|
14772
14773
|
flex-direction: column;
|
|
14773
|
-
background-color: var(--nile-colors-neutral-100);
|
|
14774
|
-
|
|
14774
|
+
background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary));
|
|
14775
|
+
height: 100%;
|
|
14776
|
+
overflow: hidden;
|
|
14775
14777
|
transition: width 0.25s ease, transform 0.25s ease;
|
|
14776
14778
|
z-index: 1000;
|
|
14777
14779
|
}
|
|
@@ -14797,15 +14799,6 @@ nile-rte-toolbar-item nile-button[data-active]::part(base):hover {
|
|
|
14797
14799
|
transform: translateX(calc(var(--sidebar-width) - var(--sidebar-collapsed-width)));
|
|
14798
14800
|
}
|
|
14799
14801
|
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
::slotted(*) {
|
|
14803
|
-
display: block;
|
|
14804
|
-
min-width: 0;
|
|
14805
|
-
/* padding: var(--nile-spacing-xl) */
|
|
14806
|
-
}
|
|
14807
|
-
|
|
14808
|
-
|
|
14809
14802
|
:host {
|
|
14810
14803
|
scrollbar-width: thin;
|
|
14811
14804
|
scrollbar-color: #64748b transparent;
|
|
@@ -14821,35 +14814,44 @@ nile-rte-toolbar-item nile-button[data-active]::part(base):hover {
|
|
|
14821
14814
|
background-color: #64748b;
|
|
14822
14815
|
border-radius: 10px;
|
|
14823
14816
|
}
|
|
14824
|
-
|
|
14825
|
-
|
|
14826
|
-
|
|
14827
|
-
|
|
14817
|
+
|
|
14818
|
+
|
|
14819
|
+
.scroll-container {
|
|
14820
|
+
flex: 1;
|
|
14821
|
+
overflow-y: auto;
|
|
14822
|
+
overflow-x: hidden;
|
|
14823
|
+
display: flex;
|
|
14824
|
+
flex-direction: column;
|
|
14828
14825
|
}
|
|
14829
14826
|
|
|
14830
|
-
|
|
14831
|
-
|
|
14832
|
-
|
|
14827
|
+
|
|
14828
|
+
::slotted(nile-side-bar-header) {
|
|
14829
|
+
flex-shrink: 0;
|
|
14833
14830
|
}
|
|
14831
|
+
|
|
14834
14832
|
::slotted(nile-side-bar-footer) {
|
|
14835
|
-
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
:
|
|
14839
|
-
justify-content: center;
|
|
14840
|
-
padding: 0;
|
|
14833
|
+
flex-shrink: 0;
|
|
14834
|
+
position: sticky;
|
|
14835
|
+
bottom: 0;
|
|
14836
|
+
margin-top: auto;
|
|
14841
14837
|
}
|
|
14842
14838
|
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
}
|
|
14839
|
+
|
|
14840
|
+
|
|
14841
|
+
|
|
14847
14842
|
|
|
14848
14843
|
|
|
14849
14844
|
|
|
14850
14845
|
|
|
14851
14846
|
|
|
14852
|
-
|
|
14847
|
+
|
|
14848
|
+
`;let FS=class extends Re{constructor(){super(...arguments),this.position="left",this.collapsed=!1,this.fullHeight=!1,this.width=null,this.collapsedWidth=null}static get styles(){return[_S]}updated(e){super.updated(e),e.has("collapsed")&&this.querySelectorAll("nile-side-bar-footer-item, nile-side-bar-group-item, nile-side-bar-group").forEach((e=>e.toggleAttribute("collapsed",this.collapsed))),e.has("width")&&null!==this.width&&this.style.setProperty("--sidebar-width",`${this.width}px`),e.has("collapsedWidth")&&null!==this.collapsedWidth&&this.style.setProperty("--sidebar-collapsed-width",`${this.collapsedWidth}px`)}render(){return R`
|
|
14849
|
+
<slot name="header"></slot>
|
|
14850
|
+
<div class="scroll-container">
|
|
14851
|
+
<slot></slot>
|
|
14852
|
+
</div>
|
|
14853
|
+
<slot name="footer"></slot>
|
|
14854
|
+
`}};e([ce({type:String,reflect:!0,attribute:!0})],FS.prototype,"position",void 0),e([ce({type:Boolean,reflect:!0,attribute:!0})],FS.prototype,"collapsed",void 0),e([ce({type:Boolean,reflect:!0,attribute:!0})],FS.prototype,"fullHeight",void 0),e([ce({type:Number,attribute:!0})],FS.prototype,"width",void 0),e([ce({type:Number,attribute:!0})],FS.prototype,"collapsedWidth",void 0),FS=e([Ne("nile-side-bar")],FS);const HS=r`
|
|
14853
14855
|
:host {
|
|
14854
14856
|
display: flex;
|
|
14855
14857
|
align-items: center;
|
|
@@ -14858,10 +14860,8 @@ nile-rte-toolbar-item nile-button[data-active]::part(base):hover {
|
|
|
14858
14860
|
padding-bottom: var(--nile-spacing-lg);
|
|
14859
14861
|
padding-left: var(--nile-spacing-xl);
|
|
14860
14862
|
padding-right: var(--nile-spacing-xl);
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
z-index: 10;
|
|
14864
|
-
background: var(--nile-colors-neutral-100);
|
|
14863
|
+
top: 0;
|
|
14864
|
+
background: var(--nile-colors-neutral-100);
|
|
14865
14865
|
}
|
|
14866
14866
|
|
|
14867
14867
|
.header-content {
|
|
@@ -14943,8 +14943,8 @@ nile-rte-toolbar-item nile-button[data-active]::part(base):hover {
|
|
|
14943
14943
|
display: flex;
|
|
14944
14944
|
align-items: center;
|
|
14945
14945
|
justify-content: center;
|
|
14946
|
-
width:
|
|
14947
|
-
height:
|
|
14946
|
+
width: 38px;
|
|
14947
|
+
height: 38px;
|
|
14948
14948
|
border: none;
|
|
14949
14949
|
background: transparent;
|
|
14950
14950
|
color: inherit;
|
|
@@ -14953,9 +14953,7 @@ nile-rte-toolbar-item nile-button[data-active]::part(base):hover {
|
|
|
14953
14953
|
transition: background-color 0.2s ease;
|
|
14954
14954
|
}
|
|
14955
14955
|
|
|
14956
|
-
|
|
14957
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
14958
|
-
}
|
|
14956
|
+
|
|
14959
14957
|
|
|
14960
14958
|
nile-tooltip::part(body) {
|
|
14961
14959
|
width: max-content;
|
|
@@ -14966,26 +14964,25 @@ nile-tooltip::part(body) {
|
|
|
14966
14964
|
|
|
14967
14965
|
|
|
14968
14966
|
|
|
14969
|
-
`;let KS=class extends Re{constructor(){super(...arguments),this.collapsed=!1}static get styles(){return[qS]}connectedCallback(){super.connectedCallback();const e=this.closest("nile-side-bar");e&&(this.collapsed=e.hasAttribute("collapsed"))}toggleSidebar(){const e=this.closest("nile-side-bar");if(!e)return;e.hasAttribute("collapsed")?(e.removeAttribute("collapsed"),this.collapsed=!1):(e.setAttribute("collapsed",""),this.collapsed=!0)}render(){return R`
|
|
14967
|
+
`;let KS=class extends Re{constructor(){super(...arguments),this.collapsed=!1,this.expandTooltipText="Expand Sidebar",this.collapseTooltipText="Collapse Sidebar"}static get styles(){return[qS]}connectedCallback(){super.connectedCallback();const e=this.closest("nile-side-bar");e&&(this.collapsed=e.hasAttribute("collapsed"))}toggleSidebar(){const e=this.closest("nile-side-bar");if(!e)return;e.hasAttribute("collapsed")?(e.removeAttribute("collapsed"),this.collapsed=!1):(e.setAttribute("collapsed",""),this.collapsed=!0)}render(){return R`
|
|
14970
14968
|
<button class="expand-btn" @click=${this.toggleSidebar}>
|
|
14971
14969
|
${this.collapsed?R`
|
|
14972
|
-
<nile-tooltip placement="right" hoist content
|
|
14970
|
+
<nile-lite-tooltip placement="right" hoist content=${this.expandTooltipText}>
|
|
14973
14971
|
<span part="icon"><nile-icon name="moveright"></nile-icon></span>
|
|
14974
|
-
</nile-tooltip>
|
|
14972
|
+
</nile-lite-tooltip>
|
|
14975
14973
|
`:R`
|
|
14976
|
-
<nile-tooltip placement="right" hoist content
|
|
14974
|
+
<nile-lite-tooltip placement="right" hoist content=${this.collapseTooltipText}>
|
|
14977
14975
|
<span part="icon"><nile-icon name="moveleft"></nile-icon></span>
|
|
14978
|
-
</nile-tooltip>
|
|
14976
|
+
</nile-lite-tooltip>
|
|
14979
14977
|
`}
|
|
14980
14978
|
</button>
|
|
14981
|
-
`}};e([ce({type:Boolean,reflect:!0})],KS.prototype,"collapsed",void 0),KS=e([Ne("nile-side-bar-expand")],KS);const em=r`
|
|
14979
|
+
`}};e([ce({type:Boolean,reflect:!0})],KS.prototype,"collapsed",void 0),e([ce({type:String,reflect:!0,attribute:!0})],KS.prototype,"expandTooltipText",void 0),e([ce({type:String,reflect:!0,attribute:!0})],KS.prototype,"collapseTooltipText",void 0),KS=e([Ne("nile-side-bar-expand")],KS);const em=r`
|
|
14982
14980
|
:host {
|
|
14983
14981
|
display: flex;
|
|
14984
14982
|
flex-direction: column;
|
|
14985
14983
|
padding-bottom: var(--nile-spacing-xs);
|
|
14986
|
-
padding-left: var(--nile-spacing-
|
|
14987
|
-
padding-right: var(--nile-spacing-
|
|
14988
|
-
gap: var(--nile-spacing-lg);
|
|
14984
|
+
padding-left: var(--nile-spacing-xl);
|
|
14985
|
+
padding-right: var(--nile-spacing-xl);
|
|
14989
14986
|
}
|
|
14990
14987
|
|
|
14991
14988
|
|
|
@@ -15005,10 +15002,8 @@ nile-tooltip::part(body) {
|
|
|
15005
15002
|
display: block;
|
|
15006
15003
|
height: 1px;
|
|
15007
15004
|
background: var(--nile-colors-neutral-400);
|
|
15008
|
-
margin-top: var(--nile-spacing-xs);
|
|
15009
15005
|
margin-left: var(--nile-spacing-md);
|
|
15010
15006
|
margin-right: var(--nile-spacing-md);
|
|
15011
|
-
|
|
15012
15007
|
}
|
|
15013
15008
|
|
|
15014
15009
|
.side-bar-group {
|
|
@@ -15038,60 +15033,62 @@ justify-content: center;
|
|
|
15038
15033
|
<slot></slot>
|
|
15039
15034
|
</section>
|
|
15040
15035
|
`}};e([ce({type:String})],tm.prototype,"label",void 0),e([ce({type:Boolean,reflect:!0})],tm.prototype,"footer",void 0),e([ce({type:Boolean,reflect:!0})],tm.prototype,"divider",void 0),tm=e([Ne("nile-side-bar-group")],tm);const im=r`
|
|
15041
|
-
|
|
15042
|
-
|
|
15043
|
-
}
|
|
15044
|
-
|
|
15045
|
-
.group-item {
|
|
15046
|
-
display: flex;
|
|
15047
|
-
flex-direction: column;
|
|
15048
|
-
}
|
|
15049
|
-
|
|
15050
|
-
.item-link {
|
|
15051
|
-
display: flex;
|
|
15052
|
-
align-items: center;
|
|
15053
|
-
padding-top: var(--nile-spacing-lg);
|
|
15054
|
-
padding-bottom: var(--nile-spacing-lg);
|
|
15055
|
-
padding-left: var(--nile-spacing-md);
|
|
15056
|
-
padding-right: var(--nile-spacing-md);
|
|
15057
|
-
cursor: pointer;
|
|
15058
|
-
color: var(--nile-colors-dark-900);
|
|
15059
|
-
text-decoration: none;
|
|
15060
|
-
font-size: var(--nile-type-scale-3);
|
|
15061
|
-
line-height: 1.4;
|
|
15062
|
-
}
|
|
15036
|
+
:host {
|
|
15037
|
+
display: block;
|
|
15038
|
+
}
|
|
15063
15039
|
|
|
15064
|
-
.item
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15040
|
+
.group-item {
|
|
15041
|
+
display: flex;
|
|
15042
|
+
flex-direction: column;
|
|
15043
|
+
height: 38px;
|
|
15044
|
+
width: 208px;
|
|
15045
|
+
overflow: hidden;
|
|
15046
|
+
}
|
|
15068
15047
|
|
|
15048
|
+
.item-link {
|
|
15049
|
+
display: flex;
|
|
15050
|
+
align-items: center;
|
|
15051
|
+
justify-content: flex-start;
|
|
15052
|
+
height: 100%;
|
|
15053
|
+
width: 100%;
|
|
15054
|
+
padding: var(--nile-spacing-lg) var(--nile-spacing-md);
|
|
15055
|
+
cursor: pointer;
|
|
15056
|
+
color: var(--nile-colors-dark-900);
|
|
15057
|
+
text-decoration: none;
|
|
15058
|
+
font-size: var(--nile-type-scale-3);
|
|
15059
|
+
line-height: 1.4;
|
|
15060
|
+
box-sizing: border-box;
|
|
15061
|
+
}
|
|
15069
15062
|
|
|
15063
|
+
.item-link:hover {
|
|
15064
|
+
background: var(--nile-colors-neutral-400);
|
|
15065
|
+
border-radius: var(--nile-radius-sm);
|
|
15066
|
+
}
|
|
15070
15067
|
|
|
15071
|
-
::slotted(nile-side-bar-group-item-icon) {
|
|
15072
|
-
|
|
15073
|
-
}
|
|
15068
|
+
::slotted(nile-side-bar-group-item-icon) {
|
|
15069
|
+
flex-shrink: 0;
|
|
15070
|
+
}
|
|
15074
15071
|
|
|
15075
|
-
::slotted(nile-side-bar-group-item-text) {
|
|
15076
|
-
|
|
15077
|
-
}
|
|
15078
|
-
:host([active]) [part="link"] {
|
|
15079
|
-
background: var(--nile-colors-primary-100);
|
|
15080
|
-
border-radius: var(--nile-radius-sm);
|
|
15081
|
-
font-weight: var(--nile-font-weight-semibold);
|
|
15082
|
-
}
|
|
15072
|
+
::slotted(nile-side-bar-group-item-text) {
|
|
15073
|
+
flex-grow: 1;
|
|
15074
|
+
}
|
|
15083
15075
|
|
|
15084
|
-
:host([
|
|
15085
|
-
|
|
15086
|
-
|
|
15087
|
-
|
|
15088
|
-
|
|
15089
|
-
opacity: 0.5;
|
|
15090
|
-
pointer-events: none;
|
|
15091
|
-
cursor: not-allowed;
|
|
15092
|
-
}
|
|
15076
|
+
:host([active]) [part="link"] {
|
|
15077
|
+
background: var(--nile-colors-primary-100);
|
|
15078
|
+
border-radius: var(--nile-radius-sm);
|
|
15079
|
+
font-weight: var(--nile-font-weight-semibold);
|
|
15080
|
+
}
|
|
15093
15081
|
|
|
15082
|
+
:host([collapsed]) .group-item {
|
|
15083
|
+
height: 38px;
|
|
15084
|
+
width: 38px;
|
|
15085
|
+
}
|
|
15094
15086
|
|
|
15087
|
+
:host([disabled]) .item-link {
|
|
15088
|
+
opacity: 0.5;
|
|
15089
|
+
pointer-events: none;
|
|
15090
|
+
cursor: not-allowed;
|
|
15091
|
+
}
|
|
15095
15092
|
`;let Mm=class extends Re{constructor(){super(...arguments),this.href=null,this.active=!1,this.type="default",this.expanded=!1,this.disabled=!1}static get styles(){return[im]}toggleExpand(){"dropdown"!==this.type&&"popover"!==this.type||this.disabled||(this.expanded=!this.expanded)}connectedCallback(){super.connectedCallback(),this.href&&window.location.pathname===this.href&&(this.active=!0)}handleSelect(e){if(this.disabled)return e.preventDefault(),void e.stopImmediatePropagation();this.href||e.preventDefault();const t=this.closest("nile-side-bar");t&&t.querySelectorAll("nile-side-bar-group-item[active]").forEach((e=>{e!==this&&(e.active=!1,e.expanded=!1)})),this.active=!0,"dropdown"!==this.type&&"popover"!==this.type||this.disabled||(this.expanded=!0),this.dispatchEvent(new CustomEvent("nile-click",{bubbles:!0,composed:!0,detail:{href:this.href,text:this.textContent?.trim()||"",type:this.type}}))}render(){const e="dropdown"===this.type||"popover"===this.type;return R`
|
|
15096
15093
|
<div
|
|
15097
15094
|
part="base"
|
|
@@ -15200,13 +15197,13 @@ width: 38px;
|
|
|
15200
15197
|
`;let sm=class extends Re{static get styles(){return[rm]}connectedCallback(){super.connectedCallback(),this.hasAttribute("slot")||this.setAttribute("slot","text")}render(){return R` <slot></slot> `}};sm=e([Ne("nile-side-bar-group-item-text")],sm);const am=r`
|
|
15201
15198
|
:host {
|
|
15202
15199
|
display: block;
|
|
15203
|
-
position: sticky;
|
|
15204
15200
|
bottom: var(--nile-spacing-md);
|
|
15205
15201
|
padding-bottom: var(--nile-spacing-xl);
|
|
15206
15202
|
padding-left: var(--nile-spacing-xl);
|
|
15207
15203
|
padding-right: var(--nile-spacing-xl);
|
|
15204
|
+
padding-top: var(--nile-spacing-xs);
|
|
15208
15205
|
gap: var(--nile-spacing-md);
|
|
15209
|
-
|
|
15206
|
+
bottom: 0;
|
|
15210
15207
|
background: var(--nile-colors-neutral-100);
|
|
15211
15208
|
}
|
|
15212
15209
|
|
|
@@ -15248,8 +15245,11 @@ width: 38px;
|
|
|
15248
15245
|
display: flex;
|
|
15249
15246
|
align-items: center;
|
|
15250
15247
|
justify-content: flex-start;
|
|
15251
|
-
padding:
|
|
15252
|
-
|
|
15248
|
+
padding-top: var(--nile-spacing-md);
|
|
15249
|
+
padding-bottom: var(--nile-spacing-md);
|
|
15250
|
+
padding-left: var(--nile-spacing-lg);
|
|
15251
|
+
padding-right: var(--nile-spacing-lg);
|
|
15252
|
+
font-size: var(--nile-type-scale-3);
|
|
15253
15253
|
color: var(--nile-side-bar-footer-color, #374151);
|
|
15254
15254
|
cursor: pointer;
|
|
15255
15255
|
border-radius: var(--nile-side-bar-footer-radius, 0.375rem);
|
|
@@ -15291,8 +15291,11 @@ width: 38px;
|
|
|
15291
15291
|
|
|
15292
15292
|
:host([type='support']) .footer-item {
|
|
15293
15293
|
background: var(--nile-colors-neutral-400);
|
|
15294
|
-
|
|
15294
|
+
height: 38px;
|
|
15295
15295
|
}
|
|
15296
|
+
:host([type='support'][active]) .footer-item {
|
|
15297
|
+
background: var(--nile-colors-neutral-500);
|
|
15298
|
+
}
|
|
15296
15299
|
|
|
15297
15300
|
:host([collapsed][type='avatar']) .footer-item {
|
|
15298
15301
|
padding: 3px;
|
|
@@ -15308,9 +15311,8 @@ width: 38px;
|
|
|
15308
15311
|
height: 38px;
|
|
15309
15312
|
width: 38px;
|
|
15310
15313
|
}
|
|
15311
|
-
|
|
15312
|
-
|
|
15313
|
-
<div part="base" class="footer-item">
|
|
15314
|
+
`;let gm=class extends Re{constructor(){super(...arguments),this.type=null}static get styles(){return[Nm]}handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{type:this.type},bubbles:!0,composed:!0}))}render(){return R`
|
|
15315
|
+
<div part="base" class="footer-item" @click=${this.handleClick}>
|
|
15314
15316
|
<slot name="icon" part="icon"></slot>
|
|
15315
15317
|
<slot name="text" part="text"></slot>
|
|
15316
15318
|
<slot name="action" part="action"></slot>
|
|
@@ -15780,8 +15782,8 @@ width: 38px;
|
|
|
15780
15782
|
flex-direction: column;
|
|
15781
15783
|
gap: var(--nile-spacing-xs);
|
|
15782
15784
|
padding-right: var(--nile-spacing-xl);
|
|
15783
|
-
padding-top: var(--nile-spacing-
|
|
15784
|
-
padding-bottom: var(--nile-spacing-
|
|
15785
|
+
padding-top: var(--nile-spacing-3xl);
|
|
15786
|
+
padding-bottom: var(--nile-spacing-3xl);
|
|
15785
15787
|
}
|
|
15786
15788
|
|
|
15787
15789
|
nile-side-bar-action-menu {
|
|
@@ -15802,6 +15804,12 @@ width: 38px;
|
|
|
15802
15804
|
margin-left: 0;
|
|
15803
15805
|
margin-right: 0;
|
|
15804
15806
|
border-radius: 0;
|
|
15807
|
+
color: black;
|
|
15808
|
+
}
|
|
15809
|
+
|
|
15810
|
+
nile-side-bar-action-menu-item[active]::part(base):hover {
|
|
15811
|
+
background: var(--nile-colors-primary-100);
|
|
15812
|
+
color: black;
|
|
15805
15813
|
}
|
|
15806
15814
|
|
|
15807
15815
|
nile-side-bar-action-menu-item::part(label) {
|
|
@@ -15827,7 +15835,7 @@ width: 38px;
|
|
|
15827
15835
|
pointer-events: auto;
|
|
15828
15836
|
transition-delay: 0ms;
|
|
15829
15837
|
}
|
|
15830
|
-
`;let Om=class extends Re{constructor(){super(...arguments),this.collapsed=!1,this.fixed=!1,this.showTooltip=!1,this.activeIndex=-1,this.handleItemSelect=e=>{const t=e.detail.item,i=this.sidebarItems.indexOf(t);this.sidebarItems.forEach(((e,t)=>e.active=t===i)),this.activeIndex=i,this.dispatchEvent(new CustomEvent("nile-change",{detail:{selectedItem:t,index:i},bubbles:!0,composed:!0})),this.requestUpdate()}}static get styles(){return[Am]}get sidebarItems(){if(!this.defaultSlot)return[];return this.defaultSlot.assignedElements({flatten:!0}).flatMap((e=>"nile-inline-sidebar-item"===e.tagName.toLowerCase()?[e]:Array.from(e.querySelectorAll("nile-inline-sidebar-item"))))}connectedCallback(){super.connectedCallback(),this.addEventListener("nile-click",this.handleItemSelect),this.mutationObserver=new MutationObserver((()=>this.syncActiveFromItems()))}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeEventListener("nile-click",this.handleItemSelect)}firstUpdated(){this.observeSidebarItems(),this.syncActiveFromItems(),this.fixed&&(this.collapsed=!1)}observeSidebarItems(){this.sidebarItems?.length&&this.mutationObserver&&this.sidebarItems.forEach((e=>this.mutationObserver.observe(e,{attributes:!0,attributeFilter:["active"]})))}syncActiveFromItems(){if(!this.sidebarItems?.length)return;const e=this.sidebarItems.findIndex((e=>e.hasAttribute("active")));-1!==e&&e!==this.activeIndex&&(this.activeIndex=e,this.requestUpdate())}toggleCollapse(){this.fixed||(this.collapsed=!this.collapsed,this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{collapsed:this.collapsed},bubbles:!0,composed:!0})))}handleMenuItemClick(e){const t=this.sidebarItems[e];if(!t||t.hasAttribute("disabled"))return;this.sidebarItems.forEach(((t,i)=>t.active=i===e)),this.activeIndex=e;const i=t.textContent?.trim()||"",M=t.href;this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:t,href:M,text:i},bubbles:!0,composed:!0})),M&&(window.location.href=M),this.requestUpdate()}get menuItemsTemplate(){return this.sidebarItems?.length?this.sidebarItems.map(((e,t)=>{const i=R`
|
|
15838
|
+
`;let Om=class extends Re{constructor(){super(...arguments),this.collapsed=!1,this.fixed=!1,this.showTooltip=!1,this.activeIndex=-1,this.handleItemSelect=e=>{const t=e.detail.item,i=this.sidebarItems.indexOf(t);this.sidebarItems.forEach(((e,t)=>e.active=t===i)),this.activeIndex=i,this.dispatchEvent(new CustomEvent("nile-change",{detail:{selectedItem:t,index:i},bubbles:!0,composed:!0})),this.requestUpdate()}}static get styles(){return[Am]}get sidebarItems(){if(!this.defaultSlot)return[];return this.defaultSlot.assignedElements({flatten:!0}).flatMap((e=>"nile-inline-sidebar-item"===e.tagName.toLowerCase()?[e]:Array.from(e.querySelectorAll("nile-inline-sidebar-item"))))}connectedCallback(){super.connectedCallback(),this.addEventListener("nile-click",this.handleItemSelect),this.mutationObserver=new MutationObserver((()=>this.syncActiveFromItems()))}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeEventListener("nile-click",this.handleItemSelect)}firstUpdated(){this.observeSidebarItems(),this.syncActiveFromItems(),this.fixed&&(this.collapsed=!1)}observeSidebarItems(){this.sidebarItems?.length&&this.mutationObserver&&this.sidebarItems.forEach((e=>this.mutationObserver.observe(e,{attributes:!0,attributeFilter:["active"]})))}syncActiveFromItems(){if(!this.sidebarItems?.length)return;const e=this.sidebarItems.findIndex((e=>e.hasAttribute("active")));-1!==e&&e!==this.activeIndex&&(this.activeIndex=e,this.requestUpdate())}toggleCollapse(){this.fixed||(this.collapsed=!this.collapsed,this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{collapsed:this.collapsed},bubbles:!0,composed:!0})))}handleMenuItemClick(e){const t=this.sidebarItems[e];if(!t||t.hasAttribute("disabled"))return;this.sidebarItems.forEach(((t,i)=>t.active=i===e)),this.activeIndex=e;const i=t.textContent?.trim()||"",M=t.href;this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:t,href:M,text:i},bubbles:!0,composed:!0})),M&&(window.location.href=M),this.requestUpdate()}get menuItemsTemplate(){return this.sidebarItems?.length?this.sidebarItems.map(((e,t)=>{const i=e.tooltip,M=e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight,n=R`
|
|
15831
15839
|
<nile-side-bar-action-menu-item
|
|
15832
15840
|
?disabled=${e.hasAttribute("disabled")}
|
|
15833
15841
|
?active=${this.activeIndex===t}
|
|
@@ -15835,11 +15843,15 @@ width: 38px;
|
|
|
15835
15843
|
>
|
|
15836
15844
|
${e.textContent}
|
|
15837
15845
|
</nile-side-bar-action-menu-item>
|
|
15838
|
-
`;return
|
|
15839
|
-
<nile-tooltip
|
|
15840
|
-
|
|
15841
|
-
|
|
15842
|
-
|
|
15846
|
+
`;return i||M?R`
|
|
15847
|
+
<nile-inline-tooltip
|
|
15848
|
+
content=${e.textContent?.trim()||""}
|
|
15849
|
+
hoist
|
|
15850
|
+
placement="right"
|
|
15851
|
+
>
|
|
15852
|
+
${n}
|
|
15853
|
+
</nile-inline-tooltip>
|
|
15854
|
+
`:n})):null}render(){return R`
|
|
15843
15855
|
<div class="sidebar" part="base">
|
|
15844
15856
|
<div class="sidebar-header" part="header">
|
|
15845
15857
|
${this.fixed?null:this.collapsed?R`
|
|
@@ -15910,6 +15922,10 @@ width: 38px;
|
|
|
15910
15922
|
font-weight: 500;
|
|
15911
15923
|
}
|
|
15912
15924
|
|
|
15925
|
+
:host([active]) .item:hover {
|
|
15926
|
+
background: var(--nile-colors-primary-100);
|
|
15927
|
+
}
|
|
15928
|
+
|
|
15913
15929
|
|
|
15914
15930
|
:host([disabled]) {
|
|
15915
15931
|
color: var(--nile-colors-neutral-500);
|
|
@@ -15935,11 +15951,13 @@ a {
|
|
|
15935
15951
|
text-decoration: none;
|
|
15936
15952
|
}
|
|
15937
15953
|
|
|
15938
|
-
|
|
15954
|
+
|
|
15955
|
+
|
|
15956
|
+
`;let xm=class extends Re{constructor(){super(...arguments),this.active=!1,this.disabled=!1,this.tooltip=!1}static get styles(){return[pm]}handleClick(e){if(this.disabled)return e.preventDefault(),void e.stopPropagation();const t=this.closest("nile-inline-sidebar");if(t){t.querySelectorAll("nile-inline-sidebar-item").forEach((e=>e.active=e===this))}const i=this.textContent?.trim()||"";this.dispatchEvent(new CustomEvent("nile-click",{detail:{item:this,href:this.href,text:i},bubbles:!0,composed:!0})),this.href&&(window.location.href=this.href)}render(){return R`
|
|
15939
15957
|
<div class="item" @click=${this.handleClick} role="button" tabindex="0">
|
|
15940
15958
|
${this.href?R`<a href=${this.href} @click=${e=>e.preventDefault()}><slot></slot></a>`:R`<slot></slot>`}
|
|
15941
15959
|
</div>
|
|
15942
|
-
`}};e([ce({type:Boolean,reflect:!0})],xm.prototype,"active",void 0),e([ce({type:Boolean,reflect:!0})],xm.prototype,"disabled",void 0),e([ce({type:String})],xm.prototype,"href",void 0),xm=e([Ne("nile-inline-sidebar-item")],xm);const Lm=r`
|
|
15960
|
+
`}};e([ce({type:Boolean,reflect:!0})],xm.prototype,"active",void 0),e([ce({type:Boolean,reflect:!0})],xm.prototype,"disabled",void 0),e([ce({type:String})],xm.prototype,"href",void 0),e([ce({type:Boolean,reflect:!0})],xm.prototype,"tooltip",void 0),xm=e([Ne("nile-inline-sidebar-item")],xm);const Lm=r`
|
|
15943
15961
|
:host { }
|
|
15944
15962
|
|
|
15945
15963
|
.tippy-box[data-animation=fade][data-state=hidden] { opacity: 0; }
|
|
@@ -16041,20 +16059,29 @@ a {
|
|
|
16041
16059
|
.tippy-svg-arrow > svg {
|
|
16042
16060
|
position: absolute;
|
|
16043
16061
|
}
|
|
16044
|
-
`;!function(){const e="nile-lite-tooltip-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent=Lm.cssText,document.head.appendChild(t)}();var Sm="top",mm="bottom",Em="right",wm="left",Qm="auto",km=[Sm,mm,Em,wm],Cm="start",bm="end",fm="viewport",vm="popper",Um=km.reduce((function(e,t){return e.concat([t+"-"+Cm,t+"-"+bm])}),[]),Ym=[].concat(km,[Qm]).reduce((function(e,t){return e.concat([t,t+"-"+Cm,t+"-"+bm])}),[]),Zm=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Vm(e){return e?(e.nodeName||"").toLowerCase():null}function Wm(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Pm(e){return e instanceof Wm(e).Element||e instanceof Element}function Rm(e){return e instanceof Wm(e).HTMLElement||e instanceof HTMLElement}function Bm(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Wm(e).ShadowRoot||e instanceof ShadowRoot)}var Gm={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];Rm(n)&&Vm(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}),{});Rm(M)&&Vm(M)&&(Object.assign(M.style,o),Object.keys(n).forEach((function(e){M.removeAttribute(e)})))}))}},requires:["computeStyles"]};function _m(e){return e.split("-")[0]}var Fm=Math.max,Hm=Math.min,Jm=Math.round;function $m(){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 Xm(){return!/^((?!chrome|android).)*safari/i.test($m())}function qm(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var M=e.getBoundingClientRect(),n=1,o=1;t&&Rm(e)&&(n=e.offsetWidth>0&&Jm(M.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Jm(M.height)/e.offsetHeight||1);var r=(Pm(e)?Wm(e):window).visualViewport,s=!Xm()&&i,a=(M.left+(s&&r?r.offsetLeft:0))/n,l=(M.top+(s&&r?r.offsetTop:0))/o,N=M.width/n,g=M.height/o;return{width:N,height:g,top:l,right:a+N,bottom:l+g,left:a,x:a,y:l}}function Km(e){var t=qm(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 eE(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Bm(i)){var M=t;do{if(M&&e.isSameNode(M))return!0;M=M.parentNode||M.host}while(M)}return!1}function tE(e){return Wm(e).getComputedStyle(e)}function iE(e){return["table","td","th"].indexOf(Vm(e))>=0}function ME(e){return((Pm(e)?e.ownerDocument:e.document)||window.document).documentElement}function nE(e){return"html"===Vm(e)?e:e.assignedSlot||e.parentNode||(Bm(e)?e.host:null)||ME(e)}function oE(e){return Rm(e)&&"fixed"!==tE(e).position?e.offsetParent:null}function rE(e){for(var t=Wm(e),i=oE(e);i&&iE(i)&&"static"===tE(i).position;)i=oE(i);return i&&("html"===Vm(i)||"body"===Vm(i)&&"static"===tE(i).position)?t:i||function(e){var t=/firefox/i.test($m());if(/Trident/i.test($m())&&Rm(e)&&"fixed"===tE(e).position)return null;var i=nE(e);for(Bm(i)&&(i=i.host);Rm(i)&&["html","body"].indexOf(Vm(i))<0;){var M=tE(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 sE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function aE(e,t,i){return Fm(e,Hm(t,i))}function lE(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function NE(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}var gE={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=_m(i.placement),a=sE(s),l=[wm,Em].indexOf(s)>=0?"height":"width";if(o&&r){var N=function(e,t){return lE("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:NE(e,km))}(n.padding,i),g=Km(o),u="y"===a?Sm:wm,c="y"===a?mm:Em,D=i.rects.reference[l]+i.rects.reference[a]-r[a]-i.rects.popper[l],j=r[a]-i.rects.reference[a],I=rE(o),z=I?"y"===a?I.clientHeight||0:I.clientWidth||0:0,d=D/2-j/2,h=N[u],T=z-g[l]-N[c],y=z/2-g[l]/2+d,A=aE(h,y,T),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)))&&eE(t.elements.popper,M)&&(t.elements.arrow=M)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function uE(e){return e.split("-")[1]}var cE={top:"auto",right:"auto",bottom:"auto",left:"auto"};function DE(e){var t,i=e.popper,M=e.popperRect,n=e.placement,o=e.variation,r=e.offsets,s=e.position,a=e.gpuAcceleration,l=e.adaptive,N=e.roundOffsets,g=e.isFixed,u=r.x,c=void 0===u?0:u,D=r.y,j=void 0===D?0:D,I="function"==typeof N?N({x:c,y:j}):{x:c,y:j};c=I.x,j=I.y;var z=r.hasOwnProperty("x"),d=r.hasOwnProperty("y"),h=wm,T=Sm,y=window;if(l){var A=rE(i),O="clientHeight",p="clientWidth";if(A===Wm(i)&&"static"!==tE(A=ME(i)).position&&"absolute"===s&&(O="scrollHeight",p="scrollWidth"),n===Sm||(n===wm||n===Em)&&o===bm)T=mm,j-=(g&&A===y&&y.visualViewport?y.visualViewport.height:A[O])-M.height,j*=a?1:-1;if(n===wm||(n===Sm||n===mm)&&o===bm)h=Em,c-=(g&&A===y&&y.visualViewport?y.visualViewport.width:A[p])-M.width,c*=a?1:-1}var x,L=Object.assign({position:s},l&&cE),S=!0===N?function(e,t){var i=e.x,M=e.y,n=t.devicePixelRatio||1;return{x:Jm(i*n)/n||0,y:Jm(M*n)/n||0}}({x:c,y:j},Wm(i)):{x:c,y:j};return c=S.x,j=S.y,a?Object.assign({},L,((x={})[T]=d?"0":"",x[h]=z?"0":"",x.transform=(y.devicePixelRatio||1)<=1?"translate("+c+"px, "+j+"px)":"translate3d("+c+"px, "+j+"px, 0)",x)):Object.assign({},L,((t={})[T]=d?j+"px":"",t[h]=z?c+"px":"",t.transform="",t))}var jE={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,l={placement:_m(t.placement),variation:uE(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,DE(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,DE(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},IE={passive:!0};var zE={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=Wm(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach((function(e){e.addEventListener("scroll",i.update,IE)})),s&&a.addEventListener("resize",i.update,IE),function(){o&&l.forEach((function(e){e.removeEventListener("scroll",i.update,IE)})),s&&a.removeEventListener("resize",i.update,IE)}},data:{}},dE={left:"right",right:"left",bottom:"top",top:"bottom"};function hE(e){return e.replace(/left|right|bottom|top/g,(function(e){return dE[e]}))}var TE={start:"end",end:"start"};function yE(e){return e.replace(/start|end/g,(function(e){return TE[e]}))}function AE(e){var t=Wm(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function OE(e){return qm(ME(e)).left+AE(e).scrollLeft}function pE(e){var t=tE(e),i=t.overflow,M=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+M)}function xE(e){return["html","body","#document"].indexOf(Vm(e))>=0?e.ownerDocument.body:Rm(e)&&pE(e)?e:xE(nE(e))}function LE(e,t){var i;void 0===t&&(t=[]);var M=xE(e),n=M===(null==(i=e.ownerDocument)?void 0:i.body),o=Wm(M),r=n?[o].concat(o.visualViewport||[],pE(M)?M:[]):M,s=t.concat(r);return n?s:s.concat(LE(nE(r)))}function SE(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mE(e,t,i){return t===fm?SE(function(e,t){var i=Wm(e),M=ME(e),n=i.visualViewport,o=M.clientWidth,r=M.clientHeight,s=0,a=0;if(n){o=n.width,r=n.height;var l=Xm();(l||!l&&"fixed"===t)&&(s=n.offsetLeft,a=n.offsetTop)}return{width:o,height:r,x:s+OE(e),y:a}}(e,i)):Pm(t)?function(e,t){var i=qm(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):SE(function(e){var t,i=ME(e),M=AE(e),n=null==(t=e.ownerDocument)?void 0:t.body,o=Fm(i.scrollWidth,i.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=Fm(i.scrollHeight,i.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-M.scrollLeft+OE(e),a=-M.scrollTop;return"rtl"===tE(n||i).direction&&(s+=Fm(i.clientWidth,n?n.clientWidth:0)-o),{width:o,height:r,x:s,y:a}}(ME(e)))}function EE(e,t,i,M){var n="clippingParents"===t?function(e){var t=LE(nE(e)),i=["absolute","fixed"].indexOf(tE(e).position)>=0&&Rm(e)?rE(e):e;return Pm(i)?t.filter((function(e){return Pm(e)&&eE(e,i)&&"body"!==Vm(e)})):[]}(e):[].concat(t),o=[].concat(n,[i]),r=o[0],s=o.reduce((function(t,i){var n=mE(e,i,M);return t.top=Fm(n.top,t.top),t.right=Hm(n.right,t.right),t.bottom=Hm(n.bottom,t.bottom),t.left=Fm(n.left,t.left),t}),mE(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 wE(e){var t,i=e.reference,M=e.element,n=e.placement,o=n?_m(n):null,r=n?uE(n):null,s=i.x+i.width/2-M.width/2,a=i.y+i.height/2-M.height/2;switch(o){case Sm:t={x:s,y:i.y-M.height};break;case mm:t={x:s,y:i.y+i.height};break;case Em:t={x:i.x+i.width,y:a};break;case wm:t={x:i.x-M.width,y:a};break;default:t={x:i.x,y:i.y}}var l=o?sE(o):null;if(null!=l){var N="y"===l?"height":"width";switch(r){case Cm:t[l]=t[l]-(i[N]/2-M[N]/2);break;case bm:t[l]=t[l]+(i[N]/2-M[N]/2)}}return t}function QE(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,l=i.rootBoundary,N=void 0===l?fm:l,g=i.elementContext,u=void 0===g?vm:g,c=i.altBoundary,D=void 0!==c&&c,j=i.padding,I=void 0===j?0:j,z=lE("number"!=typeof I?I:NE(I,km)),d=u===vm?"reference":vm,h=e.rects.popper,T=e.elements[D?d:u],y=EE(Pm(T)?T:T.contextElement||ME(e.elements.popper),a,N,r),A=qm(e.elements.reference),O=wE({reference:A,element:h,strategy:"absolute",placement:n}),p=SE(Object.assign({},h,O)),x=u===vm?p:A,L={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(u===vm&&S){var m=S[n];Object.keys(L).forEach((function(e){var t=[Em,mm].indexOf(e)>=0?1:-1,i=[Sm,mm].indexOf(e)>=0?"y":"x";L[e]+=m[i]*t}))}return L}function kE(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,l=void 0===a?Ym:a,N=uE(M),g=N?s?Um:Um.filter((function(e){return uE(e)===N})):km,u=g.filter((function(e){return l.indexOf(e)>=0}));0===u.length&&(u=g);var c=u.reduce((function(t,i){return t[i]=QE(e,{placement:i,boundary:n,rootBoundary:o,padding:r})[_m(i)],t}),{});return Object.keys(c).sort((function(e,t){return c[e]-c[t]}))}var CE={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,l=i.padding,N=i.boundary,g=i.rootBoundary,u=i.altBoundary,c=i.flipVariations,D=void 0===c||c,j=i.allowedAutoPlacements,I=t.options.placement,z=_m(I),d=a||(z===I||!D?[hE(I)]:function(e){if(_m(e)===Qm)return[];var t=hE(e);return[yE(e),t,yE(t)]}(I)),h=[I].concat(d).reduce((function(e,i){return e.concat(_m(i)===Qm?kE(t,{placement:i,boundary:N,rootBoundary:g,padding:l,flipVariations:D,allowedAutoPlacements:j}):i)}),[]),T=t.rects.reference,y=t.rects.popper,A=new Map,O=!0,p=h[0],x=0;x<h.length;x++){var L=h[x],S=_m(L),m=uE(L)===Cm,E=[Sm,mm].indexOf(S)>=0,w=E?"width":"height",Q=QE(t,{placement:L,boundary:N,rootBoundary:g,altBoundary:u,padding:l}),k=E?m?Em:wm:m?mm:Sm;T[w]>y[w]&&(k=hE(k));var C=hE(k),b=[];if(o&&b.push(Q[S]<=0),s&&b.push(Q[k]<=0,Q[C]<=0),b.every((function(e){return e}))){p=L,O=!1;break}A.set(L,b)}if(O)for(var f=function(e){var t=h.find((function(t){var i=A.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return p=t,"break"},v=D?3:1;v>0;v--){if("break"===f(v))break}t.placement!==p&&(t.modifiersData[M]._skip=!0,t.placement=p,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bE(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 fE(e){return[Sm,Em,mm,wm].some((function(t){return e[t]>=0}))}var vE={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=QE(t,{elementContext:"reference"}),s=QE(t,{altBoundary:!0}),a=bE(r,M),l=bE(s,n,o),N=fE(a),g=fE(l);t.modifiersData[i]={referenceClippingOffsets:a,popperEscapeOffsets:l,isReferenceHidden:N,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":N,"data-popper-escaped":g})}};var UE={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=Ym.reduce((function(e,i){return e[i]=function(e,t,i){var M=_m(e),n=[wm,Sm].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,[wm,Em].indexOf(M)>=0?{x:s,y:r}:{x:r,y:s}}(i,t.rects,o),e}),{}),s=r[t.placement],a=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=l),t.modifiersData[M]=r}};var YE={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=wE({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var ZE={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,l=i.rootBoundary,N=i.altBoundary,g=i.padding,u=i.tether,c=void 0===u||u,D=i.tetherOffset,j=void 0===D?0:D,I=QE(t,{boundary:a,rootBoundary:l,padding:g,altBoundary:N}),z=_m(t.placement),d=uE(t.placement),h=!d,T=sE(z),y="x"===T?"y":"x",A=t.modifiersData.popperOffsets,O=t.rects.reference,p=t.rects.popper,x="function"==typeof j?j(Object.assign({},t.rects,{placement:t.placement})):j,L="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,m={x:0,y:0};if(A){if(o){var E,w="y"===T?Sm:wm,Q="y"===T?mm:Em,k="y"===T?"height":"width",C=A[T],b=C+I[w],f=C-I[Q],v=c?-p[k]/2:0,U=d===Cm?O[k]:p[k],Y=d===Cm?-p[k]:-O[k],Z=t.elements.arrow,V=c&&Z?Km(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],B=aE(0,O[k],V[k]),G=h?O[k]/2-v-B-P-L.mainAxis:U-B-P-L.mainAxis,_=h?-O[k]/2+v+B+R+L.mainAxis:Y+B+R+L.mainAxis,F=t.elements.arrow&&rE(t.elements.arrow),H=F?"y"===T?F.clientTop||0:F.clientLeft||0:0,J=null!=(E=null==S?void 0:S[T])?E:0,$=C+_-J,X=aE(c?Hm(b,C+G-J-H):b,C,c?Fm(f,$):f);A[T]=X,m[T]=X-C}if(s){var q,K="x"===T?Sm:wm,ee="x"===T?mm:Em,te=A[y],ie="y"===y?"height":"width",Me=te+I[K],ne=te-I[ee],oe=-1!==[Sm,wm].indexOf(z),re=null!=(q=null==S?void 0:S[y])?q:0,se=oe?Me:te-O[ie]-p[ie]-re+L.altAxis,ae=oe?te+O[ie]+p[ie]-re-L.altAxis:ne,le=c&&oe?function(e,t,i){var M=aE(e,t,i);return M>i?i:M}(se,te,ae):aE(c?se:Me,te,c?ae:ne);A[y]=le,m[y]=le-te}t.modifiersData[M]=m}},requiresIfExists:["offset"]};function VE(e,t,i){void 0===i&&(i=!1);var M,n,o=Rm(t),r=Rm(t)&&function(e){var t=e.getBoundingClientRect(),i=Jm(t.width)/e.offsetWidth||1,M=Jm(t.height)/e.offsetHeight||1;return 1!==i||1!==M}(t),s=ME(t),a=qm(e,r,i),l={scrollLeft:0,scrollTop:0},N={x:0,y:0};return(o||!o&&!i)&&(("body"!==Vm(t)||pE(s))&&(l=(M=t)!==Wm(M)&&Rm(M)?{scrollLeft:(n=M).scrollLeft,scrollTop:n.scrollTop}:AE(M)),Rm(t)?((N=qm(t,!0)).x+=t.clientLeft,N.y+=t.clientTop):s&&(N.x=OE(s))),{x:a.left+l.scrollLeft-N.x,y:a.top+l.scrollTop-N.y,width:a.width,height:a.height}}function WE(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 PE={placement:"bottom",modifiers:[],strategy:"absolute"};function RE(){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 BE(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,M=void 0===i?[]:i,n=t.defaultOptions,o=void 0===n?PE:n;return function(e,t,i){void 0===i&&(i=o);var n,r,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},PE,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],l=!1,N={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:Pm(e)?LE(e):e.contextElement?LE(e.contextElement):[],popper:LE(t)};var r=function(e){var t=WE(e);return Zm.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:N,options:M}),r=function(){};a.push(o||r)}})),N.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,i=e.popper;if(RE(t,i)){s.rects={reference:VE(t,rE(i),"fixed"===s.options.strategy),popper:Km(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:N})||s)}else s.reset=!1,M=-1}}},update:(n=function(){return new Promise((function(e){N.forceUpdate(),e(s)}))},function(){return r||(r=new Promise((function(e){Promise.resolve().then((function(){r=void 0,e(n())}))}))),r}),destroy:function(){g(),l=!0}};if(!RE(e,t))return N;function g(){a.forEach((function(e){return e()})),a=[]}return N.setOptions(i).then((function(e){!l&&i.onFirstUpdate&&i.onFirstUpdate(e)})),N}}var GE=BE({defaultModifiers:[zE,YE,jE,Gm,UE,CE,ZE,gE,vE]}),_E='<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>',FE="tippy-content",HE="tippy-arrow",JE="tippy-svg-arrow",$E={passive:!0,capture:!0},XE=function(){return document.body};function qE(e,t,i){if(Array.isArray(e)){var M=e[t];return null==M?Array.isArray(i)?i[t]:i:M}return e}function KE(e,t){var i={}.toString.call(e);return 0===i.indexOf("[object")&&i.indexOf(t+"]")>-1}function ew(e,t){return"function"==typeof e?e.apply(void 0,t):e}function tw(e,t){return 0===t?e:function(M){clearTimeout(i),i=setTimeout((function(){e(M)}),t)};var i}function iw(e,t){var i=Object.assign({},e);return t.forEach((function(e){delete i[e]})),i}function Mw(e){return[].concat(e)}function nw(e,t){-1===e.indexOf(t)&&e.push(t)}function ow(e){return[].slice.call(e)}function rw(e){return Object.keys(e).reduce((function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t}),{})}function sw(){return document.createElement("div")}function aw(e){return["Element","Fragment"].some((function(t){return KE(e,t)}))}function lw(e){return KE(e,"MouseEvent")}function Nw(e){return aw(e)?[e]:function(e){return KE(e,"NodeList")}(e)?ow(e):Array.isArray(e)?e:ow(document.querySelectorAll(e))}function gw(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function uw(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function cw(e){var t,i=Mw(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}function Dw(e,t,i){var M=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[M](t,i)}))}function jw(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 Iw={isTouch:!1},zw=0;function dw(){Iw.isTouch||(Iw.isTouch=!0,window.performance&&document.addEventListener("mousemove",hw))}function hw(){var e=performance.now();e-zw<20&&(Iw.isTouch=!1,document.removeEventListener("mousemove",hw)),zw=e}function Tw(){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 yw,Aw=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function Ow(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 pw(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function xw(e){return pw("\n %ctippy.js\n\n %c"+pw(e)+"\n\n %c👷 This is a development-only message. It will be removed in production.\n ")}function Lw(e){return[xw(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function Sw(e,t){var i;e&&!yw.has(t)&&(yw.add(t),(i=console).warn.apply(i,Lw(t)))}function mw(e,t){var i;e&&!yw.has(t)&&(yw.add(t),(i=console).error.apply(i,Lw(t)))}"production"!==process.env.NODE_ENV&&(yw=new Set);var Ew={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ww=Object.assign({appendTo:XE,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},Ew,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Qw=Object.keys(ww);function kw(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=ww[n])?M:o);return t}),{});return Object.assign({},e,t)}function Cw(e,t){var i=Object.assign({},t,{content:ew(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(kw(Object.assign({},ww,{plugins:t}))):Qw).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({},ww.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 bw(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach((function(e){var i,M,n=iw(ww,Object.keys(Ew)),o=(i=n,M=e,!{}.hasOwnProperty.call(i,M));o&&(o=0===t.filter((function(t){return t.name===e})).length),Sw(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 fw(e,t){e.innerHTML=t}function vw(e){var t=sw();return!0===e?t.className=HE:(t.className=JE,aw(e)?t.appendChild(e):fw(t,e)),t}function Uw(e,t){aw(t.content)?(fw(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?fw(e,t.content):e.textContent=t.content)}function Yw(e){var t=e.firstElementChild,i=ow(t.children);return{box:t,content:i.find((function(e){return e.classList.contains(FE)})),arrow:i.find((function(e){return e.classList.contains(HE)||e.classList.contains(JE)})),backdrop:i.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function Zw(e){var t=sw(),i=sw();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var M=sw();function n(i,M){var n=Yw(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||Uw(r,e.props),M.arrow?s?i.arrow!==M.arrow&&(o.removeChild(s),o.appendChild(vw(M.arrow))):o.appendChild(vw(M.arrow)):s&&o.removeChild(s)}return M.className=FE,M.setAttribute("data-state","hidden"),Uw(M,e.props),t.appendChild(i),i.appendChild(M),n(e.props,e.props),{popper:t,onUpdate:n}}Zw.$$tippy=!0;var Vw=1,Ww=[],Pw=[];function Rw(e,t){var i,M,n,o,r,s,a,l,N=Cw(e,Object.assign({},ww,kw(rw(t)))),g=!1,u=!1,c=!1,D=!1,j=[],I=tw(F,N.interactiveDebounce),z=Vw++,d=(l=N.plugins).filter((function(e,t){return l.indexOf(e)===t})),h={id:z,reference:e,popper:sw(),popperInstance:null,props:N,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&&Sw(h.state.isDestroyed,Ow("setProps"));if(h.state.isDestroyed)return;C("onBeforeUpdate",[h,t]),G();var i=h.props,M=Cw(e,Object.assign({},i,rw(t),{ignoreAttributes:!0}));h.props=M,B(),i.interactiveDebounce!==M.interactiveDebounce&&(v(),I=tw(F,M.interactiveDebounce));i.triggerTarget&&!M.triggerTarget?Mw(i.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):M.triggerTarget&&e.removeAttribute("aria-expanded");f(),k(),A&&A(i,M);h.popperInstance&&(X(),K().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));C("onAfterUpdate",[h,t])},setContent:function(e){h.setProps({content:e})},show:function(){"production"!==process.env.NODE_ENV&&Sw(h.state.isDestroyed,Ow("show"));var e=h.state.isVisible,t=h.state.isDestroyed,i=!h.state.isEnabled,M=Iw.isTouch&&!h.props.touch,n=qE(h.props.duration,0,ww.duration);if(e||t||i||M)return;if(m().hasAttribute("disabled"))return;if(C("onShow",[h],!1),!1===h.props.onShow(h))return;h.state.isVisible=!0,S()&&(y.style.visibility="visible");k(),V(),h.state.isMounted||(y.style.transition="none");if(S()){var o=w();gw([o.box,o.content],0)}s=function(){var e;if(h.state.isVisible&&!D){if(D=!0,y.offsetHeight,y.style.transition=h.props.moveTransition,S()&&h.props.animation){var t=w(),i=t.box,M=t.content;gw([i,M],n),uw([i,M],"visible")}b(),f(),nw(Pw,h),null==(e=h.popperInstance)||e.forceUpdate(),C("onMount",[h]),h.props.animation&&S()&&function(e,t){P(e,t)}(n,(function(){h.state.isShown=!0,C("onShown",[h])}))}},function(){var e,t=h.props.appendTo,i=m();e=h.props.interactive&&t===XE||"parent"===t?i.parentNode:ew(t,[i]);e.contains(y)||e.appendChild(y);h.state.isMounted=!0,X(),"production"!==process.env.NODE_ENV&&Sw(h.props.interactive&&t===ww.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&&Sw(h.state.isDestroyed,Ow("hide"));var e=!h.state.isVisible,t=h.state.isDestroyed,i=!h.state.isEnabled,M=qE(h.props.duration,1,ww.duration);if(e||t||i)return;if(C("onHide",[h],!1),!1===h.props.onHide(h))return;h.state.isVisible=!1,h.state.isShown=!1,D=!1,g=!1,S()&&(y.style.visibility="hidden");if(v(),W(),k(!0),S()){var n=w(),o=n.box,r=n.content;h.props.animation&&(gw([o,r],M),uw([o,r],"hidden"))}b(),f(),h.props.animation?S()&&function(e,t){P(e,(function(){!h.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&t()}))}(M,h.unmount):h.unmount()},hideWithInteractivity:function(e){"production"!==process.env.NODE_ENV&&Sw(h.state.isDestroyed,Ow("hideWithInteractivity"));E().addEventListener("mousemove",I),nw(Ww,I),I(e)},enable:function(){h.state.isEnabled=!0},disable:function(){h.hide(),h.state.isEnabled=!1},unmount:function(){"production"!==process.env.NODE_ENV&&Sw(h.state.isDestroyed,Ow("unmount"));h.state.isVisible&&h.hide();if(!h.state.isMounted)return;q(),K().forEach((function(e){e._tippy.unmount()})),y.parentNode&&y.parentNode.removeChild(y);Pw=Pw.filter((function(e){return e!==h})),h.state.isMounted=!1,C("onHidden",[h])},destroy:function(){"production"!==process.env.NODE_ENV&&Sw(h.state.isDestroyed,Ow("destroy"));if(h.state.isDestroyed)return;h.clearDelayTimeouts(),h.unmount(),G(),delete e._tippy,h.state.isDestroyed=!0,C("onDestroy",[h])}};if(!N.render)return"production"!==process.env.NODE_ENV&&mw(!0,"render() function has not been supplied."),h;var T=N.render(h),y=T.popper,A=T.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+h.id,h.popper=y,e._tippy=h,y._tippy=h;var O=d.map((function(e){return e.fn(h)})),p=e.hasAttribute("aria-expanded");return B(),f(),k(),C("onCreate",[h]),N.showOnCreate&&ee(),y.addEventListener("mouseenter",(function(){h.props.interactive&&h.state.isVisible&&h.clearDelayTimeouts()})),y.addEventListener("mouseleave",(function(){h.props.interactive&&h.props.trigger.indexOf("mouseenter")>=0&&E().addEventListener("mousemove",I)})),h;function x(){var e=h.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===x()[0]}function S(){var e;return!(null==(e=h.props.render)||!e.$$tippy)}function m(){return a||e}function E(){var e=m().parentNode;return e?cw(e):document}function w(){return Yw(y)}function Q(e){return h.state.isMounted&&!h.state.isVisible||Iw.isTouch||o&&"focus"===o.type?0:qE(h.props.delay,e?0:1,ww.delay)}function k(e){void 0===e&&(e=!1),y.style.pointerEvents=h.props.interactive&&!e?"":"none",y.style.zIndex=""+h.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=h.props)[e].apply(M,t)}function b(){var t=h.props.aria;if(t.content){var i="aria-"+t.content,M=y.id;Mw(h.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(i);if(h.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(){!p&&h.props.aria.expanded&&Mw(h.props.triggerTarget||e).forEach((function(e){h.props.interactive?e.setAttribute("aria-expanded",h.state.isVisible&&e===m()?"true":"false"):e.removeAttribute("aria-expanded")}))}function v(){E().removeEventListener("mousemove",I),Ww=Ww.filter((function(e){return e!==I}))}function U(t){if(!Iw.isTouch||!c&&"mousedown"!==t.type){var i=t.composedPath&&t.composedPath()[0]||t.target;if(!h.props.interactive||!jw(y,i)){if(Mw(h.props.triggerTarget||e).some((function(e){return jw(e,i)}))){if(Iw.isTouch)return;if(h.state.isVisible&&h.props.trigger.indexOf("click")>=0)return}else C("onClickOutside",[h,t]);!0===h.props.hideOnClick&&(h.clearDelayTimeouts(),h.hide(),u=!0,setTimeout((function(){u=!1})),h.state.isMounted||W())}}}function Y(){c=!0}function Z(){c=!1}function V(){var e=E();e.addEventListener("mousedown",U,!0),e.addEventListener("touchend",U,$E),e.addEventListener("touchstart",Z,$E),e.addEventListener("touchmove",Y,$E)}function W(){var e=E();e.removeEventListener("mousedown",U,!0),e.removeEventListener("touchend",U,$E),e.removeEventListener("touchstart",Z,$E),e.removeEventListener("touchmove",Y,$E)}function P(e,t){var i=w().box;function M(e){e.target===i&&(Dw(i,"remove",M),t())}if(0===e)return t();Dw(i,"remove",r),Dw(i,"add",M),r=M}function R(t,i,M){void 0===M&&(M=!1),Mw(h.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,i,M),j.push({node:e,eventType:t,handler:i,options:M})}))}function B(){var e;L()&&(R("touchstart",_,{passive:!0}),R("touchend",H,{passive:!0})),(e=h.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(Aw?"focusout":"blur",J);break;case"focusin":R("focusout",J)}}))}function G(){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(h.state.isEnabled&&!$(e)&&!u){var M="focus"===(null==(t=o)?void 0:t.type);o=e,a=e.currentTarget,f(),!h.state.isVisible&&lw(e)&&Ww.forEach((function(t){return t(e)})),"click"===e.type&&(h.props.trigger.indexOf("mouseenter")<0||g)&&!1!==h.props.hideOnClick&&h.state.isVisible?i=!0:ee(e),"click"===e.type&&(g=!i),i&&!M&&te(e)}}function F(e){var t=e.target,i=m().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:N}: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,l="top"===r?s.bottom.y:0,N="right"===r?s.left.x:0,g="left"===r?s.right.x:0,u=t.top-M+a>o,c=M-t.bottom-l>o,D=t.left-i+N>o,j=i-t.right-g>o;return u||c||D||j}))})(M,e)&&(v(),te(e))}}function H(e){$(e)||h.props.trigger.indexOf("click")>=0&&g||(h.props.interactive?h.hideWithInteractivity(e):te(e))}function J(e){h.props.trigger.indexOf("focusin")<0&&e.target!==m()||h.props.interactive&&e.relatedTarget&&y.contains(e.relatedTarget)||te(e)}function $(e){return!!Iw.isTouch&&L()!==e.type.indexOf("touch")>=0}function X(){q();var t=h.props,i=t.popperOptions,M=t.placement,n=t.offset,o=t.getReferenceClientRect,r=t.moveTransition,a=S()?Yw(y).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||m()}:e,N={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}},N];S()&&a&&g.push({name:"arrow",options:{element:a,padding:3}}),g.push.apply(g,(null==i?void 0:i.modifiers)||[]),h.popperInstance=GE(l,y,Object.assign({},i,{placement:M,onFirstUpdate:s,modifiers:g}))}function q(){h.popperInstance&&(h.popperInstance.destroy(),h.popperInstance=null)}function K(){return ow(y.querySelectorAll("[data-tippy-root]"))}function ee(e){h.clearDelayTimeouts(),e&&C("onTrigger",[h,e]),V();var t=Q(!0),M=x(),n=M[0],o=M[1];Iw.isTouch&&"hold"===n&&o&&(t=o),t?i=setTimeout((function(){h.show()}),t):h.show()}function te(e){if(h.clearDelayTimeouts(),C("onUntrigger",[h,e]),h.state.isVisible){if(!(h.props.trigger.indexOf("mouseenter")>=0&&h.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&g)){var t=Q(!1);t?M=setTimeout((function(){h.state.isVisible&&h.hide()}),t):n=requestAnimationFrame((function(){h.hide()}))}}else W()}}function Bw(e,t){void 0===t&&(t={});var i=ww.plugins.concat(t.plugins||[]);"production"!==process.env.NODE_ENV&&(!function(e){var t=!e,i="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;mw(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),mw(i,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),bw(t,i)),document.addEventListener("touchstart",dw,$E),window.addEventListener("blur",Tw);var M=Object.assign({},t,{plugins:i}),n=Nw(e);if("production"!==process.env.NODE_ENV){var o=aw(M.content),r=n.length>1;Sw(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&&Rw(t,M);return i&&e.push(i),e}),[]);return aw(e)?s[0]:s}Bw.defaultProps=ww,Bw.setDefaultProps=function(e){"production"!==process.env.NODE_ENV&&bw(e,[]),Object.keys(e).forEach((function(t){ww[t]=e[t]}))},Bw.currentInput=Iw;var Gw=Object.assign({},Gm,{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)}}),_w=function(e,t){var i;void 0===t&&(t={}),"production"!==process.env.NODE_ENV&&mw(!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=[],l=!1;function N(){r=n.map((function(e){return Mw(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 c(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 D(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(),N();var j={fn:function(){return{onDestroy:function(){u(!0)},onHidden:function(){M=null},onClickOutside:function(e){e.props.showOnCreate&&!l&&(l=!0,M=null)},onShow:function(e){e.props.showOnCreate&&!l&&(l=!0,D(e,o[0]))},onTrigger:function(e,t){D(e,t.currentTarget)}}}},I=Bw(sw(),Object.assign({},iw(t,["overrides"]),{plugins:[j].concat(t.plugins||[]),triggerTarget:r,popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat((null==(i=t.popperOptions)?void 0:i.modifiers)||[],[Gw])})})),z=I.show;I.show=function(e){if(z(),!M&&null==e)return D(I,o[0]);if(!M||null!=e){if("number"==typeof e)return o[e]&&D(I,o[e]);if(n.indexOf(e)>=0){var t=e.reference;return D(I,t)}return o.indexOf(e)>=0?D(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(),N(),a=c(I),I.setProps({triggerTarget:r})},a=c(I),I},Fw={clientX:0,clientY:0},Hw=[];function Jw(e){var t=e.clientX,i=e.clientY;Fw={clientX:t,clientY:i}}var $w={name:"followCursor",defaultValue:!1,fn:function(e){var t=e.reference,i=cw(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 l(){i.removeEventListener("mousemove",g)}function N(){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,l=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+l);var s="horizontal"===n?e.top:M,N="vertical"===n?e.right:i,g="horizontal"===n?e.bottom:M,u="vertical"===n?e.left:i;return{width:N-u,height:g-s,top:s,right:N,bottom:g,left:u}}})}function u(){e.props.followCursor&&(Hw.push({instance:e,doc:i}),function(e){e.addEventListener("mousemove",Jw)}(i))}function c(){0===(Hw=Hw.filter((function(t){return t.instance!==e}))).filter((function(e){return e.doc===i})).length&&function(e){e.removeEventListener("mousemove",Jw)}(i)}return{onCreate:u,onDestroy:c,onBeforeUpdate:function(){r=e.props},onAfterUpdate:function(t,i){var o=i.followCursor;M||void 0!==o&&r.followCursor!==o&&(c(),o?(u(),!e.state.isMounted||n||s()||a()):(l(),N()))},onMount:function(){e.props.followCursor&&!n&&(o&&(g(Fw),o=!1),s()||a())},onTrigger:function(e,t){lw(t)&&(Fw={clientX:t.clientX,clientY:t.clientY}),n="focus"===t.type},onHidden:function(){e.props.followCursor&&(N(),l(),o=!0)}}}};function Xw(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&(!!["initial","horizontal","vertical"].includes(String(e))&&e)}function qw(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}Bw.setDefaultProps({render:Zw});let Kw=class extends Re{static get styles(){return[Lm]}createRenderRoot(){return this}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.allowHTML=!1,this.followCursor=!1,this.arrow="default",this.singleton=!1,this.enableRecursiveMode=!1,this.delay=0,this.maxWidth="auto",this.zIndex=9999,this.hideOnClick=!0,this.inertia=!1,this.interactiveBorder=2,this.enableVisibilityEffect=!1,this.enableTabClose=!1}firstUpdated(){this.attachTooltip();const e=this.for&&document.getElementById(this.for)||this.firstElementChild;this.visibilityManager=new tM({host:this,target:e,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this.open=!1,this.hideAllTooltips(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this.open=!1,this.hideAllTooltips(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(e,t)=>this.emit(`nile-${e}`,t)})}refresh(){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:"lite",animation:"fade",interactive:this.interactive,arrow:_E,duration:qw(this.duration),allowHTML:this.allowHTML,delay:this.delay,maxWidth:this.maxWidth,zIndex:this.zIndex,hideOnClick:!1,inertia:this.inertia,interactiveBorder:this.interactiveBorder,appendTo:document.body,followCursor:Xw(this.followCursor),plugins:Xw(this.followCursor)?[$w]:[],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.singleton&&!this.for.startsWith("#")&&!document.getElementById(this.for)){const t=Array.from(document.querySelectorAll(`.${this.for}`));if(t.length>0)return this.tooltipInstances=t.map((t=>{const i=Bw(t,{...e,content:t.getAttribute("content")||this.content});return i.popper.querySelector(".tippy-box")?.classList.add(this.size),i})),this.singletonInstance=_w(this.tooltipInstances,{delay:[75,0],arrow:_E,moveTransition:"transform 0.15s ease-out"}),void(this.open&&queueMicrotask((()=>this.singletonInstance?.show())))}const t=document.getElementById(this.for);if(this.singleton&&t){const i=Array.from(t.querySelectorAll("[content]"));if(i.length>0)return this.tooltipInstances=i.map((t=>{const i=Bw(t,{...e,content:t.getAttribute("content")||this.content});return i.popper.querySelector(".tippy-box")?.classList.add(this.size),i})),this.singletonInstance=_w(this.tooltipInstances,{delay:[75,0],arrow:_E,moveTransition:"transform 0.15s ease-out"}),void(this.open&&queueMicrotask((()=>this.singletonInstance?.show())))}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 i=this.prevDescribedby?`${this.prevDescribedby} ${this.id}`:this.id;return this.targetEl.setAttribute("aria-describedby",i),this.singleInstance=Bw(this.targetEl,e),this.size&&this.singleInstance.popper.querySelector(".tippy-box")?.classList.add(this.size),void(this.open&&queueMicrotask((()=>this.singleInstance?.show())))}if(this.enableRecursiveMode){const t=Array.from(this.querySelectorAll("*"));t.length>0&&(this.tooltipInstances=t.map((t=>{const i=t,M=i.getAttribute("content")||this.content,n=Bw(i,{...e,content:M});return n.popper.querySelector(".tippy-box")?.classList.add(this.size),n})),this.singleton&&this.tooltipInstances.length>1&&(this.singletonInstance=_w(this.tooltipInstances,{delay:[75,0],arrow:_E,moveTransition:"transform 0.15s ease-out"})),this.open&&(this.singletonInstance?this.singletonInstance.show():this.tooltipInstances.forEach((e=>e.show()))))}else{const t=this.firstElementChild;if(t){const i=t.getAttribute("content")||this.content,M=Bw(t,{...e,content:i});M.popper.querySelector(".tippy-box")?.classList.add(this.size),this.tooltipInstances=[M],this.open&&M.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")}}hideAllTooltips(){this.singleInstance?.hide(),this.singletonInstance?.hide(),this.tooltipInstances?.forEach((e=>e.hide()))}disconnectedCallback(){super.disconnectedCallback(),this.visibilityManager?.cleanup(),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.visibilityManager?.setup(),this.singleInstance?.show(),this.singletonInstance?.show(),this.tooltipInstances?.forEach((e=>e.show()))):(this.visibilityManager?.cleanup(),this.singleInstance?.hide(),this.singletonInstance?.hide(),this.tooltipInstances?.forEach((e=>e.hide()))))}};e([ce({type:String,attribute:"for"})],Kw.prototype,"for",void 0),e([ce({type:String,reflect:!0})],Kw.prototype,"content",void 0),e([ce({type:String,reflect:!0})],Kw.prototype,"size",void 0),e([ce({type:String,reflect:!0})],Kw.prototype,"duration",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"interactive",void 0),e([ce({type:String})],Kw.prototype,"placement",void 0),e([ce({type:Boolean})],Kw.prototype,"disabled",void 0),e([ce({type:Number})],Kw.prototype,"distance",void 0),e([ce({type:Number})],Kw.prototype,"skidding",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"open",void 0),e([ce({type:String})],Kw.prototype,"trigger",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"allowHTML",void 0),e([ce({type:String,reflect:!0,attribute:!0})],Kw.prototype,"followCursor",void 0),e([ce({type:String,reflect:!0,attribute:!0})],Kw.prototype,"arrow",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"singleton",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"enableRecursiveMode",void 0),e([ce({type:String,reflect:!0})],Kw.prototype,"delay",void 0),e([ce({type:String,reflect:!0})],Kw.prototype,"maxWidth",void 0),e([ce({type:Number})],Kw.prototype,"zIndex",void 0),e([ce({type:[Boolean,String],reflect:!0})],Kw.prototype,"hideOnClick",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"inertia",void 0),e([ce({type:Number})],Kw.prototype,"interactiveBorder",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"enableVisibilityEffect",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"enableTabClose",void 0),Kw=e([Ne("nile-lite-tooltip")],Kw);
|
|
16062
|
+
`;!function(){const e="nile-lite-tooltip-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent=Lm.cssText,document.head.appendChild(t)}();var Sm="top",mm="bottom",Em="right",wm="left",Qm="auto",km=[Sm,mm,Em,wm],Cm="start",bm="end",fm="viewport",vm="popper",Um=km.reduce((function(e,t){return e.concat([t+"-"+Cm,t+"-"+bm])}),[]),Ym=[].concat(km,[Qm]).reduce((function(e,t){return e.concat([t,t+"-"+Cm,t+"-"+bm])}),[]),Zm=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Vm(e){return e?(e.nodeName||"").toLowerCase():null}function Wm(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Pm(e){return e instanceof Wm(e).Element||e instanceof Element}function Rm(e){return e instanceof Wm(e).HTMLElement||e instanceof HTMLElement}function Bm(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Wm(e).ShadowRoot||e instanceof ShadowRoot)}var Gm={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];Rm(n)&&Vm(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}),{});Rm(M)&&Vm(M)&&(Object.assign(M.style,o),Object.keys(n).forEach((function(e){M.removeAttribute(e)})))}))}},requires:["computeStyles"]};function _m(e){return e.split("-")[0]}var Fm=Math.max,Hm=Math.min,Jm=Math.round;function $m(){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 Xm(){return!/^((?!chrome|android).)*safari/i.test($m())}function qm(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var M=e.getBoundingClientRect(),n=1,o=1;t&&Rm(e)&&(n=e.offsetWidth>0&&Jm(M.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Jm(M.height)/e.offsetHeight||1);var r=(Pm(e)?Wm(e):window).visualViewport,s=!Xm()&&i,a=(M.left+(s&&r?r.offsetLeft:0))/n,l=(M.top+(s&&r?r.offsetTop:0))/o,N=M.width/n,g=M.height/o;return{width:N,height:g,top:l,right:a+N,bottom:l+g,left:a,x:a,y:l}}function Km(e){var t=qm(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 eE(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Bm(i)){var M=t;do{if(M&&e.isSameNode(M))return!0;M=M.parentNode||M.host}while(M)}return!1}function tE(e){return Wm(e).getComputedStyle(e)}function iE(e){return["table","td","th"].indexOf(Vm(e))>=0}function ME(e){return((Pm(e)?e.ownerDocument:e.document)||window.document).documentElement}function nE(e){return"html"===Vm(e)?e:e.assignedSlot||e.parentNode||(Bm(e)?e.host:null)||ME(e)}function oE(e){return Rm(e)&&"fixed"!==tE(e).position?e.offsetParent:null}function rE(e){for(var t=Wm(e),i=oE(e);i&&iE(i)&&"static"===tE(i).position;)i=oE(i);return i&&("html"===Vm(i)||"body"===Vm(i)&&"static"===tE(i).position)?t:i||function(e){var t=/firefox/i.test($m());if(/Trident/i.test($m())&&Rm(e)&&"fixed"===tE(e).position)return null;var i=nE(e);for(Bm(i)&&(i=i.host);Rm(i)&&["html","body"].indexOf(Vm(i))<0;){var M=tE(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 sE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function aE(e,t,i){return Fm(e,Hm(t,i))}function lE(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function NE(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}var gE={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=_m(i.placement),a=sE(s),l=[wm,Em].indexOf(s)>=0?"height":"width";if(o&&r){var N=function(e,t){return lE("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:NE(e,km))}(n.padding,i),g=Km(o),u="y"===a?Sm:wm,c="y"===a?mm:Em,D=i.rects.reference[l]+i.rects.reference[a]-r[a]-i.rects.popper[l],j=r[a]-i.rects.reference[a],I=rE(o),z=I?"y"===a?I.clientHeight||0:I.clientWidth||0:0,d=D/2-j/2,h=N[u],T=z-g[l]-N[c],y=z/2-g[l]/2+d,A=aE(h,y,T),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)))&&eE(t.elements.popper,M)&&(t.elements.arrow=M)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function uE(e){return e.split("-")[1]}var cE={top:"auto",right:"auto",bottom:"auto",left:"auto"};function DE(e){var t,i=e.popper,M=e.popperRect,n=e.placement,o=e.variation,r=e.offsets,s=e.position,a=e.gpuAcceleration,l=e.adaptive,N=e.roundOffsets,g=e.isFixed,u=r.x,c=void 0===u?0:u,D=r.y,j=void 0===D?0:D,I="function"==typeof N?N({x:c,y:j}):{x:c,y:j};c=I.x,j=I.y;var z=r.hasOwnProperty("x"),d=r.hasOwnProperty("y"),h=wm,T=Sm,y=window;if(l){var A=rE(i),O="clientHeight",p="clientWidth";if(A===Wm(i)&&"static"!==tE(A=ME(i)).position&&"absolute"===s&&(O="scrollHeight",p="scrollWidth"),n===Sm||(n===wm||n===Em)&&o===bm)T=mm,j-=(g&&A===y&&y.visualViewport?y.visualViewport.height:A[O])-M.height,j*=a?1:-1;if(n===wm||(n===Sm||n===mm)&&o===bm)h=Em,c-=(g&&A===y&&y.visualViewport?y.visualViewport.width:A[p])-M.width,c*=a?1:-1}var x,L=Object.assign({position:s},l&&cE),S=!0===N?function(e,t){var i=e.x,M=e.y,n=t.devicePixelRatio||1;return{x:Jm(i*n)/n||0,y:Jm(M*n)/n||0}}({x:c,y:j},Wm(i)):{x:c,y:j};return c=S.x,j=S.y,a?Object.assign({},L,((x={})[T]=d?"0":"",x[h]=z?"0":"",x.transform=(y.devicePixelRatio||1)<=1?"translate("+c+"px, "+j+"px)":"translate3d("+c+"px, "+j+"px, 0)",x)):Object.assign({},L,((t={})[T]=d?j+"px":"",t[h]=z?c+"px":"",t.transform="",t))}var jE={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,l={placement:_m(t.placement),variation:uE(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,DE(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,DE(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},IE={passive:!0};var zE={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=Wm(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach((function(e){e.addEventListener("scroll",i.update,IE)})),s&&a.addEventListener("resize",i.update,IE),function(){o&&l.forEach((function(e){e.removeEventListener("scroll",i.update,IE)})),s&&a.removeEventListener("resize",i.update,IE)}},data:{}},dE={left:"right",right:"left",bottom:"top",top:"bottom"};function hE(e){return e.replace(/left|right|bottom|top/g,(function(e){return dE[e]}))}var TE={start:"end",end:"start"};function yE(e){return e.replace(/start|end/g,(function(e){return TE[e]}))}function AE(e){var t=Wm(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function OE(e){return qm(ME(e)).left+AE(e).scrollLeft}function pE(e){var t=tE(e),i=t.overflow,M=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+M)}function xE(e){return["html","body","#document"].indexOf(Vm(e))>=0?e.ownerDocument.body:Rm(e)&&pE(e)?e:xE(nE(e))}function LE(e,t){var i;void 0===t&&(t=[]);var M=xE(e),n=M===(null==(i=e.ownerDocument)?void 0:i.body),o=Wm(M),r=n?[o].concat(o.visualViewport||[],pE(M)?M:[]):M,s=t.concat(r);return n?s:s.concat(LE(nE(r)))}function SE(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mE(e,t,i){return t===fm?SE(function(e,t){var i=Wm(e),M=ME(e),n=i.visualViewport,o=M.clientWidth,r=M.clientHeight,s=0,a=0;if(n){o=n.width,r=n.height;var l=Xm();(l||!l&&"fixed"===t)&&(s=n.offsetLeft,a=n.offsetTop)}return{width:o,height:r,x:s+OE(e),y:a}}(e,i)):Pm(t)?function(e,t){var i=qm(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):SE(function(e){var t,i=ME(e),M=AE(e),n=null==(t=e.ownerDocument)?void 0:t.body,o=Fm(i.scrollWidth,i.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=Fm(i.scrollHeight,i.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-M.scrollLeft+OE(e),a=-M.scrollTop;return"rtl"===tE(n||i).direction&&(s+=Fm(i.clientWidth,n?n.clientWidth:0)-o),{width:o,height:r,x:s,y:a}}(ME(e)))}function EE(e,t,i,M){var n="clippingParents"===t?function(e){var t=LE(nE(e)),i=["absolute","fixed"].indexOf(tE(e).position)>=0&&Rm(e)?rE(e):e;return Pm(i)?t.filter((function(e){return Pm(e)&&eE(e,i)&&"body"!==Vm(e)})):[]}(e):[].concat(t),o=[].concat(n,[i]),r=o[0],s=o.reduce((function(t,i){var n=mE(e,i,M);return t.top=Fm(n.top,t.top),t.right=Hm(n.right,t.right),t.bottom=Hm(n.bottom,t.bottom),t.left=Fm(n.left,t.left),t}),mE(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 wE(e){var t,i=e.reference,M=e.element,n=e.placement,o=n?_m(n):null,r=n?uE(n):null,s=i.x+i.width/2-M.width/2,a=i.y+i.height/2-M.height/2;switch(o){case Sm:t={x:s,y:i.y-M.height};break;case mm:t={x:s,y:i.y+i.height};break;case Em:t={x:i.x+i.width,y:a};break;case wm:t={x:i.x-M.width,y:a};break;default:t={x:i.x,y:i.y}}var l=o?sE(o):null;if(null!=l){var N="y"===l?"height":"width";switch(r){case Cm:t[l]=t[l]-(i[N]/2-M[N]/2);break;case bm:t[l]=t[l]+(i[N]/2-M[N]/2)}}return t}function QE(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,l=i.rootBoundary,N=void 0===l?fm:l,g=i.elementContext,u=void 0===g?vm:g,c=i.altBoundary,D=void 0!==c&&c,j=i.padding,I=void 0===j?0:j,z=lE("number"!=typeof I?I:NE(I,km)),d=u===vm?"reference":vm,h=e.rects.popper,T=e.elements[D?d:u],y=EE(Pm(T)?T:T.contextElement||ME(e.elements.popper),a,N,r),A=qm(e.elements.reference),O=wE({reference:A,element:h,strategy:"absolute",placement:n}),p=SE(Object.assign({},h,O)),x=u===vm?p:A,L={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(u===vm&&S){var m=S[n];Object.keys(L).forEach((function(e){var t=[Em,mm].indexOf(e)>=0?1:-1,i=[Sm,mm].indexOf(e)>=0?"y":"x";L[e]+=m[i]*t}))}return L}function kE(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,l=void 0===a?Ym:a,N=uE(M),g=N?s?Um:Um.filter((function(e){return uE(e)===N})):km,u=g.filter((function(e){return l.indexOf(e)>=0}));0===u.length&&(u=g);var c=u.reduce((function(t,i){return t[i]=QE(e,{placement:i,boundary:n,rootBoundary:o,padding:r})[_m(i)],t}),{});return Object.keys(c).sort((function(e,t){return c[e]-c[t]}))}var CE={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,l=i.padding,N=i.boundary,g=i.rootBoundary,u=i.altBoundary,c=i.flipVariations,D=void 0===c||c,j=i.allowedAutoPlacements,I=t.options.placement,z=_m(I),d=a||(z===I||!D?[hE(I)]:function(e){if(_m(e)===Qm)return[];var t=hE(e);return[yE(e),t,yE(t)]}(I)),h=[I].concat(d).reduce((function(e,i){return e.concat(_m(i)===Qm?kE(t,{placement:i,boundary:N,rootBoundary:g,padding:l,flipVariations:D,allowedAutoPlacements:j}):i)}),[]),T=t.rects.reference,y=t.rects.popper,A=new Map,O=!0,p=h[0],x=0;x<h.length;x++){var L=h[x],S=_m(L),m=uE(L)===Cm,E=[Sm,mm].indexOf(S)>=0,w=E?"width":"height",Q=QE(t,{placement:L,boundary:N,rootBoundary:g,altBoundary:u,padding:l}),k=E?m?Em:wm:m?mm:Sm;T[w]>y[w]&&(k=hE(k));var C=hE(k),b=[];if(o&&b.push(Q[S]<=0),s&&b.push(Q[k]<=0,Q[C]<=0),b.every((function(e){return e}))){p=L,O=!1;break}A.set(L,b)}if(O)for(var f=function(e){var t=h.find((function(t){var i=A.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return p=t,"break"},v=D?3:1;v>0;v--){if("break"===f(v))break}t.placement!==p&&(t.modifiersData[M]._skip=!0,t.placement=p,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bE(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 fE(e){return[Sm,Em,mm,wm].some((function(t){return e[t]>=0}))}var vE={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=QE(t,{elementContext:"reference"}),s=QE(t,{altBoundary:!0}),a=bE(r,M),l=bE(s,n,o),N=fE(a),g=fE(l);t.modifiersData[i]={referenceClippingOffsets:a,popperEscapeOffsets:l,isReferenceHidden:N,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":N,"data-popper-escaped":g})}};var UE={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=Ym.reduce((function(e,i){return e[i]=function(e,t,i){var M=_m(e),n=[wm,Sm].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,[wm,Em].indexOf(M)>=0?{x:s,y:r}:{x:r,y:s}}(i,t.rects,o),e}),{}),s=r[t.placement],a=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=l),t.modifiersData[M]=r}};var YE={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=wE({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var ZE={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,l=i.rootBoundary,N=i.altBoundary,g=i.padding,u=i.tether,c=void 0===u||u,D=i.tetherOffset,j=void 0===D?0:D,I=QE(t,{boundary:a,rootBoundary:l,padding:g,altBoundary:N}),z=_m(t.placement),d=uE(t.placement),h=!d,T=sE(z),y="x"===T?"y":"x",A=t.modifiersData.popperOffsets,O=t.rects.reference,p=t.rects.popper,x="function"==typeof j?j(Object.assign({},t.rects,{placement:t.placement})):j,L="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,m={x:0,y:0};if(A){if(o){var E,w="y"===T?Sm:wm,Q="y"===T?mm:Em,k="y"===T?"height":"width",C=A[T],b=C+I[w],f=C-I[Q],v=c?-p[k]/2:0,U=d===Cm?O[k]:p[k],Y=d===Cm?-p[k]:-O[k],Z=t.elements.arrow,V=c&&Z?Km(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],B=aE(0,O[k],V[k]),G=h?O[k]/2-v-B-P-L.mainAxis:U-B-P-L.mainAxis,_=h?-O[k]/2+v+B+R+L.mainAxis:Y+B+R+L.mainAxis,F=t.elements.arrow&&rE(t.elements.arrow),H=F?"y"===T?F.clientTop||0:F.clientLeft||0:0,J=null!=(E=null==S?void 0:S[T])?E:0,$=C+_-J,X=aE(c?Hm(b,C+G-J-H):b,C,c?Fm(f,$):f);A[T]=X,m[T]=X-C}if(s){var q,K="x"===T?Sm:wm,ee="x"===T?mm:Em,te=A[y],ie="y"===y?"height":"width",Me=te+I[K],ne=te-I[ee],oe=-1!==[Sm,wm].indexOf(z),re=null!=(q=null==S?void 0:S[y])?q:0,se=oe?Me:te-O[ie]-p[ie]-re+L.altAxis,ae=oe?te+O[ie]+p[ie]-re-L.altAxis:ne,le=c&&oe?function(e,t,i){var M=aE(e,t,i);return M>i?i:M}(se,te,ae):aE(c?se:Me,te,c?ae:ne);A[y]=le,m[y]=le-te}t.modifiersData[M]=m}},requiresIfExists:["offset"]};function VE(e,t,i){void 0===i&&(i=!1);var M,n,o=Rm(t),r=Rm(t)&&function(e){var t=e.getBoundingClientRect(),i=Jm(t.width)/e.offsetWidth||1,M=Jm(t.height)/e.offsetHeight||1;return 1!==i||1!==M}(t),s=ME(t),a=qm(e,r,i),l={scrollLeft:0,scrollTop:0},N={x:0,y:0};return(o||!o&&!i)&&(("body"!==Vm(t)||pE(s))&&(l=(M=t)!==Wm(M)&&Rm(M)?{scrollLeft:(n=M).scrollLeft,scrollTop:n.scrollTop}:AE(M)),Rm(t)?((N=qm(t,!0)).x+=t.clientLeft,N.y+=t.clientTop):s&&(N.x=OE(s))),{x:a.left+l.scrollLeft-N.x,y:a.top+l.scrollTop-N.y,width:a.width,height:a.height}}function WE(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 PE={placement:"bottom",modifiers:[],strategy:"absolute"};function RE(){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 BE(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,M=void 0===i?[]:i,n=t.defaultOptions,o=void 0===n?PE:n;return function(e,t,i){void 0===i&&(i=o);var n,r,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},PE,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],l=!1,N={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:Pm(e)?LE(e):e.contextElement?LE(e.contextElement):[],popper:LE(t)};var r=function(e){var t=WE(e);return Zm.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:N,options:M}),r=function(){};a.push(o||r)}})),N.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,i=e.popper;if(RE(t,i)){s.rects={reference:VE(t,rE(i),"fixed"===s.options.strategy),popper:Km(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:N})||s)}else s.reset=!1,M=-1}}},update:(n=function(){return new Promise((function(e){N.forceUpdate(),e(s)}))},function(){return r||(r=new Promise((function(e){Promise.resolve().then((function(){r=void 0,e(n())}))}))),r}),destroy:function(){g(),l=!0}};if(!RE(e,t))return N;function g(){a.forEach((function(e){return e()})),a=[]}return N.setOptions(i).then((function(e){!l&&i.onFirstUpdate&&i.onFirstUpdate(e)})),N}}var GE=BE({defaultModifiers:[zE,YE,jE,Gm,UE,CE,ZE,gE,vE]}),_E='<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>',FE="tippy-content",HE="tippy-arrow",JE="tippy-svg-arrow",$E={passive:!0,capture:!0},XE=function(){return document.body};function qE(e,t,i){if(Array.isArray(e)){var M=e[t];return null==M?Array.isArray(i)?i[t]:i:M}return e}function KE(e,t){var i={}.toString.call(e);return 0===i.indexOf("[object")&&i.indexOf(t+"]")>-1}function ew(e,t){return"function"==typeof e?e.apply(void 0,t):e}function tw(e,t){return 0===t?e:function(M){clearTimeout(i),i=setTimeout((function(){e(M)}),t)};var i}function iw(e,t){var i=Object.assign({},e);return t.forEach((function(e){delete i[e]})),i}function Mw(e){return[].concat(e)}function nw(e,t){-1===e.indexOf(t)&&e.push(t)}function ow(e){return[].slice.call(e)}function rw(e){return Object.keys(e).reduce((function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t}),{})}function sw(){return document.createElement("div")}function aw(e){return["Element","Fragment"].some((function(t){return KE(e,t)}))}function lw(e){return KE(e,"MouseEvent")}function Nw(e){return aw(e)?[e]:function(e){return KE(e,"NodeList")}(e)?ow(e):Array.isArray(e)?e:ow(document.querySelectorAll(e))}function gw(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function uw(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function cw(e){var t,i=Mw(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}function Dw(e,t,i){var M=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[M](t,i)}))}function jw(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 Iw={isTouch:!1},zw=0;function dw(){Iw.isTouch||(Iw.isTouch=!0,window.performance&&document.addEventListener("mousemove",hw))}function hw(){var e=performance.now();e-zw<20&&(Iw.isTouch=!1,document.removeEventListener("mousemove",hw)),zw=e}function Tw(){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 yw,Aw=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function Ow(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 pw(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function xw(e){return pw("\n %ctippy.js\n\n %c"+pw(e)+"\n\n %c👷 This is a development-only message. It will be removed in production.\n ")}function Lw(e){return[xw(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function Sw(e,t){var i;e&&!yw.has(t)&&(yw.add(t),(i=console).warn.apply(i,Lw(t)))}function mw(e,t){var i;e&&!yw.has(t)&&(yw.add(t),(i=console).error.apply(i,Lw(t)))}"production"!==process.env.NODE_ENV&&(yw=new Set);var Ew={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ww=Object.assign({appendTo:XE,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},Ew,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Qw=Object.keys(ww);function kw(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=ww[n])?M:o);return t}),{});return Object.assign({},e,t)}function Cw(e,t){var i=Object.assign({},t,{content:ew(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(kw(Object.assign({},ww,{plugins:t}))):Qw).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({},ww.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 bw(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach((function(e){var i,M,n=iw(ww,Object.keys(Ew)),o=(i=n,M=e,!{}.hasOwnProperty.call(i,M));o&&(o=0===t.filter((function(t){return t.name===e})).length),Sw(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 fw(e,t){e.innerHTML=t}function vw(e){var t=sw();return!0===e?t.className=HE:(t.className=JE,aw(e)?t.appendChild(e):fw(t,e)),t}function Uw(e,t){aw(t.content)?(fw(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?fw(e,t.content):e.textContent=t.content)}function Yw(e){var t=e.firstElementChild,i=ow(t.children);return{box:t,content:i.find((function(e){return e.classList.contains(FE)})),arrow:i.find((function(e){return e.classList.contains(HE)||e.classList.contains(JE)})),backdrop:i.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function Zw(e){var t=sw(),i=sw();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var M=sw();function n(i,M){var n=Yw(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||Uw(r,e.props),M.arrow?s?i.arrow!==M.arrow&&(o.removeChild(s),o.appendChild(vw(M.arrow))):o.appendChild(vw(M.arrow)):s&&o.removeChild(s)}return M.className=FE,M.setAttribute("data-state","hidden"),Uw(M,e.props),t.appendChild(i),i.appendChild(M),n(e.props,e.props),{popper:t,onUpdate:n}}Zw.$$tippy=!0;var Vw=1,Ww=[],Pw=[];function Rw(e,t){var i,M,n,o,r,s,a,l,N=Cw(e,Object.assign({},ww,kw(rw(t)))),g=!1,u=!1,c=!1,D=!1,j=[],I=tw(F,N.interactiveDebounce),z=Vw++,d=(l=N.plugins).filter((function(e,t){return l.indexOf(e)===t})),h={id:z,reference:e,popper:sw(),popperInstance:null,props:N,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&&Sw(h.state.isDestroyed,Ow("setProps"));if(h.state.isDestroyed)return;C("onBeforeUpdate",[h,t]),G();var i=h.props,M=Cw(e,Object.assign({},i,rw(t),{ignoreAttributes:!0}));h.props=M,B(),i.interactiveDebounce!==M.interactiveDebounce&&(v(),I=tw(F,M.interactiveDebounce));i.triggerTarget&&!M.triggerTarget?Mw(i.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):M.triggerTarget&&e.removeAttribute("aria-expanded");f(),k(),A&&A(i,M);h.popperInstance&&(X(),K().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));C("onAfterUpdate",[h,t])},setContent:function(e){h.setProps({content:e})},show:function(){"production"!==process.env.NODE_ENV&&Sw(h.state.isDestroyed,Ow("show"));var e=h.state.isVisible,t=h.state.isDestroyed,i=!h.state.isEnabled,M=Iw.isTouch&&!h.props.touch,n=qE(h.props.duration,0,ww.duration);if(e||t||i||M)return;if(m().hasAttribute("disabled"))return;if(C("onShow",[h],!1),!1===h.props.onShow(h))return;h.state.isVisible=!0,S()&&(y.style.visibility="visible");k(),V(),h.state.isMounted||(y.style.transition="none");if(S()){var o=w();gw([o.box,o.content],0)}s=function(){var e;if(h.state.isVisible&&!D){if(D=!0,y.offsetHeight,y.style.transition=h.props.moveTransition,S()&&h.props.animation){var t=w(),i=t.box,M=t.content;gw([i,M],n),uw([i,M],"visible")}b(),f(),nw(Pw,h),null==(e=h.popperInstance)||e.forceUpdate(),C("onMount",[h]),h.props.animation&&S()&&function(e,t){P(e,t)}(n,(function(){h.state.isShown=!0,C("onShown",[h])}))}},function(){var e,t=h.props.appendTo,i=m();e=h.props.interactive&&t===XE||"parent"===t?i.parentNode:ew(t,[i]);e.contains(y)||e.appendChild(y);h.state.isMounted=!0,X(),"production"!==process.env.NODE_ENV&&Sw(h.props.interactive&&t===ww.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&&Sw(h.state.isDestroyed,Ow("hide"));var e=!h.state.isVisible,t=h.state.isDestroyed,i=!h.state.isEnabled,M=qE(h.props.duration,1,ww.duration);if(e||t||i)return;if(C("onHide",[h],!1),!1===h.props.onHide(h))return;h.state.isVisible=!1,h.state.isShown=!1,D=!1,g=!1,S()&&(y.style.visibility="hidden");if(v(),W(),k(!0),S()){var n=w(),o=n.box,r=n.content;h.props.animation&&(gw([o,r],M),uw([o,r],"hidden"))}b(),f(),h.props.animation?S()&&function(e,t){P(e,(function(){!h.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&t()}))}(M,h.unmount):h.unmount()},hideWithInteractivity:function(e){"production"!==process.env.NODE_ENV&&Sw(h.state.isDestroyed,Ow("hideWithInteractivity"));E().addEventListener("mousemove",I),nw(Ww,I),I(e)},enable:function(){h.state.isEnabled=!0},disable:function(){h.hide(),h.state.isEnabled=!1},unmount:function(){"production"!==process.env.NODE_ENV&&Sw(h.state.isDestroyed,Ow("unmount"));h.state.isVisible&&h.hide();if(!h.state.isMounted)return;q(),K().forEach((function(e){e._tippy.unmount()})),y.parentNode&&y.parentNode.removeChild(y);Pw=Pw.filter((function(e){return e!==h})),h.state.isMounted=!1,C("onHidden",[h])},destroy:function(){"production"!==process.env.NODE_ENV&&Sw(h.state.isDestroyed,Ow("destroy"));if(h.state.isDestroyed)return;h.clearDelayTimeouts(),h.unmount(),G(),delete e._tippy,h.state.isDestroyed=!0,C("onDestroy",[h])}};if(!N.render)return"production"!==process.env.NODE_ENV&&mw(!0,"render() function has not been supplied."),h;var T=N.render(h),y=T.popper,A=T.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+h.id,h.popper=y,e._tippy=h,y._tippy=h;var O=d.map((function(e){return e.fn(h)})),p=e.hasAttribute("aria-expanded");return B(),f(),k(),C("onCreate",[h]),N.showOnCreate&&ee(),y.addEventListener("mouseenter",(function(){h.props.interactive&&h.state.isVisible&&h.clearDelayTimeouts()})),y.addEventListener("mouseleave",(function(){h.props.interactive&&h.props.trigger.indexOf("mouseenter")>=0&&E().addEventListener("mousemove",I)})),h;function x(){var e=h.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===x()[0]}function S(){var e;return!(null==(e=h.props.render)||!e.$$tippy)}function m(){return a||e}function E(){var e=m().parentNode;return e?cw(e):document}function w(){return Yw(y)}function Q(e){return h.state.isMounted&&!h.state.isVisible||Iw.isTouch||o&&"focus"===o.type?0:qE(h.props.delay,e?0:1,ww.delay)}function k(e){void 0===e&&(e=!1),y.style.pointerEvents=h.props.interactive&&!e?"":"none",y.style.zIndex=""+h.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=h.props)[e].apply(M,t)}function b(){var t=h.props.aria;if(t.content){var i="aria-"+t.content,M=y.id;Mw(h.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(i);if(h.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(){!p&&h.props.aria.expanded&&Mw(h.props.triggerTarget||e).forEach((function(e){h.props.interactive?e.setAttribute("aria-expanded",h.state.isVisible&&e===m()?"true":"false"):e.removeAttribute("aria-expanded")}))}function v(){E().removeEventListener("mousemove",I),Ww=Ww.filter((function(e){return e!==I}))}function U(t){if(!Iw.isTouch||!c&&"mousedown"!==t.type){var i=t.composedPath&&t.composedPath()[0]||t.target;if(!h.props.interactive||!jw(y,i)){if(Mw(h.props.triggerTarget||e).some((function(e){return jw(e,i)}))){if(Iw.isTouch)return;if(h.state.isVisible&&h.props.trigger.indexOf("click")>=0)return}else C("onClickOutside",[h,t]);!0===h.props.hideOnClick&&(h.clearDelayTimeouts(),h.hide(),u=!0,setTimeout((function(){u=!1})),h.state.isMounted||W())}}}function Y(){c=!0}function Z(){c=!1}function V(){var e=E();e.addEventListener("mousedown",U,!0),e.addEventListener("touchend",U,$E),e.addEventListener("touchstart",Z,$E),e.addEventListener("touchmove",Y,$E)}function W(){var e=E();e.removeEventListener("mousedown",U,!0),e.removeEventListener("touchend",U,$E),e.removeEventListener("touchstart",Z,$E),e.removeEventListener("touchmove",Y,$E)}function P(e,t){var i=w().box;function M(e){e.target===i&&(Dw(i,"remove",M),t())}if(0===e)return t();Dw(i,"remove",r),Dw(i,"add",M),r=M}function R(t,i,M){void 0===M&&(M=!1),Mw(h.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,i,M),j.push({node:e,eventType:t,handler:i,options:M})}))}function B(){var e;L()&&(R("touchstart",_,{passive:!0}),R("touchend",H,{passive:!0})),(e=h.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(Aw?"focusout":"blur",J);break;case"focusin":R("focusout",J)}}))}function G(){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(h.state.isEnabled&&!$(e)&&!u){var M="focus"===(null==(t=o)?void 0:t.type);o=e,a=e.currentTarget,f(),!h.state.isVisible&&lw(e)&&Ww.forEach((function(t){return t(e)})),"click"===e.type&&(h.props.trigger.indexOf("mouseenter")<0||g)&&!1!==h.props.hideOnClick&&h.state.isVisible?i=!0:ee(e),"click"===e.type&&(g=!i),i&&!M&&te(e)}}function F(e){var t=e.target,i=m().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:N}: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,l="top"===r?s.bottom.y:0,N="right"===r?s.left.x:0,g="left"===r?s.right.x:0,u=t.top-M+a>o,c=M-t.bottom-l>o,D=t.left-i+N>o,j=i-t.right-g>o;return u||c||D||j}))})(M,e)&&(v(),te(e))}}function H(e){$(e)||h.props.trigger.indexOf("click")>=0&&g||(h.props.interactive?h.hideWithInteractivity(e):te(e))}function J(e){h.props.trigger.indexOf("focusin")<0&&e.target!==m()||h.props.interactive&&e.relatedTarget&&y.contains(e.relatedTarget)||te(e)}function $(e){return!!Iw.isTouch&&L()!==e.type.indexOf("touch")>=0}function X(){q();var t=h.props,i=t.popperOptions,M=t.placement,n=t.offset,o=t.getReferenceClientRect,r=t.moveTransition,a=S()?Yw(y).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||m()}:e,N={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}},N];S()&&a&&g.push({name:"arrow",options:{element:a,padding:3}}),g.push.apply(g,(null==i?void 0:i.modifiers)||[]),h.popperInstance=GE(l,y,Object.assign({},i,{placement:M,onFirstUpdate:s,modifiers:g}))}function q(){h.popperInstance&&(h.popperInstance.destroy(),h.popperInstance=null)}function K(){return ow(y.querySelectorAll("[data-tippy-root]"))}function ee(e){h.clearDelayTimeouts(),e&&C("onTrigger",[h,e]),V();var t=Q(!0),M=x(),n=M[0],o=M[1];Iw.isTouch&&"hold"===n&&o&&(t=o),t?i=setTimeout((function(){h.show()}),t):h.show()}function te(e){if(h.clearDelayTimeouts(),C("onUntrigger",[h,e]),h.state.isVisible){if(!(h.props.trigger.indexOf("mouseenter")>=0&&h.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&g)){var t=Q(!1);t?M=setTimeout((function(){h.state.isVisible&&h.hide()}),t):n=requestAnimationFrame((function(){h.hide()}))}}else W()}}function Bw(e,t){void 0===t&&(t={});var i=ww.plugins.concat(t.plugins||[]);"production"!==process.env.NODE_ENV&&(!function(e){var t=!e,i="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;mw(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),mw(i,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),bw(t,i)),document.addEventListener("touchstart",dw,$E),window.addEventListener("blur",Tw);var M=Object.assign({},t,{plugins:i}),n=Nw(e);if("production"!==process.env.NODE_ENV){var o=aw(M.content),r=n.length>1;Sw(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&&Rw(t,M);return i&&e.push(i),e}),[]);return aw(e)?s[0]:s}Bw.defaultProps=ww,Bw.setDefaultProps=function(e){"production"!==process.env.NODE_ENV&&bw(e,[]),Object.keys(e).forEach((function(t){ww[t]=e[t]}))},Bw.currentInput=Iw;var Gw=Object.assign({},Gm,{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)}}),_w=function(e,t){var i;void 0===t&&(t={}),"production"!==process.env.NODE_ENV&&mw(!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=[],l=!1;function N(){r=n.map((function(e){return Mw(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 c(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 D(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(),N();var j={fn:function(){return{onDestroy:function(){u(!0)},onHidden:function(){M=null},onClickOutside:function(e){e.props.showOnCreate&&!l&&(l=!0,M=null)},onShow:function(e){e.props.showOnCreate&&!l&&(l=!0,D(e,o[0]))},onTrigger:function(e,t){D(e,t.currentTarget)}}}},I=Bw(sw(),Object.assign({},iw(t,["overrides"]),{plugins:[j].concat(t.plugins||[]),triggerTarget:r,popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat((null==(i=t.popperOptions)?void 0:i.modifiers)||[],[Gw])})})),z=I.show;I.show=function(e){if(z(),!M&&null==e)return D(I,o[0]);if(!M||null!=e){if("number"==typeof e)return o[e]&&D(I,o[e]);if(n.indexOf(e)>=0){var t=e.reference;return D(I,t)}return o.indexOf(e)>=0?D(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(),N(),a=c(I),I.setProps({triggerTarget:r})},a=c(I),I},Fw={clientX:0,clientY:0},Hw=[];function Jw(e){var t=e.clientX,i=e.clientY;Fw={clientX:t,clientY:i}}var $w={name:"followCursor",defaultValue:!1,fn:function(e){var t=e.reference,i=cw(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 l(){i.removeEventListener("mousemove",g)}function N(){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,l=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+l);var s="horizontal"===n?e.top:M,N="vertical"===n?e.right:i,g="horizontal"===n?e.bottom:M,u="vertical"===n?e.left:i;return{width:N-u,height:g-s,top:s,right:N,bottom:g,left:u}}})}function u(){e.props.followCursor&&(Hw.push({instance:e,doc:i}),function(e){e.addEventListener("mousemove",Jw)}(i))}function c(){0===(Hw=Hw.filter((function(t){return t.instance!==e}))).filter((function(e){return e.doc===i})).length&&function(e){e.removeEventListener("mousemove",Jw)}(i)}return{onCreate:u,onDestroy:c,onBeforeUpdate:function(){r=e.props},onAfterUpdate:function(t,i){var o=i.followCursor;M||void 0!==o&&r.followCursor!==o&&(c(),o?(u(),!e.state.isMounted||n||s()||a()):(l(),N()))},onMount:function(){e.props.followCursor&&!n&&(o&&(g(Fw),o=!1),s()||a())},onTrigger:function(e,t){lw(t)&&(Fw={clientX:t.clientX,clientY:t.clientY}),n="focus"===t.type},onHidden:function(){e.props.followCursor&&(N(),l(),o=!0)}}}};function Xw(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&(!!["initial","horizontal","vertical"].includes(String(e))&&e)}function qw(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}Bw.setDefaultProps({render:Zw});let Kw=class extends Re{static get styles(){return[Lm]}createRenderRoot(){return this}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.allowHTML=!1,this.followCursor=!1,this.arrow="default",this.singleton=!1,this.enableRecursiveMode=!1,this.delay=0,this.maxWidth="auto",this.zIndex=9999,this.hideOnClick=!0,this.inertia=!1,this.interactiveBorder=2,this.enableVisibilityEffect=!1,this.enableTabClose=!1}firstUpdated(){this.attachTooltip();const e=this.for&&document.getElementById(this.for)||this.firstElementChild;this.visibilityManager=new tM({host:this,target:e,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this.open=!1,this.hideAllTooltips(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this.open=!1,this.hideAllTooltips(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(e,t)=>this.emit(`nile-${e}`,t)})}refresh(){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:"lite",animation:"fade",interactive:this.interactive,arrow:_E,duration:qw(this.duration),allowHTML:this.allowHTML,delay:this.delay,maxWidth:this.maxWidth,zIndex:this.zIndex,hideOnClick:!1,inertia:this.inertia,interactiveBorder:this.interactiveBorder,appendTo:document.body,followCursor:Xw(this.followCursor),plugins:Xw(this.followCursor)?[$w]:[],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.singleton&&!this.for.startsWith("#")&&!document.getElementById(this.for)){const t=Array.from(document.querySelectorAll(`.${this.for}`));if(t.length>0)return this.tooltipInstances=t.map((t=>{const i=Bw(t,{...e,content:t.getAttribute("content")||this.content});return i.popper.querySelector(".tippy-box")?.classList.add(this.size),i})),this.singletonInstance=_w(this.tooltipInstances,{delay:[75,0],arrow:_E,moveTransition:"transform 0.15s ease-out"}),void(this.open&&queueMicrotask((()=>this.singletonInstance?.show())))}const t=document.getElementById(this.for);if(this.singleton&&t){const i=Array.from(t.querySelectorAll("[content]"));if(i.length>0)return this.tooltipInstances=i.map((t=>{const i=Bw(t,{...e,content:t.getAttribute("content")||this.content});return i.popper.querySelector(".tippy-box")?.classList.add(this.size),i})),this.singletonInstance=_w(this.tooltipInstances,{delay:[75,0],arrow:_E,moveTransition:"transform 0.15s ease-out"}),void(this.open&&queueMicrotask((()=>this.singletonInstance?.show())))}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 i=this.prevDescribedby?`${this.prevDescribedby} ${this.id}`:this.id;return this.targetEl.setAttribute("aria-describedby",i),this.singleInstance=Bw(this.targetEl,e),this.size&&this.singleInstance.popper.querySelector(".tippy-box")?.classList.add(this.size),void(this.open&&queueMicrotask((()=>this.singleInstance?.show())))}if(this.enableRecursiveMode){const t=Array.from(this.querySelectorAll("*"));t.length>0&&(this.tooltipInstances=t.map((t=>{const i=t,M=i.getAttribute("content")||this.content,n=Bw(i,{...e,content:M});return n.popper.querySelector(".tippy-box")?.classList.add(this.size),n})),this.singleton&&this.tooltipInstances.length>1&&(this.singletonInstance=_w(this.tooltipInstances,{delay:[75,0],arrow:_E,moveTransition:"transform 0.15s ease-out"})),this.open&&(this.singletonInstance?this.singletonInstance.show():this.tooltipInstances.forEach((e=>e.show()))))}else{const t=this.firstElementChild;if(t){const i=t.getAttribute("content")||this.content,M=Bw(t,{...e,content:i});M.popper.querySelector(".tippy-box")?.classList.add(this.size),this.tooltipInstances=[M],this.open&&M.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")}}hideAllTooltips(){this.singleInstance?.hide(),this.singletonInstance?.hide(),this.tooltipInstances?.forEach((e=>e.hide()))}disconnectedCallback(){super.disconnectedCallback(),this.visibilityManager?.cleanup(),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.visibilityManager?.setup(),this.singleInstance?.show(),this.singletonInstance?.show(),this.tooltipInstances?.forEach((e=>e.show()))):(this.visibilityManager?.cleanup(),this.singleInstance?.hide(),this.singletonInstance?.hide(),this.tooltipInstances?.forEach((e=>e.hide()))))}};e([ce({type:String,attribute:"for"})],Kw.prototype,"for",void 0),e([ce({type:String,reflect:!0})],Kw.prototype,"content",void 0),e([ce({type:String,reflect:!0})],Kw.prototype,"size",void 0),e([ce({type:String,reflect:!0})],Kw.prototype,"duration",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"interactive",void 0),e([ce({type:String})],Kw.prototype,"placement",void 0),e([ce({type:Boolean})],Kw.prototype,"disabled",void 0),e([ce({type:Number})],Kw.prototype,"distance",void 0),e([ce({type:Number})],Kw.prototype,"skidding",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"open",void 0),e([ce({type:String})],Kw.prototype,"trigger",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"allowHTML",void 0),e([ce({type:String,reflect:!0,attribute:!0})],Kw.prototype,"followCursor",void 0),e([ce({type:String,reflect:!0,attribute:!0})],Kw.prototype,"arrow",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"singleton",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"enableRecursiveMode",void 0),e([ce({type:String,reflect:!0})],Kw.prototype,"delay",void 0),e([ce({type:String,reflect:!0})],Kw.prototype,"maxWidth",void 0),e([ce({type:Number})],Kw.prototype,"zIndex",void 0),e([ce({type:[Boolean,String],reflect:!0})],Kw.prototype,"hideOnClick",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"inertia",void 0),e([ce({type:Number})],Kw.prototype,"interactiveBorder",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"enableVisibilityEffect",void 0),e([ce({type:Boolean,reflect:!0})],Kw.prototype,"enableTabClose",void 0),Kw=e([Ne("nile-lite-tooltip")],Kw);const eQ=r`
|
|
16063
|
+
:host {
|
|
16064
|
+
width: 100%;
|
|
16065
|
+
height: 100%;
|
|
16066
|
+
overflow-y: auto;
|
|
16067
|
+
}
|
|
16068
|
+
|
|
16069
|
+
`;let tQ=class extends Re{static get styles(){return[eQ]}render(){return R`
|
|
16070
|
+
<slot> </slot>
|
|
16071
|
+
`}};tQ=e([Ne("nile-side-bar-panel")],tQ);
|
|
16045
16072
|
/**
|
|
16046
16073
|
* @license
|
|
16047
16074
|
* Copyright 2021 Google LLC
|
|
16048
16075
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16049
16076
|
*/
|
|
16050
|
-
class
|
|
16077
|
+
class iQ{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}}
|
|
16051
16078
|
/**
|
|
16052
16079
|
* @license
|
|
16053
16080
|
* Copyright 2021 Google LLC
|
|
16054
16081
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16055
|
-
*/function
|
|
16082
|
+
*/function MQ(e){return"horizontal"===e?"width":"height"}class nQ{_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[MQ(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())}}
|
|
16056
16083
|
/**
|
|
16057
16084
|
* @license
|
|
16058
16085
|
* Copyright 2021 Google LLC
|
|
16059
16086
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16060
|
-
*/function
|
|
16087
|
+
*/function oQ(e){return"horizontal"===e?"marginLeft":"marginTop"}function rQ(e){return"horizontal"===e?"marginRight":"marginBottom"}function sQ(e){return"horizontal"===e?"xOffset":"yOffset"}function aQ(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 lQ{constructor(){this._childSizeCache=new iQ,this._marginSizeCache=new iQ,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][MQ(t)]),i.add(n),i.add(n+1)}));for(const e of i){const i=this._metricsCache.get(e)?.[oQ(t)]||0,M=this._metricsCache.get(e-1)?.[rQ(t)]||0;this._marginSizeCache.set(e,aQ(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)?.[oQ(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 NQ=Object.freeze({__proto__:null,FlowLayout:class extends nQ{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new lQ,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,[sQ(this.direction)]:-(this._metricsCache.getLeadingMarginValue(e,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(e){return{[this._sizeDim]:this._getSize(e)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});export{px as NileAccordion,cn as NileAutoComplete,Gp as NileAvatar,gt as NileBadge,cp as NileBreadcrumb,jp as NileBreadcrumbItem,_e as NileButton,Sp as NileButtonFilter,vn as NileButtonToggle,Yn as NileButtonToggleGroup,wn as NileCalendar,hp as NileCard,ft as NileCheckbox,jn as NileChip,Ep as NileCircularProgressbar,sp as NileCodeEditor,Fn as NileContentEditor,yn as NileDatePicker,Jn as NileDialog,Lx as NileDivider,Ct as NileDrawer,sn as NileDropdown,Jp as NileEmptyState,On as NileErrorMessage,Xn as NileErrorNotification,BL as NileFilePreview,xL as NileFileUpload,$x as NileFilterChip,Gx as NileFloatingPanel,xn as NileFormErrorMessage,zp as NileFormGroup,Sn as NileFormHelpText,sx as NileFormatDate,uS as NileGrid,DS as NileGridBody,TS as NileGridCellItem,AS as NileGridHead,dS as NileGridHeadItem,IS as NileGridRow,Fe as NileHeading,Xp as NileHero,Mx as NileHeroHeader,Qe as NileIcon,Nt as NileIconButton,Ux as NileInlineEdit,Om as NileInlineSidebar,ym as NileInlineSidebarGroup,xm as NileInlineSidebarItem,ot as NileInput,Cn as NileLink,Ax as NileList,Tx as NileListItem,rM as NileLoader,st as NileMenu,en as NileMenuItem,qM as NileOption,_L as NileOptionGroup,Fp as NilePageHeader,Kx as NilePagination,xp as NilePopover,Ki as NilePopup,aM as NileProgressBar,Ut as NileRadio,Zt as NileRadioGroup,GS as NileRichTextEditor,wx as NileSectionMessage,$M as NileSelect,FS as NileSideBar,cm as NileSideBarAction,hm as NileSideBarActionMenu,zm as NileSideBarActionMenuItem,KS as NileSideBarExpand,lm as NileSideBarFooter,gm as NileSideBarFooterItem,jm as NileSideBarFooterText,tm as NileSideBarGroup,Mm as NileSideBarGroupItem,om as NileSideBarGroupItemIcon,sm as NileSideBarGroupItemText,JS as NileSideBarHeader,XS as NileSideBarLogo,tQ as NileSideBarPanel,nM as NileSlideToggle,rL as NileSlider,NM as NileSpinner,Nx as NileSplitPanel,tx as NileStepper,Kp as NileStepperItem,Bn as NileSwitcher,io as NileTab,Kn as NileTabGroup,oo as NileTabPanel,Fx as NileTable,Wp as NileTableBody,Up as NileTableCellItem,Rp as NileTableHeaderItem,Zp as NileTableRow,cM as NileTag,zn as NileTextarea,mx as NileTitle,gp as NileToast,kx as NileToolbar,iM as NileTooltip,dx as NileTree,jx as NileTreeItem,ox as NileVerticalStepperItem,FM as NileVirtualSelect,Kw as NileliteTooltip};
|