@axceera/playstep 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/loader.js +1 -1
- package/dist/cdn/ui.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sdk-uFgPUdIh.js +1 -0
- package/dist/ui-DBJLPgG5.js +1 -0
- package/package.json +3 -3
- package/dist/sdk-Bpu8YvQu.js +0 -1
- package/dist/ui-CBp6e2ts.js +0 -1
package/dist/cdn/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){let e=e=>e.length>1?e.replace(/\/+$/,""):e;function t(t,n){return!!t&&void 0!==n&&(r=e(t),RegExp(`^${r.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")}$`)).test(e(n));var r}function n(e){let n,r,{config:i,platform:s}=e,a=e.progress??{seen:!1,guides:{}},o=e.traits??{},p=null,u=i.flags||{},
|
|
1
|
+
!function(){let e=e=>e.length>1?e.replace(/\/+$/,""):e;function t(t,n){return!!t&&void 0!==n&&(r=e(t),RegExp(`^${r.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")}$`)).test(e(n));var r}function n(e){let n,r,{config:i,platform:s}=e,a=e.progress??{seen:!1,guides:{}},o=e.traits??{},p=null,u=new Set,c=i.flags||{},d=(i.guides??[]).filter(e=>e.spec_version<=3&&(e.targeting?.platforms??["web"]).includes(s)),l=e=>d.find(t=>t.id===e),g=(e,t,n)=>({type:e,guide_id:t.id,guide_version:t.version,...n>=0&&{step_id:t.steps[n].id,step_index:n}}),h=e=>!c.disabled&&(!c.paused_for_new_users||a.seen)&&function(e,t){return(e??[]).every(e=>{let n=t[e.trait];return"exists"===e.op?null!=n:"in"===e.op?Array.isArray(e.value)&&e.value.includes(n):n===e.value==("eq"===e.op)})}(e.targeting?.segments,o),f=(e,t,n)=>{a.guides[e.id]={version:e.version,step:n,status:t}},m=e=>t(e.path,r),y=e=>t(e.skip_if_on,r)||m(e.complete_on),v=(e,t,r)=>{for(;t<e.steps.length;){if(p={guide:e,index:t,status:"running"},n=void 0,f(e,"running",t),r.push(g("step_shown",e,t)),!y(e.steps[t]))return r;r.push(g("step_completed",e,t++))}return p={guide:e,index:--t,status:"completed"},f(e,"done",t),r.push(g("guide_completed",e)),r},_=(e,t)=>(a.seen=!0,v(e,t,[g("guide_shown",e)])),w=()=>{let e=p;return p=null,"running"===e?.status?(f(e.guide,"dismissed",e.index),[g("guide_dismissed",e.guide,e.index)]):[]},x=()=>{let e=p;return v(e.guide,e.index+1,[g("step_completed",e.guide,e.index)])},$=e=>{let t=d.find(t=>(e=>{let t=a.guides[e.id];return!p&&!u.has(e.id)&&h(e)&&(!t||"done"!==t.status&&("running"===t.status||!e.trigger.once))})(t)&&e(t));return t?_(t,0):[]},S=()=>(u.clear(),$(e=>"first_visit"===e.trigger.type||m(e.trigger)));return{get active(){return p},progress:a,dispatch:function(e){let t="running"===p?.status?p.guide.steps[p.index]:null;switch(e.type){case"init":{r=e.path;let t=d.find(e=>"running"===a.guides[e.id]?.status&&h(e));if(t){let e=a.guides[t.id];return _(t,e.version===t.version?e.step:0)}return S()}case"page_view":return r=e.path,t&&y(t)?x():$(e=>m(e.trigger));case"reset_progress":{let t="string"==typeof e.guide&&l(e.guide);return void 0===t?[]:((!t||p?.guide===t)&&(p=null),t?delete a.guides[t.id]:a.guides={},[{type:"progress_reset",guide_id:t?t.id:void 0},...S()])}case"event":return"event"===t?.complete_on.type&&t.complete_on.name===e.name?x():$(t=>"event"===t.trigger.type&&t.trigger.name===e.name);case"tap":return"tap_anchor"===t?.complete_on.type&&t.anchor===e.anchor?x():[];case"complete":return t?.id===e.step?x():[];case"next":return"next_button"===t?.complete_on.type?x():[];case"back":return t&&0!==p.index?(p={...p,index:p.index-1},f(p.guide,"running",p.index),[g("step_shown",p.guide,p.index)]):[];case"hide":return t&&(u.add(p.guide.id),p=null),[];case"close":if("completed"!==p?.status)return[];case"dismiss":return w();case"start":{let n=l(e.guide);return!n||!h(n)||t&&p.guide===n&&n.steps.slice(0,p.index).every(y)?[]:w().concat(_(n,0))}case"anchor_missing":return t&&t.anchor===e.anchor&&n!==e.anchor?(n=e.anchor,[{...g("anchor_missing",p.guide,p.index),anchor:e.anchor}]):[];case"identify":return o={...o,...e.traits},[]}},launcherGuides:()=>d.filter(e=>!1!==e.launcher&&h(e))}}let r={get(e){try{return JSON.parse(localStorage.getItem(`playstep:${e}`))}catch{return null}},set(e,t){try{localStorage.setItem(`playstep:${e}`,JSON.stringify(t))}catch{}}},i="playstep_preview",s=document.currentScript;function a(e,t){return new Promise((n,r)=>{document.head.append(Object.assign(document.createElement("script"),{src:new URL(`${e}.js`,s?.src||location.href).href,integrity:t,crossOrigin:"anonymous",onload:()=>n(window[`__playstep_${e}`]),onerror:()=>r(Error(e))}))})}let o=()=>a("launcher","sha256-cRfLn8IceaWlkTL1lnFJJcmfAe8YUXJAr1fXQpdkb8U="),p=function(e,t,s,a="web"){let o,p,u,c,d,l,g,h={},f=[],m=[],y=()=>`p:${o.appKey}`,v=()=>o.preview||r.set(y(),p.progress),_=e=>{let t={...e,ts:Date.now()};o?.preview||(c?c.send(t):m.push(t)),o?.onEvent?.(t)},w=e=>{try{_({type:"sdk_error",message:String(e)})}catch{}},x=e=>(...t)=>{try{e(...t)}catch(e){w(e)}},$=(e,t)=>x(n=>S({type:e,[t]:n}));function S(e){if(!p)return void f.push(e);let t=p.dispatch(e);v(),t.forEach(x(_)),(p.active||r.get("q"))&&E(),c?.update()}function b(){return l??(l=document.body.appendChild(document.createElement("playstep-root")).attachShadow({mode:"open"}))}function E(){return d??(d=e().then(e=>{let t=b();return t.innerHTML="",c=e.mount({engine:p,config:u,options:o,root:t,outbox:m,userId:()=>g,dispatch:x(S),emit:x(_)})}).catch(w))}let L,I=x((e={})=>{p?p.launcherGuides().length&&E().then(t=>t?.openLauncher(e.anchor)):L=e});function k(e){e.launcher?.enabled&&p.launcherGuides().length&&!d&&t&&t().then(t=>{d||t.drawLauncher(b(),p,e,I,o)}).catch(w)}return{version:"0.5.1",init:x(e=>{if(o||!e?.appKey)return;o={...e};let t=()=>setTimeout(()=>async function(){let e=o,t=(e.apiBase??"https://cdn.playstep.app").replace(/\/$/,""),c=null;try{c=new URLSearchParams(location.search).get(i)||(e.config?null:sessionStorage.getItem(i))}catch{}e.preview||(e.preview=!(!e.config&&!c));let d=e.config;try{d??(d=await fetch(`${t}/v1/${c?`preview/${c}?key=`:"config/"}${e.appKey}`).then(e=>e.json()))}catch{return}try{c&&sessionStorage[d.guides?"setItem":"removeItem"](i,c)}catch{}if(d?.capture)s?.().then(t=>t.start(d.capture,e.appKey)).catch(w);else if(d?.guides&&!d.flags?.disabled&&(u=d,e.eventsUrl=d.ingest_url??`${t}/v1/events`,p=n({config:d,platform:a,progress:e.preview?void 0:r.get(y())??void 0,traits:h}),S({type:"init",path:location.pathname}),f.splice(0).forEach(S),L&&I(L),k(d),!1!==e.autoPageViews)){let e=location.pathname,t=x(()=>location.pathname!==e&&S({type:"page_view",path:e=location.pathname}));for(let e of["pushState","replaceState"]){let n=history[e];history[e]=function(...e){n.apply(this,e),t()}}addEventListener("popstate",t)}}().catch(w));"complete"===document.readyState?t():addEventListener("load",t)}),identify:x((e,t)=>{g=e,h={...h,...t},S({type:"identify",traits:h})}),track:$("event","name"),start:$("start","guide"),complete:$("complete","step"),page:x(e=>S({type:"page_view",path:e??location.pathname})),openLauncher:I,resetProgress:$("reset_progress","guide"),reset:x(()=>{S({type:"dismiss"}),g=void 0,h={},p&&(Object.assign(p.progress,{seen:!1,guides:{}}),v(),c?.update()),o?.preview||r.set("d",null)})}}(()=>a("ui","sha256-q52Zx88PiNnSHb1HIMsZjxOEk0d05jUONpKu/oxaH9U="),o,()=>o().then(e=>a("capture",e.captureIntegrity)));if(!window.playstep){window.playstep=p;let e=s?.dataset;e?.appKey&&p.init({appKey:e.appKey,apiBase:e.api,locale:e.locale})}}();
|
package/dist/cdn/ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __playstep_ui=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});let t=Math.min,n=Math.max,r=Math.round,i=e=>({x:e,y:e}),o={left:"right",right:"left",bottom:"top",top:"bottom"};function a(e,r,i){return n(e,t(r,i))}function l(e,t){return"function"==typeof e?e(t):e}function s(e){return e.split("-")[0]}function c(e){return e.split("-")[1]}function p(e){return"x"===e?"y":"x"}function d(e){return"y"===e?"height":"width"}function u(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function f(e){return p(u(e))}function _(e,t,n){void 0===n&&(n=!1);let r=c(e),i=f(e),o=d(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=w(a)),[a,w(a)]}function h(e){let t=w(e);return[g(e),t,g(t)]}function g(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let m=["left","right"],x=["right","left"],v=["top","bottom"],y=["bottom","top"];function b(e,t,n,r){let i=c(e),o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?x:m:t?m:x;case"left":case"right":return t?v:y;default:return[]}}(s(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(g)))),o}function w(e){let t=s(e);return o[t]+e.slice(t.length)}function k(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function S(e,t,n){let r,{reference:i,floating:o}=e,a=u(t),l=f(t),p=d(l),_=s(t),h="y"===a,g=i.x+i.width/2-o.width/2,m=i.y+i.height/2-o.height/2,x=i[p]/2-o[p]/2;switch(_){case"top":r={x:g,y:i.y-o.height};break;case"bottom":r={x:g,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:m};break;case"left":r={x:i.x-o.width,y:m};break;default:r={x:i.x,y:i.y}}let v=c(t);return v&&(r[l]+=x*("end"===v?1:-1)*(n&&h?-1:1)),r}async function L(e,t){void 0===t&&(t={});let{x:n,y:r,platform:i,rects:o,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:u=!1,padding:f=0}=l(t,e),_=function(e){return"number"==typeof e?{top:e,right:e,bottom:e,left:e}:function(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}(e)}(f),h=a[u?"floating"===d?"reference":"floating":d],g=k(await i.getClippingRect({element:await(null==i.isElement?void 0:i.isElement(h))??!0?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:p,strategy:s})),m="floating"===d?{x:n,y:r,width:o.floating.width,height:o.floating.height}:o.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},y=k(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:x,strategy:s}):m);return{top:(g.top-y.top+_.top)/v.y,bottom:(y.bottom-g.bottom+_.bottom)/v.y,left:(g.left-y.left+_.left)/v.x,right:(y.right-g.right+_.right)/v.x}}let C=new Set(["left","top"]);async function T(e,t){let{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=s(n),p=c(n),d="y"===u(n),f=C.has(a)?-1:1,_=o&&d?-1:1,h=l(t,e),{mainAxis:g,crossAxis:m,alignmentAxis:x}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return p&&"number"==typeof x&&(m="end"===p?-1*x:x),d?{x:m*_,y:g*f}:{x:g*f,y:m*_}}function M(){return typeof window<"u"}function E(e){return $(e)?(e.nodeName||"").toLowerCase():"#document"}function R(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){return(($(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function $(e){return!!M()&&(e instanceof Node||e instanceof R(e).Node)}function A(e){return!!M()&&(e instanceof Element||e instanceof R(e).Element)}function H(e){return!!M()&&(e instanceof HTMLElement||e instanceof R(e).HTMLElement)}function D(e){return!(!M()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof R(e).ShadowRoot)}function F(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}function N(e){return/^(table|td|th)$/.test(E(e))}function O(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}let z,W=/transform|translate|scale|rotate|perspective|filter/,U=/paint|layout|strict|content/,B=e=>!!e&&"none"!==e;function I(e){let t=A(e)?q(e):e;return B(t.transform)||B(t.translate)||B(t.scale)||B(t.rotate)||B(t.perspective)||!j()&&(B(t.backdropFilter)||B(t.filter))||W.test(t.willChange||"")||U.test(t.contain||"")}function j(){return z??(z=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),z}function V(e){return/^(html|body|#document)$/.test(E(e))}function q(e){return R(e).getComputedStyle(e)}function K(e){return A(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if("html"===E(e))return e;let t=e.assignedSlot||e.parentNode||D(e)&&e.host||P(e);return D(t)?t.host:t}function X(e){let t=G(e);return V(t)?(e.ownerDocument||e).body:H(t)&&F(t)?t:X(t)}function Y(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!0);let r=X(e),i=r===e.ownerDocument?.body,o=R(r);if(i){let e=J(o);return t.concat(o,o.visualViewport||[],F(r)?r:[],e&&n?Y(e):[])}return t.concat(r,Y(r,[],n))}function J(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Q(e){let t=q(e),n=parseFloat(t.width)||0,i=parseFloat(t.height)||0,o=H(e),a=o?e.offsetWidth:n,l=o?e.offsetHeight:i,s=r(n)!==a||r(i)!==l;return s&&(n=a,i=l),{width:n,height:i,$:s}}function Z(e){return A(e)?e:e.contextElement}function ee(e){let t=Z(e);if(!H(t))return i(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:l}=Q(t),s=(l?r(n.width):n.width)/o,c=(l?r(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}let te=i(0);function ne(e){let t=R(e);return j()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:te}function re(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),a=Z(e),l=i(1);t&&(r?A(r)&&(l=ee(r)):l=ee(e));let s=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===R(e)}(a,n,r)?ne(a):i(0),c=(o.left+s.x)/l.x,p=(o.top+s.y)/l.y,d=o.width/l.x,u=o.height/l.y;if(a&&r){let e=R(a),t=A(r)?R(r):r,n=e,i=J(n);for(;i&&t!==n;){let e=ee(i),t=i.getBoundingClientRect(),r=q(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,p*=e.y,d*=e.x,u*=e.y,c+=o,p+=a,n=R(i),i=J(n)}}return k({width:d,height:u,x:c,y:p})}function ie(e,t){let n=K(e).scrollLeft;return t?t.left+n:re(P(e)).left+n}function oe(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ie(e,n),y:n.top+t.scrollTop}}function ae(e){let t=K(e),r=e.ownerDocument.body,i=n(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=n(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),a=-t.scrollLeft+ie(e),l=-t.scrollTop;return"rtl"===q(r).direction&&(a+=n(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}function le(e,t,n){let r;if("viewport"===t||"layoutViewport"===t)r=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,i=R(e),o=P(e),a=i.visualViewport,l=o.clientWidth,s=o.clientHeight,c=0,p=0;if(a){let e=!j()||"fixed"===t;r?e||(c=-a.offsetLeft,p=-a.offsetTop):(l=a.width,s=a.height,e&&(c=a.offsetLeft,p=a.offsetTop))}if(ie(o)<=0){let e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(o.clientWidth-t.clientWidth-r),a="stable both-edges"===getComputedStyle(o).scrollbarGutter?i/2:i;a<=25&&(l-=a)}return{width:l,height:s,x:c,y:p}}(e,n,t);else if("document"===t)r=ae(P(e));else if(A(t))r=function(e,t){let n=re(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=ee(e);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let n=ne(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return k(r)}function se(e,t){let n=t.get(e);if(n)return n;let r=Y(e,[],!1).filter(e=>A(e)&&"body"!==E(e)),i=null,o="fixed"===q(e).position,a=o?G(e):e;for(;A(a)&&!V(a);){let e=q(a),t=I(a),n=i?i.position:o?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?i=e:r=r.filter(e=>e!==a),a=G(a)}return t.set(e,r),r}function ce(e,t,n){let r=H(t),o=P(t),a="fixed"===n,l=re(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=i(0);if((r||!a)&&(("body"!==E(t)||F(o))&&(s=K(t)),r)){let e=re(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&o&&(c.x=ie(o));let p=!o||r||a?i(0):oe(o,s);return{x:l.left+s.scrollLeft-c.x-p.x,y:l.top+s.scrollTop-c.y-p.y,width:l.width,height:l.height}}function pe(e){return"static"===q(e).position}function de(e,t){if(!H(e)||"fixed"===q(e).position)return null;if(t)return t(e);let n=e.offsetParent;return P(e)===n&&(n=n.ownerDocument.body),n}function ue(e,t){let n=R(e);if(O(e))return n;if(!H(e)){let t=G(e);for(;t&&!V(t);){if(A(t)&&!pe(t))return t;t=G(t)}return n}let r=de(e,t);for(;r&&N(r)&&pe(r);)r=de(r,t);return r&&V(r)&&pe(r)&&!I(r)?n:r||function(e){let t=G(e);for(;H(t)&&!V(t);){if(I(t))return t;if(O(t))return null;t=G(t)}return null}(e)||n}let fe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,a="fixed"===o,l=P(r),s=!!t&&O(t.floating);if(r===l||s&&a)return n;let c={scrollLeft:0,scrollTop:0},p=i(1),d=i(0),u=H(r);if((u||!a)&&(("body"!==E(r)||F(l))&&(c=K(r)),u)){let e=re(r);p=ee(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let f=!l||u||a?i(0):oe(l,c);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-c.scrollLeft*p.x+d.x+f.x,y:n.y*p.y-c.scrollTop*p.y+d.y+f.y}},getDocumentElement:P,getClippingRect:function(e){let{element:r,boundary:i,rootBoundary:o,strategy:a}=e,l=[..."clippingAncestors"===i?O(r)?[]:se(r,this._c):[].concat(i),o],s=le(r,l[0],a),c=s.top,p=s.right,d=s.bottom,u=s.left;for(let e=1;e<l.length;e++){let i=le(r,l[e],a);c=n(i.top,c),p=t(i.right,p),d=t(i.bottom,d),u=n(i.left,u)}return{width:p-u,height:d-c,x:u,y:c}},getOffsetParent:ue,getElementRects:async function(e){let t=this.getOffsetParent||ue,n=this.getDimensions,r=await n(e.floating);return{reference:ce(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=Q(e);return{width:t,height:n}},getScale:ee,isElement:A,isRTL:function(e){return"rtl"===q(e).direction}},_e=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n;let{x:r,y:i,placement:o,middlewareData:a}=t,l=await T(t,e);return o===a.offset?.placement&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:o}}}}},he=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:d={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...f}=l(e,t),_={x:n,y:r},h=await o.detectOverflow(t,f),g=u(i),m=p(g),x=_[m],v=_[g],y=(e,t)=>a(t+h["y"===e?"top":"left"],t,t-h["y"===e?"bottom":"right"]);s&&(x=y(m,x)),c&&(v=y(g,v));let b=d.fn({...t,[m]:x,[g]:v});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:s,[g]:c}}}}}},ge=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:c,elements:p}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:v=!0,...y}=l(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};let k=s(r),S=u(a),L=s(a)===a,C=await(null==c.isRTL?void 0:c.isRTL(p.floating)),T=g||(L||!v?[w(a)]:h(a)),M="none"!==x;!g&&M&&T.push(...b(a,v,x,C));let E=[a,...T],R=await c.detectOverflow(t,y),P=[],$=i.flip?.overflows||[];if(d&&P.push(R[k]),f){let e=_(r,o,C);P.push(R[e[0]],R[e[1]])}if($=[...$,{placement:r,overflows:P}],!P.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=E[e];if(t&&("alignment"!==f||S===u(t)||$.every(e=>u(e.placement)!==S||e.overflows[0]>0)))return{data:{index:e,overflows:$},reset:{placement:t}};let n=$.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(m){case"bestFit":{let e=$.filter(e=>{if(M){let t=u(e.placement);return t===S||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},me=(e,t,n)=>{let r=new Map,i=n??{},o={...fe,...i.platform,_c:r};return(async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:L},s=await(null==a.isRTL?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:d}=S(c,r,s),u=r,f=0,_={};for(let n=0;n<o.length;n++){let h=o[n];if(!h)continue;let{name:g,fn:m}=h,{x:x,y:v,data:y,reset:b}=await m({x:p,y:d,initialPlacement:r,placement:u,strategy:i,middlewareData:_,rects:c,platform:l,elements:{reference:e,floating:t}});p=x??p,d=v??d,_[g]={..._[g],...y},b&&f<50&&(f++,"object"==typeof b&&(b.placement&&(u=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:p,y:d}=S(c,u,s))),n=-1)}return{x:p,y:d,placement:u,strategy:i,middlewareData:_}})(e,t,{...i,platform:o})};var xe,ve,ye,be,we,ke,Se,Le,Ce,Te,Me={},Ee=[],Re=/^m(i|n|o|s|text|space)$/,Pe=Array.isArray,$e=Ee.slice,Ae=Object.assign;function He(e){e&&e.parentNode&&e.remove()}function De(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i||++ve,__i:-1,__u:0};return!i&&xe.vnode&&xe.vnode(o),o}function Fe(e){return e.children}function Ne(e,t){this.props=e,this.context=t,this.__g=0}function Oe(e,t){if(null==t)return e.__?Oe(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])&&n.__e)return n.__e;return"function"!=typeof e.type||e.props.__P?null:Oe(e)}function ze(e){if((e=e.__)&&e.__c&&!e.props.__P)return e.__e=null,e.__k.some(function(t){return t&&(e.__e=t.__e)}),ze(e)}function We(e){(8&e.__g||!(e.__g|=8)||!ye.push(e)||we++)&&be==xe.debounceRendering||((be=xe.debounceRendering)||queueMicrotask)(Ue)}function Ue(){var e,t,n,r,i,o,a,l,s;try{for(t=1;ye.length;)ye.length>t&&ye.sort(ke),e=ye.shift(),t=ye.length,8&e.__g&&(r=void 0,i=void 0,o=(i=(n=e).__v).__e,a=[],l=[],(s=n.__P)&&((r=Ae({constructor:void 0},i)).__v=i.__v+1,xe.vnode&&xe.vnode(r),Ke(s,r,i,n.__n,s.namespaceURI,32&i.__u?[o]:null,a,o||Oe(i),32&i.__u,l),r.__v=i.__v,r.__.__k[r.__i]=r,Xe(a,r,l),i.__=i.__e=null,r.__e!=o&&ze(r)))}finally{ye.length=we=0}}function Be(e,t,n,r,i,o,a,l,s,c,p){var d,u,f,_,h,g,m=r.__k||Ee,x=t.length;for(s=function(e,t,n,r,i){var o,a,l,s,c,p,d,u,f,_,h=n.length,g=h,m=0,x=!1,v=e.__k=Array(i);for(o=0;o<i;o++)null!=(a=t[o])&&"boolean"!=typeof a&&"function"!=typeof a?("object"!=typeof a||a.constructor==String?a=v[o]=De(null,a):Pe(a)?a=v[o]=De(Fe,{children:a}):void 0===a.constructor&&a.__b?a=v[o]=De(a.type,a.props,a.key,a.ref,a.__v):v[o]=a,s=o+m,a.__=e,a.__b=e.__b+1,l=null,~(c=a.__i=je(a,n,s,g))&&(g--,(l=n[c])&&(l.__u|=2)),l&&l.__v?(a.__u|=2,c==s-1?m--:c==s+1?m++:c!=s&&(c>s?m--:m++,x=!0)):(~c||(i>h?m--:i<h&&m++),"function"!=typeof a.type&&(a.__u|=4))):v[o]=null;if(x){for(p=[],d=[],o=0;o<i;o++)if((a=v[o])&&2&a.__u){for(u=0,f=p.length;u<f;)p[_=u+f>>1]<a.__i?u=_+1:f=_;p[u]=a.__i,d[o]=u+1}for(m=p.length;o--;)d[o]&&(d[o]==m?m--:v[o].__u|=4)}if(g)for(o=0;o<h;o++)!(l=n[o])||2&l.__u||(l.__e==r&&(r=Oe(l)),Je(l,l));return r}(n,t,m,s,x),d=0;d<x;d++)null!=(f=n.__k[d])&&(u=~f.__i&&m[f.__i]||Me,f.__i=d,g=Ke(e,f,u,i,o,a,l,s,c,p),_=f.__e,(u.ref!=f.ref||8&u.__u)&&(u.ref&&Ye(u.ref,null,f,u),f.ref&&p.push(f.ref,f.__c||_,f)),h=h||_,4&f.__u?(s=Ie(f,s,e,!u.__v),u.__e&&(u.__e=null)):"function"==typeof f.type&&void 0!==g?s=g:_&&(s=_.nextSibling),f.__u&=-7);return n.__e=h,s}function Ie(e,t,n,r){var i,o,a;if("function"==typeof e.type){if(e.props.__P)return t;if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&(i[o].__=e,t=Ie(i[o],t,n,!1));return t}for(t&&!t.parentNode&&(t=Oe(e))&&!t.parentNode&&(t=null),a=t;a&&8==a.nodeType;)a=a.nextSibling;for(e.__e!=a&&(!r&&n.moveBefore&&e.__e.parentNode?n.moveBefore(e.__e,t):n.insertBefore(e.__e,t||null)),t=e.__e;(t=t&&t.nextSibling)&&8==t.nodeType;);return t}function je(e,t,n,r){var i,o,a,l=e.key,s=e.type,c=t[n],p=c&&!(2&c.__u);if(null===c&&null==l||p&&l==c.key&&s==c.type)return n;if(r>+!!p)for(i=n-1,o=n+1;i>=0||o<t.length;)if((c=t[a=i>=0?i--:o++])&&!(2&c.__u)&&l==c.key&&s==c.type)return a;return-1}function Ve(e,t,n){n??(n=""),"-"==t[0]?e.setProperty(t,n):e[t]=n}function qe(e,t,n,r,i){var o,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ve(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Ve(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])(e.__e||(e.__e={}))[t]=n,n&&r||(a=Te[t]||(Te[t]=function(e){return function(t){if(this.__e){var n=this.__e[e];if(null==t[Se])t[Se]=Ce++;else if(t[Se]<this.__a[e])return;return n(xe.event?xe.event(t):t)}}}(t)),(e.__a||(e.__a={}))[t]=Ce,o=t!=(t=t.replace(Le,"$1")),(t=t.slice(2))[0]<"a"&&(t=t.toLowerCase()),n?e.addEventListener(t,a,o):e.removeEventListener(t,a,o));else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=n??"";break e}catch{}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function Ke(e,t,n,r,i,o,a,l,s,c){var p,d,u,f,_,h,g,m,x,v,y,b,w,k,S,L,C,T,M,E,R=t.type;if(void 0!==t.constructor)return null;if(128&n.__u&&(s=32&n.__u,p=n.__c.__z)){if(t.__u|=s,d=o=[],8==p.nodeType)for(u=1,f=p.nextSibling;f;f=f.nextSibling){if(8==f.nodeType)if(f.data.startsWith("$s"))u++;else if(f.data.startsWith("/$s")&&! --u)break;o.push(f)}else o.push(p);l=o[0]}(p=xe.__b)&&p(t);e:if("function"==typeof R){_=a.length;try{if(v=t.props,y=(p=R.prototype)&&p.render,b=(p=R.contextType)&&r[p.__c],w=p?b?b.props.value:p.__:r,n.__c?2&(h=t.__c=n.__c).__g&&(h.__g|=1):(y?t.__c=h=new R(v,w):(t.__c=h=new Ne(v,w),h.constructor=R,h.render=Qe),b&&b.sub(h),h.state||(h.state={}),h.__n=r,h.__g|=8,h.__h=[],h.__k=[]),y&&(h.__s||(h.__s=h.state),R.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=Ae({},h.__s)),Ae(h.__s,R.getDerivedStateFromProps(v,h.__s)))),g=h.props,m=h.state,h.__v=t,n.__c){if(y&&!R.getDerivedStateFromProps&&v!==g&&h.componentWillReceiveProps&&h.componentWillReceiveProps(v,w),t.__v==n.__v&&!(8&h.__g)||!(4&h.__g)&&h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,w)){t.__v!=n.__v&&(h.props=v,h.state=h.__s,h.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),Ee.push.apply(h.__h,h.__k),h.__k=[],h.__h.length&&a.push(h),l=Oe(n);break e}h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,w),y&&h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(g,m,x)})}else y&&!R.getDerivedStateFromProps&&h.componentWillMount&&h.componentWillMount(),y&&h.componentDidMount&&h.__h.push(h.componentDidMount);if(h.context=w,h.props=v,h.__P=e,h.__g&=-5,k=xe.__r,S=0,y)h.state=h.__s,h.__g&=-9,k&&k(t),p=h.render(h.props,h.state,h.context),Ee.push.apply(h.__h,h.__k),h.__k=[];else do{h.__g&=-9,k&&k(t),p=h.render(h.props,h.state,h.context),h.state=h.__s}while(8&h.__g&&++S<25);h.state=h.__s,h.getChildContext&&(r=Ae({},r,h.getChildContext())),y&&n.__c&&h.getSnapshotBeforeUpdate&&(x=h.getSnapshotBeforeUpdate(g,m)),L=p&&p.type===Fe&&null==p.key?p.props.children:p,v.__P&&(p=l,i=(e=v.__P).namespaceURI,s=o=null,n.props&&n.props.__P!=e&&(n.__k.some(function(e){e&&Je(e,e)}),n.__k=null),l=n.__k?Oe(n,0):null),l=Be(e,Pe(L)?L:[L],t,n,r,i,o,a,l,s,c),v.__P&&(t.__e=null,l=p),t.__u&=-161,128&n.__u&&(h.__z=null),d&&d.some(He),h.__h.length&&a.push(h),1&h.__g&&(h.__g&=-4)}catch(e){if(a.length=_,t.__v=null,s||o)if(e.then){if(C=0,t.__u|=s?160:128,o){for(~(M=o.indexOf(l||void 0))||(M=o.length);(E=o[M-1])&&8==E.nodeType;)M--;for(;M<o.length;M++)if(E=o[M])if(o[M]=null,8==E.nodeType){if(E.data.startsWith("$s"))C++||(T=E);else if(C&&E.data.startsWith("/$s")&&! --C){l=E;break}}else if(!C)break}if(!T){for(;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;T=l}t.__c.__z||(t.__c.__z=T),t.__e=l}else o&&o.some(He);else t.__e=n.__e;t.__k||(t.__k=n.__k||[]),e.then||Ge(t),xe.__e(e,t,n)}}else l=t.__e=function(e,t,n,r,i,o,a,l,s,c){var p,d,u,f,_,h,g,m,x,v=n.props||Me,y=t.props,b=t.type;if("svg"==b?i="http://www.w3.org/2000/svg":"math"==b?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o)for(p=0;p<o.length;p++)if((_=o[p])&&(b?_.localName==b:3==_.nodeType)){e=_,o[p]=null;break}if(!e){if(m=c.ownerDocument||document,!b)return m.createTextNode(y);e=m.createElementNS(i,b,y.is&&y),l&&(xe.__m&&xe.__m(t,o),l=!1),o=null}if(b){if(c="template"==b?e.content:e,o="textarea"==b&&null!=y.defaultValue?null:o&&$e.call(c.childNodes),!l&&o)for(v={},p=0;p<e.attributes.length;p++)v[(_=e.attributes[p]).name]=_.value;for(p in v)_=v[p],"dangerouslySetInnerHTML"==p?u=_:"children"==p||p in y||"value"==p&&"defaultValue"in y||"checked"==p&&"defaultChecked"in y||qe(e,p,null,_,i);for(p in x=1&n.__u,y)_=y[p],"children"==p?f=_:"dangerouslySetInnerHTML"==p?d=_:"value"==p?h=_:"checked"==p?g=_:l&&"function"!=typeof _||!(v[p]!==_||x&&null!=_)||qe(e,p,_,v[p],i);d?(l||u&&(d.__html==u.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[]):(u&&(e.textContent=""),("foreignObject"==b||"http://www.w3.org/1998/Math/MathML"==i&&Re.test(b))&&(i="http://www.w3.org/1999/xhtml"),Be(c,Pe(f)?f:[f],t,n,r,i,o,a,o?o[0]:n.__k&&Oe(n,0),l,s),o&&o.some(He)),l&&"textarea"!=b||(p="value","progress"==b&&null==h?e.removeAttribute(p):null==h||h===e[p]&&("progress"!=b||h)||qe(e,p,h,v[p],i),p="checked",null!=g&&g!=e[p]&&qe(e,p,g,v[p],i))}else v===y||l&&e.data==y||(e.data=y);return e}(n.__e,t,n,r,i,o,a,s,c,e);return(p=xe.diffed)&&p(t),128&t.__u?void 0:l}function Ge(e){e&&(e.__c&&(e.__c.__g|=4),e.__k&&e.__k.some(Ge))}function Xe(e,t,n){for(var r=0;r<n.length;)Ye(n[r++],n[r++],n[r++]);xe.__c&&xe.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){xe.__e(e,t.__v)}})}function Ye(e,t,n,r){try{"function"==typeof e?t?t.__x=e(t)||1:r&&(r=r.__c||r.__e)&&(t=r.__x)&&(r.__x=null,"function"==typeof t?t():e(null)):e.current=t}catch(e){xe.__e(e,n)}}function Je(e,t,n){var r,i;if(xe.unmount&&xe.unmount(e),!(r=e.ref)||r.current&&r.current!=e.__e||Ye(r,null,t,e),r=e.__c){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){xe.__e(e,t)}r.__P=r.__n=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Je(r[i],t,"function"!=typeof e.type||n&&!e.props.__P);(r=e.__e)&&(n||He(r),r.__e&&(r.__e=null)),e.__e=e.__c=e.__=null}function Qe(e,t,n){return this.constructor(e,n)}xe={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((o=i.constructor)&&o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=8&i.__g),i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=8&i.__g),a)return void(i.__g|=2)}catch(t){e=t,a=0}}throw we=0,e}},ve=0,Ne.prototype.setState=function(e,t){var n=this.__s;n&&n!=this.state||(n=this.__s=Ae({},this.state)),"function"==typeof e&&(e=e(Ae({},n),this.props)),e&&(Ae(n,e),this.__v&&(t&&this.__k.push(t),We(this)))},Ne.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),We(this))},Ne.prototype.render=Fe,ye=[],we=0,ke=function(e,t){return e.__v.__b-t.__v.__b},Se=Symbol(),Le=/(PointerCapture)$|Capture$/i,Ce=0,Te={};var Ze,et,tt,nt,rt=Object.is,it=0,ot=[],at=[],lt=xe,st=lt.__b,ct=lt.__r,pt=lt.diffed,dt=lt.__c,ut=lt.unmount,ft=lt.__;function _t(e,t){lt.__h&<.__h(et,e,it||t),it=0;var n=et.__H||(et.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ht(e){return it=1,function(e,t){var n=_t(Ze++,2);if(n.t=e,!n.__c&&(n.__=[Ct(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);rt(t,r)||(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=et,!et.__f)){et.__f=!0;var r=et.shouldComponentUpdate;et.shouldComponentUpdate=function(e,t,n){var i=this.__H;if(!i)return!0;var o=!1,a=this.props!=e;if(i.__.some(function(e){e.__N&&(o=!0,rt(e.__[0],e.__N[0])||(a=!0))}),r){var l=r.call(this,e,t,n);return o?l||a:l}return!o||a}}return n.__}(Ct,e)}function gt(e,t){var n=_t(Ze++,3);!lt.__s&&Lt(n.__H,t)&&(n.__P=!0,n.__=e,n.u=t,et.__H.__h.push(n))}function mt(e,t){var n=_t(Ze++,4);!lt.__s&&Lt(n.__H,t)&&(n.__P=!1,n.__=e,n.u=t,et.__h.push(n))}function xt(e){return it=5,function(e,t){var n=_t(Ze++,7);return Lt(n.__H,t)&&(n.__=e(),n.__H=t),n.__}(function(){return{current:e}},[])}function vt(){var e;do{for(;e=at.shift();)try{kt(e)}catch(t){lt.__e(t,{__:(e=e.__P)&&e.__v})}for(;e=ot.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(kt),t.__h.some(St),t.__h=[]}catch(n){t.__h=[],lt.__e(n,e.__v)}}}while(at.length)}lt.__b=function(e){et=null,st&&st(e)},lt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ft&&ft(e,t)},lt.__r=function(e){ct&&ct(e),Ze=0;var t=(et=e.__c).__H;t&&(tt==et?et.__h=[]:(t.__h.some(kt),t.__h.some(St),Ze=0),t.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})),tt=et},lt.diffed=function(e){pt&&pt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&wt(ot.push(t)),t.__H.__.some(function(e){e.u&&(e.__H=e.u)})),tt=et=null},lt.__c=function(e,t){t.some(function(e){try{e.__h.some(kt),e.__h=e.__h.filter(function(e){return!e.__||St(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],lt.__e(n,e.__v)}}),dt&&dt(e,t)},lt.unmount=function(e){ut&&ut(e);var t,n,r=e.__c;r&&r.__H&&(r.__H.__.some(function(r){try{if(r.__P&&r.__c){if(void 0===n){for(n=e.__;n&&(!n.__c||!n.__c.__P);)n=n.__;n=n&&n.__c}r.__P=n,wt(at.push(r))}else kt(r)}catch(e){t=e}}),r.__H=void 0,t&<.__e(t,r.__v))};var yt="function"==typeof requestAnimationFrame;function bt(e){var t,n=function(){clearTimeout(r),yt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);yt&&(t=requestAnimationFrame(n))}function wt(e){1!=e&&nt==lt.requestAnimationFrame||((nt=lt.requestAnimationFrame)||bt)(vt)}function kt(e){var t=et,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),et=t}function St(e){var t=et;e.__c=e.__(),et=t}function Lt(e,t){return!e||e.length!=t.length||t.some(function(t,n){return!rt(t,e[n])})}function Ct(e,t){return"function"==typeof t?t(e):t}let Tt=()=>matchMedia("(prefers-reduced-motion: reduce)").matches,Mt=e=>"dark"==e||"light"==e?e:void 0;function Et(e,t,n="en"){return e?e[t]??e[t.split("-")[0]]??e[n]??Object.values(e)[0]??"":""}let Rt=e=>{let t=Math.round(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`};function Pt(e){let t=Number.parseInt(e.slice(1),16),n=e=>(e/=255)<=.03928?e/12.92:((e+.055)/1.055)**2.4,r=.2126*n(t>>16&255)+.7152*n(t>>8&255)+.0722*n(255&t);return 1.05/(r+.05)>=(r+.05)/.0595?"#ffffff":"#151823"}let $t={x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',play:'<path d="M5 5a2 2 0 0 1 3-1.7l12 7a2 2 0 0 1 0 3.5l-12 7A2 2 0 0 1 5 19z"/>',"volume-2":'<path d="M11 4.7a.7.7 0 0 0-1.2-.5L6.4 7.6A1.4 1.4 0 0 1 5.4 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.4a1.4 1.4 0 0 1 1 .4l3.4 3.4A.7.7 0 0 0 11 19.3z"/><path d="M16 9a5 5 0 0 1 0 6"/><path d="M19.4 18.4a9 9 0 0 0 0-12.7"/>',"volume-x":'<path d="M11 4.7a.7.7 0 0 0-1.2-.5L6.4 7.6A1.4 1.4 0 0 1 5.4 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.4a1.4 1.4 0 0 1 1 .4l3.4 3.4A.7.7 0 0 0 11 19.3z"/><path d="m16.5 14.5 5-5"/><path d="m16.5 9.5 5 5"/>',check:'<path d="M20 6 9 17l-5-5"/>',"maximize-2":'<path d="M15 3h6v6"/><path d="m21 3-7 7"/><path d="m3 21 7-7"/><path d="M9 21H3v-6"/>',"arrow-right":'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',"rotate-ccw":'<path d="M3 12a9 9 0 1 0 9-9 9.8 9.8 0 0 0-6.7 2.7L3 8"/><path d="M3 3v5h5"/>',"external-link":'<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',"ps-launcher":'<path d="M12 21a9 9 0 1 0-8-5L3 21l5-.9A9 9 0 0 0 12 21z"/><path d="M10 9v6l5-3z"/>',"ps-level-up":'<path d="M3 21h5v-4h5v-4h5V9"/><path d="M18 9V3l4 2.5L18 8"/>',"ps-guide":'<rect x="4" y="3" width="4" height="18" rx="2"/><path d="M12 5.5v10l7.5-5z"/>'};var At=0;function Ht(e,t,n,r,i,o){t||(t={});var a,l,s=t;if("ref"in s&&"function"!=typeof e)for(l in s={},t)"ref"==l?a=t[l]:s[l]=t[l];var c={type:e,props:s,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--At,__i:-1,__u:0};return(i||o)&&(c.__source=i,c.__self=o),xe.vnode&&xe.vnode(c),c}function Dt({name:e}){return Ht("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",dangerouslySetInnerHTML:{__html:$t[e]}})}function Ft(e){try{let t=JSON.parse(sessionStorage.getItem("playstep:clips")??"[]");if(t.includes(e))return!1;sessionStorage.setItem("playstep:clips",JSON.stringify([...t,e].slice(-200)))}catch{}return!0}Array.isArray;let Nt=e=>e.options.locale??navigator.language??"en",Ot=(e,t)=>Et(t.name,Nt(e),t.locale_default)||t.id;function zt({ctx:e,guide:t,index:n,reduced:r,clip:i,big:o,onExpand:a,onDuration:l}){let s=t.steps[n],c=xt(null),[p,d]=ht(!0),[u,f]=ht(!r&&"embed"!==i.source),[_,h]=ht(i.duration_ms??0),g=r=>e.emit({type:r,guide_id:t.id,guide_version:t.version,step_id:s.id,step_index:n,clip_id:"hosted"===i.source?i.clip_id:void 0,clip_source:i.source}),m=e=>Ft(`${e}|${i.url}`)&&g(e);if(gt(()=>{let e=c.current;e&&u&&(e.muted=p,e.play()?.catch(()=>{}))},[u,i.url]),gt(()=>l(u&&"embed"!==i.source?_:0),[_,u]),"embed"===i.source){let t=function(e){try{let t,n=new URL(e),r=n.hostname.replace(/^(www|m)\./,"");if("youtu.be"===r?t=n.pathname.slice(1):"youtube.com"===r&&(t=n.searchParams.get("v")??n.pathname.match(/^\/(?:embed|shorts)\/([\w-]+)/)?.[1]),t)return{src:`https://www.youtube-nocookie.com/embed/${t}?autoplay=1&rel=0`,thumb:`https://i.ytimg.com/vi/${t}/hqdefault.jpg`};if(t="vimeo.com"===r||"player.vimeo.com"===r?n.pathname.match(/(\d{5,})/)?.[1]:null,t)return{src:`https://player.vimeo.com/video/${t}?autoplay=1`}}catch{}return null}(i.url),n=new URL(i.url).hostname.replace(/^www\./,"");return Ht("div",{class:"clip embed",children:u&&t?Ht("iframe",{src:t.src,title:`Video: ${Et(s.title,Nt(e))}`,allow:"autoplay; encrypted-media; picture-in-picture; fullscreen",allowFullScreen:!0}):Ht(Fe,{children:[(i.poster??t?.thumb)&&Ht("img",{src:i.poster??t?.thumb,alt:""}),Ht("button",{class:"play","aria-label":"Play video",onClick:()=>(f(!0),g("clip_played")),children:Ht(Dt,{name:"play"})}),Ht("div",{class:"bar",children:Ht("span",{class:"pill",children:[Ht(Dt,{name:"external-link"}),n,_?` · ${Rt(_)}`:""]})})]})})}return Ht("div",{class:"clip",children:[u?Ht("video",{ref:c,src:i.url,poster:i.poster,muted:p,loop:!0,autoplay:!0,playsInline:!0,preload:"auto","aria-label":`Clip: ${Et(s.title,Nt(e))}`,onLoadedData:()=>m("clip_loaded"),onPlaying:()=>m("clip_played"),onLoadedMetadata:e=>{let t=e.currentTarget.duration;Number.isFinite(t)&&h(1e3*t)}}):Ht(Fe,{children:[i.poster&&Ht("img",{src:i.poster,alt:""}),Ht("button",{class:"play","aria-label":"Play clip",onClick:()=>f(!0),children:Ht(Dt,{name:"play"})})]}),u&&Ht("div",{class:"bar",children:[Ht("span",{class:"pill",children:[Ht(Dt,{name:"play"}),_?`${Rt(_)} loop`:"Loop"]}),Ht("button",{class:"round","aria-label":p?"Unmute clip":"Mute clip",onClick:()=>{d(!p),c.current&&(c.current.muted=!p),p&&g("clip_unmuted")},children:Ht(Dt,{name:p?"volume-x":"volume-2"})}),Ht("button",{class:"round","aria-label":o?"Shrink clip":"Expand clip","aria-pressed":o,onClick:a,children:Ht(Dt,{name:"maximize-2"})})]})]})}function Wt({ctx:e,guide:t,index:n,reduced:r,cardRef:i,style:o}){let a=t.steps[n],l=t.steps.length,[s,c]=ht(!1),[p,d]=ht(0),u=n=>Et(n,Nt(e),t.locale_default),f="next_button"===a.complete_on.type;return gt(()=>{c(!1);let i=t.steps[n+1],o=i?.clip;if(o&&"embed"!==o.source&&!r&&!navigator.connection?.saveData){let r=document.createElement("video");r.preload="auto",r.muted=!0,r.src=o.url,"hosted"===o.source&&Ft(`clip_loaded|${o.url}`)&&e.emit({type:"clip_loaded",guide_id:t.id,guide_version:t.version,step_id:i.id,step_index:n+1,clip_id:o.clip_id,clip_source:"hosted"})}},[t.id,n]),Ht("div",{ref:i,class:"card"+(s?" big":""),style:o,role:"dialog","aria-modal":"false","aria-labelledby":"ps-title","aria-describedby":"ps-text",tabIndex:-1,"data-step":a.id,children:[a.clip&&Ht(zt,{ctx:e,guide:t,index:n,reduced:r,clip:a.clip,big:s,onExpand:()=>c(!s),onDuration:d},a.id),Ht("div",{class:"body",children:[Ht("div",{class:"meta",children:[Ht("span",{children:["Step ",n+1," of ",l," · ",Ot(e,t)]}),Ht("button",{class:"x","aria-label":"Close guide",onClick:()=>e.dispatch({type:"dismiss"}),children:Ht(Dt,{name:"x"})})]}),Ht("div",{class:"steps",role:"img","aria-label":`Step ${n+1} of ${l}`,children:t.steps.map((e,t)=>Ht("span",{class:"seg"+(t<n?" done":t===n?" cur"+(p&&!r?" anim":""):""),style:t===n&&p?{"--d":`${p}ms`}:void 0},t))}),Ht("h2",{class:"title",id:"ps-title",children:u(a.title)}),Ht("p",{class:"text",id:"ps-text",children:u(a.body)})]}),Ht("div",{class:"foot",children:[Ht("span",f?{class:"sp"}:{class:"wait",children:[Ht("span",{class:"pulse","aria-hidden":"true"}),"Waiting for you"]}),n>0&&"page"!==t.steps[n-1].complete_on.type&&!t.steps[n-1].skip_if_on&&Ht("button",{class:"btn gho",onClick:()=>e.dispatch({type:"back"}),children:"Back"}),f&&Ht("button",{class:"btn pri",onClick:()=>e.dispatch({type:"next"}),children:[n+1===l?"Done":"Next",Ht(Dt,{name:"arrow-right"})]})]})]})}let Ut=["width:22px;height:8px;left:22%;top:14px;transform:rotate(-20deg);background:var(--ps-accent)","width:10px;height:10px;left:30%;top:46px;background:var(--ps-spark)","width:12px;height:12px;right:24%;top:10px;background:var(--ps-chart-4)","width:24px;height:8px;right:20%;top:44px;transform:rotate(24deg);background:var(--ps-chart-5)","width:8px;height:8px;left:16%;top:60px;background:var(--ps-chart-5)","width:8px;height:8px;right:30%;top:64px;background:var(--ps-accent)"];function Bt({ctx:e,guide:t}){let n=e.engine.launcherGuides().find(n=>n.id!==t.id&&"done"!==e.engine.progress.guides[n.id]?.status),r=xt(null);return gt(()=>r.current?.focus(),[]),Ht(Fe,{children:[Ht("div",{class:"scrim",onClick:()=>e.dispatch({type:"close"})}),Ht("div",{class:"cel",ref:r,role:"dialog","aria-modal":"true","aria-labelledby":"ps-cel",tabIndex:-1,children:[Ht("div",{class:"art","aria-hidden":"true",children:[Ut.map((e,t)=>Ht("span",{class:"bit",style:e},t)),Ht("span",{class:"tile",children:Ht(Dt,{name:"ps-level-up"})})]}),Ht("h2",{id:"ps-cel",children:"Level cleared"}),Ht("p",{children:["You finished ",Ot(e,t),".",n?` Next up: ${Ot(e,n)}.`:""]}),Ht("div",{class:"acts",children:[Ht("button",{class:"btn sec",onClick:()=>e.dispatch({type:"start",guide:t.id}),children:[Ht(Dt,{name:"rotate-ccw"}),"Replay"]}),Ht("button",n?{class:"btn pri",onClick:()=>e.dispatch({type:"start",guide:n.id}),children:["Next guide",Ht(Dt,{name:"arrow-right"})]}:{class:"btn pri",onClick:()=>e.dispatch({type:"close"}),children:"Done"})]})]})]})}function It({ctx:e,open:t,setOpen:n,near:r}){let i=xt(null);mt(()=>{let e=i.current;e&&(e.style.cssText="",r&&me(r,e,{strategy:"fixed",placement:"top-start",middleware:[_e(8),ge({padding:12}),he({padding:12})]}).then(({x:t,y:n})=>e.style.cssText=`left:${t}px;top:${n}px;right:auto;bottom:auto`))},[t,r]);let o=xt(null);gt(()=>{t?(o.current=e.root.activeElement??document.activeElement,i.current?.focus()):o.current?.focus()},[t]);let a=e.config.launcher,l=e.engine.launcherGuides();if(!l.length)return null;let s=e.engine.progress.guides,c=l.filter(e=>!s[e.id]).length,p="bottom-left"===a?.position?" left":"";return Ht(Fe,{children:[t&&Ht("div",{class:`panel${p}${a?.enabled?"":" solo"}`,ref:i,tabIndex:-1,role:"dialog","aria-label":"Guides",children:[Ht("button",{class:"x","aria-label":"Close guides",onClick:()=>n(!1),children:Ht(Dt,{name:"x"})}),Ht("h2",{children:Et(a?.title,Nt(e))||"Need a hand?"}),Ht("p",{children:Et(a?.description,Nt(e))||"Pick a guide and play it step by step."}),Ht("ul",{class:"rows",children:l.map(t=>{let r=s[t.id],i=t.steps.length,o="done"===r?.status,a="running"===r?.status;return Ht("li",{children:Ht("button",{class:"row",onClick:()=>{n(!1),r&&e.dispatch({type:"reset_progress",guide:t.id}),e.dispatch({type:"start",guide:t.id})},children:[Ht("span",{class:"ti"+(o?" mint":r?"":" spark"),children:Ht(Dt,{name:o?"check":"ps-guide"})}),Ht("span",{class:"rb",children:[Ht("span",{class:"rt",children:Ot(e,t)}),Ht("span",{class:"rm",children:o?"Completed":a?`Step ${r.step+1} of ${i}`:`${i} steps`}),a&&Ht("span",{class:"prog","aria-hidden":"true",children:Ht("i",{style:{width:r.step/i*100+"%"}})})]}),Ht("span",r?{class:"rp",children:[Ht(Dt,{name:"rotate-ccw"}),"Replay"]}:{class:"new",children:"New"})]})},t.id)})}),l.some(e=>s[e.id])&&Ht("div",{class:"acts so",children:Ht("button",{class:"btn gho",onClick:()=>{e.dispatch({type:"reset_progress"}),e.engine.active?n(!1):i.current?.focus()},children:"Start over"})}),!1!==e.config.flags?.show_badge&&Ht("a",{class:"pb",href:"https://playstep.app/?ref=badge",target:"_blank",rel:"noopener",children:[Ht("span",{dangerouslySetInnerHTML:{__html:'<svg viewBox="0 0 48 48" aria-hidden="true"><rect width="48" height="48" rx="13" fill="#2E5BFF"/><rect x="11" y="10" width="8" height="28" rx="4" fill="#fff"/><path d="M23.5 12v17l12-8.5z" fill="#FFC933" stroke="#FFC933" stroke-width="3.5" stroke-linejoin="round"/></svg>'},style:"display:inline-flex;width:16px;height:16px"}),"Powered by PlayStep"]})]}),a?.enabled&&Ht("button",{class:`lb${p}`,"aria-label":t?"Close guides":"Open guides","aria-expanded":t,onClick:()=>n(!t),children:[Ht(Dt,{name:"ps-launcher"}),c>0&&!t&&Ht("span",{class:"cnt",children:c})]})]})}let jt=document.currentScript?.src,Vt=e=>!!e?.getClientRects().length;function qt(e,t){let n=document.querySelector(`[data-guide="${CSS.escape(e)}"]`);try{n||(n=t?[...document.querySelectorAll(t.css)].find(e=>Vt(e)&&(!t.text||e.innerText.includes(t.text)))??null:null)}catch{}return Vt(n)?n:null}function Kt({ctx:e,guide:t,index:n,reduced:r}){let i=t.steps[n],o=function(e,t,n){let[r,i]=ht(()=>e?qt(e,t):null);return gt(()=>{if(!e)return i(null);let r=qt(e,t);i(r);let o=0,a=()=>{o=0;let n=qt(e,t);n!==r&&i(r=n)},l=new MutationObserver(()=>o||(o=requestAnimationFrame(a)));l.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-guide","hidden","style","class"]});let s=setTimeout(()=>!r&&n(e),3e3);return()=>{l.disconnect(),clearTimeout(s),cancelAnimationFrame(o)}},[e,t]),r}(i.anchor,i.find?.web,t=>e.dispatch({type:"anchor_missing",anchor:t})),a=xt(null);gt(()=>{if(!o)return;let t=t=>t.composedPath().includes(o)&&e.dispatch({type:"tap",anchor:i.anchor});return document.addEventListener("click",t,!0),()=>document.removeEventListener("click",t,!0)},[o]);let l=t.theme?.position??"bottom",s=function(e,t,n,r,i){let[o,a]=ht(null);return mt(()=>{let i=t.current;if(!i)return;if(!e){let e=()=>a({x:(innerWidth-i.offsetWidth)/2,y:"center"===r?(innerHeight-i.offsetHeight)/2:innerHeight-i.offsetHeight-24});e();let t=new ResizeObserver(e);return t.observe(i),addEventListener("resize",e),()=>{t.disconnect(),removeEventListener("resize",e)}}let o=e.getBoundingClientRect();(o.bottom<0||o.top>innerHeight)&&e.scrollIntoView({block:"center",behavior:Tt()?"auto":"smooth"});let l=()=>{let t=e.getBoundingClientRect(),r=Number.parseFloat(getComputedStyle(e).borderTopLeftRadius)||8;me(e,i,{strategy:"fixed",placement:"auto"===n?"bottom":n,middleware:[_e(18),ge({fallbackPlacements:["top","left","right"],padding:12}),he({padding:12})]}).then(({x:e,y:n})=>a({x:e,y:n,spot:{x:t.left-6,y:t.top-6,w:t.width+12,h:t.height+12,r:Math.min(r+6,(t.height+12)/2)}}))};l();let s=new ResizeObserver(l);s.observe(e),s.observe(i),addEventListener("scroll",l,{capture:!0,passive:!0}),addEventListener("resize",l);let c=setInterval(l,400);return()=>{s.disconnect(),clearInterval(c),removeEventListener("scroll",l,{capture:!0}),removeEventListener("resize",l)}},[e,r,n,...i]),o}(o,a,i.placement??"auto",l,[i.id]),c=xt("");gt(()=>{s&&c.current!==i.id&&(c.current=i.id,document.activeElement?.matches("input,textarea,select,[contenteditable]:not([contenteditable=false])")||a.current?.focus({preventScroll:!0}))},[i.id,s]);let[p,d]=ht(!1);gt(()=>{s&&!p&&requestAnimationFrame(()=>d(!0))},[s]),gt(()=>{let t=t=>{if("Tab"!==t.key||!a.current)return;let n=[...a.current.querySelectorAll('button,a,iframe,[tabindex="0"]')],r=t.composedPath().includes(a.current),i=n[0],l=n.at(-1),s=e.root.activeElement;r&&!t.shiftKey&&s===l?(t.preventDefault(),(o??i)?.focus()):r&&t.shiftKey&&s===i?(t.preventDefault(),(o??l)?.focus()):o&&document.activeElement===o&&(t.preventDefault(),(t.shiftKey?l:i)?.focus())};return document.addEventListener("keydown",t,!0),()=>document.removeEventListener("keydown",t,!0)},[o]);let u=s?.spot;return Ht(Fe,{children:[o&&u?Ht("div",{class:"spot","aria-hidden":"true",style:{width:`${u.w}px`,height:`${u.h}px`,transform:`translate(${u.x}px,${u.y}px)`,borderRadius:`${u.r}px`}}):!o&&"center"===l&&Ht("div",{class:"scrim","aria-hidden":"true"}),Ht(Wt,{ctx:e,guide:t,index:n,reduced:r,cardRef:a,style:s?{transform:`translate(${Math.round(s.x)}px,${Math.round(s.y)}px)`,transition:p?void 0:"none"}:{visibility:"hidden"}})]})}function Gt({ctx:e,handle:t}){let[,n]=ht(0),r=()=>n(e=>e+1),[i,o]=ht(!1),[a,l]=ht(),s=Tt();t.update=r,t.openLauncher=t=>{let n=document.activeElement;l(t??(n!==document.body&&n!==e.root.host?n??void 0:void 0)),o(!0)},gt(()=>{let t=t=>{"Escape"===t.key&&(i?o(!1):e.engine.active&&e.dispatch({type:"completed"===e.engine.active.status?"close":"dismiss"}))};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[i]),gt(()=>{let e=new MutationObserver(r),t=matchMedia("(prefers-color-scheme: dark)");for(let t of[document.documentElement,document.body])e.observe(t,{attributes:!0});return t.addEventListener("change",r),()=>{e.disconnect(),t.removeEventListener("change",r)}},[]);let c=e.engine.active,p=c?.guide,d=function(e,t,n){let r=Mt(n)??Mt(e.theme?.mode)??Mt(t);return r?"dark"==r:function(){for(let e of[document.documentElement,document.body]){if(!e)continue;let t=getComputedStyle(e).colorScheme,n=/\b(dark|light)\b/.exec(`${e.className} ${Object.values(e.dataset)} ${/^(dark|light)$/.test(t)?t:""}`);if(n)return"dark"==n[1]}}()??matchMedia("(prefers-color-scheme: dark)").matches}(e.config,e.options.colorMode,p?.theme?.mode)?"dark":"light";e.root.host.setAttribute("data-mode",d);let u=e.config.theme,f=p?.theme?.accent,_={};for(let[e,t]of Object.entries({...u?.[d],...p?.theme?.resolved?.[d]??(!u&&f&&{accent:f,"accent-hover":f,"on-accent":Pt(f)})}))_[`--ps-${e}`]=t;let h="running"===c?.status?c.guide.steps[c.index]:void 0;return Ht("div",{class:"l",style:_,children:[Ht(It,{ctx:e,open:i,setOpen:o,near:a}),!i&&"running"===c?.status&&Ht(Kt,{ctx:e,guide:c.guide,index:c.index,reduced:s},c.guide.id),!i&&"completed"===c?.status&&Ht(Bt,{ctx:e,guide:c.guide}),Ht("div",{class:"sr","aria-live":"polite",children:h?`Step ${c.index+1} of ${c.guide.steps.length}: ${Et(h.title,Nt(e))}`:c?"Level cleared":""})]})}return e.findAnchor=qt,e.mount=function(e){let t=e.options,n=t=>{e.outbox.push(t)};new Promise((e,t)=>document.head.append(Object.assign(document.createElement("script"),{src:new URL("events.js",jt||location.href).href,integrity:"sha256-AseK8i2RbqbXQKFUcBWNC4a7ke+Nrh85Kuots5BQdv0=",crossOrigin:"anonymous",onload:()=>e(window.__playstep_events),onerror:()=>t(Error("events"))}))).then(({createTransport:r})=>{let i=r({appKey:t.appKey,url:t.eventsUrl,sdk:t.sdkName??"web",version:"0.5.0",preview:t.preview,userId:e.userId,send:t.transport});e.outbox.splice(0).forEach(i.push),n=i.push}).catch(t=>e.emit({type:"sdk_error",message:String(t)}));let r=document.createElement("style");r.textContent=':host{--ps-radius-md:14px;--ps-radius-lg:20px;--ps-font-display:"Bricolage Grotesque","Figtree",system-ui,sans-serif;--ps-font-sans:"Figtree",system-ui,-apple-system,"Segoe UI",sans-serif;--ps-clip-overlay:rgba(12,14,19,.72);--ps-ease:cubic-bezier(.2,.8,.2,1);--ps-accent:var(--ps-primary);--ps-accent-hover:var(--ps-primary-hover);--ps-on-accent:var(--ps-on-primary);--ps-surface:#fff;--ps-surface-sunken:#f5f6f9;--ps-surface-raised:#fff;--ps-line:#e3e6ec;--ps-ink:#151823;--ps-ink-secondary:#454b5c;--ps-ink-muted:#646b7d;--ps-primary:#2e5bff;--ps-primary-hover:#2149e6;--ps-primary-soft:#e8edff;--ps-primary-ink:#2149e6;--ps-on-primary:#fff;--ps-spark:#ffc933;--ps-spark-soft:#fff4cc;--ps-spark-ink:#7a5a00;--ps-on-spark:#151823;--ps-scrim:rgba(12,14,19,.64);--ps-tag-mint:#ddf5ea;--ps-chart-4:#14b37d;--ps-chart-5:#ff7a59;--ps-shadow-lg:0 20px 48px -12px rgba(21,24,35,.28),0 4px 10px rgba(21,24,35,.06);--ps-ring-focus:0 0 0 2px #fff,0 0 0 4px #2e5bff}:host([data-mode=dark]){--ps-surface:#161922;--ps-surface-sunken:#1d212b;--ps-surface-raised:#222633;--ps-line:#2a2f3c;--ps-ink:#f2f4f8;--ps-ink-secondary:#c5cad5;--ps-ink-muted:#959cad;--ps-primary:#7091ff;--ps-primary-hover:#8da7ff;--ps-primary-soft:#1c2550;--ps-primary-ink:#93abff;--ps-on-primary:#0c0e13;--ps-spark:#ffd452;--ps-spark-soft:#3a2f0a;--ps-spark-ink:#ffd86b;--ps-on-spark:#151823;--ps-scrim:rgba(0,0,0,.72);--ps-tag-mint:#0f2c22;--ps-chart-4:#3dd9a0;--ps-chart-5:#ff9478;--ps-shadow-lg:0 20px 48px -12px rgba(0,0,0,.8),0 4px 10px rgba(0,0,0,.5);--ps-ring-focus:0 0 0 2px #161922,0 0 0 4px #7091ff}:host{all:initial}*{box-sizing:border-box;margin:0}.l{position:fixed;inset:0;pointer-events:none;z-index:2147483000;font:400 14px/20px var(--ps-font-sans);color:var(--ps-ink);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;border:0;padding:0;background:none;cursor:pointer}button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:none;box-shadow:var(--ps-ring-focus)}svg{width:16px;height:16px;flex:none}.scrim{position:fixed;inset:0;background:var(--ps-scrim);pointer-events:auto}.spot,.card{position:fixed;left:0;top:0;transition:transform .36s var(--ps-ease),width .36s var(--ps-ease),height .36s var(--ps-ease)}.spot{box-shadow:0 0 0 9999px var(--ps-scrim)}.spot:after{content:"";position:absolute;inset:-4px;border-radius:18px;border:2px solid var(--ps-spark);animation:ring 1.8s ease-out infinite}.card,.cel,.panel{background:var(--ps-surface-raised);border-radius:var(--ps-radius-lg);box-shadow:var(--ps-shadow-lg);pointer-events:auto;outline:none}.card{width:336px;max-width:calc(100vw - 24px);padding:10px}.big{width:min(720px,calc(100vw - 24px))}.clip{position:relative;aspect-ratio:16/10;border-radius:var(--ps-radius-md);overflow:hidden;background:var(--ps-surface-sunken)}.clip>video,.clip>img,.clip>iframe{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border:0}.bar{position:absolute;left:8px;right:8px;bottom:8px;display:flex;align-items:center;gap:6px;color:#fff}.pill,.round{background:var(--ps-clip-overlay);border-radius:99px;display:inline-flex;align-items:center;justify-content:center}.pill{height:24px;padding:0 8px;gap:4px;font:700 11px/1 var(--ps-font-sans)}.pill svg{width:13px;height:13px}.round{width:28px;height:28px}.round svg{width:14px;height:14px}.bar .round:first-of-type{margin-left:auto}.play{position:absolute;inset:0;margin:auto;width:60px;height:60px;border-radius:50%;background:var(--ps-accent);color:var(--ps-on-accent);display:grid;place-items:center}.play svg{width:26px;height:26px}.body{padding:14px 8px 6px}.meta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted);margin-bottom:10px}.meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;margin:-6px -6px -6px 0}.x:hover,.gho:hover,.row:hover,.sec:hover{background:var(--ps-surface-sunken);color:var(--ps-ink)}.steps{display:flex;gap:4px;margin-bottom:12px}.seg{flex:1;height:6px;border-radius:99px;background:var(--ps-surface-sunken);overflow:hidden;position:relative}.done{background:var(--ps-accent)}.cur:after{content:"";position:absolute;left:0;top:0;bottom:0;width:55%;border-radius:99px;background:var(--ps-spark)}.anim:after{animation:fill var(--d,4s) linear infinite}.title,.cel h2,.panel h2{font:700 20px/26px var(--ps-font-display);letter-spacing:-.01em;margin-bottom:4px}.text,.cel p{color:var(--ps-ink-secondary)}.foot{display:flex;align-items:center;gap:8px;padding:14px 8px 4px}.wait,.sp{flex:1}.wait{display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted)}.pulse{width:8px;height:8px;border-radius:50%;background:var(--ps-spark);animation:pulse 1.6s ease-out infinite}.btn{height:32px;padding:0 14px;border-radius:var(--ps-radius-btn,99px);border:1px solid transparent;font-size:13px;line-height:18px;font-weight:600;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.pri{background:var(--ps-accent);color:var(--ps-on-accent)}.pri:hover{background:var(--ps-accent-hover)}.x{color:var(--ps-ink-muted)}.gho{color:var(--ps-ink-secondary)}.embed{background:#151823}.sec{background:var(--ps-surface);border-color:var(--ps-line)}.cel{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:336px;max-width:calc(100vw - 24px);padding:24px 20px 20px;text-align:center;overflow:hidden}.cel h2{font-size:24px;line-height:30px;font-weight:800}.cel p{margin-bottom:16px}.art{position:relative;height:72px;margin-bottom:8px}.tile{position:absolute;left:50%;top:4px;width:64px;height:64px;margin-left:-32px;border-radius:var(--ps-radius-lg);background:var(--ps-spark);color:var(--ps-on-spark);display:grid;place-items:center;animation:pop .6s cubic-bezier(.2,1.6,.4,1) both}.tile svg{width:30px;height:30px}.bit{position:absolute;border-radius:99px}.acts{display:flex;justify-content:center;gap:12px}.lb{position:fixed;bottom:24px;right:24px;width:56px;height:56px;border-radius:50%;background:var(--ps-accent);color:var(--ps-on-accent);box-shadow:var(--ps-shadow-lg);display:grid;place-items:center;pointer-events:auto}.lb svg{width:26px;height:26px}.cnt{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:var(--ps-spark);color:var(--ps-on-spark);font:800 11px/20px var(--ps-font-sans)}.panel{position:fixed;right:24px;bottom:96px;width:320px;max-width:calc(100vw - 36px);max-height:calc(100vh - 120px);overflow:auto;padding:16px}.left{right:auto;left:24px}.solo{bottom:24px}.panel .x{float:right}.panel>p{font-size:13px;line-height:18px;color:var(--ps-ink-muted);margin:-2px 0 12px}.rows{list-style:none;padding:0}.row{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border-radius:var(--ps-radius-md);text-align:left}.ti{width:36px;height:36px;flex:none;border-radius:var(--ps-radius-md);display:grid;place-items:center;background:var(--ps-primary-soft);color:var(--ps-primary-ink)}.ti.spark{background:var(--ps-spark-soft);color:var(--ps-spark-ink)}.ti.mint{background:var(--ps-tag-mint);color:var(--ps-ink)}.ti svg{width:18px;height:18px}.rb{flex:1;min-width:0}.rt,.rm{display:block;font-weight:600}.rm{font-size:12px;line-height:16px;font-weight:500;color:var(--ps-ink-muted)}.prog{display:block;height:6px;border-radius:99px;background:var(--ps-surface-sunken);margin-top:6px;overflow:hidden}.prog i{display:block;height:100%;background:var(--ps-accent)}.rp{display:flex;align-items:center;gap:4px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted)}.so{margin-top:8px}.new{height:24px;padding:0 10px;border-radius:99px;background:var(--ps-spark-soft);color:var(--ps-spark-ink);font-size:12px;line-height:24px;font-weight:600}.pb{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:10px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted);text-decoration:none}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}@keyframes ring{to{opacity:0;transform:scale(1.12)}}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--ps-spark)}70%,to{box-shadow:0 0 0 8px transparent}}@keyframes fill{0%{width:0}to{width:100%}}@keyframes pop{0%{opacity:0;transform:scale(.4) rotate(-12deg)}}@media (max-width:480px){.card{width:300px}.title{font-size:17px;line-height:22px}.lb{right:18px;bottom:18px}.panel{right:18px;bottom:86px}.solo{bottom:18px}.left{right:auto;left:18px}}@media (prefers-reduced-motion:reduce){.spot,.card{transition:none}.spot:after,.pulse,.cur:after,.tile{animation:none}}',e.root.appendChild(r);let i=document.createElement("div");e.root.appendChild(i);let o={update:()=>{},openLauncher:()=>{},send:e=>n(e)};return function(e,t){var n,r,i,o;xe.__&&xe.__(e,t),9==t.nodeType&&(t=t.documentElement),r=(n=e&&32&e.__u)?null:t.__k,t.__k=De(Fe,{children:[e]}),i=[],o=[],Ke(t,t.__k,r||Me,Me,t.namespaceURI,r?null:t.firstChild?$e.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,o),Xe(i,t.__k,o),t.__k.props.children=null}(Ht(Gt,{ctx:e,handle:o}),i),o},e}({});
|
|
1
|
+
var __playstep_ui=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});let t=Math.min,n=Math.max,r=Math.round,i=e=>({x:e,y:e}),o={left:"right",right:"left",bottom:"top",top:"bottom"};function a(e,r,i){return n(e,t(r,i))}function l(e,t){return"function"==typeof e?e(t):e}function s(e){return e.split("-")[0]}function c(e){return e.split("-")[1]}function p(e){return"x"===e?"y":"x"}function d(e){return"y"===e?"height":"width"}function u(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function f(e){return p(u(e))}function _(e,t,n){void 0===n&&(n=!1);let r=c(e),i=f(e),o=d(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=w(a)),[a,w(a)]}function h(e){let t=w(e);return[m(e),t,m(t)]}function m(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let g=["left","right"],x=["right","left"],v=["top","bottom"],y=["bottom","top"];function b(e,t,n,r){let i=c(e),o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?x:g:t?g:x;case"left":case"right":return t?v:y;default:return[]}}(s(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(m)))),o}function w(e){let t=s(e);return o[t]+e.slice(t.length)}function k(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function S(e,t,n){let r,{reference:i,floating:o}=e,a=u(t),l=f(t),p=d(l),_=s(t),h="y"===a,m=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,x=i[p]/2-o[p]/2;switch(_){case"top":r={x:m,y:i.y-o.height};break;case"bottom":r={x:m,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:g};break;case"left":r={x:i.x-o.width,y:g};break;default:r={x:i.x,y:i.y}}let v=c(t);return v&&(r[l]+=x*("end"===v?1:-1)*(n&&h?-1:1)),r}async function L(e,t){void 0===t&&(t={});let{x:n,y:r,platform:i,rects:o,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:u=!1,padding:f=0}=l(t,e),_=function(e){return"number"==typeof e?{top:e,right:e,bottom:e,left:e}:function(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}(e)}(f),h=a[u?"floating"===d?"reference":"floating":d],m=k(await i.getClippingRect({element:await(null==i.isElement?void 0:i.isElement(h))??!0?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:p,strategy:s})),g="floating"===d?{x:n,y:r,width:o.floating.width,height:o.floating.height}:o.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},y=k(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:x,strategy:s}):g);return{top:(m.top-y.top+_.top)/v.y,bottom:(y.bottom-m.bottom+_.bottom)/v.y,left:(m.left-y.left+_.left)/v.x,right:(y.right-m.right+_.right)/v.x}}let C=new Set(["left","top"]);async function T(e,t){let{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=s(n),p=c(n),d="y"===u(n),f=C.has(a)?-1:1,_=o&&d?-1:1,h=l(t,e),{mainAxis:m,crossAxis:g,alignmentAxis:x}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return p&&"number"==typeof x&&(g="end"===p?-1*x:x),d?{x:g*_,y:m*f}:{x:m*f,y:g*_}}function M(){return typeof window<"u"}function E(e){return $(e)?(e.nodeName||"").toLowerCase():"#document"}function R(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){return(($(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function $(e){return!!M()&&(e instanceof Node||e instanceof R(e).Node)}function A(e){return!!M()&&(e instanceof Element||e instanceof R(e).Element)}function H(e){return!!M()&&(e instanceof HTMLElement||e instanceof R(e).HTMLElement)}function D(e){return!(!M()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof R(e).ShadowRoot)}function F(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}function N(e){return/^(table|td|th)$/.test(E(e))}function O(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}let z,W=/transform|translate|scale|rotate|perspective|filter/,U=/paint|layout|strict|content/,B=e=>!!e&&"none"!==e;function I(e){let t=A(e)?q(e):e;return B(t.transform)||B(t.translate)||B(t.scale)||B(t.rotate)||B(t.perspective)||!j()&&(B(t.backdropFilter)||B(t.filter))||W.test(t.willChange||"")||U.test(t.contain||"")}function j(){return z??(z=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),z}function V(e){return/^(html|body|#document)$/.test(E(e))}function q(e){return R(e).getComputedStyle(e)}function K(e){return A(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if("html"===E(e))return e;let t=e.assignedSlot||e.parentNode||D(e)&&e.host||P(e);return D(t)?t.host:t}function X(e){let t=G(e);return V(t)?(e.ownerDocument||e).body:H(t)&&F(t)?t:X(t)}function Y(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!0);let r=X(e),i=r===e.ownerDocument?.body,o=R(r);if(i){let e=J(o);return t.concat(o,o.visualViewport||[],F(r)?r:[],e&&n?Y(e):[])}return t.concat(r,Y(r,[],n))}function J(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Q(e){let t=q(e),n=parseFloat(t.width)||0,i=parseFloat(t.height)||0,o=H(e),a=o?e.offsetWidth:n,l=o?e.offsetHeight:i,s=r(n)!==a||r(i)!==l;return s&&(n=a,i=l),{width:n,height:i,$:s}}function Z(e){return A(e)?e:e.contextElement}function ee(e){let t=Z(e);if(!H(t))return i(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:l}=Q(t),s=(l?r(n.width):n.width)/o,c=(l?r(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}let te=i(0);function ne(e){let t=R(e);return j()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:te}function re(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),a=Z(e),l=i(1);t&&(r?A(r)&&(l=ee(r)):l=ee(e));let s=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===R(e)}(a,n,r)?ne(a):i(0),c=(o.left+s.x)/l.x,p=(o.top+s.y)/l.y,d=o.width/l.x,u=o.height/l.y;if(a&&r){let e=R(a),t=A(r)?R(r):r,n=e,i=J(n);for(;i&&t!==n;){let e=ee(i),t=i.getBoundingClientRect(),r=q(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,p*=e.y,d*=e.x,u*=e.y,c+=o,p+=a,n=R(i),i=J(n)}}return k({width:d,height:u,x:c,y:p})}function ie(e,t){let n=K(e).scrollLeft;return t?t.left+n:re(P(e)).left+n}function oe(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ie(e,n),y:n.top+t.scrollTop}}function ae(e){let t=K(e),r=e.ownerDocument.body,i=n(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=n(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),a=-t.scrollLeft+ie(e),l=-t.scrollTop;return"rtl"===q(r).direction&&(a+=n(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}function le(e,t,n){let r;if("viewport"===t||"layoutViewport"===t)r=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,i=R(e),o=P(e),a=i.visualViewport,l=o.clientWidth,s=o.clientHeight,c=0,p=0;if(a){let e=!j()||"fixed"===t;r?e||(c=-a.offsetLeft,p=-a.offsetTop):(l=a.width,s=a.height,e&&(c=a.offsetLeft,p=a.offsetTop))}if(ie(o)<=0){let e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(o.clientWidth-t.clientWidth-r),a="stable both-edges"===getComputedStyle(o).scrollbarGutter?i/2:i;a<=25&&(l-=a)}return{width:l,height:s,x:c,y:p}}(e,n,t);else if("document"===t)r=ae(P(e));else if(A(t))r=function(e,t){let n=re(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=ee(e);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let n=ne(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return k(r)}function se(e,t){let n=t.get(e);if(n)return n;let r=Y(e,[],!1).filter(e=>A(e)&&"body"!==E(e)),i=null,o="fixed"===q(e).position,a=o?G(e):e;for(;A(a)&&!V(a);){let e=q(a),t=I(a),n=i?i.position:o?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?i=e:r=r.filter(e=>e!==a),a=G(a)}return t.set(e,r),r}function ce(e,t,n){let r=H(t),o=P(t),a="fixed"===n,l=re(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=i(0);if((r||!a)&&(("body"!==E(t)||F(o))&&(s=K(t)),r)){let e=re(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&o&&(c.x=ie(o));let p=!o||r||a?i(0):oe(o,s);return{x:l.left+s.scrollLeft-c.x-p.x,y:l.top+s.scrollTop-c.y-p.y,width:l.width,height:l.height}}function pe(e){return"static"===q(e).position}function de(e,t){if(!H(e)||"fixed"===q(e).position)return null;if(t)return t(e);let n=e.offsetParent;return P(e)===n&&(n=n.ownerDocument.body),n}function ue(e,t){let n=R(e);if(O(e))return n;if(!H(e)){let t=G(e);for(;t&&!V(t);){if(A(t)&&!pe(t))return t;t=G(t)}return n}let r=de(e,t);for(;r&&N(r)&&pe(r);)r=de(r,t);return r&&V(r)&&pe(r)&&!I(r)?n:r||function(e){let t=G(e);for(;H(t)&&!V(t);){if(I(t))return t;if(O(t))return null;t=G(t)}return null}(e)||n}let fe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,a="fixed"===o,l=P(r),s=!!t&&O(t.floating);if(r===l||s&&a)return n;let c={scrollLeft:0,scrollTop:0},p=i(1),d=i(0),u=H(r);if((u||!a)&&(("body"!==E(r)||F(l))&&(c=K(r)),u)){let e=re(r);p=ee(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let f=!l||u||a?i(0):oe(l,c);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-c.scrollLeft*p.x+d.x+f.x,y:n.y*p.y-c.scrollTop*p.y+d.y+f.y}},getDocumentElement:P,getClippingRect:function(e){let{element:r,boundary:i,rootBoundary:o,strategy:a}=e,l=[..."clippingAncestors"===i?O(r)?[]:se(r,this._c):[].concat(i),o],s=le(r,l[0],a),c=s.top,p=s.right,d=s.bottom,u=s.left;for(let e=1;e<l.length;e++){let i=le(r,l[e],a);c=n(i.top,c),p=t(i.right,p),d=t(i.bottom,d),u=n(i.left,u)}return{width:p-u,height:d-c,x:u,y:c}},getOffsetParent:ue,getElementRects:async function(e){let t=this.getOffsetParent||ue,n=this.getDimensions,r=await n(e.floating);return{reference:ce(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=Q(e);return{width:t,height:n}},getScale:ee,isElement:A,isRTL:function(e){return"rtl"===q(e).direction}},_e=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n;let{x:r,y:i,placement:o,middlewareData:a}=t,l=await T(t,e);return o===a.offset?.placement&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:o}}}}},he=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:d={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...f}=l(e,t),_={x:n,y:r},h=await o.detectOverflow(t,f),m=u(i),g=p(m),x=_[g],v=_[m],y=(e,t)=>a(t+h["y"===e?"top":"left"],t,t-h["y"===e?"bottom":"right"]);s&&(x=y(g,x)),c&&(v=y(m,v));let b=d.fn({...t,[g]:x,[m]:v});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[g]:s,[m]:c}}}}}},me=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:c,elements:p}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:v=!0,...y}=l(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};let k=s(r),S=u(a),L=s(a)===a,C=await(null==c.isRTL?void 0:c.isRTL(p.floating)),T=m||(L||!v?[w(a)]:h(a)),M="none"!==x;!m&&M&&T.push(...b(a,v,x,C));let E=[a,...T],R=await c.detectOverflow(t,y),P=[],$=i.flip?.overflows||[];if(d&&P.push(R[k]),f){let e=_(r,o,C);P.push(R[e[0]],R[e[1]])}if($=[...$,{placement:r,overflows:P}],!P.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=E[e];if(t&&("alignment"!==f||S===u(t)||$.every(e=>u(e.placement)!==S||e.overflows[0]>0)))return{data:{index:e,overflows:$},reset:{placement:t}};let n=$.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(g){case"bestFit":{let e=$.filter(e=>{if(M){let t=u(e.placement);return t===S||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},ge=(e,t,n)=>{let r=new Map,i=n??{},o={...fe,...i.platform,_c:r};return(async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:L},s=await(null==a.isRTL?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:d}=S(c,r,s),u=r,f=0,_={};for(let n=0;n<o.length;n++){let h=o[n];if(!h)continue;let{name:m,fn:g}=h,{x:x,y:v,data:y,reset:b}=await g({x:p,y:d,initialPlacement:r,placement:u,strategy:i,middlewareData:_,rects:c,platform:l,elements:{reference:e,floating:t}});p=x??p,d=v??d,_[m]={..._[m],...y},b&&f<50&&(f++,"object"==typeof b&&(b.placement&&(u=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:p,y:d}=S(c,u,s))),n=-1)}return{x:p,y:d,placement:u,strategy:i,middlewareData:_}})(e,t,{...i,platform:o})};var xe,ve,ye,be,we,ke,Se,Le,Ce,Te,Me={},Ee=[],Re=/^m(i|n|o|s|text|space)$/,Pe=Array.isArray,$e=Ee.slice,Ae=Object.assign;function He(e){e&&e.parentNode&&e.remove()}function De(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i||++ve,__i:-1,__u:0};return!i&&xe.vnode&&xe.vnode(o),o}function Fe(e){return e.children}function Ne(e,t){this.props=e,this.context=t,this.__g=0}function Oe(e,t){if(null==t)return e.__?Oe(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])&&n.__e)return n.__e;return"function"!=typeof e.type||e.props.__P?null:Oe(e)}function ze(e){if((e=e.__)&&e.__c&&!e.props.__P)return e.__e=null,e.__k.some(function(t){return t&&(e.__e=t.__e)}),ze(e)}function We(e){(8&e.__g||!(e.__g|=8)||!ye.push(e)||we++)&&be==xe.debounceRendering||((be=xe.debounceRendering)||queueMicrotask)(Ue)}function Ue(){var e,t,n,r,i,o,a,l,s;try{for(t=1;ye.length;)ye.length>t&&ye.sort(ke),e=ye.shift(),t=ye.length,8&e.__g&&(r=void 0,i=void 0,o=(i=(n=e).__v).__e,a=[],l=[],(s=n.__P)&&((r=Ae({constructor:void 0},i)).__v=i.__v+1,xe.vnode&&xe.vnode(r),Ke(s,r,i,n.__n,s.namespaceURI,32&i.__u?[o]:null,a,o||Oe(i),32&i.__u,l),r.__v=i.__v,r.__.__k[r.__i]=r,Xe(a,r,l),i.__=i.__e=null,r.__e!=o&&ze(r)))}finally{ye.length=we=0}}function Be(e,t,n,r,i,o,a,l,s,c,p){var d,u,f,_,h,m,g=r.__k||Ee,x=t.length;for(s=function(e,t,n,r,i){var o,a,l,s,c,p,d,u,f,_,h=n.length,m=h,g=0,x=!1,v=e.__k=Array(i);for(o=0;o<i;o++)null!=(a=t[o])&&"boolean"!=typeof a&&"function"!=typeof a?("object"!=typeof a||a.constructor==String?a=v[o]=De(null,a):Pe(a)?a=v[o]=De(Fe,{children:a}):void 0===a.constructor&&a.__b?a=v[o]=De(a.type,a.props,a.key,a.ref,a.__v):v[o]=a,s=o+g,a.__=e,a.__b=e.__b+1,l=null,~(c=a.__i=je(a,n,s,m))&&(m--,(l=n[c])&&(l.__u|=2)),l&&l.__v?(a.__u|=2,c==s-1?g--:c==s+1?g++:c!=s&&(c>s?g--:g++,x=!0)):(~c||(i>h?g--:i<h&&g++),"function"!=typeof a.type&&(a.__u|=4))):v[o]=null;if(x){for(p=[],d=[],o=0;o<i;o++)if((a=v[o])&&2&a.__u){for(u=0,f=p.length;u<f;)p[_=u+f>>1]<a.__i?u=_+1:f=_;p[u]=a.__i,d[o]=u+1}for(g=p.length;o--;)d[o]&&(d[o]==g?g--:v[o].__u|=4)}if(m)for(o=0;o<h;o++)!(l=n[o])||2&l.__u||(l.__e==r&&(r=Oe(l)),Je(l,l));return r}(n,t,g,s,x),d=0;d<x;d++)null!=(f=n.__k[d])&&(u=~f.__i&&g[f.__i]||Me,f.__i=d,m=Ke(e,f,u,i,o,a,l,s,c,p),_=f.__e,(u.ref!=f.ref||8&u.__u)&&(u.ref&&Ye(u.ref,null,f,u),f.ref&&p.push(f.ref,f.__c||_,f)),h=h||_,4&f.__u?(s=Ie(f,s,e,!u.__v),u.__e&&(u.__e=null)):"function"==typeof f.type&&void 0!==m?s=m:_&&(s=_.nextSibling),f.__u&=-7);return n.__e=h,s}function Ie(e,t,n,r){var i,o,a;if("function"==typeof e.type){if(e.props.__P)return t;if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&(i[o].__=e,t=Ie(i[o],t,n,!1));return t}for(t&&!t.parentNode&&(t=Oe(e))&&!t.parentNode&&(t=null),a=t;a&&8==a.nodeType;)a=a.nextSibling;for(e.__e!=a&&(!r&&n.moveBefore&&e.__e.parentNode?n.moveBefore(e.__e,t):n.insertBefore(e.__e,t||null)),t=e.__e;(t=t&&t.nextSibling)&&8==t.nodeType;);return t}function je(e,t,n,r){var i,o,a,l=e.key,s=e.type,c=t[n],p=c&&!(2&c.__u);if(null===c&&null==l||p&&l==c.key&&s==c.type)return n;if(r>+!!p)for(i=n-1,o=n+1;i>=0||o<t.length;)if((c=t[a=i>=0?i--:o++])&&!(2&c.__u)&&l==c.key&&s==c.type)return a;return-1}function Ve(e,t,n){n??(n=""),"-"==t[0]?e.setProperty(t,n):e[t]=n}function qe(e,t,n,r,i){var o,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ve(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Ve(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])(e.__e||(e.__e={}))[t]=n,n&&r||(a=Te[t]||(Te[t]=function(e){return function(t){if(this.__e){var n=this.__e[e];if(null==t[Se])t[Se]=Ce++;else if(t[Se]<this.__a[e])return;return n(xe.event?xe.event(t):t)}}}(t)),(e.__a||(e.__a={}))[t]=Ce,o=t!=(t=t.replace(Le,"$1")),(t=t.slice(2))[0]<"a"&&(t=t.toLowerCase()),n?e.addEventListener(t,a,o):e.removeEventListener(t,a,o));else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=n??"";break e}catch{}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function Ke(e,t,n,r,i,o,a,l,s,c){var p,d,u,f,_,h,m,g,x,v,y,b,w,k,S,L,C,T,M,E,R=t.type;if(void 0!==t.constructor)return null;if(128&n.__u&&(s=32&n.__u,p=n.__c.__z)){if(t.__u|=s,d=o=[],8==p.nodeType)for(u=1,f=p.nextSibling;f;f=f.nextSibling){if(8==f.nodeType)if(f.data.startsWith("$s"))u++;else if(f.data.startsWith("/$s")&&! --u)break;o.push(f)}else o.push(p);l=o[0]}(p=xe.__b)&&p(t);e:if("function"==typeof R){_=a.length;try{if(v=t.props,y=(p=R.prototype)&&p.render,b=(p=R.contextType)&&r[p.__c],w=p?b?b.props.value:p.__:r,n.__c?2&(h=t.__c=n.__c).__g&&(h.__g|=1):(y?t.__c=h=new R(v,w):(t.__c=h=new Ne(v,w),h.constructor=R,h.render=Qe),b&&b.sub(h),h.state||(h.state={}),h.__n=r,h.__g|=8,h.__h=[],h.__k=[]),y&&(h.__s||(h.__s=h.state),R.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=Ae({},h.__s)),Ae(h.__s,R.getDerivedStateFromProps(v,h.__s)))),m=h.props,g=h.state,h.__v=t,n.__c){if(y&&!R.getDerivedStateFromProps&&v!==m&&h.componentWillReceiveProps&&h.componentWillReceiveProps(v,w),t.__v==n.__v&&!(8&h.__g)||!(4&h.__g)&&h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,w)){t.__v!=n.__v&&(h.props=v,h.state=h.__s,h.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),Ee.push.apply(h.__h,h.__k),h.__k=[],h.__h.length&&a.push(h),l=Oe(n);break e}h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,w),y&&h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(m,g,x)})}else y&&!R.getDerivedStateFromProps&&h.componentWillMount&&h.componentWillMount(),y&&h.componentDidMount&&h.__h.push(h.componentDidMount);if(h.context=w,h.props=v,h.__P=e,h.__g&=-5,k=xe.__r,S=0,y)h.state=h.__s,h.__g&=-9,k&&k(t),p=h.render(h.props,h.state,h.context),Ee.push.apply(h.__h,h.__k),h.__k=[];else do{h.__g&=-9,k&&k(t),p=h.render(h.props,h.state,h.context),h.state=h.__s}while(8&h.__g&&++S<25);h.state=h.__s,h.getChildContext&&(r=Ae({},r,h.getChildContext())),y&&n.__c&&h.getSnapshotBeforeUpdate&&(x=h.getSnapshotBeforeUpdate(m,g)),L=p&&p.type===Fe&&null==p.key?p.props.children:p,v.__P&&(p=l,i=(e=v.__P).namespaceURI,s=o=null,n.props&&n.props.__P!=e&&(n.__k.some(function(e){e&&Je(e,e)}),n.__k=null),l=n.__k?Oe(n,0):null),l=Be(e,Pe(L)?L:[L],t,n,r,i,o,a,l,s,c),v.__P&&(t.__e=null,l=p),t.__u&=-161,128&n.__u&&(h.__z=null),d&&d.some(He),h.__h.length&&a.push(h),1&h.__g&&(h.__g&=-4)}catch(e){if(a.length=_,t.__v=null,s||o)if(e.then){if(C=0,t.__u|=s?160:128,o){for(~(M=o.indexOf(l||void 0))||(M=o.length);(E=o[M-1])&&8==E.nodeType;)M--;for(;M<o.length;M++)if(E=o[M])if(o[M]=null,8==E.nodeType){if(E.data.startsWith("$s"))C++||(T=E);else if(C&&E.data.startsWith("/$s")&&! --C){l=E;break}}else if(!C)break}if(!T){for(;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;T=l}t.__c.__z||(t.__c.__z=T),t.__e=l}else o&&o.some(He);else t.__e=n.__e;t.__k||(t.__k=n.__k||[]),e.then||Ge(t),xe.__e(e,t,n)}}else l=t.__e=function(e,t,n,r,i,o,a,l,s,c){var p,d,u,f,_,h,m,g,x,v=n.props||Me,y=t.props,b=t.type;if("svg"==b?i="http://www.w3.org/2000/svg":"math"==b?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o)for(p=0;p<o.length;p++)if((_=o[p])&&(b?_.localName==b:3==_.nodeType)){e=_,o[p]=null;break}if(!e){if(g=c.ownerDocument||document,!b)return g.createTextNode(y);e=g.createElementNS(i,b,y.is&&y),l&&(xe.__m&&xe.__m(t,o),l=!1),o=null}if(b){if(c="template"==b?e.content:e,o="textarea"==b&&null!=y.defaultValue?null:o&&$e.call(c.childNodes),!l&&o)for(v={},p=0;p<e.attributes.length;p++)v[(_=e.attributes[p]).name]=_.value;for(p in v)_=v[p],"dangerouslySetInnerHTML"==p?u=_:"children"==p||p in y||"value"==p&&"defaultValue"in y||"checked"==p&&"defaultChecked"in y||qe(e,p,null,_,i);for(p in x=1&n.__u,y)_=y[p],"children"==p?f=_:"dangerouslySetInnerHTML"==p?d=_:"value"==p?h=_:"checked"==p?m=_:l&&"function"!=typeof _||!(v[p]!==_||x&&null!=_)||qe(e,p,_,v[p],i);d?(l||u&&(d.__html==u.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[]):(u&&(e.textContent=""),("foreignObject"==b||"http://www.w3.org/1998/Math/MathML"==i&&Re.test(b))&&(i="http://www.w3.org/1999/xhtml"),Be(c,Pe(f)?f:[f],t,n,r,i,o,a,o?o[0]:n.__k&&Oe(n,0),l,s),o&&o.some(He)),l&&"textarea"!=b||(p="value","progress"==b&&null==h?e.removeAttribute(p):null==h||h===e[p]&&("progress"!=b||h)||qe(e,p,h,v[p],i),p="checked",null!=m&&m!=e[p]&&qe(e,p,m,v[p],i))}else v===y||l&&e.data==y||(e.data=y);return e}(n.__e,t,n,r,i,o,a,s,c,e);return(p=xe.diffed)&&p(t),128&t.__u?void 0:l}function Ge(e){e&&(e.__c&&(e.__c.__g|=4),e.__k&&e.__k.some(Ge))}function Xe(e,t,n){for(var r=0;r<n.length;)Ye(n[r++],n[r++],n[r++]);xe.__c&&xe.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){xe.__e(e,t.__v)}})}function Ye(e,t,n,r){try{"function"==typeof e?t?t.__x=e(t)||1:r&&(r=r.__c||r.__e)&&(t=r.__x)&&(r.__x=null,"function"==typeof t?t():e(null)):e.current=t}catch(e){xe.__e(e,n)}}function Je(e,t,n){var r,i;if(xe.unmount&&xe.unmount(e),!(r=e.ref)||r.current&&r.current!=e.__e||Ye(r,null,t,e),r=e.__c){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){xe.__e(e,t)}r.__P=r.__n=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Je(r[i],t,"function"!=typeof e.type||n&&!e.props.__P);(r=e.__e)&&(n||He(r),r.__e&&(r.__e=null)),e.__e=e.__c=e.__=null}function Qe(e,t,n){return this.constructor(e,n)}xe={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((o=i.constructor)&&o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=8&i.__g),i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=8&i.__g),a)return void(i.__g|=2)}catch(t){e=t,a=0}}throw we=0,e}},ve=0,Ne.prototype.setState=function(e,t){var n=this.__s;n&&n!=this.state||(n=this.__s=Ae({},this.state)),"function"==typeof e&&(e=e(Ae({},n),this.props)),e&&(Ae(n,e),this.__v&&(t&&this.__k.push(t),We(this)))},Ne.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),We(this))},Ne.prototype.render=Fe,ye=[],we=0,ke=function(e,t){return e.__v.__b-t.__v.__b},Se=Symbol(),Le=/(PointerCapture)$|Capture$/i,Ce=0,Te={};var Ze,et,tt,nt,rt=Object.is,it=0,ot=[],at=[],lt=xe,st=lt.__b,ct=lt.__r,pt=lt.diffed,dt=lt.__c,ut=lt.unmount,ft=lt.__;function _t(e,t){lt.__h&<.__h(et,e,it||t),it=0;var n=et.__H||(et.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ht(e){return it=1,function(e,t){var n=_t(Ze++,2);if(n.t=e,!n.__c&&(n.__=[Ct(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);rt(t,r)||(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=et,!et.__f)){et.__f=!0;var r=et.shouldComponentUpdate;et.shouldComponentUpdate=function(e,t,n){var i=this.__H;if(!i)return!0;var o=!1,a=this.props!=e;if(i.__.some(function(e){e.__N&&(o=!0,rt(e.__[0],e.__N[0])||(a=!0))}),r){var l=r.call(this,e,t,n);return o?l||a:l}return!o||a}}return n.__}(Ct,e)}function mt(e,t){var n=_t(Ze++,3);!lt.__s&&Lt(n.__H,t)&&(n.__P=!0,n.__=e,n.u=t,et.__H.__h.push(n))}function gt(e,t){var n=_t(Ze++,4);!lt.__s&&Lt(n.__H,t)&&(n.__P=!1,n.__=e,n.u=t,et.__h.push(n))}function xt(e){return it=5,function(e,t){var n=_t(Ze++,7);return Lt(n.__H,t)&&(n.__=e(),n.__H=t),n.__}(function(){return{current:e}},[])}function vt(){var e;do{for(;e=at.shift();)try{kt(e)}catch(t){lt.__e(t,{__:(e=e.__P)&&e.__v})}for(;e=ot.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(kt),t.__h.some(St),t.__h=[]}catch(n){t.__h=[],lt.__e(n,e.__v)}}}while(at.length)}lt.__b=function(e){et=null,st&&st(e)},lt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ft&&ft(e,t)},lt.__r=function(e){ct&&ct(e),Ze=0;var t=(et=e.__c).__H;t&&(tt==et?et.__h=[]:(t.__h.some(kt),t.__h.some(St),Ze=0),t.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})),tt=et},lt.diffed=function(e){pt&&pt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&wt(ot.push(t)),t.__H.__.some(function(e){e.u&&(e.__H=e.u)})),tt=et=null},lt.__c=function(e,t){t.some(function(e){try{e.__h.some(kt),e.__h=e.__h.filter(function(e){return!e.__||St(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],lt.__e(n,e.__v)}}),dt&&dt(e,t)},lt.unmount=function(e){ut&&ut(e);var t,n,r=e.__c;r&&r.__H&&(r.__H.__.some(function(r){try{if(r.__P&&r.__c){if(void 0===n){for(n=e.__;n&&(!n.__c||!n.__c.__P);)n=n.__;n=n&&n.__c}r.__P=n,wt(at.push(r))}else kt(r)}catch(e){t=e}}),r.__H=void 0,t&<.__e(t,r.__v))};var yt="function"==typeof requestAnimationFrame;function bt(e){var t,n=function(){clearTimeout(r),yt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);yt&&(t=requestAnimationFrame(n))}function wt(e){1!=e&&nt==lt.requestAnimationFrame||((nt=lt.requestAnimationFrame)||bt)(vt)}function kt(e){var t=et,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),et=t}function St(e){var t=et;e.__c=e.__(),et=t}function Lt(e,t){return!e||e.length!=t.length||t.some(function(t,n){return!rt(t,e[n])})}function Ct(e,t){return"function"==typeof t?t(e):t}let Tt=()=>matchMedia("(prefers-reduced-motion: reduce)").matches,Mt=e=>"dark"==e||"light"==e?e:void 0;function Et(e,t,n="en"){return e?e[t]??e[t.split("-")[0]]??e[n]??Object.values(e)[0]??"":""}let Rt=e=>{let t=Math.round(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`};function Pt(e){let t=Number.parseInt(e.slice(1),16),n=e=>(e/=255)<=.03928?e/12.92:((e+.055)/1.055)**2.4,r=.2126*n(t>>16&255)+.7152*n(t>>8&255)+.0722*n(255&t);return 1.05/(r+.05)>=(r+.05)/.0595?"#ffffff":"#151823"}let $t={x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',play:'<path d="M5 5a2 2 0 0 1 3-1.7l12 7a2 2 0 0 1 0 3.5l-12 7A2 2 0 0 1 5 19z"/>',"volume-2":'<path d="M11 4.7a.7.7 0 0 0-1.2-.5L6.4 7.6A1.4 1.4 0 0 1 5.4 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.4a1.4 1.4 0 0 1 1 .4l3.4 3.4A.7.7 0 0 0 11 19.3z"/><path d="M16 9a5 5 0 0 1 0 6"/><path d="M19.4 18.4a9 9 0 0 0 0-12.7"/>',"volume-x":'<path d="M11 4.7a.7.7 0 0 0-1.2-.5L6.4 7.6A1.4 1.4 0 0 1 5.4 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.4a1.4 1.4 0 0 1 1 .4l3.4 3.4A.7.7 0 0 0 11 19.3z"/><path d="m16.5 14.5 5-5"/><path d="m16.5 9.5 5 5"/>',check:'<path d="M20 6 9 17l-5-5"/>',"maximize-2":'<path d="M15 3h6v6"/><path d="m21 3-7 7"/><path d="m3 21 7-7"/><path d="M9 21H3v-6"/>',"arrow-right":'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',"rotate-ccw":'<path d="M3 12a9 9 0 1 0 9-9 9.8 9.8 0 0 0-6.7 2.7L3 8"/><path d="M3 3v5h5"/>',"external-link":'<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',"ps-launcher":'<path d="M12 21a9 9 0 1 0-8-5L3 21l5-.9A9 9 0 0 0 12 21z"/><path d="M10 9v6l5-3z"/>',"ps-level-up":'<path d="M3 21h5v-4h5v-4h5V9"/><path d="M18 9V3l4 2.5L18 8"/>',"ps-guide":'<rect x="4" y="3" width="4" height="18" rx="2"/><path d="M12 5.5v10l7.5-5z"/>'};var At=0;function Ht(e,t,n,r,i,o){t||(t={});var a,l,s=t;if("ref"in s&&"function"!=typeof e)for(l in s={},t)"ref"==l?a=t[l]:s[l]=t[l];var c={type:e,props:s,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--At,__i:-1,__u:0};return(i||o)&&(c.__source=i,c.__self=o),xe.vnode&&xe.vnode(c),c}function Dt({name:e}){return Ht("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",dangerouslySetInnerHTML:{__html:$t[e]}})}function Ft(e){try{let t=JSON.parse(sessionStorage.getItem("playstep:clips")??"[]");if(t.includes(e))return!1;sessionStorage.setItem("playstep:clips",JSON.stringify([...t,e].slice(-200)))}catch{}return!0}Array.isArray;let Nt=e=>e.options.locale??navigator.language??"en",Ot=(e,t)=>Et(t.name,Nt(e),t.locale_default)||t.id;function zt({ctx:e,guide:t,index:n,reduced:r,clip:i,big:o,onExpand:a,onDuration:l}){let s=t.steps[n],c=xt(null),[p,d]=ht(!0),[u,f]=ht(!r&&"embed"!==i.source),[_,h]=ht(i.duration_ms??0),m=r=>e.emit({type:r,guide_id:t.id,guide_version:t.version,step_id:s.id,step_index:n,clip_id:"hosted"===i.source?i.clip_id:void 0,clip_source:i.source}),g=e=>Ft(`${e}|${i.url}`)&&m(e);if(mt(()=>{let e=c.current;e&&u&&(e.muted=p,e.play()?.catch(()=>{}))},[u,i.url]),mt(()=>l(u&&"embed"!==i.source?_:0),[_,u]),"embed"===i.source){let t=function(e){try{let t,n=new URL(e),r=n.hostname.replace(/^(www|m)\./,"");if("youtu.be"===r?t=n.pathname.slice(1):"youtube.com"===r&&(t=n.searchParams.get("v")??n.pathname.match(/^\/(?:embed|shorts)\/([\w-]+)/)?.[1]),t)return{src:`https://www.youtube-nocookie.com/embed/${t}?autoplay=1&rel=0`,thumb:`https://i.ytimg.com/vi/${t}/hqdefault.jpg`};if(t="vimeo.com"===r||"player.vimeo.com"===r?n.pathname.match(/(\d{5,})/)?.[1]:null,t)return{src:`https://player.vimeo.com/video/${t}?autoplay=1`}}catch{}return null}(i.url),n=new URL(i.url).hostname.replace(/^www\./,"");return Ht("div",{class:"clip embed",children:u&&t?Ht("iframe",{src:t.src,title:`Video: ${Et(s.title,Nt(e))}`,allow:"autoplay; encrypted-media; picture-in-picture; fullscreen",allowFullScreen:!0}):Ht(Fe,{children:[(i.poster??t?.thumb)&&Ht("img",{src:i.poster??t?.thumb,alt:""}),Ht("button",{class:"play","aria-label":"Play video",onClick:()=>(f(!0),m("clip_played")),children:Ht(Dt,{name:"play"})}),Ht("div",{class:"bar",children:Ht("span",{class:"pill",children:[Ht(Dt,{name:"external-link"}),n,_?` · ${Rt(_)}`:""]})})]})})}return Ht("div",{class:"clip",children:[u?Ht("video",{ref:c,src:i.url,poster:i.poster,muted:p,loop:!0,autoplay:!0,playsInline:!0,preload:"auto","aria-label":`Clip: ${Et(s.title,Nt(e))}`,onLoadedData:()=>g("clip_loaded"),onPlaying:()=>g("clip_played"),onLoadedMetadata:e=>{let t=e.currentTarget.duration;Number.isFinite(t)&&h(1e3*t)}}):Ht(Fe,{children:[i.poster&&Ht("img",{src:i.poster,alt:""}),Ht("button",{class:"play","aria-label":"Play clip",onClick:()=>f(!0),children:Ht(Dt,{name:"play"})})]}),u&&Ht("div",{class:"bar",children:[Ht("span",{class:"pill",children:[Ht(Dt,{name:"play"}),_?`${Rt(_)} loop`:"Loop"]}),Ht("button",{class:"round","aria-label":p?"Unmute clip":"Mute clip",onClick:()=>{d(!p),c.current&&(c.current.muted=!p),p&&m("clip_unmuted")},children:Ht(Dt,{name:p?"volume-x":"volume-2"})}),Ht("button",{class:"round","aria-label":o?"Shrink clip":"Expand clip","aria-pressed":o,onClick:a,children:Ht(Dt,{name:"maximize-2"})})]})]})}function Wt({ctx:e,guide:t,index:n,reduced:r,cardRef:i,style:o}){let a=t.steps[n],l=t.steps.length,[s,c]=ht(!1),[p,d]=ht(0),u=n=>Et(n,Nt(e),t.locale_default),f="next_button"===a.complete_on.type;return mt(()=>{c(!1);let i=t.steps[n+1],o=i?.clip;if(o&&"embed"!==o.source&&!r&&!navigator.connection?.saveData){let r=document.createElement("video");r.preload="auto",r.muted=!0,r.src=o.url,"hosted"===o.source&&Ft(`clip_loaded|${o.url}`)&&e.emit({type:"clip_loaded",guide_id:t.id,guide_version:t.version,step_id:i.id,step_index:n+1,clip_id:o.clip_id,clip_source:"hosted"})}},[t.id,n]),Ht("div",{ref:i,class:"card"+(s?" big":""),style:o,role:"dialog","aria-modal":"false","aria-labelledby":"ps-title","aria-describedby":"ps-text",tabIndex:-1,"data-step":a.id,children:[a.clip&&Ht(zt,{ctx:e,guide:t,index:n,reduced:r,clip:a.clip,big:s,onExpand:()=>c(!s),onDuration:d},a.id),Ht("div",{class:"body",children:[Ht("div",{class:"meta",children:[Ht("span",{children:["Step ",n+1," of ",l," · ",Ot(e,t)]}),Ht("button",{class:"x","aria-label":"Close guide",onClick:()=>e.dispatch({type:"dismiss"}),children:Ht(Dt,{name:"x"})})]}),Ht("div",{class:"steps",role:"img","aria-label":`Step ${n+1} of ${l}`,children:t.steps.map((e,t)=>Ht("span",{class:"seg"+(t<n?" done":t===n?" cur"+(p&&!r?" anim":""):""),style:t===n&&p?{"--d":`${p}ms`}:void 0},t))}),Ht("h2",{class:"title",id:"ps-title",children:u(a.title)}),Ht("p",{class:"text",id:"ps-text",children:u(a.body)})]}),Ht("div",{class:"foot",children:[Ht("span",f?{class:"sp"}:{class:"wait",children:[Ht("span",{class:"pulse","aria-hidden":"true"}),"Waiting for you"]}),n>0&&"page"!==t.steps[n-1].complete_on.type&&!t.steps[n-1].skip_if_on&&Ht("button",{class:"btn gho",onClick:()=>e.dispatch({type:"back"}),children:"Back"}),f&&Ht("button",{class:"btn pri",onClick:()=>e.dispatch({type:"next"}),children:[n+1===l?"Done":"Next",Ht(Dt,{name:"arrow-right"})]})]})]})}let Ut=["width:22px;height:8px;left:22%;top:14px;transform:rotate(-20deg);background:var(--ps-accent)","width:10px;height:10px;left:30%;top:46px;background:var(--ps-spark)","width:12px;height:12px;right:24%;top:10px;background:var(--ps-chart-4)","width:24px;height:8px;right:20%;top:44px;transform:rotate(24deg);background:var(--ps-chart-5)","width:8px;height:8px;left:16%;top:60px;background:var(--ps-chart-5)","width:8px;height:8px;right:30%;top:64px;background:var(--ps-accent)"];function Bt({ctx:e,guide:t}){let n=e.engine.launcherGuides().find(n=>n.id!==t.id&&"done"!==e.engine.progress.guides[n.id]?.status),r=xt(null);return mt(()=>r.current?.focus(),[]),Ht(Fe,{children:[Ht("div",{class:"scrim",onClick:()=>e.dispatch({type:"close"})}),Ht("div",{class:"cel",ref:r,role:"dialog","aria-modal":"true","aria-labelledby":"ps-cel",tabIndex:-1,children:[Ht("div",{class:"art","aria-hidden":"true",children:[Ut.map((e,t)=>Ht("span",{class:"bit",style:e},t)),Ht("span",{class:"tile",children:Ht(Dt,{name:"ps-level-up"})})]}),Ht("h2",{id:"ps-cel",children:"Level cleared"}),Ht("p",{children:["You finished ",Ot(e,t),".",n?` Next up: ${Ot(e,n)}.`:""]}),Ht("div",{class:"acts",children:[Ht("button",{class:"btn sec",onClick:()=>e.dispatch({type:"start",guide:t.id}),children:[Ht(Dt,{name:"rotate-ccw"}),"Replay"]}),Ht("button",n?{class:"btn pri",onClick:()=>e.dispatch({type:"start",guide:n.id}),children:["Next guide",Ht(Dt,{name:"arrow-right"})]}:{class:"btn pri",onClick:()=>e.dispatch({type:"close"}),children:"Done"})]})]})]})}function It({ctx:e,open:t,setOpen:n,near:r}){let i=xt(null);gt(()=>{let e=i.current;e&&(e.style.cssText="",r&&ge(r,e,{strategy:"fixed",placement:"top-start",middleware:[_e(8),me({padding:12}),he({padding:12})]}).then(({x:t,y:n})=>e.style.cssText=`left:${t}px;top:${n}px;right:auto;bottom:auto`))},[t,r]);let o=xt(null);mt(()=>{t?(o.current=e.root.activeElement??document.activeElement,i.current?.focus()):o.current?.focus()},[t]);let a=e.config.launcher,l=e.engine.launcherGuides();if(!l.length)return null;let s=e.engine.progress.guides,c=l.filter(e=>!s[e.id]).length,p="bottom-left"===a?.position?" left":"";return Ht(Fe,{children:[t&&Ht("div",{class:`panel${p}${a?.enabled?"":" solo"}`,ref:i,tabIndex:-1,role:"dialog","aria-label":"Guides",children:[Ht("button",{class:"x","aria-label":"Close guides",onClick:()=>n(!1),children:Ht(Dt,{name:"x"})}),Ht("h2",{children:Et(a?.title,Nt(e))||"Need a hand?"}),Ht("p",{children:Et(a?.description,Nt(e))||"Pick a guide and play it step by step."}),Ht("ul",{class:"rows",children:l.map(t=>{let r=s[t.id],i=t.steps.length,o="done"===r?.status,a="running"===r?.status;return Ht("li",{children:Ht("button",{class:"row",onClick:()=>{n(!1),r&&e.dispatch({type:"reset_progress",guide:t.id}),e.dispatch({type:"start",guide:t.id})},children:[Ht("span",{class:"ti"+(o?" mint":r?"":" spark"),children:Ht(Dt,{name:o?"check":"ps-guide"})}),Ht("span",{class:"rb",children:[Ht("span",{class:"rt",children:Ot(e,t)}),Ht("span",{class:"rm",children:o?"Completed":a?`Step ${r.step+1} of ${i}`:`${i} steps`}),a&&Ht("span",{class:"prog","aria-hidden":"true",children:Ht("i",{style:{width:r.step/i*100+"%"}})})]}),Ht("span",r?{class:"rp",children:[Ht(Dt,{name:"rotate-ccw"}),"Replay"]}:{class:"new",children:"New"})]})},t.id)})}),l.some(e=>s[e.id])&&Ht("div",{class:"acts so",children:Ht("button",{class:"btn gho",onClick:()=>{e.dispatch({type:"reset_progress"}),e.engine.active?n(!1):i.current?.focus()},children:"Start over"})}),!1!==e.config.flags?.show_badge&&Ht("a",{class:"pb",href:"https://playstep.app/?ref=badge",target:"_blank",rel:"noopener",children:[Ht("span",{dangerouslySetInnerHTML:{__html:'<svg viewBox="0 0 48 48" aria-hidden="true"><rect width="48" height="48" rx="13" fill="#2E5BFF"/><rect x="11" y="10" width="8" height="28" rx="4" fill="#fff"/><path d="M23.5 12v17l12-8.5z" fill="#FFC933" stroke="#FFC933" stroke-width="3.5" stroke-linejoin="round"/></svg>'},style:"display:inline-flex;width:16px;height:16px"}),"Powered by PlayStep"]})]}),a?.enabled&&Ht("button",{class:`lb${p}`,"aria-label":t?"Close guides":"Open guides","aria-expanded":t,onClick:()=>n(!t),children:[Ht(Dt,{name:"ps-launcher"}),c>0&&!t&&Ht("span",{class:"cnt",children:c})]})]})}let jt=document.currentScript?.src,Vt=e=>!!e?.getClientRects().length;function qt(){if([...document.querySelectorAll('[aria-modal="true"],[role="dialog"],[role="alertdialog"],[role="listbox"],[role="menu"]')].some(Vt))return!0;try{return!!document.querySelector(":popover-open")}catch{return!1}}function Kt(e,t){let n=document.querySelector(`[data-guide="${CSS.escape(e)}"]`);try{n||(n=t?[...document.querySelectorAll(t.css)].find(e=>Vt(e)&&(!t.text||e.innerText.includes(t.text)))??null:null)}catch{}return Vt(n)?n:null}function Gt({ctx:e,guide:t,index:n,reduced:r}){let i=t.steps[n],o=function(e,t,n){let[r,i]=ht(()=>e?Kt(e,t):null);return mt(()=>{if(!e)return i(null);let r=Kt(e,t);i(r);let o=0,a=()=>{o=0;let n=Kt(e,t);n!==r&&i(r=n)},l=new MutationObserver(()=>o||(o=requestAnimationFrame(a)));l.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-guide","hidden","style","class"]});let s=setTimeout(()=>!r&&n(e),3e3);return()=>{l.disconnect(),clearTimeout(s),cancelAnimationFrame(o)}},[e,t]),r}(i.anchor,i.find?.web,t=>e.dispatch({type:"anchor_missing",anchor:t})),a=xt(null);mt(()=>{if(!o)return;let t=t=>t.composedPath().includes(o)&&e.dispatch({type:"tap",anchor:i.anchor});return document.addEventListener("click",t,!0),()=>document.removeEventListener("click",t,!0)},[o]);let l=t.theme?.position??"bottom",s=function(e,t,n,r,i){let[o,a]=ht(null);return gt(()=>{let i=t.current;if(!i)return;if(!e){let e=()=>a({x:(innerWidth-i.offsetWidth)/2,y:"center"===r?(innerHeight-i.offsetHeight)/2:innerHeight-i.offsetHeight-24});e();let t=new ResizeObserver(e);return t.observe(i),addEventListener("resize",e),()=>{t.disconnect(),removeEventListener("resize",e)}}let o=e.getBoundingClientRect();(o.bottom<0||o.top>innerHeight)&&e.scrollIntoView({block:"center",behavior:Tt()?"auto":"smooth"});let l=()=>{let t=e.getBoundingClientRect(),r=Number.parseFloat(getComputedStyle(e).borderTopLeftRadius)||8;ge(e,i,{strategy:"fixed",placement:"auto"===n?"bottom":n,middleware:[_e(18),me({fallbackPlacements:["top","left","right"],padding:12}),he({padding:12})]}).then(({x:e,y:n})=>a({x:e,y:n,spot:{x:t.left-6,y:t.top-6,w:t.width+12,h:t.height+12,r:Math.min(r+6,(t.height+12)/2)}}))};l();let s=new ResizeObserver(l);s.observe(e),s.observe(i),addEventListener("scroll",l,{capture:!0,passive:!0}),addEventListener("resize",l);let c=setInterval(l,400);return()=>{s.disconnect(),clearInterval(c),removeEventListener("scroll",l,{capture:!0}),removeEventListener("resize",l)}},[e,r,n,...i]),o}(o,a,i.placement??"auto",l,[i.id]),c=xt("");mt(()=>{s&&c.current!==i.id&&(c.current=i.id,document.activeElement?.matches("input,textarea,select,[contenteditable]:not([contenteditable=false])")||a.current?.focus({preventScroll:!0}))},[i.id,s]);let[p,d]=ht(!1);mt(()=>{s&&!p&&requestAnimationFrame(()=>d(!0))},[s]),mt(()=>{let t=t=>{if("Tab"!==t.key||!a.current)return;let n=[...a.current.querySelectorAll('button,a,iframe,[tabindex="0"]')],r=t.composedPath().includes(a.current),i=n[0],l=n.at(-1),s=e.root.activeElement;r&&!t.shiftKey&&s===l?(t.preventDefault(),(o??i)?.focus()):r&&t.shiftKey&&s===i?(t.preventDefault(),(o??l)?.focus()):o&&document.activeElement===o&&(t.preventDefault(),(t.shiftKey?l:i)?.focus())};return document.addEventListener("keydown",t,!0),()=>document.removeEventListener("keydown",t,!0)},[o]);let u=s?.spot;return Ht(Fe,{children:[o&&u?Ht("div",{class:"spot","aria-hidden":"true",style:{width:`${u.w}px`,height:`${u.h}px`,transform:`translate(${u.x}px,${u.y}px)`,borderRadius:`${u.r}px`}}):!o&&"center"===l&&Ht("div",{class:"scrim","aria-hidden":"true"}),Ht(Wt,{ctx:e,guide:t,index:n,reduced:r,cardRef:a,style:s?{transform:`translate(${Math.round(s.x)}px,${Math.round(s.y)}px)`,transition:p?void 0:"none"}:{visibility:"hidden"}})]})}function Xt({ctx:e,handle:t}){let[,n]=ht(0),r=()=>n(e=>e+1),[i,o]=ht(!1),[a,l]=ht(),s=Tt();t.update=r,t.openLauncher=t=>{let n=document.activeElement;l(t??(n!==document.body&&n!==e.root.host?n??void 0:void 0)),o(!0)},mt(()=>{let t=t=>{if("Escape"!==t.key||t.defaultPrevented||!t.composedPath().includes(e.root.host)||qt())return;let n=e.engine.active;if(i)o(!1);else if("completed"===n?.status)e.dispatch({type:"close"});else if(n){let t=n.guide.steps[n.index],r=t.anchor?Kt(t.anchor,t.find?.web):null;e.dispatch({type:"hide"}),r?.focus({preventScroll:!0})}};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[i]),mt(()=>{let e=new MutationObserver(r),t=matchMedia("(prefers-color-scheme: dark)");for(let t of[document.documentElement,document.body])e.observe(t,{attributes:!0});return t.addEventListener("change",r),()=>{e.disconnect(),t.removeEventListener("change",r)}},[]);let c=e.engine.active,p=c?.guide,d=function(e,t,n){let r=Mt(n)??Mt(e.theme?.mode)??Mt(t);return r?"dark"==r:function(){for(let e of[document.documentElement,document.body]){if(!e)continue;let t=getComputedStyle(e).colorScheme,n=/\b(dark|light)\b/.exec(`${e.className} ${Object.values(e.dataset)} ${/^(dark|light)$/.test(t)?t:""}`);if(n)return"dark"==n[1]}}()??matchMedia("(prefers-color-scheme: dark)").matches}(e.config,e.options.colorMode,p?.theme?.mode)?"dark":"light";e.root.host.setAttribute("data-mode",d);let u=e.config.theme,f=p?.theme?.accent,_={};for(let[e,t]of Object.entries({...u?.[d],...p?.theme?.resolved?.[d]??(!u&&f&&{accent:f,"accent-hover":f,"on-accent":Pt(f)})}))_[`--ps-${e}`]=t;let h="running"===c?.status?c.guide.steps[c.index]:void 0;return Ht("div",{class:"l",style:_,children:[Ht(It,{ctx:e,open:i,setOpen:o,near:a}),!i&&"running"===c?.status&&Ht(Gt,{ctx:e,guide:c.guide,index:c.index,reduced:s},c.guide.id),!i&&"completed"===c?.status&&Ht(Bt,{ctx:e,guide:c.guide}),Ht("div",{class:"sr","aria-live":"polite",children:h?`Step ${c.index+1} of ${c.guide.steps.length}: ${Et(h.title,Nt(e))}`:c?"Level cleared":""})]})}return e.findAnchor=Kt,e.hostPopupOpen=qt,e.mount=function(e){let t=e.options,n=t=>{e.outbox.push(t)};new Promise((e,t)=>document.head.append(Object.assign(document.createElement("script"),{src:new URL("events.js",jt||location.href).href,integrity:"sha256-AseK8i2RbqbXQKFUcBWNC4a7ke+Nrh85Kuots5BQdv0=",crossOrigin:"anonymous",onload:()=>e(window.__playstep_events),onerror:()=>t(Error("events"))}))).then(({createTransport:r})=>{let i=r({appKey:t.appKey,url:t.eventsUrl,sdk:t.sdkName??"web",version:"0.5.1",preview:t.preview,userId:e.userId,send:t.transport});e.outbox.splice(0).forEach(i.push),n=i.push}).catch(t=>e.emit({type:"sdk_error",message:String(t)}));let r=document.createElement("style");r.textContent=':host{--ps-radius-md:14px;--ps-radius-lg:20px;--ps-font-display:"Bricolage Grotesque","Figtree",system-ui,sans-serif;--ps-font-sans:"Figtree",system-ui,-apple-system,"Segoe UI",sans-serif;--ps-clip-overlay:rgba(12,14,19,.72);--ps-ease:cubic-bezier(.2,.8,.2,1);--ps-accent:var(--ps-primary);--ps-accent-hover:var(--ps-primary-hover);--ps-on-accent:var(--ps-on-primary);--ps-surface:#fff;--ps-surface-sunken:#f5f6f9;--ps-surface-raised:#fff;--ps-line:#e3e6ec;--ps-ink:#151823;--ps-ink-secondary:#454b5c;--ps-ink-muted:#646b7d;--ps-primary:#2e5bff;--ps-primary-hover:#2149e6;--ps-primary-soft:#e8edff;--ps-primary-ink:#2149e6;--ps-on-primary:#fff;--ps-spark:#ffc933;--ps-spark-soft:#fff4cc;--ps-spark-ink:#7a5a00;--ps-on-spark:#151823;--ps-scrim:rgba(12,14,19,.64);--ps-tag-mint:#ddf5ea;--ps-chart-4:#14b37d;--ps-chart-5:#ff7a59;--ps-shadow-lg:0 20px 48px -12px rgba(21,24,35,.28),0 4px 10px rgba(21,24,35,.06);--ps-ring-focus:0 0 0 2px #fff,0 0 0 4px #2e5bff}:host([data-mode=dark]){--ps-surface:#161922;--ps-surface-sunken:#1d212b;--ps-surface-raised:#222633;--ps-line:#2a2f3c;--ps-ink:#f2f4f8;--ps-ink-secondary:#c5cad5;--ps-ink-muted:#959cad;--ps-primary:#7091ff;--ps-primary-hover:#8da7ff;--ps-primary-soft:#1c2550;--ps-primary-ink:#93abff;--ps-on-primary:#0c0e13;--ps-spark:#ffd452;--ps-spark-soft:#3a2f0a;--ps-spark-ink:#ffd86b;--ps-on-spark:#151823;--ps-scrim:rgba(0,0,0,.72);--ps-tag-mint:#0f2c22;--ps-chart-4:#3dd9a0;--ps-chart-5:#ff9478;--ps-shadow-lg:0 20px 48px -12px rgba(0,0,0,.8),0 4px 10px rgba(0,0,0,.5);--ps-ring-focus:0 0 0 2px #161922,0 0 0 4px #7091ff}:host{all:initial}*{box-sizing:border-box;margin:0}.l{position:fixed;inset:0;pointer-events:none;z-index:2147483000;font:400 14px/20px var(--ps-font-sans);color:var(--ps-ink);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;border:0;padding:0;background:none;cursor:pointer}button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:none;box-shadow:var(--ps-ring-focus)}svg{width:16px;height:16px;flex:none}.scrim{position:fixed;inset:0;background:var(--ps-scrim);pointer-events:auto}.spot,.card{position:fixed;left:0;top:0;transition:transform .36s var(--ps-ease),width .36s var(--ps-ease),height .36s var(--ps-ease)}.spot{box-shadow:0 0 0 9999px var(--ps-scrim)}.spot:after{content:"";position:absolute;inset:-4px;border-radius:18px;border:2px solid var(--ps-spark);animation:ring 1.8s ease-out infinite}.card,.cel,.panel{background:var(--ps-surface-raised);border-radius:var(--ps-radius-lg);box-shadow:var(--ps-shadow-lg);pointer-events:auto;outline:none}.card{width:336px;max-width:calc(100vw - 24px);padding:10px}.big{width:min(720px,calc(100vw - 24px))}.clip{position:relative;aspect-ratio:16/10;border-radius:var(--ps-radius-md);overflow:hidden;background:var(--ps-surface-sunken)}.clip>video,.clip>img,.clip>iframe{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border:0}.bar{position:absolute;left:8px;right:8px;bottom:8px;display:flex;align-items:center;gap:6px;color:#fff}.pill,.round{background:var(--ps-clip-overlay);border-radius:99px;display:inline-flex;align-items:center;justify-content:center}.pill{height:24px;padding:0 8px;gap:4px;font:700 11px/1 var(--ps-font-sans)}.pill svg{width:13px;height:13px}.round{width:28px;height:28px}.round svg{width:14px;height:14px}.bar .round:first-of-type{margin-left:auto}.play{position:absolute;inset:0;margin:auto;width:60px;height:60px;border-radius:50%;background:var(--ps-accent);color:var(--ps-on-accent);display:grid;place-items:center}.play svg{width:26px;height:26px}.body{padding:14px 8px 6px}.meta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted);margin-bottom:10px}.meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;margin:-6px -6px -6px 0}.x:hover,.gho:hover,.row:hover,.sec:hover{background:var(--ps-surface-sunken);color:var(--ps-ink)}.steps{display:flex;gap:4px;margin-bottom:12px}.seg{flex:1;height:6px;border-radius:99px;background:var(--ps-surface-sunken);overflow:hidden;position:relative}.done{background:var(--ps-accent)}.cur:after{content:"";position:absolute;left:0;top:0;bottom:0;width:55%;border-radius:99px;background:var(--ps-spark)}.anim:after{animation:fill var(--d,4s) linear infinite}.title,.cel h2,.panel h2{font:700 20px/26px var(--ps-font-display);letter-spacing:-.01em;margin-bottom:4px}.text,.cel p{color:var(--ps-ink-secondary)}.foot{display:flex;align-items:center;gap:8px;padding:14px 8px 4px}.wait,.sp{flex:1}.wait{display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted)}.pulse{width:8px;height:8px;border-radius:50%;background:var(--ps-spark);animation:pulse 1.6s ease-out infinite}.btn{height:32px;padding:0 14px;border-radius:var(--ps-radius-btn,99px);border:1px solid transparent;font-size:13px;line-height:18px;font-weight:600;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.pri{background:var(--ps-accent);color:var(--ps-on-accent)}.pri:hover{background:var(--ps-accent-hover)}.x{color:var(--ps-ink-muted)}.gho{color:var(--ps-ink-secondary)}.embed{background:#151823}.sec{background:var(--ps-surface);border-color:var(--ps-line)}.cel{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:336px;max-width:calc(100vw - 24px);padding:24px 20px 20px;text-align:center;overflow:hidden}.cel h2{font-size:24px;line-height:30px;font-weight:800}.cel p{margin-bottom:16px}.art{position:relative;height:72px;margin-bottom:8px}.tile{position:absolute;left:50%;top:4px;width:64px;height:64px;margin-left:-32px;border-radius:var(--ps-radius-lg);background:var(--ps-spark);color:var(--ps-on-spark);display:grid;place-items:center;animation:pop .6s cubic-bezier(.2,1.6,.4,1) both}.tile svg{width:30px;height:30px}.bit{position:absolute;border-radius:99px}.acts{display:flex;justify-content:center;gap:12px}.lb{position:fixed;bottom:24px;right:24px;width:56px;height:56px;border-radius:50%;background:var(--ps-accent);color:var(--ps-on-accent);box-shadow:var(--ps-shadow-lg);display:grid;place-items:center;pointer-events:auto}.lb svg{width:26px;height:26px}.cnt{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:var(--ps-spark);color:var(--ps-on-spark);font:800 11px/20px var(--ps-font-sans)}.panel{position:fixed;right:24px;bottom:96px;width:320px;max-width:calc(100vw - 36px);max-height:calc(100vh - 120px);overflow:auto;padding:16px}.left{right:auto;left:24px}.solo{bottom:24px}.panel .x{float:right}.panel>p{font-size:13px;line-height:18px;color:var(--ps-ink-muted);margin:-2px 0 12px}.rows{list-style:none;padding:0}.row{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border-radius:var(--ps-radius-md);text-align:left}.ti{width:36px;height:36px;flex:none;border-radius:var(--ps-radius-md);display:grid;place-items:center;background:var(--ps-primary-soft);color:var(--ps-primary-ink)}.ti.spark{background:var(--ps-spark-soft);color:var(--ps-spark-ink)}.ti.mint{background:var(--ps-tag-mint);color:var(--ps-ink)}.ti svg{width:18px;height:18px}.rb{flex:1;min-width:0}.rt,.rm{display:block;font-weight:600}.rm{font-size:12px;line-height:16px;font-weight:500;color:var(--ps-ink-muted)}.prog{display:block;height:6px;border-radius:99px;background:var(--ps-surface-sunken);margin-top:6px;overflow:hidden}.prog i{display:block;height:100%;background:var(--ps-accent)}.rp{display:flex;align-items:center;gap:4px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted)}.so{margin-top:8px}.new{height:24px;padding:0 10px;border-radius:99px;background:var(--ps-spark-soft);color:var(--ps-spark-ink);font-size:12px;line-height:24px;font-weight:600}.pb{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:10px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted);text-decoration:none}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}@keyframes ring{to{opacity:0;transform:scale(1.12)}}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--ps-spark)}70%,to{box-shadow:0 0 0 8px transparent}}@keyframes fill{0%{width:0}to{width:100%}}@keyframes pop{0%{opacity:0;transform:scale(.4) rotate(-12deg)}}@media (max-width:480px){.card{width:300px}.title{font-size:17px;line-height:22px}.lb{right:18px;bottom:18px}.panel{right:18px;bottom:86px}.solo{bottom:18px}.left{right:auto;left:18px}}@media (prefers-reduced-motion:reduce){.spot,.card{transition:none}.spot:after,.pulse,.cur:after,.tile{animation:none}}',e.root.appendChild(r);let i=document.createElement("div");e.root.appendChild(i);let o={update:()=>{},openLauncher:()=>{},send:e=>n(e)};return function(e,t){var n,r,i,o;xe.__&&xe.__(e,t),9==t.nodeType&&(t=t.documentElement),r=(n=e&&32&e.__u)?null:t.__k,t.__k=De(Fe,{children:[e]}),i=[],o=[],Ke(t,t.__k,r||Me,Me,t.namespaceURI,r?null:t.firstChild?$e.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,o),Xe(i,t.__k,o),t.__k.props.children=null}(Ht(Xt,{ctx:e,handle:o}),i),o},e}({});
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./sdk-
|
|
1
|
+
import{n as e}from"./sdk-uFgPUdIh.js";const t=e(()=>import(`./ui-DBJLPgG5.js`),()=>import(`./launcher-button-DMxEcXwn.js`),()=>import(`./capture-BhZiRrIB.js`));export{t as default,t as playstep};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./util-oI8xpB8k.js";const t=e=>RegExp(`^${e.replace(/[.+?^${}()|[\]\\]/g,`\\$&`).replace(/\*/g,`.*`)}$`),n=e=>e.length>1?e.replace(/\/+$/,``):e;function r(e,r){return!!e&&r!==void 0&&t(n(e)).test(n(r))}function i(e,t){return(e??[]).every(e=>{let n=t[e.trait];return e.op===`exists`?n!=null:e.op===`in`?Array.isArray(e.value)&&e.value.includes(n):n===e.value==(e.op===`eq`)})}function a(e){let{config:t,platform:n}=e,a=e.progress??{seen:!1,guides:{}},o=e.traits??{},s=null,c,l=/* @__PURE__ */ new Set,u=t.flags||{},d=(t.guides??[]).filter(e=>e.spec_version<=3&&(e.targeting?.platforms??[`web`]).includes(n)),f=e=>d.find(t=>t.id===e),p=(e,t,n)=>({type:e,guide_id:t.id,guide_version:t.version,...n>=0&&{step_id:t.steps[n].id,step_index:n}}),m=e=>!u.disabled&&(!u.paused_for_new_users||a.seen)&&i(e.targeting?.segments,o),h=e=>{let t=a.guides[e.id];return!s&&!l.has(e.id)&&m(e)&&(!t||t.status!==`done`&&(t.status===`running`||!e.trigger.once))},g=(e,t,n)=>{a.guides[e.id]={version:e.version,step:n,status:t}},_,v=e=>r(e.path,_),y=e=>r(e.skip_if_on,_)||v(e.complete_on),b=(e,t,n)=>{for(;t<e.steps.length;){if(s={guide:e,index:t,status:`running`},c=void 0,g(e,`running`,t),n.push(p(`step_shown`,e,t)),!y(e.steps[t]))return n;n.push(p(`step_completed`,e,t++))}return s={guide:e,index:--t,status:`completed`},g(e,`done`,t),n.push(p(`guide_completed`,e)),n},x=(e,t)=>(a.seen=!0,b(e,t,[p(`guide_shown`,e)])),S=()=>{let e=s;return s=null,e?.status===`running`?(g(e.guide,`dismissed`,e.index),[p(`guide_dismissed`,e.guide,e.index)]):[]},C=()=>{let e=s;return b(e.guide,e.index+1,[p(`step_completed`,e.guide,e.index)])},w=e=>{let t=d.find(t=>h(t)&&e(t));return t?x(t,0):[]},T=()=>(l.clear(),w(e=>e.trigger.type===`first_visit`||v(e.trigger)));function E(e){let t=s?.status===`running`?s.guide.steps[s.index]:null;switch(e.type){case`init`:{_=e.path;let t=d.find(e=>a.guides[e.id]?.status===`running`&&m(e));if(t){let e=a.guides[t.id];return x(t,e.version===t.version?e.step:0)}return T()}case`page_view`:return _=e.path,t&&y(t)?C():w(e=>v(e.trigger));case`reset_progress`:{let t=typeof e.guide==`string`&&f(e.guide);return t===void 0?[]:((!t||s?.guide===t)&&(s=null),t?delete a.guides[t.id]:a.guides={},[{type:`progress_reset`,guide_id:t?t.id:void 0},...T()])}case`event`:return t?.complete_on.type===`event`&&t.complete_on.name===e.name?C():w(t=>t.trigger.type===`event`&&t.trigger.name===e.name);case`tap`:return t?.complete_on.type===`tap_anchor`&&t.anchor===e.anchor?C():[];case`complete`:return t?.id===e.step?C():[];case`next`:return t?.complete_on.type===`next_button`?C():[];case`back`:return!t||s.index===0?[]:(s={...s,index:s.index-1},g(s.guide,`running`,s.index),[p(`step_shown`,s.guide,s.index)]);case`hide`:return t&&(l.add(s.guide.id),s=null),[];case`close`:if(s?.status!==`completed`)return[];case`dismiss`:return S();case`start`:{let n=f(e.guide);return!n||!m(n)||t&&s.guide===n&&n.steps.slice(0,s.index).every(y)?[]:S().concat(x(n,0))}case`anchor_missing`:return!t||t.anchor!==e.anchor||c===e.anchor?[]:(c=e.anchor,[{...p(`anchor_missing`,s.guide,s.index),anchor:e.anchor}]);case`identify`:return o={...o,...e.traits},[]}}return{get active(){return s},progress:a,dispatch:E,launcherGuides:()=>d.filter(e=>e.launcher!==!1&&m(e))}}const o=`0.5.1`,s=`playstep_preview`;function c(t,n,r,i=`web`){let c,l,u,d,f,p,m,h={},g=[],_=[],v=()=>`p:${c.appKey}`,y=()=>c.preview||e.set(v(),l.progress),b=e=>{let t={...e,ts:Date.now()};c?.preview||(d?d.send(t):_.push(t)),c?.onEvent?.(t)},x=e=>{try{b({type:`sdk_error`,message:String(e)})}catch{}},S=e=>(...t)=>{try{e(...t)}catch(e){x(e)}},C=(e,t)=>S(n=>w({type:e,[t]:n}));function w(t){if(!l)return void g.push(t);let n=l.dispatch(t);y(),n.forEach(S(b)),(l.active||e.get(`q`))&&E(),d?.update()}function T(){return p??(p=document.body.appendChild(document.createElement(`playstep-root`)).attachShadow({mode:`open`}))}function E(){return f??(f=t().then(e=>{let t=T();return t.innerHTML=``,d=e.mount({engine:l,config:u,options:c,root:t,outbox:_,userId:()=>m,dispatch:S(w),emit:S(b)})}).catch(x))}let D,O=S((e={})=>{l?l.launcherGuides().length&&E().then(t=>t?.openLauncher(e.anchor)):D=e});function k(e){e.launcher?.enabled&&l.launcherGuides().length&&!f&&n&&n().then(t=>{f||t.drawLauncher(T(),l,e,O,c)}).catch(x)}async function A(){let t=c,n=(t.apiBase??`https://cdn.playstep.app`).replace(/\/$/,``),o=null;try{o=new URLSearchParams(location.search).get(s)||(t.config?null:sessionStorage.getItem(s))}catch{}t.preview||(t.preview=!!(t.config||o));let d=t.config;try{d??(d=await fetch(`${n}/v1/${o?`preview/${o}?key=`:`config/`}${t.appKey}`).then(e=>e.json()))}catch{return}try{o&&sessionStorage[d.guides?`setItem`:`removeItem`](s,o)}catch{}if(d?.capture)return void r?.().then(e=>e.start(d.capture,t.appKey)).catch(x);if(d?.guides&&!d.flags?.disabled&&(u=d,t.eventsUrl=d.ingest_url??`${n}/v1/events`,l=a({config:d,platform:i,progress:t.preview?void 0:e.get(v())??void 0,traits:h}),w({type:`init`,path:location.pathname}),g.splice(0).forEach(w),D&&O(D),k(d),t.autoPageViews!==!1)){let e=location.pathname,t=S(()=>location.pathname!==e&&w({type:`page_view`,path:e=location.pathname}));for(let e of[`pushState`,`replaceState`]){let n=history[e];history[e]=function(...e){n.apply(this,e),t()}}addEventListener(`popstate`,t)}}return{version:o,init:S(e=>{if(c||!e?.appKey)return;c={...e};let t=()=>setTimeout(()=>A().catch(x));document.readyState===`complete`?t():addEventListener(`load`,t)}),identify:S((e,t)=>{m=e,h={...h,...t},w({type:`identify`,traits:h})}),track:C(`event`,`name`),start:C(`start`,`guide`),complete:C(`complete`,`step`),page:S(e=>w({type:`page_view`,path:e??location.pathname})),openLauncher:O,resetProgress:C(`reset_progress`,`guide`),reset:S(()=>{w({type:`dismiss`}),m=void 0,h={},l&&(Object.assign(l.progress,{seen:!1,guides:{}}),y(),d?.update()),c?.preview||e.set(`d`,null)})}}export{c as n,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./sdk-uFgPUdIh.js";import{t}from"./util-oI8xpB8k.js";import{t as n}from"./mode-CPlpg1Yl.js";import{computePosition as r,flip as i,offset as a,shift as o}from"@floating-ui/dom";import{render as s}from"preact";import{useEffect as c,useLayoutEffect as l,useRef as u,useState as d}from"preact/hooks";import{Fragment as f,jsx as p,jsxs as m}from"preact/jsx-runtime";function h(e,t,n=`en`){return e?e[t]??e[t.split(`-`)[0]]??e[n]??Object.values(e)[0]??``:``}function g(e){try{let t=new URL(e),n=t.hostname.replace(/^(www|m)\./,``),r;if(n===`youtu.be`?r=t.pathname.slice(1):n===`youtube.com`&&(r=t.searchParams.get(`v`)??t.pathname.match(/^\/(?:embed|shorts)\/([\w-]+)/)?.[1]),r)return{src:`https://www.youtube-nocookie.com/embed/${r}?autoplay=1&rel=0`,thumb:`https://i.ytimg.com/vi/${r}/hqdefault.jpg`};if(r=n===`vimeo.com`||n===`player.vimeo.com`?t.pathname.match(/(\d{5,})/)?.[1]:null,r)return{src:`https://player.vimeo.com/video/${r}?autoplay=1`}}catch{}return null}const _=e=>{let t=Math.round(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`};function v(e){let t=Number.parseInt(e.slice(1),16),n=e=>(e/=255)<=.03928?e/12.92:((e+.055)/1.055)**2.4,r=.2126*n(t>>16&255)+.7152*n(t>>8&255)+.0722*n(t&255);return 1.05/(r+.05)>=(r+.05)/.0595?`#ffffff`:`#151823`}const y={x:`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`,play:`<path d="M5 5a2 2 0 0 1 3-1.7l12 7a2 2 0 0 1 0 3.5l-12 7A2 2 0 0 1 5 19z"/>`,"volume-2":`<path d="M11 4.7a.7.7 0 0 0-1.2-.5L6.4 7.6A1.4 1.4 0 0 1 5.4 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.4a1.4 1.4 0 0 1 1 .4l3.4 3.4A.7.7 0 0 0 11 19.3z"/><path d="M16 9a5 5 0 0 1 0 6"/><path d="M19.4 18.4a9 9 0 0 0 0-12.7"/>`,"volume-x":`<path d="M11 4.7a.7.7 0 0 0-1.2-.5L6.4 7.6A1.4 1.4 0 0 1 5.4 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.4a1.4 1.4 0 0 1 1 .4l3.4 3.4A.7.7 0 0 0 11 19.3z"/><path d="m16.5 14.5 5-5"/><path d="m16.5 9.5 5 5"/>`,check:`<path d="M20 6 9 17l-5-5"/>`,"maximize-2":`<path d="M15 3h6v6"/><path d="m21 3-7 7"/><path d="m3 21 7-7"/><path d="M9 21H3v-6"/>`,"arrow-right":`<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>`,"rotate-ccw":`<path d="M3 12a9 9 0 1 0 9-9 9.8 9.8 0 0 0-6.7 2.7L3 8"/><path d="M3 3v5h5"/>`,"external-link":`<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>`,"ps-launcher":`<path d="M12 21a9 9 0 1 0-8-5L3 21l5-.9A9 9 0 0 0 12 21z"/><path d="M10 9v6l5-3z"/>`,"ps-level-up":`<path d="M3 21h5v-4h5v-4h5V9"/><path d="M18 9V3l4 2.5L18 8"/>`,"ps-guide":`<rect x="4" y="3" width="4" height="18" rx="2"/><path d="M12 5.5v10l7.5-5z"/>`};function b({name:e}){return/* @__PURE__ */ p(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:y[e]}})}function x(e){try{let t=JSON.parse(sessionStorage.getItem(`playstep:clips`)??`[]`);if(t.includes(e))return!1;sessionStorage.setItem(`playstep:clips`,JSON.stringify([...t,e].slice(-200)))}catch{}return!0}const S=e=>e.options.locale??navigator.language??`en`,C=(e,t)=>h(t.name,S(e),t.locale_default)||t.id;function w({ctx:e,guide:t,index:n,reduced:r,clip:i,big:a,onExpand:o,onDuration:s}){let l=t.steps[n],v=u(null),[y,C]=d(!0),[w,T]=d(!r&&i.source!==`embed`),[E,D]=d(i.duration_ms??0),O=r=>e.emit({type:r,guide_id:t.id,guide_version:t.version,step_id:l.id,step_index:n,clip_id:i.source===`hosted`?i.clip_id:void 0,clip_source:i.source}),k=e=>x(`${e}|${i.url}`)&&O(e);if(c(()=>{let e=v.current;e&&w&&(e.muted=y,e.play()?.catch(()=>{}))},[w,i.url]),c(()=>s(w&&i.source!==`embed`?E:0),[E,w]),i.source===`embed`){let t=g(i.url),n=new URL(i.url).hostname.replace(/^www\./,``);return/* @__PURE__ */ p(`div`,{class:`clip embed`,children:w&&t?/* @__PURE__ */ p(`iframe`,{src:t.src,title:`Video: ${h(l.title,S(e))}`,allow:`autoplay; encrypted-media; picture-in-picture; fullscreen`,allowFullScreen:!0}):/* @__PURE__ */ m(f,{children:[(i.poster??t?.thumb)&&/* @__PURE__ */ p(`img`,{src:i.poster??t?.thumb,alt:``}),/* @__PURE__ */ p(`button`,{class:`play`,"aria-label":`Play video`,onClick:()=>(T(!0),O(`clip_played`)),children:/* @__PURE__ */ p(b,{name:`play`})}),/* @__PURE__ */ p(`div`,{class:`bar`,children:/* @__PURE__ */ m(`span`,{class:`pill`,children:[/* @__PURE__ */ p(b,{name:`external-link`}),n,E?` · ${_(E)}`:``]})})]})})}return/* @__PURE__ */ m(`div`,{class:`clip`,children:[w?/* @__PURE__ */ p(`video`,{ref:v,src:i.url,poster:i.poster,muted:y,loop:!0,autoplay:!0,playsInline:!0,preload:`auto`,"aria-label":`Clip: ${h(l.title,S(e))}`,onLoadedData:()=>k(`clip_loaded`),onPlaying:()=>k(`clip_played`),onLoadedMetadata:e=>{let t=e.currentTarget.duration;Number.isFinite(t)&&D(t*1e3)}}):/* @__PURE__ */ m(f,{children:[i.poster&&/* @__PURE__ */ p(`img`,{src:i.poster,alt:``}),/* @__PURE__ */ p(`button`,{class:`play`,"aria-label":`Play clip`,onClick:()=>T(!0),children:/* @__PURE__ */ p(b,{name:`play`})})]}),w&&/* @__PURE__ */ m(`div`,{class:`bar`,children:[/* @__PURE__ */ m(`span`,{class:`pill`,children:[/* @__PURE__ */ p(b,{name:`play`}),E?`${_(E)} loop`:`Loop`]}),/* @__PURE__ */ p(`button`,{class:`round`,"aria-label":y?`Unmute clip`:`Mute clip`,onClick:()=>{C(!y),v.current&&(v.current.muted=!y),y&&O(`clip_unmuted`)},children:/* @__PURE__ */ p(b,{name:y?`volume-x`:`volume-2`})}),/* @__PURE__ */ p(`button`,{class:`round`,"aria-label":a?`Shrink clip`:`Expand clip`,"aria-pressed":a,onClick:o,children:/* @__PURE__ */ p(b,{name:`maximize-2`})})]})]})}function T({ctx:e,guide:t,index:n,reduced:r,cardRef:i,style:a}){let o=t.steps[n],s=t.steps.length,[l,u]=d(!1),[f,g]=d(0),_=n=>h(n,S(e),t.locale_default),v=o.complete_on.type===`next_button`;return c(()=>{u(!1);let i=t.steps[n+1],a=i?.clip;if(a&&a.source!==`embed`&&!r&&!navigator.connection?.saveData){let r=document.createElement(`video`);r.preload=`auto`,r.muted=!0,r.src=a.url,a.source===`hosted`&&x(`clip_loaded|${a.url}`)&&e.emit({type:`clip_loaded`,guide_id:t.id,guide_version:t.version,step_id:i.id,step_index:n+1,clip_id:a.clip_id,clip_source:`hosted`})}},[t.id,n]),/* @__PURE__ */ m(`div`,{ref:i,class:`card${l?` big`:``}`,style:a,role:`dialog`,"aria-modal":`false`,"aria-labelledby":`ps-title`,"aria-describedby":`ps-text`,tabIndex:-1,"data-step":o.id,children:[o.clip&&/* @__PURE__ */ p(w,{ctx:e,guide:t,index:n,reduced:r,clip:o.clip,big:l,onExpand:()=>u(!l),onDuration:g},o.id),/* @__PURE__ */ m(`div`,{class:`body`,children:[/* @__PURE__ */ m(`div`,{class:`meta`,children:[/* @__PURE__ */ m(`span`,{children:[`Step `,n+1,` of `,s,` · `,C(e,t)]}),/* @__PURE__ */ p(`button`,{class:`x`,"aria-label":`Close guide`,onClick:()=>e.dispatch({type:`dismiss`}),children:/* @__PURE__ */ p(b,{name:`x`})})]}),/* @__PURE__ */ p(`div`,{class:`steps`,role:`img`,"aria-label":`Step ${n+1} of ${s}`,children:t.steps.map((e,t)=>/* @__PURE__ */ p(`span`,{class:`seg${t<n?` done`:t===n?` cur${f&&!r?` anim`:``}`:``}`,style:t===n&&f?{"--d":`${f}ms`}:void 0},t))}),/* @__PURE__ */ p(`h2`,{class:`title`,id:`ps-title`,children:_(o.title)}),/* @__PURE__ */ p(`p`,{class:`text`,id:`ps-text`,children:_(o.body)})]}),/* @__PURE__ */ m(`div`,{class:`foot`,children:[v?/* @__PURE__ */ p(`span`,{class:`sp`}):/* @__PURE__ */ m(`span`,{class:`wait`,children:[/* @__PURE__ */ p(`span`,{class:`pulse`,"aria-hidden":`true`}),`Waiting for you`]}),n>0&&t.steps[n-1].complete_on.type!==`page`&&!t.steps[n-1].skip_if_on&&/* @__PURE__ */ p(`button`,{class:`btn gho`,onClick:()=>e.dispatch({type:`back`}),children:`Back`}),v&&/* @__PURE__ */ m(`button`,{class:`btn pri`,onClick:()=>e.dispatch({type:`next`}),children:[n+1===s?`Done`:`Next`,/* @__PURE__ */ p(b,{name:`arrow-right`})]})]})]})}const E=[`width:22px;height:8px;left:22%;top:14px;transform:rotate(-20deg);background:var(--ps-accent)`,`width:10px;height:10px;left:30%;top:46px;background:var(--ps-spark)`,`width:12px;height:12px;right:24%;top:10px;background:var(--ps-chart-4)`,`width:24px;height:8px;right:20%;top:44px;transform:rotate(24deg);background:var(--ps-chart-5)`,`width:8px;height:8px;left:16%;top:60px;background:var(--ps-chart-5)`,`width:8px;height:8px;right:30%;top:64px;background:var(--ps-accent)`];function D({ctx:e,guide:t}){let n=e.engine.launcherGuides().find(n=>n.id!==t.id&&e.engine.progress.guides[n.id]?.status!==`done`),r=u(null);return c(()=>r.current?.focus(),[]),/* @__PURE__ */ m(f,{children:[/* @__PURE__ */ p(`div`,{class:`scrim`,onClick:()=>e.dispatch({type:`close`})}),/* @__PURE__ */ m(`div`,{class:`cel`,ref:r,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`ps-cel`,tabIndex:-1,children:[/* @__PURE__ */ m(`div`,{class:`art`,"aria-hidden":`true`,children:[E.map((e,t)=>/* @__PURE__ */ p(`span`,{class:`bit`,style:e},t)),/* @__PURE__ */ p(`span`,{class:`tile`,children:/* @__PURE__ */ p(b,{name:`ps-level-up`})})]}),/* @__PURE__ */ p(`h2`,{id:`ps-cel`,children:`Level cleared`}),/* @__PURE__ */ m(`p`,{children:[`You finished `,C(e,t),`.`,n?` Next up: ${C(e,n)}.`:``]}),/* @__PURE__ */ m(`div`,{class:`acts`,children:[/* @__PURE__ */ m(`button`,{class:`btn sec`,onClick:()=>e.dispatch({type:`start`,guide:t.id}),children:[/* @__PURE__ */ p(b,{name:`rotate-ccw`}),`Replay`]}),n?/* @__PURE__ */ m(`button`,{class:`btn pri`,onClick:()=>e.dispatch({type:`start`,guide:n.id}),children:[`Next guide`,/* @__PURE__ */ p(b,{name:`arrow-right`})]}):/* @__PURE__ */ p(`button`,{class:`btn pri`,onClick:()=>e.dispatch({type:`close`}),children:`Done`})]})]})]})}function O({ctx:e,open:t,setOpen:n,near:s}){let d=u(null);l(()=>{let e=d.current;e&&(e.style.cssText=``,s&&r(s,e,{strategy:`fixed`,placement:`top-start`,middleware:[a(8),i({padding:12}),o({padding:12})]}).then(({x:t,y:n})=>e.style.cssText=`left:${t}px;top:${n}px;right:auto;bottom:auto`))},[t,s]);let g=u(null);c(()=>{t?(g.current=e.root.activeElement??document.activeElement,d.current?.focus()):g.current?.focus()},[t]);let _=e.config.launcher,v=e.engine.launcherGuides();if(!v.length)return null;let y=e.engine.progress.guides,x=v.filter(e=>!y[e.id]).length,w=_?.position===`bottom-left`?` left`:``;return/* @__PURE__ */ m(f,{children:[t&&/* @__PURE__ */ m(`div`,{class:`panel${w}${_?.enabled?``:` solo`}`,ref:d,tabIndex:-1,role:`dialog`,"aria-label":`Guides`,children:[/* @__PURE__ */ p(`button`,{class:`x`,"aria-label":`Close guides`,onClick:()=>n(!1),children:/* @__PURE__ */ p(b,{name:`x`})}),/* @__PURE__ */ p(`h2`,{children:h(_?.title,S(e))||`Need a hand?`}),/* @__PURE__ */ p(`p`,{children:h(_?.description,S(e))||`Pick a guide and play it step by step.`}),/* @__PURE__ */ p(`ul`,{class:`rows`,children:v.map(t=>{let r=y[t.id],i=t.steps.length,a=r?.status===`done`,o=r?.status===`running`;return/* @__PURE__ */ p(`li`,{children:/* @__PURE__ */ m(`button`,{class:`row`,onClick:()=>{n(!1),r&&e.dispatch({type:`reset_progress`,guide:t.id}),e.dispatch({type:`start`,guide:t.id})},children:[/* @__PURE__ */ p(`span`,{class:`ti${a?` mint`:r?``:` spark`}`,children:/* @__PURE__ */ p(b,{name:a?`check`:`ps-guide`})}),/* @__PURE__ */ m(`span`,{class:`rb`,children:[/* @__PURE__ */ p(`span`,{class:`rt`,children:C(e,t)}),/* @__PURE__ */ p(`span`,{class:`rm`,children:a?`Completed`:o?`Step ${r.step+1} of ${i}`:`${i} steps`}),o&&/* @__PURE__ */ p(`span`,{class:`prog`,"aria-hidden":`true`,children:/* @__PURE__ */ p(`i`,{style:{width:`${r.step/i*100}%`}})})]}),r?/* @__PURE__ */ m(`span`,{class:`rp`,children:[/* @__PURE__ */ p(b,{name:`rotate-ccw`}),`Replay`]}):/* @__PURE__ */ p(`span`,{class:`new`,children:`New`})]})},t.id)})}),v.some(e=>y[e.id])&&/* @__PURE__ */ p(`div`,{class:`acts so`,children:/* @__PURE__ */ p(`button`,{class:`btn gho`,onClick:()=>{e.dispatch({type:`reset_progress`}),e.engine.active?n(!1):d.current?.focus()},children:`Start over`})}),e.config.flags?.show_badge!==!1&&/* @__PURE__ */ m(`a`,{class:`pb`,href:`https://playstep.app/?ref=badge`,target:`_blank`,rel:`noopener`,children:[/* @__PURE__ */ p(`span`,{dangerouslySetInnerHTML:{__html:`<svg viewBox="0 0 48 48" aria-hidden="true"><rect width="48" height="48" rx="13" fill="#2E5BFF"/><rect x="11" y="10" width="8" height="28" rx="4" fill="#fff"/><path d="M23.5 12v17l12-8.5z" fill="#FFC933" stroke="#FFC933" stroke-width="3.5" stroke-linejoin="round"/></svg>`},style:`display:inline-flex;width:16px;height:16px`}),`Powered by PlayStep`]})]}),_?.enabled&&/* @__PURE__ */ m(`button`,{class:`lb${w}`,"aria-label":t?`Close guides`:`Open guides`,"aria-expanded":t,onClick:()=>n(!t),children:[/* @__PURE__ */ p(b,{name:`ps-launcher`}),x>0&&!t&&/* @__PURE__ */ p(`span`,{class:`cnt`,children:x})]})]})}document.currentScript?.src;const k=()=>import(`./transport-Cu51h2G6.js`),A=e=>!!e?.getClientRects().length;function j(){if([...document.querySelectorAll(`[aria-modal="true"],[role="dialog"],[role="alertdialog"],[role="listbox"],[role="menu"]`)].some(A))return!0;try{return!!document.querySelector(`:popover-open`)}catch{return!1}}function M(e,t){let n=document.querySelector(`[data-guide="${CSS.escape(e)}"]`);try{n||(n=t?[...document.querySelectorAll(t.css)].find(e=>A(e)&&(!t.text||e.innerText.includes(t.text)))??null:null)}catch{}return A(n)?n:null}function N(e,t,n){let[r,i]=d(()=>e?M(e,t):null);return c(()=>{if(!e)return i(null);let r=M(e,t);i(r);let a=0,o=()=>{a=0;let n=M(e,t);n!==r&&i(r=n)},s=new MutationObserver(()=>a||(a=requestAnimationFrame(o)));s.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-guide`,`hidden`,`style`,`class`]});let c=setTimeout(()=>!r&&n(e),3e3);return()=>{s.disconnect(),clearTimeout(c),cancelAnimationFrame(a)}},[e,t]),r}function P(e,n,s,c,u){let[f,p]=d(null);return l(()=>{let l=n.current;if(!l)return;if(!e){let e=()=>p({x:(innerWidth-l.offsetWidth)/2,y:c===`center`?(innerHeight-l.offsetHeight)/2:innerHeight-l.offsetHeight-24});e();let t=new ResizeObserver(e);return t.observe(l),addEventListener(`resize`,e),()=>{t.disconnect(),removeEventListener(`resize`,e)}}let u=e.getBoundingClientRect();(u.bottom<0||u.top>innerHeight)&&e.scrollIntoView({block:`center`,behavior:t()?`auto`:`smooth`});let d=()=>{let t=e.getBoundingClientRect(),n=Number.parseFloat(getComputedStyle(e).borderTopLeftRadius)||8;r(e,l,{strategy:`fixed`,placement:s===`auto`?`bottom`:s,middleware:[a(18),i({fallbackPlacements:[`top`,`left`,`right`],padding:12}),o({padding:12})]}).then(({x:e,y:r})=>p({x:e,y:r,spot:{x:t.left-6,y:t.top-6,w:t.width+12,h:t.height+12,r:Math.min(n+6,(t.height+12)/2)}}))};d();let f=new ResizeObserver(d);f.observe(e),f.observe(l),addEventListener(`scroll`,d,{capture:!0,passive:!0}),addEventListener(`resize`,d);let m=setInterval(d,400);return()=>{f.disconnect(),clearInterval(m),removeEventListener(`scroll`,d,{capture:!0}),removeEventListener(`resize`,d)}},[e,c,s,...u]),f}function F({ctx:e,guide:t,index:n,reduced:r}){let i=t.steps[n],a=N(i.anchor,i.find?.web,t=>e.dispatch({type:`anchor_missing`,anchor:t})),o=u(null);c(()=>{if(!a)return;let t=t=>t.composedPath().includes(a)&&e.dispatch({type:`tap`,anchor:i.anchor});return document.addEventListener(`click`,t,!0),()=>document.removeEventListener(`click`,t,!0)},[a]);let s=t.theme?.position??`bottom`,l=P(a,o,i.placement??`auto`,s,[i.id]),h=u(``);c(()=>{l&&h.current!==i.id&&(h.current=i.id,document.activeElement?.matches(`input,textarea,select,[contenteditable]:not([contenteditable=false])`)||o.current?.focus({preventScroll:!0}))},[i.id,l]);let[g,_]=d(!1);c(()=>{l&&!g&&requestAnimationFrame(()=>_(!0))},[l]),c(()=>{let t=t=>{if(t.key!==`Tab`||!o.current)return;let n=[...o.current.querySelectorAll(`button,a,iframe,[tabindex="0"]`)],r=t.composedPath().includes(o.current),i=n[0],s=n.at(-1),c=e.root.activeElement;r&&!t.shiftKey&&c===s?(t.preventDefault(),(a??i)?.focus()):r&&t.shiftKey&&c===i?(t.preventDefault(),(a??s)?.focus()):a&&document.activeElement===a&&(t.preventDefault(),(t.shiftKey?s:i)?.focus())};return document.addEventListener(`keydown`,t,!0),()=>document.removeEventListener(`keydown`,t,!0)},[a]);let v=l?.spot;return/* @__PURE__ */ m(f,{children:[a&&v?/* @__PURE__ */ p(`div`,{class:`spot`,"aria-hidden":`true`,style:{width:`${v.w}px`,height:`${v.h}px`,transform:`translate(${v.x}px,${v.y}px)`,borderRadius:`${v.r}px`}}):!a&&s===`center`&&/* @__PURE__ */ p(`div`,{class:`scrim`,"aria-hidden":`true`}),/* @__PURE__ */ p(T,{ctx:e,guide:t,index:n,reduced:r,cardRef:o,style:l?{transform:`translate(${Math.round(l.x)}px,${Math.round(l.y)}px)`,transition:g?void 0:`none`}:{visibility:`hidden`}})]})}function I({ctx:e,handle:r}){let[,i]=d(0),a=()=>i(e=>e+1),[o,s]=d(!1),[l,u]=d(),f=t();r.update=a,r.openLauncher=t=>{let n=document.activeElement;u(t??(n!==document.body&&n!==e.root.host?n??void 0:void 0)),s(!0)},c(()=>{let t=t=>{if(t.key!==`Escape`||t.defaultPrevented||!t.composedPath().includes(e.root.host)||j())return;let n=e.engine.active;if(o)s(!1);else if(n?.status===`completed`)e.dispatch({type:`close`});else if(n){let t=n.guide.steps[n.index],r=t.anchor?M(t.anchor,t.find?.web):null;e.dispatch({type:`hide`}),r?.focus({preventScroll:!0})}};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[o]),c(()=>{let e=new MutationObserver(a),t=matchMedia(`(prefers-color-scheme: dark)`);for(let t of[document.documentElement,document.body])e.observe(t,{attributes:!0});return t.addEventListener(`change`,a),()=>{e.disconnect(),t.removeEventListener(`change`,a)}},[]);let g=e.engine.active,_=g?.guide,y=n(e.config,e.options.colorMode,_?.theme?.mode)?`dark`:`light`;e.root.host.setAttribute(`data-mode`,y);let b=e.config.theme,x=_?.theme?.accent,C={};for(let[e,t]of Object.entries({...b?.[y],..._?.theme?.resolved?.[y]??(!b&&x&&{accent:x,"accent-hover":x,"on-accent":v(x)})}))C[`--ps-${e}`]=t;let w=g?.status===`running`?g.guide.steps[g.index]:void 0;return/* @__PURE__ */ m(`div`,{class:`l`,style:C,children:[/* @__PURE__ */ p(O,{ctx:e,open:o,setOpen:s,near:l}),!o&&g?.status===`running`&&/* @__PURE__ */ p(F,{ctx:e,guide:g.guide,index:g.index,reduced:f},g.guide.id),!o&&g?.status===`completed`&&/* @__PURE__ */ p(D,{ctx:e,guide:g.guide}),/* @__PURE__ */ p(`div`,{class:`sr`,"aria-live":`polite`,children:w?`Step ${g.index+1} of ${g.guide.steps.length}: ${h(w.title,S(e))}`:g?`Level cleared`:``})]})}function L(t){let n=t.options,r=e=>void t.outbox.push(e);k().then(({createTransport:i})=>{let a=i({appKey:n.appKey,url:n.eventsUrl,sdk:n.sdkName??`web`,version:e,preview:n.preview,userId:t.userId,send:n.transport});t.outbox.splice(0).forEach(a.push),r=a.push}).catch(e=>t.emit({type:`sdk_error`,message:String(e)}));let i=document.createElement(`style`);i.textContent=`:host{--ps-radius-md:14px;--ps-radius-lg:20px;--ps-font-display:"Bricolage Grotesque","Figtree",system-ui,sans-serif;--ps-font-sans:"Figtree",system-ui,-apple-system,"Segoe UI",sans-serif;--ps-clip-overlay:rgba(12,14,19,.72);--ps-ease:cubic-bezier(.2,.8,.2,1);--ps-accent:var(--ps-primary);--ps-accent-hover:var(--ps-primary-hover);--ps-on-accent:var(--ps-on-primary);--ps-surface:#fff;--ps-surface-sunken:#f5f6f9;--ps-surface-raised:#fff;--ps-line:#e3e6ec;--ps-ink:#151823;--ps-ink-secondary:#454b5c;--ps-ink-muted:#646b7d;--ps-primary:#2e5bff;--ps-primary-hover:#2149e6;--ps-primary-soft:#e8edff;--ps-primary-ink:#2149e6;--ps-on-primary:#fff;--ps-spark:#ffc933;--ps-spark-soft:#fff4cc;--ps-spark-ink:#7a5a00;--ps-on-spark:#151823;--ps-scrim:rgba(12,14,19,.64);--ps-tag-mint:#ddf5ea;--ps-chart-4:#14b37d;--ps-chart-5:#ff7a59;--ps-shadow-lg:0 20px 48px -12px rgba(21,24,35,.28),0 4px 10px rgba(21,24,35,.06);--ps-ring-focus:0 0 0 2px #fff,0 0 0 4px #2e5bff}:host([data-mode=dark]){--ps-surface:#161922;--ps-surface-sunken:#1d212b;--ps-surface-raised:#222633;--ps-line:#2a2f3c;--ps-ink:#f2f4f8;--ps-ink-secondary:#c5cad5;--ps-ink-muted:#959cad;--ps-primary:#7091ff;--ps-primary-hover:#8da7ff;--ps-primary-soft:#1c2550;--ps-primary-ink:#93abff;--ps-on-primary:#0c0e13;--ps-spark:#ffd452;--ps-spark-soft:#3a2f0a;--ps-spark-ink:#ffd86b;--ps-on-spark:#151823;--ps-scrim:rgba(0,0,0,.72);--ps-tag-mint:#0f2c22;--ps-chart-4:#3dd9a0;--ps-chart-5:#ff9478;--ps-shadow-lg:0 20px 48px -12px rgba(0,0,0,.8),0 4px 10px rgba(0,0,0,.5);--ps-ring-focus:0 0 0 2px #161922,0 0 0 4px #7091ff}:host{all:initial}*{box-sizing:border-box;margin:0}.l{position:fixed;inset:0;pointer-events:none;z-index:2147483000;font:400 14px/20px var(--ps-font-sans);color:var(--ps-ink);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;border:0;padding:0;background:none;cursor:pointer}button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:none;box-shadow:var(--ps-ring-focus)}svg{width:16px;height:16px;flex:none}.scrim{position:fixed;inset:0;background:var(--ps-scrim);pointer-events:auto}.spot,.card{position:fixed;left:0;top:0;transition:transform .36s var(--ps-ease),width .36s var(--ps-ease),height .36s var(--ps-ease)}.spot{box-shadow:0 0 0 9999px var(--ps-scrim)}.spot:after{content:"";position:absolute;inset:-4px;border-radius:18px;border:2px solid var(--ps-spark);animation:ring 1.8s ease-out infinite}.card,.cel,.panel{background:var(--ps-surface-raised);border-radius:var(--ps-radius-lg);box-shadow:var(--ps-shadow-lg);pointer-events:auto;outline:none}.card{width:336px;max-width:calc(100vw - 24px);padding:10px}.big{width:min(720px,calc(100vw - 24px))}.clip{position:relative;aspect-ratio:16/10;border-radius:var(--ps-radius-md);overflow:hidden;background:var(--ps-surface-sunken)}.clip>video,.clip>img,.clip>iframe{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border:0}.bar{position:absolute;left:8px;right:8px;bottom:8px;display:flex;align-items:center;gap:6px;color:#fff}.pill,.round{background:var(--ps-clip-overlay);border-radius:99px;display:inline-flex;align-items:center;justify-content:center}.pill{height:24px;padding:0 8px;gap:4px;font:700 11px/1 var(--ps-font-sans)}.pill svg{width:13px;height:13px}.round{width:28px;height:28px}.round svg{width:14px;height:14px}.bar .round:first-of-type{margin-left:auto}.play{position:absolute;inset:0;margin:auto;width:60px;height:60px;border-radius:50%;background:var(--ps-accent);color:var(--ps-on-accent);display:grid;place-items:center}.play svg{width:26px;height:26px}.body{padding:14px 8px 6px}.meta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted);margin-bottom:10px}.meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;margin:-6px -6px -6px 0}.x:hover,.gho:hover,.row:hover,.sec:hover{background:var(--ps-surface-sunken);color:var(--ps-ink)}.steps{display:flex;gap:4px;margin-bottom:12px}.seg{flex:1;height:6px;border-radius:99px;background:var(--ps-surface-sunken);overflow:hidden;position:relative}.done{background:var(--ps-accent)}.cur:after{content:"";position:absolute;left:0;top:0;bottom:0;width:55%;border-radius:99px;background:var(--ps-spark)}.anim:after{animation:fill var(--d,4s) linear infinite}.title,.cel h2,.panel h2{font:700 20px/26px var(--ps-font-display);letter-spacing:-.01em;margin-bottom:4px}.text,.cel p{color:var(--ps-ink-secondary)}.foot{display:flex;align-items:center;gap:8px;padding:14px 8px 4px}.wait,.sp{flex:1}.wait{display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted)}.pulse{width:8px;height:8px;border-radius:50%;background:var(--ps-spark);animation:pulse 1.6s ease-out infinite}.btn{height:32px;padding:0 14px;border-radius:var(--ps-radius-btn,99px);border:1px solid transparent;font-size:13px;line-height:18px;font-weight:600;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.pri{background:var(--ps-accent);color:var(--ps-on-accent)}.pri:hover{background:var(--ps-accent-hover)}.x{color:var(--ps-ink-muted)}.gho{color:var(--ps-ink-secondary)}.embed{background:#151823}.sec{background:var(--ps-surface);border-color:var(--ps-line)}.cel{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:336px;max-width:calc(100vw - 24px);padding:24px 20px 20px;text-align:center;overflow:hidden}.cel h2{font-size:24px;line-height:30px;font-weight:800}.cel p{margin-bottom:16px}.art{position:relative;height:72px;margin-bottom:8px}.tile{position:absolute;left:50%;top:4px;width:64px;height:64px;margin-left:-32px;border-radius:var(--ps-radius-lg);background:var(--ps-spark);color:var(--ps-on-spark);display:grid;place-items:center;animation:pop .6s cubic-bezier(.2,1.6,.4,1) both}.tile svg{width:30px;height:30px}.bit{position:absolute;border-radius:99px}.acts{display:flex;justify-content:center;gap:12px}.lb{position:fixed;bottom:24px;right:24px;width:56px;height:56px;border-radius:50%;background:var(--ps-accent);color:var(--ps-on-accent);box-shadow:var(--ps-shadow-lg);display:grid;place-items:center;pointer-events:auto}.lb svg{width:26px;height:26px}.cnt{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:var(--ps-spark);color:var(--ps-on-spark);font:800 11px/20px var(--ps-font-sans)}.panel{position:fixed;right:24px;bottom:96px;width:320px;max-width:calc(100vw - 36px);max-height:calc(100vh - 120px);overflow:auto;padding:16px}.left{right:auto;left:24px}.solo{bottom:24px}.panel .x{float:right}.panel>p{font-size:13px;line-height:18px;color:var(--ps-ink-muted);margin:-2px 0 12px}.rows{list-style:none;padding:0}.row{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border-radius:var(--ps-radius-md);text-align:left}.ti{width:36px;height:36px;flex:none;border-radius:var(--ps-radius-md);display:grid;place-items:center;background:var(--ps-primary-soft);color:var(--ps-primary-ink)}.ti.spark{background:var(--ps-spark-soft);color:var(--ps-spark-ink)}.ti.mint{background:var(--ps-tag-mint);color:var(--ps-ink)}.ti svg{width:18px;height:18px}.rb{flex:1;min-width:0}.rt,.rm{display:block;font-weight:600}.rm{font-size:12px;line-height:16px;font-weight:500;color:var(--ps-ink-muted)}.prog{display:block;height:6px;border-radius:99px;background:var(--ps-surface-sunken);margin-top:6px;overflow:hidden}.prog i{display:block;height:100%;background:var(--ps-accent)}.rp{display:flex;align-items:center;gap:4px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted)}.so{margin-top:8px}.new{height:24px;padding:0 10px;border-radius:99px;background:var(--ps-spark-soft);color:var(--ps-spark-ink);font-size:12px;line-height:24px;font-weight:600}.pb{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:10px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted);text-decoration:none}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}@keyframes ring{to{opacity:0;transform:scale(1.12)}}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--ps-spark)}70%,to{box-shadow:0 0 0 8px transparent}}@keyframes fill{0%{width:0}to{width:100%}}@keyframes pop{0%{opacity:0;transform:scale(.4) rotate(-12deg)}}@media (max-width:480px){.card{width:300px}.title{font-size:17px;line-height:22px}.lb{right:18px;bottom:18px}.panel{right:18px;bottom:86px}.solo{bottom:18px}.left{right:auto;left:18px}}@media (prefers-reduced-motion:reduce){.spot,.card{transition:none}.spot:after,.pulse,.cur:after,.tile{animation:none}}`,t.root.appendChild(i);let a=document.createElement(`div`);t.root.appendChild(a);let o={update:()=>{},openLauncher:()=>{},send:e=>r(e)};return s(/* @__PURE__ */ p(I,{ctx:t,handle:o}),a),o}export{M as findAnchor,j as hostPopupOpen,L as mount};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axceera/playstep",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "PlayStep web SDK: playable, video-first guides for any web app. A 3 KB loader; the guide UI loads only when a guide shows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"typescript": "~6.0.3",
|
|
44
44
|
"vite": "^8.3.4",
|
|
45
45
|
"vitest": "^4.1.11",
|
|
46
|
-
"@playstep/
|
|
47
|
-
"@playstep/
|
|
46
|
+
"@playstep/spec": "0.1.0",
|
|
47
|
+
"@playstep/design-system": "0.1.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsdown && node scripts/cdn.ts",
|
package/dist/sdk-Bpu8YvQu.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./util-oI8xpB8k.js";const t=e=>RegExp(`^${e.replace(/[.+?^${}()|[\]\\]/g,`\\$&`).replace(/\*/g,`.*`)}$`),n=e=>e.length>1?e.replace(/\/+$/,``):e;function r(e,r){return!!e&&r!==void 0&&t(n(e)).test(n(r))}function i(e,t){return(e??[]).every(e=>{let n=t[e.trait];return e.op===`exists`?n!=null:e.op===`in`?Array.isArray(e.value)&&e.value.includes(n):n===e.value==(e.op===`eq`)})}function a(e){let{config:t,platform:n}=e,a=e.progress??{seen:!1,guides:{}},o=e.traits??{},s=null,c,l=t.flags||{},u=(t.guides??[]).filter(e=>e.spec_version<=3&&(e.targeting?.platforms??[`web`]).includes(n)),d=e=>u.find(t=>t.id===e),f=(e,t,n)=>({type:e,guide_id:t.id,guide_version:t.version,...n>=0&&{step_id:t.steps[n].id,step_index:n}}),p=e=>!l.disabled&&(!l.paused_for_new_users||a.seen)&&i(e.targeting?.segments,o),m=e=>{let t=a.guides[e.id];return!s&&p(e)&&(!t||t.status!==`done`&&(t.status===`running`||!e.trigger.once))},h=(e,t,n)=>{a.guides[e.id]={version:e.version,step:n,status:t}},g,_=e=>r(e.path,g),v=e=>r(e.skip_if_on,g)||_(e.complete_on),y=(e,t,n)=>{for(;t<e.steps.length;){if(s={guide:e,index:t,status:`running`},c=void 0,h(e,`running`,t),n.push(f(`step_shown`,e,t)),!v(e.steps[t]))return n;n.push(f(`step_completed`,e,t++))}return s={guide:e,index:--t,status:`completed`},h(e,`done`,t),n.push(f(`guide_completed`,e)),n},b=(e,t)=>(a.seen=!0,y(e,t,[f(`guide_shown`,e)])),x=()=>{let e=s;return y(e.guide,e.index+1,[f(`step_completed`,e.guide,e.index)])},S=e=>{let t=u.find(t=>m(t)&&e(t));return t?b(t,0):[]},C=()=>S(e=>e.trigger.type===`first_visit`||_(e.trigger));function w(e){let t=s?.status===`running`?s.guide.steps[s.index]:null;switch(e.type){case`init`:{g=e.path;let t=u.find(e=>a.guides[e.id]?.status===`running`&&p(e));if(t){let e=a.guides[t.id];return b(t,e.version===t.version?e.step:0)}return C()}case`page_view`:return g=e.path,t&&v(t)?x():S(e=>_(e.trigger));case`reset_progress`:{let t=typeof e.guide==`string`&&d(e.guide);return t===void 0?[]:((!t||s?.guide===t)&&(s=null),t?delete a.guides[t.id]:a.guides={},[{type:`progress_reset`,guide_id:t?t.id:void 0},...C()])}case`event`:return t?.complete_on.type===`event`&&t.complete_on.name===e.name?x():S(t=>t.trigger.type===`event`&&t.trigger.name===e.name);case`tap`:return t?.complete_on.type===`tap_anchor`&&t.anchor===e.anchor?x():[];case`complete`:return t?.id===e.step?x():[];case`next`:return t?.complete_on.type===`next_button`?x():[];case`back`:return!t||s.index===0?[]:(s={...s,index:s.index-1},h(s.guide,`running`,s.index),[f(`step_shown`,s.guide,s.index)]);case`close`:if(s?.status!==`completed`)return[];case`dismiss`:{if(!s)return[];let e=s;return s=null,e.status===`completed`?[]:(h(e.guide,`dismissed`,e.index),[f(`guide_dismissed`,e.guide,e.index)])}case`start`:{let n=d(e.guide);if(!n||!p(n)||t&&s.guide===n&&n.steps.slice(0,s.index).every(v))return[];let r=[];return s?.status===`running`&&(h(s.guide,`dismissed`,s.index),r.push(f(`guide_dismissed`,s.guide,s.index))),s=null,r.concat(b(n,0))}case`anchor_missing`:return!t||t.anchor!==e.anchor||c===e.anchor?[]:(c=e.anchor,[{...f(`anchor_missing`,s.guide,s.index),anchor:e.anchor}]);case`identify`:return o={...o,...e.traits},[]}}return{get active(){return s},progress:a,dispatch:w,launcherGuides:()=>u.filter(e=>e.launcher!==!1&&p(e))}}const o=`0.5.0`,s=`playstep_preview`;function c(t,n,r,i=`web`){let c,l,u,d,f,p,m,h={},g=[],_=[],v=()=>`p:${c.appKey}`,y=()=>c.preview||e.set(v(),l.progress),b=e=>{let t={...e,ts:Date.now()};c?.preview||(d?d.send(t):_.push(t)),c?.onEvent?.(t)},x=e=>{try{b({type:`sdk_error`,message:String(e)})}catch{}},S=e=>(...t)=>{try{e(...t)}catch(e){x(e)}},C=(e,t)=>S(n=>w({type:e,[t]:n}));function w(t){if(!l)return void g.push(t);let n=l.dispatch(t);y(),n.forEach(S(b)),(l.active||e.get(`q`))&&E(),d?.update()}function T(){return p??(p=document.body.appendChild(document.createElement(`playstep-root`)).attachShadow({mode:`open`}))}function E(){return f??(f=t().then(e=>{let t=T();return t.innerHTML=``,d=e.mount({engine:l,config:u,options:c,root:t,outbox:_,userId:()=>m,dispatch:S(w),emit:S(b)})}).catch(x))}let D,O=S((e={})=>{l?l.launcherGuides().length&&E().then(t=>t?.openLauncher(e.anchor)):D=e});function k(e){e.launcher?.enabled&&l.launcherGuides().length&&!f&&n&&n().then(t=>{f||t.drawLauncher(T(),l,e,O,c)}).catch(x)}async function A(){let t=c,n=(t.apiBase??`https://cdn.playstep.app`).replace(/\/$/,``),o=null;try{o=new URLSearchParams(location.search).get(s)||(t.config?null:sessionStorage.getItem(s))}catch{}t.preview||(t.preview=!!(t.config||o));let d=t.config;try{d??(d=await fetch(`${n}/v1/${o?`preview/${o}?key=`:`config/`}${t.appKey}`).then(e=>e.json()))}catch{return}try{o&&sessionStorage[d.guides?`setItem`:`removeItem`](s,o)}catch{}if(d?.capture)return void r?.().then(e=>e.start(d.capture,t.appKey)).catch(x);if(d?.guides&&!d.flags?.disabled&&(u=d,t.eventsUrl=d.ingest_url??`${n}/v1/events`,l=a({config:d,platform:i,progress:t.preview?void 0:e.get(v())??void 0,traits:h}),w({type:`init`,path:location.pathname}),g.splice(0).forEach(w),D&&O(D),k(d),t.autoPageViews!==!1)){let e=location.pathname,t=S(()=>location.pathname!==e&&w({type:`page_view`,path:e=location.pathname}));for(let e of[`pushState`,`replaceState`]){let n=history[e];history[e]=function(...e){n.apply(this,e),t()}}addEventListener(`popstate`,t)}}return{version:o,init:S(e=>{if(c||!e?.appKey)return;c={...e};let t=()=>setTimeout(()=>A().catch(x));document.readyState===`complete`?t():addEventListener(`load`,t)}),identify:S((e,t)=>{m=e,h={...h,...t},w({type:`identify`,traits:h})}),track:C(`event`,`name`),start:C(`start`,`guide`),complete:C(`complete`,`step`),page:S(e=>w({type:`page_view`,path:e??location.pathname})),openLauncher:O,resetProgress:C(`reset_progress`,`guide`),reset:S(()=>{w({type:`dismiss`}),m=void 0,h={},l&&(Object.assign(l.progress,{seen:!1,guides:{}}),y(),d?.update()),c?.preview||e.set(`d`,null)})}}export{c as n,o as t};
|
package/dist/ui-CBp6e2ts.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./sdk-Bpu8YvQu.js";import{t}from"./util-oI8xpB8k.js";import{t as n}from"./mode-CPlpg1Yl.js";import{computePosition as r,flip as i,offset as a,shift as o}from"@floating-ui/dom";import{render as s}from"preact";import{useEffect as c,useLayoutEffect as l,useRef as u,useState as d}from"preact/hooks";import{Fragment as f,jsx as p,jsxs as m}from"preact/jsx-runtime";function h(e,t,n=`en`){return e?e[t]??e[t.split(`-`)[0]]??e[n]??Object.values(e)[0]??``:``}function g(e){try{let t=new URL(e),n=t.hostname.replace(/^(www|m)\./,``),r;if(n===`youtu.be`?r=t.pathname.slice(1):n===`youtube.com`&&(r=t.searchParams.get(`v`)??t.pathname.match(/^\/(?:embed|shorts)\/([\w-]+)/)?.[1]),r)return{src:`https://www.youtube-nocookie.com/embed/${r}?autoplay=1&rel=0`,thumb:`https://i.ytimg.com/vi/${r}/hqdefault.jpg`};if(r=n===`vimeo.com`||n===`player.vimeo.com`?t.pathname.match(/(\d{5,})/)?.[1]:null,r)return{src:`https://player.vimeo.com/video/${r}?autoplay=1`}}catch{}return null}const _=e=>{let t=Math.round(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`};function v(e){let t=Number.parseInt(e.slice(1),16),n=e=>(e/=255)<=.03928?e/12.92:((e+.055)/1.055)**2.4,r=.2126*n(t>>16&255)+.7152*n(t>>8&255)+.0722*n(t&255);return 1.05/(r+.05)>=(r+.05)/.0595?`#ffffff`:`#151823`}const y={x:`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`,play:`<path d="M5 5a2 2 0 0 1 3-1.7l12 7a2 2 0 0 1 0 3.5l-12 7A2 2 0 0 1 5 19z"/>`,"volume-2":`<path d="M11 4.7a.7.7 0 0 0-1.2-.5L6.4 7.6A1.4 1.4 0 0 1 5.4 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.4a1.4 1.4 0 0 1 1 .4l3.4 3.4A.7.7 0 0 0 11 19.3z"/><path d="M16 9a5 5 0 0 1 0 6"/><path d="M19.4 18.4a9 9 0 0 0 0-12.7"/>`,"volume-x":`<path d="M11 4.7a.7.7 0 0 0-1.2-.5L6.4 7.6A1.4 1.4 0 0 1 5.4 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.4a1.4 1.4 0 0 1 1 .4l3.4 3.4A.7.7 0 0 0 11 19.3z"/><path d="m16.5 14.5 5-5"/><path d="m16.5 9.5 5 5"/>`,check:`<path d="M20 6 9 17l-5-5"/>`,"maximize-2":`<path d="M15 3h6v6"/><path d="m21 3-7 7"/><path d="m3 21 7-7"/><path d="M9 21H3v-6"/>`,"arrow-right":`<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>`,"rotate-ccw":`<path d="M3 12a9 9 0 1 0 9-9 9.8 9.8 0 0 0-6.7 2.7L3 8"/><path d="M3 3v5h5"/>`,"external-link":`<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>`,"ps-launcher":`<path d="M12 21a9 9 0 1 0-8-5L3 21l5-.9A9 9 0 0 0 12 21z"/><path d="M10 9v6l5-3z"/>`,"ps-level-up":`<path d="M3 21h5v-4h5v-4h5V9"/><path d="M18 9V3l4 2.5L18 8"/>`,"ps-guide":`<rect x="4" y="3" width="4" height="18" rx="2"/><path d="M12 5.5v10l7.5-5z"/>`};function b({name:e}){return/* @__PURE__ */ p(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:y[e]}})}function x(e){try{let t=JSON.parse(sessionStorage.getItem(`playstep:clips`)??`[]`);if(t.includes(e))return!1;sessionStorage.setItem(`playstep:clips`,JSON.stringify([...t,e].slice(-200)))}catch{}return!0}const S=e=>e.options.locale??navigator.language??`en`,C=(e,t)=>h(t.name,S(e),t.locale_default)||t.id;function w({ctx:e,guide:t,index:n,reduced:r,clip:i,big:a,onExpand:o,onDuration:s}){let l=t.steps[n],v=u(null),[y,C]=d(!0),[w,T]=d(!r&&i.source!==`embed`),[E,D]=d(i.duration_ms??0),O=r=>e.emit({type:r,guide_id:t.id,guide_version:t.version,step_id:l.id,step_index:n,clip_id:i.source===`hosted`?i.clip_id:void 0,clip_source:i.source}),k=e=>x(`${e}|${i.url}`)&&O(e);if(c(()=>{let e=v.current;e&&w&&(e.muted=y,e.play()?.catch(()=>{}))},[w,i.url]),c(()=>s(w&&i.source!==`embed`?E:0),[E,w]),i.source===`embed`){let t=g(i.url),n=new URL(i.url).hostname.replace(/^www\./,``);return/* @__PURE__ */ p(`div`,{class:`clip embed`,children:w&&t?/* @__PURE__ */ p(`iframe`,{src:t.src,title:`Video: ${h(l.title,S(e))}`,allow:`autoplay; encrypted-media; picture-in-picture; fullscreen`,allowFullScreen:!0}):/* @__PURE__ */ m(f,{children:[(i.poster??t?.thumb)&&/* @__PURE__ */ p(`img`,{src:i.poster??t?.thumb,alt:``}),/* @__PURE__ */ p(`button`,{class:`play`,"aria-label":`Play video`,onClick:()=>(T(!0),O(`clip_played`)),children:/* @__PURE__ */ p(b,{name:`play`})}),/* @__PURE__ */ p(`div`,{class:`bar`,children:/* @__PURE__ */ m(`span`,{class:`pill`,children:[/* @__PURE__ */ p(b,{name:`external-link`}),n,E?` · ${_(E)}`:``]})})]})})}return/* @__PURE__ */ m(`div`,{class:`clip`,children:[w?/* @__PURE__ */ p(`video`,{ref:v,src:i.url,poster:i.poster,muted:y,loop:!0,autoplay:!0,playsInline:!0,preload:`auto`,"aria-label":`Clip: ${h(l.title,S(e))}`,onLoadedData:()=>k(`clip_loaded`),onPlaying:()=>k(`clip_played`),onLoadedMetadata:e=>{let t=e.currentTarget.duration;Number.isFinite(t)&&D(t*1e3)}}):/* @__PURE__ */ m(f,{children:[i.poster&&/* @__PURE__ */ p(`img`,{src:i.poster,alt:``}),/* @__PURE__ */ p(`button`,{class:`play`,"aria-label":`Play clip`,onClick:()=>T(!0),children:/* @__PURE__ */ p(b,{name:`play`})})]}),w&&/* @__PURE__ */ m(`div`,{class:`bar`,children:[/* @__PURE__ */ m(`span`,{class:`pill`,children:[/* @__PURE__ */ p(b,{name:`play`}),E?`${_(E)} loop`:`Loop`]}),/* @__PURE__ */ p(`button`,{class:`round`,"aria-label":y?`Unmute clip`:`Mute clip`,onClick:()=>{C(!y),v.current&&(v.current.muted=!y),y&&O(`clip_unmuted`)},children:/* @__PURE__ */ p(b,{name:y?`volume-x`:`volume-2`})}),/* @__PURE__ */ p(`button`,{class:`round`,"aria-label":a?`Shrink clip`:`Expand clip`,"aria-pressed":a,onClick:o,children:/* @__PURE__ */ p(b,{name:`maximize-2`})})]})]})}function T({ctx:e,guide:t,index:n,reduced:r,cardRef:i,style:a}){let o=t.steps[n],s=t.steps.length,[l,u]=d(!1),[f,g]=d(0),_=n=>h(n,S(e),t.locale_default),v=o.complete_on.type===`next_button`;return c(()=>{u(!1);let i=t.steps[n+1],a=i?.clip;if(a&&a.source!==`embed`&&!r&&!navigator.connection?.saveData){let r=document.createElement(`video`);r.preload=`auto`,r.muted=!0,r.src=a.url,a.source===`hosted`&&x(`clip_loaded|${a.url}`)&&e.emit({type:`clip_loaded`,guide_id:t.id,guide_version:t.version,step_id:i.id,step_index:n+1,clip_id:a.clip_id,clip_source:`hosted`})}},[t.id,n]),/* @__PURE__ */ m(`div`,{ref:i,class:`card${l?` big`:``}`,style:a,role:`dialog`,"aria-modal":`false`,"aria-labelledby":`ps-title`,"aria-describedby":`ps-text`,tabIndex:-1,"data-step":o.id,children:[o.clip&&/* @__PURE__ */ p(w,{ctx:e,guide:t,index:n,reduced:r,clip:o.clip,big:l,onExpand:()=>u(!l),onDuration:g},o.id),/* @__PURE__ */ m(`div`,{class:`body`,children:[/* @__PURE__ */ m(`div`,{class:`meta`,children:[/* @__PURE__ */ m(`span`,{children:[`Step `,n+1,` of `,s,` · `,C(e,t)]}),/* @__PURE__ */ p(`button`,{class:`x`,"aria-label":`Close guide`,onClick:()=>e.dispatch({type:`dismiss`}),children:/* @__PURE__ */ p(b,{name:`x`})})]}),/* @__PURE__ */ p(`div`,{class:`steps`,role:`img`,"aria-label":`Step ${n+1} of ${s}`,children:t.steps.map((e,t)=>/* @__PURE__ */ p(`span`,{class:`seg${t<n?` done`:t===n?` cur${f&&!r?` anim`:``}`:``}`,style:t===n&&f?{"--d":`${f}ms`}:void 0},t))}),/* @__PURE__ */ p(`h2`,{class:`title`,id:`ps-title`,children:_(o.title)}),/* @__PURE__ */ p(`p`,{class:`text`,id:`ps-text`,children:_(o.body)})]}),/* @__PURE__ */ m(`div`,{class:`foot`,children:[v?/* @__PURE__ */ p(`span`,{class:`sp`}):/* @__PURE__ */ m(`span`,{class:`wait`,children:[/* @__PURE__ */ p(`span`,{class:`pulse`,"aria-hidden":`true`}),`Waiting for you`]}),n>0&&t.steps[n-1].complete_on.type!==`page`&&!t.steps[n-1].skip_if_on&&/* @__PURE__ */ p(`button`,{class:`btn gho`,onClick:()=>e.dispatch({type:`back`}),children:`Back`}),v&&/* @__PURE__ */ m(`button`,{class:`btn pri`,onClick:()=>e.dispatch({type:`next`}),children:[n+1===s?`Done`:`Next`,/* @__PURE__ */ p(b,{name:`arrow-right`})]})]})]})}const E=[`width:22px;height:8px;left:22%;top:14px;transform:rotate(-20deg);background:var(--ps-accent)`,`width:10px;height:10px;left:30%;top:46px;background:var(--ps-spark)`,`width:12px;height:12px;right:24%;top:10px;background:var(--ps-chart-4)`,`width:24px;height:8px;right:20%;top:44px;transform:rotate(24deg);background:var(--ps-chart-5)`,`width:8px;height:8px;left:16%;top:60px;background:var(--ps-chart-5)`,`width:8px;height:8px;right:30%;top:64px;background:var(--ps-accent)`];function D({ctx:e,guide:t}){let n=e.engine.launcherGuides().find(n=>n.id!==t.id&&e.engine.progress.guides[n.id]?.status!==`done`),r=u(null);return c(()=>r.current?.focus(),[]),/* @__PURE__ */ m(f,{children:[/* @__PURE__ */ p(`div`,{class:`scrim`,onClick:()=>e.dispatch({type:`close`})}),/* @__PURE__ */ m(`div`,{class:`cel`,ref:r,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`ps-cel`,tabIndex:-1,children:[/* @__PURE__ */ m(`div`,{class:`art`,"aria-hidden":`true`,children:[E.map((e,t)=>/* @__PURE__ */ p(`span`,{class:`bit`,style:e},t)),/* @__PURE__ */ p(`span`,{class:`tile`,children:/* @__PURE__ */ p(b,{name:`ps-level-up`})})]}),/* @__PURE__ */ p(`h2`,{id:`ps-cel`,children:`Level cleared`}),/* @__PURE__ */ m(`p`,{children:[`You finished `,C(e,t),`.`,n?` Next up: ${C(e,n)}.`:``]}),/* @__PURE__ */ m(`div`,{class:`acts`,children:[/* @__PURE__ */ m(`button`,{class:`btn sec`,onClick:()=>e.dispatch({type:`start`,guide:t.id}),children:[/* @__PURE__ */ p(b,{name:`rotate-ccw`}),`Replay`]}),n?/* @__PURE__ */ m(`button`,{class:`btn pri`,onClick:()=>e.dispatch({type:`start`,guide:n.id}),children:[`Next guide`,/* @__PURE__ */ p(b,{name:`arrow-right`})]}):/* @__PURE__ */ p(`button`,{class:`btn pri`,onClick:()=>e.dispatch({type:`close`}),children:`Done`})]})]})]})}function O({ctx:e,open:t,setOpen:n,near:s}){let d=u(null);l(()=>{let e=d.current;e&&(e.style.cssText=``,s&&r(s,e,{strategy:`fixed`,placement:`top-start`,middleware:[a(8),i({padding:12}),o({padding:12})]}).then(({x:t,y:n})=>e.style.cssText=`left:${t}px;top:${n}px;right:auto;bottom:auto`))},[t,s]);let g=u(null);c(()=>{t?(g.current=e.root.activeElement??document.activeElement,d.current?.focus()):g.current?.focus()},[t]);let _=e.config.launcher,v=e.engine.launcherGuides();if(!v.length)return null;let y=e.engine.progress.guides,x=v.filter(e=>!y[e.id]).length,w=_?.position===`bottom-left`?` left`:``;return/* @__PURE__ */ m(f,{children:[t&&/* @__PURE__ */ m(`div`,{class:`panel${w}${_?.enabled?``:` solo`}`,ref:d,tabIndex:-1,role:`dialog`,"aria-label":`Guides`,children:[/* @__PURE__ */ p(`button`,{class:`x`,"aria-label":`Close guides`,onClick:()=>n(!1),children:/* @__PURE__ */ p(b,{name:`x`})}),/* @__PURE__ */ p(`h2`,{children:h(_?.title,S(e))||`Need a hand?`}),/* @__PURE__ */ p(`p`,{children:h(_?.description,S(e))||`Pick a guide and play it step by step.`}),/* @__PURE__ */ p(`ul`,{class:`rows`,children:v.map(t=>{let r=y[t.id],i=t.steps.length,a=r?.status===`done`,o=r?.status===`running`;return/* @__PURE__ */ p(`li`,{children:/* @__PURE__ */ m(`button`,{class:`row`,onClick:()=>{n(!1),r&&e.dispatch({type:`reset_progress`,guide:t.id}),e.dispatch({type:`start`,guide:t.id})},children:[/* @__PURE__ */ p(`span`,{class:`ti${a?` mint`:r?``:` spark`}`,children:/* @__PURE__ */ p(b,{name:a?`check`:`ps-guide`})}),/* @__PURE__ */ m(`span`,{class:`rb`,children:[/* @__PURE__ */ p(`span`,{class:`rt`,children:C(e,t)}),/* @__PURE__ */ p(`span`,{class:`rm`,children:a?`Completed`:o?`Step ${r.step+1} of ${i}`:`${i} steps`}),o&&/* @__PURE__ */ p(`span`,{class:`prog`,"aria-hidden":`true`,children:/* @__PURE__ */ p(`i`,{style:{width:`${r.step/i*100}%`}})})]}),r?/* @__PURE__ */ m(`span`,{class:`rp`,children:[/* @__PURE__ */ p(b,{name:`rotate-ccw`}),`Replay`]}):/* @__PURE__ */ p(`span`,{class:`new`,children:`New`})]})},t.id)})}),v.some(e=>y[e.id])&&/* @__PURE__ */ p(`div`,{class:`acts so`,children:/* @__PURE__ */ p(`button`,{class:`btn gho`,onClick:()=>{e.dispatch({type:`reset_progress`}),e.engine.active?n(!1):d.current?.focus()},children:`Start over`})}),e.config.flags?.show_badge!==!1&&/* @__PURE__ */ m(`a`,{class:`pb`,href:`https://playstep.app/?ref=badge`,target:`_blank`,rel:`noopener`,children:[/* @__PURE__ */ p(`span`,{dangerouslySetInnerHTML:{__html:`<svg viewBox="0 0 48 48" aria-hidden="true"><rect width="48" height="48" rx="13" fill="#2E5BFF"/><rect x="11" y="10" width="8" height="28" rx="4" fill="#fff"/><path d="M23.5 12v17l12-8.5z" fill="#FFC933" stroke="#FFC933" stroke-width="3.5" stroke-linejoin="round"/></svg>`},style:`display:inline-flex;width:16px;height:16px`}),`Powered by PlayStep`]})]}),_?.enabled&&/* @__PURE__ */ m(`button`,{class:`lb${w}`,"aria-label":t?`Close guides`:`Open guides`,"aria-expanded":t,onClick:()=>n(!t),children:[/* @__PURE__ */ p(b,{name:`ps-launcher`}),x>0&&!t&&/* @__PURE__ */ p(`span`,{class:`cnt`,children:x})]})]})}document.currentScript?.src;const k=()=>import(`./transport-Cu51h2G6.js`),A=e=>!!e?.getClientRects().length;function j(e,t){let n=document.querySelector(`[data-guide="${CSS.escape(e)}"]`);try{n||(n=t?[...document.querySelectorAll(t.css)].find(e=>A(e)&&(!t.text||e.innerText.includes(t.text)))??null:null)}catch{}return A(n)?n:null}function M(e,t,n){let[r,i]=d(()=>e?j(e,t):null);return c(()=>{if(!e)return i(null);let r=j(e,t);i(r);let a=0,o=()=>{a=0;let n=j(e,t);n!==r&&i(r=n)},s=new MutationObserver(()=>a||(a=requestAnimationFrame(o)));s.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-guide`,`hidden`,`style`,`class`]});let c=setTimeout(()=>!r&&n(e),3e3);return()=>{s.disconnect(),clearTimeout(c),cancelAnimationFrame(a)}},[e,t]),r}function N(e,n,s,c,u){let[f,p]=d(null);return l(()=>{let l=n.current;if(!l)return;if(!e){let e=()=>p({x:(innerWidth-l.offsetWidth)/2,y:c===`center`?(innerHeight-l.offsetHeight)/2:innerHeight-l.offsetHeight-24});e();let t=new ResizeObserver(e);return t.observe(l),addEventListener(`resize`,e),()=>{t.disconnect(),removeEventListener(`resize`,e)}}let u=e.getBoundingClientRect();(u.bottom<0||u.top>innerHeight)&&e.scrollIntoView({block:`center`,behavior:t()?`auto`:`smooth`});let d=()=>{let t=e.getBoundingClientRect(),n=Number.parseFloat(getComputedStyle(e).borderTopLeftRadius)||8;r(e,l,{strategy:`fixed`,placement:s===`auto`?`bottom`:s,middleware:[a(18),i({fallbackPlacements:[`top`,`left`,`right`],padding:12}),o({padding:12})]}).then(({x:e,y:r})=>p({x:e,y:r,spot:{x:t.left-6,y:t.top-6,w:t.width+12,h:t.height+12,r:Math.min(n+6,(t.height+12)/2)}}))};d();let f=new ResizeObserver(d);f.observe(e),f.observe(l),addEventListener(`scroll`,d,{capture:!0,passive:!0}),addEventListener(`resize`,d);let m=setInterval(d,400);return()=>{f.disconnect(),clearInterval(m),removeEventListener(`scroll`,d,{capture:!0}),removeEventListener(`resize`,d)}},[e,c,s,...u]),f}function P({ctx:e,guide:t,index:n,reduced:r}){let i=t.steps[n],a=M(i.anchor,i.find?.web,t=>e.dispatch({type:`anchor_missing`,anchor:t})),o=u(null);c(()=>{if(!a)return;let t=t=>t.composedPath().includes(a)&&e.dispatch({type:`tap`,anchor:i.anchor});return document.addEventListener(`click`,t,!0),()=>document.removeEventListener(`click`,t,!0)},[a]);let s=t.theme?.position??`bottom`,l=N(a,o,i.placement??`auto`,s,[i.id]),h=u(``);c(()=>{l&&h.current!==i.id&&(h.current=i.id,document.activeElement?.matches(`input,textarea,select,[contenteditable]:not([contenteditable=false])`)||o.current?.focus({preventScroll:!0}))},[i.id,l]);let[g,_]=d(!1);c(()=>{l&&!g&&requestAnimationFrame(()=>_(!0))},[l]),c(()=>{let t=t=>{if(t.key!==`Tab`||!o.current)return;let n=[...o.current.querySelectorAll(`button,a,iframe,[tabindex="0"]`)],r=t.composedPath().includes(o.current),i=n[0],s=n.at(-1),c=e.root.activeElement;r&&!t.shiftKey&&c===s?(t.preventDefault(),(a??i)?.focus()):r&&t.shiftKey&&c===i?(t.preventDefault(),(a??s)?.focus()):a&&document.activeElement===a&&(t.preventDefault(),(t.shiftKey?s:i)?.focus())};return document.addEventListener(`keydown`,t,!0),()=>document.removeEventListener(`keydown`,t,!0)},[a]);let v=l?.spot;return/* @__PURE__ */ m(f,{children:[a&&v?/* @__PURE__ */ p(`div`,{class:`spot`,"aria-hidden":`true`,style:{width:`${v.w}px`,height:`${v.h}px`,transform:`translate(${v.x}px,${v.y}px)`,borderRadius:`${v.r}px`}}):!a&&s===`center`&&/* @__PURE__ */ p(`div`,{class:`scrim`,"aria-hidden":`true`}),/* @__PURE__ */ p(T,{ctx:e,guide:t,index:n,reduced:r,cardRef:o,style:l?{transform:`translate(${Math.round(l.x)}px,${Math.round(l.y)}px)`,transition:g?void 0:`none`}:{visibility:`hidden`}})]})}function F({ctx:e,handle:r}){let[,i]=d(0),a=()=>i(e=>e+1),[o,s]=d(!1),[l,u]=d(),f=t();r.update=a,r.openLauncher=t=>{let n=document.activeElement;u(t??(n!==document.body&&n!==e.root.host?n??void 0:void 0)),s(!0)},c(()=>{let t=t=>{t.key===`Escape`&&(o?s(!1):e.engine.active&&e.dispatch({type:e.engine.active.status===`completed`?`close`:`dismiss`}))};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[o]),c(()=>{let e=new MutationObserver(a),t=matchMedia(`(prefers-color-scheme: dark)`);for(let t of[document.documentElement,document.body])e.observe(t,{attributes:!0});return t.addEventListener(`change`,a),()=>{e.disconnect(),t.removeEventListener(`change`,a)}},[]);let g=e.engine.active,_=g?.guide,y=n(e.config,e.options.colorMode,_?.theme?.mode)?`dark`:`light`;e.root.host.setAttribute(`data-mode`,y);let b=e.config.theme,x=_?.theme?.accent,C={};for(let[e,t]of Object.entries({...b?.[y],..._?.theme?.resolved?.[y]??(!b&&x&&{accent:x,"accent-hover":x,"on-accent":v(x)})}))C[`--ps-${e}`]=t;let w=g?.status===`running`?g.guide.steps[g.index]:void 0;return/* @__PURE__ */ m(`div`,{class:`l`,style:C,children:[/* @__PURE__ */ p(O,{ctx:e,open:o,setOpen:s,near:l}),!o&&g?.status===`running`&&/* @__PURE__ */ p(P,{ctx:e,guide:g.guide,index:g.index,reduced:f},g.guide.id),!o&&g?.status===`completed`&&/* @__PURE__ */ p(D,{ctx:e,guide:g.guide}),/* @__PURE__ */ p(`div`,{class:`sr`,"aria-live":`polite`,children:w?`Step ${g.index+1} of ${g.guide.steps.length}: ${h(w.title,S(e))}`:g?`Level cleared`:``})]})}function I(t){let n=t.options,r=e=>void t.outbox.push(e);k().then(({createTransport:i})=>{let a=i({appKey:n.appKey,url:n.eventsUrl,sdk:n.sdkName??`web`,version:e,preview:n.preview,userId:t.userId,send:n.transport});t.outbox.splice(0).forEach(a.push),r=a.push}).catch(e=>t.emit({type:`sdk_error`,message:String(e)}));let i=document.createElement(`style`);i.textContent=`:host{--ps-radius-md:14px;--ps-radius-lg:20px;--ps-font-display:"Bricolage Grotesque","Figtree",system-ui,sans-serif;--ps-font-sans:"Figtree",system-ui,-apple-system,"Segoe UI",sans-serif;--ps-clip-overlay:rgba(12,14,19,.72);--ps-ease:cubic-bezier(.2,.8,.2,1);--ps-accent:var(--ps-primary);--ps-accent-hover:var(--ps-primary-hover);--ps-on-accent:var(--ps-on-primary);--ps-surface:#fff;--ps-surface-sunken:#f5f6f9;--ps-surface-raised:#fff;--ps-line:#e3e6ec;--ps-ink:#151823;--ps-ink-secondary:#454b5c;--ps-ink-muted:#646b7d;--ps-primary:#2e5bff;--ps-primary-hover:#2149e6;--ps-primary-soft:#e8edff;--ps-primary-ink:#2149e6;--ps-on-primary:#fff;--ps-spark:#ffc933;--ps-spark-soft:#fff4cc;--ps-spark-ink:#7a5a00;--ps-on-spark:#151823;--ps-scrim:rgba(12,14,19,.64);--ps-tag-mint:#ddf5ea;--ps-chart-4:#14b37d;--ps-chart-5:#ff7a59;--ps-shadow-lg:0 20px 48px -12px rgba(21,24,35,.28),0 4px 10px rgba(21,24,35,.06);--ps-ring-focus:0 0 0 2px #fff,0 0 0 4px #2e5bff}:host([data-mode=dark]){--ps-surface:#161922;--ps-surface-sunken:#1d212b;--ps-surface-raised:#222633;--ps-line:#2a2f3c;--ps-ink:#f2f4f8;--ps-ink-secondary:#c5cad5;--ps-ink-muted:#959cad;--ps-primary:#7091ff;--ps-primary-hover:#8da7ff;--ps-primary-soft:#1c2550;--ps-primary-ink:#93abff;--ps-on-primary:#0c0e13;--ps-spark:#ffd452;--ps-spark-soft:#3a2f0a;--ps-spark-ink:#ffd86b;--ps-on-spark:#151823;--ps-scrim:rgba(0,0,0,.72);--ps-tag-mint:#0f2c22;--ps-chart-4:#3dd9a0;--ps-chart-5:#ff9478;--ps-shadow-lg:0 20px 48px -12px rgba(0,0,0,.8),0 4px 10px rgba(0,0,0,.5);--ps-ring-focus:0 0 0 2px #161922,0 0 0 4px #7091ff}:host{all:initial}*{box-sizing:border-box;margin:0}.l{position:fixed;inset:0;pointer-events:none;z-index:2147483000;font:400 14px/20px var(--ps-font-sans);color:var(--ps-ink);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;border:0;padding:0;background:none;cursor:pointer}button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:none;box-shadow:var(--ps-ring-focus)}svg{width:16px;height:16px;flex:none}.scrim{position:fixed;inset:0;background:var(--ps-scrim);pointer-events:auto}.spot,.card{position:fixed;left:0;top:0;transition:transform .36s var(--ps-ease),width .36s var(--ps-ease),height .36s var(--ps-ease)}.spot{box-shadow:0 0 0 9999px var(--ps-scrim)}.spot:after{content:"";position:absolute;inset:-4px;border-radius:18px;border:2px solid var(--ps-spark);animation:ring 1.8s ease-out infinite}.card,.cel,.panel{background:var(--ps-surface-raised);border-radius:var(--ps-radius-lg);box-shadow:var(--ps-shadow-lg);pointer-events:auto;outline:none}.card{width:336px;max-width:calc(100vw - 24px);padding:10px}.big{width:min(720px,calc(100vw - 24px))}.clip{position:relative;aspect-ratio:16/10;border-radius:var(--ps-radius-md);overflow:hidden;background:var(--ps-surface-sunken)}.clip>video,.clip>img,.clip>iframe{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border:0}.bar{position:absolute;left:8px;right:8px;bottom:8px;display:flex;align-items:center;gap:6px;color:#fff}.pill,.round{background:var(--ps-clip-overlay);border-radius:99px;display:inline-flex;align-items:center;justify-content:center}.pill{height:24px;padding:0 8px;gap:4px;font:700 11px/1 var(--ps-font-sans)}.pill svg{width:13px;height:13px}.round{width:28px;height:28px}.round svg{width:14px;height:14px}.bar .round:first-of-type{margin-left:auto}.play{position:absolute;inset:0;margin:auto;width:60px;height:60px;border-radius:50%;background:var(--ps-accent);color:var(--ps-on-accent);display:grid;place-items:center}.play svg{width:26px;height:26px}.body{padding:14px 8px 6px}.meta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted);margin-bottom:10px}.meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;margin:-6px -6px -6px 0}.x:hover,.gho:hover,.row:hover,.sec:hover{background:var(--ps-surface-sunken);color:var(--ps-ink)}.steps{display:flex;gap:4px;margin-bottom:12px}.seg{flex:1;height:6px;border-radius:99px;background:var(--ps-surface-sunken);overflow:hidden;position:relative}.done{background:var(--ps-accent)}.cur:after{content:"";position:absolute;left:0;top:0;bottom:0;width:55%;border-radius:99px;background:var(--ps-spark)}.anim:after{animation:fill var(--d,4s) linear infinite}.title,.cel h2,.panel h2{font:700 20px/26px var(--ps-font-display);letter-spacing:-.01em;margin-bottom:4px}.text,.cel p{color:var(--ps-ink-secondary)}.foot{display:flex;align-items:center;gap:8px;padding:14px 8px 4px}.wait,.sp{flex:1}.wait{display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted)}.pulse{width:8px;height:8px;border-radius:50%;background:var(--ps-spark);animation:pulse 1.6s ease-out infinite}.btn{height:32px;padding:0 14px;border-radius:var(--ps-radius-btn,99px);border:1px solid transparent;font-size:13px;line-height:18px;font-weight:600;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.pri{background:var(--ps-accent);color:var(--ps-on-accent)}.pri:hover{background:var(--ps-accent-hover)}.x{color:var(--ps-ink-muted)}.gho{color:var(--ps-ink-secondary)}.embed{background:#151823}.sec{background:var(--ps-surface);border-color:var(--ps-line)}.cel{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:336px;max-width:calc(100vw - 24px);padding:24px 20px 20px;text-align:center;overflow:hidden}.cel h2{font-size:24px;line-height:30px;font-weight:800}.cel p{margin-bottom:16px}.art{position:relative;height:72px;margin-bottom:8px}.tile{position:absolute;left:50%;top:4px;width:64px;height:64px;margin-left:-32px;border-radius:var(--ps-radius-lg);background:var(--ps-spark);color:var(--ps-on-spark);display:grid;place-items:center;animation:pop .6s cubic-bezier(.2,1.6,.4,1) both}.tile svg{width:30px;height:30px}.bit{position:absolute;border-radius:99px}.acts{display:flex;justify-content:center;gap:12px}.lb{position:fixed;bottom:24px;right:24px;width:56px;height:56px;border-radius:50%;background:var(--ps-accent);color:var(--ps-on-accent);box-shadow:var(--ps-shadow-lg);display:grid;place-items:center;pointer-events:auto}.lb svg{width:26px;height:26px}.cnt{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:var(--ps-spark);color:var(--ps-on-spark);font:800 11px/20px var(--ps-font-sans)}.panel{position:fixed;right:24px;bottom:96px;width:320px;max-width:calc(100vw - 36px);max-height:calc(100vh - 120px);overflow:auto;padding:16px}.left{right:auto;left:24px}.solo{bottom:24px}.panel .x{float:right}.panel>p{font-size:13px;line-height:18px;color:var(--ps-ink-muted);margin:-2px 0 12px}.rows{list-style:none;padding:0}.row{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border-radius:var(--ps-radius-md);text-align:left}.ti{width:36px;height:36px;flex:none;border-radius:var(--ps-radius-md);display:grid;place-items:center;background:var(--ps-primary-soft);color:var(--ps-primary-ink)}.ti.spark{background:var(--ps-spark-soft);color:var(--ps-spark-ink)}.ti.mint{background:var(--ps-tag-mint);color:var(--ps-ink)}.ti svg{width:18px;height:18px}.rb{flex:1;min-width:0}.rt,.rm{display:block;font-weight:600}.rm{font-size:12px;line-height:16px;font-weight:500;color:var(--ps-ink-muted)}.prog{display:block;height:6px;border-radius:99px;background:var(--ps-surface-sunken);margin-top:6px;overflow:hidden}.prog i{display:block;height:100%;background:var(--ps-accent)}.rp{display:flex;align-items:center;gap:4px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted)}.so{margin-top:8px}.new{height:24px;padding:0 10px;border-radius:99px;background:var(--ps-spark-soft);color:var(--ps-spark-ink);font-size:12px;line-height:24px;font-weight:600}.pb{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:10px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted);text-decoration:none}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}@keyframes ring{to{opacity:0;transform:scale(1.12)}}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--ps-spark)}70%,to{box-shadow:0 0 0 8px transparent}}@keyframes fill{0%{width:0}to{width:100%}}@keyframes pop{0%{opacity:0;transform:scale(.4) rotate(-12deg)}}@media (max-width:480px){.card{width:300px}.title{font-size:17px;line-height:22px}.lb{right:18px;bottom:18px}.panel{right:18px;bottom:86px}.solo{bottom:18px}.left{right:auto;left:18px}}@media (prefers-reduced-motion:reduce){.spot,.card{transition:none}.spot:after,.pulse,.cur:after,.tile{animation:none}}`,t.root.appendChild(i);let a=document.createElement(`div`);t.root.appendChild(a);let o={update:()=>{},openLauncher:()=>{},send:e=>r(e)};return s(/* @__PURE__ */ p(F,{ctx:t,handle:o}),a),o}export{j as findAnchor,I as mount};
|