diff --git a/package.json b/package.json index 5cd095b..b5324a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tourguidejs", - "version": "1.1.1", + "version": "1.1.2", "src": "src/Tour.js", "main": "tourguide.js", "module": "tourguide.esm.js", diff --git a/src/step/index.js b/src/step/index.js index 368ce25..2696b3c 100644 --- a/src/step/index.js +++ b/src/step/index.js @@ -116,8 +116,8 @@ export default class Step { content.append(actions); } const tooltip = this.tooltip = u("
"); - if (this.width) setStyle(tooltip, { width: this.width }); - if (this.height) setStyle(tooltip, { height: this.height }); + if (this.width) setStyle(tooltip, { width: this.width + "px", maxWidth: this.width + "px" }); + if (this.height) setStyle(tooltip, { height: this.height + "px", maxHeight: this.height + "px" }); const tooltipinner = u(`
`); const container = u(`
`); container.append(image).append(content); diff --git a/tourguide.esm.js b/tourguide.esm.js index 8569ecb..b9ccc10 100644 --- a/tourguide.esm.js +++ b/tourguide.esm.js @@ -152,279 +152,279 @@ var u$2 = umbrella_min.exports; var Icons = "\n\n\n\n\n"; -var COMPLETE = 'complete', - CANCELED = 'canceled'; - -function raf(task){ - if('requestAnimationFrame' in window){ - return window.requestAnimationFrame(task); - } - - setTimeout(task, 16); -} - -function setElementScroll$1(element, x, y){ - - if(element.self === element){ - element.scrollTo(x, y); - }else { - element.scrollLeft = x; - element.scrollTop = y; - } -} - -function getTargetScrollLocation(scrollSettings, parent){ - var align = scrollSettings.align, - target = scrollSettings.target, - targetPosition = target.getBoundingClientRect(), - parentPosition, - x, - y, - differenceX, - differenceY, - targetWidth, - targetHeight, - leftAlign = align && align.left != null ? align.left : 0.5, - topAlign = align && align.top != null ? align.top : 0.5, - leftOffset = align && align.leftOffset != null ? align.leftOffset : 0, - topOffset = align && align.topOffset != null ? align.topOffset : 0, - leftScalar = leftAlign, - topScalar = topAlign; - - if(scrollSettings.isWindow(parent)){ - targetWidth = Math.min(targetPosition.width, parent.innerWidth); - targetHeight = Math.min(targetPosition.height, parent.innerHeight); - x = targetPosition.left + parent.pageXOffset - parent.innerWidth * leftScalar + targetWidth * leftScalar; - y = targetPosition.top + parent.pageYOffset - parent.innerHeight * topScalar + targetHeight * topScalar; - x -= leftOffset; - y -= topOffset; - x = scrollSettings.align.lockX ? parent.pageXOffset : x; - y = scrollSettings.align.lockY ? parent.pageYOffset : y; - differenceX = x - parent.pageXOffset; - differenceY = y - parent.pageYOffset; - }else { - targetWidth = targetPosition.width; - targetHeight = targetPosition.height; - parentPosition = parent.getBoundingClientRect(); - var offsetLeft = targetPosition.left - (parentPosition.left - parent.scrollLeft); - var offsetTop = targetPosition.top - (parentPosition.top - parent.scrollTop); - x = offsetLeft + (targetWidth * leftScalar) - parent.clientWidth * leftScalar; - y = offsetTop + (targetHeight * topScalar) - parent.clientHeight * topScalar; - x -= leftOffset; - y -= topOffset; - x = Math.max(Math.min(x, parent.scrollWidth - parent.clientWidth), 0); - y = Math.max(Math.min(y, parent.scrollHeight - parent.clientHeight), 0); - x = scrollSettings.align.lockX ? parent.scrollLeft : x; - y = scrollSettings.align.lockY ? parent.scrollTop : y; - differenceX = x - parent.scrollLeft; - differenceY = y - parent.scrollTop; - } - - return { - x: x, - y: y, - differenceX: differenceX, - differenceY: differenceY - }; -} - -function animate(parent){ - var scrollSettings = parent._scrollSettings; - - if(!scrollSettings){ - return; - } - - var maxSynchronousAlignments = scrollSettings.maxSynchronousAlignments; - - var location = getTargetScrollLocation(scrollSettings, parent), - time = Date.now() - scrollSettings.startTime, - timeValue = Math.min(1 / scrollSettings.time * time, 1); - - if(scrollSettings.endIterations >= maxSynchronousAlignments){ - setElementScroll$1(parent, location.x, location.y); - parent._scrollSettings = null; - return scrollSettings.end(COMPLETE); - } - - var easeValue = 1 - scrollSettings.ease(timeValue); - - setElementScroll$1(parent, - location.x - location.differenceX * easeValue, - location.y - location.differenceY * easeValue - ); - - if(time >= scrollSettings.time){ - scrollSettings.endIterations++; - // Align ancestor synchronously - scrollSettings.scrollAncestor && animate(scrollSettings.scrollAncestor); - animate(parent); - return; - } - - raf(animate.bind(null, parent)); -} - -function defaultIsWindow(target){ - return target.self === target -} - -function transitionScrollTo(target, parent, settings, scrollAncestor, callback){ - var idle = !parent._scrollSettings, - lastSettings = parent._scrollSettings, - now = Date.now(), - cancelHandler, - passiveOptions = { passive: true }; - - if(lastSettings){ - lastSettings.end(CANCELED); - } - - function end(endType){ - parent._scrollSettings = null; - - if(parent.parentElement && parent.parentElement._scrollSettings){ - parent.parentElement._scrollSettings.end(endType); - } - - if(settings.debug){ - console.log('Scrolling ended with type', endType, 'for', parent); - } - - callback(endType); - if(cancelHandler){ - parent.removeEventListener('touchstart', cancelHandler, passiveOptions); - parent.removeEventListener('wheel', cancelHandler, passiveOptions); - } - } - - var maxSynchronousAlignments = settings.maxSynchronousAlignments; - - if(maxSynchronousAlignments == null){ - maxSynchronousAlignments = 3; - } - - parent._scrollSettings = { - startTime: now, - endIterations: 0, - target: target, - time: settings.time, - ease: settings.ease, - align: settings.align, - isWindow: settings.isWindow || defaultIsWindow, - maxSynchronousAlignments: maxSynchronousAlignments, - end: end, - scrollAncestor - }; - - if(!('cancellable' in settings) || settings.cancellable){ - cancelHandler = end.bind(null, CANCELED); - parent.addEventListener('touchstart', cancelHandler, passiveOptions); - parent.addEventListener('wheel', cancelHandler, passiveOptions); - } - - if(idle){ - animate(parent); - } - - return cancelHandler -} - -function defaultIsScrollable(element){ - return ( - 'pageXOffset' in element || - ( - element.scrollHeight !== element.clientHeight || - element.scrollWidth !== element.clientWidth - ) && - getComputedStyle(element).overflow !== 'hidden' - ); -} - -function defaultValidTarget(){ - return true; -} - -function findParentElement(el){ - if (el.assignedSlot) { - return findParentElement(el.assignedSlot); - } - - if (el.parentElement) { - if(el.parentElement.tagName === 'BODY'){ - return el.parentElement.ownerDocument.defaultView || el.parentElement.ownerDocument.ownerWindow; - } - return el.parentElement; - } - - if (el.getRootNode){ - var parent = el.getRootNode(); - if(parent.nodeType === 11) { - return parent.host; - } - } -} - -var scrollIntoView = function(target, settings, callback){ - if(!target){ - return; - } - - if(typeof settings === 'function'){ - callback = settings; - settings = null; - } - - if(!settings){ - settings = {}; - } - - settings.time = isNaN(settings.time) ? 1000 : settings.time; - settings.ease = settings.ease || function(v){return 1 - Math.pow(1 - v, v / 2);}; - settings.align = settings.align || {}; - - var parent = findParentElement(target), - parents = 1; - - function done(endType){ - parents--; - if(!parents){ - callback && callback(endType); - } - } - - var validTarget = settings.validTarget || defaultValidTarget; - var isScrollable = settings.isScrollable; - - if(settings.debug){ - console.log('About to scroll to', target); - - if(!parent){ - console.error('Target did not have a parent, is it mounted in the DOM?'); - } - } - - var scrollingElements = []; - - while(parent){ - if(settings.debug){ - console.log('Scrolling parent node', parent); - } - - if(validTarget(parent, parents) && (isScrollable ? isScrollable(parent, defaultIsScrollable) : defaultIsScrollable(parent))){ - parents++; - scrollingElements.push(parent); - } - - parent = findParentElement(parent); - - if(!parent){ - done(COMPLETE); - break; - } - } - - return scrollingElements.reduce((cancel, parent, index) => transitionScrollTo(target, parent, settings, scrollingElements[index + 1], done), null); +var COMPLETE = 'complete', + CANCELED = 'canceled'; + +function raf(task){ + if('requestAnimationFrame' in window){ + return window.requestAnimationFrame(task); + } + + setTimeout(task, 16); +} + +function setElementScroll$1(element, x, y){ + + if(element.self === element){ + element.scrollTo(x, y); + }else { + element.scrollLeft = x; + element.scrollTop = y; + } +} + +function getTargetScrollLocation(scrollSettings, parent){ + var align = scrollSettings.align, + target = scrollSettings.target, + targetPosition = target.getBoundingClientRect(), + parentPosition, + x, + y, + differenceX, + differenceY, + targetWidth, + targetHeight, + leftAlign = align && align.left != null ? align.left : 0.5, + topAlign = align && align.top != null ? align.top : 0.5, + leftOffset = align && align.leftOffset != null ? align.leftOffset : 0, + topOffset = align && align.topOffset != null ? align.topOffset : 0, + leftScalar = leftAlign, + topScalar = topAlign; + + if(scrollSettings.isWindow(parent)){ + targetWidth = Math.min(targetPosition.width, parent.innerWidth); + targetHeight = Math.min(targetPosition.height, parent.innerHeight); + x = targetPosition.left + parent.pageXOffset - parent.innerWidth * leftScalar + targetWidth * leftScalar; + y = targetPosition.top + parent.pageYOffset - parent.innerHeight * topScalar + targetHeight * topScalar; + x -= leftOffset; + y -= topOffset; + x = scrollSettings.align.lockX ? parent.pageXOffset : x; + y = scrollSettings.align.lockY ? parent.pageYOffset : y; + differenceX = x - parent.pageXOffset; + differenceY = y - parent.pageYOffset; + }else { + targetWidth = targetPosition.width; + targetHeight = targetPosition.height; + parentPosition = parent.getBoundingClientRect(); + var offsetLeft = targetPosition.left - (parentPosition.left - parent.scrollLeft); + var offsetTop = targetPosition.top - (parentPosition.top - parent.scrollTop); + x = offsetLeft + (targetWidth * leftScalar) - parent.clientWidth * leftScalar; + y = offsetTop + (targetHeight * topScalar) - parent.clientHeight * topScalar; + x -= leftOffset; + y -= topOffset; + x = Math.max(Math.min(x, parent.scrollWidth - parent.clientWidth), 0); + y = Math.max(Math.min(y, parent.scrollHeight - parent.clientHeight), 0); + x = scrollSettings.align.lockX ? parent.scrollLeft : x; + y = scrollSettings.align.lockY ? parent.scrollTop : y; + differenceX = x - parent.scrollLeft; + differenceY = y - parent.scrollTop; + } + + return { + x: x, + y: y, + differenceX: differenceX, + differenceY: differenceY + }; +} + +function animate(parent){ + var scrollSettings = parent._scrollSettings; + + if(!scrollSettings){ + return; + } + + var maxSynchronousAlignments = scrollSettings.maxSynchronousAlignments; + + var location = getTargetScrollLocation(scrollSettings, parent), + time = Date.now() - scrollSettings.startTime, + timeValue = Math.min(1 / scrollSettings.time * time, 1); + + if(scrollSettings.endIterations >= maxSynchronousAlignments){ + setElementScroll$1(parent, location.x, location.y); + parent._scrollSettings = null; + return scrollSettings.end(COMPLETE); + } + + var easeValue = 1 - scrollSettings.ease(timeValue); + + setElementScroll$1(parent, + location.x - location.differenceX * easeValue, + location.y - location.differenceY * easeValue + ); + + if(time >= scrollSettings.time){ + scrollSettings.endIterations++; + // Align ancestor synchronously + scrollSettings.scrollAncestor && animate(scrollSettings.scrollAncestor); + animate(parent); + return; + } + + raf(animate.bind(null, parent)); +} + +function defaultIsWindow(target){ + return target.self === target +} + +function transitionScrollTo(target, parent, settings, scrollAncestor, callback){ + var idle = !parent._scrollSettings, + lastSettings = parent._scrollSettings, + now = Date.now(), + cancelHandler, + passiveOptions = { passive: true }; + + if(lastSettings){ + lastSettings.end(CANCELED); + } + + function end(endType){ + parent._scrollSettings = null; + + if(parent.parentElement && parent.parentElement._scrollSettings){ + parent.parentElement._scrollSettings.end(endType); + } + + if(settings.debug){ + console.log('Scrolling ended with type', endType, 'for', parent); + } + + callback(endType); + if(cancelHandler){ + parent.removeEventListener('touchstart', cancelHandler, passiveOptions); + parent.removeEventListener('wheel', cancelHandler, passiveOptions); + } + } + + var maxSynchronousAlignments = settings.maxSynchronousAlignments; + + if(maxSynchronousAlignments == null){ + maxSynchronousAlignments = 3; + } + + parent._scrollSettings = { + startTime: now, + endIterations: 0, + target: target, + time: settings.time, + ease: settings.ease, + align: settings.align, + isWindow: settings.isWindow || defaultIsWindow, + maxSynchronousAlignments: maxSynchronousAlignments, + end: end, + scrollAncestor + }; + + if(!('cancellable' in settings) || settings.cancellable){ + cancelHandler = end.bind(null, CANCELED); + parent.addEventListener('touchstart', cancelHandler, passiveOptions); + parent.addEventListener('wheel', cancelHandler, passiveOptions); + } + + if(idle){ + animate(parent); + } + + return cancelHandler +} + +function defaultIsScrollable(element){ + return ( + 'pageXOffset' in element || + ( + element.scrollHeight !== element.clientHeight || + element.scrollWidth !== element.clientWidth + ) && + getComputedStyle(element).overflow !== 'hidden' + ); +} + +function defaultValidTarget(){ + return true; +} + +function findParentElement(el){ + if (el.assignedSlot) { + return findParentElement(el.assignedSlot); + } + + if (el.parentElement) { + if(el.parentElement.tagName.toLowerCase() === 'body'){ + return el.parentElement.ownerDocument.defaultView || el.parentElement.ownerDocument.ownerWindow; + } + return el.parentElement; + } + + if (el.getRootNode){ + var parent = el.getRootNode(); + if(parent.nodeType === 11) { + return parent.host; + } + } +} + +var scrollIntoView = function(target, settings, callback){ + if(!target){ + return; + } + + if(typeof settings === 'function'){ + callback = settings; + settings = null; + } + + if(!settings){ + settings = {}; + } + + settings.time = isNaN(settings.time) ? 1000 : settings.time; + settings.ease = settings.ease || function(v){return 1 - Math.pow(1 - v, v / 2);}; + settings.align = settings.align || {}; + + var parent = findParentElement(target), + parents = 1; + + function done(endType){ + parents--; + if(!parents){ + callback && callback(endType); + } + } + + var validTarget = settings.validTarget || defaultValidTarget; + var isScrollable = settings.isScrollable; + + if(settings.debug){ + console.log('About to scroll to', target); + + if(!parent){ + console.error('Target did not have a parent, is it mounted in the DOM?'); + } + } + + var scrollingElements = []; + + while(parent){ + if(settings.debug){ + console.log('Scrolling parent node', parent); + } + + if(validTarget(parent, parents) && (isScrollable ? isScrollable(parent, defaultIsScrollable) : defaultIsScrollable(parent))){ + parents++; + scrollingElements.push(parent); + } + + parent = findParentElement(parent); + + if(!parent){ + done(COMPLETE); + break; + } + } + + return scrollingElements.reduce((cancel, parent, index) => transitionScrollTo(target, parent, settings, scrollingElements[index + 1], done), null); }; function assert(assertion, message) { @@ -622,9 +622,9 @@ function getMaxZIndex() { })).concat([0])); } -function t$1(t){return t.split("-")[0]}function e$1(t){return t.split("-")[1]}function n$2(e){return ["top","bottom"].includes(t$1(e))?"x":"y"}function i$1(t){return "y"===t?"height":"width"}function r$2(r,o,a){let{reference:l,floating:s}=r;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=n$2(o),m=i$1(u),g=l[m]/2-s[m]/2,d="x"===u;let p;switch(t$1(o)){case"top":p={x:c,y:l.y-s.height};break;case"bottom":p={x:c,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:f};break;case"left":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y};}switch(e$1(o)){case"start":p[u]-=g*(a&&d?-1:1);break;case"end":p[u]+=g*(a&&d?-1:1);}return p}const o$1=async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,s=a.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:m}=r$2(f,i,c),g=i,d={},p=0;for(let n=0;n({name:"arrow",options:t,async fn(r){const{element:o,padding:l=0}=null!=t?t:{},{x:s,y:c,placement:f,rects:m,platform:g}=r;if(null==o)return {};const d=a$1(l),p={x:s,y:c},h=n$2(f),y=e$1(f),x=i$1(h),w=await g.getDimensions(o),v="y"===h?"top":"left",b="y"===h?"bottom":"right",R=m.reference[x]+m.reference[h]-p[h]-m.floating[x],A=p[h]-m.reference[h],P=await(null==g.getOffsetParent?void 0:g.getOffsetParent(o));let T=P?"y"===h?P.clientHeight||0:P.clientWidth||0:0;0===T&&(T=m.floating[x]);const O=R/2-A/2,E=d[v],L=T-w[x]-d[b],D=T/2-w[x]/2+O,k=u$1(E,D,L),B=("start"===y?d[v]:d[b])>0&&D!==k&&m.reference[x]<=m.floating[x];return {[h]:p[h]-(B?Dg$1[t]))}function p$1(t,r,o){void 0===o&&(o=!1);const a=e$1(t),l=n$2(t),s=i$1(l);let c="x"===l?a===(o?"end":"start")?"right":"left":"start"===a?"bottom":"top";return r.reference[s]>r.floating[s]&&(c=d$1(c)),{main:c,cross:d$1(c)}}const h$1={start:"end",end:"start"};function y$1(t){return t.replace(/start|end/g,(t=>h$1[t]))}const x$1=["top","right","bottom","left"],w$1=x$1.reduce(((t,e)=>t.concat(e,e+"-start",e+"-end")),[]);const v$1=function(n){return void 0===n&&(n={}),{name:"autoPlacement",options:n,async fn(i){var r,o,a,l,c;const{x:f,y:u,rects:m,middlewareData:g,placement:d,platform:h,elements:x}=i,{alignment:v=null,allowedPlacements:b=w$1,autoAlignment:R=!0,...A}=n,P=function(n,i,r){return (n?[...r.filter((t=>e$1(t)===n)),...r.filter((t=>e$1(t)!==n))]:r.filter((e=>t$1(e)===e))).filter((t=>!n||e$1(t)===n||!!i&&y$1(t)!==t))}(v,R,b),T=await s$1(i,A),O=null!=(r=null==(o=g.autoPlacement)?void 0:o.index)?r:0,E=P[O];if(null==E)return {};const{main:L,cross:D}=p$1(E,m,await(null==h.isRTL?void 0:h.isRTL(x.floating)));if(d!==E)return {x:f,y:u,reset:{placement:P[0]}};const k=[T[t$1(E)],T[L],T[D]],B=[...null!=(a=null==(l=g.autoPlacement)?void 0:l.overflows)?a:[],{placement:E,overflows:k}],C=P[O+1];if(C)return {data:{index:O+1,overflows:B},reset:{placement:C}};const H=B.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),V=null==(c=H.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:c.placement,S=null!=V?V:H[0].placement;return S!==d?{data:{index:O+1,overflows:B},reset:{placement:S}}:{}}}};const T$1=function(i){return void 0===i&&(i=0),{name:"offset",options:i,async fn(r){const{x:o,y:a}=r,l=await async function(i,r){const{placement:o,platform:a,elements:l}=i,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=t$1(o),f=e$1(o),u="x"===n$2(o),m=["left","top"].includes(c)?-1:1,g=s&&u?-1:1,d="function"==typeof r?r(i):r;let{mainAxis:p,crossAxis:h,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&"number"==typeof y&&(h="end"===f?-1*y:y),u?{x:h*g,y:p*m}:{x:p*m,y:h*g}}(r,i);return {x:o+l.x,y:a+l.y,data:l}}}}; +function t$1(t){return t.split("-")[1]}function e$1(t){return "y"===t?"height":"width"}function n$2(t){return t.split("-")[0]}function o$1(t){return ["top","bottom"].includes(n$2(t))?"x":"y"}function i$1(i,r,a){let{reference:l,floating:s}=i;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=o$1(r),m=e$1(u),g=l[m]/2-s[m]/2,d="x"===u;let p;switch(n$2(r)){case"top":p={x:c,y:l.y-s.height};break;case"bottom":p={x:c,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:f};break;case"left":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y};}switch(t$1(r)){case"start":p[u]-=g*(a&&d?-1:1);break;case"end":p[u]+=g*(a&&d?-1:1);}return p}const r$2=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:l}=n,s=a.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:m}=i$1(f,o,c),g=o,d={},p=0;for(let n=0;n({name:"arrow",options:n,async fn(i){const{element:r,padding:l=0}=n||{},{x:s,y:c,placement:f,rects:m,platform:g}=i;if(null==r)return {};const d=a$1(l),p={x:s,y:c},h=o$1(f),y=e$1(h),x=await g.getDimensions(r),w="y"===h?"top":"left",v="y"===h?"bottom":"right",b=m.reference[y]+m.reference[h]-p[h]-m.floating[y],R=p[h]-m.reference[h],A=await(null==g.getOffsetParent?void 0:g.getOffsetParent(r));let P=A?"y"===h?A.clientHeight||0:A.clientWidth||0:0;0===P&&(P=m.floating[y]);const T=b/2-R/2,O=d[w],D=P-x[y]-d[v],E=P/2-x[y]/2+T,L=u$1(O,E,D),k=null!=t$1(f)&&E!=L&&m.reference[y]/2-(Et.concat(e,e+"-start",e+"-end")),[]),p$1={left:"right",right:"left",bottom:"top",top:"bottom"};function h$1(t){return t.replace(/left|right|bottom|top/g,(t=>p$1[t]))}function y$1(n,i,r){void 0===r&&(r=!1);const a=t$1(n),l=o$1(n),s=e$1(l);let c="x"===l?a===(r?"end":"start")?"right":"left":"start"===a?"bottom":"top";return i.reference[s]>i.floating[s]&&(c=h$1(c)),{main:c,cross:h$1(c)}}const x$1={start:"end",end:"start"};function w$1(t){return t.replace(/start|end/g,(t=>x$1[t]))}const v$1=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(o){var i,r,a;const{rects:l,middlewareData:c,placement:f,platform:u,elements:m}=o,{alignment:g,allowedPlacements:p=d$1,autoAlignment:h=!0,...x}=e,v=void 0!==g||p===d$1?function(e,o,i){return (e?[...i.filter((n=>t$1(n)===e)),...i.filter((n=>t$1(n)!==e))]:i.filter((t=>n$2(t)===t))).filter((n=>!e||t$1(n)===e||!!o&&w$1(n)!==n))}(g||null,h,p):p,b=await s$1(o,x),R=(null==(i=c.autoPlacement)?void 0:i.index)||0,A=v[R];if(null==A)return {};const{main:P,cross:T}=y$1(A,l,await(null==u.isRTL?void 0:u.isRTL(m.floating)));if(f!==A)return {reset:{placement:v[0]}};const O=[b[n$2(A)],b[P],b[T]],D=[...(null==(r=c.autoPlacement)?void 0:r.overflows)||[],{placement:A,overflows:O}],E=v[R+1];if(E)return {data:{index:R+1,overflows:D},reset:{placement:E}};const L=D.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),k=null==(a=L.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:a.placement,B=k||L[0].placement;return B!==f?{data:{index:R+1,overflows:D},reset:{placement:B}}:{}}}};const O$1=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(i){const{x:r,y:a}=i,l=await async function(e,i){const{placement:r,platform:a,elements:l}=e,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=n$2(r),f=t$1(r),u="x"===o$1(r),m=["left","top"].includes(c)?-1:1,g=s&&u?-1:1,d="function"==typeof i?i(e):i;let{mainAxis:p,crossAxis:h,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&"number"==typeof y&&(h="end"===f?-1*y:y),u?{x:h*g,y:p*m}:{x:p*m,y:h*g}}(i,e);return {x:r+l.x,y:a+l.y,data:l}}}}; -function n$1(t){var e;return (null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function o(t){return n$1(t).getComputedStyle(t)}function i(t){return f(t)?(t.nodeName||"").toLowerCase():""}let r$1;function l(){if(r$1)return r$1;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(r$1=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),r$1):navigator.userAgent}function c(t){return t instanceof n$1(t).HTMLElement}function s(t){return t instanceof n$1(t).Element}function f(t){return t instanceof n$1(t).Node}function u(t){if("undefined"==typeof ShadowRoot)return !1;return t instanceof n$1(t).ShadowRoot||t instanceof ShadowRoot}function a(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=o(t);return /auto|scroll|overlay|hidden/.test(e+i+n)&&!["inline","contents"].includes(r)}function d(t){return ["table","td","th"].includes(i(t))}function h(t){const e=/firefox/i.test(l()),n=o(t),i=n.backdropFilter||n.WebkitBackdropFilter;return "none"!==n.transform||"none"!==n.perspective||!!i&&"none"!==i||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function g(){return !/^((?!chrome|android).)*safari/i.test(l())}function m(t){return ["html","body","#document"].includes(i(t))}const p={x:1,y:1};function y(t){const e=!s(t)&&t.contextElement?t.contextElement:s(t)?t:null;if(!e)return p;const n=e.getBoundingClientRect(),i=o(e);let r=n.width/parseFloat(i.width),l=n.height/parseFloat(i.height);return r&&Number.isFinite(r)||(r=1),l&&Number.isFinite(l)||(l=1),{x:r,y:l}}function w(t,e,o,i){var r,l,c,f;void 0===e&&(e=!1),void 0===o&&(o=!1);const u=t.getBoundingClientRect();let a=p;e&&(i?s(i)&&(a=y(i)):a=y(t));const d=s(t)?n$1(t):window,h=!g()&&o,m=(u.left+(h&&null!=(r=null==(l=d.visualViewport)?void 0:l.offsetLeft)?r:0))/a.x,w=(u.top+(h&&null!=(c=null==(f=d.visualViewport)?void 0:f.offsetTop)?c:0))/a.y,x=u.width/a.x,v=u.height/a.y;return {width:x,height:v,top:w,right:m+x,bottom:w+v,left:m,x:m,y:w}}function x(t){return ((f(t)?t.ownerDocument:t.document)||window.document).documentElement}function v(t){return s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function b(t){return w(x(t)).left+v(t).scrollLeft}function L(t,e,n){const o=c(e),r=x(e),l=w(t,!0,"fixed"===n,e);let s={scrollLeft:0,scrollTop:0};const f={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==i(e)||a(r))&&(s=v(e)),c(e)){const t=w(e,!0);f.x=t.x+e.clientLeft,f.y=t.y+e.clientTop;}else r&&(f.x=b(r));return {x:l.left+s.scrollLeft-f.x,y:l.top+s.scrollTop-f.y,width:l.width,height:l.height}}function E(t){if("html"===i(t))return t;const e=t.assignedSlot||t.parentNode||(u(t)?t.host:null)||x(t);return u(e)?e.host:e}function R(t){return c(t)&&"fixed"!==o(t).position?t.offsetParent:null}function T(t){const e=n$1(t);let r=R(t);for(;r&&d(r)&&"static"===o(r).position;)r=R(r);return r&&("html"===i(r)||"body"===i(r)&&"static"===o(r).position&&!h(r))?e:r||function(t){let e=E(t);for(;c(e)&&!m(e);){if(h(e))return e;e=E(e);}return null}(t)||e}const W=Math.min,C=Math.max;function D(t){const e=E(t);return m(e)?t.ownerDocument.body:c(e)&&a(e)?e:D(e)}function F(t,e){var o;void 0===e&&(e=[]);const i=D(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=n$1(i);return r?e.concat(l,l.visualViewport||[],a(i)?i:[]):e.concat(i,F(i))}function A(e,i,r){return "viewport"===i?l$1(function(t,e){const o=n$1(t),i=x(t),r=o.visualViewport;let l=i.clientWidth,c=i.clientHeight,s=0,f=0;if(r){l=r.width,c=r.height;const t=g();(t||!t&&"fixed"===e)&&(s=r.offsetLeft,f=r.offsetTop);}return {width:l,height:c,x:s,y:f}}(e,r)):s(i)?function(t,e){const n=w(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=c(t)?y(t):{x:1,y:1},l=t.clientWidth*r.x,s=t.clientHeight*r.y,f=i*r.x,u=o*r.y;return {top:u,left:f,right:f+l,bottom:u+s,x:f,y:u,width:l,height:s}}(i,r):l$1(function(t){var e;const n=x(t),i=v(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=C(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=C(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let s=-i.scrollLeft+b(t);const f=-i.scrollTop;return "rtl"===o(r||n).direction&&(s+=C(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:s,y:f}}(x(e)))}const H={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:l}=t;const c="clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let r=F(t).filter((t=>s(t)&&"body"!==i(t))),l=null;const c="fixed"===o(t).position;let f=c?E(t):t;for(;s(f)&&!m(f);){const t=o(f),e=h(f);(c?e||l:e||"static"!==t.position||!l||!["absolute","fixed"].includes(l.position))?l=t:r=r.filter((t=>t!==f)),f=E(f);}return e.set(t,r),r}(e,this._c):[].concat(n),f=[...c,r],u=f[0],a=f.reduce(((t,n)=>{const o=A(e,n,l);return t.top=C(o.top,t.top),t.right=W(o.right,t.right),t.bottom=W(o.bottom,t.bottom),t.left=C(o.left,t.left),t}),A(e,u,l));return {width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const r=c(n),l=x(n);if(n===l)return e;let s={scrollLeft:0,scrollTop:0},f={x:1,y:1};const u={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==i(n)||a(l))&&(s=v(n)),c(n))){const t=w(n);f=y(n),u.x=t.x+n.clientLeft,u.y=t.y+n.clientTop;}return {width:e.width*f.x,height:e.height*f.y,x:e.x*f.x-s.scrollLeft*f.x+u.x,y:e.y*f.y-s.scrollTop*f.y+u.y}},isElement:s,getDimensions:function(t){if(c(t))return {width:t.offsetWidth,height:t.offsetHeight};const e=w(t);return {width:e.width,height:e.height}},getOffsetParent:T,getDocumentElement:x,getScale:y,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||T,r=this.getDimensions;return {reference:L(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===o(t).direction};const O=(t,n,o)=>{const i=new Map,r={platform:H,...o},l={...r.platform,_c:i};return o$1(t,n,{...r,platform:l})}; +function n$1(t){var e;return (null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function o(t){return n$1(t).getComputedStyle(t)}function i(t){return f(t)?(t.nodeName||"").toLowerCase():""}let r$1;function l(){if(r$1)return r$1;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(r$1=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),r$1):navigator.userAgent}function c(t){return t instanceof n$1(t).HTMLElement}function s(t){return t instanceof n$1(t).Element}function f(t){return t instanceof n$1(t).Node}function u(t){if("undefined"==typeof ShadowRoot)return !1;return t instanceof n$1(t).ShadowRoot||t instanceof ShadowRoot}function a(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=o(t);return /auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function d(t){return ["table","td","th"].includes(i(t))}function h(t){const e=/firefox/i.test(l()),n=o(t),i=n.backdropFilter||n.WebkitBackdropFilter;return "none"!==n.transform||"none"!==n.perspective||!!i&&"none"!==i||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function p(){return !/^((?!chrome|android).)*safari/i.test(l())}function g(t){return ["html","body","#document"].includes(i(t))}const m=Math.min,y=Math.max,x=Math.round;function w(t){const e=o(t);let n=parseFloat(e.width),i=parseFloat(e.height);const r=t.offsetWidth,l=t.offsetHeight,c=x(n)!==r||x(i)!==l;return c&&(n=r,i=l),{width:n,height:i,fallback:c}}function v(t){return s(t)?t:t.contextElement}const b={x:1,y:1};function L(t){const e=v(t);if(!c(e))return b;const n=e.getBoundingClientRect(),{width:o,height:i,fallback:r}=w(e);let l=(r?x(n.width):n.width)/o,s=(r?x(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}function E(t,e,o,i){var r,l;void 0===e&&(e=!1),void 0===o&&(o=!1);const c=t.getBoundingClientRect(),f=v(t);let u=b;e&&(i?s(i)&&(u=L(i)):u=L(t));const a=f?n$1(f):window,d=!p()&&o;let h=(c.left+(d&&(null==(r=a.visualViewport)?void 0:r.offsetLeft)||0))/u.x,g=(c.top+(d&&(null==(l=a.visualViewport)?void 0:l.offsetTop)||0))/u.y,m=c.width/u.x,y=c.height/u.y;if(f){const t=n$1(f),e=i&&s(i)?n$1(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=L(o),e=o.getBoundingClientRect(),i=getComputedStyle(o);e.x+=(o.clientLeft+parseFloat(i.paddingLeft))*t.x,e.y+=(o.clientTop+parseFloat(i.paddingTop))*t.y,h*=t.x,g*=t.y,m*=t.x,y*=t.y,h+=e.x,g+=e.y,o=n$1(o).frameElement;}}return {width:m,height:y,top:g,right:h+m,bottom:g+y,left:h,x:h,y:g}}function R(t){return ((f(t)?t.ownerDocument:t.document)||window.document).documentElement}function T(t){return s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function C(t){return E(R(t)).left+T(t).scrollLeft}function F(t,e,n){const o=c(e),r=R(e),l=E(t,!0,"fixed"===n,e);let s={scrollLeft:0,scrollTop:0};const f={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==i(e)||a(r))&&(s=T(e)),c(e)){const t=E(e,!0);f.x=t.x+e.clientLeft,f.y=t.y+e.clientTop;}else r&&(f.x=C(r));return {x:l.left+s.scrollLeft-f.x,y:l.top+s.scrollTop-f.y,width:l.width,height:l.height}}function W(t){if("html"===i(t))return t;const e=t.assignedSlot||t.parentNode||(u(t)?t.host:null)||R(t);return u(e)?e.host:e}function D(t){return c(t)&&"fixed"!==o(t).position?t.offsetParent:null}function S(t){const e=n$1(t);let r=D(t);for(;r&&d(r)&&"static"===o(r).position;)r=D(r);return r&&("html"===i(r)||"body"===i(r)&&"static"===o(r).position&&!h(r))?e:r||function(t){let e=W(t);for(;c(e)&&!g(e);){if(h(e))return e;e=W(e);}return null}(t)||e}function A(t){const e=W(t);return g(e)?t.ownerDocument.body:c(e)&&a(e)?e:A(e)}function H(t,e){var o;void 0===e&&(e=[]);const i=A(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=n$1(i);return r?e.concat(l,l.visualViewport||[],a(i)?i:[]):e.concat(i,H(i))}function O(e,i,r){return "viewport"===i?l$1(function(t,e){const o=n$1(t),i=R(t),r=o.visualViewport;let l=i.clientWidth,c=i.clientHeight,s=0,f=0;if(r){l=r.width,c=r.height;const t=p();(t||!t&&"fixed"===e)&&(s=r.offsetLeft,f=r.offsetTop);}return {width:l,height:c,x:s,y:f}}(e,r)):s(i)?function(t,e){const n=E(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=c(t)?L(t):{x:1,y:1},l=t.clientWidth*r.x,s=t.clientHeight*r.y,f=i*r.x,u=o*r.y;return {top:u,left:f,right:f+l,bottom:u+s,x:f,y:u,width:l,height:s}}(i,r):l$1(function(t){var e;const n=R(t),i=T(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=y(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=y(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let s=-i.scrollLeft+C(t);const f=-i.scrollTop;return "rtl"===o(r||n).direction&&(s+=y(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:s,y:f}}(R(e)))}const P={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:l}=t;const c="clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let r=H(t).filter((t=>s(t)&&"body"!==i(t))),l=null;const c="fixed"===o(t).position;let f=c?W(t):t;for(;s(f)&&!g(f);){const t=o(f),e=h(f);(c?e||l:e||"static"!==t.position||!l||!["absolute","fixed"].includes(l.position))?l=t:r=r.filter((t=>t!==f)),f=W(f);}return e.set(t,r),r}(e,this._c):[].concat(n),f=[...c,r],u=f[0],a=f.reduce(((t,n)=>{const o=O(e,n,l);return t.top=y(o.top,t.top),t.right=m(o.right,t.right),t.bottom=m(o.bottom,t.bottom),t.left=y(o.left,t.left),t}),O(e,u,l));return {width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const r=c(n),l=R(n);if(n===l)return e;let s={scrollLeft:0,scrollTop:0},f={x:1,y:1};const u={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==i(n)||a(l))&&(s=T(n)),c(n))){const t=E(n);f=L(n),u.x=t.x+n.clientLeft,u.y=t.y+n.clientTop;}return {width:e.width*f.x,height:e.height*f.y,x:e.x*f.x-s.scrollLeft*f.x+u.x,y:e.y*f.y-s.scrollTop*f.y+u.y}},isElement:s,getDimensions:function(t){return w(t)},getOffsetParent:S,getDocumentElement:R,getScale:L,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||S,r=this.getDimensions;return {reference:F(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===o(t).direction};const V=(t,n,o)=>{const i=new Map,r={platform:P,...o},l={...r.platform,_c:i};return r$2(t,n,{...r,platform:l})}; var e={"":["",""],_:["",""],"*":["",""],"~":["",""],"\n":["
"]," ":["
"],"-":["
"]};function n(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function r(e){return (e+"").replace(/"/g,""").replace(//g,">")}function t(a,c){var o,l,g,s,p,u=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,m=[],h="",i=c||{},d=0;function f(n){var r=e[n[1]||""],t=m[m.length-1]==n;return r?r[1]?(t?m.pop():m.push(n),r[0|t]):r[0]:n}function $(){for(var e="";m.length;)e+=f(m[m.length-1]);return e}for(a=a.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(e,n,r){return i[n.toLowerCase()]=r,""}).replace(/^\n+|\n+$/g,"");g=u.exec(a);)l=a.substring(d,g.index),d=u.lastIndex,o=g[0],l.match(/[^\\](\\\\)*\\$/)||((p=g[3]||g[4])?o='
"+n(r(p).replace(/^\n+|\n+$/g,""))+"
":(p=g[6])?(p.match(/\./)&&(g[5]=g[5].replace(/^\d+/gm,"")),s=t(n(g[5].replace(/^\s*[>*+.-]/gm,""))),">"==p?p="blockquote":(p=p.match(/\./)?"ol":"ul",s=s.replace(/^(.*)(\n|$)/gm,"
  • $1
  • ")),o="<"+p+">"+s+""):g[8]?o=''+r(g[7])+'':g[10]?(h=h.replace("",''),o=$()+""):g[9]?o="":g[12]||g[14]?o="<"+(p="h"+(g[14]?g[14].length:g[13]>"="?1:2))+">"+t(g[12]||g[15],i)+"":g[16]?o=""+r(g[16])+"":(g[17]||g[1])&&(o=f(g[17]||"--"))),h+=l,h+=o;return (h+a.substring(d)+$()).replace(/^\n+|\n+$/g,"")} @@ -658,13 +658,13 @@ var keepinview = function keepinview(_ref) { }; function positionTooltip(target, tooltipEl, arrowEl, context) { //context._options.root - O(target, tooltipEl, { + V(target, tooltipEl, { // placement: 'bottom-start', middleware: [ // flip(), v$1({ alignment: 'bottom-start' - }), T$1(function (props) { + }), O$1(function (props) { var side = props.placement.split("-")[0]; switch (side) { case "top": @@ -787,10 +787,12 @@ var Step = /*#__PURE__*/function () { } var tooltip = this.tooltip = u$2("
    "); if (this.width) setStyle(tooltip, { - width: this.width + width: this.width + "px", + maxWidth: this.width + "px" }); if (this.height) setStyle(tooltip, { - height: this.height + height: this.height + "px", + maxHeight: this.height + "px" }); var tooltipinner = u$2("
    ")); var container = u$2("
    "); diff --git a/tourguide.js b/tourguide.js index 53d3895..d2515a2 100644 --- a/tourguide.js +++ b/tourguide.js @@ -155,279 +155,279 @@ var Tourguide = (function () { var Icons = "\n\n\n\n\n"; - var COMPLETE = 'complete', - CANCELED = 'canceled'; - - function raf(task){ - if('requestAnimationFrame' in window){ - return window.requestAnimationFrame(task); - } - - setTimeout(task, 16); - } - - function setElementScroll$1(element, x, y){ - - if(element.self === element){ - element.scrollTo(x, y); - }else { - element.scrollLeft = x; - element.scrollTop = y; - } - } - - function getTargetScrollLocation(scrollSettings, parent){ - var align = scrollSettings.align, - target = scrollSettings.target, - targetPosition = target.getBoundingClientRect(), - parentPosition, - x, - y, - differenceX, - differenceY, - targetWidth, - targetHeight, - leftAlign = align && align.left != null ? align.left : 0.5, - topAlign = align && align.top != null ? align.top : 0.5, - leftOffset = align && align.leftOffset != null ? align.leftOffset : 0, - topOffset = align && align.topOffset != null ? align.topOffset : 0, - leftScalar = leftAlign, - topScalar = topAlign; - - if(scrollSettings.isWindow(parent)){ - targetWidth = Math.min(targetPosition.width, parent.innerWidth); - targetHeight = Math.min(targetPosition.height, parent.innerHeight); - x = targetPosition.left + parent.pageXOffset - parent.innerWidth * leftScalar + targetWidth * leftScalar; - y = targetPosition.top + parent.pageYOffset - parent.innerHeight * topScalar + targetHeight * topScalar; - x -= leftOffset; - y -= topOffset; - x = scrollSettings.align.lockX ? parent.pageXOffset : x; - y = scrollSettings.align.lockY ? parent.pageYOffset : y; - differenceX = x - parent.pageXOffset; - differenceY = y - parent.pageYOffset; - }else { - targetWidth = targetPosition.width; - targetHeight = targetPosition.height; - parentPosition = parent.getBoundingClientRect(); - var offsetLeft = targetPosition.left - (parentPosition.left - parent.scrollLeft); - var offsetTop = targetPosition.top - (parentPosition.top - parent.scrollTop); - x = offsetLeft + (targetWidth * leftScalar) - parent.clientWidth * leftScalar; - y = offsetTop + (targetHeight * topScalar) - parent.clientHeight * topScalar; - x -= leftOffset; - y -= topOffset; - x = Math.max(Math.min(x, parent.scrollWidth - parent.clientWidth), 0); - y = Math.max(Math.min(y, parent.scrollHeight - parent.clientHeight), 0); - x = scrollSettings.align.lockX ? parent.scrollLeft : x; - y = scrollSettings.align.lockY ? parent.scrollTop : y; - differenceX = x - parent.scrollLeft; - differenceY = y - parent.scrollTop; - } - - return { - x: x, - y: y, - differenceX: differenceX, - differenceY: differenceY - }; - } - - function animate(parent){ - var scrollSettings = parent._scrollSettings; - - if(!scrollSettings){ - return; - } - - var maxSynchronousAlignments = scrollSettings.maxSynchronousAlignments; - - var location = getTargetScrollLocation(scrollSettings, parent), - time = Date.now() - scrollSettings.startTime, - timeValue = Math.min(1 / scrollSettings.time * time, 1); - - if(scrollSettings.endIterations >= maxSynchronousAlignments){ - setElementScroll$1(parent, location.x, location.y); - parent._scrollSettings = null; - return scrollSettings.end(COMPLETE); - } - - var easeValue = 1 - scrollSettings.ease(timeValue); - - setElementScroll$1(parent, - location.x - location.differenceX * easeValue, - location.y - location.differenceY * easeValue - ); - - if(time >= scrollSettings.time){ - scrollSettings.endIterations++; - // Align ancestor synchronously - scrollSettings.scrollAncestor && animate(scrollSettings.scrollAncestor); - animate(parent); - return; - } - - raf(animate.bind(null, parent)); - } - - function defaultIsWindow(target){ - return target.self === target - } - - function transitionScrollTo(target, parent, settings, scrollAncestor, callback){ - var idle = !parent._scrollSettings, - lastSettings = parent._scrollSettings, - now = Date.now(), - cancelHandler, - passiveOptions = { passive: true }; - - if(lastSettings){ - lastSettings.end(CANCELED); - } - - function end(endType){ - parent._scrollSettings = null; - - if(parent.parentElement && parent.parentElement._scrollSettings){ - parent.parentElement._scrollSettings.end(endType); - } - - if(settings.debug){ - console.log('Scrolling ended with type', endType, 'for', parent); - } - - callback(endType); - if(cancelHandler){ - parent.removeEventListener('touchstart', cancelHandler, passiveOptions); - parent.removeEventListener('wheel', cancelHandler, passiveOptions); - } - } - - var maxSynchronousAlignments = settings.maxSynchronousAlignments; - - if(maxSynchronousAlignments == null){ - maxSynchronousAlignments = 3; - } - - parent._scrollSettings = { - startTime: now, - endIterations: 0, - target: target, - time: settings.time, - ease: settings.ease, - align: settings.align, - isWindow: settings.isWindow || defaultIsWindow, - maxSynchronousAlignments: maxSynchronousAlignments, - end: end, - scrollAncestor - }; - - if(!('cancellable' in settings) || settings.cancellable){ - cancelHandler = end.bind(null, CANCELED); - parent.addEventListener('touchstart', cancelHandler, passiveOptions); - parent.addEventListener('wheel', cancelHandler, passiveOptions); - } - - if(idle){ - animate(parent); - } - - return cancelHandler - } - - function defaultIsScrollable(element){ - return ( - 'pageXOffset' in element || - ( - element.scrollHeight !== element.clientHeight || - element.scrollWidth !== element.clientWidth - ) && - getComputedStyle(element).overflow !== 'hidden' - ); - } - - function defaultValidTarget(){ - return true; - } - - function findParentElement(el){ - if (el.assignedSlot) { - return findParentElement(el.assignedSlot); - } - - if (el.parentElement) { - if(el.parentElement.tagName === 'BODY'){ - return el.parentElement.ownerDocument.defaultView || el.parentElement.ownerDocument.ownerWindow; - } - return el.parentElement; - } - - if (el.getRootNode){ - var parent = el.getRootNode(); - if(parent.nodeType === 11) { - return parent.host; - } - } - } - - var scrollIntoView = function(target, settings, callback){ - if(!target){ - return; - } - - if(typeof settings === 'function'){ - callback = settings; - settings = null; - } - - if(!settings){ - settings = {}; - } - - settings.time = isNaN(settings.time) ? 1000 : settings.time; - settings.ease = settings.ease || function(v){return 1 - Math.pow(1 - v, v / 2);}; - settings.align = settings.align || {}; - - var parent = findParentElement(target), - parents = 1; - - function done(endType){ - parents--; - if(!parents){ - callback && callback(endType); - } - } - - var validTarget = settings.validTarget || defaultValidTarget; - var isScrollable = settings.isScrollable; - - if(settings.debug){ - console.log('About to scroll to', target); - - if(!parent){ - console.error('Target did not have a parent, is it mounted in the DOM?'); - } - } - - var scrollingElements = []; - - while(parent){ - if(settings.debug){ - console.log('Scrolling parent node', parent); - } - - if(validTarget(parent, parents) && (isScrollable ? isScrollable(parent, defaultIsScrollable) : defaultIsScrollable(parent))){ - parents++; - scrollingElements.push(parent); - } - - parent = findParentElement(parent); - - if(!parent){ - done(COMPLETE); - break; - } - } - - return scrollingElements.reduce((cancel, parent, index) => transitionScrollTo(target, parent, settings, scrollingElements[index + 1], done), null); + var COMPLETE = 'complete', + CANCELED = 'canceled'; + + function raf(task){ + if('requestAnimationFrame' in window){ + return window.requestAnimationFrame(task); + } + + setTimeout(task, 16); + } + + function setElementScroll$1(element, x, y){ + + if(element.self === element){ + element.scrollTo(x, y); + }else { + element.scrollLeft = x; + element.scrollTop = y; + } + } + + function getTargetScrollLocation(scrollSettings, parent){ + var align = scrollSettings.align, + target = scrollSettings.target, + targetPosition = target.getBoundingClientRect(), + parentPosition, + x, + y, + differenceX, + differenceY, + targetWidth, + targetHeight, + leftAlign = align && align.left != null ? align.left : 0.5, + topAlign = align && align.top != null ? align.top : 0.5, + leftOffset = align && align.leftOffset != null ? align.leftOffset : 0, + topOffset = align && align.topOffset != null ? align.topOffset : 0, + leftScalar = leftAlign, + topScalar = topAlign; + + if(scrollSettings.isWindow(parent)){ + targetWidth = Math.min(targetPosition.width, parent.innerWidth); + targetHeight = Math.min(targetPosition.height, parent.innerHeight); + x = targetPosition.left + parent.pageXOffset - parent.innerWidth * leftScalar + targetWidth * leftScalar; + y = targetPosition.top + parent.pageYOffset - parent.innerHeight * topScalar + targetHeight * topScalar; + x -= leftOffset; + y -= topOffset; + x = scrollSettings.align.lockX ? parent.pageXOffset : x; + y = scrollSettings.align.lockY ? parent.pageYOffset : y; + differenceX = x - parent.pageXOffset; + differenceY = y - parent.pageYOffset; + }else { + targetWidth = targetPosition.width; + targetHeight = targetPosition.height; + parentPosition = parent.getBoundingClientRect(); + var offsetLeft = targetPosition.left - (parentPosition.left - parent.scrollLeft); + var offsetTop = targetPosition.top - (parentPosition.top - parent.scrollTop); + x = offsetLeft + (targetWidth * leftScalar) - parent.clientWidth * leftScalar; + y = offsetTop + (targetHeight * topScalar) - parent.clientHeight * topScalar; + x -= leftOffset; + y -= topOffset; + x = Math.max(Math.min(x, parent.scrollWidth - parent.clientWidth), 0); + y = Math.max(Math.min(y, parent.scrollHeight - parent.clientHeight), 0); + x = scrollSettings.align.lockX ? parent.scrollLeft : x; + y = scrollSettings.align.lockY ? parent.scrollTop : y; + differenceX = x - parent.scrollLeft; + differenceY = y - parent.scrollTop; + } + + return { + x: x, + y: y, + differenceX: differenceX, + differenceY: differenceY + }; + } + + function animate(parent){ + var scrollSettings = parent._scrollSettings; + + if(!scrollSettings){ + return; + } + + var maxSynchronousAlignments = scrollSettings.maxSynchronousAlignments; + + var location = getTargetScrollLocation(scrollSettings, parent), + time = Date.now() - scrollSettings.startTime, + timeValue = Math.min(1 / scrollSettings.time * time, 1); + + if(scrollSettings.endIterations >= maxSynchronousAlignments){ + setElementScroll$1(parent, location.x, location.y); + parent._scrollSettings = null; + return scrollSettings.end(COMPLETE); + } + + var easeValue = 1 - scrollSettings.ease(timeValue); + + setElementScroll$1(parent, + location.x - location.differenceX * easeValue, + location.y - location.differenceY * easeValue + ); + + if(time >= scrollSettings.time){ + scrollSettings.endIterations++; + // Align ancestor synchronously + scrollSettings.scrollAncestor && animate(scrollSettings.scrollAncestor); + animate(parent); + return; + } + + raf(animate.bind(null, parent)); + } + + function defaultIsWindow(target){ + return target.self === target + } + + function transitionScrollTo(target, parent, settings, scrollAncestor, callback){ + var idle = !parent._scrollSettings, + lastSettings = parent._scrollSettings, + now = Date.now(), + cancelHandler, + passiveOptions = { passive: true }; + + if(lastSettings){ + lastSettings.end(CANCELED); + } + + function end(endType){ + parent._scrollSettings = null; + + if(parent.parentElement && parent.parentElement._scrollSettings){ + parent.parentElement._scrollSettings.end(endType); + } + + if(settings.debug){ + console.log('Scrolling ended with type', endType, 'for', parent); + } + + callback(endType); + if(cancelHandler){ + parent.removeEventListener('touchstart', cancelHandler, passiveOptions); + parent.removeEventListener('wheel', cancelHandler, passiveOptions); + } + } + + var maxSynchronousAlignments = settings.maxSynchronousAlignments; + + if(maxSynchronousAlignments == null){ + maxSynchronousAlignments = 3; + } + + parent._scrollSettings = { + startTime: now, + endIterations: 0, + target: target, + time: settings.time, + ease: settings.ease, + align: settings.align, + isWindow: settings.isWindow || defaultIsWindow, + maxSynchronousAlignments: maxSynchronousAlignments, + end: end, + scrollAncestor + }; + + if(!('cancellable' in settings) || settings.cancellable){ + cancelHandler = end.bind(null, CANCELED); + parent.addEventListener('touchstart', cancelHandler, passiveOptions); + parent.addEventListener('wheel', cancelHandler, passiveOptions); + } + + if(idle){ + animate(parent); + } + + return cancelHandler + } + + function defaultIsScrollable(element){ + return ( + 'pageXOffset' in element || + ( + element.scrollHeight !== element.clientHeight || + element.scrollWidth !== element.clientWidth + ) && + getComputedStyle(element).overflow !== 'hidden' + ); + } + + function defaultValidTarget(){ + return true; + } + + function findParentElement(el){ + if (el.assignedSlot) { + return findParentElement(el.assignedSlot); + } + + if (el.parentElement) { + if(el.parentElement.tagName.toLowerCase() === 'body'){ + return el.parentElement.ownerDocument.defaultView || el.parentElement.ownerDocument.ownerWindow; + } + return el.parentElement; + } + + if (el.getRootNode){ + var parent = el.getRootNode(); + if(parent.nodeType === 11) { + return parent.host; + } + } + } + + var scrollIntoView = function(target, settings, callback){ + if(!target){ + return; + } + + if(typeof settings === 'function'){ + callback = settings; + settings = null; + } + + if(!settings){ + settings = {}; + } + + settings.time = isNaN(settings.time) ? 1000 : settings.time; + settings.ease = settings.ease || function(v){return 1 - Math.pow(1 - v, v / 2);}; + settings.align = settings.align || {}; + + var parent = findParentElement(target), + parents = 1; + + function done(endType){ + parents--; + if(!parents){ + callback && callback(endType); + } + } + + var validTarget = settings.validTarget || defaultValidTarget; + var isScrollable = settings.isScrollable; + + if(settings.debug){ + console.log('About to scroll to', target); + + if(!parent){ + console.error('Target did not have a parent, is it mounted in the DOM?'); + } + } + + var scrollingElements = []; + + while(parent){ + if(settings.debug){ + console.log('Scrolling parent node', parent); + } + + if(validTarget(parent, parents) && (isScrollable ? isScrollable(parent, defaultIsScrollable) : defaultIsScrollable(parent))){ + parents++; + scrollingElements.push(parent); + } + + parent = findParentElement(parent); + + if(!parent){ + done(COMPLETE); + break; + } + } + + return scrollingElements.reduce((cancel, parent, index) => transitionScrollTo(target, parent, settings, scrollingElements[index + 1], done), null); }; function assert(assertion, message) { @@ -625,9 +625,9 @@ var Tourguide = (function () { })).concat([0])); } - function t$1(t){return t.split("-")[0]}function e$1(t){return t.split("-")[1]}function n$2(e){return ["top","bottom"].includes(t$1(e))?"x":"y"}function i$1(t){return "y"===t?"height":"width"}function r$2(r,o,a){let{reference:l,floating:s}=r;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=n$2(o),m=i$1(u),g=l[m]/2-s[m]/2,d="x"===u;let p;switch(t$1(o)){case"top":p={x:c,y:l.y-s.height};break;case"bottom":p={x:c,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:f};break;case"left":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y};}switch(e$1(o)){case"start":p[u]-=g*(a&&d?-1:1);break;case"end":p[u]+=g*(a&&d?-1:1);}return p}const o$1=async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,s=a.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:m}=r$2(f,i,c),g=i,d={},p=0;for(let n=0;n({name:"arrow",options:t,async fn(r){const{element:o,padding:l=0}=null!=t?t:{},{x:s,y:c,placement:f,rects:m,platform:g}=r;if(null==o)return {};const d=a$1(l),p={x:s,y:c},h=n$2(f),y=e$1(f),x=i$1(h),w=await g.getDimensions(o),v="y"===h?"top":"left",b="y"===h?"bottom":"right",R=m.reference[x]+m.reference[h]-p[h]-m.floating[x],A=p[h]-m.reference[h],P=await(null==g.getOffsetParent?void 0:g.getOffsetParent(o));let T=P?"y"===h?P.clientHeight||0:P.clientWidth||0:0;0===T&&(T=m.floating[x]);const O=R/2-A/2,E=d[v],L=T-w[x]-d[b],D=T/2-w[x]/2+O,k=u$1(E,D,L),B=("start"===y?d[v]:d[b])>0&&D!==k&&m.reference[x]<=m.floating[x];return {[h]:p[h]-(B?Dg$1[t]))}function p$1(t,r,o){void 0===o&&(o=!1);const a=e$1(t),l=n$2(t),s=i$1(l);let c="x"===l?a===(o?"end":"start")?"right":"left":"start"===a?"bottom":"top";return r.reference[s]>r.floating[s]&&(c=d$1(c)),{main:c,cross:d$1(c)}}const h$1={start:"end",end:"start"};function y$1(t){return t.replace(/start|end/g,(t=>h$1[t]))}const x$1=["top","right","bottom","left"],w$1=x$1.reduce(((t,e)=>t.concat(e,e+"-start",e+"-end")),[]);const v$1=function(n){return void 0===n&&(n={}),{name:"autoPlacement",options:n,async fn(i){var r,o,a,l,c;const{x:f,y:u,rects:m,middlewareData:g,placement:d,platform:h,elements:x}=i,{alignment:v=null,allowedPlacements:b=w$1,autoAlignment:R=!0,...A}=n,P=function(n,i,r){return (n?[...r.filter((t=>e$1(t)===n)),...r.filter((t=>e$1(t)!==n))]:r.filter((e=>t$1(e)===e))).filter((t=>!n||e$1(t)===n||!!i&&y$1(t)!==t))}(v,R,b),T=await s$1(i,A),O=null!=(r=null==(o=g.autoPlacement)?void 0:o.index)?r:0,E=P[O];if(null==E)return {};const{main:L,cross:D}=p$1(E,m,await(null==h.isRTL?void 0:h.isRTL(x.floating)));if(d!==E)return {x:f,y:u,reset:{placement:P[0]}};const k=[T[t$1(E)],T[L],T[D]],B=[...null!=(a=null==(l=g.autoPlacement)?void 0:l.overflows)?a:[],{placement:E,overflows:k}],C=P[O+1];if(C)return {data:{index:O+1,overflows:B},reset:{placement:C}};const H=B.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),V=null==(c=H.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:c.placement,S=null!=V?V:H[0].placement;return S!==d?{data:{index:O+1,overflows:B},reset:{placement:S}}:{}}}};const T$1=function(i){return void 0===i&&(i=0),{name:"offset",options:i,async fn(r){const{x:o,y:a}=r,l=await async function(i,r){const{placement:o,platform:a,elements:l}=i,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=t$1(o),f=e$1(o),u="x"===n$2(o),m=["left","top"].includes(c)?-1:1,g=s&&u?-1:1,d="function"==typeof r?r(i):r;let{mainAxis:p,crossAxis:h,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&"number"==typeof y&&(h="end"===f?-1*y:y),u?{x:h*g,y:p*m}:{x:p*m,y:h*g}}(r,i);return {x:o+l.x,y:a+l.y,data:l}}}}; + function t$1(t){return t.split("-")[1]}function e$1(t){return "y"===t?"height":"width"}function n$2(t){return t.split("-")[0]}function o$1(t){return ["top","bottom"].includes(n$2(t))?"x":"y"}function i$1(i,r,a){let{reference:l,floating:s}=i;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=o$1(r),m=e$1(u),g=l[m]/2-s[m]/2,d="x"===u;let p;switch(n$2(r)){case"top":p={x:c,y:l.y-s.height};break;case"bottom":p={x:c,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:f};break;case"left":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y};}switch(t$1(r)){case"start":p[u]-=g*(a&&d?-1:1);break;case"end":p[u]+=g*(a&&d?-1:1);}return p}const r$2=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:l}=n,s=a.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:m}=i$1(f,o,c),g=o,d={},p=0;for(let n=0;n({name:"arrow",options:n,async fn(i){const{element:r,padding:l=0}=n||{},{x:s,y:c,placement:f,rects:m,platform:g}=i;if(null==r)return {};const d=a$1(l),p={x:s,y:c},h=o$1(f),y=e$1(h),x=await g.getDimensions(r),w="y"===h?"top":"left",v="y"===h?"bottom":"right",b=m.reference[y]+m.reference[h]-p[h]-m.floating[y],R=p[h]-m.reference[h],A=await(null==g.getOffsetParent?void 0:g.getOffsetParent(r));let P=A?"y"===h?A.clientHeight||0:A.clientWidth||0:0;0===P&&(P=m.floating[y]);const T=b/2-R/2,O=d[w],D=P-x[y]-d[v],E=P/2-x[y]/2+T,L=u$1(O,E,D),k=null!=t$1(f)&&E!=L&&m.reference[y]/2-(Et.concat(e,e+"-start",e+"-end")),[]),p$1={left:"right",right:"left",bottom:"top",top:"bottom"};function h$1(t){return t.replace(/left|right|bottom|top/g,(t=>p$1[t]))}function y$1(n,i,r){void 0===r&&(r=!1);const a=t$1(n),l=o$1(n),s=e$1(l);let c="x"===l?a===(r?"end":"start")?"right":"left":"start"===a?"bottom":"top";return i.reference[s]>i.floating[s]&&(c=h$1(c)),{main:c,cross:h$1(c)}}const x$1={start:"end",end:"start"};function w$1(t){return t.replace(/start|end/g,(t=>x$1[t]))}const v$1=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(o){var i,r,a;const{rects:l,middlewareData:c,placement:f,platform:u,elements:m}=o,{alignment:g,allowedPlacements:p=d$1,autoAlignment:h=!0,...x}=e,v=void 0!==g||p===d$1?function(e,o,i){return (e?[...i.filter((n=>t$1(n)===e)),...i.filter((n=>t$1(n)!==e))]:i.filter((t=>n$2(t)===t))).filter((n=>!e||t$1(n)===e||!!o&&w$1(n)!==n))}(g||null,h,p):p,b=await s$1(o,x),R=(null==(i=c.autoPlacement)?void 0:i.index)||0,A=v[R];if(null==A)return {};const{main:P,cross:T}=y$1(A,l,await(null==u.isRTL?void 0:u.isRTL(m.floating)));if(f!==A)return {reset:{placement:v[0]}};const O=[b[n$2(A)],b[P],b[T]],D=[...(null==(r=c.autoPlacement)?void 0:r.overflows)||[],{placement:A,overflows:O}],E=v[R+1];if(E)return {data:{index:R+1,overflows:D},reset:{placement:E}};const L=D.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),k=null==(a=L.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:a.placement,B=k||L[0].placement;return B!==f?{data:{index:R+1,overflows:D},reset:{placement:B}}:{}}}};const O$1=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(i){const{x:r,y:a}=i,l=await async function(e,i){const{placement:r,platform:a,elements:l}=e,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=n$2(r),f=t$1(r),u="x"===o$1(r),m=["left","top"].includes(c)?-1:1,g=s&&u?-1:1,d="function"==typeof i?i(e):i;let{mainAxis:p,crossAxis:h,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&"number"==typeof y&&(h="end"===f?-1*y:y),u?{x:h*g,y:p*m}:{x:p*m,y:h*g}}(i,e);return {x:r+l.x,y:a+l.y,data:l}}}}; - function n$1(t){var e;return (null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function o(t){return n$1(t).getComputedStyle(t)}function i(t){return f(t)?(t.nodeName||"").toLowerCase():""}let r$1;function l(){if(r$1)return r$1;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(r$1=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),r$1):navigator.userAgent}function c(t){return t instanceof n$1(t).HTMLElement}function s(t){return t instanceof n$1(t).Element}function f(t){return t instanceof n$1(t).Node}function u(t){if("undefined"==typeof ShadowRoot)return !1;return t instanceof n$1(t).ShadowRoot||t instanceof ShadowRoot}function a(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=o(t);return /auto|scroll|overlay|hidden/.test(e+i+n)&&!["inline","contents"].includes(r)}function d(t){return ["table","td","th"].includes(i(t))}function h(t){const e=/firefox/i.test(l()),n=o(t),i=n.backdropFilter||n.WebkitBackdropFilter;return "none"!==n.transform||"none"!==n.perspective||!!i&&"none"!==i||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function g(){return !/^((?!chrome|android).)*safari/i.test(l())}function m(t){return ["html","body","#document"].includes(i(t))}const p={x:1,y:1};function y(t){const e=!s(t)&&t.contextElement?t.contextElement:s(t)?t:null;if(!e)return p;const n=e.getBoundingClientRect(),i=o(e);let r=n.width/parseFloat(i.width),l=n.height/parseFloat(i.height);return r&&Number.isFinite(r)||(r=1),l&&Number.isFinite(l)||(l=1),{x:r,y:l}}function w(t,e,o,i){var r,l,c,f;void 0===e&&(e=!1),void 0===o&&(o=!1);const u=t.getBoundingClientRect();let a=p;e&&(i?s(i)&&(a=y(i)):a=y(t));const d=s(t)?n$1(t):window,h=!g()&&o,m=(u.left+(h&&null!=(r=null==(l=d.visualViewport)?void 0:l.offsetLeft)?r:0))/a.x,w=(u.top+(h&&null!=(c=null==(f=d.visualViewport)?void 0:f.offsetTop)?c:0))/a.y,x=u.width/a.x,v=u.height/a.y;return {width:x,height:v,top:w,right:m+x,bottom:w+v,left:m,x:m,y:w}}function x(t){return ((f(t)?t.ownerDocument:t.document)||window.document).documentElement}function v(t){return s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function b(t){return w(x(t)).left+v(t).scrollLeft}function L(t,e,n){const o=c(e),r=x(e),l=w(t,!0,"fixed"===n,e);let s={scrollLeft:0,scrollTop:0};const f={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==i(e)||a(r))&&(s=v(e)),c(e)){const t=w(e,!0);f.x=t.x+e.clientLeft,f.y=t.y+e.clientTop;}else r&&(f.x=b(r));return {x:l.left+s.scrollLeft-f.x,y:l.top+s.scrollTop-f.y,width:l.width,height:l.height}}function E(t){if("html"===i(t))return t;const e=t.assignedSlot||t.parentNode||(u(t)?t.host:null)||x(t);return u(e)?e.host:e}function R(t){return c(t)&&"fixed"!==o(t).position?t.offsetParent:null}function T(t){const e=n$1(t);let r=R(t);for(;r&&d(r)&&"static"===o(r).position;)r=R(r);return r&&("html"===i(r)||"body"===i(r)&&"static"===o(r).position&&!h(r))?e:r||function(t){let e=E(t);for(;c(e)&&!m(e);){if(h(e))return e;e=E(e);}return null}(t)||e}const W=Math.min,C=Math.max;function D(t){const e=E(t);return m(e)?t.ownerDocument.body:c(e)&&a(e)?e:D(e)}function F(t,e){var o;void 0===e&&(e=[]);const i=D(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=n$1(i);return r?e.concat(l,l.visualViewport||[],a(i)?i:[]):e.concat(i,F(i))}function A(e,i,r){return "viewport"===i?l$1(function(t,e){const o=n$1(t),i=x(t),r=o.visualViewport;let l=i.clientWidth,c=i.clientHeight,s=0,f=0;if(r){l=r.width,c=r.height;const t=g();(t||!t&&"fixed"===e)&&(s=r.offsetLeft,f=r.offsetTop);}return {width:l,height:c,x:s,y:f}}(e,r)):s(i)?function(t,e){const n=w(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=c(t)?y(t):{x:1,y:1},l=t.clientWidth*r.x,s=t.clientHeight*r.y,f=i*r.x,u=o*r.y;return {top:u,left:f,right:f+l,bottom:u+s,x:f,y:u,width:l,height:s}}(i,r):l$1(function(t){var e;const n=x(t),i=v(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=C(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=C(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let s=-i.scrollLeft+b(t);const f=-i.scrollTop;return "rtl"===o(r||n).direction&&(s+=C(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:s,y:f}}(x(e)))}const H={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:l}=t;const c="clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let r=F(t).filter((t=>s(t)&&"body"!==i(t))),l=null;const c="fixed"===o(t).position;let f=c?E(t):t;for(;s(f)&&!m(f);){const t=o(f),e=h(f);(c?e||l:e||"static"!==t.position||!l||!["absolute","fixed"].includes(l.position))?l=t:r=r.filter((t=>t!==f)),f=E(f);}return e.set(t,r),r}(e,this._c):[].concat(n),f=[...c,r],u=f[0],a=f.reduce(((t,n)=>{const o=A(e,n,l);return t.top=C(o.top,t.top),t.right=W(o.right,t.right),t.bottom=W(o.bottom,t.bottom),t.left=C(o.left,t.left),t}),A(e,u,l));return {width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const r=c(n),l=x(n);if(n===l)return e;let s={scrollLeft:0,scrollTop:0},f={x:1,y:1};const u={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==i(n)||a(l))&&(s=v(n)),c(n))){const t=w(n);f=y(n),u.x=t.x+n.clientLeft,u.y=t.y+n.clientTop;}return {width:e.width*f.x,height:e.height*f.y,x:e.x*f.x-s.scrollLeft*f.x+u.x,y:e.y*f.y-s.scrollTop*f.y+u.y}},isElement:s,getDimensions:function(t){if(c(t))return {width:t.offsetWidth,height:t.offsetHeight};const e=w(t);return {width:e.width,height:e.height}},getOffsetParent:T,getDocumentElement:x,getScale:y,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||T,r=this.getDimensions;return {reference:L(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===o(t).direction};const O=(t,n,o)=>{const i=new Map,r={platform:H,...o},l={...r.platform,_c:i};return o$1(t,n,{...r,platform:l})}; + function n$1(t){var e;return (null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function o(t){return n$1(t).getComputedStyle(t)}function i(t){return f(t)?(t.nodeName||"").toLowerCase():""}let r$1;function l(){if(r$1)return r$1;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(r$1=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),r$1):navigator.userAgent}function c(t){return t instanceof n$1(t).HTMLElement}function s(t){return t instanceof n$1(t).Element}function f(t){return t instanceof n$1(t).Node}function u(t){if("undefined"==typeof ShadowRoot)return !1;return t instanceof n$1(t).ShadowRoot||t instanceof ShadowRoot}function a(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=o(t);return /auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function d(t){return ["table","td","th"].includes(i(t))}function h(t){const e=/firefox/i.test(l()),n=o(t),i=n.backdropFilter||n.WebkitBackdropFilter;return "none"!==n.transform||"none"!==n.perspective||!!i&&"none"!==i||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function p(){return !/^((?!chrome|android).)*safari/i.test(l())}function g(t){return ["html","body","#document"].includes(i(t))}const m=Math.min,y=Math.max,x=Math.round;function w(t){const e=o(t);let n=parseFloat(e.width),i=parseFloat(e.height);const r=t.offsetWidth,l=t.offsetHeight,c=x(n)!==r||x(i)!==l;return c&&(n=r,i=l),{width:n,height:i,fallback:c}}function v(t){return s(t)?t:t.contextElement}const b={x:1,y:1};function L(t){const e=v(t);if(!c(e))return b;const n=e.getBoundingClientRect(),{width:o,height:i,fallback:r}=w(e);let l=(r?x(n.width):n.width)/o,s=(r?x(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}function E(t,e,o,i){var r,l;void 0===e&&(e=!1),void 0===o&&(o=!1);const c=t.getBoundingClientRect(),f=v(t);let u=b;e&&(i?s(i)&&(u=L(i)):u=L(t));const a=f?n$1(f):window,d=!p()&&o;let h=(c.left+(d&&(null==(r=a.visualViewport)?void 0:r.offsetLeft)||0))/u.x,g=(c.top+(d&&(null==(l=a.visualViewport)?void 0:l.offsetTop)||0))/u.y,m=c.width/u.x,y=c.height/u.y;if(f){const t=n$1(f),e=i&&s(i)?n$1(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=L(o),e=o.getBoundingClientRect(),i=getComputedStyle(o);e.x+=(o.clientLeft+parseFloat(i.paddingLeft))*t.x,e.y+=(o.clientTop+parseFloat(i.paddingTop))*t.y,h*=t.x,g*=t.y,m*=t.x,y*=t.y,h+=e.x,g+=e.y,o=n$1(o).frameElement;}}return {width:m,height:y,top:g,right:h+m,bottom:g+y,left:h,x:h,y:g}}function R(t){return ((f(t)?t.ownerDocument:t.document)||window.document).documentElement}function T(t){return s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function C(t){return E(R(t)).left+T(t).scrollLeft}function F(t,e,n){const o=c(e),r=R(e),l=E(t,!0,"fixed"===n,e);let s={scrollLeft:0,scrollTop:0};const f={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==i(e)||a(r))&&(s=T(e)),c(e)){const t=E(e,!0);f.x=t.x+e.clientLeft,f.y=t.y+e.clientTop;}else r&&(f.x=C(r));return {x:l.left+s.scrollLeft-f.x,y:l.top+s.scrollTop-f.y,width:l.width,height:l.height}}function W(t){if("html"===i(t))return t;const e=t.assignedSlot||t.parentNode||(u(t)?t.host:null)||R(t);return u(e)?e.host:e}function D(t){return c(t)&&"fixed"!==o(t).position?t.offsetParent:null}function S(t){const e=n$1(t);let r=D(t);for(;r&&d(r)&&"static"===o(r).position;)r=D(r);return r&&("html"===i(r)||"body"===i(r)&&"static"===o(r).position&&!h(r))?e:r||function(t){let e=W(t);for(;c(e)&&!g(e);){if(h(e))return e;e=W(e);}return null}(t)||e}function A(t){const e=W(t);return g(e)?t.ownerDocument.body:c(e)&&a(e)?e:A(e)}function H(t,e){var o;void 0===e&&(e=[]);const i=A(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=n$1(i);return r?e.concat(l,l.visualViewport||[],a(i)?i:[]):e.concat(i,H(i))}function O(e,i,r){return "viewport"===i?l$1(function(t,e){const o=n$1(t),i=R(t),r=o.visualViewport;let l=i.clientWidth,c=i.clientHeight,s=0,f=0;if(r){l=r.width,c=r.height;const t=p();(t||!t&&"fixed"===e)&&(s=r.offsetLeft,f=r.offsetTop);}return {width:l,height:c,x:s,y:f}}(e,r)):s(i)?function(t,e){const n=E(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=c(t)?L(t):{x:1,y:1},l=t.clientWidth*r.x,s=t.clientHeight*r.y,f=i*r.x,u=o*r.y;return {top:u,left:f,right:f+l,bottom:u+s,x:f,y:u,width:l,height:s}}(i,r):l$1(function(t){var e;const n=R(t),i=T(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=y(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=y(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let s=-i.scrollLeft+C(t);const f=-i.scrollTop;return "rtl"===o(r||n).direction&&(s+=y(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:s,y:f}}(R(e)))}const P={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:l}=t;const c="clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let r=H(t).filter((t=>s(t)&&"body"!==i(t))),l=null;const c="fixed"===o(t).position;let f=c?W(t):t;for(;s(f)&&!g(f);){const t=o(f),e=h(f);(c?e||l:e||"static"!==t.position||!l||!["absolute","fixed"].includes(l.position))?l=t:r=r.filter((t=>t!==f)),f=W(f);}return e.set(t,r),r}(e,this._c):[].concat(n),f=[...c,r],u=f[0],a=f.reduce(((t,n)=>{const o=O(e,n,l);return t.top=y(o.top,t.top),t.right=m(o.right,t.right),t.bottom=m(o.bottom,t.bottom),t.left=y(o.left,t.left),t}),O(e,u,l));return {width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const r=c(n),l=R(n);if(n===l)return e;let s={scrollLeft:0,scrollTop:0},f={x:1,y:1};const u={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==i(n)||a(l))&&(s=T(n)),c(n))){const t=E(n);f=L(n),u.x=t.x+n.clientLeft,u.y=t.y+n.clientTop;}return {width:e.width*f.x,height:e.height*f.y,x:e.x*f.x-s.scrollLeft*f.x+u.x,y:e.y*f.y-s.scrollTop*f.y+u.y}},isElement:s,getDimensions:function(t){return w(t)},getOffsetParent:S,getDocumentElement:R,getScale:L,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||S,r=this.getDimensions;return {reference:F(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===o(t).direction};const V=(t,n,o)=>{const i=new Map,r={platform:P,...o},l={...r.platform,_c:i};return r$2(t,n,{...r,platform:l})}; var e={"":["",""],_:["",""],"*":["",""],"~":["",""],"\n":["
    "]," ":["
    "],"-":["
    "]};function n(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function r(e){return (e+"").replace(/"/g,""").replace(//g,">")}function t(a,c){var o,l,g,s,p,u=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,m=[],h="",i=c||{},d=0;function f(n){var r=e[n[1]||""],t=m[m.length-1]==n;return r?r[1]?(t?m.pop():m.push(n),r[0|t]):r[0]:n}function $(){for(var e="";m.length;)e+=f(m[m.length-1]);return e}for(a=a.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(e,n,r){return i[n.toLowerCase()]=r,""}).replace(/^\n+|\n+$/g,"");g=u.exec(a);)l=a.substring(d,g.index),d=u.lastIndex,o=g[0],l.match(/[^\\](\\\\)*\\$/)||((p=g[3]||g[4])?o='
    "+n(r(p).replace(/^\n+|\n+$/g,""))+"
    ":(p=g[6])?(p.match(/\./)&&(g[5]=g[5].replace(/^\d+/gm,"")),s=t(n(g[5].replace(/^\s*[>*+.-]/gm,""))),">"==p?p="blockquote":(p=p.match(/\./)?"ol":"ul",s=s.replace(/^(.*)(\n|$)/gm,"
  • $1
  • ")),o="<"+p+">"+s+""):g[8]?o=''+r(g[7])+'':g[10]?(h=h.replace("
    ",''),o=$()+""):g[9]?o="":g[12]||g[14]?o="<"+(p="h"+(g[14]?g[14].length:g[13]>"="?1:2))+">"+t(g[12]||g[15],i)+"":g[16]?o=""+r(g[16])+"":(g[17]||g[1])&&(o=f(g[17]||"--"))),h+=l,h+=o;return (h+a.substring(d)+$()).replace(/^\n+|\n+$/g,"")} @@ -661,13 +661,13 @@ var Tourguide = (function () { }; function positionTooltip(target, tooltipEl, arrowEl, context) { //context._options.root - O(target, tooltipEl, { + V(target, tooltipEl, { // placement: 'bottom-start', middleware: [ // flip(), v$1({ alignment: 'bottom-start' - }), T$1(function (props) { + }), O$1(function (props) { var side = props.placement.split("-")[0]; switch (side) { case "top": @@ -790,10 +790,12 @@ var Tourguide = (function () { } var tooltip = this.tooltip = u$2("
    "); if (this.width) setStyle(tooltip, { - width: this.width + width: this.width + "px", + maxWidth: this.width + "px" }); if (this.height) setStyle(tooltip, { - height: this.height + height: this.height + "px", + maxHeight: this.height + "px" }); var tooltipinner = u$2("
    ")); var container = u$2("
    "); diff --git a/tourguide.min.js b/tourguide.min.js index fabb47b..91db492 100644 --- a/tourguide.min.js +++ b/tourguide.min.js @@ -1 +1 @@ -!function(){function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function e(e){for(var n=1;nt.length)&&(e=t.length);for(var n=0,o=new Array(e);n ]/.test(t)?e(document.createElement("table")).html(t).children().children().nodes:/^\s* ]/.test(t)?e(document.createElement("table")).html(t).children().children().children().nodes:/^\s*=n)return m(t,o.x,o.y),t._scrollSettings=null,e.end(f);var s=1-e.ease(r);if(m(t,o.x-o.differenceX*s,o.y-o.differenceY*s),i>=e.time)return e.endIterations++,e.scrollAncestor&&v(e.scrollAncestor),void v(t);!function(t){if("requestAnimationFrame"in window)return window.requestAnimationFrame(t);setTimeout(t,16)}(v.bind(null,t))}}function y(t){return t.self===t}function b(t){return"pageXOffset"in t||(t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth)&&"hidden"!==getComputedStyle(t).overflow}function w(){return!0}function x(t){if(t.assignedSlot)return x(t.assignedSlot);if(t.parentElement)return"BODY"===t.parentElement.tagName?t.parentElement.ownerDocument.defaultView||t.parentElement.ownerDocument.ownerWindow:t.parentElement;if(t.getRootNode){var e=t.getRootNode();if(11===e.nodeType)return e.host}}var _=function(t,e,n){if(t){"function"==typeof e&&(n=e,e=null),e||(e={}),e.time=isNaN(e.time)?1e3:e.time,e.ease=e.ease||function(t){return 1-Math.pow(1-t,t/2)},e.align=e.align||{};var o=x(t),i=1,r=e.validTarget||w,s=e.isScrollable;e.debug&&(console.log("About to scroll to",t),o||console.error("Target did not have a parent, is it mounted in the DOM?"));for(var u=[];o;)if(e.debug&&console.log("Scrolling parent node",o),r(o,i)&&(s?s(o,b):b(o))&&(i++,u.push(o)),!(o=x(o))){l(f);break}return u.reduce(((n,o,i)=>function(t,e,n,o,i){var r,s=!e._scrollSettings,u=e._scrollSettings,l=Date.now(),a={passive:!0};function c(t){e._scrollSettings=null,e.parentElement&&e.parentElement._scrollSettings&&e.parentElement._scrollSettings.end(t),n.debug&&console.log("Scrolling ended with type",t,"for",e),i(t),r&&(e.removeEventListener("touchstart",r,a),e.removeEventListener("wheel",r,a))}u&&u.end(g);var d=n.maxSynchronousAlignments;return null==d&&(d=3),e._scrollSettings={startTime:l,endIterations:0,target:t,time:n.time,ease:n.ease,align:n.align,isWindow:n.isWindow||y,maxSynchronousAlignments:d,end:c,scrollAncestor:o},"cancellable"in n&&!n.cancellable||(r=c.bind(null,g),e.addEventListener("touchstart",r,a),e.addEventListener("wheel",r,a)),s&&v(e),r}(t,o,e,u[i+1],l)),null)}function l(t){--i||n&&n(t)}};function k(t,e){if(!t)throw"TourguideJS: ".concat(e);return!0}function C(t,e,n){return e=isNaN(e)?t:e,n=isNaN(n)?t:n,Math.max(e,Math.min(t,n))}function S(t){return t&&null!==t.offsetParent}function E(t,e){var n=h(t).size(),o=j(e);return{width:n.width,height:n.height,top:n.top+o.scrollY,bottom:n.bottom+o.scrollY,left:n.left+o.scrollX,right:n.right+o.scrollX,viewTop:n.top,viewBottom:n.bottom,viewLeft:n.left,viewRight:n.right}}function j(t){try{var e=h(t).size();return{width:window.innerWidth,height:window.innerHeight,scrollX:window.scrollX,scrollY:window.scrollY,rootWidth:e.width,rootHeight:e.height,rootTop:e.top,rootLeft:e.left}}catch(e){throw console.error(e),Error("element is invalid: ".concat(t))}}function O(t,e){Object.assign(h(t).first().style,e)}function T(t,e,n){t.self===t?t.scrollTo(e,n):(t.scrollLeft=e,t.scrollTop=n)}function A(t,e){var n=Date.now();function o(t,i,r){if(t){var s=Date.now()-n,u=1-function(t){return 1-Math.pow(1-t,t/2)}(Math.min(1/e*s,1));T(t,i-(i-t.scrollLeft)*u,r-(r-t.scrollTop)*u),s>=e?T(t,i,r):function(t){if("requestAnimationFrame"in window)return window.requestAnimationFrame(t);setTimeout(t,16)}(o.bind(null,t,i,r))}else console.warn("target element ".concat(t," not found, skip"))}t.forEach((function(t){o(t.element,t.x,t.y)}))}function L(t){var e=[],n=h(t);do{n||(n=!1),n.first()||(n=!1);try{var o=n.first();o.scrollHeight===o.height&&o.scrollWidth===o.width||e.push({element:n.first(),x:n.first().scrollLeft,y:n.first().scrollTop}),n=n.parent()}catch(t){n=!1}}while(n);return e}function N(){return Math.max.apply(Math,l(Array.from(document.querySelectorAll("body *"),(function(t){return parseFloat(window.getComputedStyle(t).zIndex)})).filter((function(t){return!Number.isNaN(t)}))).concat([0]))}function R(t){return t.split("-")[0]}function M(t){return t.split("-")[1]}function P(t){return["top","bottom"].includes(R(t))?"x":"y"}function D(t){return"y"===t?"height":"width"}function H(t,e,n){let{reference:o,floating:i}=t;const r=o.x+o.width/2-i.width/2,s=o.y+o.height/2-i.height/2,u=P(e),l=D(u),a=o[l]/2-i[l]/2,c="x"===u;let d;switch(R(e)){case"top":d={x:r,y:o.y-i.height};break;case"bottom":d={x:r,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:s};break;case"left":d={x:o.x-i.width,y:s};break;default:d={x:o.x,y:o.y}}switch(M(e)){case"start":d[u]-=a*(n&&c?-1:1);break;case"end":d[u]+=a*(n&&c?-1:1)}return d}function B(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 z(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}const I=Math.min,W=Math.max;const q=t=>({name:"arrow",options:t,async fn(e){const{element:n,padding:o=0}=null!=t?t:{},{x:i,y:r,placement:s,rects:u,platform:l}=e;if(null==n)return{};const a=B(o),c={x:i,y:r},d=P(s),p=M(s),h=D(d),f=await l.getDimensions(n),g="y"===d?"top":"left",m="y"===d?"bottom":"right",v=u.reference[h]+u.reference[d]-c[d]-u.floating[h],y=c[d]-u.reference[d],b=await(null==l.getOffsetParent?void 0:l.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=u.floating[h]);const x=v/2-y/2,_=a[g],k=w-f[h]-a[m],C=w/2-f[h]/2+x,S=function(t,e,n){return W(t,I(e,n))}(_,C,k),E=("start"===p?a[g]:a[m])>0&&C!==S&&u.reference[h]<=u.floating[h];return{[d]:c[d]-(E?C<_?_-C:k-C:0),data:{[d]:S,centerOffset:C-S}}}}),X={left:"right",right:"left",bottom:"top",top:"bottom"};function F(t){return t.replace(/left|right|bottom|top/g,(t=>X[t]))}const Y={start:"end",end:"start"};const $=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-start",e+"-end")),[]),V=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i,r,s;const{x:u,y:l,rects:a,middlewareData:c,placement:d,platform:p,elements:h}=e,{alignment:f=null,allowedPlacements:g=$,autoAlignment:m=!0,...v}=t,y=function(t,e,n){return(t?[...n.filter((e=>M(e)===t)),...n.filter((e=>M(e)!==t))]:n.filter((t=>R(t)===t))).filter((n=>!t||M(n)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>Y[t]))}(n)!==n))}(f,m,g),b=await async function(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:s,elements:u,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=e,f=B(h),g=u[p?"floating"===d?"reference":"floating":d],m=z(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(g)))||n?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(u.floating)),boundary:a,rootBoundary:c,strategy:l})),v="floating"===d?{...s.floating,x:o,y:i}:s.reference,y=await(null==r.getOffsetParent?void 0:r.getOffsetParent(u.floating)),b=await(null==r.isElement?void 0:r.isElement(y))&&await(null==r.getScale?void 0:r.getScale(y))||{x:1,y:1},w=z(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:l}):v);return{top:(m.top-w.top+f.top)/b.y,bottom:(w.bottom-m.bottom+f.bottom)/b.y,left:(m.left-w.left+f.left)/b.x,right:(w.right-m.right+f.right)/b.x}}(e,v),w=null!=(n=null==(o=c.autoPlacement)?void 0:o.index)?n:0,x=y[w];if(null==x)return{};const{main:_,cross:k}=function(t,e,n){void 0===n&&(n=!1);const o=M(t),i=P(t),r=D(i);let s="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=F(s)),{main:s,cross:F(s)}}(x,a,await(null==p.isRTL?void 0:p.isRTL(h.floating)));if(d!==x)return{x:u,y:l,reset:{placement:y[0]}};const C=[b[R(x)],b[_],b[k]],S=[...null!=(i=null==(r=c.autoPlacement)?void 0:r.overflows)?i:[],{placement:x,overflows:C}],E=y[w+1];if(E)return{data:{index:w+1,overflows:S},reset:{placement:E}};const j=S.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),O=null==(s=j.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:s.placement,T=null!=O?O:j[0].placement;return T!==d?{data:{index:w+1,overflows:S},reset:{placement:T}}:{}}}},J=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:o}=e,i=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),s=R(n),u=M(n),l="x"===P(n),a=["left","top"].includes(s)?-1:1,c=r&&l?-1:1,d="function"==typeof e?e(t):e;let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return u&&"number"==typeof f&&(h="end"===u?-1*f:f),l?{x:h*c,y:p*a}:{x:p*a,y:h*c}}(e,t);return{x:n+i.x,y:o+i.y,data:i}}}};function G(t){var e;return(null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function U(t){return G(t).getComputedStyle(t)}function Z(t){return nt(t)?(t.nodeName||"").toLowerCase():""}let K;function Q(){if(K)return K;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(K=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),K):navigator.userAgent}function tt(t){return t instanceof G(t).HTMLElement}function et(t){return t instanceof G(t).Element}function nt(t){return t instanceof G(t).Node}function ot(t){return"undefined"!=typeof ShadowRoot&&(t instanceof G(t).ShadowRoot||t instanceof ShadowRoot)}function it(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=U(t);return/auto|scroll|overlay|hidden/.test(e+o+n)&&!["inline","contents"].includes(i)}function rt(t){return["table","td","th"].includes(Z(t))}function st(t){const e=/firefox/i.test(Q()),n=U(t),o=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!o&&"none"!==o||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function ut(){return!/^((?!chrome|android).)*safari/i.test(Q())}function lt(t){return["html","body","#document"].includes(Z(t))}const at={x:1,y:1};function ct(t){const e=!et(t)&&t.contextElement?t.contextElement:et(t)?t:null;if(!e)return at;const n=e.getBoundingClientRect(),o=U(e);let i=n.width/parseFloat(o.width),r=n.height/parseFloat(o.height);return i&&Number.isFinite(i)||(i=1),r&&Number.isFinite(r)||(r=1),{x:i,y:r}}function dt(t,e,n,o){var i,r,s,u;void 0===e&&(e=!1),void 0===n&&(n=!1);const l=t.getBoundingClientRect();let a=at;e&&(o?et(o)&&(a=ct(o)):a=ct(t));const c=et(t)?G(t):window,d=!ut()&&n,p=(l.left+(d&&null!=(i=null==(r=c.visualViewport)?void 0:r.offsetLeft)?i:0))/a.x,h=(l.top+(d&&null!=(s=null==(u=c.visualViewport)?void 0:u.offsetTop)?s:0))/a.y,f=l.width/a.x,g=l.height/a.y;return{width:f,height:g,top:h,right:p+f,bottom:h+g,left:p,x:p,y:h}}function pt(t){return((nt(t)?t.ownerDocument:t.document)||window.document).documentElement}function ht(t){return et(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ft(t){return dt(pt(t)).left+ht(t).scrollLeft}function gt(t,e,n){const o=tt(e),i=pt(e),r=dt(t,!0,"fixed"===n,e);let s={scrollLeft:0,scrollTop:0};const u={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==Z(e)||it(i))&&(s=ht(e)),tt(e)){const t=dt(e,!0);u.x=t.x+e.clientLeft,u.y=t.y+e.clientTop}else i&&(u.x=ft(i));return{x:r.left+s.scrollLeft-u.x,y:r.top+s.scrollTop-u.y,width:r.width,height:r.height}}function mt(t){if("html"===Z(t))return t;const e=t.assignedSlot||t.parentNode||(ot(t)?t.host:null)||pt(t);return ot(e)?e.host:e}function vt(t){return tt(t)&&"fixed"!==U(t).position?t.offsetParent:null}function yt(t){const e=G(t);let n=vt(t);for(;n&&rt(n)&&"static"===U(n).position;)n=vt(n);return n&&("html"===Z(n)||"body"===Z(n)&&"static"===U(n).position&&!st(n))?e:n||function(t){let e=mt(t);for(;tt(e)&&!lt(e);){if(st(e))return e;e=mt(e)}return null}(t)||e}const bt=Math.min,wt=Math.max;function xt(t){const e=mt(t);return lt(e)?t.ownerDocument.body:tt(e)&&it(e)?e:xt(e)}function _t(t,e){var n;void 0===e&&(e=[]);const o=xt(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=G(o);return i?e.concat(r,r.visualViewport||[],it(o)?o:[]):e.concat(o,_t(o))}function kt(t,e,n){return"viewport"===e?z(function(t,e){const n=G(t),o=pt(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,u=0,l=0;if(i){r=i.width,s=i.height;const t=ut();(t||!t&&"fixed"===e)&&(u=i.offsetLeft,l=i.offsetTop)}return{width:r,height:s,x:u,y:l}}(t,n)):et(e)?function(t,e){const n=dt(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=tt(t)?ct(t):{x:1,y:1},s=t.clientWidth*r.x,u=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{top:a,left:l,right:l+s,bottom:a+u,x:l,y:a,width:s,height:u}}(e,n):z(function(t){var e;const n=pt(t),o=ht(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=wt(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=wt(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let u=-o.scrollLeft+ft(t);const l=-o.scrollTop;return"rtl"===U(i||n).direction&&(u+=wt(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:u,y:l}}(pt(t)))}const Ct={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r="clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let o=_t(t).filter((t=>et(t)&&"body"!==Z(t))),i=null;const r="fixed"===U(t).position;let s=r?mt(t):t;for(;et(s)&&!lt(s);){const t=U(s),e=st(s);(r?e||i:e||"static"!==t.position||!i||!["absolute","fixed"].includes(i.position))?i=t:o=o.filter((t=>t!==s)),s=mt(s)}return e.set(t,o),o}(e,this._c):[].concat(n),s=[...r,o],u=s[0],l=s.reduce(((t,n)=>{const o=kt(e,n,i);return t.top=wt(o.top,t.top),t.right=bt(o.right,t.right),t.bottom=bt(o.bottom,t.bottom),t.left=wt(o.left,t.left),t}),kt(e,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=tt(n),r=pt(n);if(n===r)return e;let s={scrollLeft:0,scrollTop:0},u={x:1,y:1};const l={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==Z(n)||it(r))&&(s=ht(n)),tt(n))){const t=dt(n);u=ct(n),l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-s.scrollLeft*u.x+l.x,y:e.y*u.y-s.scrollTop*u.y+l.y}},isElement:et,getDimensions:function(t){if(tt(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=dt(t);return{width:e.width,height:e.height}},getOffsetParent:yt,getDocumentElement:pt,getScale:ct,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||yt,r=this.getDimensions;return{reference:gt(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===U(t).direction},St=(t,e,n)=>{const o=new Map,i={platform:Ct,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,u=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=H(a,o,l),p=o,h={},f=0;for(let n=0;n",""],_:["",""],"*":["",""],"~":["",""],"\n":["
    "]," ":["
    "],"-":["
    "]};function jt(t){return t.replace(RegExp("^"+(t.match(/^(\t| )+/)||"")[0],"gm"),"")}function Ot(t){return(t+"").replace(/"/g,""").replace(//g,">")}function Tt(t,e){var n,o,i,r,s,u=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,l=[],a="",c=e||{},d=0;function p(t){var e=Et[t[1]||""],n=l[l.length-1]==t;return e?e[1]?(n?l.pop():l.push(t),e[0|n]):e[0]:t}function h(){for(var t="";l.length;)t+=p(l[l.length-1]);return t}for(t=t.replace(/^\[(.+?)\]:\s*(.+)$/gm,(function(t,e,n){return c[e.toLowerCase()]=n,""})).replace(/^\n+|\n+$/g,"");i=u.exec(t);)o=t.substring(d,i.index),d=u.lastIndex,n=i[0],o.match(/[^\\](\\\\)*\\$/)||((s=i[3]||i[4])?n='
    "+jt(Ot(s).replace(/^\n+|\n+$/g,""))+"
    ":(s=i[6])?(s.match(/\./)&&(i[5]=i[5].replace(/^\d+/gm,"")),r=Tt(jt(i[5].replace(/^\s*[>*+.-]/gm,""))),">"==s?s="blockquote":(s=s.match(/\./)?"ol":"ul",r=r.replace(/^(.*)(\n|$)/gm,"
  • $1
  • ")),n="<"+s+">"+r+""):i[8]?n=''+Ot(i[7])+'':i[10]?(a=a.replace("
    ",''),n=h()+""):i[9]?n="":i[12]||i[14]?n="<"+(s="h"+(i[14]?i[14].length:i[13]>"="?1:2))+">"+Tt(i[12]||i[15],c)+"":i[16]?n=""+Ot(i[16])+"":(i[17]||i[1])&&(n=p(i[17]||"--"))),a+=o,a+=n;return(a+t.substring(d)+h()).replace(/^\n+|\n+$/g,"")}var At=function(){function t(i,r){var s,u=this;if(o(this,t),this.active=!1,this.first=!1,this.last=!1,this.container=null,this.highlight=null,this.tooltip=null,this.arrow=null,this.context=r,this._target=null,this._timerHandler=null,this._scrollCancel=null,i instanceof HTMLElement?(this.target=i,s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.split(";"),i=e({},n);return o.forEach((function(t){var e=(t||"").split(":");i[(e[0]||"").trim()]=(e[1]||"").trim()})),i}(h(i).data("tour"))):(s=i,this._selector=i.selector),k(s.hasOwnProperty("title"),"missing required step parameter: title\n"+JSON.stringify(s,null,2)+"\nsee this doc for more detail: https://github.com/LikaloLLC/tourguide.js#json-based-approach"),k(s.hasOwnProperty("content"),"missing required step parameter: content\n"+JSON.stringify(s,null,2)+"\nsee this doc for more detail: https://github.com/LikaloLLC/tourguide.js#json-based-approach"),this.index=parseInt(s.step),this.title=s.title,this.content=Tt(s.content),this.image=s.image,this.width=s.width,this.height=s.height,this.layout=s.layout||"vertical",this.placement=s.placement||"bottom",this.overlay=!1!==s.overlay,this.navigation=!1!==s.navigation,s.image&&r.options.preloadimages&&!/^data:/i.test(s.image)){var l=new Image;l.onerror=function(){console.error(new Error("Invalid image URL: ".concat(s.image))),u.image=null},l.src=this.image}this.actions=[],s.actions&&(Array.isArray(s.actions)?this.actions=s.actions:console.error(new Error("actions must be array but got ".concat(n(s.actions)))))}return r(t,[{key:"el",get:function(){var t=this;if(!this.container){var e=h('
    '.concat(this.image?''):"","
    ")),n=h('
    \n
    ').concat(this.context._decorateText(this.title,this),'
    \n
    ').concat(this.context._decorateText(this.content,this),"
    \n
    "));if(n.find("a").on("click",(function(e){t.context.action(e,{action:"link"})})),Array.isArray(this.actions)&&this.actions.length>0){var o=h('
    \n '.concat(this.actions.map((function(t,e){return"<".concat(t.href?"a":"button",' id="').concat(t.id,'" ').concat(t.href?'href="'.concat(t.href,'"'):""," ").concat(t.target?'target="'.concat(t.target,'"'):"",' class="button').concat(t.primary?" primary":"",'" data-index="').concat(e,'">').concat(t.label,"")})).join(""),"\n
    "));o.find("a, button").on("click",(function(e){var n=t.actions[parseInt(e.target.dataset.index)];n.action&&e.preventDefault(),t.context.action(e,n)})),n.append(o)}var i=this.tooltip=h('
    ');this.width&&O(i,{width:this.width}),this.height&&O(i,{height:this.height});var r=h('
    ')),s=h('
    ');s.append(e).append(n);var u=this.arrow=h('
    ');if(this.navigation){var l=h('"));l.find(".guided-tour-step-button-prev").on("click",this.context.previous),l.find(".guided-tour-step-button-next").on("click",this.context.next),l.find(".guided-tour-step-button-close").on("click",this.context.stop),l.find(".guided-tour-step-button-complete").on("click",this.context.complete),l.find(".guided-tour-step-bullets button").on("click",(function(e){return t.context.go(parseInt(h(e.target).data("index")))})),r.append(u).append(s).append(l)}else r.append(u).append(s);if(i.append(r),this.container=h('')),this.overlay&&S(this.target)){var a=this.highlight=h('
    ');this.container.append(a).append(i)}else this.container.append(i)}return this.container}},{key:"target",get:function(){return this._target||this._selector&&h(this._selector).first()},set:function(t){this._target=t}},{key:"attach",value:function(t){h(t).append(this.el)}},{key:"remove",value:function(){this.hide(),this.el.remove()}},{key:"position",value:function(){var t,e,n,o,i,r,u=j(this.context._options.root),l=this.tooltip,a=this.highlight,c={top:0,left:0,width:0,height:0};if(S(this.target)){if(this.overlay&&this.highlight){var d=E(this.target,this.context._options.root);c.top=d.top-this.context.options.padding,c.left=d.left-this.context.options.padding,c.width=d.width+2*this.context.options.padding,c.height=d.height+2*this.context.options.padding,O(a,c)}t=this.target,e=l.first(),n=this.arrow.first(),this.context,St(t,e,{middleware:[V({alignment:"bottom-start"}),J((function(t){switch(t.placement.split("-")[0]){case"top":return 32;case"left":case"right":return 24;default:return 6}})),q({element:n,padding:8}),(o={padding:24},i=o.padding,r=void 0===i?0:i,{name:"keepinview",fn:function(t){var e=t.x,n=t.y,o=t.rects,i=t.middlewareData,s=t.platform.getDimensions(document.body),u=C(e,r,s.width-o.floating.width-r),l=C(n,r,s.height-o.floating.height-r),a=e-u,c=n-l,d=i.arrow;return d&&(d.x&&a&&(d.x+=a),d.y&&c&&(d.y+=c)),{x:u,y:l}}})]}).then((function(t){var o=t.x,i=t.y,r=t.middlewareData,u=t.placement;if(O(e,{left:"".concat(o,"px"),top:"".concat(i,"px")}),r.arrow){var l={top:"bottom",right:"left",bottom:"top",left:"right"}[u.split("-")[0]];O(n,s({left:null!=r.arrow.x?"".concat(r.arrow.x,"px"):"",top:null!=r.arrow.y?"".concat(r.arrow.y,"px"):"",right:"",bottom:""},l,"".concat(-n.offsetWidth/2,"px")))}}))}else{this.overlay&&this.highlight&&O(a,c);var p={},h=E(l,this.context._options.root);p.top=u.height/2+u.scrollY-u.rootTop-h.height/2,p.left=u.width/2+u.scrollX-u.rootLeft-h.width/2,p.bottom="unset",p.right="unset",l.addClass("guided-tour-arrow-none"),O(l,p),this.overlay&&this.context._overlay.show()}}},{key:"cancel",value:function(){this._timerHandler&&clearTimeout(this._timerHandler),this._scrollCancel&&this._scrollCancel()}},{key:"show",value:function(){var t=this;if(this.cancel(),!this.active){var e=function(){t.el.addClass("active"),t.context._overlay.hide(),t.position(),t.active=!0,t.container.find(".guided-tour-step-tooltip, button.primary, .guided-tour-step-button-complete, .guided-tour-step-button-next").last().focus({preventScroll:!0})},n=C(this.context.options.animationspeed,120,1e3);return S(this.target)&&(this._scrollCancel=_(this.target,{time:n,cancellable:!1,align:{top:.5,left:.5}})),this._timerHandler=setTimeout(e,3*n),!0}return!1}},{key:"hide",value:function(){return this.cancel(),!!this.active&&(this.el.removeClass("active"),this.tooltip.removeClass("guided-tour-arrow-top"),this.tooltip.removeClass("guided-tour-arrow-bottom"),this.overlay&&this.context._overlay.show(),this.active=!1,!0)}},{key:"toJSON",value:function(){return{index:this.index,title:this.title,content:this.content,image:this.image,active:this.active}}}]),t}(),Lt=function(){function t(e){o(this,t),this.context=e,this.container=null,this.active=!1}return r(t,[{key:"el",get:function(){return this.container||(this.container=h('')),this.container}},{key:"attach",value:function(t){h(t).append(this.el)}},{key:"remove",value:function(){this.hide(),this.el.remove()}},{key:"show",value:function(){return!this.active&&(this.el.addClass("active"),this.active=!0,!0)}},{key:"hide",value:function(){return!!this.active&&(this.el.removeClass("active"),this.active=!1,!0)}},{key:"toJSON",value:function(){return{active:this.active}}}]),t}();function Nt(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function Rt(t,e,n){return"#"+Nt(Math.floor(t))+Nt(Math.floor(e))+Nt(Math.floor(n))}function Mt(t,e,n){t/=255,e/=255,n/=255;var o=Math.max(t,e,n),i=o-Math.min(t,e,n),r=i?o===t?(e-n)/i:o===e?2+(n-t)/i:4+(t-e)/i:0;return[60*r<0?60*r+360:60*r,100*(i?o<=.5?i/(2*o-i):i/(2-(2*o-i)):0),100*(2*o-i)/2]}function Pt(t){return Mt.apply(null,function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:null}(t))}function Dt(t,e,n){return Rt.apply(null,function(t,e,n){n/=100;var o=function(e){return(e+t/30)%12},i=(e/=100)*Math.min(n,1-n),r=function(t){return n-i*Math.max(-1,Math.min(o(t)-3,Math.min(9-o(t),1)))};return[255*r(0),255*r(8),255*r(4)]}(t,e,n))}function Ht(t,e,n,o){var i=Pt(t);return i[0]=C(i[0]*e,0,255),i[1]=C(i[1]*n,0,255),i[2]=C(i[2]*o,0,255),Dt.apply(null,i)}function Bt(t,e){var n=Object.assign(t,e||{}),o=/Color$/,i=n.accentColor;return Object.keys(n).filter((function(t){return o.test(t)&&"auto"===n[t]})).forEach((function(t){switch(t){case"focusColor":case"stepButtonNextColor":case"stepButtonCompleteColor":case"bulletCurrentColor":n[t]=i;break;case"bulletColor":n[t]=Ht(i,1,.8,1.4);break;case"bulletVisitedColor":n[t]=Ht(i,1,.3,1.2);break;case"stepButtonPrevColor":case"stepButtonCloseColor":n[t]=Ht(i,1,.2,.8)}})),n}var zt=r((function t(e,n){o(this,t),this.name=e,this.onAction=n}));var It=function(){function t(e,n){o(this,t),this.match="string"==typeof e?new RegExp("{s*".concat(e.trim(),"s*(,.+?)?s*?}"),"gmi"):e,this.decoratorFn=n}return r(t,[{key:"test",value:function(t){return this.match.test(t)}},{key:"render",value:function(t,e,n){try{var o=function(t,e){var n,o,i=[];for(e.lastIndex=0;null!==(n=e.exec(t));)n.index===e.lastIndex&&e.lastIndex++,i.push({match:n[0],start:n.index,length:n[0].length,properties:(o=n[1],(o||"").split(",").map((function(t){return t.trim()})).filter(Boolean))});return i}(t,this.match).reverse();return this.decoratorFn(t,o,e,n)}catch(e){return console.warn(e),t}}}]),t}(),Wt=0,qt=1,Xt=2,Ft={next:"ArrowRight",prev:"ArrowLeft",first:"Home",last:"End",complete:null,stop:"Escape"},Yt={fontFamily:"sans-serif",fontSize:"14px",tooltipWidth:"40vw",overlayColor:"rgba(0, 0, 0, 0.5)",textColor:"#333",accentColor:"#0d6efd",focusColor:"auto",bulletColor:"auto",bulletVisitedColor:"auto",bulletCurrentColor:"auto",stepButtonCloseColor:"auto",stepButtonPrevColor:"auto",stepButtonNextColor:"auto",stepButtonCompleteColor:"auto",backgroundColor:"#fff"};function $t(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"keyup";if("object"===n(t)){var r={type:i};if("number"==typeof o)r.keyCode=o;else if("string"==typeof o)r.key=o;else{if("object"!==n(o))throw new Error("keyboardNavigation option invalid. should be predefined object or false. Check documentation.");r=e(e({},o),{},{type:i})}var s=Object.entries(r).map((function(t){var e=u(t,2);return{key:e[0],value:e[1]}}));return!s.filter((function(e){return t[e.key]!==e.value})).length}return!1}var Vt=function(){function t(){var i=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,t),this._options=Object.assign({root:"body",selector:"[data-tour]",animationspeed:120,padding:5,steps:null,src:null,restoreinitialposition:!0,preloadimages:!1,request:{options:{mode:"cors",cache:"no-cache"},headers:{"Content-Type":"application/json"}},keyboardNavigation:Ft,actionHandlers:[],contentDecorators:[],onStart:function(){},onStop:function(){},onComplete:function(){},onStep:function(){},onAction:function(){}},r,{style:Bt(Yt,r.colors||r.style)}),this._overlay=null,this._steps=[],this._current=0,this._active=!1,this._stepsSrc=Wt,this._ready=!1,this._initialposition=null,"object"===n(this._options.steps)&&Array.isArray(this._options.steps))this._stepsSrc=qt,this._steps=this._options.steps.map((function(t,n){return new At(e(e({},t),{},{step:t.step||n}),i)})),this._ready=!0;else if("string"==typeof this._options.src)this._stepsSrc=Xt,fetch(new Request(this._options.src,this._options.request)).then((function(t){return t.json().then((function(t){i._steps=t.map((function(t,n){return new At(e(e({},t),{},{step:t.step||n}),i)})),i._ready=!0}))}));else{if(!(h(this._options.selector).length>0))throw new Error("Tour is not configured properly. Check documentation.");this._stepsSrc=Wt,this._ready=!0}this._containerElement=document.createElement("aside"),this._containerElement.classList.add("__guided-tour-container"),h(this._options.root).append(this._containerElement),this._shadowRoot=this._containerElement.attachShadow({mode:"closed"}),this._injectIcons(),this._injectStyles(),this.start=this.start.bind(this),this.next=this.next.bind(this),this.previous=this.previous.bind(this),this.go=this.go.bind(this),this.stop=this.stop.bind(this),this.complete=this.complete.bind(this),this._keyboardHandler=this._keyboardHandler.bind(this)}return r(t,[{key:"currentstep",get:function(){return this._steps[this._current]}},{key:"length",get:function(){return this._steps.length}},{key:"steps",get:function(){return this._steps.map((function(t){return t.toJSON()}))}},{key:"hasnext",get:function(){return this.nextstep!==this._current}},{key:"nextstep",get:function(){return C(this._current+1,0,this.length-1)}},{key:"previousstep",get:function(){return C(this._current-1,0)}},{key:"options",get:function(){return this._options}},{key:"_injectIcons",value:function(){0===h("#GuidedTourIconSet",this._shadowRoot).length&&h(this._shadowRoot).append(h(''))}},{key:"_injectStyles",value:function(){var t=h(""));h(this._shadowRoot).append(t);var e=h(""));h(this._shadowRoot).append(e)}},{key:"_keyboardHandler",value:function(t){this._options.keyboardNavigation.next&&$t(t,this._options.keyboardNavigation.next)?this.next():this._options.keyboardNavigation.prev&&$t(t,this._options.keyboardNavigation.prev)?this.previous():this._options.keyboardNavigation.first&&$t(t,this._options.keyboardNavigation.first)?this.go(0):this._options.keyboardNavigation.last&&$t(t,this._options.keyboardNavigation.last)?this.go(this._steps.length-1):this._options.keyboardNavigation.stop&&$t(t,this._options.keyboardNavigation.stop)?this.stop():this._options.keyboardNavigation.complete&&$t(t,this._options.keyboardNavigation.complete)&&this.complete()}},{key:"_decorateText",value:function(t,e){var n=this,o=t;return this._options.contentDecorators.forEach((function(t){t.test(o)&&(o=t.render(o,e,n))})),o}},{key:"init",value:function(){var t=this;if(this.reset(),this._overlay=new Lt(this),this._stepsSrc===Wt){var e=h(this._options.selector).nodes;this._steps=e.map((function(e){return new At(e,t)}))}this._steps=this._steps.sort((function(t,e){return t.index-e.index})),this._steps[0].first=!0,this._steps[this.length-1].last=!0}},{key:"reset",value:function(){this._active&&this.stop(),this._stepsSrc===Wt&&(this._steps=[]),this._current=0}},{key:"start",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this._ready){if(this._containerElement.style.zIndex=N()+1,this._options.restoreinitialposition&&(this._initialposition=L(this._options.root)),this._active)this.go(e,"start");else if(h(this._options.root).addClass("__guided-tour-active"),this.init(),this._overlay.attach(this._shadowRoot),this._steps.forEach((function(e){return e.attach(t._shadowRoot)})),this._current=e,this.currentstep.show(),this._active=!0,this._options.onStart(this._options),this._options.keyboardNavigation){if("[object Object]"!==Object.prototype.toString.call(this._options.keyboardNavigation))throw new Error("keyboardNavigation option invalid. should be predefined object or false. Check documentation.");h(":root").on("keyup",this._keyboardHandler)}}else setTimeout((function(){t.start(e)}),50)}},{key:"action",value:function(t,e){if(this._active){switch(e.action){case"next":this.next();break;case"previous":this.previous();break;case"stop":this.stop();break;case"complete":this.complete();break;default:var n=this._options.actionHandlers.find((function(t){return t.name===e.action}));n&&n.onAction(t,e,this)}"function"==typeof this._options.onAction&&this._options.onAction(t,e,this)}}},{key:"next",value:function(){this._active&&this.go(this.nextstep,"next")}},{key:"previous",value:function(){this._active&&this.go(this.previousstep,"previous")}},{key:"go",value:function(t,e){this._active&&this._current!==t&&(this.currentstep.hide(),this._current=C(t,0,this.length-1),this.currentstep.show(),this._options.onStep(this.currentstep,e))}},{key:"stop",value:function(){this._active&&(this.currentstep.hide(),this._active=!1,this._overlay.remove(),this._steps.forEach((function(t){return t.remove()})),h(this._options.root).removeClass("__guided-tour-active"),this._options.keyboardNavigation&&h(":root").off("keyup",this._keyboardHandler),this._options.restoreinitialposition&&this._initialposition&&A(this._initialposition,this._options.animationspeed),this._options.onStop(this._options))}},{key:"complete",value:function(){this._active&&(this.stop(),this._options.onComplete())}},{key:"deinit",value:function(){this._ready&&(this._containerElement.remove(),this._containerElement=null,this._active=!1,this._ready=!1)}}]),t}();Vt.ActionHandler=zt,Vt.ContentDecorator=It}(); +!function(){function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function e(e){for(var n=1;nt.length)&&(e=t.length);for(var n=0,o=new Array(e);n ]/.test(t)?e(document.createElement("table")).html(t).children().children().nodes:/^\s* ]/.test(t)?e(document.createElement("table")).html(t).children().children().children().nodes:/^\s*=n)return m(t,o.x,o.y),t._scrollSettings=null,e.end(f);var s=1-e.ease(r);if(m(t,o.x-o.differenceX*s,o.y-o.differenceY*s),i>=e.time)return e.endIterations++,e.scrollAncestor&&v(e.scrollAncestor),void v(t);!function(t){if("requestAnimationFrame"in window)return window.requestAnimationFrame(t);setTimeout(t,16)}(v.bind(null,t))}}function y(t){return t.self===t}function b(t){return"pageXOffset"in t||(t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth)&&"hidden"!==getComputedStyle(t).overflow}function x(){return!0}function w(t){if(t.assignedSlot)return w(t.assignedSlot);if(t.parentElement)return"body"===t.parentElement.tagName.toLowerCase()?t.parentElement.ownerDocument.defaultView||t.parentElement.ownerDocument.ownerWindow:t.parentElement;if(t.getRootNode){var e=t.getRootNode();if(11===e.nodeType)return e.host}}var _=function(t,e,n){if(t){"function"==typeof e&&(n=e,e=null),e||(e={}),e.time=isNaN(e.time)?1e3:e.time,e.ease=e.ease||function(t){return 1-Math.pow(1-t,t/2)},e.align=e.align||{};var o=w(t),i=1,r=e.validTarget||x,s=e.isScrollable;e.debug&&(console.log("About to scroll to",t),o||console.error("Target did not have a parent, is it mounted in the DOM?"));for(var u=[];o;)if(e.debug&&console.log("Scrolling parent node",o),r(o,i)&&(s?s(o,b):b(o))&&(i++,u.push(o)),!(o=w(o))){a(f);break}return u.reduce(((n,o,i)=>function(t,e,n,o,i){var r,s=!e._scrollSettings,u=e._scrollSettings,a=Date.now(),l={passive:!0};function c(t){e._scrollSettings=null,e.parentElement&&e.parentElement._scrollSettings&&e.parentElement._scrollSettings.end(t),n.debug&&console.log("Scrolling ended with type",t,"for",e),i(t),r&&(e.removeEventListener("touchstart",r,l),e.removeEventListener("wheel",r,l))}u&&u.end(g);var d=n.maxSynchronousAlignments;return null==d&&(d=3),e._scrollSettings={startTime:a,endIterations:0,target:t,time:n.time,ease:n.ease,align:n.align,isWindow:n.isWindow||y,maxSynchronousAlignments:d,end:c,scrollAncestor:o},"cancellable"in n&&!n.cancellable||(r=c.bind(null,g),e.addEventListener("touchstart",r,l),e.addEventListener("wheel",r,l)),s&&v(e),r}(t,o,e,u[i+1],a)),null)}function a(t){--i||n&&n(t)}};function k(t,e){if(!t)throw"TourguideJS: ".concat(e);return!0}function C(t,e,n){return e=isNaN(e)?t:e,n=isNaN(n)?t:n,Math.max(e,Math.min(t,n))}function S(t){return t&&null!==t.offsetParent}function E(t,e){var n=h(t).size(),o=j(e);return{width:n.width,height:n.height,top:n.top+o.scrollY,bottom:n.bottom+o.scrollY,left:n.left+o.scrollX,right:n.right+o.scrollX,viewTop:n.top,viewBottom:n.bottom,viewLeft:n.left,viewRight:n.right}}function j(t){try{var e=h(t).size();return{width:window.innerWidth,height:window.innerHeight,scrollX:window.scrollX,scrollY:window.scrollY,rootWidth:e.width,rootHeight:e.height,rootTop:e.top,rootLeft:e.left}}catch(e){throw console.error(e),Error("element is invalid: ".concat(t))}}function T(t,e){Object.assign(h(t).first().style,e)}function O(t,e,n){t.self===t?t.scrollTo(e,n):(t.scrollLeft=e,t.scrollTop=n)}function L(t,e){var n=Date.now();function o(t,i,r){if(t){var s=Date.now()-n,u=1-function(t){return 1-Math.pow(1-t,t/2)}(Math.min(1/e*s,1));O(t,i-(i-t.scrollLeft)*u,r-(r-t.scrollTop)*u),s>=e?O(t,i,r):function(t){if("requestAnimationFrame"in window)return window.requestAnimationFrame(t);setTimeout(t,16)}(o.bind(null,t,i,r))}else console.warn("target element ".concat(t," not found, skip"))}t.forEach((function(t){o(t.element,t.x,t.y)}))}function A(t){var e=[],n=h(t);do{n||(n=!1),n.first()||(n=!1);try{var o=n.first();o.scrollHeight===o.height&&o.scrollWidth===o.width||e.push({element:n.first(),x:n.first().scrollLeft,y:n.first().scrollTop}),n=n.parent()}catch(t){n=!1}}while(n);return e}function N(){return Math.max.apply(Math,a(Array.from(document.querySelectorAll("body *"),(function(t){return parseFloat(window.getComputedStyle(t).zIndex)})).filter((function(t){return!Number.isNaN(t)}))).concat([0]))}function R(t){return t.split("-")[1]}function M(t){return"y"===t?"height":"width"}function P(t){return t.split("-")[0]}function H(t){return["top","bottom"].includes(P(t))?"x":"y"}function D(t,e,n){let{reference:o,floating:i}=t;const r=o.x+o.width/2-i.width/2,s=o.y+o.height/2-i.height/2,u=H(e),a=M(u),l=o[a]/2-i[a]/2,c="x"===u;let d;switch(P(e)){case"top":d={x:r,y:o.y-i.height};break;case"bottom":d={x:r,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:s};break;case"left":d={x:o.x-i.width,y:s};break;default:d={x:o.x,y:o.y}}switch(R(e)){case"start":d[u]-=l*(n&&c?-1:1);break;case"end":d[u]+=l*(n&&c?-1:1)}return d}function B(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 z(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}const I=Math.min,W=Math.max;const q=t=>({name:"arrow",options:t,async fn(e){const{element:n,padding:o=0}=t||{},{x:i,y:r,placement:s,rects:u,platform:a}=e;if(null==n)return{};const l=B(o),c={x:i,y:r},d=H(s),p=M(d),h=await a.getDimensions(n),f="y"===d?"top":"left",g="y"===d?"bottom":"right",m=u.reference[p]+u.reference[d]-c[d]-u.floating[p],v=c[d]-u.reference[d],y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(n));let b=y?"y"===d?y.clientHeight||0:y.clientWidth||0:0;0===b&&(b=u.floating[p]);const x=m/2-v/2,w=l[f],_=b-h[p]-l[g],k=b/2-h[p]/2+x,C=function(t,e,n){return W(t,I(e,n))}(w,k,_),S=null!=R(s)&&k!=C&&u.reference[p]/2-(kt.concat(e,e+"-start",e+"-end")),[]),X={left:"right",right:"left",bottom:"top",top:"bottom"};function Y(t){return t.replace(/left|right|bottom|top/g,(t=>X[t]))}const $={start:"end",end:"start"};const V=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:r,middlewareData:s,placement:u,platform:a,elements:l}=e,{alignment:c,allowedPlacements:d=F,autoAlignment:p=!0,...h}=t,f=void 0!==c||d===F?function(t,e,n){return(t?[...n.filter((e=>R(e)===t)),...n.filter((e=>R(e)!==t))]:n.filter((t=>P(t)===t))).filter((n=>!t||R(n)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>$[t]))}(n)!==n))}(c||null,p,d):d,g=await async function(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:s,elements:u,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=e,f=B(h),g=u[p?"floating"===d?"reference":"floating":d],m=z(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(g)))||n?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(u.floating)),boundary:l,rootBoundary:c,strategy:a})),v="floating"===d?{...s.floating,x:o,y:i}:s.reference,y=await(null==r.getOffsetParent?void 0:r.getOffsetParent(u.floating)),b=await(null==r.isElement?void 0:r.isElement(y))&&await(null==r.getScale?void 0:r.getScale(y))||{x:1,y:1},x=z(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:a}):v);return{top:(m.top-x.top+f.top)/b.y,bottom:(x.bottom-m.bottom+f.bottom)/b.y,left:(m.left-x.left+f.left)/b.x,right:(x.right-m.right+f.right)/b.x}}(e,h),m=(null==(n=s.autoPlacement)?void 0:n.index)||0,v=f[m];if(null==v)return{};const{main:y,cross:b}=function(t,e,n){void 0===n&&(n=!1);const o=R(t),i=H(t),r=M(i);let s="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=Y(s)),{main:s,cross:Y(s)}}(v,r,await(null==a.isRTL?void 0:a.isRTL(l.floating)));if(u!==v)return{reset:{placement:f[0]}};const x=[g[P(v)],g[y],g[b]],w=[...(null==(o=s.autoPlacement)?void 0:o.overflows)||[],{placement:v,overflows:x}],_=f[m+1];if(_)return{data:{index:m+1,overflows:w},reset:{placement:_}};const k=w.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),C=null==(i=k.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:i.placement,S=C||k[0].placement;return S!==u?{data:{index:m+1,overflows:w},reset:{placement:S}}:{}}}},J=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:o}=e,i=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),s=P(n),u=R(n),a="x"===H(n),l=["left","top"].includes(s)?-1:1,c=r&&a?-1:1,d="function"==typeof e?e(t):e;let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return u&&"number"==typeof f&&(h="end"===u?-1*f:f),a?{x:h*c,y:p*l}:{x:p*l,y:h*c}}(e,t);return{x:n+i.x,y:o+i.y,data:i}}}};function G(t){var e;return(null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function U(t){return G(t).getComputedStyle(t)}function Z(t){return nt(t)?(t.nodeName||"").toLowerCase():""}let K;function Q(){if(K)return K;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(K=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),K):navigator.userAgent}function tt(t){return t instanceof G(t).HTMLElement}function et(t){return t instanceof G(t).Element}function nt(t){return t instanceof G(t).Node}function ot(t){return"undefined"!=typeof ShadowRoot&&(t instanceof G(t).ShadowRoot||t instanceof ShadowRoot)}function it(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=U(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function rt(t){return["table","td","th"].includes(Z(t))}function st(t){const e=/firefox/i.test(Q()),n=U(t),o=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!o&&"none"!==o||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function ut(){return!/^((?!chrome|android).)*safari/i.test(Q())}function at(t){return["html","body","#document"].includes(Z(t))}const lt=Math.min,ct=Math.max,dt=Math.round;function pt(t){const e=U(t);let n=parseFloat(e.width),o=parseFloat(e.height);const i=t.offsetWidth,r=t.offsetHeight,s=dt(n)!==i||dt(o)!==r;return s&&(n=i,o=r),{width:n,height:o,fallback:s}}function ht(t){return et(t)?t:t.contextElement}const ft={x:1,y:1};function gt(t){const e=ht(t);if(!tt(e))return ft;const n=e.getBoundingClientRect(),{width:o,height:i,fallback:r}=pt(e);let s=(r?dt(n.width):n.width)/o,u=(r?dt(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),u&&Number.isFinite(u)||(u=1),{x:s,y:u}}function mt(t,e,n,o){var i,r;void 0===e&&(e=!1),void 0===n&&(n=!1);const s=t.getBoundingClientRect(),u=ht(t);let a=ft;e&&(o?et(o)&&(a=gt(o)):a=gt(t));const l=u?G(u):window,c=!ut()&&n;let d=(s.left+(c&&(null==(i=l.visualViewport)?void 0:i.offsetLeft)||0))/a.x,p=(s.top+(c&&(null==(r=l.visualViewport)?void 0:r.offsetTop)||0))/a.y,h=s.width/a.x,f=s.height/a.y;if(u){const t=G(u),e=o&&et(o)?G(o):o;let n=t.frameElement;for(;n&&o&&e!==t;){const t=gt(n),e=n.getBoundingClientRect(),o=getComputedStyle(n);e.x+=(n.clientLeft+parseFloat(o.paddingLeft))*t.x,e.y+=(n.clientTop+parseFloat(o.paddingTop))*t.y,d*=t.x,p*=t.y,h*=t.x,f*=t.y,d+=e.x,p+=e.y,n=G(n).frameElement}}return{width:h,height:f,top:p,right:d+h,bottom:p+f,left:d,x:d,y:p}}function vt(t){return((nt(t)?t.ownerDocument:t.document)||window.document).documentElement}function yt(t){return et(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function bt(t){return mt(vt(t)).left+yt(t).scrollLeft}function xt(t,e,n){const o=tt(e),i=vt(e),r=mt(t,!0,"fixed"===n,e);let s={scrollLeft:0,scrollTop:0};const u={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==Z(e)||it(i))&&(s=yt(e)),tt(e)){const t=mt(e,!0);u.x=t.x+e.clientLeft,u.y=t.y+e.clientTop}else i&&(u.x=bt(i));return{x:r.left+s.scrollLeft-u.x,y:r.top+s.scrollTop-u.y,width:r.width,height:r.height}}function wt(t){if("html"===Z(t))return t;const e=t.assignedSlot||t.parentNode||(ot(t)?t.host:null)||vt(t);return ot(e)?e.host:e}function _t(t){return tt(t)&&"fixed"!==U(t).position?t.offsetParent:null}function kt(t){const e=G(t);let n=_t(t);for(;n&&rt(n)&&"static"===U(n).position;)n=_t(n);return n&&("html"===Z(n)||"body"===Z(n)&&"static"===U(n).position&&!st(n))?e:n||function(t){let e=wt(t);for(;tt(e)&&!at(e);){if(st(e))return e;e=wt(e)}return null}(t)||e}function Ct(t){const e=wt(t);return at(e)?t.ownerDocument.body:tt(e)&&it(e)?e:Ct(e)}function St(t,e){var n;void 0===e&&(e=[]);const o=Ct(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=G(o);return i?e.concat(r,r.visualViewport||[],it(o)?o:[]):e.concat(o,St(o))}function Et(t,e,n){return"viewport"===e?z(function(t,e){const n=G(t),o=vt(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,u=0,a=0;if(i){r=i.width,s=i.height;const t=ut();(t||!t&&"fixed"===e)&&(u=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:u,y:a}}(t,n)):et(e)?function(t,e){const n=mt(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=tt(t)?gt(t):{x:1,y:1},s=t.clientWidth*r.x,u=t.clientHeight*r.y,a=i*r.x,l=o*r.y;return{top:l,left:a,right:a+s,bottom:l+u,x:a,y:l,width:s,height:u}}(e,n):z(function(t){var e;const n=vt(t),o=yt(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=ct(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=ct(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let u=-o.scrollLeft+bt(t);const a=-o.scrollTop;return"rtl"===U(i||n).direction&&(u+=ct(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:u,y:a}}(vt(t)))}const jt={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r="clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let o=St(t).filter((t=>et(t)&&"body"!==Z(t))),i=null;const r="fixed"===U(t).position;let s=r?wt(t):t;for(;et(s)&&!at(s);){const t=U(s),e=st(s);(r?e||i:e||"static"!==t.position||!i||!["absolute","fixed"].includes(i.position))?i=t:o=o.filter((t=>t!==s)),s=wt(s)}return e.set(t,o),o}(e,this._c):[].concat(n),s=[...r,o],u=s[0],a=s.reduce(((t,n)=>{const o=Et(e,n,i);return t.top=ct(o.top,t.top),t.right=lt(o.right,t.right),t.bottom=lt(o.bottom,t.bottom),t.left=ct(o.left,t.left),t}),Et(e,u,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=tt(n),r=vt(n);if(n===r)return e;let s={scrollLeft:0,scrollTop:0},u={x:1,y:1};const a={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==Z(n)||it(r))&&(s=yt(n)),tt(n))){const t=mt(n);u=gt(n),a.x=t.x+n.clientLeft,a.y=t.y+n.clientTop}return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-s.scrollLeft*u.x+a.x,y:e.y*u.y-s.scrollTop*u.y+a.y}},isElement:et,getDimensions:function(t){return pt(t)},getOffsetParent:kt,getDocumentElement:vt,getScale:gt,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||kt,r=this.getDimensions;return{reference:xt(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===U(t).direction},Tt=(t,e,n)=>{const o=new Map,i={platform:jt,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,u=r.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=D(l,o,a),p=o,h={},f=0;for(let n=0;n",""],_:["",""],"*":["",""],"~":["",""],"\n":["
    "]," ":["
    "],"-":["
    "]};function Lt(t){return t.replace(RegExp("^"+(t.match(/^(\t| )+/)||"")[0],"gm"),"")}function At(t){return(t+"").replace(/"/g,""").replace(//g,">")}function Nt(t,e){var n,o,i,r,s,u=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,a=[],l="",c=e||{},d=0;function p(t){var e=Ot[t[1]||""],n=a[a.length-1]==t;return e?e[1]?(n?a.pop():a.push(t),e[0|n]):e[0]:t}function h(){for(var t="";a.length;)t+=p(a[a.length-1]);return t}for(t=t.replace(/^\[(.+?)\]:\s*(.+)$/gm,(function(t,e,n){return c[e.toLowerCase()]=n,""})).replace(/^\n+|\n+$/g,"");i=u.exec(t);)o=t.substring(d,i.index),d=u.lastIndex,n=i[0],o.match(/[^\\](\\\\)*\\$/)||((s=i[3]||i[4])?n='
    "+Lt(At(s).replace(/^\n+|\n+$/g,""))+"
    ":(s=i[6])?(s.match(/\./)&&(i[5]=i[5].replace(/^\d+/gm,"")),r=Nt(Lt(i[5].replace(/^\s*[>*+.-]/gm,""))),">"==s?s="blockquote":(s=s.match(/\./)?"ol":"ul",r=r.replace(/^(.*)(\n|$)/gm,"
  • $1
  • ")),n="<"+s+">"+r+""):i[8]?n=''+At(i[7])+'':i[10]?(l=l.replace("
    ",''),n=h()+""):i[9]?n="":i[12]||i[14]?n="<"+(s="h"+(i[14]?i[14].length:i[13]>"="?1:2))+">"+Nt(i[12]||i[15],c)+"":i[16]?n=""+At(i[16])+"":(i[17]||i[1])&&(n=p(i[17]||"--"))),l+=o,l+=n;return(l+t.substring(d)+h()).replace(/^\n+|\n+$/g,"")}var Rt=function(){function t(i,r){var s,u=this;if(o(this,t),this.active=!1,this.first=!1,this.last=!1,this.container=null,this.highlight=null,this.tooltip=null,this.arrow=null,this.context=r,this._target=null,this._timerHandler=null,this._scrollCancel=null,i instanceof HTMLElement?(this.target=i,s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.split(";"),i=e({},n);return o.forEach((function(t){var e=(t||"").split(":");i[(e[0]||"").trim()]=(e[1]||"").trim()})),i}(h(i).data("tour"))):(s=i,this._selector=i.selector),k(s.hasOwnProperty("title"),"missing required step parameter: title\n"+JSON.stringify(s,null,2)+"\nsee this doc for more detail: https://github.com/LikaloLLC/tourguide.js#json-based-approach"),k(s.hasOwnProperty("content"),"missing required step parameter: content\n"+JSON.stringify(s,null,2)+"\nsee this doc for more detail: https://github.com/LikaloLLC/tourguide.js#json-based-approach"),this.index=parseInt(s.step),this.title=s.title,this.content=Nt(s.content),this.image=s.image,this.width=s.width,this.height=s.height,this.layout=s.layout||"vertical",this.placement=s.placement||"bottom",this.overlay=!1!==s.overlay,this.navigation=!1!==s.navigation,s.image&&r.options.preloadimages&&!/^data:/i.test(s.image)){var a=new Image;a.onerror=function(){console.error(new Error("Invalid image URL: ".concat(s.image))),u.image=null},a.src=this.image}this.actions=[],s.actions&&(Array.isArray(s.actions)?this.actions=s.actions:console.error(new Error("actions must be array but got ".concat(n(s.actions)))))}return r(t,[{key:"el",get:function(){var t=this;if(!this.container){var e=h('
    '.concat(this.image?''):"","
    ")),n=h('
    \n
    ').concat(this.context._decorateText(this.title,this),'
    \n
    ').concat(this.context._decorateText(this.content,this),"
    \n
    "));if(n.find("a").on("click",(function(e){t.context.action(e,{action:"link"})})),Array.isArray(this.actions)&&this.actions.length>0){var o=h('
    \n '.concat(this.actions.map((function(t,e){return"<".concat(t.href?"a":"button",' id="').concat(t.id,'" ').concat(t.href?'href="'.concat(t.href,'"'):""," ").concat(t.target?'target="'.concat(t.target,'"'):"",' class="button').concat(t.primary?" primary":"",'" data-index="').concat(e,'">').concat(t.label,"")})).join(""),"\n
    "));o.find("a, button").on("click",(function(e){var n=t.actions[parseInt(e.target.dataset.index)];n.action&&e.preventDefault(),t.context.action(e,n)})),n.append(o)}var i=this.tooltip=h('
    ');this.width&&T(i,{width:this.width+"px",maxWidth:this.width+"px"}),this.height&&T(i,{height:this.height+"px",maxHeight:this.height+"px"});var r=h('
    ')),s=h('
    ');s.append(e).append(n);var u=this.arrow=h('
    ');if(this.navigation){var a=h('"));a.find(".guided-tour-step-button-prev").on("click",this.context.previous),a.find(".guided-tour-step-button-next").on("click",this.context.next),a.find(".guided-tour-step-button-close").on("click",this.context.stop),a.find(".guided-tour-step-button-complete").on("click",this.context.complete),a.find(".guided-tour-step-bullets button").on("click",(function(e){return t.context.go(parseInt(h(e.target).data("index")))})),r.append(u).append(s).append(a)}else r.append(u).append(s);if(i.append(r),this.container=h('')),this.overlay&&S(this.target)){var l=this.highlight=h('
    ');this.container.append(l).append(i)}else this.container.append(i)}return this.container}},{key:"target",get:function(){return this._target||this._selector&&h(this._selector).first()},set:function(t){this._target=t}},{key:"attach",value:function(t){h(t).append(this.el)}},{key:"remove",value:function(){this.hide(),this.el.remove()}},{key:"position",value:function(){var t,e,n,o,i,r,u=j(this.context._options.root),a=this.tooltip,l=this.highlight,c={top:0,left:0,width:0,height:0};if(S(this.target)){if(this.overlay&&this.highlight){var d=E(this.target,this.context._options.root);c.top=d.top-this.context.options.padding,c.left=d.left-this.context.options.padding,c.width=d.width+2*this.context.options.padding,c.height=d.height+2*this.context.options.padding,T(l,c)}t=this.target,e=a.first(),n=this.arrow.first(),this.context,Tt(t,e,{middleware:[V({alignment:"bottom-start"}),J((function(t){switch(t.placement.split("-")[0]){case"top":return 32;case"left":case"right":return 24;default:return 6}})),q({element:n,padding:8}),(o={padding:24},i=o.padding,r=void 0===i?0:i,{name:"keepinview",fn:function(t){var e=t.x,n=t.y,o=t.rects,i=t.middlewareData,s=t.platform.getDimensions(document.body),u=C(e,r,s.width-o.floating.width-r),a=C(n,r,s.height-o.floating.height-r),l=e-u,c=n-a,d=i.arrow;return d&&(d.x&&l&&(d.x+=l),d.y&&c&&(d.y+=c)),{x:u,y:a}}})]}).then((function(t){var o=t.x,i=t.y,r=t.middlewareData,u=t.placement;if(T(e,{left:"".concat(o,"px"),top:"".concat(i,"px")}),r.arrow){var a={top:"bottom",right:"left",bottom:"top",left:"right"}[u.split("-")[0]];T(n,s({left:null!=r.arrow.x?"".concat(r.arrow.x,"px"):"",top:null!=r.arrow.y?"".concat(r.arrow.y,"px"):"",right:"",bottom:""},a,"".concat(-n.offsetWidth/2,"px")))}}))}else{this.overlay&&this.highlight&&T(l,c);var p={},h=E(a,this.context._options.root);p.top=u.height/2+u.scrollY-u.rootTop-h.height/2,p.left=u.width/2+u.scrollX-u.rootLeft-h.width/2,p.bottom="unset",p.right="unset",a.addClass("guided-tour-arrow-none"),T(a,p),this.overlay&&this.context._overlay.show()}}},{key:"cancel",value:function(){this._timerHandler&&clearTimeout(this._timerHandler),this._scrollCancel&&this._scrollCancel()}},{key:"show",value:function(){var t=this;if(this.cancel(),!this.active){var e=function(){t.el.addClass("active"),t.context._overlay.hide(),t.position(),t.active=!0,t.container.find(".guided-tour-step-tooltip, button.primary, .guided-tour-step-button-complete, .guided-tour-step-button-next").last().focus({preventScroll:!0})},n=C(this.context.options.animationspeed,120,1e3);return S(this.target)&&(this._scrollCancel=_(this.target,{time:n,cancellable:!1,align:{top:.5,left:.5}})),this._timerHandler=setTimeout(e,3*n),!0}return!1}},{key:"hide",value:function(){return this.cancel(),!!this.active&&(this.el.removeClass("active"),this.tooltip.removeClass("guided-tour-arrow-top"),this.tooltip.removeClass("guided-tour-arrow-bottom"),this.overlay&&this.context._overlay.show(),this.active=!1,!0)}},{key:"toJSON",value:function(){return{index:this.index,title:this.title,content:this.content,image:this.image,active:this.active}}}]),t}(),Mt=function(){function t(e){o(this,t),this.context=e,this.container=null,this.active=!1}return r(t,[{key:"el",get:function(){return this.container||(this.container=h('')),this.container}},{key:"attach",value:function(t){h(t).append(this.el)}},{key:"remove",value:function(){this.hide(),this.el.remove()}},{key:"show",value:function(){return!this.active&&(this.el.addClass("active"),this.active=!0,!0)}},{key:"hide",value:function(){return!!this.active&&(this.el.removeClass("active"),this.active=!1,!0)}},{key:"toJSON",value:function(){return{active:this.active}}}]),t}();function Pt(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function Ht(t,e,n){return"#"+Pt(Math.floor(t))+Pt(Math.floor(e))+Pt(Math.floor(n))}function Dt(t,e,n){t/=255,e/=255,n/=255;var o=Math.max(t,e,n),i=o-Math.min(t,e,n),r=i?o===t?(e-n)/i:o===e?2+(n-t)/i:4+(t-e)/i:0;return[60*r<0?60*r+360:60*r,100*(i?o<=.5?i/(2*o-i):i/(2-(2*o-i)):0),100*(2*o-i)/2]}function Bt(t){return Dt.apply(null,function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:null}(t))}function zt(t,e,n){return Ht.apply(null,function(t,e,n){n/=100;var o=function(e){return(e+t/30)%12},i=(e/=100)*Math.min(n,1-n),r=function(t){return n-i*Math.max(-1,Math.min(o(t)-3,Math.min(9-o(t),1)))};return[255*r(0),255*r(8),255*r(4)]}(t,e,n))}function It(t,e,n,o){var i=Bt(t);return i[0]=C(i[0]*e,0,255),i[1]=C(i[1]*n,0,255),i[2]=C(i[2]*o,0,255),zt.apply(null,i)}function Wt(t,e){var n=Object.assign(t,e||{}),o=/Color$/,i=n.accentColor;return Object.keys(n).filter((function(t){return o.test(t)&&"auto"===n[t]})).forEach((function(t){switch(t){case"focusColor":case"stepButtonNextColor":case"stepButtonCompleteColor":case"bulletCurrentColor":n[t]=i;break;case"bulletColor":n[t]=It(i,1,.8,1.4);break;case"bulletVisitedColor":n[t]=It(i,1,.3,1.2);break;case"stepButtonPrevColor":case"stepButtonCloseColor":n[t]=It(i,1,.2,.8)}})),n}var qt=r((function t(e,n){o(this,t),this.name=e,this.onAction=n}));var Ft=function(){function t(e,n){o(this,t),this.match="string"==typeof e?new RegExp("{s*".concat(e.trim(),"s*(,.+?)?s*?}"),"gmi"):e,this.decoratorFn=n}return r(t,[{key:"test",value:function(t){return this.match.test(t)}},{key:"render",value:function(t,e,n){try{var o=function(t,e){var n,o,i=[];for(e.lastIndex=0;null!==(n=e.exec(t));)n.index===e.lastIndex&&e.lastIndex++,i.push({match:n[0],start:n.index,length:n[0].length,properties:(o=n[1],(o||"").split(",").map((function(t){return t.trim()})).filter(Boolean))});return i}(t,this.match).reverse();return this.decoratorFn(t,o,e,n)}catch(e){return console.warn(e),t}}}]),t}(),Xt=0,Yt=1,$t=2,Vt={next:"ArrowRight",prev:"ArrowLeft",first:"Home",last:"End",complete:null,stop:"Escape"},Jt={fontFamily:"sans-serif",fontSize:"14px",tooltipWidth:"40vw",overlayColor:"rgba(0, 0, 0, 0.5)",textColor:"#333",accentColor:"#0d6efd",focusColor:"auto",bulletColor:"auto",bulletVisitedColor:"auto",bulletCurrentColor:"auto",stepButtonCloseColor:"auto",stepButtonPrevColor:"auto",stepButtonNextColor:"auto",stepButtonCompleteColor:"auto",backgroundColor:"#fff"};function Gt(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"keyup";if("object"===n(t)){var r={type:i};if("number"==typeof o)r.keyCode=o;else if("string"==typeof o)r.key=o;else{if("object"!==n(o))throw new Error("keyboardNavigation option invalid. should be predefined object or false. Check documentation.");r=e(e({},o),{},{type:i})}var s=Object.entries(r).map((function(t){var e=u(t,2);return{key:e[0],value:e[1]}}));return!s.filter((function(e){return t[e.key]!==e.value})).length}return!1}var Ut=function(){function t(){var i=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,t),this._options=Object.assign({root:"body",selector:"[data-tour]",animationspeed:120,padding:5,steps:null,src:null,restoreinitialposition:!0,preloadimages:!1,request:{options:{mode:"cors",cache:"no-cache"},headers:{"Content-Type":"application/json"}},keyboardNavigation:Vt,actionHandlers:[],contentDecorators:[],onStart:function(){},onStop:function(){},onComplete:function(){},onStep:function(){},onAction:function(){}},r,{style:Wt(Jt,r.colors||r.style)}),this._overlay=null,this._steps=[],this._current=0,this._active=!1,this._stepsSrc=Xt,this._ready=!1,this._initialposition=null,"object"===n(this._options.steps)&&Array.isArray(this._options.steps))this._stepsSrc=Yt,this._steps=this._options.steps.map((function(t,n){return new Rt(e(e({},t),{},{step:t.step||n}),i)})),this._ready=!0;else if("string"==typeof this._options.src)this._stepsSrc=$t,fetch(new Request(this._options.src,this._options.request)).then((function(t){return t.json().then((function(t){i._steps=t.map((function(t,n){return new Rt(e(e({},t),{},{step:t.step||n}),i)})),i._ready=!0}))}));else{if(!(h(this._options.selector).length>0))throw new Error("Tour is not configured properly. Check documentation.");this._stepsSrc=Xt,this._ready=!0}this._containerElement=document.createElement("aside"),this._containerElement.classList.add("__guided-tour-container"),h(this._options.root).append(this._containerElement),this._shadowRoot=this._containerElement.attachShadow({mode:"closed"}),this._injectIcons(),this._injectStyles(),this.start=this.start.bind(this),this.next=this.next.bind(this),this.previous=this.previous.bind(this),this.go=this.go.bind(this),this.stop=this.stop.bind(this),this.complete=this.complete.bind(this),this._keyboardHandler=this._keyboardHandler.bind(this)}return r(t,[{key:"currentstep",get:function(){return this._steps[this._current]}},{key:"length",get:function(){return this._steps.length}},{key:"steps",get:function(){return this._steps.map((function(t){return t.toJSON()}))}},{key:"hasnext",get:function(){return this.nextstep!==this._current}},{key:"nextstep",get:function(){return C(this._current+1,0,this.length-1)}},{key:"previousstep",get:function(){return C(this._current-1,0)}},{key:"options",get:function(){return this._options}},{key:"_injectIcons",value:function(){0===h("#GuidedTourIconSet",this._shadowRoot).length&&h(this._shadowRoot).append(h(''))}},{key:"_injectStyles",value:function(){var t=h(""));h(this._shadowRoot).append(t);var e=h(""));h(this._shadowRoot).append(e)}},{key:"_keyboardHandler",value:function(t){this._options.keyboardNavigation.next&&Gt(t,this._options.keyboardNavigation.next)?this.next():this._options.keyboardNavigation.prev&&Gt(t,this._options.keyboardNavigation.prev)?this.previous():this._options.keyboardNavigation.first&&Gt(t,this._options.keyboardNavigation.first)?this.go(0):this._options.keyboardNavigation.last&&Gt(t,this._options.keyboardNavigation.last)?this.go(this._steps.length-1):this._options.keyboardNavigation.stop&&Gt(t,this._options.keyboardNavigation.stop)?this.stop():this._options.keyboardNavigation.complete&&Gt(t,this._options.keyboardNavigation.complete)&&this.complete()}},{key:"_decorateText",value:function(t,e){var n=this,o=t;return this._options.contentDecorators.forEach((function(t){t.test(o)&&(o=t.render(o,e,n))})),o}},{key:"init",value:function(){var t=this;if(this.reset(),this._overlay=new Mt(this),this._stepsSrc===Xt){var e=h(this._options.selector).nodes;this._steps=e.map((function(e){return new Rt(e,t)}))}this._steps=this._steps.sort((function(t,e){return t.index-e.index})),this._steps[0].first=!0,this._steps[this.length-1].last=!0}},{key:"reset",value:function(){this._active&&this.stop(),this._stepsSrc===Xt&&(this._steps=[]),this._current=0}},{key:"start",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this._ready){if(this._containerElement.style.zIndex=N()+1,this._options.restoreinitialposition&&(this._initialposition=A(this._options.root)),this._active)this.go(e,"start");else if(h(this._options.root).addClass("__guided-tour-active"),this.init(),this._overlay.attach(this._shadowRoot),this._steps.forEach((function(e){return e.attach(t._shadowRoot)})),this._current=e,this.currentstep.show(),this._active=!0,this._options.onStart(this._options),this._options.keyboardNavigation){if("[object Object]"!==Object.prototype.toString.call(this._options.keyboardNavigation))throw new Error("keyboardNavigation option invalid. should be predefined object or false. Check documentation.");h(":root").on("keyup",this._keyboardHandler)}}else setTimeout((function(){t.start(e)}),50)}},{key:"action",value:function(t,e){if(this._active){switch(e.action){case"next":this.next();break;case"previous":this.previous();break;case"stop":this.stop();break;case"complete":this.complete();break;default:var n=this._options.actionHandlers.find((function(t){return t.name===e.action}));n&&n.onAction(t,e,this)}"function"==typeof this._options.onAction&&this._options.onAction(t,e,this)}}},{key:"next",value:function(){this._active&&this.go(this.nextstep,"next")}},{key:"previous",value:function(){this._active&&this.go(this.previousstep,"previous")}},{key:"go",value:function(t,e){this._active&&this._current!==t&&(this.currentstep.hide(),this._current=C(t,0,this.length-1),this.currentstep.show(),this._options.onStep(this.currentstep,e))}},{key:"stop",value:function(){this._active&&(this.currentstep.hide(),this._active=!1,this._overlay.remove(),this._steps.forEach((function(t){return t.remove()})),h(this._options.root).removeClass("__guided-tour-active"),this._options.keyboardNavigation&&h(":root").off("keyup",this._keyboardHandler),this._options.restoreinitialposition&&this._initialposition&&L(this._initialposition,this._options.animationspeed),this._options.onStop(this._options))}},{key:"complete",value:function(){this._active&&(this.stop(),this._options.onComplete())}},{key:"deinit",value:function(){this._ready&&(this._containerElement.remove(),this._containerElement=null,this._active=!1,this._ready=!1)}}]),t}();Ut.ActionHandler=qt,Ut.ContentDecorator=Ft}(); diff --git a/tourguide.umd.js b/tourguide.umd.js index 5677b66..36be87d 100644 --- a/tourguide.umd.js +++ b/tourguide.umd.js @@ -158,279 +158,279 @@ var Icons = "\n\n\n\n\n"; - var COMPLETE = 'complete', - CANCELED = 'canceled'; - - function raf(task){ - if('requestAnimationFrame' in window){ - return window.requestAnimationFrame(task); - } - - setTimeout(task, 16); - } - - function setElementScroll$1(element, x, y){ - - if(element.self === element){ - element.scrollTo(x, y); - }else { - element.scrollLeft = x; - element.scrollTop = y; - } - } - - function getTargetScrollLocation(scrollSettings, parent){ - var align = scrollSettings.align, - target = scrollSettings.target, - targetPosition = target.getBoundingClientRect(), - parentPosition, - x, - y, - differenceX, - differenceY, - targetWidth, - targetHeight, - leftAlign = align && align.left != null ? align.left : 0.5, - topAlign = align && align.top != null ? align.top : 0.5, - leftOffset = align && align.leftOffset != null ? align.leftOffset : 0, - topOffset = align && align.topOffset != null ? align.topOffset : 0, - leftScalar = leftAlign, - topScalar = topAlign; - - if(scrollSettings.isWindow(parent)){ - targetWidth = Math.min(targetPosition.width, parent.innerWidth); - targetHeight = Math.min(targetPosition.height, parent.innerHeight); - x = targetPosition.left + parent.pageXOffset - parent.innerWidth * leftScalar + targetWidth * leftScalar; - y = targetPosition.top + parent.pageYOffset - parent.innerHeight * topScalar + targetHeight * topScalar; - x -= leftOffset; - y -= topOffset; - x = scrollSettings.align.lockX ? parent.pageXOffset : x; - y = scrollSettings.align.lockY ? parent.pageYOffset : y; - differenceX = x - parent.pageXOffset; - differenceY = y - parent.pageYOffset; - }else { - targetWidth = targetPosition.width; - targetHeight = targetPosition.height; - parentPosition = parent.getBoundingClientRect(); - var offsetLeft = targetPosition.left - (parentPosition.left - parent.scrollLeft); - var offsetTop = targetPosition.top - (parentPosition.top - parent.scrollTop); - x = offsetLeft + (targetWidth * leftScalar) - parent.clientWidth * leftScalar; - y = offsetTop + (targetHeight * topScalar) - parent.clientHeight * topScalar; - x -= leftOffset; - y -= topOffset; - x = Math.max(Math.min(x, parent.scrollWidth - parent.clientWidth), 0); - y = Math.max(Math.min(y, parent.scrollHeight - parent.clientHeight), 0); - x = scrollSettings.align.lockX ? parent.scrollLeft : x; - y = scrollSettings.align.lockY ? parent.scrollTop : y; - differenceX = x - parent.scrollLeft; - differenceY = y - parent.scrollTop; - } - - return { - x: x, - y: y, - differenceX: differenceX, - differenceY: differenceY - }; - } - - function animate(parent){ - var scrollSettings = parent._scrollSettings; - - if(!scrollSettings){ - return; - } - - var maxSynchronousAlignments = scrollSettings.maxSynchronousAlignments; - - var location = getTargetScrollLocation(scrollSettings, parent), - time = Date.now() - scrollSettings.startTime, - timeValue = Math.min(1 / scrollSettings.time * time, 1); - - if(scrollSettings.endIterations >= maxSynchronousAlignments){ - setElementScroll$1(parent, location.x, location.y); - parent._scrollSettings = null; - return scrollSettings.end(COMPLETE); - } - - var easeValue = 1 - scrollSettings.ease(timeValue); - - setElementScroll$1(parent, - location.x - location.differenceX * easeValue, - location.y - location.differenceY * easeValue - ); - - if(time >= scrollSettings.time){ - scrollSettings.endIterations++; - // Align ancestor synchronously - scrollSettings.scrollAncestor && animate(scrollSettings.scrollAncestor); - animate(parent); - return; - } - - raf(animate.bind(null, parent)); - } - - function defaultIsWindow(target){ - return target.self === target - } - - function transitionScrollTo(target, parent, settings, scrollAncestor, callback){ - var idle = !parent._scrollSettings, - lastSettings = parent._scrollSettings, - now = Date.now(), - cancelHandler, - passiveOptions = { passive: true }; - - if(lastSettings){ - lastSettings.end(CANCELED); - } - - function end(endType){ - parent._scrollSettings = null; - - if(parent.parentElement && parent.parentElement._scrollSettings){ - parent.parentElement._scrollSettings.end(endType); - } - - if(settings.debug){ - console.log('Scrolling ended with type', endType, 'for', parent); - } - - callback(endType); - if(cancelHandler){ - parent.removeEventListener('touchstart', cancelHandler, passiveOptions); - parent.removeEventListener('wheel', cancelHandler, passiveOptions); - } - } - - var maxSynchronousAlignments = settings.maxSynchronousAlignments; - - if(maxSynchronousAlignments == null){ - maxSynchronousAlignments = 3; - } - - parent._scrollSettings = { - startTime: now, - endIterations: 0, - target: target, - time: settings.time, - ease: settings.ease, - align: settings.align, - isWindow: settings.isWindow || defaultIsWindow, - maxSynchronousAlignments: maxSynchronousAlignments, - end: end, - scrollAncestor - }; - - if(!('cancellable' in settings) || settings.cancellable){ - cancelHandler = end.bind(null, CANCELED); - parent.addEventListener('touchstart', cancelHandler, passiveOptions); - parent.addEventListener('wheel', cancelHandler, passiveOptions); - } - - if(idle){ - animate(parent); - } - - return cancelHandler - } - - function defaultIsScrollable(element){ - return ( - 'pageXOffset' in element || - ( - element.scrollHeight !== element.clientHeight || - element.scrollWidth !== element.clientWidth - ) && - getComputedStyle(element).overflow !== 'hidden' - ); - } - - function defaultValidTarget(){ - return true; - } - - function findParentElement(el){ - if (el.assignedSlot) { - return findParentElement(el.assignedSlot); - } - - if (el.parentElement) { - if(el.parentElement.tagName === 'BODY'){ - return el.parentElement.ownerDocument.defaultView || el.parentElement.ownerDocument.ownerWindow; - } - return el.parentElement; - } - - if (el.getRootNode){ - var parent = el.getRootNode(); - if(parent.nodeType === 11) { - return parent.host; - } - } - } - - var scrollIntoView = function(target, settings, callback){ - if(!target){ - return; - } - - if(typeof settings === 'function'){ - callback = settings; - settings = null; - } - - if(!settings){ - settings = {}; - } - - settings.time = isNaN(settings.time) ? 1000 : settings.time; - settings.ease = settings.ease || function(v){return 1 - Math.pow(1 - v, v / 2);}; - settings.align = settings.align || {}; - - var parent = findParentElement(target), - parents = 1; - - function done(endType){ - parents--; - if(!parents){ - callback && callback(endType); - } - } - - var validTarget = settings.validTarget || defaultValidTarget; - var isScrollable = settings.isScrollable; - - if(settings.debug){ - console.log('About to scroll to', target); - - if(!parent){ - console.error('Target did not have a parent, is it mounted in the DOM?'); - } - } - - var scrollingElements = []; - - while(parent){ - if(settings.debug){ - console.log('Scrolling parent node', parent); - } - - if(validTarget(parent, parents) && (isScrollable ? isScrollable(parent, defaultIsScrollable) : defaultIsScrollable(parent))){ - parents++; - scrollingElements.push(parent); - } - - parent = findParentElement(parent); - - if(!parent){ - done(COMPLETE); - break; - } - } - - return scrollingElements.reduce((cancel, parent, index) => transitionScrollTo(target, parent, settings, scrollingElements[index + 1], done), null); + var COMPLETE = 'complete', + CANCELED = 'canceled'; + + function raf(task){ + if('requestAnimationFrame' in window){ + return window.requestAnimationFrame(task); + } + + setTimeout(task, 16); + } + + function setElementScroll$1(element, x, y){ + + if(element.self === element){ + element.scrollTo(x, y); + }else { + element.scrollLeft = x; + element.scrollTop = y; + } + } + + function getTargetScrollLocation(scrollSettings, parent){ + var align = scrollSettings.align, + target = scrollSettings.target, + targetPosition = target.getBoundingClientRect(), + parentPosition, + x, + y, + differenceX, + differenceY, + targetWidth, + targetHeight, + leftAlign = align && align.left != null ? align.left : 0.5, + topAlign = align && align.top != null ? align.top : 0.5, + leftOffset = align && align.leftOffset != null ? align.leftOffset : 0, + topOffset = align && align.topOffset != null ? align.topOffset : 0, + leftScalar = leftAlign, + topScalar = topAlign; + + if(scrollSettings.isWindow(parent)){ + targetWidth = Math.min(targetPosition.width, parent.innerWidth); + targetHeight = Math.min(targetPosition.height, parent.innerHeight); + x = targetPosition.left + parent.pageXOffset - parent.innerWidth * leftScalar + targetWidth * leftScalar; + y = targetPosition.top + parent.pageYOffset - parent.innerHeight * topScalar + targetHeight * topScalar; + x -= leftOffset; + y -= topOffset; + x = scrollSettings.align.lockX ? parent.pageXOffset : x; + y = scrollSettings.align.lockY ? parent.pageYOffset : y; + differenceX = x - parent.pageXOffset; + differenceY = y - parent.pageYOffset; + }else { + targetWidth = targetPosition.width; + targetHeight = targetPosition.height; + parentPosition = parent.getBoundingClientRect(); + var offsetLeft = targetPosition.left - (parentPosition.left - parent.scrollLeft); + var offsetTop = targetPosition.top - (parentPosition.top - parent.scrollTop); + x = offsetLeft + (targetWidth * leftScalar) - parent.clientWidth * leftScalar; + y = offsetTop + (targetHeight * topScalar) - parent.clientHeight * topScalar; + x -= leftOffset; + y -= topOffset; + x = Math.max(Math.min(x, parent.scrollWidth - parent.clientWidth), 0); + y = Math.max(Math.min(y, parent.scrollHeight - parent.clientHeight), 0); + x = scrollSettings.align.lockX ? parent.scrollLeft : x; + y = scrollSettings.align.lockY ? parent.scrollTop : y; + differenceX = x - parent.scrollLeft; + differenceY = y - parent.scrollTop; + } + + return { + x: x, + y: y, + differenceX: differenceX, + differenceY: differenceY + }; + } + + function animate(parent){ + var scrollSettings = parent._scrollSettings; + + if(!scrollSettings){ + return; + } + + var maxSynchronousAlignments = scrollSettings.maxSynchronousAlignments; + + var location = getTargetScrollLocation(scrollSettings, parent), + time = Date.now() - scrollSettings.startTime, + timeValue = Math.min(1 / scrollSettings.time * time, 1); + + if(scrollSettings.endIterations >= maxSynchronousAlignments){ + setElementScroll$1(parent, location.x, location.y); + parent._scrollSettings = null; + return scrollSettings.end(COMPLETE); + } + + var easeValue = 1 - scrollSettings.ease(timeValue); + + setElementScroll$1(parent, + location.x - location.differenceX * easeValue, + location.y - location.differenceY * easeValue + ); + + if(time >= scrollSettings.time){ + scrollSettings.endIterations++; + // Align ancestor synchronously + scrollSettings.scrollAncestor && animate(scrollSettings.scrollAncestor); + animate(parent); + return; + } + + raf(animate.bind(null, parent)); + } + + function defaultIsWindow(target){ + return target.self === target + } + + function transitionScrollTo(target, parent, settings, scrollAncestor, callback){ + var idle = !parent._scrollSettings, + lastSettings = parent._scrollSettings, + now = Date.now(), + cancelHandler, + passiveOptions = { passive: true }; + + if(lastSettings){ + lastSettings.end(CANCELED); + } + + function end(endType){ + parent._scrollSettings = null; + + if(parent.parentElement && parent.parentElement._scrollSettings){ + parent.parentElement._scrollSettings.end(endType); + } + + if(settings.debug){ + console.log('Scrolling ended with type', endType, 'for', parent); + } + + callback(endType); + if(cancelHandler){ + parent.removeEventListener('touchstart', cancelHandler, passiveOptions); + parent.removeEventListener('wheel', cancelHandler, passiveOptions); + } + } + + var maxSynchronousAlignments = settings.maxSynchronousAlignments; + + if(maxSynchronousAlignments == null){ + maxSynchronousAlignments = 3; + } + + parent._scrollSettings = { + startTime: now, + endIterations: 0, + target: target, + time: settings.time, + ease: settings.ease, + align: settings.align, + isWindow: settings.isWindow || defaultIsWindow, + maxSynchronousAlignments: maxSynchronousAlignments, + end: end, + scrollAncestor + }; + + if(!('cancellable' in settings) || settings.cancellable){ + cancelHandler = end.bind(null, CANCELED); + parent.addEventListener('touchstart', cancelHandler, passiveOptions); + parent.addEventListener('wheel', cancelHandler, passiveOptions); + } + + if(idle){ + animate(parent); + } + + return cancelHandler + } + + function defaultIsScrollable(element){ + return ( + 'pageXOffset' in element || + ( + element.scrollHeight !== element.clientHeight || + element.scrollWidth !== element.clientWidth + ) && + getComputedStyle(element).overflow !== 'hidden' + ); + } + + function defaultValidTarget(){ + return true; + } + + function findParentElement(el){ + if (el.assignedSlot) { + return findParentElement(el.assignedSlot); + } + + if (el.parentElement) { + if(el.parentElement.tagName.toLowerCase() === 'body'){ + return el.parentElement.ownerDocument.defaultView || el.parentElement.ownerDocument.ownerWindow; + } + return el.parentElement; + } + + if (el.getRootNode){ + var parent = el.getRootNode(); + if(parent.nodeType === 11) { + return parent.host; + } + } + } + + var scrollIntoView = function(target, settings, callback){ + if(!target){ + return; + } + + if(typeof settings === 'function'){ + callback = settings; + settings = null; + } + + if(!settings){ + settings = {}; + } + + settings.time = isNaN(settings.time) ? 1000 : settings.time; + settings.ease = settings.ease || function(v){return 1 - Math.pow(1 - v, v / 2);}; + settings.align = settings.align || {}; + + var parent = findParentElement(target), + parents = 1; + + function done(endType){ + parents--; + if(!parents){ + callback && callback(endType); + } + } + + var validTarget = settings.validTarget || defaultValidTarget; + var isScrollable = settings.isScrollable; + + if(settings.debug){ + console.log('About to scroll to', target); + + if(!parent){ + console.error('Target did not have a parent, is it mounted in the DOM?'); + } + } + + var scrollingElements = []; + + while(parent){ + if(settings.debug){ + console.log('Scrolling parent node', parent); + } + + if(validTarget(parent, parents) && (isScrollable ? isScrollable(parent, defaultIsScrollable) : defaultIsScrollable(parent))){ + parents++; + scrollingElements.push(parent); + } + + parent = findParentElement(parent); + + if(!parent){ + done(COMPLETE); + break; + } + } + + return scrollingElements.reduce((cancel, parent, index) => transitionScrollTo(target, parent, settings, scrollingElements[index + 1], done), null); }; function assert(assertion, message) { @@ -628,9 +628,9 @@ })).concat([0])); } - function t$1(t){return t.split("-")[0]}function e$1(t){return t.split("-")[1]}function n$2(e){return ["top","bottom"].includes(t$1(e))?"x":"y"}function i$1(t){return "y"===t?"height":"width"}function r$2(r,o,a){let{reference:l,floating:s}=r;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=n$2(o),m=i$1(u),g=l[m]/2-s[m]/2,d="x"===u;let p;switch(t$1(o)){case"top":p={x:c,y:l.y-s.height};break;case"bottom":p={x:c,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:f};break;case"left":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y};}switch(e$1(o)){case"start":p[u]-=g*(a&&d?-1:1);break;case"end":p[u]+=g*(a&&d?-1:1);}return p}const o$1=async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,s=a.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:m}=r$2(f,i,c),g=i,d={},p=0;for(let n=0;n({name:"arrow",options:t,async fn(r){const{element:o,padding:l=0}=null!=t?t:{},{x:s,y:c,placement:f,rects:m,platform:g}=r;if(null==o)return {};const d=a$1(l),p={x:s,y:c},h=n$2(f),y=e$1(f),x=i$1(h),w=await g.getDimensions(o),v="y"===h?"top":"left",b="y"===h?"bottom":"right",R=m.reference[x]+m.reference[h]-p[h]-m.floating[x],A=p[h]-m.reference[h],P=await(null==g.getOffsetParent?void 0:g.getOffsetParent(o));let T=P?"y"===h?P.clientHeight||0:P.clientWidth||0:0;0===T&&(T=m.floating[x]);const O=R/2-A/2,E=d[v],L=T-w[x]-d[b],D=T/2-w[x]/2+O,k=u$1(E,D,L),B=("start"===y?d[v]:d[b])>0&&D!==k&&m.reference[x]<=m.floating[x];return {[h]:p[h]-(B?Dg$1[t]))}function p$1(t,r,o){void 0===o&&(o=!1);const a=e$1(t),l=n$2(t),s=i$1(l);let c="x"===l?a===(o?"end":"start")?"right":"left":"start"===a?"bottom":"top";return r.reference[s]>r.floating[s]&&(c=d$1(c)),{main:c,cross:d$1(c)}}const h$1={start:"end",end:"start"};function y$1(t){return t.replace(/start|end/g,(t=>h$1[t]))}const x$1=["top","right","bottom","left"],w$1=x$1.reduce(((t,e)=>t.concat(e,e+"-start",e+"-end")),[]);const v$1=function(n){return void 0===n&&(n={}),{name:"autoPlacement",options:n,async fn(i){var r,o,a,l,c;const{x:f,y:u,rects:m,middlewareData:g,placement:d,platform:h,elements:x}=i,{alignment:v=null,allowedPlacements:b=w$1,autoAlignment:R=!0,...A}=n,P=function(n,i,r){return (n?[...r.filter((t=>e$1(t)===n)),...r.filter((t=>e$1(t)!==n))]:r.filter((e=>t$1(e)===e))).filter((t=>!n||e$1(t)===n||!!i&&y$1(t)!==t))}(v,R,b),T=await s$1(i,A),O=null!=(r=null==(o=g.autoPlacement)?void 0:o.index)?r:0,E=P[O];if(null==E)return {};const{main:L,cross:D}=p$1(E,m,await(null==h.isRTL?void 0:h.isRTL(x.floating)));if(d!==E)return {x:f,y:u,reset:{placement:P[0]}};const k=[T[t$1(E)],T[L],T[D]],B=[...null!=(a=null==(l=g.autoPlacement)?void 0:l.overflows)?a:[],{placement:E,overflows:k}],C=P[O+1];if(C)return {data:{index:O+1,overflows:B},reset:{placement:C}};const H=B.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),V=null==(c=H.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:c.placement,S=null!=V?V:H[0].placement;return S!==d?{data:{index:O+1,overflows:B},reset:{placement:S}}:{}}}};const T$1=function(i){return void 0===i&&(i=0),{name:"offset",options:i,async fn(r){const{x:o,y:a}=r,l=await async function(i,r){const{placement:o,platform:a,elements:l}=i,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=t$1(o),f=e$1(o),u="x"===n$2(o),m=["left","top"].includes(c)?-1:1,g=s&&u?-1:1,d="function"==typeof r?r(i):r;let{mainAxis:p,crossAxis:h,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&"number"==typeof y&&(h="end"===f?-1*y:y),u?{x:h*g,y:p*m}:{x:p*m,y:h*g}}(r,i);return {x:o+l.x,y:a+l.y,data:l}}}}; + function t$1(t){return t.split("-")[1]}function e$1(t){return "y"===t?"height":"width"}function n$2(t){return t.split("-")[0]}function o$1(t){return ["top","bottom"].includes(n$2(t))?"x":"y"}function i$1(i,r,a){let{reference:l,floating:s}=i;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=o$1(r),m=e$1(u),g=l[m]/2-s[m]/2,d="x"===u;let p;switch(n$2(r)){case"top":p={x:c,y:l.y-s.height};break;case"bottom":p={x:c,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:f};break;case"left":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y};}switch(t$1(r)){case"start":p[u]-=g*(a&&d?-1:1);break;case"end":p[u]+=g*(a&&d?-1:1);}return p}const r$2=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:l}=n,s=a.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:m}=i$1(f,o,c),g=o,d={},p=0;for(let n=0;n({name:"arrow",options:n,async fn(i){const{element:r,padding:l=0}=n||{},{x:s,y:c,placement:f,rects:m,platform:g}=i;if(null==r)return {};const d=a$1(l),p={x:s,y:c},h=o$1(f),y=e$1(h),x=await g.getDimensions(r),w="y"===h?"top":"left",v="y"===h?"bottom":"right",b=m.reference[y]+m.reference[h]-p[h]-m.floating[y],R=p[h]-m.reference[h],A=await(null==g.getOffsetParent?void 0:g.getOffsetParent(r));let P=A?"y"===h?A.clientHeight||0:A.clientWidth||0:0;0===P&&(P=m.floating[y]);const T=b/2-R/2,O=d[w],D=P-x[y]-d[v],E=P/2-x[y]/2+T,L=u$1(O,E,D),k=null!=t$1(f)&&E!=L&&m.reference[y]/2-(Et.concat(e,e+"-start",e+"-end")),[]),p$1={left:"right",right:"left",bottom:"top",top:"bottom"};function h$1(t){return t.replace(/left|right|bottom|top/g,(t=>p$1[t]))}function y$1(n,i,r){void 0===r&&(r=!1);const a=t$1(n),l=o$1(n),s=e$1(l);let c="x"===l?a===(r?"end":"start")?"right":"left":"start"===a?"bottom":"top";return i.reference[s]>i.floating[s]&&(c=h$1(c)),{main:c,cross:h$1(c)}}const x$1={start:"end",end:"start"};function w$1(t){return t.replace(/start|end/g,(t=>x$1[t]))}const v$1=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(o){var i,r,a;const{rects:l,middlewareData:c,placement:f,platform:u,elements:m}=o,{alignment:g,allowedPlacements:p=d$1,autoAlignment:h=!0,...x}=e,v=void 0!==g||p===d$1?function(e,o,i){return (e?[...i.filter((n=>t$1(n)===e)),...i.filter((n=>t$1(n)!==e))]:i.filter((t=>n$2(t)===t))).filter((n=>!e||t$1(n)===e||!!o&&w$1(n)!==n))}(g||null,h,p):p,b=await s$1(o,x),R=(null==(i=c.autoPlacement)?void 0:i.index)||0,A=v[R];if(null==A)return {};const{main:P,cross:T}=y$1(A,l,await(null==u.isRTL?void 0:u.isRTL(m.floating)));if(f!==A)return {reset:{placement:v[0]}};const O=[b[n$2(A)],b[P],b[T]],D=[...(null==(r=c.autoPlacement)?void 0:r.overflows)||[],{placement:A,overflows:O}],E=v[R+1];if(E)return {data:{index:R+1,overflows:D},reset:{placement:E}};const L=D.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),k=null==(a=L.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:a.placement,B=k||L[0].placement;return B!==f?{data:{index:R+1,overflows:D},reset:{placement:B}}:{}}}};const O$1=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(i){const{x:r,y:a}=i,l=await async function(e,i){const{placement:r,platform:a,elements:l}=e,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=n$2(r),f=t$1(r),u="x"===o$1(r),m=["left","top"].includes(c)?-1:1,g=s&&u?-1:1,d="function"==typeof i?i(e):i;let{mainAxis:p,crossAxis:h,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&"number"==typeof y&&(h="end"===f?-1*y:y),u?{x:h*g,y:p*m}:{x:p*m,y:h*g}}(i,e);return {x:r+l.x,y:a+l.y,data:l}}}}; - function n$1(t){var e;return (null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function o(t){return n$1(t).getComputedStyle(t)}function i(t){return f(t)?(t.nodeName||"").toLowerCase():""}let r$1;function l(){if(r$1)return r$1;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(r$1=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),r$1):navigator.userAgent}function c(t){return t instanceof n$1(t).HTMLElement}function s(t){return t instanceof n$1(t).Element}function f(t){return t instanceof n$1(t).Node}function u(t){if("undefined"==typeof ShadowRoot)return !1;return t instanceof n$1(t).ShadowRoot||t instanceof ShadowRoot}function a(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=o(t);return /auto|scroll|overlay|hidden/.test(e+i+n)&&!["inline","contents"].includes(r)}function d(t){return ["table","td","th"].includes(i(t))}function h(t){const e=/firefox/i.test(l()),n=o(t),i=n.backdropFilter||n.WebkitBackdropFilter;return "none"!==n.transform||"none"!==n.perspective||!!i&&"none"!==i||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function g(){return !/^((?!chrome|android).)*safari/i.test(l())}function m(t){return ["html","body","#document"].includes(i(t))}const p={x:1,y:1};function y(t){const e=!s(t)&&t.contextElement?t.contextElement:s(t)?t:null;if(!e)return p;const n=e.getBoundingClientRect(),i=o(e);let r=n.width/parseFloat(i.width),l=n.height/parseFloat(i.height);return r&&Number.isFinite(r)||(r=1),l&&Number.isFinite(l)||(l=1),{x:r,y:l}}function w(t,e,o,i){var r,l,c,f;void 0===e&&(e=!1),void 0===o&&(o=!1);const u=t.getBoundingClientRect();let a=p;e&&(i?s(i)&&(a=y(i)):a=y(t));const d=s(t)?n$1(t):window,h=!g()&&o,m=(u.left+(h&&null!=(r=null==(l=d.visualViewport)?void 0:l.offsetLeft)?r:0))/a.x,w=(u.top+(h&&null!=(c=null==(f=d.visualViewport)?void 0:f.offsetTop)?c:0))/a.y,x=u.width/a.x,v=u.height/a.y;return {width:x,height:v,top:w,right:m+x,bottom:w+v,left:m,x:m,y:w}}function x(t){return ((f(t)?t.ownerDocument:t.document)||window.document).documentElement}function v(t){return s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function b(t){return w(x(t)).left+v(t).scrollLeft}function L(t,e,n){const o=c(e),r=x(e),l=w(t,!0,"fixed"===n,e);let s={scrollLeft:0,scrollTop:0};const f={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==i(e)||a(r))&&(s=v(e)),c(e)){const t=w(e,!0);f.x=t.x+e.clientLeft,f.y=t.y+e.clientTop;}else r&&(f.x=b(r));return {x:l.left+s.scrollLeft-f.x,y:l.top+s.scrollTop-f.y,width:l.width,height:l.height}}function E(t){if("html"===i(t))return t;const e=t.assignedSlot||t.parentNode||(u(t)?t.host:null)||x(t);return u(e)?e.host:e}function R(t){return c(t)&&"fixed"!==o(t).position?t.offsetParent:null}function T(t){const e=n$1(t);let r=R(t);for(;r&&d(r)&&"static"===o(r).position;)r=R(r);return r&&("html"===i(r)||"body"===i(r)&&"static"===o(r).position&&!h(r))?e:r||function(t){let e=E(t);for(;c(e)&&!m(e);){if(h(e))return e;e=E(e);}return null}(t)||e}const W=Math.min,C=Math.max;function D(t){const e=E(t);return m(e)?t.ownerDocument.body:c(e)&&a(e)?e:D(e)}function F(t,e){var o;void 0===e&&(e=[]);const i=D(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=n$1(i);return r?e.concat(l,l.visualViewport||[],a(i)?i:[]):e.concat(i,F(i))}function A(e,i,r){return "viewport"===i?l$1(function(t,e){const o=n$1(t),i=x(t),r=o.visualViewport;let l=i.clientWidth,c=i.clientHeight,s=0,f=0;if(r){l=r.width,c=r.height;const t=g();(t||!t&&"fixed"===e)&&(s=r.offsetLeft,f=r.offsetTop);}return {width:l,height:c,x:s,y:f}}(e,r)):s(i)?function(t,e){const n=w(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=c(t)?y(t):{x:1,y:1},l=t.clientWidth*r.x,s=t.clientHeight*r.y,f=i*r.x,u=o*r.y;return {top:u,left:f,right:f+l,bottom:u+s,x:f,y:u,width:l,height:s}}(i,r):l$1(function(t){var e;const n=x(t),i=v(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=C(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=C(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let s=-i.scrollLeft+b(t);const f=-i.scrollTop;return "rtl"===o(r||n).direction&&(s+=C(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:s,y:f}}(x(e)))}const H={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:l}=t;const c="clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let r=F(t).filter((t=>s(t)&&"body"!==i(t))),l=null;const c="fixed"===o(t).position;let f=c?E(t):t;for(;s(f)&&!m(f);){const t=o(f),e=h(f);(c?e||l:e||"static"!==t.position||!l||!["absolute","fixed"].includes(l.position))?l=t:r=r.filter((t=>t!==f)),f=E(f);}return e.set(t,r),r}(e,this._c):[].concat(n),f=[...c,r],u=f[0],a=f.reduce(((t,n)=>{const o=A(e,n,l);return t.top=C(o.top,t.top),t.right=W(o.right,t.right),t.bottom=W(o.bottom,t.bottom),t.left=C(o.left,t.left),t}),A(e,u,l));return {width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const r=c(n),l=x(n);if(n===l)return e;let s={scrollLeft:0,scrollTop:0},f={x:1,y:1};const u={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==i(n)||a(l))&&(s=v(n)),c(n))){const t=w(n);f=y(n),u.x=t.x+n.clientLeft,u.y=t.y+n.clientTop;}return {width:e.width*f.x,height:e.height*f.y,x:e.x*f.x-s.scrollLeft*f.x+u.x,y:e.y*f.y-s.scrollTop*f.y+u.y}},isElement:s,getDimensions:function(t){if(c(t))return {width:t.offsetWidth,height:t.offsetHeight};const e=w(t);return {width:e.width,height:e.height}},getOffsetParent:T,getDocumentElement:x,getScale:y,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||T,r=this.getDimensions;return {reference:L(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===o(t).direction};const O=(t,n,o)=>{const i=new Map,r={platform:H,...o},l={...r.platform,_c:i};return o$1(t,n,{...r,platform:l})}; + function n$1(t){var e;return (null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function o(t){return n$1(t).getComputedStyle(t)}function i(t){return f(t)?(t.nodeName||"").toLowerCase():""}let r$1;function l(){if(r$1)return r$1;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(r$1=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),r$1):navigator.userAgent}function c(t){return t instanceof n$1(t).HTMLElement}function s(t){return t instanceof n$1(t).Element}function f(t){return t instanceof n$1(t).Node}function u(t){if("undefined"==typeof ShadowRoot)return !1;return t instanceof n$1(t).ShadowRoot||t instanceof ShadowRoot}function a(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=o(t);return /auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function d(t){return ["table","td","th"].includes(i(t))}function h(t){const e=/firefox/i.test(l()),n=o(t),i=n.backdropFilter||n.WebkitBackdropFilter;return "none"!==n.transform||"none"!==n.perspective||!!i&&"none"!==i||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function p(){return !/^((?!chrome|android).)*safari/i.test(l())}function g(t){return ["html","body","#document"].includes(i(t))}const m=Math.min,y=Math.max,x=Math.round;function w(t){const e=o(t);let n=parseFloat(e.width),i=parseFloat(e.height);const r=t.offsetWidth,l=t.offsetHeight,c=x(n)!==r||x(i)!==l;return c&&(n=r,i=l),{width:n,height:i,fallback:c}}function v(t){return s(t)?t:t.contextElement}const b={x:1,y:1};function L(t){const e=v(t);if(!c(e))return b;const n=e.getBoundingClientRect(),{width:o,height:i,fallback:r}=w(e);let l=(r?x(n.width):n.width)/o,s=(r?x(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}function E(t,e,o,i){var r,l;void 0===e&&(e=!1),void 0===o&&(o=!1);const c=t.getBoundingClientRect(),f=v(t);let u=b;e&&(i?s(i)&&(u=L(i)):u=L(t));const a=f?n$1(f):window,d=!p()&&o;let h=(c.left+(d&&(null==(r=a.visualViewport)?void 0:r.offsetLeft)||0))/u.x,g=(c.top+(d&&(null==(l=a.visualViewport)?void 0:l.offsetTop)||0))/u.y,m=c.width/u.x,y=c.height/u.y;if(f){const t=n$1(f),e=i&&s(i)?n$1(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=L(o),e=o.getBoundingClientRect(),i=getComputedStyle(o);e.x+=(o.clientLeft+parseFloat(i.paddingLeft))*t.x,e.y+=(o.clientTop+parseFloat(i.paddingTop))*t.y,h*=t.x,g*=t.y,m*=t.x,y*=t.y,h+=e.x,g+=e.y,o=n$1(o).frameElement;}}return {width:m,height:y,top:g,right:h+m,bottom:g+y,left:h,x:h,y:g}}function R(t){return ((f(t)?t.ownerDocument:t.document)||window.document).documentElement}function T(t){return s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function C(t){return E(R(t)).left+T(t).scrollLeft}function F(t,e,n){const o=c(e),r=R(e),l=E(t,!0,"fixed"===n,e);let s={scrollLeft:0,scrollTop:0};const f={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==i(e)||a(r))&&(s=T(e)),c(e)){const t=E(e,!0);f.x=t.x+e.clientLeft,f.y=t.y+e.clientTop;}else r&&(f.x=C(r));return {x:l.left+s.scrollLeft-f.x,y:l.top+s.scrollTop-f.y,width:l.width,height:l.height}}function W(t){if("html"===i(t))return t;const e=t.assignedSlot||t.parentNode||(u(t)?t.host:null)||R(t);return u(e)?e.host:e}function D(t){return c(t)&&"fixed"!==o(t).position?t.offsetParent:null}function S(t){const e=n$1(t);let r=D(t);for(;r&&d(r)&&"static"===o(r).position;)r=D(r);return r&&("html"===i(r)||"body"===i(r)&&"static"===o(r).position&&!h(r))?e:r||function(t){let e=W(t);for(;c(e)&&!g(e);){if(h(e))return e;e=W(e);}return null}(t)||e}function A(t){const e=W(t);return g(e)?t.ownerDocument.body:c(e)&&a(e)?e:A(e)}function H(t,e){var o;void 0===e&&(e=[]);const i=A(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=n$1(i);return r?e.concat(l,l.visualViewport||[],a(i)?i:[]):e.concat(i,H(i))}function O(e,i,r){return "viewport"===i?l$1(function(t,e){const o=n$1(t),i=R(t),r=o.visualViewport;let l=i.clientWidth,c=i.clientHeight,s=0,f=0;if(r){l=r.width,c=r.height;const t=p();(t||!t&&"fixed"===e)&&(s=r.offsetLeft,f=r.offsetTop);}return {width:l,height:c,x:s,y:f}}(e,r)):s(i)?function(t,e){const n=E(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=c(t)?L(t):{x:1,y:1},l=t.clientWidth*r.x,s=t.clientHeight*r.y,f=i*r.x,u=o*r.y;return {top:u,left:f,right:f+l,bottom:u+s,x:f,y:u,width:l,height:s}}(i,r):l$1(function(t){var e;const n=R(t),i=T(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=y(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=y(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let s=-i.scrollLeft+C(t);const f=-i.scrollTop;return "rtl"===o(r||n).direction&&(s+=y(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:s,y:f}}(R(e)))}const P={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:l}=t;const c="clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let r=H(t).filter((t=>s(t)&&"body"!==i(t))),l=null;const c="fixed"===o(t).position;let f=c?W(t):t;for(;s(f)&&!g(f);){const t=o(f),e=h(f);(c?e||l:e||"static"!==t.position||!l||!["absolute","fixed"].includes(l.position))?l=t:r=r.filter((t=>t!==f)),f=W(f);}return e.set(t,r),r}(e,this._c):[].concat(n),f=[...c,r],u=f[0],a=f.reduce(((t,n)=>{const o=O(e,n,l);return t.top=y(o.top,t.top),t.right=m(o.right,t.right),t.bottom=m(o.bottom,t.bottom),t.left=y(o.left,t.left),t}),O(e,u,l));return {width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const r=c(n),l=R(n);if(n===l)return e;let s={scrollLeft:0,scrollTop:0},f={x:1,y:1};const u={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==i(n)||a(l))&&(s=T(n)),c(n))){const t=E(n);f=L(n),u.x=t.x+n.clientLeft,u.y=t.y+n.clientTop;}return {width:e.width*f.x,height:e.height*f.y,x:e.x*f.x-s.scrollLeft*f.x+u.x,y:e.y*f.y-s.scrollTop*f.y+u.y}},isElement:s,getDimensions:function(t){return w(t)},getOffsetParent:S,getDocumentElement:R,getScale:L,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||S,r=this.getDimensions;return {reference:F(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===o(t).direction};const V=(t,n,o)=>{const i=new Map,r={platform:P,...o},l={...r.platform,_c:i};return r$2(t,n,{...r,platform:l})}; var e={"":["",""],_:["",""],"*":["",""],"~":["",""],"\n":["
    "]," ":["
    "],"-":["
    "]};function n(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function r(e){return (e+"").replace(/"/g,""").replace(//g,">")}function t(a,c){var o,l,g,s,p,u=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,m=[],h="",i=c||{},d=0;function f(n){var r=e[n[1]||""],t=m[m.length-1]==n;return r?r[1]?(t?m.pop():m.push(n),r[0|t]):r[0]:n}function $(){for(var e="";m.length;)e+=f(m[m.length-1]);return e}for(a=a.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(e,n,r){return i[n.toLowerCase()]=r,""}).replace(/^\n+|\n+$/g,"");g=u.exec(a);)l=a.substring(d,g.index),d=u.lastIndex,o=g[0],l.match(/[^\\](\\\\)*\\$/)||((p=g[3]||g[4])?o='
    "+n(r(p).replace(/^\n+|\n+$/g,""))+"
    ":(p=g[6])?(p.match(/\./)&&(g[5]=g[5].replace(/^\d+/gm,"")),s=t(n(g[5].replace(/^\s*[>*+.-]/gm,""))),">"==p?p="blockquote":(p=p.match(/\./)?"ol":"ul",s=s.replace(/^(.*)(\n|$)/gm,"
  • $1
  • ")),o="<"+p+">"+s+""):g[8]?o=''+r(g[7])+'':g[10]?(h=h.replace("
    ",''),o=$()+""):g[9]?o="":g[12]||g[14]?o="<"+(p="h"+(g[14]?g[14].length:g[13]>"="?1:2))+">"+t(g[12]||g[15],i)+"":g[16]?o=""+r(g[16])+"":(g[17]||g[1])&&(o=f(g[17]||"--"))),h+=l,h+=o;return (h+a.substring(d)+$()).replace(/^\n+|\n+$/g,"")} @@ -664,13 +664,13 @@ }; function positionTooltip(target, tooltipEl, arrowEl, context) { //context._options.root - O(target, tooltipEl, { + V(target, tooltipEl, { // placement: 'bottom-start', middleware: [ // flip(), v$1({ alignment: 'bottom-start' - }), T$1(function (props) { + }), O$1(function (props) { var side = props.placement.split("-")[0]; switch (side) { case "top": @@ -793,10 +793,12 @@ } var tooltip = this.tooltip = u$2("
    "); if (this.width) setStyle(tooltip, { - width: this.width + width: this.width + "px", + maxWidth: this.width + "px" }); if (this.height) setStyle(tooltip, { - height: this.height + height: this.height + "px", + maxHeight: this.height + "px" }); var tooltipinner = u$2("
    ")); var container = u$2("
    ");