react-shepherd 5.0.2 → 5.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +941 -855
- package/dist/index.umd.cjs +10 -10
- package/package.json +5 -5
- package/src/index.tsx +2 -4
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(oe,pe){typeof exports=="object"&&typeof module<"u"?pe(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],pe):(oe=typeof globalThis<"u"?globalThis:oe||self,pe(oe.ShepherdProReact={},oe.require$$0))})(this,function(oe,pe){"use strict";var yt={exports:{}},
|
|
1
|
+
(function(oe,pe){typeof exports=="object"&&typeof module<"u"?pe(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],pe):(oe=typeof globalThis<"u"?globalThis:oe||self,pe(oe.ShepherdProReact={},oe.require$$0))})(this,function(oe,pe){"use strict";var yt={exports:{}},Ue={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var nn;function Er(){if(nn)return Ue;nn=1;var e=pe,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(c,l,u){var f,h={},d=null,m=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(m=l.ref);for(f in l)r.call(l,f)&&!s.hasOwnProperty(f)&&(h[f]=l[f]);if(c&&c.defaultProps)for(f in l=c.defaultProps,l)h[f]===void 0&&(h[f]=l[f]);return{$$typeof:t,type:c,key:d,ref:m,props:h,_owner:o.current}}return Ue.Fragment=n,Ue.jsx=i,Ue.jsxs=i,Ue}var He={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),U=
|
|
20
|
-
`),
|
|
21
|
-
`+O[
|
|
17
|
+
*/var rn;function Sr(){return rn||(rn=1,process.env.NODE_ENV!=="production"&&function(){var e=pe,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y=Symbol.iterator,E="@@iterator";function x(a){if(a===null||typeof a!="object")return null;var p=y&&a[y]||a[E];return typeof p=="function"?p:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(a){{for(var p=arguments.length,b=new Array(p>1?p-1:0),S=1;S<p;S++)b[S-1]=arguments[S];T("error",a,b)}}function T(a,p,b){{var S=w.ReactDebugCurrentFrame,R=S.getStackAddendum();R!==""&&(p+="%s",b=b.concat([R]));var A=b.map(function(P){return String(P)});A.unshift("Warning: "+p),Function.prototype.apply.call(console[a],console,A)}}var v=!1,g=!1,C=!1,V=!1,re=!1,$;$=Symbol.for("react.module.reference");function H(a){return!!(typeof a=="string"||typeof a=="function"||a===r||a===s||re||a===o||a===u||a===f||V||a===m||v||g||C||typeof a=="object"&&a!==null&&(a.$$typeof===d||a.$$typeof===h||a.$$typeof===i||a.$$typeof===c||a.$$typeof===l||a.$$typeof===$||a.getModuleId!==void 0))}function J(a,p,b){var S=a.displayName;if(S)return S;var R=p.displayName||p.name||"";return R!==""?b+"("+R+")":b}function G(a){return a.displayName||"Context"}function W(a){if(a==null)return null;if(typeof a.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var p=a;return G(p)+".Consumer";case i:var b=a;return G(b._context)+".Provider";case l:return J(a,a.render,"ForwardRef");case h:var S=a.displayName||null;return S!==null?S:W(a.type)||"Memo";case d:{var R=a,A=R._payload,P=R._init;try{return W(P(A))}catch{return null}}}return null}var M=Object.assign,X=0,Z,K,de,_e,dt,ir,sr;function ar(){}ar.__reactDisabledLog=!0;function os(){{if(X===0){Z=console.log,K=console.info,de=console.warn,_e=console.error,dt=console.group,ir=console.groupCollapsed,sr=console.groupEnd;var a={configurable:!0,enumerable:!0,value:ar,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}X++}}function is(){{if(X--,X===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},a,{value:Z}),info:M({},a,{value:K}),warn:M({},a,{value:de}),error:M({},a,{value:_e}),group:M({},a,{value:dt}),groupCollapsed:M({},a,{value:ir}),groupEnd:M({},a,{value:sr})})}X<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var zt=w.ReactCurrentDispatcher,Jt;function ht(a,p,b){{if(Jt===void 0)try{throw Error()}catch(R){var S=R.stack.trim().match(/\n( *(at )?)/);Jt=S&&S[1]||""}return`
|
|
18
|
+
`+Jt+a}}var Gt=!1,pt;{var ss=typeof WeakMap=="function"?WeakMap:Map;pt=new ss}function cr(a,p){if(!a||Gt)return"";{var b=pt.get(a);if(b!==void 0)return b}var S;Gt=!0;var R=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var A;A=zt.current,zt.current=null,os();try{if(p){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(he){S=he}Reflect.construct(a,[],P)}else{try{P.call()}catch(he){S=he}a.call(P.prototype)}}else{try{throw Error()}catch(he){S=he}a()}}catch(he){if(he&&S&&typeof he.stack=="string"){for(var O=he.stack.split(`
|
|
19
|
+
`),U=S.stack.split(`
|
|
20
|
+
`),j=O.length-1,B=U.length-1;j>=1&&B>=0&&O[j]!==U[B];)B--;for(;j>=1&&B>=0;j--,B--)if(O[j]!==U[B]){if(j!==1||B!==1)do if(j--,B--,B<0||O[j]!==U[B]){var Q=`
|
|
21
|
+
`+O[j].replace(" at new "," at ");return a.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",a.displayName)),typeof a=="function"&&pt.set(a,Q),Q}while(j>=1&&B>=0);break}}}finally{Gt=!1,zt.current=A,is(),Error.prepareStackTrace=R}var Ve=a?a.displayName||a.name:"",_r=Ve?ht(Ve):"";return typeof a=="function"&&pt.set(a,_r),_r}function as(a,p,b){return cr(a,!1)}function cs(a){var p=a.prototype;return!!(p&&p.isReactComponent)}function mt(a,p,b){if(a==null)return"";if(typeof a=="function")return cr(a,cs(a));if(typeof a=="string")return ht(a);switch(a){case u:return ht("Suspense");case f:return ht("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case l:return as(a.render);case h:return mt(a.type,p,b);case d:{var S=a,R=S._payload,A=S._init;try{return mt(A(R),p,b)}catch{}}}return""}var gt=Object.prototype.hasOwnProperty,lr={},ur=w.ReactDebugCurrentFrame;function bt(a){if(a){var p=a._owner,b=mt(a.type,a._source,p?p.type:null);ur.setExtraStackFrame(b)}else ur.setExtraStackFrame(null)}function ls(a,p,b,S,R){{var A=Function.call.bind(gt);for(var P in a)if(A(a,P)){var O=void 0;try{if(typeof a[P]!="function"){var U=Error((S||"React class")+": "+b+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}O=a[P](p,P,S,b,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(j){O=j}O&&!(O instanceof Error)&&(bt(R),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",S||"React class",b,P,typeof O),bt(null)),O instanceof Error&&!(O.message in lr)&&(lr[O.message]=!0,bt(R),_("Failed %s type: %s",b,O.message),bt(null))}}}var us=Array.isArray;function Xt(a){return us(a)}function fs(a){{var p=typeof Symbol=="function"&&Symbol.toStringTag,b=p&&a[Symbol.toStringTag]||a.constructor.name||"Object";return b}}function ds(a){try{return fr(a),!1}catch{return!0}}function fr(a){return""+a}function dr(a){if(ds(a))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",fs(a)),fr(a)}var Qe=w.ReactCurrentOwner,hs={key:!0,ref:!0,__self:!0,__source:!0},hr,pr,Zt;Zt={};function ps(a){if(gt.call(a,"ref")){var p=Object.getOwnPropertyDescriptor(a,"ref").get;if(p&&p.isReactWarning)return!1}return a.ref!==void 0}function ms(a){if(gt.call(a,"key")){var p=Object.getOwnPropertyDescriptor(a,"key").get;if(p&&p.isReactWarning)return!1}return a.key!==void 0}function gs(a,p){if(typeof a.ref=="string"&&Qe.current&&p&&Qe.current.stateNode!==p){var b=W(Qe.current.type);Zt[b]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',W(Qe.current.type),a.ref),Zt[b]=!0)}}function bs(a,p){{var b=function(){hr||(hr=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};b.isReactWarning=!0,Object.defineProperty(a,"key",{get:b,configurable:!0})}}function ys(a,p){{var b=function(){pr||(pr=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};b.isReactWarning=!0,Object.defineProperty(a,"ref",{get:b,configurable:!0})}}var vs=function(a,p,b,S,R,A,P){var O={$$typeof:t,type:a,key:p,ref:b,props:P,_owner:A};return O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(O,"_self",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.defineProperty(O,"_source",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O};function ws(a,p,b,S,R){{var A,P={},O=null,U=null;b!==void 0&&(dr(b),O=""+b),ms(p)&&(dr(p.key),O=""+p.key),ps(p)&&(U=p.ref,gs(p,R));for(A in p)gt.call(p,A)&&!hs.hasOwnProperty(A)&&(P[A]=p[A]);if(a&&a.defaultProps){var j=a.defaultProps;for(A in j)P[A]===void 0&&(P[A]=j[A])}if(O||U){var B=typeof a=="function"?a.displayName||a.name||"Unknown":a;O&&bs(P,B),U&&ys(P,B)}return vs(a,O,U,R,S,Qe.current,P)}}var Qt=w.ReactCurrentOwner,mr=w.ReactDebugCurrentFrame;function Ne(a){if(a){var p=a._owner,b=mt(a.type,a._source,p?p.type:null);mr.setExtraStackFrame(b)}else mr.setExtraStackFrame(null)}var en;en=!1;function tn(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function gr(){{if(Qt.current){var a=W(Qt.current.type);if(a)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+a+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+a+"`."}return""}}function _s(a){{if(a!==void 0){var p=a.fileName.replace(/^.*[\\\/]/,""),b=a.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+p+":"+b+"."}return""}}var
|
|
25
|
+
Check your code at `+p+":"+b+"."}return""}}var br={};function Es(a){{var p=gr();if(!p){var b=typeof a=="string"?a:a.displayName||a.name;b&&(p=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+b+">.")}return p}}function br(a,p){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var b=_s(p);if(gr[b])return;gr[b]=!0;var x="";a&&a._owner&&a._owner!==Xt.current&&(x=" It was passed a child from "+W(a._owner.type)+"."),We(a),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',b,x),We(null)}}function yr(a,p){{if(typeof a!="object")return;if(Jt(a))for(var b=0;b<a.length;b++){var x=a[b];Qt(x)&&br(x,p)}else if(Qt(a))a._store&&(a._store.validated=!0);else if(a){var P=S(a);if(typeof P=="function"&&P!==a.entries)for(var A=P.call(a),R;!(R=A.next()).done;)Qt(R.value)&&br(R.value,p)}}}function Es(a){{var p=a.type;if(p==null||typeof p=="string")return;var b;if(typeof p=="function")b=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===l||p.$$typeof===h))b=p.propTypes;else return;if(b){var x=W(p);cs(b,a.props,"prop",x,a)}else if(p.PropTypes!==void 0&&!Zt){Zt=!0;var P=W(p);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",P||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xs(a){{for(var p=Object.keys(a.props),b=0;b<p.length;b++){var x=p[b];if(x!=="children"&&x!=="key"){We(a),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",x),We(null);break}}a.ref!==null&&(We(a),_("Invalid attribute `ref` supplied to `React.Fragment`."),We(null))}}function vr(a,p,b,x,P,A){{var R=H(a);if(!R){var O="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=ws(P);U?O+=U:O+=mr();var L;a===null?L="null":Jt(a)?L="array":a!==void 0&&a.$$typeof===t?(L="<"+(W(a.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):L=typeof a,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,O)}var B=vs(a,p,b,P,A);if(B==null)return B;if(R){var ee=p.children;if(ee!==void 0)if(x)if(Jt(ee)){for(var Ne=0;Ne<ee.length;Ne++)yr(ee[Ne],a);Object.freeze&&Object.freeze(ee)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else yr(ee,a)}return a===r?xs(B):Es(B),B}}function Ss(a,p,b){return vr(a,p,b,!0)}function Os(a,p,b){return vr(a,p,b,!1)}var Ts=Os,Cs=Ss;Ue.Fragment=r,Ue.jsx=Ts,Ue.jsxs=Cs}()),Ue}process.env.NODE_ENV==="production"?yt.exports=_r():yt.exports=Er();var xr=yt.exports;/*! shepherd.js 12.0.1 */function Sr(e){return e instanceof Element}function He(e){return e instanceof HTMLElement}function me(e){return typeof e=="function"}function Ye(e){return typeof e=="string"}function N(e){return e===void 0}class vt{on(t,n,r,o=!1){var s;return N(this.bindings)&&(this.bindings={}),N(this.bindings[t])&&(this.bindings[t]=[]),(s=this.bindings[t])==null||s.push({handler:n,ctx:r,once:o}),this}once(t,n,r){return this.on(t,n,r,!0)}off(t,n){var r;return N(this.bindings)||N(this.bindings[t])?this:(N(n)?delete this.bindings[t]:(r=this.bindings[t])==null||r.forEach((o,s)=>{var i;o.handler===n&&((i=this.bindings[t])==null||i.splice(s,1))}),this)}trigger(t,...n){var r;return!N(this.bindings)&&this.bindings[t]&&((r=this.bindings[t])==null||r.forEach((o,s)=>{var f;const{ctx:i,handler:c,once:l}=o,u=i||this;c.apply(u,n),l&&((f=this.bindings[t])==null||f.splice(s,1))})),this}}function qe(e){var t,n;function r(s,i){try{var c=e[s](i),l=c.value,u=l instanceof nn;Promise.resolve(u?l.v:l).then(function(f){if(u){var h=s==="return"?"return":"next";if(!l.k||f.done)return r(h,f);f=e[h](f).value}o(c.done?"return":"normal",f)},function(f){r("throw",f)})}catch(f){o("throw",f)}}function o(s,i){switch(s){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(s,i){return new Promise(function(c,l){var u={key:s,arg:i,resolve:c,reject:l,next:null};n?n=n.next=u:(t=n=u,r(s,i))})},typeof e.return!="function"&&(this.return=void 0)}qe.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},qe.prototype.next=function(e){return this._invoke("next",e)},qe.prototype.throw=function(e){return this._invoke("throw",e)},qe.prototype.return=function(e){return this._invoke("return",e)};function nn(e,t){this.v=e,this.k=t}function rn(e){return new nn(e,0)}function Or(e){return function(){return new qe(e.apply(this,arguments))}}function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function on(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const ge={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};ge.defaultMerge;function Tr(e,t){return t}function sn(e){return typeof e!="object"||e===null?0:Array.isArray(e)?2:Pr(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Cr(e){const t=new Set;for(const n of e)for(const r of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(r);return t}function Rr(e,t){return typeof e=="object"&&Object.prototype.propertyIsEnumerable.call(e,t)}function an(e){return{*[Symbol.iterator](){for(const t of e)for(const n of t)yield n}}}const cn=new Set(["[object Object]","[object Module]"]);function Pr(e){if(!cn.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"||!cn.has(Object.prototype.toString.call(n))||!n.hasOwnProperty("isPrototypeOf"))}function Ir(e,t,n){const r={};for(const o of Cr(e)){const s=[];for(const l of e)Rr(l,o)&&s.push(l[o]);if(s.length===0)continue;const i=t.metaDataUpdater(n,{key:o,parents:e}),c=un(s,t,i);c!==ge.skip&&(o==="__proto__"?Object.defineProperty(r,o,{value:c,configurable:!0,enumerable:!0,writable:!0}):r[o]=c)}return r}function kr(e){return e.flat()}function Ar(e){return new Set(an(e))}function Mr(e){return new Map(an(e))}function ln(e){return e.at(-1)}var wt=Object.freeze({__proto__:null,mergeArrays:kr,mergeMaps:Mr,mergeOthers:ln,mergeRecords:Ir,mergeSets:Ar});function _t(...e){return Dr({})(...e)}function Dr(e,t){const n=Fr(e,r);function r(...o){return un(o,n,t)}return r}function Fr(e,t){var n,r;return{defaultMergeFunctions:wt,mergeFunctions:j({},wt,Object.fromEntries(Object.entries(e).filter(([o,s])=>Object.hasOwn(wt,o)).map(([o,s])=>s===!1?[o,ln]:[o,s]))),metaDataUpdater:(n=e.metaDataUpdater)!=null?n:Tr,deepmerge:t,useImplicitDefaultMerging:(r=e.enableImplicitDefaultMerging)!=null?r:!1,actions:ge}}function un(e,t,n){if(e.length===0)return;if(e.length===1)return Et(e,t,n);const r=sn(e[0]);if(r!==0&&r!==5){for(let o=1;o<e.length;o++)if(sn(e[o])!==r)return Et(e,t,n)}switch(r){case 1:return Lr(e,t,n);case 2:return jr(e,t,n);case 3:return Br(e,t,n);case 4:return $r(e,t,n);default:return Et(e,t,n)}}function Lr(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords?t.defaultMergeFunctions.mergeRecords(e,t,n):r}function jr(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays?t.defaultMergeFunctions.mergeArrays(e):r}function Br(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets?t.defaultMergeFunctions.mergeSets(e):r}function $r(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps?t.defaultMergeFunctions.mergeMaps(e):r}function Et(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}function fn(e){const t=Object.getOwnPropertyNames(e.constructor.prototype);for(let n=0;n<t.length;n++){const r=t[n],o=e[r];r!=="constructor"&&typeof o=="function"&&(e[r]=o.bind(e))}return e}function Wr(e,t){return n=>{if(e.isOpen()){const r=e.el&&n.currentTarget===e.el;(!N(t)&&n.currentTarget.matches(t)||r)&&e.tour.next()}}}function Nr(e){const{event:t,selector:n}=e.options.advanceOn||{};if(t){const r=Wr(e,n);let o=null;if(!N(n)&&(o=document.querySelector(n),!o))return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);o?(o.addEventListener(t,r),e.on("destroy",()=>o.removeEventListener(t,r))):(document.body.addEventListener(t,r,!0),e.on("destroy",()=>document.body.removeEventListener(t,r,!0)))}else return console.error("advanceOn was defined, but no event name was passed.")}class Vr{constructor(t){}}class Ur{constructor(t,n){}}function dn(e){return!Ye(e)||e===""?"":e.charAt(e.length-1)!=="-"?`${e}-`:e}function Hr(e){const t=e.options.attachTo||{},n=Object.assign({},t);if(me(n.element)&&(n.element=n.element.call(e)),Ye(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 hn(e){return e==null?!0:!e.element||!e.on}function pn(){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 Ie=Math.min,Ee=Math.max,Qe=Math.round,et=Math.floor,be=e=>({x:e,y:e}),Yr={left:"right",right:"left",bottom:"top",top:"bottom"},qr={start:"end",end:"start"};function xt(e,t,n){return Ee(e,Ie(t,n))}function ke(e,t){return typeof e=="function"?e(t):e}function xe(e){return e.split("-")[0]}function tt(e){return e.split("-")[1]}function St(e){return e==="x"?"y":"x"}function Ot(e){return e==="y"?"height":"width"}function nt(e){return["top","bottom"].includes(xe(e))?"y":"x"}function Tt(e){return St(nt(e))}function Kr(e,t,n){n===void 0&&(n=!1);const r=tt(e),o=Tt(e),s=Ot(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=rt(i)),[i,rt(i)]}function zr(e){const t=rt(e);return[Ct(e),t,Ct(t)]}function Ct(e){return e.replace(/start|end/g,t=>qr[t])}function Jr(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function Gr(e,t,n,r){const o=tt(e);let s=Jr(xe(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ct)))),s}function rt(e){return e.replace(/left|right|bottom|top/g,t=>Yr[t])}function Xr(e){return j({top:0,right:0,bottom:0,left:0},e)}function mn(e){return typeof e!="number"?Xr(e):{top:e,right:e,bottom:e,left:e}}function ot(e){return j({},e,{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}const Zr=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],Qr=["mainAxis","crossAxis","limiter"];function gn(e,t,n){let{reference:r,floating:o}=e;const s=nt(t),i=Tt(t),c=Ot(i),l=xe(t),u=s==="y",f=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,d=r[c]/2-o[c]/2;let m;switch(l){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-o.width,y:h};break;default:m={x:r.x,y:r.y}}switch(tt(t)){case"start":m[i]-=d*(n&&u?-1:1);break;case"end":m[i]+=d*(n&&u?-1:1);break}return m}const eo=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=gn(u,r,l),d=r,m={},y=0;for(let E=0;E<c.length;E++){const{name:S,fn:w}=c[E],{x:_,y:T,data:v,reset:g}=await w({x:f,y:h,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=_??f,h=T??h,m=j({},m,{[S]:j({},m[S],v)}),g&&y<=50&&(y++,typeof g=="object"&&(g.placement&&(d=g.placement),g.rects&&(u=g.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):g.rects),{x:f,y:h}=gn(u,d,l)),E=-1)}return{x:f,y:h,placement:d,strategy:o,middlewareData:m}};async function bn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:d=!1,padding:m=0}=ke(t,e),y=mn(m),S=c[d?h==="floating"?"reference":"floating":h],w=ot(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:l})),_=h==="floating"?j({},i.floating,{x:r,y:o}):i.reference,T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(T))?await(s.getScale==null?void 0:s.getScale(T))||{x:1,y:1}:{x:1,y:1},g=ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:T,strategy:l}):_);return{top:(w.top-g.top+y.top)/v.y,bottom:(g.bottom-w.bottom+y.bottom)/v.y,left:(w.left-g.left+y.left)/v.x,right:(g.right-w.right+y.right)/v.x}}const to=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:u,padding:f=0}=ke(e,t)||{};if(u==null)return{};const h=mn(f),d={x:n,y:r},m=Tt(o),y=Ot(m),E=await i.getDimensions(u),S=m==="y",w=S?"top":"left",_=S?"bottom":"right",T=S?"clientHeight":"clientWidth",v=s.reference[y]+s.reference[m]-d[m]-s.floating[y],g=d[m]-s.reference[m],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let V=C?C[T]:0;(!V||!await(i.isElement==null?void 0:i.isElement(C)))&&(V=c.floating[T]||s.floating[y]);const re=v/2-g/2,$=V/2-E[y]/2-1,H=Ie(h[w],$),G=Ie(h[_],$),X=H,W=V-E[y]-G,M=V/2-E[y]/2+re,Z=xt(X,M,W),Q=!l.arrow&&tt(o)!=null&&M!==Z&&s.reference[y]/2-(M<X?H:G)-E[y]/2<0,K=Q?M<X?M-X:M-W:0;return{[m]:d[m]+K,data:j({[m]:Z,centerOffset:M-Z-K},Q&&{alignmentOffset:K}),reset:Q}}}),no=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var r,o;const{placement:s,middlewareData:i,rects:c,initialPlacement:l,platform:u,elements:f}=n,h=ke(t,n),{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:y,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0}=h,_=on(h,Zr);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const T=xe(s),v=xe(l)===l,g=await(u.isRTL==null?void 0:u.isRTL(f.floating)),C=y||(v||!w?[rt(l)]:zr(l));!y&&S!=="none"&&C.push(...Gr(l,w,S,g));const V=[l,...C],re=await bn(n,_),$=[];let H=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&$.push(re[T]),m){const M=Kr(s,c,g);$.push(re[M[0]],re[M[1]])}if(H=[...H,{placement:s,overflows:$}],!$.every(M=>M<=0)){var G,X;const M=(((G=i.flip)==null?void 0:G.index)||0)+1,Z=V[M];if(Z)return{data:{index:M,overflows:H},reset:{placement:Z}};let Q=(X=H.filter(K=>K.overflows[0]<=0).sort((K,de)=>K.overflows[1]-de.overflows[1])[0])==null?void 0:X.placement;if(!Q)switch(E){case"bestFit":{var W;const K=(W=H.map(de=>[de.placement,de.overflows.filter(_e=>_e>0).reduce((_e,dt)=>_e+dt,0)]).sort((de,_e)=>de[1]-_e[1])[0])==null?void 0:W[0];K&&(Q=K);break}case"initialPlacement":Q=l;break}if(s!==Q)return{reset:{placement:Q}}}return{}}}},ro=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:r,y:o,placement:s}=n,i=ke(t,n),{mainAxis:c=!0,crossAxis:l=!1,limiter:u={fn:_=>{let{x:T,y:v}=_;return{x:T,y:v}}}}=i,f=on(i,Qr),h={x:r,y:o},d=await bn(n,f),m=nt(xe(s)),y=St(m);let E=h[y],S=h[m];if(c){const _=y==="y"?"top":"left",T=y==="y"?"bottom":"right",v=E+d[_],g=E-d[T];E=xt(v,E,g)}if(l){const _=m==="y"?"top":"left",T=m==="y"?"bottom":"right",v=S+d[_],g=S-d[T];S=xt(v,S,g)}const w=u.fn(j({},n,{[y]:E,[m]:S}));return j({},w,{data:{x:w.x-r,y:w.y-o}})}}},oo=function(t){return t===void 0&&(t={}),{options:t,fn(n){const{x:r,y:o,placement:s,rects:i,middlewareData:c}=n,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=ke(t,n),h={x:r,y:o},d=nt(s),m=St(d);let y=h[m],E=h[d];const S=ke(l,n),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:j({mainAxis:0,crossAxis:0},S);if(u){const v=m==="y"?"height":"width",g=i.reference[m]-i.floating[v]+w.mainAxis,C=i.reference[m]+i.reference[v]-w.mainAxis;y<g?y=g:y>C&&(y=C)}if(f){var _,T;const v=m==="y"?"width":"height",g=["top","left"].includes(xe(s)),C=i.reference[d]-i.floating[v]+(g&&((_=c.offset)==null?void 0:_[d])||0)+(g?0:w.crossAxis),V=i.reference[d]+i.reference[v]+(g?0:((T=c.offset)==null?void 0:T[d])||0)-(g?w.crossAxis:0);E<C?E=C:E>V&&(E=V)}return{[m]:y,[d]:E}}}};function ye(e){return yn(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(yn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yn(e){return e instanceof Node||e instanceof Y(e).Node}function ce(e){return e instanceof Element||e instanceof Y(e).Element}function ie(e){return e instanceof HTMLElement||e instanceof Y(e).HTMLElement}function vn(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Ke(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function io(e){return["table","td","th"].includes(ye(e))}function Rt(e){const t=Pt(),n=z(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(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function so(e){let t=Ae(e);for(;ie(t)&&!it(t);){if(Rt(t))return t;t=Ae(t)}return null}function Pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function it(e){return["html","body","#document"].includes(ye(e))}function z(e){return Y(e).getComputedStyle(e)}function st(e){return ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ae(e){if(ye(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vn(e)&&e.host||ae(e);return vn(t)?t.host:t}function wn(e){const t=Ae(e);return it(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ke(t)?t:wn(t)}function ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wn(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Y(o);return s?t.concat(i,i.visualViewport||[],Ke(o)?o:[],i.frameElement&&n?ze(i.frameElement):[]):t.concat(o,ze(o,[],n))}function _n(e){const t=z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ie(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=Qe(n)!==s||Qe(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function It(e){return ce(e)?e:e.contextElement}function Me(e){const t=It(e);if(!ie(t))return be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=_n(t);let i=(s?Qe(n.width):n.width)/r,c=(s?Qe(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const ao=be(0);function En(e){const t=Y(e);return!Pt()||!t.visualViewport?ao:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function co(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Y(e)?!1:t}function Se(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=It(e);let i=be(1);t&&(r?ce(r)&&(i=Me(r)):i=Me(e));const c=co(s,n,r)?En(s):be(0);let l=(o.left+c.x)/i.x,u=(o.top+c.y)/i.y,f=o.width/i.x,h=o.height/i.y;if(s){const d=Y(s),m=r&&ce(r)?Y(r):r;let y=d,E=y.frameElement;for(;E&&r&&m!==y;){const S=Me(E),w=E.getBoundingClientRect(),_=z(E),T=w.left+(E.clientLeft+parseFloat(_.paddingLeft))*S.x,v=w.top+(E.clientTop+parseFloat(_.paddingTop))*S.y;l*=S.x,u*=S.y,f*=S.x,h*=S.y,l+=T,u+=v,y=Y(E),E=y.frameElement}}return ot({width:f,height:h,x:l,y:u})}const lo=[":popover-open",":modal"];function xn(e){return lo.some(t=>{try{return e.matches(t)}catch{return!1}})}function uo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=ae(r),c=t?xn(t.floating):!1;if(r===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=be(1);const f=be(0),h=ie(r);if((h||!h&&!s)&&((ye(r)!=="body"||Ke(i))&&(l=st(r)),ie(r))){const d=Se(r);u=Me(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x,y:n.y*u.y-l.scrollTop*u.y+f.y}}function fo(e){return Array.from(e.getClientRects())}function Sn(e){return Se(ae(e)).left+st(e).scrollLeft}function ho(e){const t=ae(e),n=st(e),r=e.ownerDocument.body,o=Ee(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ee(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Sn(e);const c=-n.scrollTop;return z(r).direction==="rtl"&&(i+=Ee(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}function po(e,t){const n=Y(e),r=ae(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,l=0;if(o){s=o.width,i=o.height;const u=Pt();(!u||u&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:c,y:l}}function mo(e,t){const n=Se(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ie(e)?Me(e):be(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:c,x:l,y:u}}function On(e,t,n){let r;if(t==="viewport")r=po(e,n);else if(t==="document")r=ho(ae(e));else if(ce(t))r=mo(t,n);else{const o=En(e);r=j({},t,{x:t.x-o.x,y:t.y-o.y})}return ot(r)}function Tn(e,t){const n=Ae(e);return n===t||!ce(n)||it(n)?!1:z(n).position==="fixed"||Tn(n,t)}function go(e,t){const n=t.get(e);if(n)return n;let r=ze(e,[],!1).filter(c=>ce(c)&&ye(c)!=="body"),o=null;const s=z(e).position==="fixed";let i=s?Ae(e):e;for(;ce(i)&&!it(i);){const c=z(i),l=Rt(i);!l&&c.position==="fixed"&&(o=null),(s?!l&&!o:!l&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ke(i)&&!l&&Tn(e,i))?r=r.filter(f=>f!==i):o=c,i=Ae(i)}return t.set(e,r),r}function bo(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?go(t,this._c):[].concat(n),r],c=i[0],l=i.reduce((u,f)=>{const h=On(t,f,o);return u.top=Ee(h.top,u.top),u.right=Ie(h.right,u.right),u.bottom=Ie(h.bottom,u.bottom),u.left=Ee(h.left,u.left),u},On(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function yo(e){const{width:t,height:n}=_n(e);return{width:t,height:n}}function vo(e,t,n){const r=ie(t),o=ae(t),s=n==="fixed",i=Se(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=be(0);if(r||!r&&!s)if((ye(t)!=="body"||Ke(o))&&(c=st(t)),r){const h=Se(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=Sn(o));const u=i.left+c.scrollLeft-l.x,f=i.top+c.scrollTop-l.y;return{x:u,y:f,width:i.width,height:i.height}}function Cn(e,t){return!ie(e)||z(e).position==="fixed"?null:t?t(e):e.offsetParent}function Rn(e,t){const n=Y(e);if(!ie(e)||xn(e))return n;let r=Cn(e,t);for(;r&&io(r)&&z(r).position==="static";)r=Cn(r,t);return r&&(ye(r)==="html"||ye(r)==="body"&&z(r).position==="static"&&!Rt(r))?n:r||so(e)||n}const wo=async function(t){const n=this.getOffsetParent||Rn,r=this.getDimensions;return{reference:vo(t.reference,await n(t.floating),t.strategy),floating:j({x:0,y:0},await r(t.floating))}};function _o(e){return z(e).direction==="rtl"}const Eo={convertOffsetParentRelativeRectToViewportRelativeRect:uo,getDocumentElement:ae,getClippingRect:bo,getOffsetParent:Rn,getElementRects:wo,getClientRects:fo,getDimensions:yo,getScale:Me,isElement:ce,isRTL:_o};function xo(e,t){let n=null,r;const o=ae(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:u,top:f,width:h,height:d}=e.getBoundingClientRect();if(c||t(),!h||!d)return;const m=et(f),y=et(o.clientWidth-(u+h)),E=et(o.clientHeight-(f+d)),S=et(u),_={rootMargin:-m+"px "+-y+"px "+-E+"px "+-S+"px",threshold:Ee(0,Ie(1,l))||1};let T=!0;function v(g){const C=g[0].intersectionRatio;if(C!==l){if(!T)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},100)}T=!1}try{n=new IntersectionObserver(v,j({},_,{root:o.ownerDocument}))}catch{n=new IntersectionObserver(v,_)}n.observe(e)}return i(!0),s}function So(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=It(e),f=o||s?[...u?ze(u):[],...ze(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const h=u&&c?xo(u,n):null;let d=-1,m=null;i&&(m=new ResizeObserver(w=>{let[_]=w;_&&_.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var T;(T=m)==null||T.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let y,E=l?Se(e):null;l&&S();function S(){const w=Se(e);E&&(w.x!==E.x||w.y!==E.y||w.width!==E.width||w.height!==E.height)&&n(),E=w,y=requestAnimationFrame(S)}return n(),()=>{var w;f.forEach(_=>{o&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),h==null||h(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const Oo=ro,To=no,Co=to,Ro=oo,Po=(e,t,n)=>{const r=new Map,o=j({platform:Eo},n),s=j({},o.platform,{_c:r});return eo(e,t,j({},o,{platform:s}))};function Io(e){e.cleanup&&e.cleanup();const t=e._getResolvedAttachToOptions();let n=t.element;const r=Lo(t,e),o=hn(t);return o&&(n=document.body,e.shepherdElementComponent.getElement().classList.add("shepherd-centered")),e.cleanup=So(n,e.el,()=>{var s;if(!e.el){(s=e.cleanup)==null||s.call(e);return}Mo(n,e,r,o)}),e.target=t.element,r}function ko(e,t){return{floatingUIOptions:_t(e.floatingUIOptions||{},t.floatingUIOptions||{})}}function Ao(e){e.cleanup&&e.cleanup(),e.cleanup=null}function Mo(e,t,n,r){return Po(e,t.el,n).then(Do(t,r)).then(o=>new Promise(s=>{setTimeout(()=>s(o),300)})).then(o=>{o!=null&&o.el&&o.el.focus({preventScroll:!0})})}function Do(e,t){return({x:n,y:r,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:`${r}px`}),e.el.dataset.popperPlacement=o,Fo(e.el,s)),e)}function Fo(e,t){const n=e.querySelector(".shepherd-arrow");if(He(n)&&t.arrow){const{x:r,y:o}=t.arrow;Object.assign(n.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:""})}}function Lo(e,t){const n={strategy:"absolute"};n.middleware=[];const r=jo(t);return hn(e)||(n.middleware.push(To(),Oo({limiter:Ro(),crossAxis:!0})),r&&n.middleware.push(Co({element:r})),n.placement=e.on),_t(t.options.floatingUIOptions||{},n)}function jo(e){return e.options.arrow&&e.el?e.el.querySelector(".shepherd-arrow"):!1}function q(){}function Bo(e,t){for(const n in t)e[n]=t[n];return e}function Pn(e){return e()}function In(){return Object.create(null)}function Je(e){e.forEach(Pn)}function kt(e){return typeof e=="function"}function le(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function $o(e){return Object.keys(e).length===0}function De(e,t){e.appendChild(t)}function te(e,t,n){e.insertBefore(t,n||null)}function J(e){e.parentNode&&e.parentNode.removeChild(e)}function Wo(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function se(e){return document.createElement(e)}function kn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function An(e){return document.createTextNode(e)}function at(){return An(" ")}function No(){return An("")}function ct(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function k(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const Vo=["width","height"];function Mn(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set&&Vo.indexOf(r)===-1?e[r]=t[r]:k(e,r,t[r])}function Uo(e){return Array.from(e.childNodes)}function Fe(e,t,n){e.classList.toggle(t,!!n)}let Ge;function Xe(e){Ge=e}function Dn(){if(!Ge)throw new Error("Function called outside component initialization");return Ge}function Ho(e){Dn().$$.on_mount.push(e)}function At(e){Dn().$$.after_update.push(e)}const Le=[],je=[];let Be=[];const Fn=[],Yo=Promise.resolve();let Mt=!1;function qo(){Mt||(Mt=!0,Yo.then(Ln))}function Dt(e){Be.push(e)}const Ft=new Set;let $e=0;function Ln(){if($e!==0)return;const e=Ge;do{try{for(;$e<Le.length;){const t=Le[$e];$e++,Xe(t),Ko(t.$$)}}catch(t){throw Le.length=0,$e=0,t}for(Xe(null),Le.length=0,$e=0;je.length;)je.pop()();for(let t=0;t<Be.length;t+=1){const n=Be[t];Ft.has(n)||(Ft.add(n),n())}Be.length=0}while(Le.length);for(;Fn.length;)Fn.pop()();Mt=!1,Ft.clear(),Xe(e)}function Ko(e){if(e.fragment!==null){e.update(),Je(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Dt)}}function zo(e){const t=[],n=[];Be.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Be=t}const lt=new Set;let Oe;function Te(){Oe={r:0,c:[],p:Oe}}function Ce(){Oe.r||Je(Oe.c),Oe=Oe.p}function I(e,t){e&&e.i&&(lt.delete(e),e.i(t))}function D(e,t,n,r){if(e&&e.o){if(lt.has(e))return;lt.add(e),Oe.c.push(()=>{lt.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}function jn(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Jo(e,t){const n={},r={},o={$$scope:1};let s=e.length;for(;s--;){const i=e[s],c=t[s];if(c){for(const l in i)l in c||(r[l]=1);for(const l in c)o[l]||(n[l]=c[l],o[l]=1);e[s]=c}else for(const l in i)o[l]=1}for(const i in r)i in n||(n[i]=void 0);return n}function Re(e){e&&e.c()}function ve(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),Dt(()=>{const s=e.$$.on_mount.map(Pn).filter(kt);e.$$.on_destroy?e.$$.on_destroy.push(...s):Je(s),e.$$.on_mount=[]}),o.forEach(Dt)}function we(e,t){const n=e.$$;n.fragment!==null&&(zo(n.after_update),Je(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Go(e,t){e.$$.dirty[0]===-1&&(Le.push(e),qo(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ue(e,t,n,r,o,s,i=null,c=[-1]){const l=Ge;Xe(e);const u=e.$$={fragment:null,ctx:[],props:s,update:q,not_equal:o,bound:In(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:In(),dirty:c,skip_bound:!1,root:t.target||l.$$.root};i&&i(u.root);let f=!1;if(u.ctx=n?n(e,t.props||{},(h,d,...m)=>{const y=m.length?m[0]:d;return u.ctx&&o(u.ctx[h],u.ctx[h]=y)&&(!u.skip_bound&&u.bound[h]&&u.bound[h](y),f&&Go(e,h)),d}):[],u.update(),f=!0,Je(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const h=Uo(t.target);u.fragment&&u.fragment.l(h),h.forEach(J)}else u.fragment&&u.fragment.c();t.intro&&I(e.$$.fragment),ve(e,t.target,t.anchor),Ln()}Xe(l)}class fe{constructor(){this.$$=void 0,this.$$set=void 0}$destroy(){we(this,1),this.$destroy=q}$on(t,n){if(!kt(n))return q;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(t){this.$$set&&!$o(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Xo="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Xo);function Zo(e){let t,n,r,o,s;return{c(){t=se("button"),k(t,"aria-label",n=e[3]?e[3]:null),k(t,"class",r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`),t.disabled=e[2],k(t,"tabindex","0"),k(t,"type","button")},m(i,c){te(i,t,c),t.innerHTML=e[5],o||(s=ct(t,"click",function(){kt(e[0])&&e[0].apply(this,arguments)}),o=!0)},p(i,[c]){e=i,c&32&&(t.innerHTML=e[5]),c&8&&n!==(n=e[3]?e[3]:null)&&k(t,"aria-label",n),c&18&&r!==(r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`)&&k(t,"class",r),c&4&&(t.disabled=e[2])},i:q,o:q,d(i){i&&J(t),o=!1,s()}}}function Qo(e,t,n){let{config:r,step:o}=t,s,i,c,l,u,f;function h(d){return me(d)?d=d.call(o):d}return e.$$set=d=>{"config"in d&&n(6,r=d.config),"step"in d&&n(7,o=d.step)},e.$$.update=()=>{e.$$.dirty&192&&(n(0,s=r.action?r.action.bind(o.tour):null),n(1,i=r.classes),n(2,c=r.disabled?h(r.disabled):!1),n(3,l=r.label?h(r.label):null),n(4,u=r.secondary),n(5,f=r.text?h(r.text):null))},[s,i,c,l,u,f,r,o]}class ei extends fe{constructor(t){super(),ue(this,t,Qo,Zo,le,{config:6,step:7})}}function Bn(e,t,n){const r=e.slice();return r[2]=t[n],r}function $n(e){let t,n,r=jn(e[1]),o=[];for(let i=0;i<r.length;i+=1)o[i]=Wn(Bn(e,r,i));const s=i=>D(o[i],1,1,()=>{o[i]=null});return{c(){for(let i=0;i<o.length;i+=1)o[i].c();t=No()},m(i,c){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(i,c);te(i,t,c),n=!0},p(i,c){if(c&3){r=jn(i[1]);let l;for(l=0;l<r.length;l+=1){const u=Bn(i,r,l);o[l]?(o[l].p(u,c),I(o[l],1)):(o[l]=Wn(u),o[l].c(),I(o[l],1),o[l].m(t.parentNode,t))}for(Te(),l=r.length;l<o.length;l+=1)s(l);Ce()}},i(i){if(!n){for(let c=0;c<r.length;c+=1)I(o[c]);n=!0}},o(i){o=o.filter(Boolean);for(let c=0;c<o.length;c+=1)D(o[c]);n=!1},d(i){i&&J(t),Wo(o,i)}}}function Wn(e){let t,n;return t=new ei({props:{config:e[2],step:e[0]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&2&&(s.config=r[2]),o&1&&(s.step=r[0]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function ti(e){let t,n,r=e[1]&&$n(e);return{c(){t=se("footer"),r&&r.c(),k(t,"class","shepherd-footer")},m(o,s){te(o,t,s),r&&r.m(t,null),n=!0},p(o,[s]){o[1]?r?(r.p(o,s),s&2&&I(r,1)):(r=$n(o),r.c(),I(r,1),r.m(t,null)):r&&(Te(),D(r,1,1,()=>{r=null}),Ce())},i(o){n||(I(r),n=!0)},o(o){D(r),n=!1},d(o){o&&J(t),r&&r.d()}}}function ni(e,t,n){let r,{step:o}=t;return e.$$set=s=>{"step"in s&&n(0,o=s.step)},e.$$.update=()=>{e.$$.dirty&1&&n(1,r=o.options.buttons)},[o,r]}class ri extends fe{constructor(t){super(),ue(this,t,ni,ti,le,{step:0})}}function oi(e){let t,n,r,o,s;return{c(){t=se("button"),n=se("span"),n.textContent="×",k(n,"aria-hidden","true"),k(t,"aria-label",r=e[0].label?e[0].label:"Close Tour"),k(t,"class","shepherd-cancel-icon"),k(t,"type","button")},m(i,c){te(i,t,c),De(t,n),o||(s=ct(t,"click",e[1]),o=!0)},p(i,[c]){c&1&&r!==(r=i[0].label?i[0].label:"Close Tour")&&k(t,"aria-label",r)},i:q,o:q,d(i){i&&J(t),o=!1,s()}}}function ii(e,t,n){let{cancelIcon:r,step:o}=t;const s=i=>{i.preventDefault(),o.cancel()};return e.$$set=i=>{"cancelIcon"in i&&n(0,r=i.cancelIcon),"step"in i&&n(2,o=i.step)},[r,s,o]}class si extends fe{constructor(t){super(),ue(this,t,ii,oi,le,{cancelIcon:0,step:2})}}function ai(e){let t;return{c(){t=se("h3"),k(t,"id",e[1]),k(t,"class","shepherd-title")},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:q,o:q,d(n){n&&J(t),e[3](null)}}}function ci(e,t,n){let{labelId:r,element:o,title:s}=t;At(()=>{me(s)&&n(2,s=s()),n(0,o.innerHTML=s,o)});function i(c){je[c?"unshift":"push"](()=>{o=c,n(0,o)})}return e.$$set=c=>{"labelId"in c&&n(1,r=c.labelId),"element"in c&&n(0,o=c.element),"title"in c&&n(2,s=c.title)},[o,r,s,i]}class li extends fe{constructor(t){super(),ue(this,t,ci,ai,le,{labelId:1,element:0,title:2})}}function Nn(e){let t,n;return t=new li({props:{labelId:e[0],title:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&1&&(s.labelId=r[0]),o&4&&(s.title=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Vn(e){let t,n;return t=new si({props:{cancelIcon:e[3],step:e[1]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&8&&(s.cancelIcon=r[3]),o&2&&(s.step=r[1]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function ui(e){let t,n,r,o=e[2]&&Nn(e),s=e[3]&&e[3].enabled&&Vn(e);return{c(){t=se("header"),o&&o.c(),n=at(),s&&s.c(),k(t,"class","shepherd-header")},m(i,c){te(i,t,c),o&&o.m(t,null),De(t,n),s&&s.m(t,null),r=!0},p(i,[c]){i[2]?o?(o.p(i,c),c&4&&I(o,1)):(o=Nn(i),o.c(),I(o,1),o.m(t,n)):o&&(Te(),D(o,1,1,()=>{o=null}),Ce()),i[3]&&i[3].enabled?s?(s.p(i,c),c&8&&I(s,1)):(s=Vn(i),s.c(),I(s,1),s.m(t,null)):s&&(Te(),D(s,1,1,()=>{s=null}),Ce())},i(i){r||(I(o),I(s),r=!0)},o(i){D(o),D(s),r=!1},d(i){i&&J(t),o&&o.d(),s&&s.d()}}}function fi(e,t,n){let{labelId:r,step:o}=t,s,i;return e.$$set=c=>{"labelId"in c&&n(0,r=c.labelId),"step"in c&&n(1,o=c.step)},e.$$.update=()=>{e.$$.dirty&2&&(n(2,s=o.options.title),n(3,i=o.options.cancelIcon))},[r,o,s,i]}class di extends fe{constructor(t){super(),ue(this,t,fi,ui,le,{labelId:0,step:1})}}function hi(e){let t;return{c(){t=se("div"),k(t,"class","shepherd-text"),k(t,"id",e[1])},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:q,o:q,d(n){n&&J(t),e[3](null)}}}function pi(e,t,n){let{descriptionId:r,element:o,step:s}=t;At(()=>{let{text:c}=s.options;me(c)&&(c=c.call(s)),He(c)?o.appendChild(c):n(0,o.innerHTML=c,o)});function i(c){je[c?"unshift":"push"](()=>{o=c,n(0,o)})}return e.$$set=c=>{"descriptionId"in c&&n(1,r=c.descriptionId),"element"in c&&n(0,o=c.element),"step"in c&&n(2,s=c.step)},[o,r,s,i]}class mi extends fe{constructor(t){super(),ue(this,t,pi,hi,le,{descriptionId:1,element:0,step:2})}}function Un(e){let t,n;return t=new di({props:{labelId:e[1],step:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&2&&(s.labelId=r[1]),o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Hn(e){let t,n;return t=new mi({props:{descriptionId:e[0],step:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&1&&(s.descriptionId=r[0]),o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Yn(e){let t,n;return t=new ri({props:{step:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function gi(e){let t,n=!N(e[2].options.title)||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled,r,o=!N(e[2].options.text),s,i=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,c,l=n&&Un(e),u=o&&Hn(e),f=i&&Yn(e);return{c(){t=se("div"),l&&l.c(),r=at(),u&&u.c(),s=at(),f&&f.c(),k(t,"class","shepherd-content")},m(h,d){te(h,t,d),l&&l.m(t,null),De(t,r),u&&u.m(t,null),De(t,s),f&&f.m(t,null),c=!0},p(h,[d]){d&4&&(n=!N(h[2].options.title)||h[2].options.cancelIcon&&h[2].options.cancelIcon.enabled),n?l?(l.p(h,d),d&4&&I(l,1)):(l=Un(h),l.c(),I(l,1),l.m(t,r)):l&&(Te(),D(l,1,1,()=>{l=null}),Ce()),d&4&&(o=!N(h[2].options.text)),o?u?(u.p(h,d),d&4&&I(u,1)):(u=Hn(h),u.c(),I(u,1),u.m(t,s)):u&&(Te(),D(u,1,1,()=>{u=null}),Ce()),d&4&&(i=Array.isArray(h[2].options.buttons)&&h[2].options.buttons.length),i?f?(f.p(h,d),d&4&&I(f,1)):(f=Yn(h),f.c(),I(f,1),f.m(t,null)):f&&(Te(),D(f,1,1,()=>{f=null}),Ce())},i(h){c||(I(l),I(u),I(f),c=!0)},o(h){D(l),D(u),D(f),c=!1},d(h){h&&J(t),l&&l.d(),u&&u.d(),f&&f.d()}}}function bi(e,t,n){let{descriptionId:r,labelId:o,step:s}=t;return e.$$set=i=>{"descriptionId"in i&&n(0,r=i.descriptionId),"labelId"in i&&n(1,o=i.labelId),"step"in i&&n(2,s=i.step)},[r,o,s]}class yi extends fe{constructor(t){super(),ue(this,t,bi,gi,le,{descriptionId:0,labelId:1,step:2})}}function qn(e){let t;return{c(){t=se("div"),k(t,"class","shepherd-arrow"),k(t,"data-popper-arrow","")},m(n,r){te(n,t,r)},d(n){n&&J(t)}}}function vi(e){let t,n,r,o,s,i,c,l,u=e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on&&qn();r=new yi({props:{descriptionId:e[2],labelId:e[3],step:e[4]}});let f=[{"aria-describedby":o=N(e[4].options.text)?null:e[2]},{"aria-labelledby":s=e[4].options.title?e[3]:null},e[1],{role:"dialog"},{tabindex:"0"}],h={};for(let d=0;d<f.length;d+=1)h=Bo(h,f[d]);return{c(){t=se("div"),u&&u.c(),n=at(),Re(r.$$.fragment),Mn(t,h),Fe(t,"shepherd-has-cancel-icon",e[5]),Fe(t,"shepherd-has-title",e[6]),Fe(t,"shepherd-element",!0)},m(d,m){te(d,t,m),u&&u.m(t,null),De(t,n),ve(r,t,null),e[13](t),i=!0,c||(l=ct(t,"keydown",e[7]),c=!0)},p(d,[m]){d[4].options.arrow&&d[4].options.attachTo&&d[4].options.attachTo.element&&d[4].options.attachTo.on?u||(u=qn(),u.c(),u.m(t,n)):u&&(u.d(1),u=null);const y={};m&4&&(y.descriptionId=d[2]),m&8&&(y.labelId=d[3]),m&16&&(y.step=d[4]),r.$set(y),Mn(t,h=Jo(f,[(!i||m&20&&o!==(o=N(d[4].options.text)?null:d[2]))&&{"aria-describedby":o},(!i||m&24&&s!==(s=d[4].options.title?d[3]:null))&&{"aria-labelledby":s},m&2&&d[1],{role:"dialog"},{tabindex:"0"}])),Fe(t,"shepherd-has-cancel-icon",d[5]),Fe(t,"shepherd-has-title",d[6]),Fe(t,"shepherd-element",!0)},i(d){i||(I(r.$$.fragment,d),i=!0)},o(d){D(r.$$.fragment,d),i=!1},d(d){d&&J(t),u&&u.d(),we(r),e[13](null),c=!1,l()}}}const wi=9,_i=27,Ei=37,xi=39;function Kn(e){return e.split(" ").filter(t=>!!t.length)}function Si(e,t,n){let{classPrefix:r,element:o,descriptionId:s,firstFocusableElement:i,focusableElements:c,labelId:l,lastFocusableElement:u,step:f,dataStepId:h}=t,d,m,y;const E=()=>o;Ho(()=>{n(1,h={[`data-${r}shepherd-step-id`]:f.id}),n(9,c=o.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,i=c[0]),n(10,u=c[c.length-1])}),At(()=>{y!==f.options.classes&&S()});function S(){w(y),y=f.options.classes,_(y)}function w(g){if(Ye(g)){const C=Kn(g);C.length&&o.classList.remove(...C)}}function _(g){if(Ye(g)){const C=Kn(g);C.length&&o.classList.add(...C)}}const T=g=>{const{tour:C}=f;switch(g.keyCode){case wi:if(c.length===0){g.preventDefault();break}g.shiftKey?(document.activeElement===i||document.activeElement.classList.contains("shepherd-element"))&&(g.preventDefault(),u.focus()):document.activeElement===u&&(g.preventDefault(),i.focus());break;case _i:C.options.exitOnEsc&&(g.preventDefault(),g.stopPropagation(),f.cancel());break;case Ei:C.options.keyboardNavigation&&(g.preventDefault(),g.stopPropagation(),C.back());break;case xi:C.options.keyboardNavigation&&(g.preventDefault(),g.stopPropagation(),C.next());break}};function v(g){je[g?"unshift":"push"](()=>{o=g,n(0,o)})}return e.$$set=g=>{"classPrefix"in g&&n(11,r=g.classPrefix),"element"in g&&n(0,o=g.element),"descriptionId"in g&&n(2,s=g.descriptionId),"firstFocusableElement"in g&&n(8,i=g.firstFocusableElement),"focusableElements"in g&&n(9,c=g.focusableElements),"labelId"in g&&n(3,l=g.labelId),"lastFocusableElement"in g&&n(10,u=g.lastFocusableElement),"step"in g&&n(4,f=g.step),"dataStepId"in g&&n(1,h=g.dataStepId)},e.$$.update=()=>{e.$$.dirty&16&&(n(5,d=f.options&&f.options.cancelIcon&&f.options.cancelIcon.enabled),n(6,m=f.options&&f.options.title))},[o,h,s,l,f,d,m,T,i,c,u,r,E,v]}class Oi extends fe{constructor(t){super(),ue(this,t,Si,vi,le,{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 Lt extends vt{constructor(t,n={}){return super(),this.tour=t,this.classPrefix=this.tour.options?dn(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,fn(this),this._setOptions(n),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){Ao(this),He(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")}_resolveAttachToOptions(){return this._resolvedAttachTo=Hr(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return this._resolvedAttachTo===null?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return me(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 Oi({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();me(this.options.scrollToHandler)?this.options.scrollToHandler(n):Sr(n)&&typeof n.scrollIntoView=="function"&&n.scrollIntoView(t)}_getClassOptions(t){const n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,r=t.classes?t.classes:"",o=n&&n.classes?n.classes:"",s=[...r.split(" "),...o.split(" ")],i=new Set(s);return Array.from(i).join(" ").trim()}_setOptions(t={}){let n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;n=_t({},n||{}),this.options=Object.assign({arrow:!0},n,t,ko(n,t));const{when:r}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${pn()}`,r&&Object.keys(r).forEach(o=>{this.on(o,r[o],this)})}_setupElements(){N(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&Nr(this),Io(this)}_show(){var r;this.trigger("before-show"),this._resolveAttachToOptions(),this._setupElements(),this.tour.modal||this.tour.setupModal(),(r=this.tour.modal)==null||r.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 t=this.shepherdElementComponent.getElement(),n=this.target||document.body;n.classList.add(`${this.classPrefix}shepherd-enabled`),n.classList.add(`${this.classPrefix}shepherd-target`),t.classList.add("shepherd-enabled"),this.trigger("show")}_styleTargetElementForStep(t){const n=t.target;n&&(t.options.highlightClass&&n.classList.add(t.options.highlightClass),n.classList.remove("shepherd-target-click-disabled"),t.options.canClickTarget===!1&&n.classList.add("shepherd-target-click-disabled"))}_updateStepTargetOnHide(){const t=this.target||document.body;this.options.highlightClass&&t.classList.remove(this.options.highlightClass),t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}}function Ti(e){let t={};if(e.navigator){const n=e.navigator.userAgent;t={...t,$os:Ri(e),$browser:zn(n,e.navigator.vendor,!!e.opera),$referrer:e.document.referrer,$referring_domain:Ii(e.document.referrer),$device:Pi(n),$current_url:e.location.href,$host:e.location.host,$pathname:e.location.pathname,$browser_version:Ci(n,e.navigator.vendor,!!e.opera),$screen_height:e.screen.height,$screen_width:e.screen.width,$screen_dpr:e.devicePixelRatio}}return t={...t,$lib:"js",$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:new Date().getTime()/1e3},t}function F(e,t){return e.indexOf(t)>=0}function zn(e,t,n){return t=t||"",n||F(e," OPR/")?F(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":F(e,"IEMobile")||F(e,"WPDesktop")?"Internet Explorer Mobile":F(e,"SamsungBrowser/")?"Samsung Internet":F(e,"Edge")||F(e,"Edg/")?"Microsoft Edge":F(e,"FBIOS")?"Facebook Mobile":F(e,"Chrome")?"Chrome":F(e,"CriOS")?"Chrome iOS":F(e,"UCWEB")||F(e,"UCBrowser")?"UC Browser":F(e,"FxiOS")?"Firefox iOS":F(t,"Apple")?F(e,"Mobile")?"Mobile Safari":"Safari":F(e,"Android")?"Android Mobile":F(e,"Konqueror")?"Konqueror":F(e,"Firefox")?"Firefox":F(e,"MSIE")||F(e,"Trident/")?"Internet Explorer":F(e,"Gecko")?"Mozilla":""}function Ci(e,t,n){const r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},o=zn(e,t,n),s=r[o]||void 0;if(s===void 0)return null;const i=e.match(s);return i?parseFloat(i[i.length-2]):null}function Ri(e){const t=e.navigator.userAgent;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""}function Pi(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""}function Ii(e){const t=e.split("/");return t.length>=3?t[2]:""}function ki(e){if(e){const{steps:t}=e;t.forEach(n=>{n.options&&n.options.canClickTarget===!1&&n.options.attachTo&&He(n.target)&&n.target.classList.remove("shepherd-target-click-disabled")})}}const jt=(e,t)=>t.some(n=>e instanceof n);let Jn,Gn;function Ai(){return Jn||(Jn=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Mi(){return Gn||(Gn=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Bt=new WeakMap,$t=new WeakMap,ut=new WeakMap;function Di(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(Pe(e.result)),o()},i=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",i)});return ut.set(t,e),t}function Fi(e){if(Bt.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{n(),o()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});Bt.set(e,t)}let Wt={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Bt.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Pe(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Xn(e){Wt=e(Wt)}function Li(e){return Mi().includes(e)?function(...t){return e.apply(Nt(this),t),Pe(this.request)}:function(...t){return Pe(e.apply(Nt(this),t))}}function ji(e){return typeof e=="function"?Li(e):(e instanceof IDBTransaction&&Fi(e),jt(e,Ai())?new Proxy(e,Wt):e)}function Pe(e){if(e instanceof IDBRequest)return Di(e);if($t.has(e))return $t.get(e);const t=ji(e);return t!==e&&($t.set(e,t),ut.set(t,e)),t}const Nt=e=>ut.get(e);function Bi(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),c=Pe(i);return r&&i.addEventListener("upgradeneeded",l=>{r(Pe(i.result),l.oldVersion,l.newVersion,Pe(i.transaction),l)}),n&&i.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),c.then(l=>{s&&l.addEventListener("close",()=>s()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}const $i=["get","getKey","getAll","getAllKeys","count"],Wi=["put","add","delete","clear"],Vt=new Map;function Zn(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Vt.get(t))return Vt.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Wi.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||$i.includes(n)))return;const s=async function(c,...l){const u=this.transaction(c,o?"readwrite":"readonly");let f=u.store;return r&&(f=f.index(l.shift())),(await Promise.all([f[n](...l),o&&u.done]))[0]};return Vt.set(t,s),s}Xn(e=>j({},e,{get:(t,n,r)=>Zn(t,n)||e.get(t,n,r),has:(t,n)=>!!Zn(t,n)||e.has(t,n)}));const Ni=["continue","continuePrimaryKey","advance"],Qn={},Ut=new WeakMap,er=new WeakMap,Vi={get(e,t){if(!Ni.includes(t))return e[t];let n=Qn[t];return n||(n=Qn[t]=function(...r){Ut.set(this,er.get(this)[t](...r))}),n}};function Ui(){return Ht.apply(this,arguments)}function Ht(){return Ht=Or(function*(...e){let t=this;if(t instanceof IDBCursor||(t=yield rn(t.openCursor(...e))),!t)return;t=t;const n=new Proxy(t,Vi);for(er.set(n,t),ut.set(n,Nt(t));t;)yield n,t=yield rn(Ut.get(n)||t.continue()),Ut.delete(n)}),Ht.apply(this,arguments)}function tr(e,t){return t===Symbol.asyncIterator&&jt(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&jt(e,[IDBIndex,IDBObjectStore])}Xn(e=>j({},e,{get(t,n,r){return tr(t,n)?Ui:e.get(t,n,r)},has(t,n){return tr(t,n)||e.has(t,n)}}));class Hi{constructor(t,n,r){if(!t)throw new Error("Shepherd Pro: Missing required apiKey option.");if(!n)throw new Error("Shepherd Pro: Missing required apiPath option.");this.apiKey=t,this.apiPath=n,this.properties=r}async getTourState(){try{const t=await fetch(`${this.apiPath}/api/v1/state`,{headers:{Authorization:`ApiKey ${this.apiKey}`,"Content-Type":"application/json"},method:"GET"});if(!t.ok)throw new Error("Could not fetch state for tours 🐑");const{data:n}=await t.json();if(this.tourStateDb=await Bi("TourState",1,{upgrade(r){r.createObjectStore("tours",{keyPath:"uniqueId"})}}),Array.isArray(n)&&n.length){const r=this.tourStateDb.transaction("tours","readwrite"),o=n.map(s=>r.store.put(s));await Promise.all([...o,r.done])}}catch(t){throw new Error("Error fetching data: "+(t instanceof Error?t.message:"Unknown error"))}}async sendEvents(t){t.data.properties=this.properties;try{const n=await fetch(`${this.apiPath}/api/v1/actor`,{headers:{Authorization:`ApiKey ${this.apiKey}`,"Content-Type":"application/json"},method:"POST",body:JSON.stringify(t)});if(!n.ok)throw new Error("Could not create an event 🐑");const{data:r}=await n.json();return r}catch(n){throw new Error("Error fetching data: "+(n instanceof Error?n.message:"Unknown error"))}}}function Yi({width:e,height:t,x:n=0,y:r=0,r:o=0}){const{innerWidth:s,innerHeight:i}=window,{topLeft:c=0,topRight:l=0,bottomRight:u=0,bottomLeft:f=0}=typeof o=="number"?{topLeft:o,topRight:o,bottomRight:o,bottomLeft:o}:o;return`M${s},${i}H0V0H${s}V${i}ZM${n+c},${r}a${c},${c},0,0,0-${c},${c}V${t+r-f}a${f},${f},0,0,0,${f},${f}H${e+n-u}a${u},${u},0,0,0,${u}-${u}V${r+l}a${l},${l},0,0,0-${l}-${l}Z`}function qi(e){let t,n,r,o,s;return{c(){t=kn("svg"),n=kn("path"),k(n,"d",e[2]),k(t,"class",r=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(i,c){te(i,t,c),De(t,n),e[11](t),o||(s=ct(t,"touchmove",e[3]),o=!0)},p(i,[c]){c&4&&k(n,"d",i[2]),c&2&&r!==(r=`${i[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&k(t,"class",r)},i:q,o:q,d(i){i&&J(t),e[11](null),o=!1,s()}}}function nr(e){if(!e)return null;const n=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return n!=="hidden"&&n!=="visible"&&e.scrollHeight>=e.clientHeight?e:nr(e.parentElement)}function Ki(e){let t={top:0,left:0};if(!e)return t;let n=e.ownerDocument.defaultView;for(;n!==window.top;){var r;const i=(r=n)==null?void 0:r.frameElement;if(i){var o,s;const c=i.getBoundingClientRect();t.top+=c.top+((o=c.scrollTop)!=null?o:0),t.left+=c.left+((s=c.scrollLeft)!=null?s:0)}n=n.parent}return t}function zi(e,t){const n=e.getBoundingClientRect();let r=n.y||n.top,o=n.bottom||r+n.height;if(t){const i=t.getBoundingClientRect(),c=i.y||i.top,l=i.bottom||c+i.height;r=Math.max(r,c),o=Math.min(o,l)}const s=Math.max(o-r,0);return{y:r,height:s}}function Ji(e,t,n){let{element:r,openingProperties:o}=t,s=!1,i,c;u();const l=()=>r;function u(){n(4,o={width:0,height:0,x:0,y:0,r:0})}function f(){n(1,s=!1),w()}function h(v=0,g=0,C=0,V=0,re,$){if($){const{y:H,height:G}=zi($,re),{x:X,width:W,left:M}=$.getBoundingClientRect();n(4,o={width:W+v*2,height:G+v*2,x:(X||M)+C-v,y:H+V-v,r:g})}else u()}function d(v){w(),v.tour.options.useModalOverlay?(_(v),m()):f()}function m(){n(1,s=!0)}const y=v=>{v.preventDefault()},E=v=>{v.stopPropagation()};function S(){window.addEventListener("touchmove",y,{passive:!1})}function w(){i&&(cancelAnimationFrame(i),i=void 0),window.removeEventListener("touchmove",y,{passive:!1})}function _(v){const{modalOverlayOpeningPadding:g,modalOverlayOpeningRadius:C,modalOverlayOpeningXOffset:V=0,modalOverlayOpeningYOffset:re=0}=v.options,$=Ki(v.target),H=nr(v.target),G=()=>{i=void 0,h(g,C,V+$.left,re+$.top,H,v.target),i=requestAnimationFrame(G)};G(),S()}function T(v){je[v?"unshift":"push"](()=>{r=v,n(0,r)})}return e.$$set=v=>{"element"in v&&n(0,r=v.element),"openingProperties"in v&&n(4,o=v.openingProperties)},e.$$.update=()=>{e.$$.dirty&16&&n(2,c=Yi(o))},[r,s,c,E,o,l,u,f,h,d,m,T]}class Gi extends fe{constructor(t){super(),ue(this,t,Ji,qi,le,{element:0,openingProperties:4,getElement:5,closeModalOpening:6,hide:7,positionModal:8,setupForStep:9,show:10})}get getElement(){return this.$$.ctx[5]}get closeModalOpening(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[7]}get positionModal(){return this.$$.ctx[8]}get setupForStep(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}}const Xi="https://shepherdpro.com",Yt="shepherdPro:userId";class Zi extends vt{constructor(){super(...arguments),this.isProEnabled=!1}async init(t,n,r){if(!t)throw new Error("Shepherd Pro: Missing required apiKey option.");if(this.apiKey=t,this.apiPath=n??Xi,this.properties=r??{},this.properties.context=Ti(window),this.apiKey){this.dataRequester=new Hi(this.apiKey,this.apiPath,this.properties),this.isProEnabled=!0;const o=localStorage.getItem(Yt),s=[this.dataRequester.getTourState()];o||s.push(this.createNewActor()),await Promise.all(s)}}async createNewActor(){if(!this.dataRequester)return;const t=await this.dataRequester.sendEvents({data:{currentUserId:null,eventType:"setup"}});localStorage.setItem(Yt,String(t.actorId))}async isTourEnabled(t){var r;if(!this.dataRequester)return;const n=await((r=this.dataRequester.tourStateDb)==null?void 0:r.get("tours",t));return(n==null?void 0:n.isActive)??!0}}class Qi extends vt{constructor(t={}){super(),this.trackedEvents=["active","cancel","complete","show"],fn(this);const n={exitOnEsc:!0,keyboardNavigation:!0};this.options=Object.assign({},n,t),this.classPrefix=dn(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(s=>{(i=>{this.on(i,c=>{c=c||{},c.tour=this,ne.trigger(i,c)})})(s)}),this._setTourID(t.id);const{dataRequester:o}=ne;return o&&this.trackedEvents.forEach(s=>this.on(s,i=>{const{tour:c}=i,{id:l,steps:u}=c;let f;if(s!=="active"){const{step:d}=i;d&&(f=u.findIndex(m=>m.id===d.id)+1)}const h={currentUserId:localStorage.getItem(Yt),eventType:s,journeyData:{id:l,currentStep:f,numberOfSteps:u.length,tourOptions:c.options}};o.sendEvents({data:h})})),this}addStep(t,n){let r=t;return r instanceof Lt?r.tour=this:r=new Lt(this,r),N(n)?this.steps.push(r):this.steps.splice(n,0,r),r}addSteps(t){return Array.isArray(t)&&t.forEach(n=>{this.addStep(n)}),this}back(){const t=this.steps.indexOf(this.currentStep);this.show(t-1,!1)}async cancel(){if(this.options.confirmCancel){const t=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";let n;me(this.options.confirmCancel)?n=await this.options.confirmCancel():n=window.confirm(t),n&&this._done("cancel")}else this._done("cancel")}complete(){this._done("complete")}getById(t){return this.steps.find(n=>n.id===t)}getCurrentStep(){return this.currentStep}hide(){const t=this.getCurrentStep();if(t)return t.hide()}isActive(){return ne.activeTour===this}next(){const t=this.steps.indexOf(this.currentStep);t===this.steps.length-1?this.complete():this.show(t+1,!0)}removeStep(t){const n=this.getCurrentStep();this.steps.some((r,o)=>{if(r.id===t)return r.isOpen()&&r.hide(),r.destroy(),this.steps.splice(o,1),!0}),n&&n.id===t&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(t=0,n=!0){const r=Ye(t)?this.getById(t):this.steps[t];r&&(this._updateStateBeforeShow(),me(r.options.showOn)&&!r.options.showOn()?this._skipStep(r,n):(this.trigger("show",{step:r,previous:this.currentStep}),this.currentStep=r,r.show()))}async start(){ne.isProEnabled&&!await ne.isTourEnabled(this.options.id)||(this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this.setupModal(),this._setupActiveTour(),this.next())}_done(t){const n=this.steps.indexOf(this.currentStep);if(Array.isArray(this.steps)&&this.steps.forEach(r=>r.destroy()),ki(this),this.trigger(t,{index:n}),ne.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),(t==="cancel"||t==="complete")&&this.modal){const r=document.querySelector(".shepherd-modal-overlay-container");r&&(r.remove(),this.modal=null)}He(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),ne.activeTour=this}setupModal(){this.modal=new Gi({target:this.options.modalContainer||document.body,props:{styles:this.styles}})}_skipStep(t,n){const r=this.steps.indexOf(t);if(r===this.steps.length-1)this.complete();else{const o=n?r+1:r-1;this.show(o,n)}}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(t){const n=this.options.tourName||"tour",r=t||pn();this.id=`${n}--${r}`}}const ne=new Zi,rr=typeof window>"u";ne.Step=rr?Vr:Lt,ne.Tour=rr?Ur:Qi;const ft=pe.createContext(void 0),es=ft.Consumer,ts=()=>{const e=pe.useContext(ft);if(!e)throw new Error("useShepherd must be used within a ShepherdJourneyProvider");const{Shepherd:t}=e;return t},ns=({apiKey:e,apiPath:t,properties:n,children:r})=>(typeof window<"u"&&ne.init(e,t,n),xr.jsx(ft.Provider,{value:{Shepherd:ne},children:r}));oe.JourneyMethods=es,oe.ShepherdJourneyContext=ft,oe.ShepherdJourneyProvider=ns,oe.useShepherd=ts,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
Check the top-level render call using <`+b+">.")}return p}}function yr(a,p){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var b=Es(p);if(br[b])return;br[b]=!0;var S="";a&&a._owner&&a._owner!==Qt.current&&(S=" It was passed a child from "+W(a._owner.type)+"."),Ne(a),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',b,S),Ne(null)}}function vr(a,p){{if(typeof a!="object")return;if(Xt(a))for(var b=0;b<a.length;b++){var S=a[b];tn(S)&&yr(S,p)}else if(tn(a))a._store&&(a._store.validated=!0);else if(a){var R=x(a);if(typeof R=="function"&&R!==a.entries)for(var A=R.call(a),P;!(P=A.next()).done;)tn(P.value)&&yr(P.value,p)}}}function Ss(a){{var p=a.type;if(p==null||typeof p=="string")return;var b;if(typeof p=="function")b=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===l||p.$$typeof===h))b=p.propTypes;else return;if(b){var S=W(p);ls(b,a.props,"prop",S,a)}else if(p.PropTypes!==void 0&&!en){en=!0;var R=W(p);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xs(a){{for(var p=Object.keys(a.props),b=0;b<p.length;b++){var S=p[b];if(S!=="children"&&S!=="key"){Ne(a),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",S),Ne(null);break}}a.ref!==null&&(Ne(a),_("Invalid attribute `ref` supplied to `React.Fragment`."),Ne(null))}}function wr(a,p,b,S,R,A){{var P=H(a);if(!P){var O="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=_s(R);U?O+=U:O+=gr();var j;a===null?j="null":Xt(a)?j="array":a!==void 0&&a.$$typeof===t?(j="<"+(W(a.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):j=typeof a,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,O)}var B=ws(a,p,b,R,A);if(B==null)return B;if(P){var Q=p.children;if(Q!==void 0)if(S)if(Xt(Q)){for(var Ve=0;Ve<Q.length;Ve++)vr(Q[Ve],a);Object.freeze&&Object.freeze(Q)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else vr(Q,a)}return a===r?xs(B):Ss(B),B}}function Os(a,p,b){return wr(a,p,b,!0)}function Ts(a,p,b){return wr(a,p,b,!1)}var Cs=Ts,Ps=Os;He.Fragment=r,He.jsx=Cs,He.jsxs=Ps}()),He}process.env.NODE_ENV==="production"?yt.exports=Er():yt.exports=Sr();var xr=yt.exports;/*! shepherd.js 12.0.6 */function Or(e){return e instanceof Element}function Ye(e){return e instanceof HTMLElement}function me(e){return typeof e=="function"}function qe(e){return typeof e=="string"}function N(e){return e===void 0}class vt{on(t,n,r,o=!1){var s;return N(this.bindings)&&(this.bindings={}),N(this.bindings[t])&&(this.bindings[t]=[]),(s=this.bindings[t])==null||s.push({handler:n,ctx:r,once:o}),this}once(t,n,r){return this.on(t,n,r,!0)}off(t,n){if(N(this.bindings)||N(this.bindings[t]))return this;if(N(n))delete this.bindings[t];else{var r;(r=this.bindings[t])==null||r.forEach((o,s)=>{if(o.handler===n){var i;(i=this.bindings[t])==null||i.splice(s,1)}})}return this}trigger(t,...n){if(!N(this.bindings)&&this.bindings[t]){var r;(r=this.bindings[t])==null||r.forEach((o,s)=>{const{ctx:i,handler:c,once:l}=o,u=i||this;if(c.apply(u,n),l){var f;(f=this.bindings[t])==null||f.splice(s,1)}})}return this}}function Ke(e){var t,n;function r(s,i){try{var c=e[s](i),l=c.value,u=l instanceof on;Promise.resolve(u?l.v:l).then(function(f){if(u){var h=s==="return"?"return":"next";if(!l.k||f.done)return r(h,f);f=e[h](f).value}o(c.done?"return":"normal",f)},function(f){r("throw",f)})}catch(f){o("throw",f)}}function o(s,i){switch(s){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(s,i){return new Promise(function(c,l){var u={key:s,arg:i,resolve:c,reject:l,next:null};n?n=n.next=u:(t=n=u,r(s,i))})},typeof e.return!="function"&&(this.return=void 0)}Ke.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Ke.prototype.next=function(e){return this._invoke("next",e)},Ke.prototype.throw=function(e){return this._invoke("throw",e)},Ke.prototype.return=function(e){return this._invoke("return",e)};function on(e,t){this.v=e,this.k=t}function sn(e){return new on(e,0)}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(null,arguments)}function an(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Tr(e){return function(){return new Ke(e.apply(this,arguments))}}const ge={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};ge.defaultMerge;function Cr(e,t){return t}function cn(e){return typeof e!="object"||e===null?0:Array.isArray(e)?2:Ir(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Pr(e){const t=new Set;for(const n of e)for(const r of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(r);return t}function Rr(e,t){return typeof e=="object"&&Object.prototype.propertyIsEnumerable.call(e,t)}function ln(e){return{*[Symbol.iterator](){for(const t of e)for(const n of t)yield n}}}const un=new Set(["[object Object]","[object Module]"]);function Ir(e){if(!un.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"||!un.has(Object.prototype.toString.call(n))||!n.hasOwnProperty("isPrototypeOf"))}function kr(e,t,n){const r={};for(const o of Pr(e)){const s=[];for(const l of e)Rr(l,o)&&s.push(l[o]);if(s.length===0)continue;const i=t.metaDataUpdater(n,{key:o,parents:e}),c=dn(s,t,i);c!==ge.skip&&(o==="__proto__"?Object.defineProperty(r,o,{value:c,configurable:!0,enumerable:!0,writable:!0}):r[o]=c)}return r}function Ar(e){return e.flat()}function Mr(e){return new Set(ln(e))}function Dr(e){return new Map(ln(e))}function fn(e){return e.at(-1)}var wt=Object.freeze({__proto__:null,mergeArrays:Ar,mergeMaps:Dr,mergeOthers:fn,mergeRecords:kr,mergeSets:Mr});function _t(...e){return Fr({})(...e)}function Fr(e,t){const n=Lr(e,r);function r(...o){return dn(o,n,t)}return r}function Lr(e,t){var n,r;return{defaultMergeFunctions:wt,mergeFunctions:D({},wt,Object.fromEntries(Object.entries(e).filter(([o,s])=>Object.hasOwn(wt,o)).map(([o,s])=>s===!1?[o,fn]:[o,s]))),metaDataUpdater:(n=e.metaDataUpdater)!=null?n:Cr,deepmerge:t,useImplicitDefaultMerging:(r=e.enableImplicitDefaultMerging)!=null?r:!1,actions:ge}}function dn(e,t,n){if(e.length===0)return;if(e.length===1)return Et(e,t,n);const r=cn(e[0]);if(r!==0&&r!==5){for(let o=1;o<e.length;o++)if(cn(e[o])!==r)return Et(e,t,n)}switch(r){case 1:return jr(e,t,n);case 2:return Br(e,t,n);case 3:return $r(e,t,n);case 4:return Wr(e,t,n);default:return Et(e,t,n)}}function jr(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords?t.defaultMergeFunctions.mergeRecords(e,t,n):r}function Br(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays?t.defaultMergeFunctions.mergeArrays(e):r}function $r(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets?t.defaultMergeFunctions.mergeSets(e):r}function Wr(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps?t.defaultMergeFunctions.mergeMaps(e):r}function Et(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}function hn(e){const t=Object.getOwnPropertyNames(e.constructor.prototype);for(let n=0;n<t.length;n++){const r=t[n],o=e[r];r!=="constructor"&&typeof o=="function"&&(e[r]=o.bind(e))}return e}function Nr(e,t){return n=>{if(e.isOpen()){const r=e.el&&n.currentTarget===e.el;(!N(t)&&n.currentTarget.matches(t)||r)&&e.tour.next()}}}function Vr(e){const{event:t,selector:n}=e.options.advanceOn||{};if(t){const r=Nr(e,n);let o=null;if(!N(n)&&(o=document.querySelector(n),!o))return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);o?(o.addEventListener(t,r),e.on("destroy",()=>o.removeEventListener(t,r))):(document.body.addEventListener(t,r,!0),e.on("destroy",()=>document.body.removeEventListener(t,r,!0)))}else return console.error("advanceOn was defined, but no event name was passed.")}class Ur{constructor(t){}}class Hr{constructor(t,n){}}function pn(e){return!qe(e)||e===""?"":e.charAt(e.length-1)!=="-"?`${e}-`:e}function Yr(e){const t=e.options.attachTo||{},n=Object.assign({},t);if(me(n.element)&&(n.element=n.element.call(e)),qe(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 mn(e){return e==null?!0:!e.element||!e.on}function gn(){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 Ie=Math.min,Ee=Math.max,et=Math.round,tt=Math.floor,be=e=>({x:e,y:e}),qr={left:"right",right:"left",bottom:"top",top:"bottom"},Kr={start:"end",end:"start"};function St(e,t,n){return Ee(e,Ie(t,n))}function ke(e,t){return typeof e=="function"?e(t):e}function Se(e){return e.split("-")[0]}function nt(e){return e.split("-")[1]}function xt(e){return e==="x"?"y":"x"}function Ot(e){return e==="y"?"height":"width"}function rt(e){return["top","bottom"].includes(Se(e))?"y":"x"}function Tt(e){return xt(rt(e))}function zr(e,t,n){n===void 0&&(n=!1);const r=nt(e),o=Tt(e),s=Ot(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ot(i)),[i,ot(i)]}function Jr(e){const t=ot(e);return[Ct(e),t,Ct(t)]}function Ct(e){return e.replace(/start|end/g,t=>Kr[t])}function Gr(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function Xr(e,t,n,r){const o=nt(e);let s=Gr(Se(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ct)))),s}function ot(e){return e.replace(/left|right|bottom|top/g,t=>qr[t])}function Zr(e){return D({top:0,right:0,bottom:0,left:0},e)}function bn(e){return typeof e!="number"?Zr(e):{top:e,right:e,bottom:e,left:e}}function it(e){return D({},e,{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}const Qr=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],eo=["mainAxis","crossAxis","limiter"];function yn(e,t,n){let{reference:r,floating:o}=e;const s=rt(t),i=Tt(t),c=Ot(i),l=Se(t),u=s==="y",f=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,d=r[c]/2-o[c]/2;let m;switch(l){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-o.width,y:h};break;default:m={x:r.x,y:r.y}}switch(nt(t)){case"start":m[i]-=d*(n&&u?-1:1);break;case"end":m[i]+=d*(n&&u?-1:1);break}return m}const to=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=yn(u,r,l),d=r,m={},y=0;for(let E=0;E<c.length;E++){const{name:x,fn:w}=c[E],{x:_,y:T,data:v,reset:g}=await w({x:f,y:h,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=_??f,h=T??h,m=D({},m,{[x]:D({},m[x],v)}),g&&y<=50&&(y++,typeof g=="object"&&(g.placement&&(d=g.placement),g.rects&&(u=g.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):g.rects),{x:f,y:h}=yn(u,d,l)),E=-1)}return{x:f,y:h,placement:d,strategy:o,middlewareData:m}};async function vn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:d=!1,padding:m=0}=ke(t,e),y=bn(m),x=c[d?h==="floating"?"reference":"floating":h],w=it(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:l})),_=h==="floating"?D({},i.floating,{x:r,y:o}):i.reference,T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(T))?await(s.getScale==null?void 0:s.getScale(T))||{x:1,y:1}:{x:1,y:1},g=it(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:T,strategy:l}):_);return{top:(w.top-g.top+y.top)/v.y,bottom:(g.bottom-w.bottom+y.bottom)/v.y,left:(w.left-g.left+y.left)/v.x,right:(g.right-w.right+y.right)/v.x}}const no=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:u,padding:f=0}=ke(e,t)||{};if(u==null)return{};const h=bn(f),d={x:n,y:r},m=Tt(o),y=Ot(m),E=await i.getDimensions(u),x=m==="y",w=x?"top":"left",_=x?"bottom":"right",T=x?"clientHeight":"clientWidth",v=s.reference[y]+s.reference[m]-d[m]-s.floating[y],g=d[m]-s.reference[m],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let V=C?C[T]:0;(!V||!await(i.isElement==null?void 0:i.isElement(C)))&&(V=c.floating[T]||s.floating[y]);const re=v/2-g/2,$=V/2-E[y]/2-1,H=Ie(h[w],$),J=Ie(h[_],$),G=H,W=V-E[y]-J,M=V/2-E[y]/2+re,X=St(G,M,W),Z=!l.arrow&&nt(o)!=null&&M!==X&&s.reference[y]/2-(M<G?H:J)-E[y]/2<0,K=Z?M<G?M-G:M-W:0;return{[m]:d[m]+K,data:D({[m]:X,centerOffset:M-X-K},Z&&{alignmentOffset:K}),reset:Z}}}),ro=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var r,o;const{placement:s,middlewareData:i,rects:c,initialPlacement:l,platform:u,elements:f}=n,h=ke(t,n),{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:y,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0}=h,_=an(h,Qr);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const T=Se(s),v=Se(l)===l,g=await(u.isRTL==null?void 0:u.isRTL(f.floating)),C=y||(v||!w?[ot(l)]:Jr(l));!y&&x!=="none"&&C.push(...Xr(l,w,x,g));const V=[l,...C],re=await vn(n,_),$=[];let H=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&$.push(re[T]),m){const M=zr(s,c,g);$.push(re[M[0]],re[M[1]])}if(H=[...H,{placement:s,overflows:$}],!$.every(M=>M<=0)){var J,G;const M=(((J=i.flip)==null?void 0:J.index)||0)+1,X=V[M];if(X)return{data:{index:M,overflows:H},reset:{placement:X}};let Z=(G=H.filter(K=>K.overflows[0]<=0).sort((K,de)=>K.overflows[1]-de.overflows[1])[0])==null?void 0:G.placement;if(!Z)switch(E){case"bestFit":{var W;const K=(W=H.map(de=>[de.placement,de.overflows.filter(_e=>_e>0).reduce((_e,dt)=>_e+dt,0)]).sort((de,_e)=>de[1]-_e[1])[0])==null?void 0:W[0];K&&(Z=K);break}case"initialPlacement":Z=l;break}if(s!==Z)return{reset:{placement:Z}}}return{}}}},oo=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:r,y:o,placement:s}=n,i=ke(t,n),{mainAxis:c=!0,crossAxis:l=!1,limiter:u={fn:_=>{let{x:T,y:v}=_;return{x:T,y:v}}}}=i,f=an(i,eo),h={x:r,y:o},d=await vn(n,f),m=rt(Se(s)),y=xt(m);let E=h[y],x=h[m];if(c){const _=y==="y"?"top":"left",T=y==="y"?"bottom":"right",v=E+d[_],g=E-d[T];E=St(v,E,g)}if(l){const _=m==="y"?"top":"left",T=m==="y"?"bottom":"right",v=x+d[_],g=x-d[T];x=St(v,x,g)}const w=u.fn(D({},n,{[y]:E,[m]:x}));return D({},w,{data:{x:w.x-r,y:w.y-o}})}}},io=function(t){return t===void 0&&(t={}),{options:t,fn(n){const{x:r,y:o,placement:s,rects:i,middlewareData:c}=n,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=ke(t,n),h={x:r,y:o},d=rt(s),m=xt(d);let y=h[m],E=h[d];const x=ke(l,n),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:D({mainAxis:0,crossAxis:0},x);if(u){const v=m==="y"?"height":"width",g=i.reference[m]-i.floating[v]+w.mainAxis,C=i.reference[m]+i.reference[v]-w.mainAxis;y<g?y=g:y>C&&(y=C)}if(f){var _,T;const v=m==="y"?"width":"height",g=["top","left"].includes(Se(s)),C=i.reference[d]-i.floating[v]+(g&&((_=c.offset)==null?void 0:_[d])||0)+(g?0:w.crossAxis),V=i.reference[d]+i.reference[v]+(g?0:((T=c.offset)==null?void 0:T[d])||0)-(g?w.crossAxis:0);E<C?E=C:E>V&&(E=V)}return{[m]:y,[d]:E}}}};function Ae(e){return wn(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ce(e){var t;return(t=(wn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wn(e){return e instanceof Node||e instanceof Y(e).Node}function ie(e){return e instanceof Element||e instanceof Y(e).Element}function se(e){return e instanceof HTMLElement||e instanceof Y(e).HTMLElement}function _n(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function ze(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function so(e){return["table","td","th"].includes(Ae(e))}function Pt(e){const t=Rt(),n=ee(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(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function ao(e){let t=ye(e);for(;se(t)&&!Me(t);){if(Pt(t))return t;t=ye(t)}return null}function Rt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Me(e){return["html","body","#document"].includes(Ae(e))}function ee(e){return Y(e).getComputedStyle(e)}function st(e){return ie(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ye(e){if(Ae(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_n(e)&&e.host||ce(e);return _n(t)?t.host:t}function En(e){const t=ye(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&ze(t)?t:En(t)}function Je(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=En(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Y(o);return s?t.concat(i,i.visualViewport||[],ze(o)?o:[],i.frameElement&&n?Je(i.frameElement):[]):t.concat(o,Je(o,[],n))}function Sn(e){const t=ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=se(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=et(n)!==s||et(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function It(e){return ie(e)?e:e.contextElement}function De(e){const t=It(e);if(!se(t))return be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Sn(t);let i=(s?et(n.width):n.width)/r,c=(s?et(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const co=be(0);function xn(e){const t=Y(e);return!Rt()||!t.visualViewport?co:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Y(e)?!1:t}function xe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=It(e);let i=be(1);t&&(r?ie(r)&&(i=De(r)):i=De(e));const c=lo(s,n,r)?xn(s):be(0);let l=(o.left+c.x)/i.x,u=(o.top+c.y)/i.y,f=o.width/i.x,h=o.height/i.y;if(s){const d=Y(s),m=r&&ie(r)?Y(r):r;let y=d,E=y.frameElement;for(;E&&r&&m!==y;){const x=De(E),w=E.getBoundingClientRect(),_=ee(E),T=w.left+(E.clientLeft+parseFloat(_.paddingLeft))*x.x,v=w.top+(E.clientTop+parseFloat(_.paddingTop))*x.y;l*=x.x,u*=x.y,f*=x.x,h*=x.y,l+=T,u+=v,y=Y(E),E=y.frameElement}}return it({width:f,height:h,x:l,y:u})}const uo=[":popover-open",":modal"];function kt(e){return uo.some(t=>{try{return e.matches(t)}catch{return!1}})}function fo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=ce(r),c=t?kt(t.floating):!1;if(r===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=be(1);const f=be(0),h=se(r);if((h||!h&&!s)&&((Ae(r)!=="body"||ze(i))&&(l=st(r)),se(r))){const d=xe(r);u=De(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x,y:n.y*u.y-l.scrollTop*u.y+f.y}}function ho(e){return Array.from(e.getClientRects())}function On(e){return xe(ce(e)).left+st(e).scrollLeft}function po(e){const t=ce(e),n=st(e),r=e.ownerDocument.body,o=Ee(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ee(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+On(e);const c=-n.scrollTop;return ee(r).direction==="rtl"&&(i+=Ee(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}function mo(e,t){const n=Y(e),r=ce(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,l=0;if(o){s=o.width,i=o.height;const u=Rt();(!u||u&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:c,y:l}}function go(e,t){const n=xe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=se(e)?De(e):be(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:c,x:l,y:u}}function Tn(e,t,n){let r;if(t==="viewport")r=mo(e,n);else if(t==="document")r=po(ce(e));else if(ie(t))r=go(t,n);else{const o=xn(e);r=D({},t,{x:t.x-o.x,y:t.y-o.y})}return it(r)}function Cn(e,t){const n=ye(e);return n===t||!ie(n)||Me(n)?!1:ee(n).position==="fixed"||Cn(n,t)}function bo(e,t){const n=t.get(e);if(n)return n;let r=Je(e,[],!1).filter(c=>ie(c)&&Ae(c)!=="body"),o=null;const s=ee(e).position==="fixed";let i=s?ye(e):e;for(;ie(i)&&!Me(i);){const c=ee(i),l=Pt(i);!l&&c.position==="fixed"&&(o=null),(s?!l&&!o:!l&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ze(i)&&!l&&Cn(e,i))?r=r.filter(f=>f!==i):o=c,i=ye(i)}return t.set(e,r),r}function yo(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?kt(t)?[]:bo(t,this._c):[].concat(n),r],c=i[0],l=i.reduce((u,f)=>{const h=Tn(t,f,o);return u.top=Ee(h.top,u.top),u.right=Ie(h.right,u.right),u.bottom=Ie(h.bottom,u.bottom),u.left=Ee(h.left,u.left),u},Tn(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vo(e){const{width:t,height:n}=Sn(e);return{width:t,height:n}}function wo(e,t,n){const r=se(t),o=ce(t),s=n==="fixed",i=xe(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=be(0);if(r||!r&&!s)if((Ae(t)!=="body"||ze(o))&&(c=st(t)),r){const h=xe(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=On(o));const u=i.left+c.scrollLeft-l.x,f=i.top+c.scrollTop-l.y;return{x:u,y:f,width:i.width,height:i.height}}function At(e){return ee(e).position==="static"}function Pn(e,t){return!se(e)||ee(e).position==="fixed"?null:t?t(e):e.offsetParent}function Rn(e,t){const n=Y(e);if(kt(e))return n;if(!se(e)){let o=ye(e);for(;o&&!Me(o);){if(ie(o)&&!At(o))return o;o=ye(o)}return n}let r=Pn(e,t);for(;r&&so(r)&&At(r);)r=Pn(r,t);return r&&Me(r)&&At(r)&&!Pt(r)?n:r||ao(e)||n}const _o=async function(t){const n=this.getOffsetParent||Rn,r=this.getDimensions,o=await r(t.floating);return{reference:wo(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Eo(e){return ee(e).direction==="rtl"}const So={convertOffsetParentRelativeRectToViewportRelativeRect:fo,getDocumentElement:ce,getClippingRect:yo,getOffsetParent:Rn,getElementRects:_o,getClientRects:ho,getDimensions:vo,getScale:De,isElement:ie,isRTL:Eo};function xo(e,t){let n=null,r;const o=ce(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:u,top:f,width:h,height:d}=e.getBoundingClientRect();if(c||t(),!h||!d)return;const m=tt(f),y=tt(o.clientWidth-(u+h)),E=tt(o.clientHeight-(f+d)),x=tt(u),_={rootMargin:-m+"px "+-y+"px "+-E+"px "+-x+"px",threshold:Ee(0,Ie(1,l))||1};let T=!0;function v(g){const C=g[0].intersectionRatio;if(C!==l){if(!T)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}T=!1}try{n=new IntersectionObserver(v,D({},_,{root:o.ownerDocument}))}catch{n=new IntersectionObserver(v,_)}n.observe(e)}return i(!0),s}function Oo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=It(e),f=o||s?[...u?Je(u):[],...Je(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const h=u&&c?xo(u,n):null;let d=-1,m=null;i&&(m=new ResizeObserver(w=>{let[_]=w;_&&_.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var T;(T=m)==null||T.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let y,E=l?xe(e):null;l&&x();function x(){const w=xe(e);E&&(w.x!==E.x||w.y!==E.y||w.width!==E.width||w.height!==E.height)&&n(),E=w,y=requestAnimationFrame(x)}return n(),()=>{var w;f.forEach(_=>{o&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),h==null||h(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const To=oo,Co=ro,Po=no,Ro=io,Io=(e,t,n)=>{const r=new Map,o=D({platform:So},n),s=D({},o.platform,{_c:r});return to(e,t,D({},o,{platform:s}))};function ko(e){e.cleanup&&e.cleanup();const t=e._getResolvedAttachToOptions();let n=t.element;const r=jo(t,e),o=mn(t);return o&&(n=document.body,e.shepherdElementComponent.getElement().classList.add("shepherd-centered")),e.cleanup=Oo(n,e.el,()=>{if(!e.el){e.cleanup==null||e.cleanup();return}Do(n,e,r,o)}),e.target=t.element,r}function Ao(e,t){return{floatingUIOptions:_t(e.floatingUIOptions||{},t.floatingUIOptions||{})}}function Mo(e){e.cleanup&&e.cleanup(),e.cleanup=null}function Do(e,t,n,r){return Io(e,t.el,n).then(Fo(t,r)).then(o=>new Promise(s=>{setTimeout(()=>s(o),300)})).then(o=>{o!=null&&o.el&&o.el.focus({preventScroll:!0})})}function Fo(e,t){return({x:n,y:r,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:`${r}px`}),e.el.dataset.popperPlacement=o,Lo(e.el,s)),e)}function Lo(e,t){const n=e.querySelector(".shepherd-arrow");if(Ye(n)&&t.arrow){const{x:r,y:o}=t.arrow;Object.assign(n.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:""})}}function jo(e,t){const n={strategy:"absolute"};n.middleware=[];const r=Bo(t);return mn(e)||(n.middleware.push(Co(),To({limiter:Ro(),crossAxis:!0})),r&&n.middleware.push(Po({element:r})),n.placement=e.on),_t(t.options.floatingUIOptions||{},n)}function Bo(e){return e.options.arrow&&e.el?e.el.querySelector(".shepherd-arrow"):!1}function q(){}function $o(e,t){for(const n in t)e[n]=t[n];return e}function In(e){return e()}function kn(){return Object.create(null)}function Ge(e){e.forEach(In)}function Mt(e){return typeof e=="function"}function le(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Wo(e){return Object.keys(e).length===0}function Fe(e,t){e.appendChild(t)}function te(e,t,n){e.insertBefore(t,n||null)}function z(e){e.parentNode&&e.parentNode.removeChild(e)}function No(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function ae(e){return document.createElement(e)}function An(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Mn(e){return document.createTextNode(e)}function at(){return Mn(" ")}function Vo(){return Mn("")}function ct(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function k(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const Uo=["width","height"];function Dn(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set&&Uo.indexOf(r)===-1?e[r]=t[r]:k(e,r,t[r])}function Ho(e){return Array.from(e.childNodes)}function Le(e,t,n){e.classList.toggle(t,!!n)}let Xe;function Ze(e){Xe=e}function Fn(){if(!Xe)throw new Error("Function called outside component initialization");return Xe}function Yo(e){Fn().$$.on_mount.push(e)}function Dt(e){Fn().$$.after_update.push(e)}const je=[],Be=[];let $e=[];const Ln=[],qo=Promise.resolve();let Ft=!1;function Ko(){Ft||(Ft=!0,qo.then(jn))}function Lt(e){$e.push(e)}const jt=new Set;let We=0;function jn(){if(We!==0)return;const e=Xe;do{try{for(;We<je.length;){const t=je[We];We++,Ze(t),zo(t.$$)}}catch(t){throw je.length=0,We=0,t}for(Ze(null),je.length=0,We=0;Be.length;)Be.pop()();for(let t=0;t<$e.length;t+=1){const n=$e[t];jt.has(n)||(jt.add(n),n())}$e.length=0}while(je.length);for(;Ln.length;)Ln.pop()();Ft=!1,jt.clear(),Ze(e)}function zo(e){if(e.fragment!==null){e.update(),Ge(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Lt)}}function Jo(e){const t=[],n=[];$e.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),$e=t}const lt=new Set;let Oe;function Te(){Oe={r:0,c:[],p:Oe}}function Ce(){Oe.r||Ge(Oe.c),Oe=Oe.p}function I(e,t){e&&e.i&&(lt.delete(e),e.i(t))}function F(e,t,n,r){if(e&&e.o){if(lt.has(e))return;lt.add(e),Oe.c.push(()=>{lt.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}function Bn(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Go(e,t){const n={},r={},o={$$scope:1};let s=e.length;for(;s--;){const i=e[s],c=t[s];if(c){for(const l in i)l in c||(r[l]=1);for(const l in c)o[l]||(n[l]=c[l],o[l]=1);e[s]=c}else for(const l in i)o[l]=1}for(const i in r)i in n||(n[i]=void 0);return n}function Pe(e){e&&e.c()}function ve(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),Lt(()=>{const s=e.$$.on_mount.map(In).filter(Mt);e.$$.on_destroy?e.$$.on_destroy.push(...s):Ge(s),e.$$.on_mount=[]}),o.forEach(Lt)}function we(e,t){const n=e.$$;n.fragment!==null&&(Jo(n.after_update),Ge(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Xo(e,t){e.$$.dirty[0]===-1&&(je.push(e),Ko(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ue(e,t,n,r,o,s,i=null,c=[-1]){const l=Xe;Ze(e);const u=e.$$={fragment:null,ctx:[],props:s,update:q,not_equal:o,bound:kn(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:kn(),dirty:c,skip_bound:!1,root:t.target||l.$$.root};i&&i(u.root);let f=!1;if(u.ctx=n?n(e,t.props||{},(h,d,...m)=>{const y=m.length?m[0]:d;return u.ctx&&o(u.ctx[h],u.ctx[h]=y)&&(!u.skip_bound&&u.bound[h]&&u.bound[h](y),f&&Xo(e,h)),d}):[],u.update(),f=!0,Ge(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const h=Ho(t.target);u.fragment&&u.fragment.l(h),h.forEach(z)}else u.fragment&&u.fragment.c();t.intro&&I(e.$$.fragment),ve(e,t.target,t.anchor),jn()}Ze(l)}class fe{constructor(){this.$$=void 0,this.$$set=void 0}$destroy(){we(this,1),this.$destroy=q}$on(t,n){if(!Mt(n))return q;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(t){this.$$set&&!Wo(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Zo="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Zo);function Qo(e){let t,n,r,o,s;return{c(){t=ae("button"),k(t,"aria-label",n=e[3]?e[3]:null),k(t,"class",r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`),t.disabled=e[2],k(t,"tabindex","0"),k(t,"type","button")},m(i,c){te(i,t,c),t.innerHTML=e[5],o||(s=ct(t,"click",function(){Mt(e[0])&&e[0].apply(this,arguments)}),o=!0)},p(i,[c]){e=i,c&32&&(t.innerHTML=e[5]),c&8&&n!==(n=e[3]?e[3]:null)&&k(t,"aria-label",n),c&18&&r!==(r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`)&&k(t,"class",r),c&4&&(t.disabled=e[2])},i:q,o:q,d(i){i&&z(t),o=!1,s()}}}function ei(e,t,n){let{config:r,step:o}=t,s,i,c,l,u,f;function h(d){return me(d)?d=d.call(o):d}return e.$$set=d=>{"config"in d&&n(6,r=d.config),"step"in d&&n(7,o=d.step)},e.$$.update=()=>{e.$$.dirty&192&&(n(0,s=r.action?r.action.bind(o.tour):null),n(1,i=r.classes),n(2,c=r.disabled?h(r.disabled):!1),n(3,l=r.label?h(r.label):null),n(4,u=r.secondary),n(5,f=r.text?h(r.text):null))},[s,i,c,l,u,f,r,o]}class ti extends fe{constructor(t){super(),ue(this,t,ei,Qo,le,{config:6,step:7})}}function $n(e,t,n){const r=e.slice();return r[2]=t[n],r}function Wn(e){let t,n,r=Bn(e[1]),o=[];for(let i=0;i<r.length;i+=1)o[i]=Nn($n(e,r,i));const s=i=>F(o[i],1,1,()=>{o[i]=null});return{c(){for(let i=0;i<o.length;i+=1)o[i].c();t=Vo()},m(i,c){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(i,c);te(i,t,c),n=!0},p(i,c){if(c&3){r=Bn(i[1]);let l;for(l=0;l<r.length;l+=1){const u=$n(i,r,l);o[l]?(o[l].p(u,c),I(o[l],1)):(o[l]=Nn(u),o[l].c(),I(o[l],1),o[l].m(t.parentNode,t))}for(Te(),l=r.length;l<o.length;l+=1)s(l);Ce()}},i(i){if(!n){for(let c=0;c<r.length;c+=1)I(o[c]);n=!0}},o(i){o=o.filter(Boolean);for(let c=0;c<o.length;c+=1)F(o[c]);n=!1},d(i){i&&z(t),No(o,i)}}}function Nn(e){let t,n;return t=new ti({props:{config:e[2],step:e[0]}}),{c(){Pe(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&2&&(s.config=r[2]),o&1&&(s.step=r[0]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){F(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function ni(e){let t,n,r=e[1]&&Wn(e);return{c(){t=ae("footer"),r&&r.c(),k(t,"class","shepherd-footer")},m(o,s){te(o,t,s),r&&r.m(t,null),n=!0},p(o,[s]){o[1]?r?(r.p(o,s),s&2&&I(r,1)):(r=Wn(o),r.c(),I(r,1),r.m(t,null)):r&&(Te(),F(r,1,1,()=>{r=null}),Ce())},i(o){n||(I(r),n=!0)},o(o){F(r),n=!1},d(o){o&&z(t),r&&r.d()}}}function ri(e,t,n){let r,{step:o}=t;return e.$$set=s=>{"step"in s&&n(0,o=s.step)},e.$$.update=()=>{e.$$.dirty&1&&n(1,r=o.options.buttons)},[o,r]}class oi extends fe{constructor(t){super(),ue(this,t,ri,ni,le,{step:0})}}function ii(e){let t,n,r,o,s;return{c(){t=ae("button"),n=ae("span"),n.textContent="×",k(n,"aria-hidden","true"),k(t,"aria-label",r=e[0].label?e[0].label:"Close Tour"),k(t,"class","shepherd-cancel-icon"),k(t,"type","button")},m(i,c){te(i,t,c),Fe(t,n),o||(s=ct(t,"click",e[1]),o=!0)},p(i,[c]){c&1&&r!==(r=i[0].label?i[0].label:"Close Tour")&&k(t,"aria-label",r)},i:q,o:q,d(i){i&&z(t),o=!1,s()}}}function si(e,t,n){let{cancelIcon:r,step:o}=t;const s=i=>{i.preventDefault(),o.cancel()};return e.$$set=i=>{"cancelIcon"in i&&n(0,r=i.cancelIcon),"step"in i&&n(2,o=i.step)},[r,s,o]}class ai extends fe{constructor(t){super(),ue(this,t,si,ii,le,{cancelIcon:0,step:2})}}function ci(e){let t;return{c(){t=ae("h3"),k(t,"id",e[1]),k(t,"class","shepherd-title")},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:q,o:q,d(n){n&&z(t),e[3](null)}}}function li(e,t,n){let{labelId:r,element:o,title:s}=t;Dt(()=>{me(s)&&n(2,s=s()),n(0,o.innerHTML=s,o)});function i(c){Be[c?"unshift":"push"](()=>{o=c,n(0,o)})}return e.$$set=c=>{"labelId"in c&&n(1,r=c.labelId),"element"in c&&n(0,o=c.element),"title"in c&&n(2,s=c.title)},[o,r,s,i]}class ui extends fe{constructor(t){super(),ue(this,t,li,ci,le,{labelId:1,element:0,title:2})}}function Vn(e){let t,n;return t=new ui({props:{labelId:e[0],title:e[2]}}),{c(){Pe(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&1&&(s.labelId=r[0]),o&4&&(s.title=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){F(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Un(e){let t,n;return t=new ai({props:{cancelIcon:e[3],step:e[1]}}),{c(){Pe(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&8&&(s.cancelIcon=r[3]),o&2&&(s.step=r[1]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){F(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function fi(e){let t,n,r,o=e[2]&&Vn(e),s=e[3]&&e[3].enabled&&Un(e);return{c(){t=ae("header"),o&&o.c(),n=at(),s&&s.c(),k(t,"class","shepherd-header")},m(i,c){te(i,t,c),o&&o.m(t,null),Fe(t,n),s&&s.m(t,null),r=!0},p(i,[c]){i[2]?o?(o.p(i,c),c&4&&I(o,1)):(o=Vn(i),o.c(),I(o,1),o.m(t,n)):o&&(Te(),F(o,1,1,()=>{o=null}),Ce()),i[3]&&i[3].enabled?s?(s.p(i,c),c&8&&I(s,1)):(s=Un(i),s.c(),I(s,1),s.m(t,null)):s&&(Te(),F(s,1,1,()=>{s=null}),Ce())},i(i){r||(I(o),I(s),r=!0)},o(i){F(o),F(s),r=!1},d(i){i&&z(t),o&&o.d(),s&&s.d()}}}function di(e,t,n){let{labelId:r,step:o}=t,s,i;return e.$$set=c=>{"labelId"in c&&n(0,r=c.labelId),"step"in c&&n(1,o=c.step)},e.$$.update=()=>{e.$$.dirty&2&&(n(2,s=o.options.title),n(3,i=o.options.cancelIcon))},[r,o,s,i]}class hi extends fe{constructor(t){super(),ue(this,t,di,fi,le,{labelId:0,step:1})}}function pi(e){let t;return{c(){t=ae("div"),k(t,"class","shepherd-text"),k(t,"id",e[1])},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:q,o:q,d(n){n&&z(t),e[3](null)}}}function mi(e,t,n){let{descriptionId:r,element:o,step:s}=t;Dt(()=>{let{text:c}=s.options;me(c)&&(c=c.call(s)),Ye(c)?o.appendChild(c):n(0,o.innerHTML=c,o)});function i(c){Be[c?"unshift":"push"](()=>{o=c,n(0,o)})}return e.$$set=c=>{"descriptionId"in c&&n(1,r=c.descriptionId),"element"in c&&n(0,o=c.element),"step"in c&&n(2,s=c.step)},[o,r,s,i]}class gi extends fe{constructor(t){super(),ue(this,t,mi,pi,le,{descriptionId:1,element:0,step:2})}}function Hn(e){let t,n;return t=new hi({props:{labelId:e[1],step:e[2]}}),{c(){Pe(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&2&&(s.labelId=r[1]),o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){F(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Yn(e){let t,n;return t=new gi({props:{descriptionId:e[0],step:e[2]}}),{c(){Pe(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&1&&(s.descriptionId=r[0]),o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){F(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function qn(e){let t,n;return t=new oi({props:{step:e[2]}}),{c(){Pe(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){F(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function bi(e){let t,n=!N(e[2].options.title)||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled,r,o=!N(e[2].options.text),s,i=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,c,l=n&&Hn(e),u=o&&Yn(e),f=i&&qn(e);return{c(){t=ae("div"),l&&l.c(),r=at(),u&&u.c(),s=at(),f&&f.c(),k(t,"class","shepherd-content")},m(h,d){te(h,t,d),l&&l.m(t,null),Fe(t,r),u&&u.m(t,null),Fe(t,s),f&&f.m(t,null),c=!0},p(h,[d]){d&4&&(n=!N(h[2].options.title)||h[2].options.cancelIcon&&h[2].options.cancelIcon.enabled),n?l?(l.p(h,d),d&4&&I(l,1)):(l=Hn(h),l.c(),I(l,1),l.m(t,r)):l&&(Te(),F(l,1,1,()=>{l=null}),Ce()),d&4&&(o=!N(h[2].options.text)),o?u?(u.p(h,d),d&4&&I(u,1)):(u=Yn(h),u.c(),I(u,1),u.m(t,s)):u&&(Te(),F(u,1,1,()=>{u=null}),Ce()),d&4&&(i=Array.isArray(h[2].options.buttons)&&h[2].options.buttons.length),i?f?(f.p(h,d),d&4&&I(f,1)):(f=qn(h),f.c(),I(f,1),f.m(t,null)):f&&(Te(),F(f,1,1,()=>{f=null}),Ce())},i(h){c||(I(l),I(u),I(f),c=!0)},o(h){F(l),F(u),F(f),c=!1},d(h){h&&z(t),l&&l.d(),u&&u.d(),f&&f.d()}}}function yi(e,t,n){let{descriptionId:r,labelId:o,step:s}=t;return e.$$set=i=>{"descriptionId"in i&&n(0,r=i.descriptionId),"labelId"in i&&n(1,o=i.labelId),"step"in i&&n(2,s=i.step)},[r,o,s]}class vi extends fe{constructor(t){super(),ue(this,t,yi,bi,le,{descriptionId:0,labelId:1,step:2})}}function Kn(e){let t;return{c(){t=ae("div"),k(t,"class","shepherd-arrow"),k(t,"data-popper-arrow","")},m(n,r){te(n,t,r)},d(n){n&&z(t)}}}function wi(e){let t,n,r,o,s,i,c,l,u=e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on&&Kn();r=new vi({props:{descriptionId:e[2],labelId:e[3],step:e[4]}});let f=[{"aria-describedby":o=N(e[4].options.text)?null:e[2]},{"aria-labelledby":s=e[4].options.title?e[3]:null},e[1],{role:"dialog"},{tabindex:"0"}],h={};for(let d=0;d<f.length;d+=1)h=$o(h,f[d]);return{c(){t=ae("div"),u&&u.c(),n=at(),Pe(r.$$.fragment),Dn(t,h),Le(t,"shepherd-has-cancel-icon",e[5]),Le(t,"shepherd-has-title",e[6]),Le(t,"shepherd-element",!0)},m(d,m){te(d,t,m),u&&u.m(t,null),Fe(t,n),ve(r,t,null),e[13](t),i=!0,c||(l=ct(t,"keydown",e[7]),c=!0)},p(d,[m]){d[4].options.arrow&&d[4].options.attachTo&&d[4].options.attachTo.element&&d[4].options.attachTo.on?u||(u=Kn(),u.c(),u.m(t,n)):u&&(u.d(1),u=null);const y={};m&4&&(y.descriptionId=d[2]),m&8&&(y.labelId=d[3]),m&16&&(y.step=d[4]),r.$set(y),Dn(t,h=Go(f,[(!i||m&20&&o!==(o=N(d[4].options.text)?null:d[2]))&&{"aria-describedby":o},(!i||m&24&&s!==(s=d[4].options.title?d[3]:null))&&{"aria-labelledby":s},m&2&&d[1],{role:"dialog"},{tabindex:"0"}])),Le(t,"shepherd-has-cancel-icon",d[5]),Le(t,"shepherd-has-title",d[6]),Le(t,"shepherd-element",!0)},i(d){i||(I(r.$$.fragment,d),i=!0)},o(d){F(r.$$.fragment,d),i=!1},d(d){d&&z(t),u&&u.d(),we(r),e[13](null),c=!1,l()}}}const _i=9,Ei=27,Si=37,xi=39;function zn(e){return e.split(" ").filter(t=>!!t.length)}function Oi(e,t,n){let{classPrefix:r,element:o,descriptionId:s,firstFocusableElement:i,focusableElements:c,labelId:l,lastFocusableElement:u,step:f,dataStepId:h}=t,d,m,y;const E=()=>o;Yo(()=>{n(1,h={[`data-${r}shepherd-step-id`]:f.id}),n(9,c=o.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,i=c[0]),n(10,u=c[c.length-1])}),Dt(()=>{y!==f.options.classes&&x()});function x(){w(y),y=f.options.classes,_(y)}function w(g){if(qe(g)){const C=zn(g);C.length&&o.classList.remove(...C)}}function _(g){if(qe(g)){const C=zn(g);C.length&&o.classList.add(...C)}}const T=g=>{const{tour:C}=f;switch(g.keyCode){case _i:if(c.length===0){g.preventDefault();break}g.shiftKey?(document.activeElement===i||document.activeElement.classList.contains("shepherd-element"))&&(g.preventDefault(),u.focus()):document.activeElement===u&&(g.preventDefault(),i.focus());break;case Ei:C.options.exitOnEsc&&(g.preventDefault(),g.stopPropagation(),f.cancel());break;case Si:C.options.keyboardNavigation&&(g.preventDefault(),g.stopPropagation(),C.back());break;case xi:C.options.keyboardNavigation&&(g.preventDefault(),g.stopPropagation(),C.next());break}};function v(g){Be[g?"unshift":"push"](()=>{o=g,n(0,o)})}return e.$$set=g=>{"classPrefix"in g&&n(11,r=g.classPrefix),"element"in g&&n(0,o=g.element),"descriptionId"in g&&n(2,s=g.descriptionId),"firstFocusableElement"in g&&n(8,i=g.firstFocusableElement),"focusableElements"in g&&n(9,c=g.focusableElements),"labelId"in g&&n(3,l=g.labelId),"lastFocusableElement"in g&&n(10,u=g.lastFocusableElement),"step"in g&&n(4,f=g.step),"dataStepId"in g&&n(1,h=g.dataStepId)},e.$$.update=()=>{e.$$.dirty&16&&(n(5,d=f.options&&f.options.cancelIcon&&f.options.cancelIcon.enabled),n(6,m=f.options&&f.options.title))},[o,h,s,l,f,d,m,T,i,c,u,r,E,v]}class Ti extends fe{constructor(t){super(),ue(this,t,Oi,wi,le,{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 Bt extends vt{constructor(t,n={}){return super(),this._resolvedAttachTo=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?pn(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,hn(this),this._setOptions(n),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){Mo(this),Ye(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")}_resolveAttachToOptions(){return this._resolvedAttachTo=Yr(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return this._resolvedAttachTo===null?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return me(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 Ti({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();me(this.options.scrollToHandler)?this.options.scrollToHandler(n):Or(n)&&typeof n.scrollIntoView=="function"&&n.scrollIntoView(t)}_getClassOptions(t){const n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,r=t.classes?t.classes:"",o=n&&n.classes?n.classes:"",s=[...r.split(" "),...o.split(" ")],i=new Set(s);return Array.from(i).join(" ").trim()}_setOptions(t={}){let n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;n=_t({},n||{}),this.options=Object.assign({arrow:!0},n,t,Ao(n,t));const{when:r}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${gn()}`,r&&Object.keys(r).forEach(o=>{this.on(o,r[o],this)})}_setupElements(){N(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&Vr(this),ko(this)}_show(){var t;this.trigger("before-show"),this._resolveAttachToOptions(),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(),r=this.target||document.body;r.classList.add(`${this.classPrefix}shepherd-enabled`),r.classList.add(`${this.classPrefix}shepherd-target`),n.classList.add("shepherd-enabled"),this.trigger("show")}_styleTargetElementForStep(t){const n=t.target;n&&(t.options.highlightClass&&n.classList.add(t.options.highlightClass),n.classList.remove("shepherd-target-click-disabled"),t.options.canClickTarget===!1&&n.classList.add("shepherd-target-click-disabled"))}_updateStepTargetOnHide(){const t=this.target||document.body;this.options.highlightClass&&t.classList.remove(this.options.highlightClass),t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}}function Ci(e){let t={};if(e.navigator){const n=e.navigator.userAgent;t=D({},t,{$os:Ri(e),$browser:Jn(n,e.navigator.vendor,!!e.opera),$referrer:e.document.referrer,$referring_domain:ki(e.document.referrer),$device:Ii(n),$current_url:e.location.href,$host:e.location.host,$pathname:e.location.pathname,$browser_version:Pi(n,e.navigator.vendor,!!e.opera),$screen_height:e.screen.height,$screen_width:e.screen.width,$screen_dpr:e.devicePixelRatio})}return t=D({},t,{$lib:"js",$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:new Date().getTime()/1e3}),t}function L(e,t){return e.indexOf(t)>=0}function Jn(e,t,n){return t=t||"",n||L(e," OPR/")?L(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":L(e,"IEMobile")||L(e,"WPDesktop")?"Internet Explorer Mobile":L(e,"SamsungBrowser/")?"Samsung Internet":L(e,"Edge")||L(e,"Edg/")?"Microsoft Edge":L(e,"FBIOS")?"Facebook Mobile":L(e,"Chrome")?"Chrome":L(e,"CriOS")?"Chrome iOS":L(e,"UCWEB")||L(e,"UCBrowser")?"UC Browser":L(e,"FxiOS")?"Firefox iOS":L(t,"Apple")?L(e,"Mobile")?"Mobile Safari":"Safari":L(e,"Android")?"Android Mobile":L(e,"Konqueror")?"Konqueror":L(e,"Firefox")?"Firefox":L(e,"MSIE")||L(e,"Trident/")?"Internet Explorer":L(e,"Gecko")?"Mozilla":""}function Pi(e,t,n){const r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},o=Jn(e,t,n),s=r[o]||void 0;if(s===void 0)return null;const i=e.match(s);return i?parseFloat(i[i.length-2]):null}function Ri(e){const t=e.navigator.userAgent;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""}function Ii(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""}function ki(e){const t=e.split("/");return t.length>=3?t[2]:""}function Ai(e){if(e){const{steps:t}=e;t.forEach(n=>{n.options&&n.options.canClickTarget===!1&&n.options.attachTo&&Ye(n.target)&&n.target.classList.remove("shepherd-target-click-disabled")})}}const $t=(e,t)=>t.some(n=>e instanceof n);let Gn,Xn;function Mi(){return Gn||(Gn=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Di(){return Xn||(Xn=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Wt=new WeakMap,Nt=new WeakMap,ut=new WeakMap;function Fi(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(Re(e.result)),o()},i=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",i)});return ut.set(t,e),t}function Li(e){if(Wt.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{n(),o()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});Wt.set(e,t)}let Vt={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Wt.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Re(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Zn(e){Vt=e(Vt)}function ji(e){return Di().includes(e)?function(...t){return e.apply(Ut(this),t),Re(this.request)}:function(...t){return Re(e.apply(Ut(this),t))}}function Bi(e){return typeof e=="function"?ji(e):(e instanceof IDBTransaction&&Li(e),$t(e,Mi())?new Proxy(e,Vt):e)}function Re(e){if(e instanceof IDBRequest)return Fi(e);if(Nt.has(e))return Nt.get(e);const t=Bi(e);return t!==e&&(Nt.set(e,t),ut.set(t,e)),t}const Ut=e=>ut.get(e);function $i(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),c=Re(i);return r&&i.addEventListener("upgradeneeded",l=>{r(Re(i.result),l.oldVersion,l.newVersion,Re(i.transaction),l)}),n&&i.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),c.then(l=>{s&&l.addEventListener("close",()=>s()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}const Wi=["get","getKey","getAll","getAllKeys","count"],Ni=["put","add","delete","clear"],Ht=new Map;function Qn(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Ht.get(t))return Ht.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Ni.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||Wi.includes(n)))return;const s=async function(c,...l){const u=this.transaction(c,o?"readwrite":"readonly");let f=u.store;return r&&(f=f.index(l.shift())),(await Promise.all([f[n](...l),o&&u.done]))[0]};return Ht.set(t,s),s}Zn(e=>D({},e,{get:(t,n,r)=>Qn(t,n)||e.get(t,n,r),has:(t,n)=>!!Qn(t,n)||e.has(t,n)}));const Vi=["continue","continuePrimaryKey","advance"],er={},Yt=new WeakMap,tr=new WeakMap,Ui={get(e,t){if(!Vi.includes(t))return e[t];let n=er[t];return n||(n=er[t]=function(...r){Yt.set(this,tr.get(this)[t](...r))}),n}};function Hi(){return qt.apply(this,arguments)}function qt(){return qt=Tr(function*(...e){let t=this;if(t instanceof IDBCursor||(t=yield sn(t.openCursor(...e))),!t)return;t=t;const n=new Proxy(t,Ui);for(tr.set(n,t),ut.set(n,Ut(t));t;)yield n,t=yield sn(Yt.get(n)||t.continue()),Yt.delete(n)}),qt.apply(this,arguments)}function nr(e,t){return t===Symbol.asyncIterator&&$t(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&$t(e,[IDBIndex,IDBObjectStore])}Zn(e=>D({},e,{get(t,n,r){return nr(t,n)?Hi:e.get(t,n,r)},has(t,n){return nr(t,n)||e.has(t,n)}}));class Yi{constructor(t,n,r){if(this.apiKey=void 0,this.apiPath=void 0,this.properties=void 0,this.tourStateDb=void 0,!t)throw new Error("Shepherd Pro: Missing required apiKey option.");if(!n)throw new Error("Shepherd Pro: Missing required apiPath option.");this.apiKey=t,this.apiPath=n,this.properties=r}async getTourState(){try{const t=await fetch(`${this.apiPath}/api/v1/state`,{headers:{Authorization:`ApiKey ${this.apiKey}`,"Content-Type":"application/json"},method:"GET"});if(!t.ok)throw new Error("Could not fetch state for tours 🐑");const{data:n}=await t.json();if(this.tourStateDb=await $i("TourState",1,{upgrade(r){r.createObjectStore("tours",{keyPath:"uniqueId"})}}),Array.isArray(n)&&n.length){const r=this.tourStateDb.transaction("tours","readwrite"),o=n.map(s=>r.store.put(s));await Promise.all([...o,r.done])}}catch(t){throw new Error("Error fetching data: "+(t instanceof Error?t.message:"Unknown error"))}}async sendEvents(t){t.data.properties=this.properties;try{const n=await fetch(`${this.apiPath}/api/v1/actor`,{headers:{Authorization:`ApiKey ${this.apiKey}`,"Content-Type":"application/json"},method:"POST",body:JSON.stringify(t)});if(!n.ok)throw new Error("Could not create an event 🐑");const{data:r}=await n.json();return r}catch(n){throw new Error("Error fetching data: "+(n instanceof Error?n.message:"Unknown error"))}}}function qi({width:e,height:t,x:n=0,y:r=0,r:o=0}){const{innerWidth:s,innerHeight:i}=window,{topLeft:c=0,topRight:l=0,bottomRight:u=0,bottomLeft:f=0}=typeof o=="number"?{topLeft:o,topRight:o,bottomRight:o,bottomLeft:o}:o;return`M${s},${i}H0V0H${s}V${i}ZM${n+c},${r}a${c},${c},0,0,0-${c},${c}V${t+r-f}a${f},${f},0,0,0,${f},${f}H${e+n-u}a${u},${u},0,0,0,${u}-${u}V${r+l}a${l},${l},0,0,0-${l}-${l}Z`}function Ki(e){let t,n,r,o,s;return{c(){t=An("svg"),n=An("path"),k(n,"d",e[2]),k(t,"class",r=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(i,c){te(i,t,c),Fe(t,n),e[11](t),o||(s=ct(t,"touchmove",e[3]),o=!0)},p(i,[c]){c&4&&k(n,"d",i[2]),c&2&&r!==(r=`${i[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&k(t,"class",r)},i:q,o:q,d(i){i&&z(t),e[11](null),o=!1,s()}}}function rr(e){if(!e)return null;const n=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return n!=="hidden"&&n!=="visible"&&e.scrollHeight>=e.clientHeight?e:rr(e.parentElement)}function zi(e){let t={top:0,left:0};if(!e)return t;let n=e.ownerDocument.defaultView;for(;n!==window.top;){var r;const i=(r=n)==null?void 0:r.frameElement;if(i){var o,s;const c=i.getBoundingClientRect();t.top+=c.top+((o=c.scrollTop)!=null?o:0),t.left+=c.left+((s=c.scrollLeft)!=null?s:0)}n=n.parent}return t}function Ji(e,t){const n=e.getBoundingClientRect();let r=n.y||n.top,o=n.bottom||r+n.height;if(t){const i=t.getBoundingClientRect(),c=i.y||i.top,l=i.bottom||c+i.height;r=Math.max(r,c),o=Math.min(o,l)}const s=Math.max(o-r,0);return{y:r,height:s}}function Gi(e,t,n){let{element:r,openingProperties:o}=t,s=!1,i,c;u();const l=()=>r;function u(){n(4,o={width:0,height:0,x:0,y:0,r:0})}function f(){n(1,s=!1),w()}function h(v=0,g=0,C=0,V=0,re,$){if($){const{y:H,height:J}=Ji($,re),{x:G,width:W,left:M}=$.getBoundingClientRect();n(4,o={width:W+v*2,height:J+v*2,x:(G||M)+C-v,y:H+V-v,r:g})}else u()}function d(v){w(),v.tour.options.useModalOverlay?(_(v),m()):f()}function m(){n(1,s=!0)}const y=v=>{v.preventDefault()},E=v=>{v.stopPropagation()};function x(){window.addEventListener("touchmove",y,{passive:!1})}function w(){i&&(cancelAnimationFrame(i),i=void 0),window.removeEventListener("touchmove",y,{passive:!1})}function _(v){const{modalOverlayOpeningPadding:g,modalOverlayOpeningRadius:C,modalOverlayOpeningXOffset:V=0,modalOverlayOpeningYOffset:re=0}=v.options,$=zi(v.target),H=rr(v.target),J=()=>{i=void 0,h(g,C,V+$.left,re+$.top,H,v.target),i=requestAnimationFrame(J)};J(),x()}function T(v){Be[v?"unshift":"push"](()=>{r=v,n(0,r)})}return e.$$set=v=>{"element"in v&&n(0,r=v.element),"openingProperties"in v&&n(4,o=v.openingProperties)},e.$$.update=()=>{e.$$.dirty&16&&n(2,c=qi(o))},[r,s,c,E,o,l,u,f,h,d,m,T]}class Xi extends fe{constructor(t){super(),ue(this,t,Gi,Ki,le,{element:0,openingProperties:4,getElement:5,closeModalOpening:6,hide:7,positionModal:8,setupForStep:9,show:10})}get getElement(){return this.$$.ctx[5]}get closeModalOpening(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[7]}get positionModal(){return this.$$.ctx[8]}get setupForStep(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}}const Zi="https://shepherdpro.com",Kt="shepherdPro:userId";class Qi extends vt{constructor(...t){super(...t),this.apiKey=void 0,this.apiPath=void 0,this.dataRequester=void 0,this.isProEnabled=!1,this.properties=void 0,this.activeTour=void 0}async init(t,n,r){if(!t)throw new Error("Shepherd Pro: Missing required apiKey option.");if(this.apiKey=t,this.apiPath=n??Zi,this.properties=r??{},this.properties.context=Ci(window),this.apiKey){this.dataRequester=new Yi(this.apiKey,this.apiPath,this.properties),this.isProEnabled=!0;const o=localStorage.getItem(Kt),s=[this.dataRequester.getTourState()];o||s.push(this.createNewActor()),await Promise.all(s)}}async createNewActor(){if(!this.dataRequester)return;const t=await this.dataRequester.sendEvents({data:{currentUserId:null,eventType:"setup"}});localStorage.setItem(Kt,String(t.actorId))}async isTourEnabled(t){var n,r;if(!this.dataRequester)return;const o=await((n=this.dataRequester.tourStateDb)==null?void 0:n.get("tours",t));return(r=o==null?void 0:o.isActive)!=null?r:!0}}class es extends vt{constructor(t={}){super(),this.trackedEvents=["active","cancel","complete","show"],this.classPrefix=void 0,this.currentStep=void 0,this.focusedElBeforeOpen=void 0,this.id=void 0,this.modal=void 0,this.options=void 0,this.steps=void 0,hn(this);const n={exitOnEsc:!0,keyboardNavigation:!0};this.options=Object.assign({},n,t),this.classPrefix=pn(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(s=>{(i=>{this.on(i,c=>{c=c||{},c.tour=this,ne.trigger(i,c)})})(s)}),this._setTourID(t.id);const{dataRequester:o}=ne;return o&&this.trackedEvents.forEach(s=>this.on(s,i=>{const{tour:c}=i,{id:l,steps:u}=c;let f;if(s!=="active"){const{step:d}=i;d&&(f=u.findIndex(m=>m.id===d.id)+1)}const h={currentUserId:localStorage.getItem(Kt),eventType:s,journeyData:{id:l,currentStep:f,numberOfSteps:u.length,tourOptions:c.options}};o.sendEvents({data:h})})),this}addStep(t,n){let r=t;return r instanceof Bt?r.tour=this:r=new Bt(this,r),N(n)?this.steps.push(r):this.steps.splice(n,0,r),r}addSteps(t){return Array.isArray(t)&&t.forEach(n=>{this.addStep(n)}),this}back(){const t=this.steps.indexOf(this.currentStep);this.show(t-1,!1)}async cancel(){if(this.options.confirmCancel){const t=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";let n;me(this.options.confirmCancel)?n=await this.options.confirmCancel():n=window.confirm(t),n&&this._done("cancel")}else this._done("cancel")}complete(){this._done("complete")}getById(t){return this.steps.find(n=>n.id===t)}getCurrentStep(){return this.currentStep}hide(){const t=this.getCurrentStep();if(t)return t.hide()}isActive(){return ne.activeTour===this}next(){const t=this.steps.indexOf(this.currentStep);t===this.steps.length-1?this.complete():this.show(t+1,!0)}removeStep(t){const n=this.getCurrentStep();this.steps.some((r,o)=>{if(r.id===t)return r.isOpen()&&r.hide(),r.destroy(),this.steps.splice(o,1),!0}),n&&n.id===t&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(t=0,n=!0){const r=qe(t)?this.getById(t):this.steps[t];r&&(this._updateStateBeforeShow(),me(r.options.showOn)&&!r.options.showOn()?this._skipStep(r,n):(this.trigger("show",{step:r,previous:this.currentStep}),this.currentStep=r,r.show()))}async start(){ne.isProEnabled&&!await ne.isTourEnabled(this.options.id)||(this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this.setupModal(),this._setupActiveTour(),this.next())}_done(t){const n=this.steps.indexOf(this.currentStep);if(Array.isArray(this.steps)&&this.steps.forEach(r=>r.destroy()),Ai(this),this.trigger(t,{index:n}),ne.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),(t==="cancel"||t==="complete")&&this.modal){const r=document.querySelector(".shepherd-modal-overlay-container");r&&(r.remove(),this.modal=null)}Ye(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),ne.activeTour=this}setupModal(){this.modal=new Xi({target:this.options.modalContainer||document.body,props:{styles:this.styles}})}_skipStep(t,n){const r=this.steps.indexOf(t);if(r===this.steps.length-1)this.complete();else{const o=n?r+1:r-1;this.show(o,n)}}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(t){const n=this.options.tourName||"tour",r=t||gn();this.id=`${n}--${r}`}}const ne=new Qi,or=typeof window>"u";ne.Step=or?Ur:Bt,ne.Tour=or?Hr:es;const ft=pe.createContext(void 0),ts=ft.Consumer,ns=()=>{const e=pe.useContext(ft);if(!e)throw new Error("useShepherd must be used within a ShepherdJourneyProvider");const{Shepherd:t}=e;return t},rs=({apiKey:e,apiPath:t,properties:n,children:r})=>(typeof window<"u"&&e&&ne.init(e,t,n),xr.jsx(ft.Provider,{value:{Shepherd:ne},children:r}));oe.JourneyMethods=ts,oe.ShepherdJourneyContext=ft,oe.ShepherdJourneyProvider=rs,oe.useShepherd=ns,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-shepherd",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"src"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"shepherd.js": "
|
|
27
|
+
"shepherd.js": "12.0.6"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@testing-library/jest-dom": "^6.2.0",
|
|
31
|
-
"@testing-library/react": "^15.0.
|
|
32
|
-
"@types/react": "^18.3.
|
|
31
|
+
"@testing-library/react": "^15.0.7",
|
|
32
|
+
"@types/react": "^18.3.2",
|
|
33
33
|
"@vitejs/plugin-react": "^4.2.1",
|
|
34
34
|
"@vitest/ui": "^1.6.0",
|
|
35
|
-
"happy-dom": "^14.
|
|
35
|
+
"happy-dom": "^14.11.0",
|
|
36
36
|
"typescript": "^5.4.5",
|
|
37
37
|
"vite": "^5.2.11",
|
|
38
38
|
"vite-plugin-dts": "^3.9.1",
|
package/src/index.tsx
CHANGED
|
@@ -3,10 +3,8 @@ import { createContext, FC, useContext, type ReactNode } from 'react';
|
|
|
3
3
|
import Shepherd from 'shepherd.js';
|
|
4
4
|
import type ShepherdPro from 'shepherd.js';
|
|
5
5
|
|
|
6
|
-
// declare const window: Window;
|
|
7
|
-
|
|
8
6
|
interface ShepherdProviderProps {
|
|
9
|
-
apiKey
|
|
7
|
+
apiKey?: string;
|
|
10
8
|
apiPath?: string;
|
|
11
9
|
properties?: Record<string, unknown>;
|
|
12
10
|
children?: ReactNode;
|
|
@@ -41,7 +39,7 @@ export const ShepherdJourneyProvider: FC<ShepherdProviderProps> = ({
|
|
|
41
39
|
children
|
|
42
40
|
}: ShepherdProviderProps) => {
|
|
43
41
|
if (typeof window !== 'undefined') {
|
|
44
|
-
Shepherd.init(apiKey, apiPath, properties);
|
|
42
|
+
if (apiKey) Shepherd.init(apiKey, apiPath, properties);
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
return (
|