react-shepherd 5.0.0-alpha.7 → 5.0.2
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/dist/index.d.ts +3 -2
- package/dist/index.js +354 -349
- package/dist/index.umd.cjs +7 -7
- package/package.json +10 -10
package/dist/index.umd.cjs
CHANGED
|
@@ -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 en;function _r(){if(en)return Ve;en=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,
|
|
9
|
+
*/var en;function _r(){if(en)return Ve;en=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 Ve.Fragment=n,Ve.jsx=i,Ve.jsxs=i,Ve}var Ue={};/**
|
|
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 tn;function Er(){return tn||(tn=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"),
|
|
18
|
-
`+Kt+
|
|
17
|
+
*/var tn;function Er(){return tn||(tn=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 S(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),x=1;x<p;x++)b[x-1]=arguments[x];T("error",a,b)}}function T(a,p,b){{var x=w.ReactDebugCurrentFrame,P=x.getStackAddendum();P!==""&&(p+="%s",b=b.concat([P]));var A=b.map(function(R){return String(R)});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 G(a,p,b){var x=a.displayName;if(x)return x;var P=p.displayName||p.name||"";return P!==""?b+"("+P+")":b}function X(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 X(p)+".Consumer";case i:var b=a;return X(b._context)+".Provider";case l:return G(a,a.render,"ForwardRef");case h:var x=a.displayName||null;return x!==null?x:W(a.type)||"Memo";case d:{var P=a,A=P._payload,R=P._init;try{return W(R(A))}catch{return null}}}return null}var M=Object.assign,Z=0,Q,K,de,_e,dt,or,ir;function sr(){}sr.__reactDisabledLog=!0;function rs(){{if(Z===0){Q=console.log,K=console.info,de=console.warn,_e=console.error,dt=console.group,or=console.groupCollapsed,ir=console.groupEnd;var a={configurable:!0,enumerable:!0,value:sr,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}Z++}}function os(){{if(Z--,Z===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},a,{value:Q}),info:M({},a,{value:K}),warn:M({},a,{value:de}),error:M({},a,{value:_e}),group:M({},a,{value:dt}),groupCollapsed:M({},a,{value:or}),groupEnd:M({},a,{value:ir})})}Z<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var qt=w.ReactCurrentDispatcher,Kt;function ht(a,p,b){{if(Kt===void 0)try{throw Error()}catch(P){var x=P.stack.trim().match(/\n( *(at )?)/);Kt=x&&x[1]||""}return`
|
|
18
|
+
`+Kt+a}}var zt=!1,pt;{var is=typeof WeakMap=="function"?WeakMap:Map;pt=new is}function ar(a,p){if(!a||zt)return"";{var b=pt.get(a);if(b!==void 0)return b}var x;zt=!0;var P=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var A;A=qt.current,qt.current=null,rs();try{if(p){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(he){x=he}Reflect.construct(a,[],R)}else{try{R.call()}catch(he){x=he}a.call(R.prototype)}}else{try{throw Error()}catch(he){x=he}a()}}catch(he){if(he&&x&&typeof he.stack=="string"){for(var O=he.stack.split(`
|
|
19
19
|
`),U=x.stack.split(`
|
|
20
20
|
`),L=O.length-1,B=U.length-1;L>=1&&B>=0&&O[L]!==U[B];)B--;for(;L>=1&&B>=0;L--,B--)if(O[L]!==U[B]){if(L!==1||B!==1)do if(L--,B--,B<0||O[L]!==U[B]){var ee=`
|
|
21
|
-
`+O[L].replace(" at new "," at ");return
|
|
21
|
+
`+O[L].replace(" at new "," at ");return a.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",a.displayName)),typeof a=="function"&&pt.set(a,ee),ee}while(L>=1&&B>=0);break}}}finally{zt=!1,qt.current=A,os(),Error.prepareStackTrace=P}var Ne=a?a.displayName||a.name:"",wr=Ne?ht(Ne):"";return typeof a=="function"&&pt.set(a,wr),wr}function ss(a,p,b){return ar(a,!1)}function as(a){var p=a.prototype;return!!(p&&p.isReactComponent)}function mt(a,p,b){if(a==null)return"";if(typeof a=="function")return ar(a,as(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 ss(a.render);case h:return mt(a.type,p,b);case d:{var x=a,P=x._payload,A=x._init;try{return mt(A(P),p,b)}catch{}}}return""}var gt=Object.prototype.hasOwnProperty,cr={},lr=w.ReactDebugCurrentFrame;function bt(a){if(a){var p=a._owner,b=mt(a.type,a._source,p?p.type:null);lr.setExtraStackFrame(b)}else lr.setExtraStackFrame(null)}function cs(a,p,b,x,P){{var A=Function.call.bind(gt);for(var R in a)if(A(a,R)){var O=void 0;try{if(typeof a[R]!="function"){var U=Error((x||"React class")+": "+b+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}O=a[R](p,R,x,b,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(L){O=L}O&&!(O instanceof Error)&&(bt(P),_("%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).",x||"React class",b,R,typeof O),bt(null)),O instanceof Error&&!(O.message in cr)&&(cr[O.message]=!0,bt(P),_("Failed %s type: %s",b,O.message),bt(null))}}}var ls=Array.isArray;function Jt(a){return ls(a)}function us(a){{var p=typeof Symbol=="function"&&Symbol.toStringTag,b=p&&a[Symbol.toStringTag]||a.constructor.name||"Object";return b}}function fs(a){try{return ur(a),!1}catch{return!0}}function ur(a){return""+a}function fr(a){if(fs(a))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",us(a)),ur(a)}var Ze=w.ReactCurrentOwner,ds={key:!0,ref:!0,__self:!0,__source:!0},dr,hr,Gt;Gt={};function hs(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 ps(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 ms(a,p){if(typeof a.ref=="string"&&Ze.current&&p&&Ze.current.stateNode!==p){var b=W(Ze.current.type);Gt[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(Ze.current.type),a.ref),Gt[b]=!0)}}function gs(a,p){{var b=function(){dr||(dr=!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 bs(a,p){{var b=function(){hr||(hr=!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 ys=function(a,p,b,x,P,A,R){var O={$$typeof:t,type:a,key:p,ref:b,props:R,_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:x}),Object.defineProperty(O,"_source",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O};function vs(a,p,b,x,P){{var A,R={},O=null,U=null;b!==void 0&&(fr(b),O=""+b),ps(p)&&(fr(p.key),O=""+p.key),hs(p)&&(U=p.ref,ms(p,P));for(A in p)gt.call(p,A)&&!ds.hasOwnProperty(A)&&(R[A]=p[A]);if(a&&a.defaultProps){var L=a.defaultProps;for(A in L)R[A]===void 0&&(R[A]=L[A])}if(O||U){var B=typeof a=="function"?a.displayName||a.name||"Unknown":a;O&&gs(R,B),U&&bs(R,B)}return ys(a,O,U,P,x,Ze.current,R)}}var Xt=w.ReactCurrentOwner,pr=w.ReactDebugCurrentFrame;function We(a){if(a){var p=a._owner,b=mt(a.type,a._source,p?p.type:null);pr.setExtraStackFrame(b)}else pr.setExtraStackFrame(null)}var Zt;Zt=!1;function Qt(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function mr(){{if(Xt.current){var a=W(Xt.current.type);if(a)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+a+"`."}return""}}function ws(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 gr={};function _s(
|
|
25
|
+
Check your code at `+p+":"+b+"."}return""}}var gr={};function _s(a){{var p=mr();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(c,p){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var b=_s(p);if(gr[b])return;gr[b]=!0;var x="";c&&c._owner&&c._owner!==Xt.current&&(x=" It was passed a child from "+W(c._owner.type)+"."),We(c),_('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(c,p){{if(typeof c!="object")return;if(Jt(c))for(var b=0;b<c.length;b++){var x=c[b];Qt(x)&&br(x,p)}else if(Qt(c))c._store&&(c._store.validated=!0);else if(c){var P=S(c);if(typeof P=="function"&&P!==c.entries)for(var k=P.call(c),R;!(R=k.next()).done;)Qt(R.value)&&br(R.value,p)}}}function Es(c){{var p=c.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);as(b,c.props,"prop",x,c)}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(c){{for(var p=Object.keys(c.props),b=0;b<p.length;b++){var x=p[b];if(x!=="children"&&x!=="key"){We(c),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",x),We(null);break}}c.ref!==null&&(We(c),_("Invalid attribute `ref` supplied to `React.Fragment`."),We(null))}}function vr(c,p,b,x,P,k){{var R=H(c);if(!R){var O="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).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;c===null?L="null":Jt(c)?L="array":c!==void 0&&c.$$typeof===t?(L="<"+(W(c.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):L=typeof c,_("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(c,p,b,P,k);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],c);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,c)}return c===r?xs(B):Es(B),B}}function Ss(c,p,b){return vr(c,p,b,!0)}function Os(c,p,b){return vr(c,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.0-alpha.13 */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 i;return N(this.bindings)&&(this.bindings={}),N(this.bindings[t])&&(this.bindings[t]=[]),(i=this.bindings[t])==null||i.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,i)=>{var s;o.handler===n&&((s=this.bindings[t])==null||s.splice(i,1))}),this)}trigger(t,...n){var r;return!N(this.bindings)&&this.bindings[t]&&((r=this.bindings[t])==null||r.forEach((o,i)=>{var f;const{ctx:s,handler:a,once:l}=o,u=s||this;a.apply(u,n),l&&((f=this.bindings[t])==null||f.splice(i,1))})),this}}function qe(e){var t,n;function r(i,s){try{var a=e[i](s),l=a.value,u=l instanceof nn;Promise.resolve(u?l.v:l).then(function(f){if(u){var h=i==="return"?"return":"next";if(!l.k||f.done)return r(h,f);f=e[h](f).value}o(a.done?"return":"normal",f)},function(f){r("throw",f)})}catch(f){o("throw",f)}}function o(i,s){switch(i){case"return":t.resolve({value:s,done:!0});break;case"throw":t.reject(s);break;default:t.resolve({value:s,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(i,s){return new Promise(function(a,l){var u={key:i,arg:s,resolve:a,reject:l,next:null};n?n=n.next=u:(t=n=u,r(i,s))})},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={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);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 cn(e){return{*[Symbol.iterator](){for(const t of e)for(const n of t)yield n}}}const an=new Set(["[object Object]","[object Module]"]);function Pr(e){if(!an.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"||!an.has(Object.prototype.toString.call(n))||!n.hasOwnProperty("isPrototypeOf"))}function Ir(e,t,n){const r={};for(const o of Cr(e)){const i=[];for(const l of e)Rr(l,o)&&i.push(l[o]);if(i.length===0)continue;const s=t.metaDataUpdater(n,{key:o,parents:e}),a=un(i,t,s);a!==ge.skip&&(o==="__proto__"?Object.defineProperty(r,o,{value:a,configurable:!0,enumerable:!0,writable:!0}):r[o]=a)}return r}function kr(e){return e.flat()}function Ar(e){return new Set(cn(e))}function Mr(e){return new Map(cn(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,i])=>Object.hasOwn(wt,o)).map(([o,i])=>i===!1?[o,ln]:[o,i]))),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),i=Ot(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=rt(s)),[s,rt(s)]}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"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function Gr(e,t,n,r){const o=tt(e);let i=Jr(xe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ct)))),i}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 i=nt(t),s=Tt(t),a=Ot(s),l=xe(t),u=i==="y",f=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/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[s]-=d*(n&&u?-1:1);break;case"end":m[s]+=d*(n&&u?-1:1);break}return m}const eo=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.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<a.length;E++){const{name:S,fn:w}=a[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:s,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 s.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:i,rects:s,elements:a,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=a[d?h==="floating"?"reference":"floating":h],w=ot(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(S)))==null||n?S:S.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),_=h==="floating"?j({},s.floating,{x:r,y:o}):s.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),v=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},g=ot(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,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:i,platform:s,elements:a,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 s.getDimensions(u),S=m==="y",w=S?"top":"left",_=S?"bottom":"right",T=S?"clientHeight":"clientWidth",v=i.reference[y]+i.reference[m]-d[m]-i.floating[y],g=d[m]-i.reference[m],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let V=C?C[T]:0;(!V||!await(s.isElement==null?void 0:s.isElement(C)))&&(V=a.floating[T]||i.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&&i.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:i,middlewareData:s,rects:a,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=s.arrow)!=null&&r.alignmentOffset)return{};const T=xe(i),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=s.flip)==null?void 0:o.overflows)||[];if(d&&$.push(re[T]),m){const M=Kr(i,a,g);$.push(re[M[0]],re[M[1]])}if(H=[...H,{placement:i,overflows:$}],!$.every(M=>M<=0)){var G,X;const M=(((G=s.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(i!==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:i}=n,s=ke(t,n),{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:_=>{let{x:T,y:v}=_;return{x:T,y:v}}}}=s,f=on(s,Qr),h={x:r,y:o},d=await bn(n,f),m=nt(xe(i)),y=St(m);let E=h[y],S=h[m];if(a){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:i,rects:s,middlewareData:a}=n,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=ke(t,n),h={x:r,y:o},d=nt(i),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=s.reference[m]-s.floating[v]+w.mainAxis,C=s.reference[m]+s.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(i)),C=s.reference[d]-s.floating[v]+(g&&((_=a.offset)==null?void 0:_[d])||0)+(g?0:w.crossAxis),V=s.reference[d]+s.reference[v]+(g?0:((T=a.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 ce(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 ae(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 ae(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||ce(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),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Y(o);return i?t.concat(s,s.visualViewport||[],Ke(o)?o:[],s.frameElement&&n?ze(s.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),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Qe(n)!==i||Qe(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function It(e){return ae(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,$:i}=_n(t);let s=(i?Qe(n.width):n.width)/r,a=(i?Qe(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const co=be(0);function En(e){const t=Y(e);return!Pt()||!t.visualViewport?co:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ao(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(),i=It(e);let s=be(1);t&&(r?ae(r)&&(s=Me(r)):s=Me(e));const a=ao(i,n,r)?En(i):be(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,f=o.width/s.x,h=o.height/s.y;if(i){const d=Y(i),m=r&&ae(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 i=o==="fixed",s=ce(r),a=t?xn(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=be(1);const f=be(0),h=ie(r);if((h||!h&&!i)&&((ye(r)!=="body"||Ke(s))&&(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(ce(e)).left+st(e).scrollLeft}function ho(e){const t=ce(e),n=st(e),r=e.ownerDocument.body,o=Ee(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ee(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Sn(e);const a=-n.scrollTop;return z(r).direction==="rtl"&&(s+=Ee(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function po(e,t){const n=Y(e),r=ce(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Pt();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function mo(e,t){const n=Se(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ie(e)?Me(e):be(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function On(e,t,n){let r;if(t==="viewport")r=po(e,n);else if(t==="document")r=ho(ce(e));else if(ae(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||!ae(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(a=>ae(a)&&ye(a)!=="body"),o=null;const i=z(e).position==="fixed";let s=i?Ae(e):e;for(;ae(s)&&!it(s);){const a=z(s),l=Rt(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ke(s)&&!l&&Tn(e,s))?r=r.filter(f=>f!==s):o=a,s=Ae(s)}return t.set(e,r),r}function bo(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?go(t,this._c):[].concat(n),r],a=s[0],l=s.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,a,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=ce(t),i=n==="fixed",s=Se(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=be(0);if(r||!r&&!i)if((ye(t)!=="body"||Ke(o))&&(a=st(t)),r){const h=Se(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=Sn(o));const u=s.left+a.scrollLeft-l.x,f=s.top+a.scrollTop-l.y;return{x:u,y:f,width:s.width,height:s.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:ce,getClippingRect:bo,getOffsetParent:Rn,getElementRects:wo,getClientRects:fo,getDimensions:yo,getScale:Me,isElement:ae,isRTL:_o};function xo(e,t){let n=null,r;const o=ce(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:f,width:h,height:d}=e.getBoundingClientRect();if(a||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 s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},100)}T=!1}try{n=new IntersectionObserver(v,j({},_,{root:o.ownerDocument}))}catch{n=new IntersectionObserver(v,_)}n.observe(e)}return s(!0),i}function So(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=It(e),f=o||i?[...u?ze(u):[],...ze(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const h=u&&a?xo(u,n):null;let d=-1,m=null;s&&(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),i&&_.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),i=j({},o.platform,{_c:r});return eo(e,t,j({},o,{platform:i}))};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 i;if(!e.el){(i=e.cleanup)==null||i.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(i=>{setTimeout(()=>i(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:i})=>(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,i)),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 ct(){return An(" ")}function No(){return An("")}function at(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function A(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]:A(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 i=e.length;for(;i--;){const s=e[i],a=t[i];if(a){for(const l in s)l in a||(r[l]=1);for(const l in a)o[l]||(n[l]=a[l],o[l]=1);e[i]=a}else for(const l in s)o[l]=1}for(const s in r)s in n||(n[s]=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 i=e.$$.on_mount.map(Pn).filter(kt);e.$$.on_destroy?e.$$.on_destroy.push(...i):Je(i),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,i,s=null,a=[-1]){const l=Ge;Xe(e);const u=e.$$={fragment:null,ctx:[],props:i,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:a,skip_bound:!1,root:t.target||l.$$.root};s&&s(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,i;return{c(){t=se("button"),A(t,"aria-label",n=e[3]?e[3]:null),A(t,"class",r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`),t.disabled=e[2],A(t,"tabindex","0")},m(s,a){te(s,t,a),t.innerHTML=e[5],o||(i=at(t,"click",function(){kt(e[0])&&e[0].apply(this,arguments)}),o=!0)},p(s,[a]){e=s,a&32&&(t.innerHTML=e[5]),a&8&&n!==(n=e[3]?e[3]:null)&&A(t,"aria-label",n),a&18&&r!==(r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`)&&A(t,"class",r),a&4&&(t.disabled=e[2])},i:q,o:q,d(s){s&&J(t),o=!1,i()}}}function Qo(e,t,n){let{config:r,step:o}=t,i,s,a,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,i=r.action?r.action.bind(o.tour):null),n(1,s=r.classes),n(2,a=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))},[i,s,a,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 s=0;s<r.length;s+=1)o[s]=Wn(Bn(e,r,s));const i=s=>D(o[s],1,1,()=>{o[s]=null});return{c(){for(let s=0;s<o.length;s+=1)o[s].c();t=No()},m(s,a){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(s,a);te(s,t,a),n=!0},p(s,a){if(a&3){r=jn(s[1]);let l;for(l=0;l<r.length;l+=1){const u=Bn(s,r,l);o[l]?(o[l].p(u,a),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)i(l);Ce()}},i(s){if(!n){for(let a=0;a<r.length;a+=1)I(o[a]);n=!0}},o(s){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)D(o[a]);n=!1},d(s){s&&J(t),Wo(o,s)}}}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 i={};o&2&&(i.config=r[2]),o&1&&(i.step=r[0]),t.$set(i)},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(),A(t,"class","shepherd-footer")},m(o,i){te(o,t,i),r&&r.m(t,null),n=!0},p(o,[i]){o[1]?r?(r.p(o,i),i&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=i=>{"step"in i&&n(0,o=i.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,i;return{c(){t=se("button"),n=se("span"),n.textContent="×",A(n,"aria-hidden","true"),A(t,"aria-label",r=e[0].label?e[0].label:"Close Tour"),A(t,"class","shepherd-cancel-icon"),A(t,"type","button")},m(s,a){te(s,t,a),De(t,n),o||(i=at(t,"click",e[1]),o=!0)},p(s,[a]){a&1&&r!==(r=s[0].label?s[0].label:"Close Tour")&&A(t,"aria-label",r)},i:q,o:q,d(s){s&&J(t),o=!1,i()}}}function ii(e,t,n){let{cancelIcon:r,step:o}=t;const i=s=>{s.preventDefault(),o.cancel()};return e.$$set=s=>{"cancelIcon"in s&&n(0,r=s.cancelIcon),"step"in s&&n(2,o=s.step)},[r,i,o]}class si extends fe{constructor(t){super(),ue(this,t,ii,oi,le,{cancelIcon:0,step:2})}}function ci(e){let t;return{c(){t=se("h3"),A(t,"id",e[1]),A(t,"class","shepherd-title")},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&A(t,"id",n[1])},i:q,o:q,d(n){n&&J(t),e[3](null)}}}function ai(e,t,n){let{labelId:r,element:o,title:i}=t;At(()=>{me(i)&&n(2,i=i()),n(0,o.innerHTML=i,o)});function s(a){je[a?"unshift":"push"](()=>{o=a,n(0,o)})}return e.$$set=a=>{"labelId"in a&&n(1,r=a.labelId),"element"in a&&n(0,o=a.element),"title"in a&&n(2,i=a.title)},[o,r,i,s]}class li extends fe{constructor(t){super(),ue(this,t,ai,ci,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 i={};o&1&&(i.labelId=r[0]),o&4&&(i.title=r[2]),t.$set(i)},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 i={};o&8&&(i.cancelIcon=r[3]),o&2&&(i.step=r[1]),t.$set(i)},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),i=e[3]&&e[3].enabled&&Vn(e);return{c(){t=se("header"),o&&o.c(),n=ct(),i&&i.c(),A(t,"class","shepherd-header")},m(s,a){te(s,t,a),o&&o.m(t,null),De(t,n),i&&i.m(t,null),r=!0},p(s,[a]){s[2]?o?(o.p(s,a),a&4&&I(o,1)):(o=Nn(s),o.c(),I(o,1),o.m(t,n)):o&&(Te(),D(o,1,1,()=>{o=null}),Ce()),s[3]&&s[3].enabled?i?(i.p(s,a),a&8&&I(i,1)):(i=Vn(s),i.c(),I(i,1),i.m(t,null)):i&&(Te(),D(i,1,1,()=>{i=null}),Ce())},i(s){r||(I(o),I(i),r=!0)},o(s){D(o),D(i),r=!1},d(s){s&&J(t),o&&o.d(),i&&i.d()}}}function fi(e,t,n){let{labelId:r,step:o}=t,i,s;return e.$$set=a=>{"labelId"in a&&n(0,r=a.labelId),"step"in a&&n(1,o=a.step)},e.$$.update=()=>{e.$$.dirty&2&&(n(2,i=o.options.title),n(3,s=o.options.cancelIcon))},[r,o,i,s]}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"),A(t,"class","shepherd-text"),A(t,"id",e[1])},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&A(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:i}=t;At(()=>{let{text:a}=i.options;me(a)&&(a=a.call(i)),He(a)?o.appendChild(a):n(0,o.innerHTML=a,o)});function s(a){je[a?"unshift":"push"](()=>{o=a,n(0,o)})}return e.$$set=a=>{"descriptionId"in a&&n(1,r=a.descriptionId),"element"in a&&n(0,o=a.element),"step"in a&&n(2,i=a.step)},[o,r,i,s]}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 i={};o&2&&(i.labelId=r[1]),o&4&&(i.step=r[2]),t.$set(i)},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 i={};o&1&&(i.descriptionId=r[0]),o&4&&(i.step=r[2]),t.$set(i)},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 i={};o&4&&(i.step=r[2]),t.$set(i)},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),i,s=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,a,l=n&&Un(e),u=o&&Hn(e),f=s&&Yn(e);return{c(){t=se("div"),l&&l.c(),r=ct(),u&&u.c(),i=ct(),f&&f.c(),A(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,i),f&&f.m(t,null),a=!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,i)):u&&(Te(),D(u,1,1,()=>{u=null}),Ce()),d&4&&(s=Array.isArray(h[2].options.buttons)&&h[2].options.buttons.length),s?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){a||(I(l),I(u),I(f),a=!0)},o(h){D(l),D(u),D(f),a=!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:i}=t;return e.$$set=s=>{"descriptionId"in s&&n(0,r=s.descriptionId),"labelId"in s&&n(1,o=s.labelId),"step"in s&&n(2,i=s.step)},[r,o,i]}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"),A(t,"class","shepherd-arrow"),A(t,"data-popper-arrow","")},m(n,r){te(n,t,r)},d(n){n&&J(t)}}}function vi(e){let t,n,r,o,i,s,a,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":i=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=ct(),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),s=!0,a||(l=at(t,"keydown",e[7]),a=!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,[(!s||m&20&&o!==(o=N(d[4].options.text)?null:d[2]))&&{"aria-describedby":o},(!s||m&24&&i!==(i=d[4].options.title?d[3]:null))&&{"aria-labelledby":i},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){s||(I(r.$$.fragment,d),s=!0)},o(d){D(r.$$.fragment,d),s=!1},d(d){d&&J(t),u&&u.d(),we(r),e[13](null),a=!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:i,firstFocusableElement:s,focusableElements:a,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,a=o.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,s=a[0]),n(10,u=a[a.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(a.length===0){g.preventDefault();break}g.shiftKey?(document.activeElement===s||document.activeElement.classList.contains("shepherd-element"))&&(g.preventDefault(),u.focus()):document.activeElement===u&&(g.preventDefault(),s.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,i=g.descriptionId),"firstFocusableElement"in g&&n(8,s=g.firstFocusableElement),"focusableElements"in g&&n(9,a=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,i,l,f,d,m,T,s,a,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(){this.tour.modal.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:"",i=[...r.split(" "),...o.split(" ")],s=new Set(i);return Array.from(s).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),i=r[o]||void 0;if(i===void 0)return null;const s=e.match(i);return s?parseFloat(s[s.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",i),e.removeEventListener("error",s)},i=()=>{n(Pe(e.result)),o()},s=()=>{r(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",s)});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",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{n(),o()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});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:i}={}){const s=indexedDB.open(e,t),a=Pe(s);return r&&s.addEventListener("upgradeneeded",l=>{r(Pe(s.result),l.oldVersion,l.newVersion,Pe(s.transaction),l)}),n&&s.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}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 i=async function(a,...l){const u=this.transaction(a,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,i),i}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(i=>r.store.put(i));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:i,innerHeight:s}=window,{topLeft:a=0,topRight:l=0,bottomRight:u=0,bottomLeft:f=0}=typeof o=="number"?{topLeft:o,topRight:o,bottomRight:o,bottomLeft:o}:o;return`M${i},${s}H0V0H${i}V${s}ZM${n+a},${r}a${a},${a},0,0,0-${a},${a}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,i;return{c(){t=kn("svg"),n=kn("path"),A(n,"d",e[2]),A(t,"class",r=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(s,a){te(s,t,a),De(t,n),e[11](t),o||(i=at(t,"touchmove",e[3]),o=!0)},p(s,[a]){a&4&&A(n,"d",s[2]),a&2&&r!==(r=`${s[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&A(t,"class",r)},i:q,o:q,d(s){s&&J(t),e[11](null),o=!1,i()}}}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 s=(r=n)==null?void 0:r.frameElement;if(s){var o,i;const a=s.getBoundingClientRect();t.top+=a.top+((o=a.scrollTop)!=null?o:0),t.left+=a.left+((i=a.scrollLeft)!=null?i: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 s=t.getBoundingClientRect(),a=s.y||s.top,l=s.bottom||a+s.height;r=Math.max(r,a),o=Math.min(o,l)}const i=Math.max(o-r,0);return{y:r,height:i}}function Ji(e,t,n){let{element:r,openingProperties:o}=t,i=!1,s,a;u();const l=()=>r;function u(){n(4,o={width:0,height:0,x:0,y:0,r:0})}function f(){n(1,i=!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,i=!0)}const y=v=>{v.preventDefault()},E=v=>{v.stopPropagation()};function S(){window.addEventListener("touchmove",y,{passive:!1})}function w(){s&&(cancelAnimationFrame(s),s=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=()=>{s=void 0,h(g,C,V+$.left,re+$.top,H,v.target),s=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,a=Yi(o))},[r,i,a,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),i=[this.dataRequester.getTourState()];o||i.push(this.createNewActor()),await Promise.all(i)}}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(i=>{(s=>{this.on(s,a=>{a=a||{},a.tour=this,ne.trigger(s,a)})})(i)}),this._setTourID(t.id);const{dataRequester:o}=ne;return o&&this.trackedEvents.forEach(i=>this.on(i,s=>{const{tour:a}=s,{id:l,steps:u}=a;let f;if(i!=="active"){const{step:d}=s;d&&(f=u.findIndex(m=>m.id===d.id)+1)}const h={currentUserId:localStorage.getItem(Yt),eventType:i,journeyData:{id:l,currentStep:f,numberOfSteps:u.length,tourOptions:a.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()}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 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"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-shepherd",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
"src"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"shepherd.js": "^12.0.
|
|
27
|
+
"shepherd.js": "^12.0.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@testing-library/jest-dom": "^6.2.0",
|
|
31
|
-
"@testing-library/react": "^
|
|
32
|
-
"@types/react": "^18.
|
|
31
|
+
"@testing-library/react": "^15.0.6",
|
|
32
|
+
"@types/react": "^18.3.1",
|
|
33
33
|
"@vitejs/plugin-react": "^4.2.1",
|
|
34
|
-
"@vitest/ui": "^1.
|
|
35
|
-
"happy-dom": "^14.
|
|
36
|
-
"typescript": "^5.4.
|
|
37
|
-
"vite": "^5.2.
|
|
38
|
-
"vite-plugin-dts": "^3.
|
|
39
|
-
"vitest": "^1.
|
|
34
|
+
"@vitest/ui": "^1.6.0",
|
|
35
|
+
"happy-dom": "^14.7.1",
|
|
36
|
+
"typescript": "^5.4.5",
|
|
37
|
+
"vite": "^5.2.11",
|
|
38
|
+
"vite-plugin-dts": "^3.9.1",
|
|
39
|
+
"vitest": "^1.5.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": "^18.2.0",
|