UNPKG

@asicupv/paella-extra-plugins

Version:
1 lines 54.1 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*! shepherd.js 14.5.0 */function cn(e){return e instanceof Element}function xe(e){return e instanceof HTMLElement}function ie(e){return typeof e=="function"}function Pe(e){return typeof e=="string"}function I(e){return e===void 0}class tt{on(t,n,i,o=!1){var s;return I(this.bindings)&&(this.bindings={}),I(this.bindings[t])&&(this.bindings[t]=[]),(s=this.bindings[t])==null||s.push({handler:n,ctx:i,once:o}),this}once(t,n,i){return this.on(t,n,i,!0)}off(t,n){if(I(this.bindings)||I(this.bindings[t]))return this;if(I(n))delete this.bindings[t];else{var i;(i=this.bindings[t])==null||i.forEach((o,s)=>{if(o.handler===n){var r;(r=this.bindings[t])==null||r.splice(s,1)}})}return this}trigger(t,...n){if(!I(this.bindings)&&this.bindings[t]){var i;(i=this.bindings[t])==null||i.forEach((o,s)=>{const{ctx:r,handler:l,once:c}=o,a=r||this;if(l.apply(a,n),c){var d;(d=this.bindings[t])==null||d.splice(s,1)}})}return this}}function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},k.apply(null,arguments)}function nt(e,t){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.includes(i))continue;n[i]=e[i]}return n}const se={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};se.defaultMerge;function an(e,t){return t}function fn(e,t){return e.filter(n=>n!==void 0)}var gt;(function(e){e[e.NOT=0]="NOT",e[e.RECORD=1]="RECORD",e[e.ARRAY=2]="ARRAY",e[e.SET=3]="SET",e[e.MAP=4]="MAP",e[e.OTHER=5]="OTHER"})(gt||(gt={}));function mt(e){return typeof e!="object"||e===null?0:Array.isArray(e)?2:hn(e)?1:e instanceof Set?3:e instanceof Map?4:5}function un(e){const t=new Set;for(const n of e)for(const i of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(i);return t}function dn(e,t){return typeof e=="object"&&Object.prototype.propertyIsEnumerable.call(e,t)}function Nt(e){return{*[Symbol.iterator](){for(const t of e)for(const n of t)yield n}}}const bt=new Set(["[object Object]","[object Module]"]);function hn(e){if(!bt.has(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(t===void 0)return!0;const n=t.prototype;return!(n===null||typeof n!="object"||!bt.has(Object.prototype.toString.call(n))||!n.hasOwnProperty("isPrototypeOf"))}function pn(e,t,n){const i={};for(const o of un(e)){const s=[];for(const c of e)dn(c,o)&&s.push(c[o]);if(s.length===0)continue;const r=t.metaDataUpdater(n,{key:o,parents:e}),l=Vt(s,t,r);l!==se.skip&&(o==="__proto__"?Object.defineProperty(i,o,{value:l,configurable:!0,enumerable:!0,writable:!0}):i[o]=l)}return i}function gn(e){return e.flat()}function mn(e){return new Set(Nt(e))}function bn(e){return new Map(Nt(e))}function wn(e){return e.at(-1)}const Fe={mergeRecords:pn,mergeArrays:gn,mergeSets:mn,mergeMaps:bn,mergeOthers:wn};function it(...e){return yn({})(...e)}function yn(e,t){const n=_n(e,i);function i(...o){return Vt(o,n,t)}return i}function _n(e,t){var n,i,o;return{defaultMergeFunctions:Fe,mergeFunctions:k({},Fe,Object.fromEntries(Object.entries(e).filter(([s,r])=>Object.hasOwn(Fe,s)).map(([s,r])=>r===!1?[s,Fe.mergeOthers]:[s,r]))),metaDataUpdater:(n=e.metaDataUpdater)!=null?n:an,deepmerge:t,useImplicitDefaultMerging:(i=e.enableImplicitDefaultMerging)!=null?i:!1,filterValues:e.filterValues===!1?void 0:(o=e.filterValues)!=null?o:fn,actions:se}}function Vt(e,t,n){var i;const o=(i=t.filterValues==null?void 0:t.filterValues(e,n))!=null?i:e;if(o.length===0)return;if(o.length===1)return qe(o,t,n);const s=mt(o[0]);if(s!==0&&s!==5){for(let r=1;r<o.length;r++)if(mt(o[r])!==s)return qe(o,t,n)}switch(s){case 1:return vn(o,t,n);case 2:return xn(o,t,n);case 3:return En(o,t,n);case 4:return On(o,t,n);default:return qe(o,t,n)}}function vn(e,t,n){const i=t.mergeFunctions.mergeRecords(e,t,n);return i===se.defaultMerge||t.useImplicitDefaultMerging&&i===void 0&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords?t.defaultMergeFunctions.mergeRecords(e,t,n):i}function xn(e,t,n){const i=t.mergeFunctions.mergeArrays(e,t,n);return i===se.defaultMerge||t.useImplicitDefaultMerging&&i===void 0&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays?t.defaultMergeFunctions.mergeArrays(e):i}function En(e,t,n){const i=t.mergeFunctions.mergeSets(e,t,n);return i===se.defaultMerge||t.useImplicitDefaultMerging&&i===void 0&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets?t.defaultMergeFunctions.mergeSets(e):i}function On(e,t,n){const i=t.mergeFunctions.mergeMaps(e,t,n);return i===se.defaultMerge||t.useImplicitDefaultMerging&&i===void 0&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps?t.defaultMergeFunctions.mergeMaps(e):i}function qe(e,t,n){const i=t.mergeFunctions.mergeOthers(e,t,n);return i===se.defaultMerge||t.useImplicitDefaultMerging&&i===void 0&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):i}function ot(e){const t=Object.getOwnPropertyNames(e.constructor.prototype);for(let n=0;n<t.length;n++){const i=t[n],o=e[i];i!=="constructor"&&typeof o=="function"&&(e[i]=o.bind(e))}return e}function Sn(e,t){return n=>{if(e.isOpen()){const i=e.el&&n.currentTarget===e.el;(!I(t)&&n.currentTarget.matches(t)||i)&&e.tour.next()}}}function An(e){const{event:t,selector:n}=e.options.advanceOn||{};if(t){const i=Sn(e,n);let o=null;if(!I(n)&&(o=document.querySelector(n),!o))return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);o?(o.addEventListener(t,i),e.on("destroy",()=>o.removeEventListener(t,i))):(document.body.addEventListener(t,i,!0),e.on("destroy",()=>document.body.removeEventListener(t,i,!0)))}else return console.error("advanceOn was defined, but no event name was passed.")}class Tn{constructor(t){}}class Cn{constructor(t,n){}}function $t(e){return!Pe(e)||e===""?"":e.charAt(e.length-1)!=="-"?`${e}-`:e}function In(e){const t=e.options.attachTo||{},n=Object.assign({},t);if(ie(n.element)&&(n.element=n.element.call(e)),Pe(n.element)){try{n.element=document.querySelector(n.element)}catch{}n.element||console.error(`The element for this Shepherd step was not found ${t.element}`)}return n}function Pn(e){return e.options.extraHighlights?e.options.extraHighlights.flatMap(t=>Array.from(document.querySelectorAll(t))):[]}function jt(e){return e==null?!0:!e.element||!e.on}function Wt(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(t=="x"?n:n&3|8).toString(16)})}const Rn=["top","right","bottom","left"],wt=["start","end"],yt=Rn.reduce((e,t)=>e.concat(t,t+"-"+wt[0],t+"-"+wt[1]),[]),Ee=Math.min,fe=Math.max,Be=Math.round,De=Math.floor,z=e=>({x:e,y:e}),Mn={left:"right",right:"left",bottom:"top",top:"bottom"},kn={start:"end",end:"start"};function Ze(e,t,n){return fe(e,Ee(t,n))}function he(e,t){return typeof e=="function"?e(t):e}function G(e){return e.split("-")[0]}function Z(e){return e.split("-")[1]}function st(e){return e==="x"?"y":"x"}function rt(e){return e==="y"?"height":"width"}function Oe(e){return["top","bottom"].includes(G(e))?"y":"x"}function lt(e){return st(Oe(e))}function Ut(e,t,n){n===void 0&&(n=!1);const i=Z(e),o=lt(e),s=rt(o);let r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Ve(r)),[r,Ve(r)]}function Ln(e){const t=Ve(e);return[Ne(e),t,Ne(t)]}function Ne(e){return e.replace(/start|end/g,t=>kn[t])}function Fn(e,t,n){const i=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:i:t?i:o;case"left":case"right":return t?s:r;default:return[]}}function Dn(e,t,n,i){const o=Z(e);let s=Fn(G(e),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(Ne)))),s}function Ve(e){return e.replace(/left|right|bottom|top/g,t=>Mn[t])}function Hn(e){return k({top:0,right:0,bottom:0,left:0},e)}function zt(e){return typeof e!="number"?Hn(e):{top:e,right:e,bottom:e,left:e}}function $e(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}const Bn=["crossAxis","alignment","allowedPlacements","autoAlignment"],Nn=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],Vn=["mainAxis","crossAxis","limiter"];function _t(e,t,n){let{reference:i,floating:o}=e;const s=Oe(t),r=lt(t),l=rt(r),c=G(t),a=s==="y",d=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,f=i[l]/2-o[l]/2;let h;switch(c){case"top":h={x:d,y:i.y-o.height};break;case"bottom":h={x:d,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-o.width,y:u};break;default:h={x:i.x,y:i.y}}switch(Z(t)){case"start":h[r]-=f*(n&&a?-1:1);break;case"end":h[r]+=f*(n&&a?-1:1);break}return h}const $n=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),c=await(r.isRTL==null?void 0:r.isRTL(t));let a=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=_t(a,i,c),f=i,h={},m=0;for(let b=0;b<l.length;b++){const{name:y,fn:w}=l[b],{x:_,y:v,data:g,reset:p}=await w({x:d,y:u,initialPlacement:i,placement:f,strategy:o,middlewareData:h,rects:a,platform:r,elements:{reference:e,floating:t}});d=_??d,u=v??u,h=k({},h,{[y]:k({},h[y],g)}),p&&m<=50&&(m++,typeof p=="object"&&(p.placement&&(f=p.placement),p.rects&&(a=p.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:o}):p.rects),{x:d,y:u}=_t(a,f,c)),b=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:h}};async function ct(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:s,rects:r,elements:l,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=he(t,e),m=zt(h),y=l[f?u==="floating"?"reference":"floating":u],w=$e(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:a,rootBoundary:d,strategy:c})),_=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),g=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},p=$e(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:v,strategy:c}):_);return{top:(w.top-p.top+m.top)/g.y,bottom:(p.bottom-w.bottom+m.bottom)/g.y,left:(w.left-p.left+m.left)/g.x,right:(p.right-w.right+m.right)/g.x}}const jn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:c}=t,{element:a,padding:d=0}=he(e,t)||{};if(a==null)return{};const u=zt(d),f={x:n,y:i},h=lt(o),m=rt(h),b=await r.getDimensions(a),y=h==="y",w=y?"top":"left",_=y?"bottom":"right",v=y?"clientHeight":"clientWidth",g=s.reference[m]+s.reference[h]-f[h]-s.floating[m],p=f[h]-s.reference[h],x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a));let T=x?x[v]:0;(!T||!await(r.isElement==null?void 0:r.isElement(x)))&&(T=l.floating[v]||s.floating[m]);const V=g/2-p/2,L=T/2-b[m]/2-1,$=Ee(u[w],L),C=Ee(u[_],L),O=$,P=T-b[m]-C,R=T/2-b[m]/2+V,B=Ze(O,R,P),M=!c.arrow&&Z(o)!=null&&R!==B&&s.reference[m]/2-(R<O?$:C)-b[m]/2<0,te=M?R<O?R-O:R-P:0;return{[h]:f[h]+te,data:k({[h]:B,centerOffset:R-B-te},M&&{alignmentOffset:te}),reset:M}}});function Wn(e,t,n){return(e?[...n.filter(o=>Z(o)===e),...n.filter(o=>Z(o)!==e)]:n.filter(o=>G(o)===o)).filter(o=>e?Z(o)===e||(t?Ne(o)!==o:!1):!0)}const Un=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(n){var i,o,s;const{rects:r,middlewareData:l,placement:c,platform:a,elements:d}=n,u=he(t,n),{crossAxis:f=!1,alignment:h,allowedPlacements:m=yt,autoAlignment:b=!0}=u,y=nt(u,Bn),w=h!==void 0||m===yt?Wn(h||null,b,m):m,_=await ct(n,y),v=((i=l.autoPlacement)==null?void 0:i.index)||0,g=w[v];if(g==null)return{};const p=Ut(g,r,await(a.isRTL==null?void 0:a.isRTL(d.floating)));if(c!==g)return{reset:{placement:w[0]}};const x=[_[G(g)],_[p[0]],_[p[1]]],T=[...((o=l.autoPlacement)==null?void 0:o.overflows)||[],{placement:g,overflows:x}],V=w[v+1];if(V)return{data:{index:v+1,overflows:T},reset:{placement:V}};const L=T.map(O=>{const P=Z(O.placement);return[O.placement,P&&f?O.overflows.slice(0,2).reduce((R,B)=>R+B,0):O.overflows[0],O.overflows]}).sort((O,P)=>O[1]-P[1]),C=((s=L.filter(O=>O[2].slice(0,Z(O[0])?2:3).every(P=>P<=0))[0])==null?void 0:s[0])||L[0][0];return C!==c?{data:{index:v+1,overflows:T},reset:{placement:C}}:{}}}},zn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var i,o;const{placement:s,middlewareData:r,rects:l,initialPlacement:c,platform:a,elements:d}=n,u=he(t,n),{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:w=!0}=u,_=nt(u,Nn);if((i=r.arrow)!=null&&i.alignmentOffset)return{};const v=G(s),g=Oe(c),p=G(c)===c,x=await(a.isRTL==null?void 0:a.isRTL(d.floating)),T=m||(p||!w?[Ve(c)]:Ln(c)),V=y!=="none";!m&&V&&T.push(...Dn(c,w,y,x));const L=[c,...T],$=await ct(n,_),C=[];let O=((o=r.flip)==null?void 0:o.overflows)||[];if(f&&C.push($[v]),h){const M=Ut(s,l,x);C.push($[M[0]],$[M[1]])}if(O=[...O,{placement:s,overflows:C}],!C.every(M=>M<=0)){var P,R;const M=(((P=r.flip)==null?void 0:P.index)||0)+1,te=L[M];if(te)return{data:{index:M,overflows:O},reset:{placement:te}};let me=(R=O.filter(X=>X.overflows[0]<=0).sort((X,F)=>X.overflows[1]-F.overflows[1])[0])==null?void 0:R.placement;if(!me)switch(b){case"bestFit":{var B;const X=(B=O.filter(F=>{if(V){const ne=Oe(F.placement);return ne===g||ne==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(ne=>ne>0).reduce((ne,ln)=>ne+ln,0)]).sort((F,ne)=>F[1]-ne[1])[0])==null?void 0:B[0];X&&(me=X);break}case"initialPlacement":me=c;break}if(s!==me)return{reset:{placement:me}}}return{}}}},Yn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:i,y:o,placement:s}=n,r=he(t,n),{mainAxis:l=!0,crossAxis:c=!1,limiter:a={fn:_=>{let{x:v,y:g}=_;return{x:v,y:g}}}}=r,d=nt(r,Vn),u={x:i,y:o},f=await ct(n,d),h=Oe(G(s)),m=st(h);let b=u[m],y=u[h];if(l){const _=m==="y"?"top":"left",v=m==="y"?"bottom":"right",g=b+f[_],p=b-f[v];b=Ze(g,b,p)}if(c){const _=h==="y"?"top":"left",v=h==="y"?"bottom":"right",g=y+f[_],p=y-f[v];y=Ze(g,y,p)}const w=a.fn(k({},n,{[m]:b,[h]:y}));return k({},w,{data:{x:w.x-i,y:w.y-o}})}}},qn=function(t){return t===void 0&&(t={}),{options:t,fn(n){const{x:i,y:o,placement:s,rects:r,middlewareData:l}=n,{offset:c=0,mainAxis:a=!0,crossAxis:d=!0}=he(t,n),u={x:i,y:o},f=Oe(s),h=st(f);let m=u[h],b=u[f];const y=he(c,n),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:k({mainAxis:0,crossAxis:0},y);if(a){const g=h==="y"?"height":"width",p=r.reference[h]-r.floating[g]+w.mainAxis,x=r.reference[h]+r.reference[g]-w.mainAxis;m<p?m=p:m>x&&(m=x)}if(d){var _,v;const g=h==="y"?"width":"height",p=["top","left"].includes(G(s)),x=r.reference[f]-r.floating[g]+(p&&((_=l.offset)==null?void 0:_[f])||0)+(p?0:w.crossAxis),T=r.reference[f]+r.reference[g]+(p?0:((v=l.offset)==null?void 0:v[f])||0)-(p?w.crossAxis:0);b<x?b=x:b>T&&(b=T)}return{[h]:m,[f]:b}}}};function We(){return typeof window<"u"}function Ce(e){return Yt(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){var t;return(t=(Yt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yt(e){return We()?e instanceof Node||e instanceof D(e).Node:!1}function j(e){return We()?e instanceof Element||e instanceof D(e).Element:!1}function Y(e){return We()?e instanceof HTMLElement||e instanceof D(e).HTMLElement:!1}function vt(e){return!We()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof D(e).ShadowRoot}function ke(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function Kn(e){return["table","td","th"].includes(Ce(e))}function Ue(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function at(e){const t=ft(),n=j(e)?W(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function Xn(e){let t=oe(e);for(;Y(t)&&!Se(t);){if(at(t))return t;if(Ue(t))return null;t=oe(t)}return null}function ft(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Se(e){return["html","body","#document"].includes(Ce(e))}function W(e){return D(e).getComputedStyle(e)}function ze(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oe(e){if(Ce(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vt(e)&&e.host||K(e);return vt(t)?t.host:t}function qt(e){const t=oe(e);return Se(t)?e.ownerDocument?e.ownerDocument.body:e.body:Y(t)&&ke(t)?t:qt(t)}function Re(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=qt(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),r=D(o);if(s){const l=Ge(r);return t.concat(r,r.visualViewport||[],ke(o)?o:[],l&&n?Re(l):[])}return t.concat(o,Re(o,[],n))}function Ge(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kt(e){const t=W(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=Y(e),s=o?e.offsetWidth:n,r=o?e.offsetHeight:i,l=Be(n)!==s||Be(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function ut(e){return j(e)?e:e.contextElement}function _e(e){const t=ut(e);if(!Y(t))return z(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:s}=Kt(t);let r=(s?Be(n.width):n.width)/i,l=(s?Be(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const Zn=z(0);function Xt(e){const t=D(e);return!ft()||!t.visualViewport?Zn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==D(e)?!1:t}function pe(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ut(e);let r=z(1);t&&(i?j(i)&&(r=_e(i)):r=_e(e));const l=Gn(s,n,i)?Xt(s):z(0);let c=(o.left+l.x)/r.x,a=(o.top+l.y)/r.y,d=o.width/r.x,u=o.height/r.y;if(s){const f=D(s),h=i&&j(i)?D(i):i;let m=f,b=Ge(m);for(;b&&i&&h!==m;){const y=_e(b),w=b.getBoundingClientRect(),_=W(b),v=w.left+(b.clientLeft+parseFloat(_.paddingLeft))*y.x,g=w.top+(b.clientTop+parseFloat(_.paddingTop))*y.y;c*=y.x,a*=y.y,d*=y.x,u*=y.y,c+=v,a+=g,m=D(b),b=Ge(m)}}return $e({width:d,height:u,x:c,y:a})}function dt(e,t){const n=ze(e).scrollLeft;return t?t.left+n:pe(K(e)).left+n}function Zt(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=i.left+t.scrollLeft-(n?0:dt(e,i)),s=i.top+t.scrollTop;return{x:o,y:s}}function Jn(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const s=o==="fixed",r=K(i),l=t?Ue(t.floating):!1;if(i===r||l&&s)return n;let c={scrollLeft:0,scrollTop:0},a=z(1);const d=z(0),u=Y(i);if((u||!u&&!s)&&((Ce(i)!=="body"||ke(r))&&(c=ze(i)),Y(i))){const h=pe(i);a=_e(i),d.x=h.x+i.clientLeft,d.y=h.y+i.clientTop}const f=r&&!u&&!s?Zt(r,c,!0):z(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+d.x+f.x,y:n.y*a.y-c.scrollTop*a.y+d.y+f.y}}function Qn(e){return Array.from(e.getClientRects())}function ei(e){const t=K(e),n=ze(e),i=e.ownerDocument.body,o=fe(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=fe(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+dt(e);const l=-n.scrollTop;return W(i).direction==="rtl"&&(r+=fe(t.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}function ti(e,t){const n=D(e),i=K(e),o=n.visualViewport;let s=i.clientWidth,r=i.clientHeight,l=0,c=0;if(o){s=o.width,r=o.height;const a=ft();(!a||a&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:r,x:l,y:c}}function ni(e,t){const n=pe(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,s=Y(e)?_e(e):z(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,c=o*s.x,a=i*s.y;return{width:r,height:l,x:c,y:a}}function xt(e,t,n){let i;if(t==="viewport")i=ti(e,n);else if(t==="document")i=ei(K(e));else if(j(t))i=ni(t,n);else{const o=Xt(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return $e(i)}function Gt(e,t){const n=oe(e);return n===t||!j(n)||Se(n)?!1:W(n).position==="fixed"||Gt(n,t)}function ii(e,t){const n=t.get(e);if(n)return n;let i=Re(e,[],!1).filter(l=>j(l)&&Ce(l)!=="body"),o=null;const s=W(e).position==="fixed";let r=s?oe(e):e;for(;j(r)&&!Se(r);){const l=W(r),c=at(r);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ke(r)&&!c&&Gt(e,r))?i=i.filter(d=>d!==r):o=l,r=oe(r)}return t.set(e,i),i}function oi(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const r=[...n==="clippingAncestors"?Ue(t)?[]:ii(t,this._c):[].concat(n),i],l=r[0],c=r.reduce((a,d)=>{const u=xt(t,d,o);return a.top=fe(u.top,a.top),a.right=Ee(u.right,a.right),a.bottom=Ee(u.bottom,a.bottom),a.left=fe(u.left,a.left),a},xt(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function si(e){const{width:t,height:n}=Kt(e);return{width:t,height:n}}function ri(e,t,n){const i=Y(t),o=K(t),s=n==="fixed",r=pe(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=z(0);if(i||!i&&!s)if((Ce(t)!=="body"||ke(o))&&(l=ze(t)),i){const f=pe(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else o&&(c.x=dt(o));const a=o&&!i&&!s?Zt(o,l):z(0),d=r.left+l.scrollLeft-c.x-a.x,u=r.top+l.scrollTop-c.y-a.y;return{x:d,y:u,width:r.width,height:r.height}}function Ke(e){return W(e).position==="static"}function Et(e,t){if(!Y(e)||W(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return K(e)===n&&(n=n.ownerDocument.body),n}function Jt(e,t){const n=D(e);if(Ue(e))return n;if(!Y(e)){let o=oe(e);for(;o&&!Se(o);){if(j(o)&&!Ke(o))return o;o=oe(o)}return n}let i=Et(e,t);for(;i&&Kn(i)&&Ke(i);)i=Et(i,t);return i&&Se(i)&&Ke(i)&&!at(i)?n:i||Xn(e)||n}const li=async function(t){const n=this.getOffsetParent||Jt,i=this.getDimensions,o=await i(t.floating);return{reference:ri(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ci(e){return W(e).direction==="rtl"}const ai={convertOffsetParentRelativeRectToViewportRelativeRect:Jn,getDocumentElement:K,getClippingRect:oi,getOffsetParent:Jt,getElementRects:li,getClientRects:Qn,getDimensions:si,getScale:_e,isElement:j,isRTL:ci};function fi(e,t){let n=null,i;const o=K(e);function s(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:a,top:d,width:u,height:f}=e.getBoundingClientRect();if(l||t(),!u||!f)return;const h=De(d),m=De(o.clientWidth-(a+u)),b=De(o.clientHeight-(d+f)),y=De(a),_={rootMargin:-h+"px "+-m+"px "+-b+"px "+-y+"px",threshold:fe(0,Ee(1,c))||1};let v=!0;function g(p){const x=p[0].intersectionRatio;if(x!==c){if(!v)return r();x?r(!1,x):i=setTimeout(()=>{r(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(g,k({},_,{root:o.ownerDocument}))}catch{n=new IntersectionObserver(g,_)}n.observe(e)}return r(!0),s}function ui(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,a=ut(e),d=o||s?[...a?Re(a):[],...Re(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const u=a&&l?fi(a,n):null;let f=-1,h=null;r&&(h=new ResizeObserver(w=>{let[_]=w;_&&_.target===a&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),n()}),a&&!c&&h.observe(a),h.observe(t));let m,b=c?pe(e):null;c&&y();function y(){const w=pe(e);b&&(w.x!==b.x||w.y!==b.y||w.width!==b.width||w.height!==b.height)&&n(),b=w,m=requestAnimationFrame(y)}return n(),()=>{var w;d.forEach(_=>{o&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),u?.(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const di=Un,hi=Yn,pi=zn,gi=jn,mi=qn,bi=(e,t,n)=>{const i=new Map,o=k({platform:ai},n),s=k({},o.platform,{_c:i});return $n(e,t,k({},o,{platform:s}))};function wi(e){e.cleanup&&e.cleanup();const t=e._getResolvedAttachToOptions();let n=t.element;const i=Oi(t,e),o=jt(t);return o&&(n=document.body,e.shepherdElementComponent.getElement().classList.add("shepherd-centered")),e.cleanup=ui(n,e.el,()=>{if(!e.el){e.cleanup==null||e.cleanup();return}vi(n,e,i,o)}),e.target=t.element,i}function yi(e,t){return{floatingUIOptions:it(e.floatingUIOptions||{},t.floatingUIOptions||{})}}function _i(e){e.cleanup&&e.cleanup(),e.cleanup=null}function vi(e,t,n,i){return bi(e,t.el,n).then(xi(t,i)).then(o=>new Promise(s=>{setTimeout(()=>s(o),300)})).then(o=>{o!=null&&o.el&&o.el.focus({preventScroll:!0})})}function xi(e,t){return({x:n,y:i,placement:o,middlewareData:s})=>(e.el&&(t?Object.assign(e.el.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}):Object.assign(e.el.style,{position:"absolute",left:`${n}px`,top:`${i}px`}),e.el.dataset.popperPlacement=o,Ei(e.el,s)),e)}function Ei(e,t){const n=e.querySelector(".shepherd-arrow");if(xe(n)&&t.arrow){const{x:i,y:o}=t.arrow;Object.assign(n.style,{left:i!=null?`${i}px`:"",top:o!=null?`${o}px`:""})}}function Oi(e,t){var n,i,o;const s={strategy:"absolute"};s.middleware=[];const r=Si(t),l=jt(e),c=(n=e.on)==null?void 0:n.includes("auto"),a=(e==null||(i=e.on)==null?void 0:i.includes("-start"))||(e==null||(o=e.on)==null?void 0:o.includes("-end"));if(!l){if(c){var d;s.middleware.push(di({crossAxis:!0,alignment:a?e==null||(d=e.on)==null?void 0:d.split("-").pop():null}))}else s.middleware.push(pi());if(s.middleware.push(hi({limiter:mi(),crossAxis:!0})),r){const u=typeof t.options.arrow=="object"?t.options.arrow:{padding:4};s.middleware.push(gi({element:r,padding:a?u.padding:0}))}c||(s.placement=e.on)}return it(s,t.options.floatingUIOptions||{})}function Si(e){return e.options.arrow&&e.el?e.el.querySelector(".shepherd-arrow"):!1}function H(){}function Ai(e,t){for(const n in t)e[n]=t[n];return e}function Qt(e){return e()}function Ot(){return Object.create(null)}function Le(e){e.forEach(Qt)}function ht(e){return typeof e=="function"}function J(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Ti(e){return Object.keys(e).length===0}function Ae(e,t){e.appendChild(t)}function U(e,t,n){e.insertBefore(t,n||null)}function N(e){e.parentNode&&e.parentNode.removeChild(e)}function Ci(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function q(e){return document.createElement(e)}function St(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function en(e){return document.createTextNode(e)}function je(){return en(" ")}function Ii(){return en("")}function Ye(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function S(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const Pi=["width","height"];function At(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const i in t)t[i]==null?e.removeAttribute(i):i==="style"?e.style.cssText=t[i]:i==="__value"?e.value=e[i]=t[i]:n[i]&&n[i].set&&Pi.indexOf(i)===-1?e[i]=t[i]:S(e,i,t[i])}function Ri(e){return Array.from(e.childNodes)}function be(e,t,n){e.classList.toggle(t,!!n)}let Me;function Ie(e){Me=e}function tn(){if(!Me)throw new Error("Function called outside component initialization");return Me}function Mi(e){tn().$$.on_mount.push(e)}function pt(e){tn().$$.after_update.push(e)}const ye=[],Te=[];let ve=[];const Tt=[],ki=Promise.resolve();let Je=!1;function Li(){Je||(Je=!0,ki.then(nn))}function Qe(e){ve.push(e)}const Xe=new Set;let we=0;function nn(){if(we!==0)return;const e=Me;do{try{for(;we<ye.length;){const t=ye[we];we++,Ie(t),Fi(t.$$)}}catch(t){throw ye.length=0,we=0,t}for(Ie(null),ye.length=0,we=0;Te.length;)Te.pop()();for(let t=0;t<ve.length;t+=1){const n=ve[t];Xe.has(n)||(Xe.add(n),n())}ve.length=0}while(ye.length);for(;Tt.length;)Tt.pop()();Je=!1,Xe.clear(),Ie(e)}function Fi(e){if(e.fragment!==null){e.update(),Le(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Qe)}}function Di(e){const t=[],n=[];ve.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),ve=t}const He=new Set;let ce;function ue(){ce={r:0,c:[],p:ce}}function de(){ce.r||Le(ce.c),ce=ce.p}function E(e,t){e&&e.i&&(He.delete(e),e.i(t))}function A(e,t,n,i){if(e&&e.o){if(He.has(e))return;He.add(e),ce.c.push(()=>{He.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Ct(e){return e?.length!==void 0?e:Array.from(e)}function Hi(e,t){const n={},i={},o={$$scope:1};let s=e.length;for(;s--;){const r=e[s],l=t[s];if(l){for(const c in r)c in l||(i[c]=1);for(const c in l)o[c]||(n[c]=l[c],o[c]=1);e[s]=l}else for(const c in r)o[c]=1}for(const r in i)r in n||(n[r]=void 0);return n}function ge(e){e&&e.c()}function re(e,t,n){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),Qe(()=>{const s=e.$$.on_mount.map(Qt).filter(ht);e.$$.on_destroy?e.$$.on_destroy.push(...s):Le(s),e.$$.on_mount=[]}),o.forEach(Qe)}function le(e,t){const n=e.$$;n.fragment!==null&&(Di(n.after_update),Le(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Bi(e,t){e.$$.dirty[0]===-1&&(ye.push(e),Li(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Q(e,t,n,i,o,s,r=null,l=[-1]){const c=Me;Ie(e);const a=e.$$={fragment:null,ctx:[],props:s,update:H,not_equal:o,bound:Ot(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:Ot(),dirty:l,skip_bound:!1,root:t.target||c.$$.root};r&&r(a.root);let d=!1;if(a.ctx=n?n(e,t.props||{},(u,f,...h)=>{const m=h.length?h[0]:f;return a.ctx&&o(a.ctx[u],a.ctx[u]=m)&&(!a.skip_bound&&a.bound[u]&&a.bound[u](m),d&&Bi(e,u)),f}):[],a.update(),d=!0,Le(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const u=Ri(t.target);a.fragment&&a.fragment.l(u),u.forEach(N)}else a.fragment&&a.fragment.c();t.intro&&E(e.$$.fragment),re(e,t.target,t.anchor),nn()}Ie(c)}class ee{constructor(){this.$$=void 0,this.$$set=void 0}$destroy(){le(this,1),this.$destroy=H}$on(t,n){if(!ht(n))return H;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!Ti(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ni="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ni);function Vi(e){let t,n,i,o,s;return{c(){t=q("button"),S(t,"aria-label",n=e[3]?e[3]:null),S(t,"class",i=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`),t.disabled=e[2],S(t,"tabindex","0"),S(t,"type","button")},m(r,l){U(r,t,l),t.innerHTML=e[5],o||(s=Ye(t,"click",function(){ht(e[0])&&e[0].apply(this,arguments)}),o=!0)},p(r,[l]){e=r,l&32&&(t.innerHTML=e[5]),l&8&&n!==(n=e[3]?e[3]:null)&&S(t,"aria-label",n),l&18&&i!==(i=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`)&&S(t,"class",i),l&4&&(t.disabled=e[2])},i:H,o:H,d(r){r&&N(t),o=!1,s()}}}function $i(e,t,n){let{config:i,step:o}=t,s,r,l,c,a,d;function u(f){return ie(f)?f=f.call(o):f}return e.$$set=f=>{"config"in f&&n(6,i=f.config),"step"in f&&n(7,o=f.step)},e.$$.update=()=>{e.$$.dirty&192&&(n(0,s=i.action?i.action.bind(o.tour):null),n(1,r=i.classes),n(2,l=i.disabled?u(i.disabled):!1),n(3,c=i.label?u(i.label):null),n(4,a=i.secondary),n(5,d=i.text?u(i.text):null))},[s,r,l,c,a,d,i,o]}class ji extends ee{constructor(t){super(),Q(this,t,$i,Vi,J,{config:6,step:7})}}function It(e,t,n){const i=e.slice();return i[2]=t[n],i}function Pt(e){let t,n,i=Ct(e[1]),o=[];for(let r=0;r<i.length;r+=1)o[r]=Rt(It(e,i,r));const s=r=>A(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=Ii()},m(r,l){for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(r,l);U(r,t,l),n=!0},p(r,l){if(l&3){i=Ct(r[1]);let c;for(c=0;c<i.length;c+=1){const a=It(r,i,c);o[c]?(o[c].p(a,l),E(o[c],1)):(o[c]=Rt(a),o[c].c(),E(o[c],1),o[c].m(t.parentNode,t))}for(ue(),c=i.length;c<o.length;c+=1)s(c);de()}},i(r){if(!n){for(let l=0;l<i.length;l+=1)E(o[l]);n=!0}},o(r){o=o.filter(Boolean);for(let l=0;l<o.length;l+=1)A(o[l]);n=!1},d(r){r&&N(t),Ci(o,r)}}}function Rt(e){let t,n;return t=new ji({props:{config:e[2],step:e[0]}}),{c(){ge(t.$$.fragment)},m(i,o){re(t,i,o),n=!0},p(i,o){const s={};o&2&&(s.config=i[2]),o&1&&(s.step=i[0]),t.$set(s)},i(i){n||(E(t.$$.fragment,i),n=!0)},o(i){A(t.$$.fragment,i),n=!1},d(i){le(t,i)}}}function Wi(e){let t,n,i=e[1]&&Pt(e);return{c(){t=q("footer"),i&&i.c(),S(t,"class","shepherd-footer")},m(o,s){U(o,t,s),i&&i.m(t,null),n=!0},p(o,[s]){o[1]?i?(i.p(o,s),s&2&&E(i,1)):(i=Pt(o),i.c(),E(i,1),i.m(t,null)):i&&(ue(),A(i,1,1,()=>{i=null}),de())},i(o){n||(E(i),n=!0)},o(o){A(i),n=!1},d(o){o&&N(t),i&&i.d()}}}function Ui(e,t,n){let i,{step:o}=t;return e.$$set=s=>{"step"in s&&n(0,o=s.step)},e.$$.update=()=>{e.$$.dirty&1&&n(1,i=o.options.buttons)},[o,i]}class zi extends ee{constructor(t){super(),Q(this,t,Ui,Wi,J,{step:0})}}function Yi(e){let t,n,i,o,s;return{c(){t=q("button"),n=q("span"),n.textContent="×",S(n,"aria-hidden","true"),S(t,"aria-label",i=e[0].label?e[0].label:"Close Tour"),S(t,"class","shepherd-cancel-icon"),S(t,"type","button")},m(r,l){U(r,t,l),Ae(t,n),o||(s=Ye(t,"click",e[1]),o=!0)},p(r,[l]){l&1&&i!==(i=r[0].label?r[0].label:"Close Tour")&&S(t,"aria-label",i)},i:H,o:H,d(r){r&&N(t),o=!1,s()}}}function qi(e,t,n){let{cancelIcon:i,step:o}=t;const s=r=>{r.preventDefault(),o.cancel()};return e.$$set=r=>{"cancelIcon"in r&&n(0,i=r.cancelIcon),"step"in r&&n(2,o=r.step)},[i,s,o]}class Ki extends ee{constructor(t){super(),Q(this,t,qi,Yi,J,{cancelIcon:0,step:2})}}function Xi(e){let t;return{c(){t=q("h3"),S(t,"id",e[1]),S(t,"class","shepherd-title")},m(n,i){U(n,t,i),e[3](t)},p(n,[i]){i&2&&S(t,"id",n[1])},i:H,o:H,d(n){n&&N(t),e[3](null)}}}function Zi(e,t,n){let{labelId:i,element:o,title:s}=t;pt(()=>{ie(s)&&n(2,s=s()),n(0,o.innerHTML=s,o)});function r(l){Te[l?"unshift":"push"](()=>{o=l,n(0,o)})}return e.$$set=l=>{"labelId"in l&&n(1,i=l.labelId),"element"in l&&n(0,o=l.element),"title"in l&&n(2,s=l.title)},[o,i,s,r]}class Gi extends ee{constructor(t){super(),Q(this,t,Zi,Xi,J,{labelId:1,element:0,title:2})}}function Mt(e){let t,n;return t=new Gi({props:{labelId:e[0],title:e[2]}}),{c(){ge(t.$$.fragment)},m(i,o){re(t,i,o),n=!0},p(i,o){const s={};o&1&&(s.labelId=i[0]),o&4&&(s.title=i[2]),t.$set(s)},i(i){n||(E(t.$$.fragment,i),n=!0)},o(i){A(t.$$.fragment,i),n=!1},d(i){le(t,i)}}}function kt(e){let t,n;return t=new Ki({props:{cancelIcon:e[3],step:e[1]}}),{c(){ge(t.$$.fragment)},m(i,o){re(t,i,o),n=!0},p(i,o){const s={};o&8&&(s.cancelIcon=i[3]),o&2&&(s.step=i[1]),t.$set(s)},i(i){n||(E(t.$$.fragment,i),n=!0)},o(i){A(t.$$.fragment,i),n=!1},d(i){le(t,i)}}}function Ji(e){let t,n,i,o=e[2]&&Mt(e),s=e[3]&&e[3].enabled&&kt(e);return{c(){t=q("header"),o&&o.c(),n=je(),s&&s.c(),S(t,"class","shepherd-header")},m(r,l){U(r,t,l),o&&o.m(t,null),Ae(t,n),s&&s.m(t,null),i=!0},p(r,[l]){r[2]?o?(o.p(r,l),l&4&&E(o,1)):(o=Mt(r),o.c(),E(o,1),o.m(t,n)):o&&(ue(),A(o,1,1,()=>{o=null}),de()),r[3]&&r[3].enabled?s?(s.p(r,l),l&8&&E(s,1)):(s=kt(r),s.c(),E(s,1),s.m(t,null)):s&&(ue(),A(s,1,1,()=>{s=null}),de())},i(r){i||(E(o),E(s),i=!0)},o(r){A(o),A(s),i=!1},d(r){r&&N(t),o&&o.d(),s&&s.d()}}}function Qi(e,t,n){let{labelId:i,step:o}=t,s,r;return e.$$set=l=>{"labelId"in l&&n(0,i=l.labelId),"step"in l&&n(1,o=l.step)},e.$$.update=()=>{e.$$.dirty&2&&(n(2,s=o.options.title),n(3,r=o.options.cancelIcon))},[i,o,s,r]}class eo extends ee{constructor(t){super(),Q(this,t,Qi,Ji,J,{labelId:0,step:1})}}function to(e){let t;return{c(){t=q("div"),S(t,"class","shepherd-text"),S(t,"id",e[1])},m(n,i){U(n,t,i),e[3](t)},p(n,[i]){i&2&&S(t,"id",n[1])},i:H,o:H,d(n){n&&N(t),e[3](null)}}}function no(e,t,n){let{descriptionId:i,element:o,step:s}=t;pt(()=>{let{text:l}=s.options;ie(l)&&(l=l.call(s)),xe(l)?o.appendChild(l):n(0,o.innerHTML=l,o)});function r(l){Te[l?"unshift":"push"](()=>{o=l,n(0,o)})}return e.$$set=l=>{"descriptionId"in l&&n(1,i=l.descriptionId),"element"in l&&n(0,o=l.element),"step"in l&&n(2,s=l.step)},[o,i,s,r]}class io extends ee{constructor(t){super(),Q(this,t,no,to,J,{descriptionId:1,element:0,step:2})}}function Lt(e){let t,n;return t=new eo({props:{labelId:e[1],step:e[2]}}),{c(){ge(t.$$.fragment)},m(i,o){re(t,i,o),n=!0},p(i,o){const s={};o&2&&(s.labelId=i[1]),o&4&&(s.step=i[2]),t.$set(s)},i(i){n||(E(t.$$.fragment,i),n=!0)},o(i){A(t.$$.fragment,i),n=!1},d(i){le(t,i)}}}function Ft(e){let t,n;return t=new io({props:{descriptionId:e[0],step:e[2]}}),{c(){ge(t.$$.fragment)},m(i,o){re(t,i,o),n=!0},p(i,o){const s={};o&1&&(s.descriptionId=i[0]),o&4&&(s.step=i[2]),t.$set(s)},i(i){n||(E(t.$$.fragment,i),n=!0)},o(i){A(t.$$.fragment,i),n=!1},d(i){le(t,i)}}}function Dt(e){let t,n;return t=new zi({props:{step:e[2]}}),{c(){ge(t.$$.fragment)},m(i,o){re(t,i,o),n=!0},p(i,o){const s={};o&4&&(s.step=i[2]),t.$set(s)},i(i){n||(E(t.$$.fragment,i),n=!0)},o(i){A(t.$$.fragment,i),n=!1},d(i){le(t,i)}}}function oo(e){let t,n=!I(e[2].options.title)||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled,i,o=!I(e[2].options.text),s,r=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,l,c=n&&Lt(e),a=o&&Ft(e),d=r&&Dt(e);return{c(){t=q("div"),c&&c.c(),i=je(),a&&a.c(),s=je(),d&&d.c(),S(t,"class","shepherd-content")},m(u,f){U(u,t,f),c&&c.m(t,null),Ae(t,i),a&&a.m(t,null),Ae(t,s),d&&d.m(t,null),l=!0},p(u,[f]){f&4&&(n=!I(u[2].options.title)||u[2].options.cancelIcon&&u[2].options.cancelIcon.enabled),n?c?(c.p(u,f),f&4&&E(c,1)):(c=Lt(u),c.c(),E(c,1),c.m(t,i)):c&&(ue(),A(c,1,1,()=>{c=null}),de()),f&4&&(o=!I(u[2].options.text)),o?a?(a.p(u,f),f&4&&E(a,1)):(a=Ft(u),a.c(),E(a,1),a.m(t,s)):a&&(ue(),A(a,1,1,()=>{a=null}),de()),f&4&&(r=Array.isArray(u[2].options.buttons)&&u[2].options.buttons.length),r?d?(d.p(u,f),f&4&&E(d,1)):(d=Dt(u),d.c(),E(d,1),d.m(t,null)):d&&(ue(),A(d,1,1,()=>{d=null}),de())},i(u){l||(E(c),E(a),E(d),l=!0)},o(u){A(c),A(a),A(d),l=!1},d(u){u&&N(t),c&&c.d(),a&&a.d(),d&&d.d()}}}function so(e,t,n){let{descriptionId:i,labelId:o,step:s}=t;return e.$$set=r=>{"descriptionId"in r&&n(0,i=r.descriptionId),"labelId"in r&&n(1,o=r.labelId),"step"in r&&n(2,s=r.step)},[i,o,s]}class ro extends ee{constructor(t){super(),Q(this,t,so,oo,J,{descriptionId:0,labelId:1,step:2})}}function Ht(e){let t;return{c(){t=q("div"),S(t,"class","shepherd-arrow"),S(t,"data-popper-arrow","")},m(n,i){U(n,t,i)},d(n){n&&N(t)}}}function lo(e){let t,n,i,o,s,r,l,c,a=e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on&&Ht();i=new ro({props:{descriptionId:e[2],labelId:e[3],step:e[4]}});let d=[{"aria-describedby":o=I(e[4].options.text)?null:e[2]},{"aria-labelledby":s=e[4].options.title?e[3]:null},e[1],{open:"true"}],u={};for(let f=0;f<d.length;f+=1)u=Ai(u,d[f]);return{c(){t=q("dialog"),a&&a.c(),n=je(),ge(i.$$.fragment),At(t,u),be(t,"shepherd-has-cancel-icon",e[5]),be(t,"shepherd-has-title",e[6]),be(t,"shepherd-element",!0)},m(f,h){U(f,t,h),a&&a.m(t,null),Ae(t,n),re(i,t,null),e[13](t),r=!0,l||(c=Ye(t,"keydown",e[7]),l=!0)},p(f,[h]){f[4].options.arrow&&f[4].options.attachTo&&f[4].options.attachTo.element&&f[4].options.attachTo.on?a||(a=Ht(),a.c(),a.m(t,n)):a&&(a.d(1),a=null);const m={};h&4&&(m.descriptionId=f[2]),h&8&&(m.labelId=f[3]),h&16&&(m.step=f[4]),i.$set(m),At(t,u=Hi(d,[(!r||h&20&&o!==(o=I(f[4].options.text)?null:f[2]))&&{"aria-describedby":o},(!r||h&24&&s!==(s=f[4].options.title?f[3]:null))&&{"aria-labelledby":s},h&2&&f[1],{open:"true"}])),be(t,"shepherd-has-cancel-icon",f[5]),be(t,"shepherd-has-title",f[6]),be(t,"shepherd-element",!0)},i(f){r||(E(i.$$.fragment,f),r=!0)},o(f){A(i.$$.fragment,f),r=!1},d(f){f&&N(t),a&&a.d(),le(i),e[13](null),l=!1,c()}}}const co=9,ao=27,fo=37,uo=39;function Bt(e){return e.split(" ").filter(t=>!!t.length)}function ho(e,t,n){let{classPrefix:i,element:o,descriptionId:s,firstFocusableElement:r,focusableElements:l,labelId:c,lastFocusableElement:a,step:d,dataStepId:u}=t,f,h,m;const b=()=>o;Mi(()=>{n(1,u={[`data-${i}shepherd-step-id`]:d.id}),n(9,l=o.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,r=l[0]),n(10,a=l[l.length-1])}),pt(()=>{m!==d.options.classes&&y()});function y(){w(m),m=d.options.classes,_(m)}function w(p){if(Pe(p)){const x=Bt(p);x.length&&o.classList.remove(...x)}}function _(p){if(Pe(p)){const x=Bt(p);x.length&&o.classList.add(...x)}}const v=p=>{const{tour:x}=d;switch(p.keyCode){case co:if(l.length===0){p.preventDefault();break}p.shiftKey?(document.activeElement===r||document.activeElement.classList.contains("shepherd-element"))&&(p.preventDefault(),a.focus()):document.activeElement===a&&(p.preventDefault(),r.focus());break;case ao:x.options.exitOnEsc&&(p.preventDefault(),p.stopPropagation(),d.cancel());break;case fo:x.options.keyboardNavigation&&(p.preventDefault(),p.stopPropagation(),x.back());break;case uo:x.options.keyboardNavigation&&(p.preventDefault(),p.stopPropagation(),x.next());break}};function g(p){Te[p?"unshift":"push"](()=>{o=p,n(0,o)})}return e.$$set=p=>{"classPrefix"in p&&n(11,i=p.classPrefix),"element"in p&&n(0,o=p.element),"descriptionId"in p&&n(2,s=p.descriptionId),"firstFocusableElement"in p&&n(8,r=p.firstFocusableElement),"focusableElements"in p&&n(9,l=p.focusableElements),"labelId"in p&&n(3,c=p.labelId),"lastFocusableElement"in p&&n(10,a=p.lastFocusableElement),"step"in p&&n(4,d=p.step),"dataStepId"in p&&n(1,u=p.dataStepId)},e.$$.update=()=>{e.$$.dirty&16&&(n(5,f=d.options&&d.options.cancelIcon&&d.options.cancelIcon.enabled),n(6,h=d.options&&d.options.title))},[o,u,s,c,d,f,h,v,r,l,a,i,b,g]}class po extends ee{constructor(t){super(),Q(this,t,ho,lo,J,{classPrefix:11,element:0,descriptionId:2,firstFocusableElement:8,focusableElements:9,labelId:3,lastFocusableElement:10,step:4,dataStepId:1,getElement:12})}get getElement(){return this.$$.ctx[12]}}class et extends tt{constructor(t,n={}){return super(),this._resolvedAttachTo=void 0,this._resolvedExtraHighlightElements=void 0,this.classPrefix=void 0,this.el=void 0,this.target=void 0,this.tour=void 0,this.tour=t,this.classPrefix=this.tour.options?$t(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,ot(this),this._setOptions(n),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){_i(this),xe(this.el)&&(this.el.remove(),this.el=null),this._updateStepTargetOnHide(),this.trigger("destroy")}getTour(){return this.tour}hide(){var t;(t=this.tour.modal)==null||t.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this._updateStepTargetOnHide(),this.trigger("hide")}_resolveExtraHiglightElements(){return this._resolvedExtraHighlightElements=Pn(this),this._resolvedExtraHighlightElements}_resolveAttachToOptions(){return this._resolvedAttachTo=In(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return this._resolvedAttachTo===null?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return ie(this.options.beforeShowPromise)?Promise.resolve(this.options.beforeShowPromise()).then(()=>this._show()):Promise.resolve(this._show())}updateStepOptions(t){Object.assign(this.options,t),this.shepherdElementComponent&&this.shepherdElementComponent.$set({step:this})}getElement(){return this.el}getTarget(){return this.target}_createTooltipContent(){const t=`${this.id}-description`,n=`${this.id}-label`;return this.shepherdElementComponent=new po({target:this.tour.options.stepsContainer||document.body,props:{classPrefix:this.classPrefix,descriptionId:t,labelId:n,step:this,styles:this.styles}}),this.shepherdElementComponent.getElement()}_scrollTo(t){const{element:n}=this._getResolvedAttachToOptions();ie(this.options.scrollToHandler)?this.options.scrollToHandler(n):cn(n)&&typeof n.scrollIntoView=="function"&&n.scrollIntoView(t)}_getClassOptions(t){const n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,i=t.classes?t.classes:"",o=n&&n.classes?n.classes:"",s=[...i.split(" "),...o.split(" ")],r=new Set(s);return Array.from(r).join(" ").trim()}_setOptions(t={}){let n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;n=it({},n||{}),this.options=Object.assign({arrow:!0},n,t,yi(n,t));const{when:i}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${Wt()}`,i&&Object.keys(i).forEach(o=>{this.on(o,i[o],this)})}_setupElements(){I(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&An(this),wi(this)}_show(){var t;this.trigger("before-show"),this._resolveAttachToOptions(),this._resolveExtraHiglightElements(),this._setupElements(),this.tour.modal||this.tour.setupModal(),(t=this.tour.modal)==null||t.setupForStep(this),this._styleTargetElementForStep(this),this.el&&(this.el.hidden=!1),this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)}),this.el&&(this.el.hidden=!1);const n=this.shepherdElementComponent.getElement(),i=this.target||document.body,o=this._resolvedExtraHighlightElements;i.classList.add(`${this.classPrefix}shepherd-enabled`),i.classList.add(`${this.classPrefix}shepherd-target`),n.classList.add("shepherd-enabled"),o?.forEach(s=>{s.classList.add(`${this.classPrefix}shepherd-enabled`),s.classList.add(`${this.classPrefix}shepherd-target`)}),this.trigger("show")}_styleTargetElementForStep(t){const n=t.target,i=t._resolvedExtraHighlightElements;if(!n)return;const o=t.options.highlightClass;o&&(n.classList.add(o),i?.forEach(s=>s.classList.add(o))),n.classList.remove("shepherd-target-click-disabled"),i?.forEach(s=>s.classList.remove("shepherd-target-click-disabled")),t.options.canClickTarget===!1&&(n.classList.add("shepherd-target-click-disabled"),i?.forEach(s=>s.classList.add("shepherd-target-click-disabled")))}_updateStepTargetOnHide(){const t=this.target||document.body,n=this._resolvedExtraHighlightElements,i=this.options.highlightClass;i&&(t.classList.remove(i),n?.forEach(o=>o.classList.remove(i))),t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`),n?.forEach(o=>{o.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)})}}function go(e){if(e){const{steps:t}=e;t.forEach(n=>{n.options&&n.options.canClickTarget===!1&&n.options.attachTo&&(xe(n.target)&&n.target.classList.remove("shepherd-target-click-disabled"),n._resolvedExtraHighlightElements&&n._resolvedExtraHighlightElements.forEach(i=>{xe(i)&&i.classList.remove("shepherd-target-click-disabled")}))})}}function mo(e){let t="";const{innerWidth:n,innerHeight:i}=window;return e.forEach(o=>{const{width:s,height:r,x:l=0,y:c=0,r:a=0}=o,{topLeft:d=0,topRight:u=0,bottomRight:f=0,bottomLeft:h=0}=typeof a=="number"?{topLeft:a,topRight:a,bottomRight:a,bottomLeft:a}:a;t+=`M${l+d},${c} a${d},${d},0,0,0-${d},${d} V${r+c-h} a${h},${h},0,0,0,${h},${h} H${s+l-f} a${f},${f},0,0,0,${f}-${f} V${c+u} a${u},${u},0,0,0-${u}-${u} Z`}),`M${n},${i} H0 V0 H${n} V${i} Z ${t}`.replace(/\s/g,"")}function bo(e){let t,n,i,o,s;return{c(){t=St("svg"),n=St("path"),S(n,"d",e[2]),S(t,"class",i=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(r,l){U(r,t,l),Ae(t,n),e[11](t),o||(s=Ye(t,"touchmove",e[3]),o=!0)},p(r,[l]){l&4&&S(n,"d",r[2]),l&2&&i!==(i=`${r[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&S(t,"class",i)},i:H,o:H,d(r){r&&N(t),e[11](null),o=!1,s()}}}function on(e){if(!e)return null;const n=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return n!=="hidden"&&n!=="visible"&&e.scrollHeight>=e.clientHeight?e:on(e.parentElement)}function wo(e){let t={top:0,left:0};if(!e)return t;let n=e.ownerDocument.defaultView;for(;n!==window.top;){var i;const r=(i=n)==null?void 0:i.frameElement;if(r){var o,s;const l=r.getBoundingClientRect();t.top+=l.top+((o=l.scrollTop)!=null?o:0),t.left+=l.left+((s=l.scrollLeft)!=null?s:0)}n=n.parent}return t}function yo(e,t){const n=e.getBoundingClientRect();let i=n.y||n.top,o=n.bottom||i+n.height;if(t){const r=t.getBoundingClientRect(),l=r.y||r.top,c=r.bottom||l+r.height;i=Math.max(i,l),o=Math.min(o,c)}const s=Math.max(o-i,0);return{y:i,height:s}}function _o(e,t,n){let{element:i,openingProperties:o}=t,s=!1,r,l;a();const c=()=>i;function a(){n(4,o=[{width:0,height:0,x:0,y:0,r:0}])}function d(){n(1,s=!1),w()}function u(g=0,p=0,x=0,T=0,V,L,$){if(L){const C=[L,...$||[]];n(4,o=[]);for(const O of C){if(!O||C.indexOf(O)!==C.lastIndexOf(O))continue;const{y:P,height:R}=yo(O,V),{x:B,width:M,left:te}=O.getBoundingClientRect();C.some(X=>{if(X===O)return!1;const F=X.getBoundingClientRect();return B>=F.left&&B+M<=F.right&&P>=F.top&&P+R<=F.bottom})||o.push({width:M+g*2,height:R+g*2,x:(B||te)+x-g,y:P+T-g,r:p})}}else a()}function f(g){w(),g.tour.options.useModalOverlay?(_(g),h()):d()}function h(){n(1,s=!0)}const m=g=>{g.preventDefault()},b=g=>{g.stopPropagation()};function y(){window.addEventListener("touchmove",m,{passive:!1})}function w(){r&&(cancelAnimationFrame(r),r=void 0),window.removeEventListener("touchmove",m,{passive:!1})}function _(g){const{modalOverlayOpeningPadding:p,modalOverlayOpeningRadius:x,modalOverlayOpeningXOffset:T=0,modalOverlayOpeningYOffset:V=0}=g.options,L=wo(g.target