react-shepherd 7.0.0 → 7.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/README.md +14 -8
- package/dist/index.js +5 -5
- package/dist/index.umd.cjs +2 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
# react
|
|
1
|
+
# react-shepherd
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/react-shepherd)
|
|
4
4
|
|
|
5
|
-
This is a React wrapper for the
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
This is a React wrapper for the
|
|
6
|
+
[Shepherd](https://github.com/shipshapecode/shepherd) tour library. It's mainly
|
|
7
|
+
a wrapper around the Shepherd library that exposes the tour object and methods
|
|
8
|
+
to the context object that can be passed into props for dynamic interactivity.
|
|
8
9
|
|
|
9
10
|
## Install
|
|
10
11
|
|
|
@@ -59,14 +60,19 @@ export default function App() {
|
|
|
59
60
|
|
|
60
61
|
## Configuration
|
|
61
62
|
|
|
62
|
-
The following configuration options for a tour can be set on the `useShepherd`
|
|
63
|
+
The following configuration options for a tour can be set on the `useShepherd`
|
|
64
|
+
hook to control the way that Shepherd is used. This is simply a POJO passed to
|
|
65
|
+
Shepherd to use the options noted in the Shepherd Tour
|
|
66
|
+
[options](https://docs.shepherdjs.dev/api/tour/classes/tour/).
|
|
63
67
|
|
|
64
68
|
## License
|
|
65
69
|
|
|
66
|
-
`react-shepherd` is licensed under **AGPL-3.0** (for open source and
|
|
70
|
+
`react-shepherd` is licensed under **AGPL-3.0** (for open source and
|
|
71
|
+
non-commercial use) with a **Commercial License** available for commercial use.
|
|
67
72
|
|
|
68
73
|
- **Free** for open source and non-commercial projects under AGPL-3.0
|
|
69
|
-
- **Commercial license required** for commercial products and revenue-generating
|
|
74
|
+
- **Commercial license required** for commercial products and revenue-generating
|
|
75
|
+
companies
|
|
70
76
|
|
|
71
77
|
📄 [Read License Details](../../LICENSE.md)
|
|
72
78
|
💳 [Purchase Commercial License](https://shepherdjs.dev/pricing)
|
package/dist/index.js
CHANGED
|
@@ -1054,7 +1054,7 @@ function je(e, t) {
|
|
|
1054
1054
|
return te(e) ? e.call(t) : e;
|
|
1055
1055
|
}
|
|
1056
1056
|
function yn(e, t) {
|
|
1057
|
-
const n = e.action ? e.action.bind(t.tour) : null, r = !!e.disabled && je(e.disabled, t), o = e.label ? je(e.label, t) : null, i = e.text ? je(e.text, t) : null, l = z("button", { "aria-label": o || null, class: `${e.classes || ""} shepherd-button ${e.secondary ? "shepherd-button-secondary" : ""}`, disabled: r || null, onclick: n, tabindex: "0", type: "button" });
|
|
1057
|
+
const n = e.action ? e.action.bind(t.tour) : null, r = !!e.disabled && je(e.disabled, t), o = e.label ? je(e.label, t) : null, i = e.text ? je(e.text, t) : null, l = z("button", N({}, e.attrs || {}, { "aria-label": o || null, class: `${e.classes || ""} shepherd-button ${e.secondary ? "shepherd-button-secondary" : ""}`, disabled: r || null, onclick: n, tabindex: "0", type: "button" }));
|
|
1058
1058
|
return i && (l.innerHTML = i), l;
|
|
1059
1059
|
}
|
|
1060
1060
|
function bn(e, t) {
|
|
@@ -1063,9 +1063,9 @@ function bn(e, t) {
|
|
|
1063
1063
|
const i = z("h3", { id: r, class: "shepherd-title" }), l = te(o) ? o() : o;
|
|
1064
1064
|
return i.innerHTML = l, i;
|
|
1065
1065
|
})(e, t.options.title)), t.options.cancelIcon && t.options.cancelIcon.enabled && n.append((function(r, o) {
|
|
1066
|
-
return z("button", { "aria-label": r.label ? r.label : "Close Tour", class: "shepherd-cancel-icon", onclick: (i) => {
|
|
1066
|
+
return z("button", N({}, r.attrs || {}, { "aria-label": r.label ? r.label : "Close Tour", class: "shepherd-cancel-icon", onclick: (i) => {
|
|
1067
1067
|
i.preventDefault(), o.cancel();
|
|
1068
|
-
}, type: "button" }, z("span", { "aria-hidden": "true" }, "×"));
|
|
1068
|
+
}, type: "button" }), z("span", { "aria-hidden": "true" }, "×"));
|
|
1069
1069
|
})(t.options.cancelIcon, t)), n;
|
|
1070
1070
|
}
|
|
1071
1071
|
function xn(e, t, n) {
|
|
@@ -1250,8 +1250,8 @@ function wn(e) {
|
|
|
1250
1250
|
const { innerWidth: y, innerHeight: b } = window;
|
|
1251
1251
|
return h.forEach((x) => {
|
|
1252
1252
|
const { width: O, height: P, x: T = 0, y: k = 0, r: A = 0 } = x, { topLeft: E = 0, topRight: w = 0, bottomRight: S = 0, bottomLeft: _ = 0 } = typeof A == "number" ? { topLeft: A, topRight: A, bottomRight: A, bottomLeft: A } : A;
|
|
1253
|
-
f += `M${T + E},${k}
|
|
1254
|
-
}), `M${y},${b}
|
|
1253
|
+
f += `M${T + E},${k}a${E},${E},0,0,0-${E},${E}V` + (P + k - _) + `a${_},${_},0,0,0,${_},${_}H` + (O + T - S) + `a${S},${S},0,0,0,${S}-${S}V${k + w}a${w},${w},0,0,0-${w}-${w}Z`;
|
|
1254
|
+
}), `M${y},${b}H0V0H${y}V${b}Z${f}`.replace(/\s/g, "");
|
|
1255
1255
|
})(n));
|
|
1256
1256
|
}
|
|
1257
1257
|
function l() {
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(J,re){typeof exports=="object"&&typeof module<"u"?re(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],re):(J=typeof globalThis<"u"?globalThis:J||self,re(J.
|
|
1
|
+
(function(J,re){typeof exports=="object"&&typeof module<"u"?re(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],re):(J=typeof globalThis<"u"?globalThis:J||self,re(J.ReactShepherd={},J.React))})(this,(function(J,re){"use strict";var be={exports:{}},me={};var Ze;function kt(){if(Ze)return me;Ze=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var l=null;if(i!==void 0&&(l=""+i),o.key!==void 0&&(l=""+o.key),"key"in o){i={};for(var s in o)s!=="key"&&(i[s]=o[s])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:l,ref:o!==void 0?o:null,props:i}}return me.Fragment=t,me.jsx=n,me.jsxs=n,me}var ge={};var Qe;function Ct(){return Qe||(Qe=1,process.env.NODE_ENV!=="production"&&(function(){function e(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===_?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case f:return"Fragment";case b:return"Profiler";case y:return"StrictMode";case T:return"Suspense";case k:return"SuspenseList";case w:return"Activity"}if(typeof c=="object")switch(typeof c.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),c.$$typeof){case h:return"Portal";case O:return c.displayName||"Context";case x:return(c._context.displayName||"Context")+".Consumer";case P:var R=c.render;return c=c.displayName,c||(c=R.displayName||R.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case A:return R=c.displayName||null,R!==null?R:e(c.type)||"Memo";case E:R=c._payload,c=c._init;try{return e(c(R))}catch{}}return null}function t(c){return""+c}function n(c){try{t(c);var R=!1}catch{R=!0}if(R){R=console;var j=R.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return j.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),t(c)}}function r(c){if(c===f)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===E)return"<...>";try{var R=e(c);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function o(){var c=S.A;return c===null?null:c.getOwner()}function i(){return Error("react-stack-top-frame")}function l(c){if(C.call(c,"key")){var R=Object.getOwnPropertyDescriptor(c,"key").get;if(R&&R.isReactWarning)return!1}return c.key!==void 0}function s(c,R){function j(){D||(D=!0,console.error("%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://react.dev/link/special-props)",R))}j.isReactWarning=!0,Object.defineProperty(c,"key",{get:j,configurable:!0})}function a(){var c=e(this.type);return H[c]||(H[c]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),c=this.props.ref,c!==void 0?c:null}function u(c,R,j,I,Le,Xe){var F=j.ref;return c={$$typeof:g,type:c,key:R,props:j,_owner:I},(F!==void 0?F:null)!==null?Object.defineProperty(c,"ref",{enumerable:!1,get:a}):Object.defineProperty(c,"ref",{enumerable:!1,value:null}),c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(c,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(c,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Le}),Object.defineProperty(c,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Xe}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}function p(c,R,j,I,Le,Xe){var F=R.children;if(F!==void 0)if(I)if(M(F)){for(I=0;I<F.length;I++)d(F[I]);Object.freeze&&Object.freeze(F)}else console.error("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 d(F);if(C.call(R,"key")){F=e(c);var pe=Object.keys(R).filter(function(Tn){return Tn!=="key"});I=0<pe.length?"{key: someKey, "+pe.join(": ..., ")+": ...}":"{key: someKey}",q[F+I]||(pe=0<pe.length?"{"+pe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,$,I,pe,I),U[I+$]=!0)}if(I=null,j!==void 0&&(n(j),I=""+j),l(R)&&(n(R.key),I=""+R.key),"key"in R){j={};for(var Ge in R)Ge!=="key"&&(j[Ge]=R[Ge])}else j=R;return I&&s(j,typeof c=="function"?c.displayName||c.name||"Unknown":c),u(c,I,j,o(),Le,Xe)}function d(c){v(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===E&&(c._payload.status==="fulfilled"?v(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function v(c){return typeof c=="object"&&c!==null&&c.$$typeof===g}var m=re,g=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),O=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),S=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=Object.prototype.hasOwnProperty,M=Array.isArray,L=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(c){return c()}};var D,F={},H=m.react_stack_bottom_frame.bind(m,i)(),q=L(r(i)),U={};ge.Fragment=f,ge.jsx=function(c,R,j){var $=1e4>S.recentlyCreatedOwnerStacks++;return p(c,R,j,!1,$?Error("react-stack-top-frame"):H,$?L(r(c)):q)},ge.jsxs=function(c,R,j){var $=1e4>S.recentlyCreatedOwnerStacks++;return p(c,R,j,!0,$?Error("react-stack-top-frame"):H,$?L(r(c)):q)}})()),ge}var Ke;function Lt(){return Ke||(Ke=1,process.env.NODE_ENV==="production"?be.exports=kt():be.exports=Ct()),be.exports}var Mt=Lt();function ce(e){return e instanceof HTMLElement}function ee(e){return typeof e=="function"}function xe(e){return typeof e=="string"}function V(e){return e===void 0}class Me{on(t,n,r,o=!1){var i;return V(this.bindings)&&(this.bindings={}),V(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){if(V(this.bindings)||V(this.bindings[t]))return this;var r;return V(n)?delete this.bindings[t]:(r=this.bindings[t])==null||r.forEach((o,i)=>{var l;o.handler===n&&((l=this.bindings[t])==null||l.splice(i,1))}),this}trigger(t,...n){var r;return!V(this.bindings)&&this.bindings[t]&&((r=this.bindings[t])==null||r.forEach((o,i)=>{const{ctx:l,handler:s,once:a}=o,u=l||this;var p;s.apply(u,n),a&&((p=this.bindings[t])==null||p.splice(i,1))})),this}}function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(null,arguments)}function je(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}const oe={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function jt(e,t){return t}function Dt(e,t){return e.filter(n=>n!==void 0)}var et;function tt(e){return typeof e!="object"||e===null?0:Array.isArray(e)?2:(function(t){if(!rt.includes(Object.prototype.toString.call(t)))return!1;const{constructor:n}=t;if(n===void 0)return!0;const r=n.prototype;return!(r===null||typeof r!="object"||!rt.includes(Object.prototype.toString.call(r))||!r.hasOwnProperty("isPrototypeOf"))})(e)?1:e instanceof Set?3:e instanceof Map?4:5}function $t(e,t){return typeof e=="object"&&Object.prototype.propertyIsEnumerable.call(e,t)}function nt(e){var t;let n=0,r=(t=e[0])==null?void 0:t[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(;;){if(r===void 0)return{done:!0,value:void 0};const i=r.next();if(i.done!==!0)return{done:!1,value:i.value};var o;n+=1,r=(o=e[n])==null?void 0:o[Symbol.iterator]()}}})}}(function(e){e[e.NOT=0]="NOT",e[e.RECORD=1]="RECORD",e[e.ARRAY=2]="ARRAY",e[e.SET=3]="SET",e[e.MAP=4]="MAP",e[e.OTHER=5]="OTHER"})(et||(et={}));const rt=["[object Object]","[object Module]"],we={mergeRecords:function(e,t,n){const r={};for(const o of(function(i){const l=new Set;for(const s of i)for(const a of[...Object.keys(s),...Object.getOwnPropertySymbols(s)])l.add(a);return l})(e)){const i=[];for(const a of e)$t(a,o)&&i.push(a[o]);if(i.length===0)continue;const l=t.metaDataUpdater(n,{key:o,parents:e}),s=ot(i,t,l);s!==oe.skip&&(o==="__proto__"?Object.defineProperty(r,o,{value:s,configurable:!0,enumerable:!0,writable:!0}):r[o]=s)}return r},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(nt(e))},mergeMaps:function(e){return new Map(nt(e))},mergeOthers:function(e){return e.at(-1)}};function De(...e){return(function(t,n){const r=(function(i,l){var s,a,u;return{defaultMergeFunctions:we,mergeFunctions:N({},we,Object.fromEntries(Object.entries(i).filter(([p,d])=>Object.hasOwn(we,p)).map(([p,d])=>d===!1?[p,we.mergeOthers]:[p,d]))),metaDataUpdater:(s=i.metaDataUpdater)!=null?s:jt,deepmerge:l,useImplicitDefaultMerging:(a=i.enableImplicitDefaultMerging)!=null&&a,filterValues:i.filterValues===!1?void 0:(u=i.filterValues)!=null?u:Dt,actions:oe}})(t,o);function o(...i){return ot(i,r,n)}return o})({})(...e)}function ot(e,t,n){var r;const o=(r=t.filterValues==null?void 0:t.filterValues(e,n))!=null?r:e;if(o.length===0)return;if(o.length===1)return $e(o,t,n);const i=tt(o[0]);if(i!==0&&i!==5){for(let l=1;l<o.length;l++)if(tt(o[l])!==i)return $e(o,t,n)}switch(i){case 1:return(function(l,s,a){const u=s.mergeFunctions.mergeRecords(l,s,a);return u===oe.defaultMerge||s.useImplicitDefaultMerging&&u===void 0&&s.mergeFunctions.mergeRecords!==s.defaultMergeFunctions.mergeRecords?s.defaultMergeFunctions.mergeRecords(l,s,a):u})(o,t,n);case 2:return(function(l,s,a){const u=s.mergeFunctions.mergeArrays(l,s,a);return u===oe.defaultMerge||s.useImplicitDefaultMerging&&u===void 0&&s.mergeFunctions.mergeArrays!==s.defaultMergeFunctions.mergeArrays?s.defaultMergeFunctions.mergeArrays(l):u})(o,t,n);case 3:return(function(l,s,a){const u=s.mergeFunctions.mergeSets(l,s,a);return u===oe.defaultMerge||s.useImplicitDefaultMerging&&u===void 0&&s.mergeFunctions.mergeSets!==s.defaultMergeFunctions.mergeSets?s.defaultMergeFunctions.mergeSets(l):u})(o,t,n);case 4:return(function(l,s,a){const u=s.mergeFunctions.mergeMaps(l,s,a);return u===oe.defaultMerge||s.useImplicitDefaultMerging&&u===void 0&&s.mergeFunctions.mergeMaps!==s.defaultMergeFunctions.mergeMaps?s.defaultMergeFunctions.mergeMaps(l):u})(o,t,n);default:return $e(o,t,n)}}function $e(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===oe.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}function Ie(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 It(e){const{event:t,selector:n}=e.options.advanceOn||{};if(t){const r=(function(i,l){return s=>{if(i.isOpen()){const a=i.el&&s.currentTarget===i.el;(!V(l)&&s.currentTarget.matches(l)||a)&&i.tour.next()}}})(e,n);let o=null;if(!V(n)&&(o=document.querySelector(n),!o))return;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)))}}function it(e){return xe(e)&&e!==""?e.charAt(e.length-1)!=="-"?`${e}-`:e:""}function st(e){return e==null||!e.element||!e.on}function lt(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(t=="x"?n:3&n|8).toString(16)})}const at=["start","end"],ct=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-"+at[0],t+"-"+at[1]),[]),ue=Math.min,ie=Math.max,Ee=Math.round,Oe=Math.floor,z=e=>({x:e,y:e}),Ft={left:"right",right:"left",bottom:"top",top:"bottom"},Ht={start:"end",end:"start"};function Fe(e,t,n){return ie(e,ue(t,n))}function se(e,t){return typeof e=="function"?e(t):e}function Q(e){return e.split("-")[0]}function K(e){return e.split("-")[1]}function He(e){return e==="x"?"y":"x"}function Ne(e){return e==="y"?"height":"width"}const Nt=new Set(["top","bottom"]);function te(e){return Nt.has(Q(e))?"y":"x"}function Ve(e){return He(te(e))}function ut(e,t,n){n===void 0&&(n=!1);const r=K(e),o=Ve(e),i=Ne(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Se(l)),[l,Se(l)]}function Te(e){return e.replace(/start|end/g,t=>Ht[t])}const ft=["left","right"],dt=["right","left"],Vt=["top","bottom"],Bt=["bottom","top"];function Wt(e,t,n,r){const o=K(e);let i=(function(l,s,a){switch(l){case"top":case"bottom":return a?s?dt:ft:s?ft:dt;case"left":case"right":return s?Vt:Bt;default:return[]}})(Q(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(Te)))),i}function Se(e){return e.replace(/left|right|bottom|top/g,t=>Ft[t])}function ht(e){return typeof e!="number"?(function(t){return N({top:0,right:0,bottom:0,left:0},t)})(e):{top:e,right:e,bottom:e,left:e}}function _e(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const Yt=["crossAxis","alignment","allowedPlacements","autoAlignment"],qt=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],Ut=["mainAxis","crossAxis","limiter"];function pt(e,t,n){let{reference:r,floating:o}=e;const i=te(t),l=Ve(t),s=Ne(l),a=Q(t),u=i==="y",p=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,v=r[s]/2-o[s]/2;let m;switch(a){case"top":m={x:p,y:r.y-o.height};break;case"bottom":m={x:p,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(K(t)){case"start":m[l]-=v*(n&&u?-1:1);break;case"end":m[l]+=v*(n&&u?-1:1)}return m}async function Jt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:v=!1,padding:m=0}=se(t,e),g=ht(m),h=s[v?d==="floating"?"reference":"floating":d],f=_e(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:p,strategy:a})),y=d==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),x=await(i.isElement==null?void 0:i.isElement(b))&&await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1},O=_e(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:a}):y);return{top:(f.top-O.top+g.top)/x.y,bottom:(O.bottom-f.bottom+g.bottom)/x.y,left:(f.left-O.left+g.left)/x.x,right:(O.right-f.right+g.right)/x.x}}const zt=new Set(["left","top"]);function Re(){return typeof window<"u"}function fe(e){return mt(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function X(e){var t;return(t=(mt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mt(e){return!!Re()&&(e instanceof Node||e instanceof B(e).Node)}function W(e){return!!Re()&&(e instanceof Element||e instanceof B(e).Element)}function G(e){return!!Re()&&(e instanceof HTMLElement||e instanceof B(e).HTMLElement)}function gt(e){return!(!Re()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof B(e).ShadowRoot)}const Xt=new Set(["inline","contents"]);function ve(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Xt.has(o)}const Gt=new Set(["table","td","th"]);function Zt(e){return Gt.has(fe(e))}const Qt=[":popover-open",":modal"];function Ae(e){return Qt.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kt=["transform","translate","scale","rotate","perspective"],en=["transform","translate","scale","rotate","perspective","filter"],tn=["paint","layout","strict","content"];function Be(e){const t=We(),n=W(e)?Y(e):e;return Kt.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||en.some(r=>(n.willChange||"").includes(r))||tn.some(r=>(n.contain||"").includes(r))}function We(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const nn=new Set(["html","body","#document"]);function de(e){return nn.has(fe(e))}function Y(e){return B(e).getComputedStyle(e)}function Pe(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ne(e){if(fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gt(e)&&e.host||X(e);return gt(t)?t.host:t}function vt(e){const t=ne(e);return de(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&ve(t)?t:vt(t)}function ye(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=vt(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=B(o);if(i){const s=Ye(l);return t.concat(l,l.visualViewport||[],ve(o)?o:[],s&&n?ye(s):[])}return t.concat(o,ye(o,[],n))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yt(e){const t=Y(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=G(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=Ee(n)!==i||Ee(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function qe(e){return W(e)?e:e.contextElement}function he(e){const t=qe(e);if(!G(t))return z(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=yt(t);let l=(i?Ee(n.width):n.width)/r,s=(i?Ee(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const rn=z(0);function bt(e){const t=B(e);return We()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:rn}function le(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=qe(e);let l=z(1);t&&(r?W(r)&&(l=he(r)):l=he(e));const s=(function(v,m,g){return m===void 0&&(m=!1),!(!g||m&&g!==B(v))&&m})(i,n,r)?bt(i):z(0);let a=(o.left+s.x)/l.x,u=(o.top+s.y)/l.y,p=o.width/l.x,d=o.height/l.y;if(i){const v=B(i),m=r&&W(r)?B(r):r;let g=v,h=Ye(g);for(;h&&r&&m!==g;){const f=he(h),y=h.getBoundingClientRect(),b=Y(h),x=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*f.x,O=y.top+(h.clientTop+parseFloat(b.paddingTop))*f.y;a*=f.x,u*=f.y,p*=f.x,d*=f.y,a+=x,u+=O,g=B(h),h=Ye(g)}}return _e({width:p,height:d,x:a,y:u})}function ke(e,t){const n=Pe(e).scrollLeft;return t?t.left+n:le(X(e)).left+n}function xt(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ke(e,n),y:n.top+t.scrollTop}}const on=new Set(["absolute","fixed"]);function wt(e,t,n){let r;if(t==="viewport")r=(function(o,i){const l=B(o),s=X(o),a=l.visualViewport;let u=s.clientWidth,p=s.clientHeight,d=0,v=0;if(a){u=a.width,p=a.height;const g=We();(!g||g&&i==="fixed")&&(d=a.offsetLeft,v=a.offsetTop)}const m=ke(s);if(m<=0){const g=s.ownerDocument,h=g.body,f=getComputedStyle(h),y=g.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,b=Math.abs(s.clientWidth-h.clientWidth-y);b<=25&&(u-=b)}else m<=25&&(u+=m);return{width:u,height:p,x:d,y:v}})(e,n);else if(t==="document")r=(function(o){const i=X(o),l=Pe(o),s=o.ownerDocument.body,a=ie(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=ie(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let p=-l.scrollLeft+ke(o);const d=-l.scrollTop;return Y(s).direction==="rtl"&&(p+=ie(i.clientWidth,s.clientWidth)-a),{width:a,height:u,x:p,y:d}})(X(e));else if(W(t))r=(function(o,i){const l=le(o,!0,i==="fixed"),s=l.top+o.clientTop,a=l.left+o.clientLeft,u=G(o)?he(o):z(1);return{width:o.clientWidth*u.x,height:o.clientHeight*u.y,x:a*u.x,y:s*u.y}})(t,n);else{const o=bt(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return _e(r)}function Et(e,t){const n=ne(e);return!(n===t||!W(n)||de(n))&&(Y(n).position==="fixed"||Et(n,t))}function sn(e,t,n){const r=G(t),o=X(t),i=n==="fixed",l=le(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=z(0);function u(){a.x=ke(o)}if(r||!r&&!i)if((fe(t)!=="body"||ve(o))&&(s=Pe(t)),r){const d=le(t,!0,i,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else o&&u();i&&!r&&o&&u();const p=!o||r||i?z(0):xt(o,s);return{x:l.left+s.scrollLeft-a.x-p.x,y:l.top+s.scrollTop-a.y-p.y,width:l.width,height:l.height}}function Ue(e){return Y(e).position==="static"}function Ot(e,t){if(!G(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return X(e)===n&&(n=n.ownerDocument.body),n}function Tt(e,t){const n=B(e);if(Ae(e))return n;if(!G(e)){let o=ne(e);for(;o&&!de(o);){if(W(o)&&!Ue(o))return o;o=ne(o)}return n}let r=Ot(e,t);for(;r&&Zt(r)&&Ue(r);)r=Ot(r,t);return r&&de(r)&&Ue(r)&&!Be(r)?n:r||(function(o){let i=ne(o);for(;G(i)&&!de(i);){if(Be(i))return i;if(Ae(i))return null;i=ne(i)}return null})(e)||n}const ln={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",l=X(r),s=!!t&&Ae(t.floating);if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},u=z(1);const p=z(0),d=G(r);if((d||!d&&!i)&&((fe(r)!=="body"||ve(l))&&(a=Pe(r)),G(r))){const m=le(r);u=he(r),p.x=m.x+r.clientLeft,p.y=m.y+r.clientTop}const v=!l||d||i?z(0):xt(l,a);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+p.x+v.x,y:n.y*u.y-a.scrollTop*u.y+p.y+v.y}},getDocumentElement:X,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ae(t)?[]:(function(a,u){const p=u.get(a);if(p)return p;let d=ye(a,[],!1).filter(h=>W(h)&&fe(h)!=="body"),v=null;const m=Y(a).position==="fixed";let g=m?ne(a):a;for(;W(g)&&!de(g);){const h=Y(g),f=Be(g);f||h.position!=="fixed"||(v=null),(m?!f&&!v:!f&&h.position==="static"&&v&&on.has(v.position)||ve(g)&&!f&&Et(a,g))?d=d.filter(y=>y!==g):v=h,g=ne(g)}return u.set(a,d),d})(t,this._c):[].concat(n),r],l=i[0],s=i.reduce((a,u)=>{const p=wt(t,u,o);return a.top=ie(p.top,a.top),a.right=ue(p.right,a.right),a.bottom=ue(p.bottom,a.bottom),a.left=ie(p.left,a.left),a},wt(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Tt,getElementRects:async function(e){const t=this.getOffsetParent||Tt,n=this.getDimensions,r=await n(e.floating);return{reference:sn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=yt(e);return{width:t,height:n}},getScale:he,isElement:W,isRTL:function(e){return Y(e).direction==="rtl"}};function St(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function an(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=qe(e),p=o||i?[...u?ye(u):[],...ye(t)]:[];p.forEach(f=>{o&&f.addEventListener("scroll",n,{passive:!0}),i&&f.addEventListener("resize",n)});const d=u&&s?(function(f,y){let b,x=null;const O=X(f);function P(){var T;clearTimeout(b),(T=x)==null||T.disconnect(),x=null}return(function T(k,A){k===void 0&&(k=!1),A===void 0&&(A=1),P();const E=f.getBoundingClientRect(),{left:w,top:_,width:S,height:C}=E;if(k||y(),!S||!C)return;const M={rootMargin:-Oe(_)+"px "+-Oe(O.clientWidth-(w+S))+"px "+-Oe(O.clientHeight-(_+C))+"px "+-Oe(w)+"px",threshold:ie(0,ue(1,A))||1};let L=!0;function D(F){const H=F[0].intersectionRatio;if(H!==A){if(!L)return T();H?T(!1,H):b=setTimeout(()=>{T(!1,1e-7)},1e3)}H!==1||St(E,f.getBoundingClientRect())||T(),L=!1}try{x=new IntersectionObserver(D,N({},M,{root:O.ownerDocument}))}catch{x=new IntersectionObserver(D,M)}x.observe(f)})(!0),P})(u,n):null;let v,m=-1,g=null;l&&(g=new ResizeObserver(f=>{let[y]=f;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=g)==null||b.observe(t)})),n()}),u&&!a&&g.observe(u),g.observe(t));let h=a?le(e):null;return a&&(function f(){const y=le(e);h&&!St(h,y)&&n(),h=y,v=requestAnimationFrame(f)})(),n(),()=>{var f;p.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(f=g)==null||f.disconnect(),g=null,a&&cancelAnimationFrame(v)}}const cn=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:l,placement:s,platform:a,elements:u}=t,p=se(e,t),{crossAxis:d=!1,alignment:v,allowedPlacements:m=ct,autoAlignment:g=!0}=p,h=je(p,Yt),f=v!==void 0||m===ct?(function(w,_,S){return(w?[...S.filter(C=>K(C)===w),...S.filter(C=>K(C)!==w)]:S.filter(C=>Q(C)===C)).filter(C=>!w||K(C)===w||!!_&&Te(C)!==C)})(v||null,g,m):m,y=await a.detectOverflow(t,h),b=((n=l.autoPlacement)==null?void 0:n.index)||0,x=f[b];if(x==null)return{};const O=ut(x,i,await(a.isRTL==null?void 0:a.isRTL(u.floating)));if(s!==x)return{reset:{placement:f[0]}};const P=[y[Q(x)],y[O[0]],y[O[1]]],T=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:P}],k=f[b+1];if(k)return{data:{index:b+1,overflows:T},reset:{placement:k}};const A=T.map(w=>{const _=K(w.placement);return[w.placement,_&&d?w.overflows.slice(0,2).reduce((S,C)=>S+C,0):w.overflows[0],w.overflows]}).sort((w,_)=>w[1]-_[1]),E=((o=A.filter(w=>w[2].slice(0,K(w[0])?2:3).every(_=>_<=0))[0])==null?void 0:o[0])||A[0][0];return E!==s?{data:{index:b+1,overflows:T},reset:{placement:E}}:{}}}},un=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,l=se(e,t),{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:b=>{let{x,y:O}=b;return{x,y:O}}}}=l,p=je(l,Ut),d={x:n,y:r},v=await i.detectOverflow(t,p),m=te(Q(o)),g=He(m);let h=d[g],f=d[m];if(s){const b=g==="y"?"bottom":"right";h=Fe(h+v[g==="y"?"top":"left"],h,h-v[b])}if(a){const b=m==="y"?"bottom":"right";f=Fe(f+v[m==="y"?"top":"left"],f,f-v[b])}const y=u.fn(N({},t,{[g]:h,[m]:f}));return N({},y,{data:{x:y.x-n,y:y.y-r,enabled:{[g]:s,[m]:a}}})}}},fn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:u}=t,p=se(e,t),{mainAxis:d=!0,crossAxis:v=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:f=!0}=p,y=je(p,qt);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=Q(o),x=te(s),O=Q(s)===s,P=await(a.isRTL==null?void 0:a.isRTL(u.floating)),T=m||(O||!f?[Se(s)]:(function(L){const D=Se(L);return[Te(L),D,Te(D)]})(s)),k=h!=="none";!m&&k&&T.push(...Wt(s,f,h,P));const A=[s,...T],E=await a.detectOverflow(t,y),w=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&w.push(E[b]),v){const L=ut(o,l,P);w.push(E[L[0]],E[L[1]])}if(_=[..._,{placement:o,overflows:w}],!w.every(L=>L<=0)){var S,C;const L=(((S=i.flip)==null?void 0:S.index)||0)+1,D=A[L];if(D&&(!(v==="alignment"&&x!==te(D))||_.every(H=>te(H.placement)!==x||H.overflows[0]>0)))return{data:{index:L,overflows:_},reset:{placement:D}};let F=(C=_.filter(H=>H.overflows[0]<=0).sort((H,q)=>H.overflows[1]-q.overflows[1])[0])==null?void 0:C.placement;if(!F)switch(g){case"bestFit":{var M;const H=(M=_.filter(q=>{if(k){const U=te(q.placement);return U===x||U==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(U=>U>0).reduce((U,c)=>U+c,0)]).sort((q,U)=>q[1]-U[1])[0])==null?void 0:M[0];H&&(F=H);break}case"initialPlacement":F=s}if(o!==F)return{reset:{placement:F}}}return{}}}},dn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:s,middlewareData:a}=t,{element:u,padding:p=0}=se(e,t)||{};if(u==null)return{};const d=ht(p),v={x:n,y:r},m=Ve(o),g=Ne(m),h=await l.getDimensions(u),f=m==="y",y=f?"top":"left",b=f?"bottom":"right",x=f?"clientHeight":"clientWidth",O=i.reference[g]+i.reference[m]-v[m]-i.floating[g],P=v[m]-i.reference[m],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let k=T?T[x]:0;k&&await(l.isElement==null?void 0:l.isElement(T))||(k=s.floating[x]||i.floating[g]);const A=O/2-P/2,E=k/2-h[g]/2-1,w=ue(d[y],E),_=ue(d[b],E),S=w,C=k-h[g]-_,M=k/2-h[g]/2+A,L=Fe(S,M,C),D=!a.arrow&&K(o)!=null&&M!==L&&i.reference[g]/2-(M<S?w:_)-h[g]/2<0,F=D?M<S?M-S:M-C:0;return{[m]:v[m]+F,data:N({[m]:L,centerOffset:M-L-F},D&&{alignmentOffset:F}),reset:D}}}),hn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=se(e,t),p={x:n,y:r},d=te(o),v=He(d);let m=p[v],g=p[d];const h=se(s,t),f=typeof h=="number"?{mainAxis:h,crossAxis:0}:N({mainAxis:0,crossAxis:0},h);if(a){const x=v==="y"?"height":"width",O=i.reference[v]-i.floating[x]+f.mainAxis,P=i.reference[v]+i.reference[x]-f.mainAxis;m<O?m=O:m>P&&(m=P)}if(u){var y,b;const x=v==="y"?"width":"height",O=zt.has(Q(o)),P=i.reference[d]-i.floating[x]+(O&&((y=l.offset)==null?void 0:y[d])||0)+(O?0:f.crossAxis),T=i.reference[d]+i.reference[x]+(O?0:((b=l.offset)==null?void 0:b[d])||0)-(O?f.crossAxis:0);g<P?g=P:g>T&&(g=T)}return{[v]:m,[d]:g}}}},pn=(e,t,n)=>{const r=new Map,o=N({platform:ln},n),i=N({},o.platform,{_c:r});return(async(l,s,a)=>{const{placement:u="bottom",strategy:p="absolute",middleware:d=[],platform:v}=a,m=d.filter(Boolean),g=await(v.isRTL==null?void 0:v.isRTL(s));let h=await v.getElementRects({reference:l,floating:s,strategy:p}),{x:f,y}=pt(h,u,g),b=u,x={},O=0;for(let T=0;T<m.length;T++){var P;const{name:k,fn:A}=m[T],{x:E,y:w,data:_,reset:S}=await A({x:f,y,initialPlacement:u,placement:b,strategy:p,middlewareData:x,rects:h,platform:N({},v,{detectOverflow:(P=v.detectOverflow)!=null?P:Jt}),elements:{reference:l,floating:s}});f=E??f,y=w??y,x=N({},x,{[k]:N({},x[k],_)}),S&&O<=50&&(O++,typeof S=="object"&&(S.placement&&(b=S.placement),S.rects&&(h=S.rects===!0?await v.getElementRects({reference:l,floating:s,strategy:p}):S.rects),{x:f,y}=pt(h,b,g)),T=-1)}return{x:f,y,placement:b,strategy:p,middlewareData:x}})(e,t,N({},o,{platform:i}))};function mn(e){e.cleanup&&e.cleanup();const t=e._getResolvedAttachToOptions();let n=t.element;const r=(function(l,s){var a,u,p;const d={strategy:"absolute",middleware:[]},v=(function(y){return y.options.arrow&&y.el?y.el.querySelector(".shepherd-arrow"):!1})(s),m=st(l),g=(a=l.on)==null?void 0:a.includes("auto"),h=(l==null||(u=l.on)==null?void 0:u.includes("-start"))||(l==null||(p=l.on)==null?void 0:p.includes("-end"));if(!m){var f;if(g?d.middleware.push(cn({crossAxis:!0,alignment:h?l==null||(f=l.on)==null?void 0:f.split("-").pop():null})):d.middleware.push(fn()),d.middleware.push(un({limiter:hn(),crossAxis:!0})),v){const y=typeof s.options.arrow=="object"?s.options.arrow:{padding:4};d.middleware.push(dn({element:v,padding:h?y.padding:0}))}g||(d.placement=l.on)}return De(d,s.options.floatingUIOptions||{})})(t,e),o=st(t);if(o){var i;n=document.body;const l=(i=e.shepherdElementComponent)==null?void 0:i.element;l?.classList.add("shepherd-centered")}return e.cleanup=an(n,e.el,()=>{e.el?(function(l,s,a,u){pn(l,s.el,a).then((function(p,d){return({x:v,y:m,placement:g,middlewareData:h})=>(p.el&&(d?Object.assign(p.el.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}):Object.assign(p.el.style,{position:"absolute",left:`${v}px`,top:`${m}px`}),p.el.dataset.popperPlacement=g,(function(f,y){const b=f.querySelector(".shepherd-arrow");if(ce(b)&&y.arrow){const{x,y:O}=y.arrow;Object.assign(b.style,{left:x!=null?`${x}px`:"",top:O!=null?`${O}px`:""})}})(p.el,h)),p)})(s,u)).then(p=>new Promise(d=>{setTimeout(()=>d(p),300)})).then(p=>{p!=null&&p.el&&(p.el.tabIndex=0,p.el.focus({preventScroll:!0}))})})(n,e,r,o):e.cleanup==null||e.cleanup()}),e.target=t.element,r}function Z(e,t,...n){const r=document.createElement(e);return Rt(r,t),At(r,n),r}function _t(e,t,...n){const r=document.createElementNS("http://www.w3.org/2000/svg",e);return Rt(r,t),At(r,n),r}function Rt(e,t){if(t)for(const[n,r]of Object.entries(t))r!=null&&r!==!1&&(n.startsWith("on")&&typeof r=="function"?e.addEventListener(n.slice(2).toLowerCase(),r):n==="disabled"&&r===!0?e.disabled=!0:e.setAttribute(n,String(r)))}function At(e,t){for(const n of t)n!=null&&n!==!1&&e.append(typeof n=="string"?document.createTextNode(n):n)}function Je(e,t){return ee(e)?e.call(t):e}function gn(e,t){const n=e.action?e.action.bind(t.tour):null,r=!!e.disabled&&Je(e.disabled,t),o=e.label?Je(e.label,t):null,i=e.text?Je(e.text,t):null,l=Z("button",{"aria-label":o||null,class:`${e.classes||""} shepherd-button ${e.secondary?"shepherd-button-secondary":""}`,disabled:r||null,onclick:n,tabindex:"0",type:"button"});return i&&(l.innerHTML=i),l}function vn(e,t){const n=Z("header",{class:"shepherd-header"});return t.options.title&&n.append((function(r,o){const i=Z("h3",{id:r,class:"shepherd-title"}),l=ee(o)?o():o;return i.innerHTML=l,i})(e,t.options.title)),t.options.cancelIcon&&t.options.cancelIcon.enabled&&n.append((function(r,o){return Z("button",{"aria-label":r.label?r.label:"Close Tour",class:"shepherd-cancel-icon",onclick:i=>{i.preventDefault(),o.cancel()},type:"button"},Z("span",{"aria-hidden":"true"},"×"))})(t.options.cancelIcon,t)),n}function yn(e,t,n){const r=Z("div",{class:"shepherd-content"});return(!V(n.options.title)||n.options.cancelIcon&&n.options.cancelIcon.enabled)&&r.append(vn(t,n)),V(n.options.text)||r.append((function(o,i){const l=Z("div",{class:"shepherd-text",id:o});let s=i.options.text;return ee(s)&&(s=s.call(i)),ce(s)?l.appendChild(s):l.innerHTML=s,l})(e,n)),Array.isArray(n.options.buttons)&&n.options.buttons.length&&r.append((function(o){const i=Z("footer",{class:"shepherd-footer"});if(o.options.buttons)for(const l of o.options.buttons)i.append(gn(l,o));return i})(n)),r}class ze extends Me{constructor(t,n={}){return super(),this._resolvedAttachTo=void 0,this._resolvedExtraHighlightElements=void 0,this._originalTabIndexes=void 0,this.classPrefix=void 0,this.el=void 0,this.shepherdElementComponent=void 0,this.target=void 0,this.tour=void 0,this.tour=t,this.classPrefix=this.tour.options?it(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,this._originalTabIndexes=new Map,Ie(this),this._setOptions(n),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){this._teardownElements(),this.trigger("destroy")}_teardownElements(){var t;(t=this).cleanup&&t.cleanup(),t.cleanup=null,this.shepherdElementComponent&&(this.shepherdElementComponent.cleanup(),this.shepherdElementComponent=void 0),ce(this.el)&&(this.el.remove(),this.el=null),this._updateStepTargetOnHide(),this._originalTabIndexes.clear()}getTour(){return this.tour}hide(){var t;(t=this.tour.modal)==null||t.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this._updateStepTargetOnHide(),this.trigger("hide")}_resolveExtraHiglightElements(){var t;return this._resolvedExtraHighlightElements=(t=this).options.extraHighlights?t.options.extraHighlights.flatMap(n=>Array.from(document.querySelectorAll(n))):[],this._resolvedExtraHighlightElements}_resolveAttachToOptions(){return this._resolvedAttachTo=(function(t){const n=t.options.attachTo||{},r=Object.assign({},n);if(ee(r.element)&&(r.element=r.element.call(t)),xe(r.element)){try{r.element=document.querySelector(r.element)}catch{}r.element}return r})(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return this._resolvedAttachTo===null?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return ee(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.el&&(this._teardownElements(),this._setupElements())}getElement(){return this.el}getTarget(){return this.target}_storeOriginalTabIndex(t){const n=t.getAttribute("tabindex");n!==null&&this._originalTabIndexes.set(t,n)}_restoreOriginalTabIndexes(){const t=this.target;t&&(this._originalTabIndexes.has(t)?t.setAttribute("tabindex",this._originalTabIndexes.get(t)):t.removeAttribute("tabindex"))}_createTooltipContent(){const t=`${this.id}-description`,n=`${this.id}-label`;return this.shepherdElementComponent=(function(r){var o,i,l,s;const{classPrefix:a,descriptionId:u,labelId:p,step:d}=r;let v,m,g,h,f,y,b;const x=(o=(i=d.options)==null||(i=i.cancelIcon)==null?void 0:i.enabled)!=null&&o,O=(l=(s=d.options)==null?void 0:s.title)!=null&&l,P=E=>{const{tour:w}=d;switch(E.keyCode){case 9:if((!m||m.length===0)&&y&&y.length===0){E.preventDefault();break}var _,S,C;if(E.shiftKey){if(document.activeElement===f||(_=document.activeElement)!=null&&_.classList.contains("shepherd-element"))E.preventDefault(),(S=h??b)==null||S.focus();else if(document.activeElement===g){var M;E.preventDefault(),(M=b)==null||M.focus()}}else if(document.activeElement===b)E.preventDefault(),(C=g??f)==null||C.focus();else if(document.activeElement===h){var L;E.preventDefault(),(L=f)==null||L.focus()}break;case 27:w.options.exitOnEsc&&(E.preventDefault(),E.stopPropagation(),d.cancel());break;case 37:w.options.keyboardNavigation&&(E.preventDefault(),E.stopPropagation(),w.back());break;case 39:w.options.keyboardNavigation&&(E.preventDefault(),E.stopPropagation(),w.next())}},T=Z("dialog",{"aria-describedby":V(d.options.text)?null:u,"aria-labelledby":d.options.title?p:null,class:["shepherd-element",x?"shepherd-has-cancel-icon":"",O?"shepherd-has-title":""].filter(Boolean).join(" "),[`data-${a}shepherd-step-id`]:d.id,onkeydown:P,open:"true"});if(d.options.arrow&&d.options.attachTo&&d.options.attachTo.element&&d.options.attachTo.on&&T.append(Z("div",{class:"shepherd-arrow","data-popper-arrow":""})),T.append(yn(u,p,d)),xe(d.options.classes)){const E=d.options.classes.split(" ").filter(w=>!!w.length);E.length&&T.classList.add(...E)}const k='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]';y=[...T.querySelectorAll(k)],f=y[0],b=y[y.length-1];const A=d._getResolvedAttachToOptions();return A!=null&&A.element&&(v=A.element,d._storeOriginalTabIndex(v),v.tabIndex=0,m=[v,...v.querySelectorAll(k)],g=m[0],h=m[m.length-1],v.addEventListener("keydown",P)),{element:T,cleanup:()=>{var E;(E=v)==null||E.removeEventListener("keydown",P)}}})({classPrefix:this.classPrefix,descriptionId:t,labelId:n,step:this}),(this.tour.options.stepsContainer||document.body).append(this.shepherdElementComponent.element),this.shepherdElementComponent.element}_scrollTo(t){const{element:n}=this._getResolvedAttachToOptions();ee(this.options.scrollToHandler)?this.options.scrollToHandler(n):n instanceof Element&&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(" ")],l=new Set(i);return Array.from(l).join(" ").trim()}_setOptions(t={}){let n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;n=De({},n||{}),this.options=Object.assign({arrow:!0},n,t,(function(o,i){return{floatingUIOptions:De(o.floatingUIOptions||{},i.floatingUIOptions||{})}})(n,t));const{when:r}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${lt()}`,r&&Object.keys(r).forEach(o=>{this.on(o,r[o],this)})}_setupElements(){V(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&It(this),mn(this)}_show(){var t;this.trigger("before-show"),this._resolveAttachToOptions(),this._resolveExtraHiglightElements(),this._setupElements(),this.tour.modal||this.tour.setupModal(),(t=this.tour.modal)==null||t.setupForStep(this),this._styleTargetElementForStep(this),this.el&&(this.el.hidden=!1),this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)}),this.el&&(this.el.hidden=!1);const n=this.shepherdElementComponent.element,r=this.target||document.body,o=this._resolvedExtraHighlightElements;r.classList.add(`${this.classPrefix}shepherd-enabled`),r.classList.add(`${this.classPrefix}shepherd-target`),n.classList.add("shepherd-enabled"),o?.forEach(i=>{i.classList.add(`${this.classPrefix}shepherd-enabled`),i.classList.add(`${this.classPrefix}shepherd-target`)}),this.trigger("show")}_styleTargetElementForStep(t){const n=t.target,r=t._resolvedExtraHighlightElements;if(!n)return;const o=t.options.highlightClass;o&&(n.classList.add(o),r?.forEach(i=>i.classList.add(o))),n.classList.remove("shepherd-target-click-disabled"),r?.forEach(i=>i.classList.remove("shepherd-target-click-disabled")),t.options.canClickTarget===!1&&(n.classList.add("shepherd-target-click-disabled"),r?.forEach(i=>i.classList.add("shepherd-target-click-disabled")))}_updateStepTargetOnHide(){const t=this.target||document.body,n=this._resolvedExtraHighlightElements,r=this.options.highlightClass;r&&(t.classList.remove(r),n?.forEach(o=>o.classList.remove(r))),t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`),n?.forEach(o=>{o.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}),this._restoreOriginalTabIndexes()}}function bn(e){let t,n=[{width:0,height:0,x:0,y:0,r:0}];const r=_t("path"),o=_t("svg",{class:"shepherd-modal-overlay-container"},r);function i(){r.setAttribute("d",(function(h){let f="";const{innerWidth:y,innerHeight:b}=window;return h.forEach(x=>{const{width:O,height:P,x:T=0,y:k=0,r:A=0}=x,{topLeft:E=0,topRight:w=0,bottomRight:_=0,bottomLeft:S=0}=typeof A=="number"?{topLeft:A,topRight:A,bottomRight:A,bottomLeft:A}:A;f+=`M${T+E},${k} a${E},${E},0,0,0-${E},${E} V${P+k-S} a${S},${S},0,0,0,${S},${S} H${O+T-_} a${_},${_},0,0,0,${_}-${_} V${k+w} a${w},${w},0,0,0-${w}-${w} Z`}),`M${y},${b} H0 V0 H${y} V${b} Z ${f}`.replace(/\s/g,"")})(n))}function l(){n=[{width:0,height:0,x:0,y:0,r:0}],i()}function s(){o.classList.remove("shepherd-modal-is-visible"),v()}function a(){o.classList.add("shepherd-modal-is-visible")}function u(h=0,f=0,y=0,b=0,x,O,P){if(O){{const T=[O,...P||[]],k=[];for(const A of T){if(!A||T.indexOf(A)!==T.lastIndexOf(A))continue;const{y:E,height:w}=g(A,x),{x:_,width:S,left:C}=A.getBoundingClientRect();T.some(M=>{if(M===A)return!1;const L=M.getBoundingClientRect(),{y:D,height:F}=g(M,x);return _>=L.left&&_+S<=L.left+L.width&&E>=D&&E+w<=D+F})||k.push({width:S+2*h,height:w+2*h,x:(_||C)+y-h,y:E+b-h,r:f})}n=k}i()}else l()}function p(h){h.stopPropagation()}o.addEventListener("touchmove",p),i(),e.append(o);const d=h=>{h.preventDefault()};function v(){t&&(cancelAnimationFrame(t),t=void 0),window.removeEventListener("touchmove",d,{passive:!1})}function m(h){if(!h)return null;const f=h instanceof HTMLElement&&window.getComputedStyle(h).overflowY;return f!=="hidden"&&f!=="visible"&&h.scrollHeight>=h.clientHeight?h:m(h.parentElement)}function g(h,f){const y=h.getBoundingClientRect();let b=y.y||y.top,x=y.bottom||b+y.height;if(f){const O=f.getBoundingClientRect(),P=O.y||O.top,T=O.bottom||P+O.height;b=Math.max(b,P),x=Math.min(x,T)}return{y:b,height:Math.max(x-b,0)}}return{closeModalOpening:l,destroy:function(){v(),o.removeEventListener("touchmove",p),o.remove()},hide:s,positionModal:u,setupForStep:function(h){v(),h.tour.options.useModalOverlay?((function(f){const{modalOverlayOpeningPadding:y,modalOverlayOpeningRadius:b,modalOverlayOpeningXOffset:x=0,modalOverlayOpeningYOffset:O=0}=f.options,P=(function(A){const E={top:0,left:0};if(!A)return E;let w=A.ownerDocument.defaultView;try{for(;w&&w!==window.top;){var _;const S=(_=w)==null?void 0:_.frameElement;if(S){const C=S.getBoundingClientRect();E.top+=C.top+S.scrollTop,E.left+=C.left+S.scrollLeft}w=w.parent}}catch{}return E})(f.target),T=m(f.target),k=()=>{t=void 0,u(y,b,x+P.left,O+P.top,T,f.target,f._resolvedExtraHighlightElements),t=requestAnimationFrame(k)};k(),window.addEventListener("touchmove",d,{passive:!1})})(h),a()):s()},show:a,getElement:function(){return o}}}class xn extends Me{constructor(){super(),this.activeTour=void 0,Ie(this)}}const ae=new xn,Pt=typeof window>"u";ae.Step=Pt?class{constructor(e){}}:ze,ae.Tour=Pt?class{constructor(e,t){}}:class extends Me{constructor(e={}){return super(),this.trackedEvents=["active","cancel","complete","show"],this.classPrefix=void 0,this.currentStep=void 0,this.focusedElBeforeOpen=void 0,this.id=void 0,this.modal=void 0,this.options=void 0,this.steps=void 0,Ie(this),this.options=Object.assign({},{exitOnEsc:!0,keyboardNavigation:!0},e),this.classPrefix=it(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(t=>{(n=>{this.on(n,r=>{(r=r||{}).tour=this,ae.trigger(n,r)})})(t)}),this._setTourID(e.id),this}addStep(e,t){let n=e;return n instanceof ze?n.tour=this:n=new ze(this,n),V(t)?this.steps.push(n):this.steps.splice(t,0,n),n}addSteps(e){return Array.isArray(e)&&e.forEach(t=>{this.addStep(t)}),this}back(){const e=this.steps.indexOf(this.currentStep);this.show(e-1,!1)}async cancel(){if(this.options.confirmCancel){const e=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";let t;t=ee(this.options.confirmCancel)?await this.options.confirmCancel():window.confirm(e),t&&this._done("cancel")}else this._done("cancel")}complete(){this._done("complete")}getById(e){return this.steps.find(t=>t.id===e)}getCurrentStep(){return this.currentStep}hide(){const e=this.getCurrentStep();if(e)return e.hide()}isActive(){return ae.activeTour===this}next(){const e=this.steps.indexOf(this.currentStep);e===this.steps.length-1?this.complete():this.show(e+1,!0)}removeStep(e){const t=this.getCurrentStep();this.steps.some((n,r)=>{if(n.id===e)return n.isOpen()&&n.hide(),n.destroy(),this.steps.splice(r,1),!0}),t&&t.id===e&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(e=0,t=!0){const n=xe(e)?this.getById(e):this.steps[e];n&&(this._updateStateBeforeShow(),ee(n.options.showOn)&&!n.options.showOn()?this._skipStep(n,t):(this.currentStep=n,this.trigger("show",{step:n,previous:this.currentStep}),n.show()))}async start(){this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this.setupModal(),this._setupActiveTour(),this.next()}_done(e){const t=this.steps.indexOf(this.currentStep);Array.isArray(this.steps)&&this.steps.forEach(n=>n.destroy()),(function(n){if(n){const{steps:r}=n;r.forEach(o=>{o.options&&o.options.canClickTarget===!1&&o.options.attachTo&&(ce(o.target)&&o.target.classList.remove("shepherd-target-click-disabled"),o._resolvedExtraHighlightElements&&o._resolvedExtraHighlightElements.forEach(i=>{ce(i)&&i.classList.remove("shepherd-target-click-disabled")}))})}})(this),this.trigger(e,{index:t}),ae.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),e!=="cancel"&&e!=="complete"||this.modal&&(this.modal.destroy(),this.modal=null),ce(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),ae.activeTour=this}setupModal(){const e=this.options.modalContainer||document.body;this.modal=bn(e)}_skipStep(e,t){const n=this.steps.indexOf(e);if(n===this.steps.length-1)this.complete();else{const r=t?n+1:n-1;this.show(r,t)}}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(e){const t=this.options.tourName||"tour",n=e||lt();this.id=`${t}--${n}`}};const Ce=re.createContext(void 0),wn=Ce.Consumer,En=()=>{const e=re.useContext(Ce);if(!e)throw new Error("useShepherd must be used within a ShepherdJourneyProvider");const{Shepherd:t}=e;return t},On=({children:e})=>Mt.jsx(Ce.Provider,{value:{Shepherd:ae},children:e});J.JourneyMethods=wn,J.ShepherdJourneyContext=Ce,J.ShepherdJourneyProvider=On,J.useShepherd=En,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})}));
|
|
6
|
+
<%s key={someKey} {...props} />`,I,F,pe,F),q[F+I]=!0)}if(F=null,j!==void 0&&(n(j),F=""+j),l(R)&&(n(R.key),F=""+R.key),"key"in R){j={};for(var Ge in R)Ge!=="key"&&(j[Ge]=R[Ge])}else j=R;return F&&s(j,typeof c=="function"?c.displayName||c.name||"Unknown":c),u(c,F,j,o(),Le,Xe)}function d(c){v(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===E&&(c._payload.status==="fulfilled"?v(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function v(c){return typeof c=="object"&&c!==null&&c.$$typeof===g}var m=re,g=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),O=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),S=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=Object.prototype.hasOwnProperty,M=Array.isArray,L=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(c){return c()}};var D,H={},N=m.react_stack_bottom_frame.bind(m,i)(),U=L(r(i)),q={};ge.Fragment=f,ge.jsx=function(c,R,j){var I=1e4>S.recentlyCreatedOwnerStacks++;return p(c,R,j,!1,I?Error("react-stack-top-frame"):N,I?L(r(c)):U)},ge.jsxs=function(c,R,j){var I=1e4>S.recentlyCreatedOwnerStacks++;return p(c,R,j,!0,I?Error("react-stack-top-frame"):N,I?L(r(c)):U)}})()),ge}var Ke;function Lt(){return Ke||(Ke=1,process.env.NODE_ENV==="production"?be.exports=kt():be.exports=Ct()),be.exports}var Mt=Lt();function ce(e){return e instanceof HTMLElement}function ee(e){return typeof e=="function"}function xe(e){return typeof e=="string"}function V(e){return e===void 0}class Me{on(t,n,r,o=!1){var i;return V(this.bindings)&&(this.bindings={}),V(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){if(V(this.bindings)||V(this.bindings[t]))return this;var r;return V(n)?delete this.bindings[t]:(r=this.bindings[t])==null||r.forEach((o,i)=>{var l;o.handler===n&&((l=this.bindings[t])==null||l.splice(i,1))}),this}trigger(t,...n){var r;return!V(this.bindings)&&this.bindings[t]&&((r=this.bindings[t])==null||r.forEach((o,i)=>{const{ctx:l,handler:s,once:a}=o,u=l||this;var p;s.apply(u,n),a&&((p=this.bindings[t])==null||p.splice(i,1))})),this}}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(null,arguments)}function je(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}const oe={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function jt(e,t){return t}function Dt(e,t){return e.filter(n=>n!==void 0)}var et;function tt(e){return typeof e!="object"||e===null?0:Array.isArray(e)?2:(function(t){if(!rt.includes(Object.prototype.toString.call(t)))return!1;const{constructor:n}=t;if(n===void 0)return!0;const r=n.prototype;return!(r===null||typeof r!="object"||!rt.includes(Object.prototype.toString.call(r))||!r.hasOwnProperty("isPrototypeOf"))})(e)?1:e instanceof Set?3:e instanceof Map?4:5}function It(e,t){return typeof e=="object"&&Object.prototype.propertyIsEnumerable.call(e,t)}function nt(e){var t;let n=0,r=(t=e[0])==null?void 0:t[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(;;){if(r===void 0)return{done:!0,value:void 0};const i=r.next();if(i.done!==!0)return{done:!1,value:i.value};var o;n+=1,r=(o=e[n])==null?void 0:o[Symbol.iterator]()}}})}}(function(e){e[e.NOT=0]="NOT",e[e.RECORD=1]="RECORD",e[e.ARRAY=2]="ARRAY",e[e.SET=3]="SET",e[e.MAP=4]="MAP",e[e.OTHER=5]="OTHER"})(et||(et={}));const rt=["[object Object]","[object Module]"],we={mergeRecords:function(e,t,n){const r={};for(const o of(function(i){const l=new Set;for(const s of i)for(const a of[...Object.keys(s),...Object.getOwnPropertySymbols(s)])l.add(a);return l})(e)){const i=[];for(const a of e)It(a,o)&&i.push(a[o]);if(i.length===0)continue;const l=t.metaDataUpdater(n,{key:o,parents:e}),s=ot(i,t,l);s!==oe.skip&&(o==="__proto__"?Object.defineProperty(r,o,{value:s,configurable:!0,enumerable:!0,writable:!0}):r[o]=s)}return r},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(nt(e))},mergeMaps:function(e){return new Map(nt(e))},mergeOthers:function(e){return e.at(-1)}};function De(...e){return(function(t,n){const r=(function(i,l){var s,a,u;return{defaultMergeFunctions:we,mergeFunctions:$({},we,Object.fromEntries(Object.entries(i).filter(([p,d])=>Object.hasOwn(we,p)).map(([p,d])=>d===!1?[p,we.mergeOthers]:[p,d]))),metaDataUpdater:(s=i.metaDataUpdater)!=null?s:jt,deepmerge:l,useImplicitDefaultMerging:(a=i.enableImplicitDefaultMerging)!=null&&a,filterValues:i.filterValues===!1?void 0:(u=i.filterValues)!=null?u:Dt,actions:oe}})(t,o);function o(...i){return ot(i,r,n)}return o})({})(...e)}function ot(e,t,n){var r;const o=(r=t.filterValues==null?void 0:t.filterValues(e,n))!=null?r:e;if(o.length===0)return;if(o.length===1)return Ie(o,t,n);const i=tt(o[0]);if(i!==0&&i!==5){for(let l=1;l<o.length;l++)if(tt(o[l])!==i)return Ie(o,t,n)}switch(i){case 1:return(function(l,s,a){const u=s.mergeFunctions.mergeRecords(l,s,a);return u===oe.defaultMerge||s.useImplicitDefaultMerging&&u===void 0&&s.mergeFunctions.mergeRecords!==s.defaultMergeFunctions.mergeRecords?s.defaultMergeFunctions.mergeRecords(l,s,a):u})(o,t,n);case 2:return(function(l,s,a){const u=s.mergeFunctions.mergeArrays(l,s,a);return u===oe.defaultMerge||s.useImplicitDefaultMerging&&u===void 0&&s.mergeFunctions.mergeArrays!==s.defaultMergeFunctions.mergeArrays?s.defaultMergeFunctions.mergeArrays(l):u})(o,t,n);case 3:return(function(l,s,a){const u=s.mergeFunctions.mergeSets(l,s,a);return u===oe.defaultMerge||s.useImplicitDefaultMerging&&u===void 0&&s.mergeFunctions.mergeSets!==s.defaultMergeFunctions.mergeSets?s.defaultMergeFunctions.mergeSets(l):u})(o,t,n);case 4:return(function(l,s,a){const u=s.mergeFunctions.mergeMaps(l,s,a);return u===oe.defaultMerge||s.useImplicitDefaultMerging&&u===void 0&&s.mergeFunctions.mergeMaps!==s.defaultMergeFunctions.mergeMaps?s.defaultMergeFunctions.mergeMaps(l):u})(o,t,n);default:return Ie(o,t,n)}}function Ie(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===oe.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}function Fe(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 Ft(e){const{event:t,selector:n}=e.options.advanceOn||{};if(t){const r=(function(i,l){return s=>{if(i.isOpen()){const a=i.el&&s.currentTarget===i.el;(!V(l)&&s.currentTarget.matches(l)||a)&&i.tour.next()}}})(e,n);let o=null;if(!V(n)&&(o=document.querySelector(n),!o))return;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)))}}function it(e){return xe(e)&&e!==""?e.charAt(e.length-1)!=="-"?`${e}-`:e:""}function st(e){return e==null||!e.element||!e.on}function lt(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(t=="x"?n:3&n|8).toString(16)})}const at=["start","end"],ct=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-"+at[0],t+"-"+at[1]),[]),ue=Math.min,ie=Math.max,Ee=Math.round,Oe=Math.floor,z=e=>({x:e,y:e}),$t={left:"right",right:"left",bottom:"top",top:"bottom"},Ht={start:"end",end:"start"};function $e(e,t,n){return ie(e,ue(t,n))}function se(e,t){return typeof e=="function"?e(t):e}function Q(e){return e.split("-")[0]}function K(e){return e.split("-")[1]}function He(e){return e==="x"?"y":"x"}function Ne(e){return e==="y"?"height":"width"}const Nt=new Set(["top","bottom"]);function te(e){return Nt.has(Q(e))?"y":"x"}function Ve(e){return He(te(e))}function ut(e,t,n){n===void 0&&(n=!1);const r=K(e),o=Ve(e),i=Ne(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Se(l)),[l,Se(l)]}function Te(e){return e.replace(/start|end/g,t=>Ht[t])}const ft=["left","right"],dt=["right","left"],Vt=["top","bottom"],Bt=["bottom","top"];function Wt(e,t,n,r){const o=K(e);let i=(function(l,s,a){switch(l){case"top":case"bottom":return a?s?dt:ft:s?ft:dt;case"left":case"right":return s?Vt:Bt;default:return[]}})(Q(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(Te)))),i}function Se(e){return e.replace(/left|right|bottom|top/g,t=>$t[t])}function ht(e){return typeof e!="number"?(function(t){return $({top:0,right:0,bottom:0,left:0},t)})(e):{top:e,right:e,bottom:e,left:e}}function _e(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const Yt=["crossAxis","alignment","allowedPlacements","autoAlignment"],Ut=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],qt=["mainAxis","crossAxis","limiter"];function pt(e,t,n){let{reference:r,floating:o}=e;const i=te(t),l=Ve(t),s=Ne(l),a=Q(t),u=i==="y",p=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,v=r[s]/2-o[s]/2;let m;switch(a){case"top":m={x:p,y:r.y-o.height};break;case"bottom":m={x:p,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(K(t)){case"start":m[l]-=v*(n&&u?-1:1);break;case"end":m[l]+=v*(n&&u?-1:1)}return m}async function Jt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:v=!1,padding:m=0}=se(t,e),g=ht(m),h=s[v?d==="floating"?"reference":"floating":d],f=_e(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:p,strategy:a})),y=d==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),x=await(i.isElement==null?void 0:i.isElement(b))&&await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1},O=_e(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:a}):y);return{top:(f.top-O.top+g.top)/x.y,bottom:(O.bottom-f.bottom+g.bottom)/x.y,left:(f.left-O.left+g.left)/x.x,right:(O.right-f.right+g.right)/x.x}}const zt=new Set(["left","top"]);function Re(){return typeof window<"u"}function fe(e){return mt(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function X(e){var t;return(t=(mt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mt(e){return!!Re()&&(e instanceof Node||e instanceof B(e).Node)}function W(e){return!!Re()&&(e instanceof Element||e instanceof B(e).Element)}function G(e){return!!Re()&&(e instanceof HTMLElement||e instanceof B(e).HTMLElement)}function gt(e){return!(!Re()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof B(e).ShadowRoot)}const Xt=new Set(["inline","contents"]);function ve(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Xt.has(o)}const Gt=new Set(["table","td","th"]);function Zt(e){return Gt.has(fe(e))}const Qt=[":popover-open",":modal"];function Ae(e){return Qt.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kt=["transform","translate","scale","rotate","perspective"],en=["transform","translate","scale","rotate","perspective","filter"],tn=["paint","layout","strict","content"];function Be(e){const t=We(),n=W(e)?Y(e):e;return Kt.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||en.some(r=>(n.willChange||"").includes(r))||tn.some(r=>(n.contain||"").includes(r))}function We(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const nn=new Set(["html","body","#document"]);function de(e){return nn.has(fe(e))}function Y(e){return B(e).getComputedStyle(e)}function Pe(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ne(e){if(fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gt(e)&&e.host||X(e);return gt(t)?t.host:t}function vt(e){const t=ne(e);return de(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&ve(t)?t:vt(t)}function ye(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=vt(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=B(o);if(i){const s=Ye(l);return t.concat(l,l.visualViewport||[],ve(o)?o:[],s&&n?ye(s):[])}return t.concat(o,ye(o,[],n))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yt(e){const t=Y(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=G(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=Ee(n)!==i||Ee(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function Ue(e){return W(e)?e:e.contextElement}function he(e){const t=Ue(e);if(!G(t))return z(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=yt(t);let l=(i?Ee(n.width):n.width)/r,s=(i?Ee(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const rn=z(0);function bt(e){const t=B(e);return We()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:rn}function le(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ue(e);let l=z(1);t&&(r?W(r)&&(l=he(r)):l=he(e));const s=(function(v,m,g){return m===void 0&&(m=!1),!(!g||m&&g!==B(v))&&m})(i,n,r)?bt(i):z(0);let a=(o.left+s.x)/l.x,u=(o.top+s.y)/l.y,p=o.width/l.x,d=o.height/l.y;if(i){const v=B(i),m=r&&W(r)?B(r):r;let g=v,h=Ye(g);for(;h&&r&&m!==g;){const f=he(h),y=h.getBoundingClientRect(),b=Y(h),x=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*f.x,O=y.top+(h.clientTop+parseFloat(b.paddingTop))*f.y;a*=f.x,u*=f.y,p*=f.x,d*=f.y,a+=x,u+=O,g=B(h),h=Ye(g)}}return _e({width:p,height:d,x:a,y:u})}function ke(e,t){const n=Pe(e).scrollLeft;return t?t.left+n:le(X(e)).left+n}function xt(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ke(e,n),y:n.top+t.scrollTop}}const on=new Set(["absolute","fixed"]);function wt(e,t,n){let r;if(t==="viewport")r=(function(o,i){const l=B(o),s=X(o),a=l.visualViewport;let u=s.clientWidth,p=s.clientHeight,d=0,v=0;if(a){u=a.width,p=a.height;const g=We();(!g||g&&i==="fixed")&&(d=a.offsetLeft,v=a.offsetTop)}const m=ke(s);if(m<=0){const g=s.ownerDocument,h=g.body,f=getComputedStyle(h),y=g.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,b=Math.abs(s.clientWidth-h.clientWidth-y);b<=25&&(u-=b)}else m<=25&&(u+=m);return{width:u,height:p,x:d,y:v}})(e,n);else if(t==="document")r=(function(o){const i=X(o),l=Pe(o),s=o.ownerDocument.body,a=ie(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=ie(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let p=-l.scrollLeft+ke(o);const d=-l.scrollTop;return Y(s).direction==="rtl"&&(p+=ie(i.clientWidth,s.clientWidth)-a),{width:a,height:u,x:p,y:d}})(X(e));else if(W(t))r=(function(o,i){const l=le(o,!0,i==="fixed"),s=l.top+o.clientTop,a=l.left+o.clientLeft,u=G(o)?he(o):z(1);return{width:o.clientWidth*u.x,height:o.clientHeight*u.y,x:a*u.x,y:s*u.y}})(t,n);else{const o=bt(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return _e(r)}function Et(e,t){const n=ne(e);return!(n===t||!W(n)||de(n))&&(Y(n).position==="fixed"||Et(n,t))}function sn(e,t,n){const r=G(t),o=X(t),i=n==="fixed",l=le(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=z(0);function u(){a.x=ke(o)}if(r||!r&&!i)if((fe(t)!=="body"||ve(o))&&(s=Pe(t)),r){const d=le(t,!0,i,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else o&&u();i&&!r&&o&&u();const p=!o||r||i?z(0):xt(o,s);return{x:l.left+s.scrollLeft-a.x-p.x,y:l.top+s.scrollTop-a.y-p.y,width:l.width,height:l.height}}function qe(e){return Y(e).position==="static"}function Ot(e,t){if(!G(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return X(e)===n&&(n=n.ownerDocument.body),n}function Tt(e,t){const n=B(e);if(Ae(e))return n;if(!G(e)){let o=ne(e);for(;o&&!de(o);){if(W(o)&&!qe(o))return o;o=ne(o)}return n}let r=Ot(e,t);for(;r&&Zt(r)&&qe(r);)r=Ot(r,t);return r&&de(r)&&qe(r)&&!Be(r)?n:r||(function(o){let i=ne(o);for(;G(i)&&!de(i);){if(Be(i))return i;if(Ae(i))return null;i=ne(i)}return null})(e)||n}const ln={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",l=X(r),s=!!t&&Ae(t.floating);if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},u=z(1);const p=z(0),d=G(r);if((d||!d&&!i)&&((fe(r)!=="body"||ve(l))&&(a=Pe(r)),G(r))){const m=le(r);u=he(r),p.x=m.x+r.clientLeft,p.y=m.y+r.clientTop}const v=!l||d||i?z(0):xt(l,a);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+p.x+v.x,y:n.y*u.y-a.scrollTop*u.y+p.y+v.y}},getDocumentElement:X,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ae(t)?[]:(function(a,u){const p=u.get(a);if(p)return p;let d=ye(a,[],!1).filter(h=>W(h)&&fe(h)!=="body"),v=null;const m=Y(a).position==="fixed";let g=m?ne(a):a;for(;W(g)&&!de(g);){const h=Y(g),f=Be(g);f||h.position!=="fixed"||(v=null),(m?!f&&!v:!f&&h.position==="static"&&v&&on.has(v.position)||ve(g)&&!f&&Et(a,g))?d=d.filter(y=>y!==g):v=h,g=ne(g)}return u.set(a,d),d})(t,this._c):[].concat(n),r],l=i[0],s=i.reduce((a,u)=>{const p=wt(t,u,o);return a.top=ie(p.top,a.top),a.right=ue(p.right,a.right),a.bottom=ue(p.bottom,a.bottom),a.left=ie(p.left,a.left),a},wt(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Tt,getElementRects:async function(e){const t=this.getOffsetParent||Tt,n=this.getDimensions,r=await n(e.floating);return{reference:sn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=yt(e);return{width:t,height:n}},getScale:he,isElement:W,isRTL:function(e){return Y(e).direction==="rtl"}};function St(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function an(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=Ue(e),p=o||i?[...u?ye(u):[],...ye(t)]:[];p.forEach(f=>{o&&f.addEventListener("scroll",n,{passive:!0}),i&&f.addEventListener("resize",n)});const d=u&&s?(function(f,y){let b,x=null;const O=X(f);function P(){var T;clearTimeout(b),(T=x)==null||T.disconnect(),x=null}return(function T(k,A){k===void 0&&(k=!1),A===void 0&&(A=1),P();const E=f.getBoundingClientRect(),{left:w,top:_,width:S,height:C}=E;if(k||y(),!S||!C)return;const M={rootMargin:-Oe(_)+"px "+-Oe(O.clientWidth-(w+S))+"px "+-Oe(O.clientHeight-(_+C))+"px "+-Oe(w)+"px",threshold:ie(0,ue(1,A))||1};let L=!0;function D(H){const N=H[0].intersectionRatio;if(N!==A){if(!L)return T();N?T(!1,N):b=setTimeout(()=>{T(!1,1e-7)},1e3)}N!==1||St(E,f.getBoundingClientRect())||T(),L=!1}try{x=new IntersectionObserver(D,$({},M,{root:O.ownerDocument}))}catch{x=new IntersectionObserver(D,M)}x.observe(f)})(!0),P})(u,n):null;let v,m=-1,g=null;l&&(g=new ResizeObserver(f=>{let[y]=f;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=g)==null||b.observe(t)})),n()}),u&&!a&&g.observe(u),g.observe(t));let h=a?le(e):null;return a&&(function f(){const y=le(e);h&&!St(h,y)&&n(),h=y,v=requestAnimationFrame(f)})(),n(),()=>{var f;p.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(f=g)==null||f.disconnect(),g=null,a&&cancelAnimationFrame(v)}}const cn=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:l,placement:s,platform:a,elements:u}=t,p=se(e,t),{crossAxis:d=!1,alignment:v,allowedPlacements:m=ct,autoAlignment:g=!0}=p,h=je(p,Yt),f=v!==void 0||m===ct?(function(w,_,S){return(w?[...S.filter(C=>K(C)===w),...S.filter(C=>K(C)!==w)]:S.filter(C=>Q(C)===C)).filter(C=>!w||K(C)===w||!!_&&Te(C)!==C)})(v||null,g,m):m,y=await a.detectOverflow(t,h),b=((n=l.autoPlacement)==null?void 0:n.index)||0,x=f[b];if(x==null)return{};const O=ut(x,i,await(a.isRTL==null?void 0:a.isRTL(u.floating)));if(s!==x)return{reset:{placement:f[0]}};const P=[y[Q(x)],y[O[0]],y[O[1]]],T=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:P}],k=f[b+1];if(k)return{data:{index:b+1,overflows:T},reset:{placement:k}};const A=T.map(w=>{const _=K(w.placement);return[w.placement,_&&d?w.overflows.slice(0,2).reduce((S,C)=>S+C,0):w.overflows[0],w.overflows]}).sort((w,_)=>w[1]-_[1]),E=((o=A.filter(w=>w[2].slice(0,K(w[0])?2:3).every(_=>_<=0))[0])==null?void 0:o[0])||A[0][0];return E!==s?{data:{index:b+1,overflows:T},reset:{placement:E}}:{}}}},un=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,l=se(e,t),{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:b=>{let{x,y:O}=b;return{x,y:O}}}}=l,p=je(l,qt),d={x:n,y:r},v=await i.detectOverflow(t,p),m=te(Q(o)),g=He(m);let h=d[g],f=d[m];if(s){const b=g==="y"?"bottom":"right";h=$e(h+v[g==="y"?"top":"left"],h,h-v[b])}if(a){const b=m==="y"?"bottom":"right";f=$e(f+v[m==="y"?"top":"left"],f,f-v[b])}const y=u.fn($({},t,{[g]:h,[m]:f}));return $({},y,{data:{x:y.x-n,y:y.y-r,enabled:{[g]:s,[m]:a}}})}}},fn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:u}=t,p=se(e,t),{mainAxis:d=!0,crossAxis:v=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:f=!0}=p,y=je(p,Ut);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=Q(o),x=te(s),O=Q(s)===s,P=await(a.isRTL==null?void 0:a.isRTL(u.floating)),T=m||(O||!f?[Se(s)]:(function(L){const D=Se(L);return[Te(L),D,Te(D)]})(s)),k=h!=="none";!m&&k&&T.push(...Wt(s,f,h,P));const A=[s,...T],E=await a.detectOverflow(t,y),w=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&w.push(E[b]),v){const L=ut(o,l,P);w.push(E[L[0]],E[L[1]])}if(_=[..._,{placement:o,overflows:w}],!w.every(L=>L<=0)){var S,C;const L=(((S=i.flip)==null?void 0:S.index)||0)+1,D=A[L];if(D&&(!(v==="alignment"&&x!==te(D))||_.every(N=>te(N.placement)!==x||N.overflows[0]>0)))return{data:{index:L,overflows:_},reset:{placement:D}};let H=(C=_.filter(N=>N.overflows[0]<=0).sort((N,U)=>N.overflows[1]-U.overflows[1])[0])==null?void 0:C.placement;if(!H)switch(g){case"bestFit":{var M;const N=(M=_.filter(U=>{if(k){const q=te(U.placement);return q===x||q==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(q=>q>0).reduce((q,c)=>q+c,0)]).sort((U,q)=>U[1]-q[1])[0])==null?void 0:M[0];N&&(H=N);break}case"initialPlacement":H=s}if(o!==H)return{reset:{placement:H}}}return{}}}},dn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:s,middlewareData:a}=t,{element:u,padding:p=0}=se(e,t)||{};if(u==null)return{};const d=ht(p),v={x:n,y:r},m=Ve(o),g=Ne(m),h=await l.getDimensions(u),f=m==="y",y=f?"top":"left",b=f?"bottom":"right",x=f?"clientHeight":"clientWidth",O=i.reference[g]+i.reference[m]-v[m]-i.floating[g],P=v[m]-i.reference[m],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let k=T?T[x]:0;k&&await(l.isElement==null?void 0:l.isElement(T))||(k=s.floating[x]||i.floating[g]);const A=O/2-P/2,E=k/2-h[g]/2-1,w=ue(d[y],E),_=ue(d[b],E),S=w,C=k-h[g]-_,M=k/2-h[g]/2+A,L=$e(S,M,C),D=!a.arrow&&K(o)!=null&&M!==L&&i.reference[g]/2-(M<S?w:_)-h[g]/2<0,H=D?M<S?M-S:M-C:0;return{[m]:v[m]+H,data:$({[m]:L,centerOffset:M-L-H},D&&{alignmentOffset:H}),reset:D}}}),hn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=se(e,t),p={x:n,y:r},d=te(o),v=He(d);let m=p[v],g=p[d];const h=se(s,t),f=typeof h=="number"?{mainAxis:h,crossAxis:0}:$({mainAxis:0,crossAxis:0},h);if(a){const x=v==="y"?"height":"width",O=i.reference[v]-i.floating[x]+f.mainAxis,P=i.reference[v]+i.reference[x]-f.mainAxis;m<O?m=O:m>P&&(m=P)}if(u){var y,b;const x=v==="y"?"width":"height",O=zt.has(Q(o)),P=i.reference[d]-i.floating[x]+(O&&((y=l.offset)==null?void 0:y[d])||0)+(O?0:f.crossAxis),T=i.reference[d]+i.reference[x]+(O?0:((b=l.offset)==null?void 0:b[d])||0)-(O?f.crossAxis:0);g<P?g=P:g>T&&(g=T)}return{[v]:m,[d]:g}}}},pn=(e,t,n)=>{const r=new Map,o=$({platform:ln},n),i=$({},o.platform,{_c:r});return(async(l,s,a)=>{const{placement:u="bottom",strategy:p="absolute",middleware:d=[],platform:v}=a,m=d.filter(Boolean),g=await(v.isRTL==null?void 0:v.isRTL(s));let h=await v.getElementRects({reference:l,floating:s,strategy:p}),{x:f,y}=pt(h,u,g),b=u,x={},O=0;for(let T=0;T<m.length;T++){var P;const{name:k,fn:A}=m[T],{x:E,y:w,data:_,reset:S}=await A({x:f,y,initialPlacement:u,placement:b,strategy:p,middlewareData:x,rects:h,platform:$({},v,{detectOverflow:(P=v.detectOverflow)!=null?P:Jt}),elements:{reference:l,floating:s}});f=E??f,y=w??y,x=$({},x,{[k]:$({},x[k],_)}),S&&O<=50&&(O++,typeof S=="object"&&(S.placement&&(b=S.placement),S.rects&&(h=S.rects===!0?await v.getElementRects({reference:l,floating:s,strategy:p}):S.rects),{x:f,y}=pt(h,b,g)),T=-1)}return{x:f,y,placement:b,strategy:p,middlewareData:x}})(e,t,$({},o,{platform:i}))};function mn(e){e.cleanup&&e.cleanup();const t=e._getResolvedAttachToOptions();let n=t.element;const r=(function(l,s){var a,u,p;const d={strategy:"absolute",middleware:[]},v=(function(y){return y.options.arrow&&y.el?y.el.querySelector(".shepherd-arrow"):!1})(s),m=st(l),g=(a=l.on)==null?void 0:a.includes("auto"),h=(l==null||(u=l.on)==null?void 0:u.includes("-start"))||(l==null||(p=l.on)==null?void 0:p.includes("-end"));if(!m){var f;if(g?d.middleware.push(cn({crossAxis:!0,alignment:h?l==null||(f=l.on)==null?void 0:f.split("-").pop():null})):d.middleware.push(fn()),d.middleware.push(un({limiter:hn(),crossAxis:!0})),v){const y=typeof s.options.arrow=="object"?s.options.arrow:{padding:4};d.middleware.push(dn({element:v,padding:h?y.padding:0}))}g||(d.placement=l.on)}return De(d,s.options.floatingUIOptions||{})})(t,e),o=st(t);if(o){var i;n=document.body;const l=(i=e.shepherdElementComponent)==null?void 0:i.element;l?.classList.add("shepherd-centered")}return e.cleanup=an(n,e.el,()=>{e.el?(function(l,s,a,u){pn(l,s.el,a).then((function(p,d){return({x:v,y:m,placement:g,middlewareData:h})=>(p.el&&(d?Object.assign(p.el.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}):Object.assign(p.el.style,{position:"absolute",left:`${v}px`,top:`${m}px`}),p.el.dataset.popperPlacement=g,(function(f,y){const b=f.querySelector(".shepherd-arrow");if(ce(b)&&y.arrow){const{x,y:O}=y.arrow;Object.assign(b.style,{left:x!=null?`${x}px`:"",top:O!=null?`${O}px`:""})}})(p.el,h)),p)})(s,u)).then(p=>new Promise(d=>{setTimeout(()=>d(p),300)})).then(p=>{p!=null&&p.el&&(p.el.tabIndex=0,p.el.focus({preventScroll:!0}))})})(n,e,r,o):e.cleanup==null||e.cleanup()}),e.target=t.element,r}function Z(e,t,...n){const r=document.createElement(e);return Rt(r,t),At(r,n),r}function _t(e,t,...n){const r=document.createElementNS("http://www.w3.org/2000/svg",e);return Rt(r,t),At(r,n),r}function Rt(e,t){if(t)for(const[n,r]of Object.entries(t))r!=null&&r!==!1&&(n.startsWith("on")&&typeof r=="function"?e.addEventListener(n.slice(2).toLowerCase(),r):n==="disabled"&&r===!0?e.disabled=!0:e.setAttribute(n,String(r)))}function At(e,t){for(const n of t)n!=null&&n!==!1&&e.append(typeof n=="string"?document.createTextNode(n):n)}function Je(e,t){return ee(e)?e.call(t):e}function gn(e,t){const n=e.action?e.action.bind(t.tour):null,r=!!e.disabled&&Je(e.disabled,t),o=e.label?Je(e.label,t):null,i=e.text?Je(e.text,t):null,l=Z("button",$({},e.attrs||{},{"aria-label":o||null,class:`${e.classes||""} shepherd-button ${e.secondary?"shepherd-button-secondary":""}`,disabled:r||null,onclick:n,tabindex:"0",type:"button"}));return i&&(l.innerHTML=i),l}function vn(e,t){const n=Z("header",{class:"shepherd-header"});return t.options.title&&n.append((function(r,o){const i=Z("h3",{id:r,class:"shepherd-title"}),l=ee(o)?o():o;return i.innerHTML=l,i})(e,t.options.title)),t.options.cancelIcon&&t.options.cancelIcon.enabled&&n.append((function(r,o){return Z("button",$({},r.attrs||{},{"aria-label":r.label?r.label:"Close Tour",class:"shepherd-cancel-icon",onclick:i=>{i.preventDefault(),o.cancel()},type:"button"}),Z("span",{"aria-hidden":"true"},"×"))})(t.options.cancelIcon,t)),n}function yn(e,t,n){const r=Z("div",{class:"shepherd-content"});return(!V(n.options.title)||n.options.cancelIcon&&n.options.cancelIcon.enabled)&&r.append(vn(t,n)),V(n.options.text)||r.append((function(o,i){const l=Z("div",{class:"shepherd-text",id:o});let s=i.options.text;return ee(s)&&(s=s.call(i)),ce(s)?l.appendChild(s):l.innerHTML=s,l})(e,n)),Array.isArray(n.options.buttons)&&n.options.buttons.length&&r.append((function(o){const i=Z("footer",{class:"shepherd-footer"});if(o.options.buttons)for(const l of o.options.buttons)i.append(gn(l,o));return i})(n)),r}class ze extends Me{constructor(t,n={}){return super(),this._resolvedAttachTo=void 0,this._resolvedExtraHighlightElements=void 0,this._originalTabIndexes=void 0,this.classPrefix=void 0,this.el=void 0,this.shepherdElementComponent=void 0,this.target=void 0,this.tour=void 0,this.tour=t,this.classPrefix=this.tour.options?it(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,this._originalTabIndexes=new Map,Fe(this),this._setOptions(n),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){this._teardownElements(),this.trigger("destroy")}_teardownElements(){var t;(t=this).cleanup&&t.cleanup(),t.cleanup=null,this.shepherdElementComponent&&(this.shepherdElementComponent.cleanup(),this.shepherdElementComponent=void 0),ce(this.el)&&(this.el.remove(),this.el=null),this._updateStepTargetOnHide(),this._originalTabIndexes.clear()}getTour(){return this.tour}hide(){var t;(t=this.tour.modal)==null||t.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this._updateStepTargetOnHide(),this.trigger("hide")}_resolveExtraHiglightElements(){var t;return this._resolvedExtraHighlightElements=(t=this).options.extraHighlights?t.options.extraHighlights.flatMap(n=>Array.from(document.querySelectorAll(n))):[],this._resolvedExtraHighlightElements}_resolveAttachToOptions(){return this._resolvedAttachTo=(function(t){const n=t.options.attachTo||{},r=Object.assign({},n);if(ee(r.element)&&(r.element=r.element.call(t)),xe(r.element)){try{r.element=document.querySelector(r.element)}catch{}r.element}return r})(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return this._resolvedAttachTo===null?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return ee(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.el&&(this._teardownElements(),this._setupElements())}getElement(){return this.el}getTarget(){return this.target}_storeOriginalTabIndex(t){const n=t.getAttribute("tabindex");n!==null&&this._originalTabIndexes.set(t,n)}_restoreOriginalTabIndexes(){const t=this.target;t&&(this._originalTabIndexes.has(t)?t.setAttribute("tabindex",this._originalTabIndexes.get(t)):t.removeAttribute("tabindex"))}_createTooltipContent(){const t=`${this.id}-description`,n=`${this.id}-label`;return this.shepherdElementComponent=(function(r){var o,i,l,s;const{classPrefix:a,descriptionId:u,labelId:p,step:d}=r;let v,m,g,h,f,y,b;const x=(o=(i=d.options)==null||(i=i.cancelIcon)==null?void 0:i.enabled)!=null&&o,O=(l=(s=d.options)==null?void 0:s.title)!=null&&l,P=E=>{const{tour:w}=d;switch(E.keyCode){case 9:if((!m||m.length===0)&&y&&y.length===0){E.preventDefault();break}var _,S,C;if(E.shiftKey){if(document.activeElement===f||(_=document.activeElement)!=null&&_.classList.contains("shepherd-element"))E.preventDefault(),(S=h??b)==null||S.focus();else if(document.activeElement===g){var M;E.preventDefault(),(M=b)==null||M.focus()}}else if(document.activeElement===b)E.preventDefault(),(C=g??f)==null||C.focus();else if(document.activeElement===h){var L;E.preventDefault(),(L=f)==null||L.focus()}break;case 27:w.options.exitOnEsc&&(E.preventDefault(),E.stopPropagation(),d.cancel());break;case 37:w.options.keyboardNavigation&&(E.preventDefault(),E.stopPropagation(),w.back());break;case 39:w.options.keyboardNavigation&&(E.preventDefault(),E.stopPropagation(),w.next())}},T=Z("dialog",{"aria-describedby":V(d.options.text)?null:u,"aria-labelledby":d.options.title?p:null,class:["shepherd-element",x?"shepherd-has-cancel-icon":"",O?"shepherd-has-title":""].filter(Boolean).join(" "),[`data-${a}shepherd-step-id`]:d.id,onkeydown:P,open:"true"});if(d.options.arrow&&d.options.attachTo&&d.options.attachTo.element&&d.options.attachTo.on&&T.append(Z("div",{class:"shepherd-arrow","data-popper-arrow":""})),T.append(yn(u,p,d)),xe(d.options.classes)){const E=d.options.classes.split(" ").filter(w=>!!w.length);E.length&&T.classList.add(...E)}const k='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]';y=[...T.querySelectorAll(k)],f=y[0],b=y[y.length-1];const A=d._getResolvedAttachToOptions();return A!=null&&A.element&&(v=A.element,d._storeOriginalTabIndex(v),v.tabIndex=0,m=[v,...v.querySelectorAll(k)],g=m[0],h=m[m.length-1],v.addEventListener("keydown",P)),{element:T,cleanup:()=>{var E;(E=v)==null||E.removeEventListener("keydown",P)}}})({classPrefix:this.classPrefix,descriptionId:t,labelId:n,step:this}),(this.tour.options.stepsContainer||document.body).append(this.shepherdElementComponent.element),this.shepherdElementComponent.element}_scrollTo(t){const{element:n}=this._getResolvedAttachToOptions();ee(this.options.scrollToHandler)?this.options.scrollToHandler(n):n instanceof Element&&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(" ")],l=new Set(i);return Array.from(l).join(" ").trim()}_setOptions(t={}){let n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;n=De({},n||{}),this.options=Object.assign({arrow:!0},n,t,(function(o,i){return{floatingUIOptions:De(o.floatingUIOptions||{},i.floatingUIOptions||{})}})(n,t));const{when:r}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${lt()}`,r&&Object.keys(r).forEach(o=>{this.on(o,r[o],this)})}_setupElements(){V(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&Ft(this),mn(this)}_show(){var t;this.trigger("before-show"),this._resolveAttachToOptions(),this._resolveExtraHiglightElements(),this._setupElements(),this.tour.modal||this.tour.setupModal(),(t=this.tour.modal)==null||t.setupForStep(this),this._styleTargetElementForStep(this),this.el&&(this.el.hidden=!1),this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)}),this.el&&(this.el.hidden=!1);const n=this.shepherdElementComponent.element,r=this.target||document.body,o=this._resolvedExtraHighlightElements;r.classList.add(`${this.classPrefix}shepherd-enabled`),r.classList.add(`${this.classPrefix}shepherd-target`),n.classList.add("shepherd-enabled"),o?.forEach(i=>{i.classList.add(`${this.classPrefix}shepherd-enabled`),i.classList.add(`${this.classPrefix}shepherd-target`)}),this.trigger("show")}_styleTargetElementForStep(t){const n=t.target,r=t._resolvedExtraHighlightElements;if(!n)return;const o=t.options.highlightClass;o&&(n.classList.add(o),r?.forEach(i=>i.classList.add(o))),n.classList.remove("shepherd-target-click-disabled"),r?.forEach(i=>i.classList.remove("shepherd-target-click-disabled")),t.options.canClickTarget===!1&&(n.classList.add("shepherd-target-click-disabled"),r?.forEach(i=>i.classList.add("shepherd-target-click-disabled")))}_updateStepTargetOnHide(){const t=this.target||document.body,n=this._resolvedExtraHighlightElements,r=this.options.highlightClass;r&&(t.classList.remove(r),n?.forEach(o=>o.classList.remove(r))),t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`),n?.forEach(o=>{o.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}),this._restoreOriginalTabIndexes()}}function bn(e){let t,n=[{width:0,height:0,x:0,y:0,r:0}];const r=_t("path"),o=_t("svg",{class:"shepherd-modal-overlay-container"},r);function i(){r.setAttribute("d",(function(h){let f="";const{innerWidth:y,innerHeight:b}=window;return h.forEach(x=>{const{width:O,height:P,x:T=0,y:k=0,r:A=0}=x,{topLeft:E=0,topRight:w=0,bottomRight:_=0,bottomLeft:S=0}=typeof A=="number"?{topLeft:A,topRight:A,bottomRight:A,bottomLeft:A}:A;f+=`M${T+E},${k}a${E},${E},0,0,0-${E},${E}V`+(P+k-S)+`a${S},${S},0,0,0,${S},${S}H`+(O+T-_)+`a${_},${_},0,0,0,${_}-${_}V${k+w}a${w},${w},0,0,0-${w}-${w}Z`}),`M${y},${b}H0V0H${y}V${b}Z${f}`.replace(/\s/g,"")})(n))}function l(){n=[{width:0,height:0,x:0,y:0,r:0}],i()}function s(){o.classList.remove("shepherd-modal-is-visible"),v()}function a(){o.classList.add("shepherd-modal-is-visible")}function u(h=0,f=0,y=0,b=0,x,O,P){if(O){{const T=[O,...P||[]],k=[];for(const A of T){if(!A||T.indexOf(A)!==T.lastIndexOf(A))continue;const{y:E,height:w}=g(A,x),{x:_,width:S,left:C}=A.getBoundingClientRect();T.some(M=>{if(M===A)return!1;const L=M.getBoundingClientRect(),{y:D,height:H}=g(M,x);return _>=L.left&&_+S<=L.left+L.width&&E>=D&&E+w<=D+H})||k.push({width:S+2*h,height:w+2*h,x:(_||C)+y-h,y:E+b-h,r:f})}n=k}i()}else l()}function p(h){h.stopPropagation()}o.addEventListener("touchmove",p),i(),e.append(o);const d=h=>{h.preventDefault()};function v(){t&&(cancelAnimationFrame(t),t=void 0),window.removeEventListener("touchmove",d,{passive:!1})}function m(h){if(!h)return null;const f=h instanceof HTMLElement&&window.getComputedStyle(h).overflowY;return f!=="hidden"&&f!=="visible"&&h.scrollHeight>=h.clientHeight?h:m(h.parentElement)}function g(h,f){const y=h.getBoundingClientRect();let b=y.y||y.top,x=y.bottom||b+y.height;if(f){const O=f.getBoundingClientRect(),P=O.y||O.top,T=O.bottom||P+O.height;b=Math.max(b,P),x=Math.min(x,T)}return{y:b,height:Math.max(x-b,0)}}return{closeModalOpening:l,destroy:function(){v(),o.removeEventListener("touchmove",p),o.remove()},hide:s,positionModal:u,setupForStep:function(h){v(),h.tour.options.useModalOverlay?((function(f){const{modalOverlayOpeningPadding:y,modalOverlayOpeningRadius:b,modalOverlayOpeningXOffset:x=0,modalOverlayOpeningYOffset:O=0}=f.options,P=(function(A){const E={top:0,left:0};if(!A)return E;let w=A.ownerDocument.defaultView;try{for(;w&&w!==window.top;){var _;const S=(_=w)==null?void 0:_.frameElement;if(S){const C=S.getBoundingClientRect();E.top+=C.top+S.scrollTop,E.left+=C.left+S.scrollLeft}w=w.parent}}catch{}return E})(f.target),T=m(f.target),k=()=>{t=void 0,u(y,b,x+P.left,O+P.top,T,f.target,f._resolvedExtraHighlightElements),t=requestAnimationFrame(k)};k(),window.addEventListener("touchmove",d,{passive:!1})})(h),a()):s()},show:a,getElement:function(){return o}}}class xn extends Me{constructor(){super(),this.activeTour=void 0,Fe(this)}}const ae=new xn,Pt=typeof window>"u";ae.Step=Pt?class{constructor(e){}}:ze,ae.Tour=Pt?class{constructor(e,t){}}:class extends Me{constructor(e={}){return super(),this.trackedEvents=["active","cancel","complete","show"],this.classPrefix=void 0,this.currentStep=void 0,this.focusedElBeforeOpen=void 0,this.id=void 0,this.modal=void 0,this.options=void 0,this.steps=void 0,Fe(this),this.options=Object.assign({},{exitOnEsc:!0,keyboardNavigation:!0},e),this.classPrefix=it(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(t=>{(n=>{this.on(n,r=>{(r=r||{}).tour=this,ae.trigger(n,r)})})(t)}),this._setTourID(e.id),this}addStep(e,t){let n=e;return n instanceof ze?n.tour=this:n=new ze(this,n),V(t)?this.steps.push(n):this.steps.splice(t,0,n),n}addSteps(e){return Array.isArray(e)&&e.forEach(t=>{this.addStep(t)}),this}back(){const e=this.steps.indexOf(this.currentStep);this.show(e-1,!1)}async cancel(){if(this.options.confirmCancel){const e=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";let t;t=ee(this.options.confirmCancel)?await this.options.confirmCancel():window.confirm(e),t&&this._done("cancel")}else this._done("cancel")}complete(){this._done("complete")}getById(e){return this.steps.find(t=>t.id===e)}getCurrentStep(){return this.currentStep}hide(){const e=this.getCurrentStep();if(e)return e.hide()}isActive(){return ae.activeTour===this}next(){const e=this.steps.indexOf(this.currentStep);e===this.steps.length-1?this.complete():this.show(e+1,!0)}removeStep(e){const t=this.getCurrentStep();this.steps.some((n,r)=>{if(n.id===e)return n.isOpen()&&n.hide(),n.destroy(),this.steps.splice(r,1),!0}),t&&t.id===e&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(e=0,t=!0){const n=xe(e)?this.getById(e):this.steps[e];n&&(this._updateStateBeforeShow(),ee(n.options.showOn)&&!n.options.showOn()?this._skipStep(n,t):(this.currentStep=n,this.trigger("show",{step:n,previous:this.currentStep}),n.show()))}async start(){this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this.setupModal(),this._setupActiveTour(),this.next()}_done(e){const t=this.steps.indexOf(this.currentStep);Array.isArray(this.steps)&&this.steps.forEach(n=>n.destroy()),(function(n){if(n){const{steps:r}=n;r.forEach(o=>{o.options&&o.options.canClickTarget===!1&&o.options.attachTo&&(ce(o.target)&&o.target.classList.remove("shepherd-target-click-disabled"),o._resolvedExtraHighlightElements&&o._resolvedExtraHighlightElements.forEach(i=>{ce(i)&&i.classList.remove("shepherd-target-click-disabled")}))})}})(this),this.trigger(e,{index:t}),ae.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),e!=="cancel"&&e!=="complete"||this.modal&&(this.modal.destroy(),this.modal=null),ce(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),ae.activeTour=this}setupModal(){const e=this.options.modalContainer||document.body;this.modal=bn(e)}_skipStep(e,t){const n=this.steps.indexOf(e);if(n===this.steps.length-1)this.complete();else{const r=t?n+1:n-1;this.show(r,t)}}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(e){const t=this.options.tourName||"tour",n=e||lt();this.id=`${t}--${n}`}};const Ce=re.createContext(void 0),wn=Ce.Consumer,En=()=>{const e=re.useContext(Ce);if(!e)throw new Error("useShepherd must be used within a ShepherdJourneyProvider");const{Shepherd:t}=e;return t},On=({children:e})=>Mt.jsx(Ce.Provider,{value:{Shepherd:ae},children:e});J.JourneyMethods=wn,J.ShepherdJourneyContext=Ce,J.ShepherdJourneyProvider=On,J.useShepherd=En,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-shepherd",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"repository": {
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"LICENSE.md"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"shepherd.js": "15.
|
|
28
|
+
"shepherd.js": "15.2.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@testing-library/jest-dom": "^6.9.1",
|
|
32
32
|
"@testing-library/react": "^16.3.2",
|
|
33
|
-
"@types/react": "^19.2.
|
|
34
|
-
"@vitejs/plugin-react": "^
|
|
33
|
+
"@types/react": "^19.2.14",
|
|
34
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
35
35
|
"@vitest/ui": "^4.0.18",
|
|
36
|
-
"happy-dom": "^20.
|
|
36
|
+
"happy-dom": "^20.6.1",
|
|
37
37
|
"react": "^19.2.4",
|
|
38
38
|
"react-dom": "^19.2.4",
|
|
39
39
|
"typescript": "^5.9.3",
|