/*! shepherd.js 6.0.0-beta.1 */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Shepherd=e()}(this,function(){"use strict";function t(t,e){for(var n=0;n1?n-1:0),i=1;i=l.top&&["left","right"].forEach(function(t){var e=l[t];e!==o&&e!==c||h.push(t)}),o<=l.right&&c>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];e!==n&&e!==a||h.push(t)});return this.all.push(this.getClass("abutted")),["left","top","right","bottom"].forEach(function(t){e.all.push(e.getClass("abutted")+"-"+t)}),h.length&&this.add.push(this.getClass("abutted")),h.forEach(function(t){e.add.push(e.getClass("abutted")+"-"+t)}),O(function(){!1!==e.options.addTargetClasses&&w(e.target,e.add,e.all),w(e.element,e.add,e.all)}),!0}},H=["left","top","right","bottom"];var B={position:function(t){var e=this,n=t.top,o=t.left,i=t.targetAttachment;if(!this.options.constraints)return!0;var s=this.cache("element-bounds",function(){return L(e.element)}),r=s.height,l=s.width;if(0===l&&0===r&&!P(this.lastSize)){var a=this.lastSize;l=a.width,r=a.height}var c=this.cache("target-bounds",function(){return e.getTargetBounds()}),h=c.height,f=c.width,p=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,n=t.pinnedClass;e&&p.push(e),n&&p.push(n)}),p.forEach(function(t){["left","top","right","bottom"].forEach(function(e){p.push(t+"-"+e)})});var u=[],d=C({},i),g=C({},this.attachment);return this.options.constraints.forEach(function(t){var s,a,c=t.to,p=t.attachment,m=t.pin;if(P(p)&&(p=""),p.indexOf(" ")>=0){var v=p.split(" ");a=v[0],s=v[1]}else s=a=p;var b=function(t,e){if("scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),!P(e.nodeType)){var n=e,o=L(e),i=o,s=getComputedStyle(e);if(e=[i.left,i.top,o.width+i.left,o.height+i.top],n.ownerDocument!==document){var r=n.ownerDocument.defaultView;e[0]+=r.pageXOffset,e[1]+=r.pageYOffset,e[2]+=r.pageXOffset,e[3]+=r.pageYOffset}H.forEach(function(t,n){"Top"===(t=t[0].toUpperCase()+t.substr(1))||"Left"===t?e[n]+=parseFloat(s["border"+t+"Width"]):e[n]-=parseFloat(s["border"+t+"Width"])})}return e}(e,c);"target"!==a&&"both"!==a||(nb[3]&&"bottom"===d.top&&(n-=h,d.top="top")),"together"===a&&("top"===d.top&&("bottom"===g.top&&nb[3]&&n-(r-h)>=b[1]&&(n-=r-h,d.top="bottom",g.top="bottom")),"bottom"===d.top&&("top"===g.top&&n+r>b[3]?(n-=h,d.top="top",n-=r,g.top="bottom"):"bottom"===g.top&&nb[3]&&"top"===g.top?(n-=r,g.top="bottom"):nb[2]&&"right"===d.left&&(o-=f,d.left="left")),"together"===s&&(ob[2]&&"right"===d.left?"left"===g.left?(o-=f,d.left="left",o-=l,g.left="right"):"right"===g.left&&(o-=f,d.left="left",o+=l,g.left="left"):"center"===d.left&&(o+l>b[2]&&"left"===g.left?(o-=l,g.left="right"):ob[3]&&"top"===g.top&&(n-=r,g.top="bottom")),"element"!==s&&"both"!==s||(ob[2]&&("left"===g.left?(o-=l,g.left="right"):"center"===g.left&&(o-=l/2,g.left="right"))),S(m)?m=m.split(",").map(function(t){return t.trim()}):!0===m&&(m=["top","left","right","bottom"]),m=m||[];var y,w,x=[],O=[];(n=0?(n=b[1],x.push("top")):O.push("top")),n+r>b[3]&&(m.indexOf("bottom")>=0?(n=b[3]-r,x.push("bottom")):O.push("bottom")),o=0?(o=b[0],x.push("left")):O.push("left")),o+l>b[2]&&(m.indexOf("right")>=0?(o=b[2]-l,x.push("right")):O.push("right")),x.length)&&(y=P(e.options.pinnedClass)?e.getClass("pinned"):e.options.pinnedClass,u.push(y),x.forEach(function(t){u.push(y+"-"+t)}));O.length&&(w=P(e.options.outOfBoundsClass)?e.getClass("out-of-bounds"):e.options.outOfBoundsClass,u.push(w),O.forEach(function(t){u.push(w+"-"+t)}));(x.indexOf("left")>=0||x.indexOf("right")>=0)&&(g.left=d.left=!1),(x.indexOf("top")>=0||x.indexOf("bottom")>=0)&&(g.top=d.top=!1),d.top===i.top&&d.left===i.left&&g.top===e.attachment.top&&g.left===e.attachment.left||(e.updateAttachClasses(g,d),e.trigger("update",{attachment:g,targetAttachment:d}))}),O(function(){!1!==e.options.addTargetClasses&&w(e.target,u,p),w(e.element,u,p)}),{top:n,left:o}}},Y={position:function(t){var e=t.top,n=t.left;if(this.options.shift){var o,i,s=this.options.shift;if("function"==typeof s&&(s=s.call(this,{top:e,left:n})),S(s)){(s=s.split(" "))[1]=s[1]||s[0];var r=s;o=r[0],i=r[1],o=parseFloat(o,10),i=parseFloat(i,10)}else{var l=[s.top,s.left];o=l[0],i=l[1]}return{top:e+=o,left:n+=i}}}},j=function(){function t(){}var e=t.prototype;return e.on=function(t,e,n,o){return void 0===o&&(o=!1),P(this.bindings)&&(this.bindings={}),P(this.bindings[t])&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:n,once:o}),this},e.once=function(t,e,n){return this.on(t,e,n,!0)},e.off=function(t,e){if(P(this.bindings)||P(this.bindings[t]))return this;if(P(e))delete this.bindings[t];else for(var n=0;n1?n-1:0),i=1;i16)return U=Math.min(U-16,250),void(G=setTimeout(t,250));!P(K)&&nt()-K<10||(null!=G&&(clearTimeout(G),G=null),K=nt(),et(),U=nt()-K)},P(window)||P(window.addEventListener)||["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,J)});var ot=function(t){var e,n;function o(e){var n;return(n=t.call(this)||this).position=n.position.bind(v(n)),tt.push(v(n)),n.history=[],n.setOptions(e,!1),Z.modules.forEach(function(t){P(t.initialize)||t.initialize.call(v(n))}),n.position(),n}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=o.prototype;return i.getClass=function(t){void 0===t&&(t="");var e=this.options.classes;return P(e)||P(e[t])?this.options.classPrefix?this.options.classPrefix+"-"+t:t:!1===e[t]?"":this.options.classes[t]},i.setOptions=function(t,e){var n=this;void 0===e&&(e=!0);this.options=C({offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},t);var o=this.options,i=o.element,s=o.target,r=o.targetModifier;if(this.element=i,this.target=s,this.targetModifier=r,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if(P(n[t]))throw new Error("Tether Error: Both element and target must be defined");P(n[t].jquery)?S(n[t])&&(n[t]=document.querySelector(n[t])):n[t]=n[t][0]}),this._addClasses(),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=V(this.options.targetAttachment),this.attachment=V(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),P(this.scrollParents)||this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=function(t){var e=(getComputedStyle(t)||{}).position,n=[];if("fixed"===e)return[t];for(var o=t;(o=o.parentNode)&&o&&1===o.nodeType;){var i=void 0;try{i=getComputedStyle(o)}catch(t){}if(P(i)||null===i)return n.push(o),n;var s=i,r=s.overflow,l=s.overflowX,a=s.overflowY;/(auto|scroll|overlay)/.test(r+a+l)&&("absolute"!==e||["relative","absolute","fixed"].indexOf(i.position)>=0)&&n.push(o)}return n.push(t.ownerDocument.body),t.ownerDocument!==document&&n.push(t.ownerDocument.defaultView),n}(this.target),!1!==this.options.enabled&&this.enable(e)},i.getTargetBounds=function(){if(P(this.targetModifier))return L(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=L(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.topo.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body)&&(s=15);var r=n.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,l={width:15,height:.975*r*(r/o.scrollHeight),left:n.left+n.width-parseFloat(i.borderLeftWidth)-15},a=0;r<408&&this.target===document.body&&(a=-11e-5*Math.pow(r,2)-.00727*r+22.58),this.target!==document.body&&(l.height=Math.max(l.height,24));var c=this.target.scrollTop/(o.scrollHeight-r);return l.top=c*(r-l.height-a)+n.top+parseFloat(i.borderTopWidth),this.target===document.body&&(l.height=Math.max(l.height,24)),l}},i.clearCache=function(){this._cache={}},i.cache=function(t,e){return P(this._cache)&&(this._cache={}),P(this._cache[t])&&(this._cache[t]=e.call(this)),this._cache[t]},i.enable=function(t){var e=this;void 0===t&&(t=!0),!1!==this.options.addTargetClasses&&b(this.target,this.getClass("enabled")),b(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(t){t!==e.target.ownerDocument&&t.addEventListener("scroll",e.position)}),t&&this.position()},i.disable=function(){var t=this;y(this.target,this.getClass("enabled")),y(this.element,this.getClass("enabled")),this.enabled=!1,P(this.scrollParents)||this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})},i.destroy=function(){var t=this;this.disable(),this._removeClasses(),tt.forEach(function(e,n){e===t&&tt.splice(n,1)}),0===tt.length&&(A&&document.body.removeChild(A),A=null)},i.updateAttachClasses=function(t,e){var n=this;t=t||this.attachment,e=e||this.targetAttachment;!P(this._addAttachClasses)&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),P(this._addAttachClasses)&&(this._addAttachClasses=[]),this.add=this._addAttachClasses,t.top&&this.add.push(this.getClass("element-attached")+"-"+t.top),t.left&&this.add.push(this.getClass("element-attached")+"-"+t.left),e.top&&this.add.push(this.getClass("target-attached")+"-"+e.top),e.left&&this.add.push(this.getClass("target-attached")+"-"+e.left),this.all=[],["left","top","bottom","right","middle","center"].forEach(function(t){n.all.push(n.getClass("element-attached")+"-"+t),n.all.push(n.getClass("target-attached")+"-"+t)}),O(function(){P(n._addAttachClasses)||(w(n.element,n._addAttachClasses,n.all),!1!==n.options.addTargetClasses&&w(n.target,n._addAttachClasses,n.all),delete n._addAttachClasses)})},i.position=function(t){var e=this;if(void 0===t&&(t=!0),this.enabled){this.clearCache();var n=function(t,e){var n=t.left,o=t.top;return"auto"===n&&(n=W[e.left]),"auto"===o&&(o=X[e.top]),{left:n,top:o}}(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var o=this.cache("element-bounds",function(){return L(e.element)}),i=o.width,s=o.height;if(0!==i||0!==s||P(this.lastSize))this.lastSize={width:i,height:s};else{var r=this.lastSize;i=r.width,s=r.height}var l=this.cache("target-bounds",function(){return e.getTargetBounds()}),a=l,c=R(N(this.attachment),{width:i,height:s}),h=R(N(n),a),f=R(this.offset,{width:i,height:s}),p=R(this.targetOffset,a);c=z(c,f),h=z(h,p);for(var u=l.left+h.left-c.left,d=l.top+h.top-c.top,g=0;gy.documentElement.clientHeight&&(v=this.cache("scrollbar-size",$),b.viewport.bottom-=v.height),w.innerWidth>y.documentElement.clientWidth&&(v=this.cache("scrollbar-size",$),b.viewport.right-=v.width),-1!==["","static"].indexOf(y.body.style.position)&&-1!==["","static"].indexOf(y.body.parentElement.style.position)||(b.page.bottom=y.body.scrollHeight-d-s,b.page.right=y.body.scrollWidth-u-i),!P(this.options.optimizations)&&!1!==this.options.optimizations.moveElement&&P(this.targetModifier)){var x=this.cache("target-offsetparent",function(){return q(e.target)}),O=this.cache("target-offsetparent-bounds",function(){return L(x)}),I=getComputedStyle(x),C=O,_={};if(["Top","Left","Bottom","Right"].forEach(function(t){_[t.toLowerCase()]=parseFloat(I["border"+t+"Width"])}),O.right=y.body.scrollWidth-O.left-C.width+_.right,O.bottom=y.body.scrollHeight-O.top-C.height+_.bottom,b.page.top>=O.top+_.top&&b.page.bottom>=O.bottom&&b.page.left>=O.left+_.left&&b.page.right>=O.right){var T=x.scrollLeft,S=x.scrollTop;b.offset={top:b.page.top-O.top+S-_.top,left:b.page.left-O.left+T-_.left}}}return this.move(b),this.history.unshift(b),this.history.length>3&&this.history.pop(),t&&E(),!0}},i.move=function(t){var e=this;if(!P(this.element.parentNode)){var n,o,i,s={};for(var r in t)for(var l in s[r]={},t[r]){for(var a=!1,c=0;c=o&&o>=n-i))){a=!0;break}}a||(s[r][l]=!0)}var f={top:"",left:"",right:"",bottom:""},p=function(t,n){var o,i;!1!==(!P(e.options.optimizations)?e.options.optimizations.gpu:null)?(t.top?(f.top=0,o=n.top):(f.bottom=0,o=-n.bottom),t.left?(f.left=0,i=n.left):(f.right=0,i=-n.right),"number"==typeof window.devicePixelRatio&&devicePixelRatio%1==0&&(i=Math.round(i*devicePixelRatio)/devicePixelRatio,o=Math.round(o*devicePixelRatio)/devicePixelRatio),f[Q]="translateX("+i+"px) translateY("+o+"px)","msTransform"!==Q&&(f[Q]+=" translateZ(0)")):(t.top?f.top=n.top+"px":f.bottom=n.bottom+"px",t.left?f.left=n.left+"px":f.right=n.right+"px")},u=!0;!P(this.options.optimizations)&&!1===this.options.optimizations.allowPositionFixed&&(u=!1);var d,g,m=!1;if((s.page.top||s.page.bottom)&&(s.page.left||s.page.right))f.position="absolute",p(s.page,t.page);else if(u&&(s.viewport.top||s.viewport.bottom)&&(s.viewport.left||s.viewport.right))f.position="fixed",p(s.viewport,t.viewport);else if(!P(s.offset)&&s.offset.top&&s.offset.left){f.position="absolute";var v=this.cache("target-offsetparent",function(){return q(e.target)});q(this.element)!==v&&O(function(){e.element.parentNode.removeChild(e.element),v.appendChild(e.element)}),p(s.offset,t.offset),m=!0}else f.position="absolute",p({top:!0,left:!0},t.page);if(!m)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var b=!0,y=this.element.parentNode;y&&1===y.nodeType&&"BODY"!==y.tagName&&(g=void 0,((g=(d=y).ownerDocument).fullscreenElement||g.webkitFullscreenElement||g.mozFullScreenElement||g.msFullscreenElement)!==d);){if("static"!==getComputedStyle(y).position){b=!1;break}y=y.parentNode}b||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var w={},x=!1;for(var E in f){var I=f[E];this.element.style[E]!==I&&(x=!0,w[E]=I)}x&&O(function(){C(e.element.style,w),e.trigger("repositioned")})}},i._addClasses=function(){b(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&b(this.target,this.getClass("target"))},i._removeClasses=function(){var t=this;y(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&y(this.target,this.getClass("target")),this.all.forEach(function(e){t.element.classList.remove(e),t.target.classList.remove(e)})},o}(j);ot.modules=[],Z.position=et;var it=C(ot,Z);it.modules.push({initialize:function(){var t=this;this.markers={},["target","element"].forEach(function(e){var n=document.createElement("div");n.className=t.getClass(e+"-marker");var o=document.createElement("div");o.className=t.getClass("marker-dot"),n.appendChild(o),t[e].appendChild(n),t.markers[e]={dot:o,el:n}})},position:function(t){var e={element:t.manualOffset,target:t.manualTargetOffset};for(var n in e){var o=e[n];for(var i in o){var s=o[i];(!S(s)||-1===s.indexOf("%")&&-1===s.indexOf("px"))&&(s+="px"),this.markers[n].dot.style[i]!==s&&(this.markers[n].dot.style[i]=s)}}return!0}});var st,rt={bottom:"top center","bottom center":"top center","bottom left":"top right","bottom right":"top left",center:"middle center",left:"middle right",middle:"middle center","middle center":"middle center","middle left":"middle right","middle right":"middle left",right:"middle left",top:"bottom center","top center":"bottom center","top left":"bottom right","top right":"bottom left"};function lt(t){return d(t)&&""!==t?"-"!==t.charAt(t.length-1)?t+"-":t:""}function at(t){var e=t.options.attachTo||{},n=Object.assign({},e);if(d(e.element)){try{n.element=document.querySelector(e.element)}catch(t){}n.element||console.error("The element for this Shepherd step was not found "+e.element)}return n}function ct(t){t.tooltip&&t.tooltip.destroy();var e=at(t),o=function(t,e){var o={classPrefix:"shepherd",constraints:[{to:"scrollParent",attachment:"together",pin:["left","right","top"]},{to:"window",attachment:"together"}]},i=document.body;t.element&&t.on?(o.attachment=rt[t.on]||rt.right,i=t.element):(o.attachment="middle center",o.targetModifier="visible");o.element=e.el,o.target=i,e.options.tetherOptions&&(e.options.tetherOptions.constraints&&(o.constraints=e.options.tetherOptions.constraints),o.classes=n({},o.classes,{},e.options.tetherOptions.classes),o.optimizations=n({},o.optimizations,{},e.options.tetherOptions.optimizations),o=n({},o,{},e.options.tetherOptions));return o}(e,t);t.tooltip=new it(o),t.target=e.element}function ht(){var t=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)})}function ft(){}function pt(t,e){for(var n in e)t[n]=e[n];return t}function ut(t){return t()}function dt(){return Object.create(null)}function gt(t){t.forEach(ut)}function mt(t){return"function"==typeof t}function vt(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function bt(t,e){t.appendChild(e)}function yt(t,e,n){t.insertBefore(e,n||null)}function wt(t){t.parentNode.removeChild(t)}function xt(t){return document.createElement(t)}function Ot(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Et(t){return document.createTextNode(t)}function It(){return Et(" ")}function Ct(t,e,n,o){return t.addEventListener(e,n,o),function(){return t.removeEventListener(e,n,o)}}function $t(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function _t(t,e){for(var n in e)"style"===n?t.style.cssText=e[n]:n in t?t[n]=e[n]:$t(t,n,e[n])}function Tt(t){st=t}function St(){if(!st)throw new Error("Function called outside component initialization");return st}function Pt(t){St().$$.after_update.push(t)}var Mt=[],At=[],Lt=[],Ft=[],kt=Promise.resolve(),Ht=!1;function Bt(t){Lt.push(t)}function Yt(){var t=new Set;do{for(;Mt.length;){var e=Mt.shift();Tt(e),jt(e.$$)}for(;At.length;)At.pop()();for(var n=0;n1?1:a,n=.5*(1-Math.cos(Math.PI*l)),o=e.startX+(e.x-e.startX)*n,s=e.startY+(e.y-e.startY)*n,e.method.call(e.scrollable,o,s),o===e.x&&s===e.y||t.requestAnimationFrame(u.bind(t,e))}function d(n,o,i){var l,c,h,f,p=r();n===e.body?(l=t,c=t.scrollX||t.pageXOffset,h=t.scrollY||t.pageYOffset,f=s.scroll):(l=n,c=n.scrollLeft,h=n.scrollTop,f=a),u({scrollable:l,method:f,startTime:p,startX:c,startY:h,x:o,y:i})}}}}()}(Me={exports:{}},Me.exports),Me.exports);Ae.polyfill;Ae.polyfill();var Le=function(t){function e(e,n){var o;return void 0===n&&(n={}),(o=t.call(this,e,n)||this).tour=e,o.classPrefix=o.tour.options?lt(o.tour.options.classPrefix):"",o.styles=e.styles,f(a(o)),o._setOptions(n),a(o)||a(o)}o(e,t);var n=e.prototype;return n.cancel=function(){this.tour.cancel(),this.trigger("cancel")},n.complete=function(){this.tour.complete(),this.trigger("complete")},n.destroy=function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null),p(this.el)&&this.el.parentNode&&(this.el.parentNode.removeChild(this.el),this.el=null),this.target&&this._updateStepTargetOnHide(),this.trigger("destroy")},n.getTour=function(){return this.tour},n.hide=function(){this.tour.modal.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this.target&&this._updateStepTargetOnHide(),this.trigger("hide")},n.isOpen=function(){return Boolean(this.el&&!this.el.hidden)},n.show=function(){var t=this;if(u(this.options.beforeShowPromise)){var e=this.options.beforeShowPromise();if(!g(e))return e.then(function(){return t._show()})}this._show()},n.updateStepOptions=function(t){Object.assign(this.options,t),this.shepherdElementComponent&&this.shepherdElementComponent.$set({step:this})},n._createTooltipContent=function(){var t=this.options.classes||"",e=this.id+"-description",n=this.id+"-label";return this.shepherdElementComponent=new Pe({target:document.body,props:{classPrefix:this.classPrefix,classes:t,descriptionId:e,labelId:n,step:this,styles:this.styles}}),this.shepherdElementComponent.getElement()},n._scrollTo=function(t){var e=at(this).element;u(this.options.scrollToHandler)?this.options.scrollToHandler(e):p(e)&&e.scrollIntoView(t)},n._getClassOptions=function(t){var e=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,n=t.classes?t.classes:"",o=e&&e.classes?e.classes:"",i=[].concat(n.split(" "),o.split(" ")),s=new Set(i);return Array.from(s).join(" ").trim()},n._setOptions=function(t){var e=this;void 0===t&&(t={});var n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;this.options=Object.assign({arrow:!0},n,t);var o=this.options.when;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||"step-"+ht(),o&&Object.keys(o).forEach(function(t){e.on(t,o[t],e)})},n._setupElements=function(){g(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&m(this),ct(this)},n._show=function(){var t=this;this.trigger("before-show"),this._setupElements(),this.tour.modal.setupForStep(this),this._styleTargetElementForStep(this),this.el.hidden=!1,this.tooltip.position(),(this.target||document.body).classList.add(this.classPrefix+"shepherd-enabled",this.classPrefix+"shepherd-target"),this.options.scrollTo&&setTimeout(function(){t._scrollTo(t.options.scrollTo)}),this.trigger("show"),this.el.focus()},n._styleTargetElementForStep=function(t){var e=t.target;e&&(t.options.highlightClass&&e.classList.add(t.options.highlightClass),!1===t.options.canClickTarget&&e.classList.add("shepherd-target-click-disabled"))},n._updateStepTargetOnHide=function(){this.options.highlightClass&&this.target.classList.remove(this.options.highlightClass),this.target.classList.remove(this.classPrefix+"shepherd-enabled",this.classPrefix+"shepherd-target")},e}(h);function Fe(t){var e,n,o,i,s;return{c:function(){e=Ot("svg"),$t(n=Ot("path"),"d",o="M "+t.openingProperties.x+" "+t.openingProperties.y+" H "+(t.openingProperties.width+t.openingProperties.x)+" V "+(t.openingProperties.height+t.openingProperties.y)+" H "+t.openingProperties.x+" L "+t.openingProperties.x+" 0 Z M 0 0 H "+t.window.innerWidth+" V "+t.window.innerHeight+" H 0 L 0 0 Z"),$t(e,"class",i=(t.modalIsVisible?"shepherd-modal-is-visible":"")+" shepherd-modal-overlay-container"),s=Ct(e,"touchmove",t._preventModalOverlayTouch)},m:function(o,i){yt(o,e,i),bt(e,n),t.svg_binding(e)},p:function(t,s){t.openingProperties&&o!==(o="M "+s.openingProperties.x+" "+s.openingProperties.y+" H "+(s.openingProperties.width+s.openingProperties.x)+" V "+(s.openingProperties.height+s.openingProperties.y)+" H "+s.openingProperties.x+" L "+s.openingProperties.x+" 0 Z M 0 0 H "+s.window.innerWidth+" V "+s.window.innerHeight+" H 0 L 0 0 Z")&&$t(n,"d",o),t.modalIsVisible&&i!==(i=(s.modalIsVisible?"shepherd-modal-is-visible":"")+" shepherd-modal-overlay-container")&&$t(e,"class",i)},i:ft,o:ft,d:function(n){n&&wt(e),t.svg_binding(null),s()}}}function ke(t,e,n){var o=e.element,i=e.openingProperties,s=(ht(),!1),r=void 0;l();function l(){n("openingProperties",i={height:0,x:0,y:0,width:0})}function a(){n("modalIsVisible",s=!1),p()}function c(t,e,o){if(void 0===o&&(o=0),t.getBoundingClientRect){var s=function(t,e){var n=t.getBoundingClientRect(),o=n.y||n.top,i=n.bottom||o+n.height;if(e){var s=e.getBoundingClientRect(),r=s.y||s.top,l=s.bottom||r+s.height;o=Math.max(o,r),i=Math.min(i,l)}return{y:o,height:Math.max(i-o,0)}}(t,e),r=s.y,l=s.height,a=t.getBoundingClientRect(),c=a.x,h=a.width,f=a.left;n("openingProperties",i={x:(c||f)-o,y:r-o,width:h+2*o,height:l+2*o})}}function h(){n("modalIsVisible",s=!0)}var f=function(t){t.preventDefault()};function p(){r&&(cancelAnimationFrame(r),r=void 0),window.removeEventListener("touchmove",f,{passive:!1})}return t.$set=function(t){"element"in t&&n("element",o=t.element),"openingProperties"in t&&n("openingProperties",i=t.openingProperties)},{element:o,openingProperties:i,modalIsVisible:s,getElement:function(){return o},closeModalOpening:l,hide:a,positionModalOpening:c,setupForStep:function(t){p(),t.tour.options.useModalOverlay?(function(t){var e=t.options.modalOverlayOpeningPadding;if(t.target){var n=function t(e){if(!e)return null;var n=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return"hidden"!==n&&"visible"!==n&&e.scrollHeight>=e.clientHeight?e:t(e.parentElement)}(t.target);!function o(){r=void 0,c(t.target,n,e),r=requestAnimationFrame(o)}(),window.addEventListener("touchmove",f,{passive:!1})}else l()}(t),h()):a()},show:h,_preventModalOverlayTouch:function(t){t.stopPropagation()},window:window,svg_binding:function(t){At[t?"unshift":"push"](function(){n("element",o=t)})}}}var He=function(t){function n(e){var n;return Kt(a(n=t.call(this)||this),e,ke,Fe,vt,["element","openingProperties","getElement","closeModalOpening","hide","positionModalOpening","setupForStep","show"]),n}return o(n,t),e(n,[{key:"getElement",get:function(){return this.$$.ctx.getElement}},{key:"closeModalOpening",get:function(){return this.$$.ctx.closeModalOpening}},{key:"hide",get:function(){return this.$$.ctx.hide}},{key:"positionModalOpening",get:function(){return this.$$.ctx.positionModalOpening}},{key:"setupForStep",get:function(){return this.$$.ctx.setupForStep}},{key:"show",get:function(){return this.$$.ctx.show}}]),n}(Ut),Be=new h,Ye=function(t){function e(e){var n;void 0===e&&(e={}),f(a(n=t.call(this,e)||this));n.options=Object.assign({},{exitOnEsc:!0,keyboardNavigation:!0},e),n.classPrefix=lt(n.options.classPrefix),n.steps=[],n.addSteps(n.options.steps);return["active","cancel","complete","inactive","show","start"].map(function(t){var e;e=t,n.on(e,function(t){(t=t||{}).tour=a(n),Be.trigger(e,t)})}),n.modal=new He({target:e.modalContainer||document.body,props:{classPrefix:n.classPrefix,styles:n.styles}}),n._setTourID(),a(n)||a(n)}o(e,t);var n=e.prototype;return n.addStep=function(t){var e=t;return e instanceof Le?e.tour=this:e=new Le(this,e),this.steps.push(e),e},n.addSteps=function(t){var e=this;return Array.isArray(t)&&t.forEach(function(t){e.addStep(t)}),this},n.back=function(){var t=this.steps.indexOf(this.currentStep);this.show(t-1,!1)},n.cancel=function(){if(this.options.confirmCancel){var t=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";window.confirm(t)&&this._done("cancel")}else this._done("cancel")},n.complete=function(){this._done("complete")},n.getById=function(t){return this.steps.find(function(e){return e.id===t})},n.getCurrentStep=function(){return this.currentStep},n.hide=function(){var t=this.getCurrentStep();if(t)return t.hide()},n.isActive=function(){return Be.activeTour===this},n.next=function(){var t=this.steps.indexOf(this.currentStep);t===this.steps.length-1?this.complete():this.show(t+1,!0)},n.removeStep=function(t){var e=this,n=this.getCurrentStep();this.steps.some(function(n,o){if(n.id===t)return n.isOpen()&&n.hide(),n.destroy(),e.steps.splice(o,1),!0}),n&&n.id===t&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())},n.show=function(t,e){void 0===t&&(t=0),void 0===e&&(e=!0);var n=d(t)?this.getById(t):this.steps[t];n&&(this._updateStateBeforeShow(),u(n.options.showOn)&&!n.options.showOn()?this._skipStep(n,e):(this.trigger("show",{step:n,previous:this.currentStep}),this.currentStep=n,n.show()))},n.start=function(){this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this._setupActiveTour(),this.next()},n._done=function(t){var e,n=this.steps.indexOf(this.currentStep);Array.isArray(this.steps)&&this.steps.forEach(function(t){return t.destroy()}),(e=this)&&e.steps.forEach(function(t){t.options&&!1===t.options.canClickTarget&&t.options.attachTo&&t.target instanceof HTMLElement&&t.target.classList.remove("shepherd-target-click-disabled")}),this.trigger(t,{index:n}),Be.activeTour=null,this.trigger("inactive",{tour:this}),this.modal.hide(),p(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()},n._setupActiveTour=function(){this.trigger("active",{tour:this}),Be.activeTour=this},n._skipStep=function(t,e){var n=this.steps.indexOf(t),o=e?n+1:n-1;this.show(o,e)},n._updateStateBeforeShow=function(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()},n._setTourID=function(){var t=this.options.tourName||"tour";this.id=t+"--"+ht()},e}(h);return Object.assign(Be,{Tour:Ye,Step:Le}),Be});