Guide-C05OKltW.js 21 KB

12
  1. var ve=Object.defineProperty,me=Object.defineProperties;var fe=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var he=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable;var J=(e,t,n)=>t in e?ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$=(e,t)=>{for(var n in t||(t={}))he.call(t,n)&&J(e,n,t[n]);if(G)for(var n of G(t))we.call(t,n)&&J(e,n,t[n]);return e},N=(e,t)=>me(e,fe(t));import{_ as ge}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BQQVoJIW.js";import{c as te,b as ye}from"./index-XQEkcq4y.js";import{v as xe,x as be,J as Ce,K as X,M as _e,a3 as Le,P as Ee,u as R,ad as Be}from"./vue-chunks-COp0tDkU.js";/* empty css *//* empty css */import"./element-plus-B-YefleC.js";let j={};function V(e={}){j=$({animate:!0,allowClose:!0,overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000"},e)}function d(e){return e?j[e]:j}function z(e,t,n,i){return(e/=i/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function ne(e){const t='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap(n=>{const i=n.matches(t),o=Array.from(n.querySelectorAll(t));return[...i?[n]:[],...o]}).filter(n=>getComputedStyle(n).pointerEvents!=="none"&&ke(n))}function oe(e){if(!e||$e(e))return;const t=d("smoothScroll");e.scrollIntoView({behavior:!t||Pe(e)?"auto":"smooth",inline:"center",block:"center"})}function Pe(e){if(!e||!e.parentElement)return;const t=e.parentElement;return t.scrollHeight>t.clientHeight}function $e(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function ke(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}let q={};function b(e,t){q[e]=t}function l(e){return e?q[e]:q}function Y(){q={}}let F={};function O(e,t){F[e]=t}function A(e){var t;(t=F[e])==null||t.call(F)}function Ae(){F={}}function Se(e,t,n,i){let o=l("__activeStagePosition");const a=o||n.getBoundingClientRect(),v=i.getBoundingClientRect(),f=z(e,a.x,v.x-a.x,t),s=z(e,a.y,v.y-a.y,t),m=z(e,a.width,v.width-a.width,t),r=z(e,a.height,v.height-a.height,t);o={x:f,y:s,width:m,height:r},re(o),b("__activeStagePosition",o)}function ie(e){if(!e)return;const t=e.getBoundingClientRect(),n={x:t.x,y:t.y,width:t.width,height:t.height};b("__activeStagePosition",n),re(n)}function De(){const e=l("__activeStagePosition"),t=l("__overlaySvg");if(!e)return;if(!t){console.warn("No stage svg found.");return}const n=window.innerWidth,i=window.innerHeight;t.setAttribute("viewBox",`0 0 ${n} ${i}`)}function He(e){const t=Me(e);document.body.appendChild(t),le(t,n=>{n.target.tagName==="path"&&A("overlayClick")}),b("__overlaySvg",t)}function re(e){const t=l("__overlaySvg");if(!t){He(e);return}const n=t.firstElementChild;if((n==null?void 0:n.tagName)!=="path")throw new Error("no path element found in stage svg");n.setAttribute("d",se(e))}function Me(e){const t=window.innerWidth,n=window.innerHeight,i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.classList.add("driver-overlay","driver-overlay-animated"),i.setAttribute("viewBox",`0 0 ${t} ${n}`),i.setAttribute("xmlSpace","preserve"),i.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),i.setAttribute("version","1.1"),i.setAttribute("preserveAspectRatio","xMinYMin slice"),i.style.fillRule="evenodd",i.style.clipRule="evenodd",i.style.strokeLinejoin="round",i.style.strokeMiterlimit="2",i.style.zIndex="10000",i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%";const o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",se(e)),o.style.fill=d("overlayColor")||"rgb(0,0,0)",o.style.opacity=`${d("overlayOpacity")}`,o.style.pointerEvents="auto",o.style.cursor="auto",i.appendChild(o),i}function se(e){const t=window.innerWidth,n=window.innerHeight,i=d("stagePadding")||0,o=d("stageRadius")||0,a=e.width+i*2,v=e.height+i*2,f=Math.min(o,a/2,v/2),s=Math.floor(Math.max(f,0)),m=e.x-i+s,r=e.y-i,p=a-s*2,c=v-s*2;return`M${t},0L0,0L0,${n}L${t},${n}L${t},0Z
  2. M${m},${r} h${p} a${s},${s} 0 0 1 ${s},${s} v${c} a${s},${s} 0 0 1 -${s},${s} h-${p} a${s},${s} 0 0 1 -${s},-${s} v-${c} a${s},${s} 0 0 1 ${s},-${s} z`}function Te(){const e=l("__overlaySvg");e&&e.remove()}function We(){const e=document.getElementById("driver-dummy-element");if(e)return e;let t=document.createElement("div");return t.id="driver-dummy-element",t.style.width="0",t.style.height="0",t.style.pointerEvents="none",t.style.opacity="0",t.style.position="fixed",t.style.top="50%",t.style.left="50%",document.body.appendChild(t),t}function Z(e){const{element:t}=e;let n=typeof t=="string"?document.querySelector(t):t;n||(n=We()),Ne(n,e)}function Ie(){const e=l("__activeElement"),t=l("__activeStep");e&&(ie(e),De(),pe(e,t))}function Ne(e,t){const n=Date.now(),i=l("__activeStep"),o=l("__activeElement")||e,a=!o||o===e,v=e.id==="driver-dummy-element",f=o.id==="driver-dummy-element",s=d("animate"),m=t.onHighlightStarted||d("onHighlightStarted"),r=(t==null?void 0:t.onHighlighted)||d("onHighlighted"),p=(i==null?void 0:i.onDeselected)||d("onDeselected"),c=d(),h=l();!a&&p&&p(f?void 0:o,i,{config:c,state:h}),m&&m(v?void 0:e,t,{config:c,state:h});const g=!a&&s;let w=!1;Fe(),b("previousStep",i),b("previousElement",o),b("activeStep",t),b("activeElement",e);const u=()=>{if(l("__transitionCallback")!==u)return;const y=Date.now()-n,L=400-y<=400/2;t.popover&&L&&!w&&g&&(Q(e,t),w=!0),d("animate")&&y<400?Se(y,400,o,e):(ie(e),r&&r(v?void 0:e,t,{config:d(),state:l()}),b("__transitionCallback",void 0),b("__previousStep",i),b("__previousElement",o),b("__activeStep",t),b("__activeElement",e)),window.requestAnimationFrame(u)};b("__transitionCallback",u),window.requestAnimationFrame(u),oe(e),!g&&t.popover&&Q(e,t),o.classList.remove("driver-active-element","driver-no-interaction"),o.removeAttribute("aria-haspopup"),o.removeAttribute("aria-expanded"),o.removeAttribute("aria-controls"),d("disableActiveInteraction")&&e.classList.add("driver-no-interaction"),e.classList.add("driver-active-element"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls","driver-popover-content")}function Re(){var e;(e=document.getElementById("driver-dummy-element"))==null||e.remove(),document.querySelectorAll(".driver-active-element").forEach(t=>{t.classList.remove("driver-active-element","driver-no-interaction"),t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-controls")})}function S(){const e=l("__resizeTimeout");e&&window.cancelAnimationFrame(e),b("__resizeTimeout",window.requestAnimationFrame(Ie))}function ze(e){var t;if(!l("isInitialized")||!(e.key==="Tab"||e.keyCode===9))return;const n=l("__activeElement"),i=(t=l("popover"))==null?void 0:t.wrapper,o=ne([...i?[i]:[],...n?[n]:[]]),a=o[0],v=o[o.length-1];if(e.preventDefault(),e.shiftKey){const f=o[o.indexOf(document.activeElement)-1]||v;f==null||f.focus()}else{const f=o[o.indexOf(document.activeElement)+1]||a;f==null||f.focus()}}function de(e){var t;((t=d("allowKeyboardControl"))==null||t)&&(e.key==="Escape"?A("escapePress"):e.key==="ArrowRight"?A("arrowRightPress"):e.key==="ArrowLeft"&&A("arrowLeftPress"))}function le(e,t,n){const i=(o,a)=>{const v=o.target;e.contains(v)&&((!n||n(v))&&(o.preventDefault(),o.stopPropagation(),o.stopImmediatePropagation()),a==null||a(o))};document.addEventListener("pointerdown",i,!0),document.addEventListener("mousedown",i,!0),document.addEventListener("pointerup",i,!0),document.addEventListener("mouseup",i,!0),document.addEventListener("click",o=>{i(o,t)},!0)}function Oe(){window.addEventListener("keyup",de,!1),window.addEventListener("keydown",ze,!1),window.addEventListener("resize",S),window.addEventListener("scroll",S)}function qe(){window.removeEventListener("keyup",de),window.removeEventListener("resize",S),window.removeEventListener("scroll",S)}function Fe(){const e=l("popover");e&&(e.wrapper.style.display="none")}function Q(e,t){var n,i;let o=l("popover");o&&document.body.removeChild(o.wrapper),o=Ke(),document.body.appendChild(o.wrapper);const{title:a,description:v,showButtons:f,disableButtons:s,showProgress:m,nextBtnText:r=d("nextBtnText")||"Next &rarr;",prevBtnText:p=d("prevBtnText")||"&larr; Previous",progressText:c=d("progressText")||"{current} of {total}"}=t.popover||{};o.nextButton.innerHTML=r,o.previousButton.innerHTML=p,o.progress.innerHTML=c,a?(o.title.innerHTML=a,o.title.style.display="block"):o.title.style.display="none",v?(o.description.innerHTML=v,o.description.style.display="block"):o.description.style.display="none";const h=f||d("showButtons"),g=m||d("showProgress")||!1,w=(h==null?void 0:h.includes("next"))||(h==null?void 0:h.includes("previous"))||g;o.closeButton.style.display=h.includes("close")?"block":"none",w?(o.footer.style.display="flex",o.progress.style.display=g?"block":"none",o.nextButton.style.display=h.includes("next")?"block":"none",o.previousButton.style.display=h.includes("previous")?"block":"none"):o.footer.style.display="none";const u=s||d("disableButtons")||[];u!=null&&u.includes("next")&&(o.nextButton.disabled=!0,o.nextButton.classList.add("driver-popover-btn-disabled")),u!=null&&u.includes("previous")&&(o.previousButton.disabled=!0,o.previousButton.classList.add("driver-popover-btn-disabled")),u!=null&&u.includes("close")&&(o.closeButton.disabled=!0,o.closeButton.classList.add("driver-popover-btn-disabled"));const y=o.wrapper;y.style.display="block",y.style.left="",y.style.top="",y.style.bottom="",y.style.right="",y.id="driver-popover-content",y.setAttribute("role","dialog"),y.setAttribute("aria-labelledby","driver-popover-title"),y.setAttribute("aria-describedby","driver-popover-description");const L=o.arrow;L.className="driver-popover-arrow";const E=((n=t.popover)==null?void 0:n.popoverClass)||d("popoverClass")||"";y.className=`driver-popover ${E}`.trim(),le(o.wrapper,P=>{var D,H,M;const k=P.target,T=((D=t.popover)==null?void 0:D.onNextClick)||d("onNextClick"),W=((H=t.popover)==null?void 0:H.onPrevClick)||d("onPrevClick"),I=((M=t.popover)==null?void 0:M.onCloseClick)||d("onCloseClick");if(k.classList.contains("driver-popover-next-btn"))return T?T(e,t,{config:d(),state:l()}):A("nextClick");if(k.classList.contains("driver-popover-prev-btn"))return W?W(e,t,{config:d(),state:l()}):A("prevClick");if(k.classList.contains("driver-popover-close-btn"))return I?I(e,t,{config:d(),state:l()}):A("closeClick")},P=>!(o!=null&&o.description.contains(P))&&!(o!=null&&o.title.contains(P))&&typeof P.className=="string"&&P.className.includes("driver-popover")),b("popover",o);const x=((i=t.popover)==null?void 0:i.onPopoverRender)||d("onPopoverRender");x&&x(o,{config:d(),state:l()}),pe(e,t),oe(y);const C=e.classList.contains("driver-dummy-element"),_=ne([y,...C?[]:[e]]);_.length>0&&_[0].focus()}function ae(){const e=l("popover");if(!(e!=null&&e.wrapper))return;const t=e.wrapper.getBoundingClientRect(),n=d("stagePadding")||0,i=d("popoverOffset")||0;return{width:t.width+n+i,height:t.height+n+i,realWidth:t.width,realHeight:t.height}}function U(e,t){const{elementDimensions:n,popoverDimensions:i,popoverPadding:o,popoverArrowDimensions:a}=t;return e==="start"?Math.max(Math.min(n.top-o,window.innerHeight-i.realHeight-a.width),a.width):e==="end"?Math.max(Math.min(n.top-(i==null?void 0:i.realHeight)+n.height+o,window.innerHeight-(i==null?void 0:i.realHeight)-a.width),a.width):e==="center"?Math.max(Math.min(n.top+n.height/2-(i==null?void 0:i.realHeight)/2,window.innerHeight-(i==null?void 0:i.realHeight)-a.width),a.width):0}function ee(e,t){const{elementDimensions:n,popoverDimensions:i,popoverPadding:o,popoverArrowDimensions:a}=t;return e==="start"?Math.max(Math.min(n.left-o,window.innerWidth-i.realWidth-a.width),a.width):e==="end"?Math.max(Math.min(n.left-(i==null?void 0:i.realWidth)+n.width+o,window.innerWidth-(i==null?void 0:i.realWidth)-a.width),a.width):e==="center"?Math.max(Math.min(n.left+n.width/2-(i==null?void 0:i.realWidth)/2,window.innerWidth-(i==null?void 0:i.realWidth)-a.width),a.width):0}function pe(e,t){const n=l("popover");if(!n)return;const{align:i="start",side:o="left"}=(t==null?void 0:t.popover)||{},a=i,v=e.id==="driver-dummy-element"?"over":o,f=d("stagePadding")||0,s=ae(),m=n.arrow.getBoundingClientRect(),r=e.getBoundingClientRect(),p=r.top-s.height;let c=p>=0;const h=window.innerHeight-(r.bottom+s.height);let g=h>=0;const w=r.left-s.width;let u=w>=0;const y=window.innerWidth-(r.right+s.width);let L=y>=0;const E=!c&&!g&&!u&&!L;let x=v;if(v==="top"&&c?L=u=g=!1:v==="bottom"&&g?L=u=c=!1:v==="left"&&u?L=c=g=!1:v==="right"&&L&&(u=c=g=!1),v==="over"){const C=window.innerWidth/2-s.realWidth/2,_=window.innerHeight/2-s.realHeight/2;n.wrapper.style.left=`${C}px`,n.wrapper.style.right="auto",n.wrapper.style.top=`${_}px`,n.wrapper.style.bottom="auto"}else if(E){const C=window.innerWidth/2-(s==null?void 0:s.realWidth)/2,_=10;n.wrapper.style.left=`${C}px`,n.wrapper.style.right="auto",n.wrapper.style.bottom=`${_}px`,n.wrapper.style.top="auto"}else if(u){const C=Math.min(w,window.innerWidth-(s==null?void 0:s.realWidth)-m.width),_=U(a,{elementDimensions:r,popoverDimensions:s,popoverPadding:f,popoverArrowDimensions:m});n.wrapper.style.left=`${C}px`,n.wrapper.style.top=`${_}px`,n.wrapper.style.bottom="auto",n.wrapper.style.right="auto",x="left"}else if(L){const C=Math.min(y,window.innerWidth-(s==null?void 0:s.realWidth)-m.width),_=U(a,{elementDimensions:r,popoverDimensions:s,popoverPadding:f,popoverArrowDimensions:m});n.wrapper.style.right=`${C}px`,n.wrapper.style.top=`${_}px`,n.wrapper.style.bottom="auto",n.wrapper.style.left="auto",x="right"}else if(c){const C=Math.min(p,window.innerHeight-s.realHeight-m.width);let _=ee(a,{elementDimensions:r,popoverDimensions:s,popoverPadding:f,popoverArrowDimensions:m});n.wrapper.style.top=`${C}px`,n.wrapper.style.left=`${_}px`,n.wrapper.style.bottom="auto",n.wrapper.style.right="auto",x="top"}else if(g){const C=Math.min(h,window.innerHeight-(s==null?void 0:s.realHeight)-m.width);let _=ee(a,{elementDimensions:r,popoverDimensions:s,popoverPadding:f,popoverArrowDimensions:m});n.wrapper.style.left=`${_}px`,n.wrapper.style.bottom=`${C}px`,n.wrapper.style.top="auto",n.wrapper.style.right="auto",x="bottom"}E?n.arrow.classList.add("driver-popover-arrow-none"):Ve(a,x,e)}function Ve(e,t,n){const i=l("popover");if(!i)return;const o=n.getBoundingClientRect(),a=ae(),v=i.arrow,f=a.width,s=window.innerWidth,m=o.width,r=o.left,p=a.height,c=window.innerHeight,h=o.top,g=o.height;v.className="driver-popover-arrow";let w=t,u=e;t==="top"?(r+m<=0?(w="right",u="end"):r+m-f<=0&&(w="top",u="start"),r>=s?(w="left",u="end"):r+f>=s&&(w="top",u="end")):t==="bottom"?(r+m<=0?(w="right",u="start"):r+m-f<=0&&(w="bottom",u="start"),r>=s?(w="left",u="start"):r+f>=s&&(w="bottom",u="end")):t==="left"?(h+g<=0?(w="bottom",u="end"):h+g-p<=0&&(w="left",u="start"),h>=c?(w="top",u="end"):h+p>=c&&(w="left",u="end")):t==="right"&&(h+g<=0?(w="bottom",u="start"):h+g-p<=0&&(w="right",u="start"),h>=c?(w="top",u="start"):h+p>=c&&(w="right",u="end")),w?(v.classList.add(`driver-popover-arrow-side-${w}`),v.classList.add(`driver-popover-arrow-align-${u}`)):v.classList.add("driver-popover-arrow-none")}function Ke(){const e=document.createElement("div");e.classList.add("driver-popover");const t=document.createElement("div");t.classList.add("driver-popover-arrow");const n=document.createElement("header");n.id="driver-popover-title",n.classList.add("driver-popover-title"),n.style.display="none",n.innerText="Popover Title";const i=document.createElement("div");i.id="driver-popover-description",i.classList.add("driver-popover-description"),i.style.display="none",i.innerText="Popover description is here";const o=document.createElement("button");o.type="button",o.classList.add("driver-popover-close-btn"),o.setAttribute("aria-label","Close"),o.innerHTML="&times;";const a=document.createElement("footer");a.classList.add("driver-popover-footer");const v=document.createElement("span");v.classList.add("driver-popover-progress-text"),v.innerText="";const f=document.createElement("span");f.classList.add("driver-popover-navigation-btns");const s=document.createElement("button");s.type="button",s.classList.add("driver-popover-prev-btn"),s.innerHTML="&larr; Previous";const m=document.createElement("button");return m.type="button",m.classList.add("driver-popover-next-btn"),m.innerHTML="Next &rarr;",f.appendChild(s),f.appendChild(m),a.appendChild(v),a.appendChild(f),e.appendChild(o),e.appendChild(t),e.appendChild(n),e.appendChild(i),e.appendChild(a),{wrapper:e,arrow:t,title:n,description:i,footer:a,previousButton:s,nextButton:m,closeButton:o,footerButtons:f,progress:v}}function je(){var e;const t=l("popover");t&&((e=t.wrapper.parentElement)==null||e.removeChild(t.wrapper))}function Ge(e={}){V(e);function t(){d("allowClose")&&m()}function n(){const r=l("activeIndex"),p=d("steps")||[];if(typeof r=="undefined")return;const c=r+1;p[c]?s(c):m()}function i(){const r=l("activeIndex"),p=d("steps")||[];if(typeof r=="undefined")return;const c=r-1;p[c]?s(c):m()}function o(r){(d("steps")||[])[r]?s(r):m()}function a(){var r;if(l("__transitionCallback"))return;const p=l("activeIndex"),c=l("__activeStep"),h=l("__activeElement");if(typeof p=="undefined"||typeof c=="undefined"||typeof l("activeIndex")=="undefined")return;const g=((r=c.popover)==null?void 0:r.onPrevClick)||d("onPrevClick");if(g)return g(h,c,{config:d(),state:l()});i()}function v(){var r;if(l("__transitionCallback"))return;const p=l("activeIndex"),c=l("__activeStep"),h=l("__activeElement");if(typeof p=="undefined"||typeof c=="undefined")return;const g=((r=c.popover)==null?void 0:r.onNextClick)||d("onNextClick");if(g)return g(h,c,{config:d(),state:l()});n()}function f(){l("isInitialized")||(b("isInitialized",!0),document.body.classList.add("driver-active",d("animate")?"driver-fade":"driver-simple"),Oe(),O("overlayClick",t),O("escapePress",t),O("arrowLeftPress",a),O("arrowRightPress",v))}function s(r=0){var p,c,h,g,w,u,y,L;const E=d("steps");if(!E){console.error("No steps to drive through"),m();return}if(!E[r]){m();return}b("__activeOnDestroyed",document.activeElement),b("activeIndex",r);const x=E[r],C=E[r+1],_=E[r-1],P=((p=x.popover)==null?void 0:p.doneBtnText)||d("doneBtnText")||"Done",D=d("allowClose"),H=typeof((c=x.popover)==null?void 0:c.showProgress)!="undefined"?(h=x.popover)==null?void 0:h.showProgress:d("showProgress"),M=(((g=x.popover)==null?void 0:g.progressText)||d("progressText")||"{{current}} of {{total}}").replace("{{current}}",`${r+1}`).replace("{{total}}",`${E.length}`),k=((w=x.popover)==null?void 0:w.showButtons)||d("showButtons"),T=["next","previous",...D?["close"]:[]].filter(ue=>!(k!=null&&k.length)||k.includes(ue)),W=((u=x.popover)==null?void 0:u.onNextClick)||d("onNextClick"),I=((y=x.popover)==null?void 0:y.onPrevClick)||d("onPrevClick"),ce=((L=x.popover)==null?void 0:L.onCloseClick)||d("onCloseClick");Z(N($({},x),{popover:$({showButtons:T,nextBtnText:C?void 0:P,disableButtons:[..._?[]:["previous"]],showProgress:H,progressText:M,onNextClick:W||(()=>{C?s(r+1):m()}),onPrevClick:I||(()=>{s(r-1)}),onCloseClick:ce||(()=>{m()})},(x==null?void 0:x.popover)||{})}))}function m(r=!0){const p=l("__activeElement"),c=l("__activeStep"),h=l("__activeOnDestroyed"),g=d("onDestroyStarted");if(r&&g){const y=!p||(p==null?void 0:p.id)==="driver-dummy-element";g(y?void 0:p,c,{config:d(),state:l()});return}const w=(c==null?void 0:c.onDeselected)||d("onDeselected"),u=d("onDestroyed");if(document.body.classList.remove("driver-active","driver-fade","driver-simple"),qe(),je(),Re(),Te(),Ae(),Y(),p&&c){const y=p.id==="driver-dummy-element";w&&w(y?void 0:p,c,{config:d(),state:l()}),u&&u(y?void 0:p,c,{config:d(),state:l()})}h&&h.focus()}return{isActive:()=>l("isInitialized")||!1,refresh:S,drive:(r=0)=>{f(),s(r)},setConfig:V,setSteps:r=>{Y(),V(N($({},d()),{steps:r}))},getConfig:d,getState:l,getActiveIndex:()=>l("activeIndex"),isFirstStep:()=>l("activeIndex")===0,isLastStep:()=>{const r=d("steps")||[],p=l("activeIndex");return p!==void 0&&p===r.length-1},getActiveStep:()=>l("activeStep"),getActiveElement:()=>l("activeElement"),getPreviousElement:()=>l("previousElement"),getPreviousStep:()=>l("previousStep"),moveNext:n,movePrevious:i,moveTo:o,hasNextStep:()=>{const r=d("steps")||[],p=l("activeIndex");return p!==void 0&&r[p+1]},hasPreviousStep:()=>{const r=d("steps")||[],p=l("activeIndex");return p!==void 0&&r[p-1]},highlight:r=>{f(),Z(N($({},r),{popover:r.popover?$({showButtons:[],showProgress:!1,progressText:""},r.popover):void 0}))},destroy:()=>{m(!1)}}}const{t:B}=te(),{variables:K}=ye(),Je=e=>{const t=Ge({showProgress:!0,nextBtnText:B("common.nextLabel"),prevBtnText:B("common.prevLabel"),doneBtnText:B("common.doneLabel"),steps:[{element:`#${K.namespace}-menu`,popover:{title:B("common.menu"),description:B("common.menuDes"),side:"right"}},{element:`#${K.namespace}-tool-header`,popover:{title:B("common.tool"),description:B("common.toolDes"),side:"left"}},{element:`#${K.namespace}-tags-view`,popover:{title:B("common.tagsView"),description:B("common.tagsViewDes"),side:"bottom"}}]});return $({},t)},nt=xe({__name:"Guide",setup(e){const{t}=te(),{drive:n}=Je(),i=()=>{n()};return(o,a)=>{const v=Be("BaseButton");return be(),Ce(R(ge),{title:R(t)("guideDemo.guide"),message:R(t)("guideDemo.message")},{default:X(()=>[_e(v,{type:"primary",onClick:i},{default:X(()=>[Le(Ee(R(t)("guideDemo.start")),1)]),_:1})]),_:1},8,["title","message"])}}});export{nt as default};