UNPKG

graphdb-workbench

Version:
2 lines 24.8 kB
export const __webpack_esm_id__=46981;export const __webpack_esm_ids__=[46981];export const __webpack_esm_modules__={44123(t,e,n){var i;n.d(e,{O:()=>i}),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom",t.AUTO="auto"}(i||(i={}))},79939(t,e,n){n.d(e,{L:()=>r,T:()=>l,s:()=>o});var i=n(57154);function o(t){const e=document.createElement("textarea");return e.innerHTML=t,e.value}class r{static get logger(){return i.Loggers.getLoggerInstance("SharedComponents")}}class s{constructor(){this.languageContextService=i.ServiceProvider.get(i.LanguageContextService),this.translationChangedObservers={},this.logger=r.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(t,e=[],n=()=>{}){this.translationChangedObservers[t]=this.translationChangedObservers[t]||[];const i={parameters:e,callback:n};return this.translationChangedObservers[t].push(i),n(this.translate(t,e)),()=>{const e=this.translationChangedObservers[t].indexOf(i);-1!==e&&this.translationChangedObservers[t].splice(e,1)}}translate(t,e){return this.translateInLocale(t,e)}translateInLocale(t,e){let n=this.translateFromBundle(this.currentBundle,t);return n||(n=this.translateFromBundle(this.defaultBundle,t)),n?(n=this.applyParameters(n,e),o(n)):(this.logger.warn(`Missing translation for key: [${t}]`),t)}translateFromBundle(t,e){if(!t)return;let n=t[e];return"string"!=typeof n&&(n=this.translateAsJsonObject(t,e)),n}translateAsJsonObject(t,e){let n=e.split(".");return this.getTranslation(t,n)}getTranslation(t,e){if(!e||!t)return;const n=t[e.splice(0,1)[0]];return 0===e.length?n:"string"!=typeof n?e.length>0?this.getTranslation(n,e):n:void 0}applyParameters(t,e){return e?e.reduce((t,e)=>s.replaceAll(t,e),t):t}static replaceAll(t,e){return e?t.split(`{{${e.key}}}`).join(e.value):t}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(t=>{(this.translationChangedObservers[t]||[]).forEach(e=>e.callback(this.translate(t,e.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(t=>{t&&(this.currentBundle=t,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const l=new s},84987(t,e,n){n.d(e,{T:()=>_t});var i=n(44123);class o{constructor(){this.hideOnClick=!1,this.interactive=!0,this.appendTo=()=>document.body,this.allowHTML=!0,this.theme="onto-tooltip",this.onShow=()=>document.querySelectorAll(".jfk-tooltip").forEach(t=>t.classList.add("hidden")),this.onHide=()=>document.querySelectorAll(".jfk-tooltip").forEach(t=>t.classList.remove("hidden"))}setHideOnClick(t){return this.hideOnClick=t,this}setContent(t){return this.content=t,this}setPlacement(t){return this.placement=t||i.O.RIGHT,this}setAllowHTML(t){return this.allowHTML=t,this}setTheme(t){return this.theme=t||"onto-tooltip",this}setAppendTo(t){return this.appendTo=this.getAppendToTarget(t),this}getAppendToTarget(t){return"parent"===t?t:()=>document.body}}const r=["top","right","bottom","left"],s=Math.min,l=Math.max,a=Math.round,c=Math.floor,f=t=>({x:t,y:t}),u={left:"right",right:"left",bottom:"top",top:"bottom"},h={start:"end",end:"start"};function d(t,e,n){return l(t,s(e,n))}function p(t,e){return"function"==typeof t?t(e):t}function g(t){return t.split("-")[0]}function m(t){return t.split("-")[1]}function y(t){return"x"===t?"y":"x"}function w(t){return"y"===t?"height":"width"}const x=new Set(["top","bottom"]);function b(t){return x.has(g(t))?"y":"x"}function v(t){return y(b(t))}function T(t){return t.replace(/start|end/g,t=>h[t])}const E=["left","right"],A=["right","left"],C=["top","bottom"],L=["bottom","top"];function O(t){return t.replace(/left|right|bottom|top/g,t=>u[t])}function R(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function S(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function _(t,e,n){let{reference:i,floating:o}=t;const r=b(e),s=v(e),l=w(s),a=g(e),c="y"===r,f=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,h=i[l]/2-o[l]/2;let d;switch(a){case"top":d={x:f,y:i.y-o.height};break;case"bottom":d={x:f,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:u};break;case"left":d={x:i.x-o.width,y:u};break;default:d={x:i.x,y:i.y}}switch(m(e)){case"start":d[s]-=h*(n&&c?-1:1);break;case"end":d[s]+=h*(n&&c?-1:1)}return d}async function P(t,e){var n;void 0===e&&(e={});const{x:i,y:o,platform:r,rects:s,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=p(e,t),g=R(d),m=l[h?"floating"===u?"reference":"floating":u],y=S(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(m)))||n?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:a})),w="floating"===u?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),b=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},v=S(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:a}):w);return{top:(y.top-v.top+g.top)/b.y,bottom:(v.bottom-y.bottom+g.bottom)/b.y,left:(y.left-v.left+g.left)/b.x,right:(v.right-y.right+g.right)/b.x}}function D(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function H(t){return r.some(e=>t[e]>=0)}const k=new Set(["left","top"]);function M(){return"undefined"!=typeof window}function B(t){return N(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function I(t){var e;return null==(e=(N(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function N(t){return!!M()&&(t instanceof Node||t instanceof F(t).Node)}function V(t){return!!M()&&(t instanceof Element||t instanceof F(t).Element)}function W(t){return!!M()&&(t instanceof HTMLElement||t instanceof F(t).HTMLElement)}function j(t){return!(!M()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof F(t).ShadowRoot)}const $=new Set(["inline","contents"]);function z(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=nt(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!$.has(o)}const U=new Set(["table","td","th"]);function Y(t){return U.has(B(t))}const q=[":popover-open",":modal"];function G(t){return q.some(e=>{try{return t.matches(e)}catch(t){return!1}})}const J=["transform","translate","scale","rotate","perspective"],X=["transform","translate","scale","rotate","perspective","filter"],K=["paint","layout","strict","content"];function Q(t){const e=Z(),n=V(t)?nt(t):t;return J.some(t=>!!n[t]&&"none"!==n[t])||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||X.some(t=>(n.willChange||"").includes(t))||K.some(t=>(n.contain||"").includes(t))}function Z(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const tt=new Set(["html","body","#document"]);function et(t){return tt.has(B(t))}function nt(t){return F(t).getComputedStyle(t)}function it(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if("html"===B(t))return t;const e=t.assignedSlot||t.parentNode||j(t)&&t.host||I(t);return j(e)?e.host:e}function rt(t){const e=ot(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:W(e)&&z(e)?e:rt(e)}function st(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=rt(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),s=F(o);if(r){const t=lt(s);return e.concat(s,s.visualViewport||[],z(o)?o:[],t&&n?st(t):[])}return e.concat(o,st(o,[],n))}function lt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function at(t){const e=nt(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=W(t),r=o?t.offsetWidth:n,s=o?t.offsetHeight:i,l=a(n)!==r||a(i)!==s;return l&&(n=r,i=s),{width:n,height:i,$:l}}function ct(t){return V(t)?t:t.contextElement}function ft(t){const e=ct(t);if(!W(e))return f(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=at(e);let s=(r?a(n.width):n.width)/i,l=(r?a(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const ut=f(0);function ht(t){const e=F(t);return Z()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ut}function dt(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),r=ct(t);let s=f(1);e&&(i?V(i)&&(s=ft(i)):s=ft(t));const l=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==F(t))&&e}(r,n,i)?ht(r):f(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,h=o.height/s.y;if(r){const t=F(r),e=i&&V(i)?F(i):i;let n=t,o=lt(n);for(;o&&i&&e!==n;){const t=ft(o),e=o.getBoundingClientRect(),i=nt(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;a*=t.x,c*=t.y,u*=t.x,h*=t.y,a+=r,c+=s,n=F(o),o=lt(n)}}return S({width:u,height:h,x:a,y:c})}function pt(t,e){const n=it(t).scrollLeft;return e?e.left+n:dt(I(t)).left+n}function gt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-pt(t,n),y:n.top+e.scrollTop}}const mt=new Set(["absolute","fixed"]);function yt(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=F(t),i=I(t),o=n.visualViewport;let r=i.clientWidth,s=i.clientHeight,l=0,a=0;if(o){r=o.width,s=o.height;const t=Z();(!t||t&&"fixed"===e)&&(l=o.offsetLeft,a=o.offsetTop)}const c=pt(i);if(c<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(i.clientWidth-e.clientWidth-o);s<=25&&(r-=s)}else c<=25&&(r+=c);return{width:r,height:s,x:l,y:a}}(t,n);else if("document"===e)i=function(t){const e=I(t),n=it(t),i=t.ownerDocument.body,o=l(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=l(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+pt(t);const a=-n.scrollTop;return"rtl"===nt(i).direction&&(s+=l(e.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:a}}(I(t));else if(V(e))i=function(t,e){const n=dt(t,!0,"fixed"===e),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=W(t)?ft(t):f(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(e,n);else{const n=ht(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return S(i)}function wt(t,e){const n=ot(t);return!(n===e||!V(n)||et(n))&&("fixed"===nt(n).position||wt(n,e))}function xt(t,e,n){const i=W(e),o=I(e),r="fixed"===n,s=dt(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const a=f(0);function c(){a.x=pt(o)}if(i||!i&&!r)if(("body"!==B(e)||z(o))&&(l=it(e)),i){const t=dt(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else o&&c();r&&!i&&o&&c();const u=!o||i||r?f(0):gt(o,l);return{x:s.left+l.scrollLeft-a.x-u.x,y:s.top+l.scrollTop-a.y-u.y,width:s.width,height:s.height}}function bt(t){return"static"===nt(t).position}function vt(t,e){if(!W(t)||"fixed"===nt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function Tt(t,e){const n=F(t);if(G(t))return n;if(!W(t)){let e=ot(t);for(;e&&!et(e);){if(V(e)&&!bt(e))return e;e=ot(e)}return n}let i=vt(t,e);for(;i&&Y(i)&&bt(i);)i=vt(i,e);return i&&et(i)&&bt(i)&&!Q(i)?n:i||function(t){let e=ot(t);for(;W(e)&&!et(e);){if(Q(e))return e;if(G(e))return null;e=ot(e)}return null}(t)||n}const Et={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r="fixed"===o,s=I(i),l=!!e&&G(e.floating);if(i===s||l&&r)return n;let a={scrollLeft:0,scrollTop:0},c=f(1);const u=f(0),h=W(i);if((h||!h&&!r)&&(("body"!==B(i)||z(s))&&(a=it(i)),W(i))){const t=dt(i);c=ft(i),u.x=t.x+i.clientLeft,u.y=t.y+i.clientTop}const d=!s||h||r?f(0):gt(s,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-a.scrollTop*c.y+u.y+d.y}},getDocumentElement:I,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===n?G(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=st(t,[],!1).filter(t=>V(t)&&"body"!==B(t)),o=null;const r="fixed"===nt(t).position;let s=r?ot(t):t;for(;V(s)&&!et(s);){const e=nt(s),n=Q(s);n||"fixed"!==e.position||(o=null),(r?!n&&!o:!n&&"static"===e.position&&o&&mt.has(o.position)||z(s)&&!n&&wt(t,s))?i=i.filter(t=>t!==s):o=e,s=ot(s)}return e.set(t,i),i}(e,this._c):[].concat(n),i],a=r[0],c=r.reduce((t,n)=>{const i=yt(e,n,o);return t.top=l(i.top,t.top),t.right=s(i.right,t.right),t.bottom=s(i.bottom,t.bottom),t.left=l(i.left,t.left),t},yt(e,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:Tt,getElementRects:async function(t){const e=this.getOffsetParent||Tt,n=this.getDimensions,i=await n(t.floating);return{reference:xt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=at(t);return{width:e,height:n}},getScale:ft,isElement:V,isRTL:function(t){return"rtl"===nt(t).direction}};function At(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Ct=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:o,y:r,placement:s,middlewareData:l}=e,a=await async function(t,e){const{placement:n,platform:i,elements:o}=t,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),s=g(n),l=m(n),a="y"===b(n),c=k.has(s)?-1:1,f=r&&a?-1:1,u=p(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:y}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof y&&(d="end"===l?-1*y:y),a?{x:d*f,y:h*c}:{x:h*c,y:d*f}}(e,t);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(i=l.arrow)&&i.alignmentOffset?{}:{x:o+a.x,y:r+a.y,data:{...a,placement:s}}}}},Lt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...a}=p(t,e),c={x:n,y:i},f=await P(e,a),u=b(g(o)),h=y(u);let m=c[h],w=c[u];if(r){const t="y"===h?"bottom":"right";m=d(m+f["y"===h?"top":"left"],m,m-f[t])}if(s){const t="y"===u?"bottom":"right";w=d(w+f["y"===u?"top":"left"],w,w-f[t])}const x=l.fn({...e,[h]:m,[u]:w});return{...x,data:{x:x.x-n,y:x.y-i,enabled:{[h]:r,[u]:s}}}}}},Ot=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...R}=p(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const S=g(o),_=b(l),D=g(l)===l,H=await(null==a.isRTL?void 0:a.isRTL(c.floating)),k=h||(D||!x?[O(l)]:function(t){const e=O(t);return[T(t),e,T(e)]}(l)),M="none"!==y;!h&&M&&k.push(...function(t,e,n,i){const o=m(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?A:E:e?E:A;case"left":case"right":return e?C:L;default:return[]}}(g(t),"start"===n,i);return o&&(r=r.map(t=>t+"-"+o),e&&(r=r.concat(r.map(T)))),r}(l,x,y,H));const B=[l,...k],F=await P(e,R),I=[];let N=(null==(i=r.flip)?void 0:i.overflows)||[];if(f&&I.push(F[S]),u){const t=function(t,e,n){void 0===n&&(n=!1);const i=m(t),o=v(t),r=w(o);let s="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=O(s)),[s,O(s)]}(o,s,H);I.push(F[t[0]],F[t[1]])}if(N=[...N,{placement:o,overflows:I}],!I.every(t=>t<=0)){var V,W;const t=((null==(V=r.flip)?void 0:V.index)||0)+1,e=B[t];if(e&&("alignment"!==u||_===b(e)||N.every(t=>b(t.placement)!==_||t.overflows[0]>0)))return{data:{index:t,overflows:N},reset:{placement:e}};let n=null==(W=N.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:W.placement;if(!n)switch(d){case"bestFit":{var j;const t=null==(j=N.filter(t=>{if(M){const e=b(t.placement);return e===_||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:j[0];t&&(n=t);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Rt=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:r,platform:l,elements:a,middlewareData:c}=e,{element:f,padding:u=0}=p(t,e)||{};if(null==f)return{};const h=R(u),g={x:n,y:i},y=v(o),x=w(y),b=await l.getDimensions(f),T="y"===y,E=T?"top":"left",A=T?"bottom":"right",C=T?"clientHeight":"clientWidth",L=r.reference[x]+r.reference[y]-g[y]-r.floating[x],O=g[y]-r.reference[y],S=await(null==l.getOffsetParent?void 0:l.getOffsetParent(f));let _=S?S[C]:0;_&&await(null==l.isElement?void 0:l.isElement(S))||(_=a.floating[C]||r.floating[x]);const P=L/2-O/2,D=_/2-b[x]/2-1,H=s(h[E],D),k=s(h[A],D),M=H,B=_-b[x]-k,F=_/2-b[x]/2+P,I=d(M,F,B),N=!c.arrow&&null!=m(o)&&F!==I&&r.reference[x]/2-(F<M?H:k)-b[x]/2<0,V=N?F<M?F-M:F-B:0;return{[y]:g[y]+V,data:{[y]:I,centerOffset:F-I-V,...N&&{alignmentOffset:V}},reset:N}}});class St{constructor(t,e){this.referenceElement=t,this.config=e,this.cleanupAutoUpdate=null,this.isVisible=!1,this.isDestroyed=!1,this.pendingDestroy=!1,this.createFloatingElement(),this.createArrowElement()}show(){this.pendingDestroy=!1,this.isVisible||(this.config.onShow&&this.config.onShow(),this.isVisible=!0,this.appendToTarget(),this.cleanupAutoUpdate=function(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:u=!1}=i,h=ct(t),d=o||r?[...h?st(h):[],...st(e)]:[];d.forEach(t=>{o&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const p=h&&f?function(t,e){let n,i=null;const o=I(t);function r(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return function a(f,u){void 0===f&&(f=!1),void 0===u&&(u=1),r();const h=t.getBoundingClientRect(),{left:d,top:p,width:g,height:m}=h;if(f||e(),!g||!m)return;const y={rootMargin:-c(p)+"px "+-c(o.clientWidth-(d+g))+"px "+-c(o.clientHeight-(p+m))+"px "+-c(d)+"px",threshold:l(0,s(1,u))||1};let w=!0;function x(e){const i=e[0].intersectionRatio;if(i!==u){if(!w)return a();i?a(!1,i):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==i||At(h,t.getBoundingClientRect())||a(),w=!1}try{i=new IntersectionObserver(x,{...y,root:o.ownerDocument})}catch(t){i=new IntersectionObserver(x,y)}i.observe(t)}(!0),r}(h,n):null;let g,m=-1,y=null;a&&(y=new ResizeObserver(t=>{let[i]=t;i&&i.target===h&&y&&(y.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(e)})),n()}),h&&!u&&y.observe(h),y.observe(e));let w=u?dt(t):null;return u&&function e(){const i=dt(t);w&&!At(w,i)&&n(),w=i,g=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach(t=>{o&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==p||p(),null==(t=y)||t.disconnect(),y=null,u&&cancelAnimationFrame(g)}}(this.referenceElement,this.floatingElement,()=>this.updatePosition()),this.updatePosition(),this.floatingElement.style.visibility="visible",this.floatingElement.style.opacity="0.9")}hide(){this.isVisible&&(this.isVisible=!1,this.config.onHide&&this.config.onHide(),this.floatingElement.style.visibility="hidden",this.floatingElement.style.opacity="0",this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null))}setContent(t){const e=this.floatingElement.querySelector(".tooltip-content");e&&(this.config.allowHTML?e.innerHTML=t:e.textContent=t)}destroy(){this.isDestroyed||(this.pendingDestroy=!0,setTimeout(()=>{this.pendingDestroy&&(this.hide(),this.floatingElement&&this.floatingElement.remove(),this.isDestroyed=!0,delete this.floatingElement.tooltipTarget,delete this.referenceElement._tooltipInstance,delete this.referenceElement.hideTooltip)},St.DESTROY_DELAY_MS))}createFloatingElement(){var t,e;this.floatingElement=document.createElement("div"),this.floatingElement.className="tooltip-box",this.floatingElement.dataset.theme=this.config.theme,this.floatingElement.style.position="absolute",this.floatingElement.style.top="0",this.floatingElement.style.left="0",this.floatingElement.style.visibility="hidden",this.floatingElement.style.opacity="0",this.floatingElement.style.transition="opacity 0.2s ease-in-out",this.floatingElement.style.zIndex="9999";const n=document.createElement("div");n.className="tooltip-content",this.config.allowHTML?n.innerHTML=null!==(t=this.config.content)&&void 0!==t?t:"":n.textContent=null!==(e=this.config.content)&&void 0!==e?e:"",this.floatingElement.appendChild(n),this.floatingElement.tooltipTarget=this.referenceElement,this.referenceElement.hideTooltip=()=>{this.destroy()}}createArrowElement(){this.arrowElement=document.createElement("div"),this.arrowElement.className="tooltip-arrow",this.arrowElement.style.position="absolute",this.floatingElement.appendChild(this.arrowElement)}appendToTarget(){const t=this.config.appendTo;let e;e="function"==typeof t?t(this.referenceElement):"parent"===t?this.referenceElement.parentElement||document.body:t,e.appendChild(this.floatingElement)}async updatePosition(){const t=[(void 0===s&&(s={}),{name:"hide",options:s,async fn(t){const{rects:e}=t,{strategy:n="referenceHidden",...i}=p(s,t);switch(n){case"referenceHidden":{const n=D(await P(t,{...i,elementContext:"reference"}),e.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:H(n)}}}case"escaped":{const n=D(await P(t,{...i,altBoundary:!0}),e.floating);return{data:{escapedOffsets:n,escaped:H(n)}}}default:return{}}}}),Ot(),Ct(8),Lt({padding:5}),Rt({element:this.arrowElement})],e=this.mapPlacement(this.config.placement),{x:n,y:i,placement:o,middlewareData:r}=await((t,e,n)=>{const i=new Map,o={platform:Et,...n},r={...o.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=_(c,i,a),h=i,d={},p=0;for(let n=0;n<l.length;n++){const{name:r,fn:g}=l[n],{x:m,y,data:w,reset:x}=await g({x:f,y:u,initialPlacement:i,placement:h,strategy:o,middlewareData:d,rects:c,platform:s,elements:{reference:t,floating:e}});f=null!=m?m:f,u=null!=y?y:u,d={...d,[r]:{...d[r],...w}},x&&p<=50&&(p++,"object"==typeof x&&(x.placement&&(h=x.placement),x.rects&&(c=!0===x.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):x.rects),({x:f,y:u}=_(c,h,a))),n=-1)}return{x:f,y:u,placement:h,strategy:o,middlewareData:d}})(t,e,{...o,platform:r})})(this.referenceElement,this.floatingElement,{placement:e,middleware:t});var s;if(r.hide&&Object.assign(this.floatingElement.style,{visibility:r.hide.referenceHidden?"hidden":"visible"}),Object.assign(this.floatingElement.style,{left:`${n}px`,top:`${i}px`}),this.floatingElement.dataset.placement=o,r.arrow){const{x:t,y:e}=r.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];this.arrowElement.dataset.placement=n,Object.assign(this.arrowElement.style,{left:null===t?"":`${t}px`,top:null===e?"":`${e}px`,[n]:"-5px"})}}mapPlacement(t){return t&&"auto"!==t?t:"right"}}St.DESTROY_DELAY_MS=100;class _t{static getTooltipInstance(t){return t._tooltipInstance}static createTooltip(t){t.classList.add(_t.TOOLTIP_CLASS);const e=new St(t,_t.getConfig(t));return t._tooltipInstance=e,e}static getOrCreateTooltipInstance(t){return _t.getTooltipInstance(t)||_t.createTooltip(t)}static getConfig(t){return(new o).setContent(t.getAttribute(_t.ATTR_CONTENT)).setTheme(t.getAttribute(_t.ATTR_THEME)).setPlacement(t.getAttribute(_t.ATTR_PLACEMENT)).setAppendTo(t.getAttribute(_t.ATTR_APPEND_TO))}static updateTooltipContent(t,e){const n=_t.getTooltipInstance(t);n&&""!==e&&n.setContent(e)}static destroyTooltip(t){const e=_t.getTooltipInstance(t);t.classList.contains(_t.TOOLTIP_CLASS)&&e&&e.destroy()}static getTooltipTarget(t){for(;t&&!t.getAttribute(_t.ATTR_CONTENT);)t=t.parentElement;return t}static getTooltip(t){for(;t&&!t.classList.contains("tooltip-box");)t=t.parentElement;return t}}_t.ATTR_CONTENT="tooltip-content",_t.ATTR_THEME="tooltip-theme",_t.ATTR_PLACEMENT="tooltip-placement",_t.ATTR_APPEND_TO="tooltip-append-to",_t.TOOLTIP_CLASS="onto-tooltip"}}; //# sourceMappingURL=46981.935cf5d68cc40a355a2e.bundle.js.map