import{d as Ot,a as Rt,b as Mt,w as P,e as D,f as mt,i as V,h as ot,k as Dt,l as Vt,F as Ft,g as bt}from"./index-DgJA1iiK.js";/*! * Intro.js v7.2.0 * https://introjs.com * * Copyright (C) 2012-2023 Afshin Mehrabani (@afshinmeh). * https://introjs.com * * Date: Mon, 14 Aug 2023 19:47:14 GMT */function Z(t){return Z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(t)}function m(t,e,n,o){return new(n||(n=Promise))(function(i,r){function s(p){try{c(o.next(p))}catch(l){r(l)}}function a(p){try{c(o.throw(p))}catch(l){r(l)}}function c(p){var l;p.done?i(p.value):(l=p.value,l instanceof n?l:new n(function(u){u(l)})).then(s,a)}c((o=o.apply(t,[])).next())})}function b(t,e){var n,o,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(c){return function(p){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(s=0)),s;)try{if(n=1,o&&(i=2&l[0]?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,o=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!((i=i.length>0&&i[i.length-1])||l[0]!==6&&l[0]!==2)){s=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]=0&&c.left>=0&&c.bottom+80<=window.innerHeight&&c.right<=window.innerWidth}(o))){var s=lt().height;r.bottom-(r.bottom-r.top)<0||o.clientHeight>s?window.scrollBy(0,r.top-(s/2-r.height/2)-n):window.scrollBy(0,r.top-(s/2-r.height/2)+n)}}function G(t){t.setAttribute("role","button"),t.tabIndex=0}function Q(t){var e=t.parentElement;return!(!e||e.nodeName==="HTML")&&(at(t,"position")==="fixed"||Q(e))}function B(t,e){var n=document.body,o=document.documentElement,i=window.pageYOffset||o.scrollTop||n.scrollTop,r=window.pageXOffset||o.scrollLeft||n.scrollLeft;e=e||n;var s=t.getBoundingClientRect(),a=e.getBoundingClientRect(),c=at(e,"position"),p={width:s.width,height:s.height};return e.tagName.toLowerCase()!=="body"&&c==="relative"||c==="sticky"?Object.assign(p,{top:s.top-a.top,left:s.left-a.left}):Q(t)?Object.assign(p,{top:s.top,left:s.left}):Object.assign(p,{top:s.top+i,left:s.left+r})}function ct(t,e){if(t instanceof SVGElement){var n=t.getAttribute("class")||"";t.setAttribute("class",n.replace(e,"").replace(/^\s+|\s+$/g,""))}else t.className=t.className.replace(e,"").replace(/^\s+|\s+$/g,"")}function E(t,e){var n="";if(t.style.cssText&&(n+=t.style.cssText),typeof e=="string")n+=e;else for(var o in e)n+="".concat(o,":").concat(e[o],";");t.style.cssText=n}function N(t,e,n){if(n&&e){var o=B(e.element,t._targetElement),i=t._options.helperElementPadding;e.element instanceof Element&&Q(e.element)?A(n,"introjs-fixedTooltip"):ct(n,"introjs-fixedTooltip"),e.position==="floating"&&(i=0),E(n,{width:"".concat(o.width+i,"px"),height:"".concat(o.height+i,"px"),top:"".concat(o.top-i/2,"px"),left:"".concat(o.left-i/2,"px")})}}function Y(t,e,n,o,i){return t.left+e+n.width>o.width?(i.style.left="".concat(o.width-n.width-t.left,"px"),!1):(i.style.left="".concat(e,"px"),!0)}function $(t,e,n,o){return t.left+t.width-e-n.width<0?(o.style.left="".concat(-t.left,"px"),!1):(o.style.right="".concat(e,"px"),!0)}function j(t,e){t.includes(e)&&t.splice(t.indexOf(e),1)}function zt(t,e,n,o){var i=t.slice(),r=lt(),s=B(n).height+10,a=B(n).width+20,c=e.getBoundingClientRect(),p="floating";if(c.bottom+s>r.height&&j(i,"bottom"),c.top-s<0&&j(i,"top"),c.right+a>r.width&&j(i,"right"),c.left-a<0&&j(i,"left"),o&&(o=o.split("-")[0]),i.length&&(p=i[0],i.includes(o)&&(p=o)),p==="top"||p==="bottom"){var l=void 0,u=[];p==="top"?(l="top-middle-aligned",u=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(l="bottom-middle-aligned",u=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),p=function(h,v,_,w){var y=v/2,k=Math.min(_,window.screen.width);return k-ha.height?(o.className="introjs-arrow left-bottom",n.style.top="-".concat(r.height-s.height-20,"px")):o.className="introjs-arrow left";break;case"left":i||t._options.showStepNumbers!==!0||(n.style.top="15px"),s.top+r.height>a.height?(n.style.top="-".concat(r.height-s.height-20,"px"),o.className="introjs-arrow right-bottom"):o.className="introjs-arrow right",n.style.right="".concat(s.width+20,"px");break;case"floating":o.style.display="none",n.style.left="50%",n.style.top="50%",n.style.marginLeft="-".concat(r.width/2,"px"),n.style.marginTop="-".concat(r.height/2,"px");break;case"bottom-right-aligned":o.className="introjs-arrow top-right",$(s,u=0,r,n),n.style.top="".concat(s.height+20,"px");break;case"bottom-middle-aligned":o.className="introjs-arrow top-middle",i&&(l+=5),$(s,l,r,n)&&(n.style.right="",Y(s,l,r,a,n)),n.style.top="".concat(s.height+20,"px");break;default:o.className="introjs-arrow top",Y(s,0,r,a,n),n.style.top="".concat(s.height+20,"px")}}}function kt(){for(var t=0,e=Array.from(document.querySelectorAll(".introjs-showElement"));t a.active"),ft=C.querySelector('.introjs-bullets li > a[data-step-number="'.concat(S.step,'"]'));M&&ft&&(M.className="",ft.className="active")}}(t._options.showBullets,o,e),xt(o,t._currentStep,t._introItems.length),h.style.opacity="1",(r!=null&&/introjs-donebutton/gi.test(r.className)||r!=null)&&r.focus(),_t(t._options.scrollToElement,e.scrollTo,t._options.scrollPadding,e.element,p)},350)):(v=f("div",{className:i}),_=f("div",{className:"introjs-tooltipReferenceLayer"}),w=f("div",{className:"introjs-arrow"}),y=f("div",{className:"introjs-tooltip"}),k=f("div",{className:"introjs-tooltiptext"}),I=f("div",{className:"introjs-tooltip-header"}),O=f("h1",{className:"introjs-tooltip-title"}),q=f("div"),E(v,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(t._options.overlayOpacity.toString(),") 0 0 0 5000px")}),vt(t._options.scrollToElement,e.element),N(t,e,v),N(t,e,_),yt(t._targetElement,v,!0),yt(t._targetElement,_),k.innerHTML=e.intro,O.innerHTML=e.title,q.className="introjs-tooltipbuttons",t._options.showButtons===!1&&(q.style.display="none"),I.appendChild(O),y.appendChild(I),y.appendChild(k),t._options.dontShowAgain&&(z=f("div",{className:"introjs-dontShowAgain"}),(ht=f("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(d){t.setDontShowAgain(d.target.checked)},(dt=f("label",{htmlFor:"introjs-dontShowAgain"})).innerText=t._options.dontShowAgainLabel,z.appendChild(ht),z.appendChild(dt),y.appendChild(z)),y.appendChild(At(t,e)),y.appendChild(function(d){var C=f("div");C.className="introjs-progress",d._options.showProgress===!1&&(C.style.display="none");var S=f("div",{className:"introjs-progressbar"});d._options.progressBarAdditionalClass&&(S.className+=" "+d._options.progressBarAdditionalClass);var M=jt(d._currentStep,d._introItems.length);return S.setAttribute("role","progress"),S.setAttribute("aria-valuemin","0"),S.setAttribute("aria-valuemax","100"),S.setAttribute("aria-valuenow",M.toString()),S.style.cssText="width:".concat(M,"%;"),C.appendChild(S),C}(t)),W=f("div"),t._options.showStepNumbers===!0&&(W.className="introjs-helperNumberLayer",W.innerHTML="".concat(e.step," ").concat(t._options.stepNumbersOfLabel," ").concat(t._introItems.length),y.appendChild(W)),y.appendChild(w),_.appendChild(y),(r=f("a")).onclick=function(){return m(nt,void 0,void 0,function(){return b(this,function(d){switch(d.label){case 0:return t._introItems.length-1===t._currentStep?[3,2]:[4,T(t)];case 1:return d.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(r.className)?g(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"done")]:[3,4]:[3,6];case 3:d.sent(),d.label=4;case 4:return[4,L(t,t._targetElement)];case 5:d.sent(),d.label=6;case 6:return[2]}})})},G(r),r.innerHTML=t._options.nextLabel,(s=f("a")).onclick=function(){return m(nt,void 0,void 0,function(){return b(this,function(d){switch(d.label){case 0:return t._currentStep>0?[4,K(t)]:[3,2];case 1:d.sent(),d.label=2;case 2:return[2]}})})},G(s),s.innerHTML=t._options.prevLabel,G(a=f("a",{className:"introjs-skipbutton"})),a.innerHTML=t._options.skipLabel,a.onclick=function(){return m(nt,void 0,void 0,function(){return b(this,function(d){switch(d.label){case 0:return t._introItems.length-1===t._currentStep&&g(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"skip")]:[3,2];case 1:d.sent(),d.label=2;case 2:return g(t._introSkipCallback)?[4,t._introSkipCallback.call(t,t._currentStep)]:[3,4];case 3:d.sent(),d.label=4;case 4:return[4,L(t,t._targetElement)];case 5:return d.sent(),[2]}})})},I.appendChild(a),t._introItems.length>1&&q.appendChild(s),q.appendChild(r),y.appendChild(q),J(t,e,y,w),_t(t._options.scrollToElement,e.scrollTo,t._options.scrollPadding,e.element,y)),(U=t._targetElement.querySelector(".introjs-disableInteraction"))&&U.parentNode&&U.parentNode.removeChild(U),e.disableInteraction&&function(d,C){var S=document.querySelector(".introjs-disableInteraction");S===null&&(S=f("div",{className:"introjs-disableInteraction"}),d._targetElement.appendChild(S)),N(d,C,S)}(t,e),t._currentStep===0&&t._introItems.length>1?(r!=null&&(r.className="".concat(t._options.buttonClass," introjs-nextbutton"),r.innerHTML=t._options.nextLabel),t._options.hidePrev===!0?(s!=null&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton introjs-hidden")),r!=null&&A(r,"introjs-fullbutton")):s!=null&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton introjs-disabled"))):t._introItems.length-1===t._currentStep||t._introItems.length===1?(s!=null&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton")),t._options.hideNext===!0?(r!=null&&(r.className="".concat(t._options.buttonClass," introjs-nextbutton introjs-hidden")),s!=null&&A(s,"introjs-fullbutton")):r!=null&&(t._options.nextToDone===!0?(r.innerHTML=t._options.doneLabel,A(r,"".concat(t._options.buttonClass," introjs-nextbutton introjs-donebutton"))):r.className="".concat(t._options.buttonClass," introjs-nextbutton introjs-disabled"))):(s!=null&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton")),r!=null&&(r.className="".concat(t._options.buttonClass," introjs-nextbutton"),r.innerHTML=t._options.nextLabel)),s!=null&&s.setAttribute("role","button"),r!=null&&r.setAttribute("role","button"),a!=null&&a.setAttribute("role","button"),r!=null&&r.focus(),function(d){A(d,"introjs-showElement");var C=at(d,"position");C!=="absolute"&&C!=="relative"&&C!=="sticky"&&C!=="fixed"&&A(d,"introjs-relativePosition")}(e.element),g(t._introAfterChangeCallback)?[4,t._introAfterChangeCallback.call(t,e.element)]:[3,4];case 3:R.sent(),R.label=4;case 4:return[2]}})})}function Wt(t,e){return m(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return t._currentStep=e-2,t._introItems===void 0?[3,2]:[4,T(t)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function Ut(t,e){return m(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return t._currentStepNumber=e,t._introItems===void 0?[3,2]:[4,T(t)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function T(t){return m(this,void 0,void 0,function(){var e,n,o;return b(this,function(i){switch(i.label){case 0:if(t._direction="forward",t._currentStepNumber!==void 0)for(e=0;e=0&&(t._hintsAutoRefreshFunction=(p=function(){return et(t)},l=t._options.hintAutoRefreshInterval,function(){for(var h=[],v=0;v0)for(n=0,o=t._options.hints;n0&&(o[h-1]={step:h,element:u,title:u.getAttribute("data-title")||"",intro:u.getAttribute("data-intro")||"",tooltipClass:u.getAttribute("data-tooltip-class")||void 0,highlightClass:u.getAttribute("data-highlight-class")||void 0,position:u.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:u.getAttribute("data-scroll-to")||t._options.scrollTo,disableInteraction:c})}}for(var v=0,_=0,w=n;_{st().setOptions({steps:e}).start()},i=()=>{n.value=!0};return(r,s)=>{const a=D("el-link"),c=D("el-button"),p=D("el-tour-step"),l=D("el-tour"),u=D("el-card");return mt(),Mt(u,{shadow:"never"},{header:P(()=>[Jt,V(a,{class:"mt-2",href:"https://github.com/pure-admin/vue-pure-admin/blob/main/src/views/guide/index.vue",target:"_blank"},{default:P(()=>[ot(" 代码位置 src/views/guide/index.vue ")]),_:1})]),default:P(()=>[V(c,{onClick:o},{default:P(()=>[ot(" 打开引导页 (intro.js) ")]),_:1}),V(c,{onClick:i},{default:P(()=>[ot(" 打开引导页 (el-tour) ")]),_:1}),V(l,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=h=>n.value=h)},{default:P(()=>[(mt(),Dt(Ft,null,Vt(e,h=>V(p,{key:h.title,target:()=>h.element,title:h.title,description:h.intro,placement:h.position},null,8,["target","title","description","placement"])),64))]),_:1},8,["modelValue"])]),_:1})}}});export{Qt as default};