1import{_ as Te,r as la,h as Ti}from"./errorHandling-DERMQAfY.js";import{c as ca,r as x,j as p,g as qr,R as U,a as xs,w as ua,G as fa,u as da}from"./chunk-EPOLDU6W-DIpkhZgL.js";import{r as bs}from"./index-D4lalmk3.js";import{o as Ei,s as ha,b as pa,d as Ci,e as ki,f as ma,g as ga}from"./index-CSXtu6A-.js";import{c as vt}from"./createLucideIcon-BGpK6DBO.js";import{I as _a}from"./input-CABp2U18.js";import{a as vs,P as Jt,u as ya,b as xa,e as ba,d as on,c as Ot,j as va,B as Pe}from"./button-DBrwKjbf.js";import{d as ws,R as wa,I as Sa,D as Ta,a as Ea,b as Ca,c as Oi,e as ka}from"./dropdown-menu-BEOJ7p1B.js";import{u as Kr,a as Gn,D as Pt,b as Rt,c as Nr,d as Ir,e as Oa,f as Pa}from"./AuthModalContext-B_8LDe1i.js";import{toast as Oe}from"./index-DV2veIJu.js";import{b as Ar,Q as Ss,j as an,K as En,d as Ft,a as Ct,h as Ra,c as Na,r as Ia,m as Aa,n as ja,g as ln,R as Da,S as La,T as Pi,U as Ma,k as Fa}from"./analytics-C1VJWLwm.js";import{u as me}from"./store-BK4fUb53.js";import{r as Ba,j as Ua,u as za,P as Va,i as Cn}from"./validation-BkU9VOiW.js";import{C as $a}from"./chartRegistry-D3YxSm07.js";import{A as Ga}from"./api-DabWmWwi.js";import{P as Cr}from"./plus-B9T3t5ln.js";import{T as Ri}from"./trash-2-BL_-8hP1.js";import{T as Ni,L as ir}from"./triangle-alert-Dt2MpFnD.js";import{c as Ya,C as Ha,b as Wa}from"./controls-DS7PncId.js";import{u as Ts}from"./useSubscription-D61utUPa.js";import{a as qa}from"./WorkspaceContext-DcSArUTj.js";import{A as Ka,a as Xa,S as Ja}from"./switch-D6ALH8uS.js";import{d as Za,b as Qa,e as el}from"./pricing-JcZPs-jv.js";import{X as tl}from"./index-BaF1Miyc.js";import{C as rl}from"./check-DRxLxHCU.js";import{A as nl}from"./arrow-right-DsKQDKGn.js";import{a as il}from"./exports-BqGNkPL2.js";import{f as sl}from"./fontLoader-F-SxKmkH.js";import{l as ol}from"./index-C3AmcaR-.js";import{u as al}from"./use-mobile-DjNcyQfl.js";import{u as ll}from"./index-C_4AQKsg.js";import{A as cl,a as ul,b as fl,c as dl}from"./accordion-Cc8RvLxp.js";import{V as hl,S as pl,a as ml,b as gl,H as _l,c as yl,d as xl,e as bl,L as vl,f as wl,A as Sl,g as Tl,P as El,D as Cl,h as kl,B as Ol,R as Pl,i as Rl,j as Nl,k as Il,F as Al,T as jl,W as Dl,l as Ll,M as Ml,m as Fl,n as Bl,o as Ul,G as zl,I as Vl,p as $l,q as Gl,r as Yl,C as Hl,s as Wl,t as ql,u as Kl,v as Xl,w as Jl}from"./ChartTypeIcons-B-WVGgk1.js";import{D as Zl}from"./download-BwBiViwv.js";import{E as Ql}from"./ellipsis-vertical-D4LRy5x-.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};i.SENTRY_RELEASE={id:"acc43460c2f2119eb9918d4f2e6bbb38a1784977"};var e=new i.Error().stack;e&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[e]="34e5e7e0-099f-4afe-8b09-4e8e195f4a30",i._sentryDebugIdIdentifier="sentry-dbid-34e5e7e0-099f-4afe-8b09-4e8e195f4a30")}catch{}})();const ec=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],tc=vt("external-link",ec);const rc=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]],nc=vt("file-up",rc);const ic=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],cn=vt("image",ic);const sc=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],oc=vt("maximize-2",sc);const ac=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],lc=vt("mouse-pointer-click",ac);const cc=[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]],uc=vt("shapes",cc);const fc=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],dc=vt("star",fc);const hc=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],pc=vt("video",hc);
1var un={exports:{}},fn={};var Ii;function mc(){if(Ii)return fn;Ii=1;var i=ca();function e(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var t=typeof Object.is=="function"?Object.is:e,r=i.useState,n=i.useEffect,s=i.useLayoutEffect,o=i.useDebugValue;function a(f,d){var m=d(),_=r({inst:{value:m,getSnapshot:d}}),h=_[0].inst,y=_[1];return s(function(){h.value=m,h.getSnapshot=d,l(h)&&y({inst:h})},[f,m,d]),n(function(){return l(h)&&y({inst:h}),f(function(){l(h)&&y({inst:h})})},[f]),o(m),m}function l(f){var d=f.getSnapshot;f=f.value;try{var m=d();return!t(f,m)}catch{return!0}}function c(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return fn.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:u,fn}var Ai;function gc(){return Ai||(Ai=1,un.exports=mc()),un.exports}var _c=gc(),Yn="Progress",Hn=100,[yc]=vs(Yn),[xc,bc]=yc(Yn),Es=x.forwardRef((i,e)=>{const{__scopeProgress:t,value:r=null,max:n,getValueLabel:s=vc,...o}=i;(n||n===0)&&!ji(n)&&console.error(wc(`${n}`,"Progress"));const a=ji(n)?n:Hn;r!==null&&!Di(r,a)&&console.error(Sc(`${r}`,"Progress"));const l=Di(r,a)?r:null,c=Fr(l)?s(l,a):void 0;return p.jsx(xc,{scope:t,value:l,max:a,children:p.jsx(Jt.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Fr(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":Os(l,a),"data-value":l??void 0,"data-max":a,...o,ref:e})})});Es.displayName=Yn;var Cs="ProgressIndicator",ks=x.forwardRef((i,e)=>{const{__scopeProgress:t,...r}=i,n=bc(Cs,t);return p.jsx(Jt.div,{"data-state":Os(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...r,ref:e})});ks.displayName=Cs;function vc(i,e){return`${Math.round(i/e*100)}%`}function Os(i,e){return i==null?"indeterminate":i===e?"complete":"loading"}function Fr(i){return typeof i=="number"}function ji(i){return Fr(i)&&!isNaN(i)&&i>0}function Di(i,e){return Fr(i)&&!isNaN(i)&&i<=e&&i>=0}function wc(i,e){return`Invalid prop \`max\` of value \`${i}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Hn}\`.`}function Sc(i,e){return`Invalid prop \`value\` of value \`${i}\` supplied to \`${e}\`. The \`value\` prop must be: 2 - a positive number 3 - less than the value passed to \`max\` (or ${Hn} if no \`max\` prop is set) 4 - \`null\` or \`undefined\` if the progress is indeterminate. 5 6Defaulting to \`null\`.`}var Tc=Es,Ec=ks,Xr="Tabs",[Cc]=vs(Xr,[ws]),Ps=ws(),[kc,Wn]=Cc(Xr),Rs=x.forwardRef((i,e)=>{const{__scopeTabs:t,value:r,onValueChange:n,defaultValue:s,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=i,u=ll(a),[f,d]=ya({prop:r,onChange:n,defaultProp:s??"",caller:Xr});return p.jsx(kc,{scope:t,baseId:xa(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:l,children:p.jsx(Jt.div,{dir:u,"data-orientation":o,...c,ref:e})})});Rs.displayName=Xr;var Ns="TabsList",Oc=x.forwardRef((i,e)=>{const{__scopeTabs:t,loop:r=!0,...n}=i,s=Wn(Ns,t),o=Ps(t);return p.jsx(wa,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:r,children:p.jsx(Jt.div,{role:"tablist","aria-orientation":s.orientation,...n,ref:e})})});Oc.displayName=Ns;var Is="TabsTrigger",Pc=x.forwardRef((i,e)=>{const{__scopeTabs:t,value:r,disabled:n=!1,...s}=i,o=Wn(Is,t),a=Ps(t),l=Ds(o.baseId,r),c=Ls(o.baseId,r),u=r===o.value;return p.jsx(Sa,{asChild:!0,...a,focusable:!n,active:u,children:p.jsx(Jt.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...s,ref:e,onMouseDown:on(i.onMouseDown,f=>{!n&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:on(i.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:on(i.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!n&&f&&o.onValueChange(r)})})})});Pc.displayName=Is;var As="TabsContent",js=x.forwardRef((i,e)=>{const{__scopeTabs:t,value:r,forceMount:n,children:s,...o}=i,a=Wn(As,t),l=Ds(a.baseId,r),c=Ls(a.baseId,r),u=r===a.value,f=x.useRef(u);return x.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),p.jsx(ba,{present:n||u,children:({present:d})=>p.jsx(Jt.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:c,tabIndex:0,...o,ref:e,style:{...i.style,animationDuration:f.current?"0s":void 0},children:d&&s})})});js.displayName=As;function Ds(i,e){return`${i}-trigger-${e}`}function Ls(i,e){return`${i}-content-${e}`}var Rc=Rs,Nc=js;function Ic(i,e){const t=i;if(t?.intent)return t.intent;const r=e.get("ft");if(r)return{type:"firestoreTemplate",id:r};const n=e.get("template");if(n)return{type:"template",slug:n};
6const s=e.get("clone");if(s)return{type:"clone",chartId:s};const o=e.get("chart");return o?{type:"chart",chartType:o}:e.get("new")==="1"?{type:"new"}:{type:"restore"}}function st(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ms(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}var Ge={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Yt={duration:.5,overwrite:!1,delay:0},qn,ve,oe,Ke=1e8,te=1/Ke,kn=Math.PI*2,Ac=kn/4,jc=0,Fs=Math.sqrt,Dc=Math.cos,Lc=Math.sin,xe=function(e){return typeof e=="string"},ue=function(e){return typeof e=="function"},ct=function(e){return typeof e=="number"},Kn=function(e){return typeof e>"u"},nt=function(e){return typeof e=="object"},Ae=function(e){return e!==!1},Xn=function(){return typeof window<"u"},kr=function(e){return ue(e)||xe(e)},Bs=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Ce=Array.isArray,Mc=/random\([^)]+\)/g,Fc=/,\s*/g,Li=/(?:-?\.?\d|\.)+/gi,Us=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Bt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,dn=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,zs=/[+-]=-?[.\d]+/,Bc=/[^,'"\[\]\s]+/gi,Uc=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,le,et,On,Jn,Ye={},Br={},Vs,$s=function(e){return(Br=Ht(e,Ye))&&Me},Zn=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},dr=function(e,t){return!t&&console.warn(e)},Gs=function(e,t){return e&&(Ye[e]=t)&&Br&&(Br[e]=t)||Ye},hr=function(){return 0},zc={suppressEvents:!0,isStart:!0,kill:!1},jr={suppressEvents:!0,kill:!1},Vc={suppressEvents:!0},Qn={},mt=[],Pn={},Ys,Be={},hn={},Mi=30,Dr=[],ei="",ti=function(e){var t=e[0],r,n;if(nt(t)||ue(t)||(e=[e]),!(r=(t._gsap||{}).harness)){for(n=Dr.length;n--&&!Dr[n].targetTest(t););r=Dr[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new go(e[n],r)))||e.splice(n,1);return e},Nt=function(e){return e._gsap||ti(Xe(e))[0]._gsap},Hs=function(e,t,r){return(r=e[t])&&ue(r)?e[t]():Kn(r)&&e.getAttribute&&e.getAttribute(t)||r},je=function(e,t){return(e=e.split(",")).forEach(t)||e},fe=function(e){return Math.round(e*1e5)/1e5||0},ae=function(e){return Math.round(e*1e7)/1e7||0},Vt=function(e,t){var r=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),r==="+"?e+n:r==="-"?e-n:r==="*"?e*n:e/n},$c=function(e,t){for(var r=t.length,n=0;e.indexOf(t[n])<0&&++n<r;);return n<r},Ur=function(){var e=mt.length,t=mt.slice(0),r,n;for(Pn={},mt.length=0,r=0;r<e;r++)n=t[r],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},ri=function(e){return!!(e._initted||e._startAt||e.add)},Ws=function(e,t,r,n){mt.length&&!ve&&Ur(),e.render(t,r,!!(ve&&t<0&&ri(e))),mt.length&&!ve&&Ur()},qs=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(Bc).length<2?t:xe(e)?e.trim():e},Ks=function(e){return e},He=function(e,t){for(var r in t)r in e||(e[r]=t[r]);return e},Gc=function(e){return function(t,r){for(var n in r)n in t||n==="duration"&&e||n==="ease"||(t[n]=r[n])}},Ht=function(e,t){for(var r in t)e[r]=t[r];return e},Fi=function i(e,t){for(var r in t)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=nt(t[r])?i(e[r]||(e[r]={}),t[r]):t[r]);return e},zr=function(e,t){var r={},n;for(n in e)n in t||(r[n]=e[n]);return r},cr=function(e){var t=e.parent||le,r=e.keyframes?Gc(Ce(e.keyframes)):He;if(Ae(e.inherit))for(;t;)r(e,t.vars.defaults),t=t.parent||t._dp;return e},Yc=function(e,t){for(var r=e.length,n=r===t.length;n&&r--&&e[r]===t[r];);return r<0},Xs=function(e,t,r,n,s){var o=e[n],a;if(s)for(a=t[s];o&&o[s]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[r],e[r]=t),t._next?t._next._prev=t:e[n]=t,t._prev=o,t.parent=t._dp=e,t},Jr=function(e,t,r,n){r===void 0&&(r="_first"),n===void 0&&(n="_last");var s=t._prev,o=t._next;s?s._next=o:e[r]===t&&(e[r]=o),o?o._prev=s:e[n]===t&&(e[n]=s),t._next=t._prev=t.parent=null},_t=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},It=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},Hc=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Rn=function(e,t,r,n){return e._startAt&&(ve?e._startAt.revert(jr):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},Wc=function i(e){return!e||e._ts&&i(e.parent)},Bi=function(e){return e._repeat?Wt(e._tTime,e=e.duration()+e._rDelay)*e:0},Wt=function(e,t){var r=Math.floor(e=ae(e/t));return e&&r===e?r-1:r},Vr=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Zr=function(e){return e._end=ae(e._start+(e._tDur/Math.abs(e._ts||e._rts||te)||0))},Qr=function(e,t){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=ae(r._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Zr(e),r._dirty||It(r,e)),e},Js=function(e,t){var r;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(r=Vr(e.rawTime(),t),(!t._dur||br(0,t.totalDuration(),r)-t._tTime>te)&&t.render(r,!0)),It(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-te}},tt=function(e,t,r,n){return t.parent&&_t(t),t._start=ae((ct(r)?r:r||e!==le?qe(e,r,t):e._time)+t._delay),t._end=ae(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Xs(e,t,"_first","_last",e._sort?"_start":0),Nn(t)||(e._recent=t),n||Js(e,t),e._ts<0&&Qr(e,e._tTime),e},Zs=function(e,t){return(Ye.ScrollTrigger||Zn("scrollTrigger",t))&&Ye.ScrollTrigger.create(t,e)},Qs=function(e,t,r,n,s){if(ii(e,t,s),!e._initted)return 1;if(!r&&e._pt&&!ve&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Ys!==ze.frame)return mt.pu
6sh(e),e._lazy=[s,n],1},qc=function i(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||i(t))},Nn=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},Kc=function(e,t,r,n){var s=e.ratio,o=t<0||!t&&(!e._start&&qc(e)&&!(!e._initted&&Nn(e))||(e._ts<0||e._dp._ts<0)&&!Nn(e))?0:1,a=e._rDelay,l=0,c,u,f;if(a&&e._repeat&&(l=br(0,e._tDur,t),u=Wt(l,a),e._yoyo&&u&1&&(o=1-o),u!==Wt(e._tTime,a)&&(s=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==s||ve||n||e._zTime===te||!t&&e._zTime){if(!e._initted&&Qs(e,t,n,r,l))return;for(f=e._zTime,e._zTime=t||(r?te:0),r||(r=t&&!f),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,c=e._pt;c;)c.r(o,c.d),c=c._next;t<0&&Rn(e,t,r,!0),e._onUpdate&&!r&&Ve(e,"onUpdate"),l&&e._repeat&&!r&&e.parent&&Ve(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&_t(e,1),!r&&!ve&&(Ve(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},Xc=function(e,t,r){var n;if(r>t)for(n=e._first;n&&n._start<=r;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=r;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},qt=function(e,t,r,n){var s=e._repeat,o=ae(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=s?s<0?1e10:ae(o*(s+1)+e._rDelay*s):o,a>0&&!n&&Qr(e,e._tTime=e._tDur*a),e.parent&&Zr(e),r||It(e.parent,e),e},Ui=function(e){return e instanceof Re?It(e):qt(e,e._dur)},Jc={_start:0,endTime:hr,totalDuration:hr},qe=function i(e,t,r){var n=e.labels,s=e._recent||Jc,o=e.duration()>=Ke?s.endTime(!1):e._dur,a,l,c;return xe(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),c=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(t.substr(1))||0)*(c?(a<0?s:r).totalDuration()/100:1)):a<0?(t in n||(n[t]=o),n[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),c&&r&&(l=l/100*(Ce(r)?r[0]:r).totalDuration()),a>1?i(e,t.substr(0,a-1),r)+l:o+l)):t==null?o:+t},ur=function(e,t,r){var n=ct(t[1]),s=(n?2:1)+(e<2?0:1),o=t[s],a,l;if(n&&(o.duration=t[1]),o.parent=r,e){for(a=o,l=r;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=Ae(l.vars.inherit)&&l.parent;o.immediateRender=Ae(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[s-1]}return new he(t[0],o,t[s+1])},wt=function(e,t){return e||e===0?t(e):t},br=function(e,t,r){return r<e?e:r>t?t:r},Ee=function(e,t){return!xe(e)||!(t=Uc.exec(e))?"":t[1]},Zc=function(e,t,r){return wt(r,function(n){return br(e,t,n)})},In=[].slice,eo=function(e,t){return e&&nt(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&nt(e[0]))&&!e.nodeType&&e!==et},Qc=function(e,t,r){return r===void 0&&(r=[]),e.forEach(function(n){var s;return xe(n)&&!t||eo(n,1)?(s=r).push.apply(s,Xe(n)):r.push(n)})||r},Xe=function(e,t,r){return oe&&!t&&oe.selector?oe.selector(e):xe(e)&&!r&&(On||!Kt())?In.call((t||Jn).querySelectorAll(e),0):Ce(e)?Qc(e,r):eo(e)?In.call(e,0):e?[e]:[]},An=function(e){return e=Xe(e)[0]||dr("Invalid scope")||{},function(t){var r=e.current||e.nativeElement||e;return Xe(t,r.querySelectorAll?r:r===e?dr("Invalid scope")||Jn.createElement("div"):e)}},to=function(e){return e.sort(function(){return .5-Math.random()})},ro=function(e){if(ue(e))return e;var t=nt(e)?e:{each:e},r=At(t.ease),n=t.from||0,s=parseFloat(t.base)||0,o={},a=n>0&&n<1,l=isNaN(n)||a,c=t.axis,u=n,f=n;return xe(n)?u=f={center:.5,edges:.5,end:1}[n]||0:!a&&l&&(u=n[0],f=n[1]),function(d,m,_){var h=(_||t).length,y=o[h],g,v,w,S,b,T,E,k,C;if(!y){if(C=t.grid==="auto"?0:(t.grid||[1,Ke])[1],!C){for(E=-Ke;E<(E=_[C++].getBoundingClientRect().left)&&C<h;);C<h&&C--}for(y=o[h]=[],g=l?Math.min(C,h)*u-.5:n%C,v=C===Ke?0:l?h*f/C-.5:n/C|0,E=0,k=Ke,T=0;T<h;T++)w=T%C-g,S=v-(T/C|0),y[T]=b=c?Math.abs(c==="y"?S:w):Fs(w*w+S*S),b>E&&(E=b),b<k&&(k=b);n==="random"&&to(y),y.max=E-k,y.min=k,y.v=h=(parseFloat(t.amount)||parseFloat(t.each)*(C>h?h-1:c?c==="y"?h/C:C:Math.max(C,h/C))||0)*(n==="edges"?-1:1),y.b=h<0?s-h:s,y.u=Ee(t.amount||t.each)||0,r=r&&h<0?ho(r):r}return h=(y[d]-y.min)/y.max||0,ae(y.b+(r?r(h):h)*y.v)+y.u}},jn=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var n=ae(Math.round(parseFloat(r)/e)*e*t);return(n-n%1)/t+(ct(r)?0:Ee(r))}},no=function(e,t){var r=Ce(e),n,s;
6return!r&&nt(e)&&(n=r=e.radius||Ke,e.values?(e=Xe(e.values),(s=!ct(e[0]))&&(n*=n)):e=jn(e.increment)),wt(t,r?ue(e)?function(o){return s=e(o),Math.abs(s-o)<=n?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),c=Ke,u=0,f=e.length,d,m;f--;)s?(d=e[f].x-a,m=e[f].y-l,d=d*d+m*m):d=Math.abs(e[f]-a),d<c&&(c=d,u=f);return u=!n||c<=n?e[u]:o,s||u===o||ct(o)?u:u+Ee(o)}:jn(e))},io=function(e,t,r,n){return wt(Ce(e)?!t:r===!0?!!(r=0):!n,function(){return Ce(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(t-e+r*.99))/r)*r*n)/n})},eu=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduce(function(s,o){return o(s)},n)}},tu=function(e,t){return function(r){return e(parseFloat(r))+(t||Ee(r))}},ru=function(e,t,r){return oo(e,t,0,1,r)},so=function(e,t,r){return wt(r,function(n){return e[~~t(n)]})},nu=function i(e,t,r){var n=t-e;return Ce(e)?so(e,i(0,e.length),t):wt(r,function(s){return(n+(s-e)%n)%n+e})},iu=function i(e,t,r){var n=t-e,s=n*2;return Ce(e)?so(e,i(0,e.length-1),t):wt(r,function(o){return o=(s+(o-e)%s)%s||0,e+(o>n?s-o:o)})},pr=function(e){return e.replace(Mc,function(t){var r=t.indexOf("[")+1,n=t.substring(r||7,r?t.indexOf("]"):t.length-1).split(Fc);return io(r?n:+n[0],r?0:+n[1],+n[2]||1e-5)})},oo=function(e,t,r,n,s){var o=t-e,a=n-r;return wt(s,function(l){return r+((l-e)/o*a||0)})},su=function i(e,t,r,n){var s=isNaN(e+t)?0:function(m){return(1-m)*e+m*t};if(!s){var o=xe(e),a={},l,c,u,f,d;if(r===!0&&(n=1)&&(r=null),o)e={p:e},t={p:t};else if(Ce(e)&&!Ce(t)){for(u=[],f=e.length,d=f-2,c=1;c<f;c++)u.push(i(e[c-1],e[c]));f--,s=function(_){_*=f;var h=Math.min(d,~~_);return u[h](_-h)},r=t}else n||(e=Ht(Ce(e)?[]:{},e));if(!u){for(l in t)ni.call(a,e,l,"get",t[l]);s=function(_){return ai(_,a)||(o?e.p:e)}}}return wt(r,s)},zi=function(e,t,r){var n=e.labels,s=Ke,o,a,l;for(o in n)a=n[o]-t,a<0==!!r&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},Ve=function(e,t,r){var n=e.vars,s=n[t],o=oe,a=e._ctx,l,c,u;if(s)return l=n[t+"Params"],c=n.callbackScope||e,r&&mt.length&&Ur(),a&&(oe=a),u=l?s.apply(c,l):s.call(c),oe=o,u},ar=function(e){return _t(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ve),e.progress()<1&&Ve(e,"onInterrupt"),e},Ut,ao=[],lo=function(e){if(e)if(e=!e.name&&e.default||e,Xn()||e.headless){var t=e.name,r=ue(e),n=t&&!r&&e.init?function(){this._props=[]}:e,s={init:hr,render:ai,add:ni,kill:vu,modifier:bu,rawVars:0},o={targetTest:0,get:0,getSetter:oi,aliases:{},register:0};if(Kt(),e!==n){if(Be[t])return;He(n,He(zr(e,s),o)),Ht(n.prototype,Ht(s,zr(e,o))),Be[n.prop=t]=n,e.targetTest&&(Dr.push(n),Qn[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}Gs(t,n),e.register&&e.register(Me,n,De)}else ao.push(e)},ee=255,lr={aqua:[0,ee,ee],lime:[0,ee,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ee],navy:[0,0,128],white:[ee,ee,ee],olive:[128,128,0],yellow:[ee,ee,0],orange:[ee,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ee,0,0],pink:[ee,192,203],cyan:[0,ee,ee],transparent:[ee,ee,ee,0]},pn=function(e,t,r){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(r-t)*e*6:e<.5?r:e*3<2?t+(r-t)*(2/3-e)*6:t)*ee+.5|0},co=function(e,t,r){var n=e?ct(e)?[e>>16,e>>8&ee,e&ee]:0:lr.black,s,o,a,l,c,u,f,d,m,_;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),lr[e])n=lr[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+s+s+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&ee,n&ee,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&ee,e&ee]}else if(e.substr(0,3)==="hsl"){if(n=_=e.match(Li),!t)l=+n[0]%360/360,c=+n[1]/100,u=+n[2]/100,o=u<=.5?u*(c+1):u+c-u*c,s=u*2-o,n.length>3&&(n[3]*=1),n[0]=pn(l+1/3,s,o),n[1]=pn(l,s,o),n[2]=pn(l-1/3,s,o);else if(~e.indexOf("="))return n=e.match(Us),r&&n.length<4&&(n[3]=1),n}else n=e.match(Li)||lr.transparent;n=n.map(Number)}return t&&!_&&(s=n[0]/ee,o=n[1]/ee,a=n[2]/ee,f=Math.max(s,o,a),d=Math.min(s,o,a),u=(f+d)/2,f===d?l=c=0:(m=f-d,c=u>.5?m/(2-f-d):m/(f+d),l=f===s?(o-a)/m+(o<a?6:0):f===o?(a-s)/m+2:(s-o)/m+4,l*=60),n[0]=~~(l+.5),n[1]=~~(c*100+.5),n[2]=~~(u*100+.5)),r&&n.length<4&&(n[3]=1),n},uo=function(e){var t=[],r=[],n=-1;return e.split(gt).forEach(function(s){var o=s.match(Bt)||[];t.push.apply(t,o),r.push(n+=o.length+1)}),t.c=r,t},Vi=function(e,t,r){var n="",s=(e+n).match(gt),o=t?"hsla(":"rgba(",a=0,l,c,u,f;if(!s)return e;if(s=s.map(function(d){return(d=co(d,t,1))&&o+(t?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}
6),r&&(u=uo(e),l=r.c,l.join(n)!==u.c.join(n)))for(c=e.replace(gt,"1").split(Bt),f=c.length-1;a<f;a++)n+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(u.length?u:s.length?s:r).shift());if(!c)for(c=e.split(gt),f=c.length-1;a<f;a++)n+=c[a]+s[a];return n+c[f]},gt=(function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in lr)i+="|"+e+"\\b";return new RegExp(i+")","gi")})(),ou=/hsl[a]?\(/,fo=function(e){var t=e.join(" "),r;if(gt.lastIndex=0,gt.test(t))return r=ou.test(t),e[1]=Vi(e[1],r),e[0]=Vi(e[0],r,uo(e[1])),!0},mr,ze=(function(){var i=Date.now,e=500,t=33,r=i(),n=r,s=1e3/240,o=s,a=[],l,c,u,f,d,m,_=function h(y){var g=i()-n,v=y===!0,w,S,b,T;if((g>e||g<0)&&(r+=g-t),n+=g,b=n-r,w=b-o,(w>0||v)&&(T=++f.frame,d=b-f.time*1e3,f.time=b=b/1e3,o+=w+(w>=s?4:s-w),S=1),v||(l=c(h)),S)for(m=0;m<a.length;m++)a[m](b,d,T,y)};return f={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(y){return d/(1e3/(y||60))},wake:function(){Vs&&(!On&&Xn()&&(et=On=window,Jn=et.document||{},Ye.gsap=Me,(et.gsapVersions||(et.gsapVersions=[])).push(Me.version),$s(Br||et.GreenSockGlobals||!et.gsap&&et||{}),ao.forEach(lo)),u=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),c=u||function(y){return setTimeout(y,o-f.time*1e3+1|0)},mr=1,_(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(l),mr=0,c=hr},lagSmoothing:function(y,g){e=y||1/0,t=Math.min(g||33,e)},fps:function(y){s=1e3/(y||240),o=f.time*1e3+s},add:function(y,g,v){var w=g?function(S,b,T,E){y(S,b,T,E),f.remove(w)}:y;return f.remove(y),a[v?"unshift":"push"](w),Kt(),w},remove:function(y,g){~(g=a.indexOf(y))&&a.splice(g,1)&&m>=g&&m--},_listeners:a},f})(),Kt=function(){return!mr&&ze.wake()},q={},au=/^[\d.\-M][\d.\-,\s]/,lu=/["']/g,cu=function(e){for(var t={},r=e.substr(1,e.length-3).split(":"),n=r[0],s=1,o=r.length,a,l,c;s<o;s++)l=r[s],a=s!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),t[n]=isNaN(c)?c.replace(lu,"").trim():+c,n=l.substr(a+1).trim();return t},uu=function(e){var t=e.indexOf("(")+1,r=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<r?e.indexOf(")",r+1):r)},fu=function(e){var t=(e+"").split("("),r=q[t[0]];return r&&t.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[cu(t[1])]:uu(e).split(",").map(qs)):q._CE&&au.test(e)?q._CE("",e):r},ho=function(e){return function(t){return 1-e(1-t)}},po=function i(e,t){for(var r=e._first,n;r;)r instanceof Re?i(r,t):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==t&&(r.timeline?i(r.timeline,t):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=t)),r=r._next},At=function(e,t){return e&&(ue(e)?e:q[e]||fu(e))||t},Dt=function(e,t,r,n){r===void 0&&(r=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var s={easeIn:t,easeOut:r,easeInOut:n},o;return je(e,function(a){q[a]=Ye[a]=s,q[o=a.toLowerCase()]=r;for(var l in s)q[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=q[a+"."+l]=s[l]}),s},mo=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},mn=function i(e,t,r){var n=t>=1?t:1,s=(r||(e?.3:.45))/(t<1?t:1),o=s/kn*(Math.asin(1/n)||0),a=function(u){return u===1?1:n*Math.pow(2,-10*u)*Lc((u-o)*s)+1},l=e==="out"?a:e==="in"?function(c){return 1-a(1-c)}:mo(a);return s=kn/s,l.config=function(c,u){return i(e,c,u)},l},gn=function i(e,t){t===void 0&&(t=1.70158);var r=function(o){return o?--o*o*((t+1)*o+t)+1:0},n=e==="out"?r:e==="in"?function(s){return 1-r(1-s)}:mo(r);return n.config=function(s){return i(e,s)},n};je("Linear,Quad,Cubic,Quart,Quint,Strong",function(i,e){var t=e<5?e+1:e;Dt(i+",Power"+(t-1),e?function(r){return Math.pow(r,t)}:function(r){return r},function(r){return 1-Math.pow(1-r,t)},function(r){return r<.5?Math.pow(r*2,t)/2:1-Math.pow((1-r)*2,t)/2})});q.Linear.easeNone=q.none=q.Linear.easeIn;Dt("Elastic",mn("in"),mn("out"),mn());(function(i,e){var t=1/e,r=2*t,n=2.5*t,s=function(a){return a<t?i*a*a:a<r?i*Math.pow(a-1.5/e,2)+.75:a<n?i*(a-=2.25/e)*a+.9375:i*Math.pow(a-2.625/e,2)+.984375};Dt("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);Dt("Expo",function(i){return Math.pow(2,10*(i-1))*i+i*i*i*i*i*i*(1-i)});Dt("Circ",function(i){return-(Fs(1-i*i)-1)});Dt("Sine",function(i){return i===1?1:-Dc(i*Ac)+1});Dt("Back",gn("in"),gn("out"),gn());q.SteppedEase=q.steps=Ye.SteppedEase={config:function(e,t){e===void 0&&(e=1);var r=1/e,n=e+(t?0:1),s=t?1:0,o=1-te;return function(a){return((n*br(0,o,a)|0)+s)*r}}};Yt.ease=q["quad.out"];je("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return ei+=i+","+i+"Params,"});var go=function(e,t){this.id=jc++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Hs,this.set=t?t.getSetter:oi},gr=(function(){function i(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,qt(this,+t.duration,1,1),this.data=t.data,oe&&(this._ctx=oe,oe.data.push(this)),mr||ze.wake()}var e=i.prototype;return e.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},e.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,qt(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,n){if(Kt(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(Qr(this,r),!s._dp||s.parent||Js(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&tt(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===te||!this._initted&&this._dur&&r||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),Ws(this,r,n)),this},e.time=function(r,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+Bi(this))%(this._dur+this._rDelay)||(r?this._dur:0),n):this._time},e.totalProgress=function(r,n){return arguments.length?this.totalTime(this.totalDuration()*r,
6n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(r,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+Bi(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(r,n){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*s,n):this._repeat?Wt(this._tTime,s)+1:1},e.timeScale=function(r,n){if(!arguments.length)return this._rts===-te?0:this._rts;if(this._rts===r)return this;var s=this.parent&&this._ts?Vr(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-te?0:this._rts,this.totalTime(br(-Math.abs(this._delay),this.totalDuration(),s),n!==!1),Zr(this),Hc(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Kt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==te&&(this._tTime-=te)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=ae(r);var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&tt(n,this,this._start-this._delay),this}return this._start},e.endTime=function(r){return this._start+(Ae(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var n=this.parent||this._dp;return n?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Vr(n.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=Vc);var n=ve;return ve=r,ri(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),ve=n,this},e.globalTime=function(r){for(var n=this,s=arguments.length?r:n.rawTime();n;)s=n._start+s/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(r):s},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,Ui(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var n=this._time;return this._rDelay=r,Ui(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,n){return this.totalTime(qe(this,r),Ae(n))},e.restart=function(r,n){return this.play().totalTime(r?-this._delay:0,Ae(n)),this._dur||(this._zTime=-te),this},e.play=function(r,n){return r!=null&&this.seek(r,n),this.reversed(!1).paused(!1)},e.reverse=function(r,n){return r!=null&&this.seek(r||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(r,n){return r!=null&&this.seek(r,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-te:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-te,this},e.isActive=function(){var r=this.parent||this._dp,n=this._start,s;return!!(!r||this._ts&&this._initted&&r.isActive()&&(s=r.rawTime(!0))>=n&&s<this.endTime(!0)-te)},e.eventCallback=function(r,n,s){var o=this.vars;return arguments.length>1?(n?(o[r]=n,s&&(o[r+"Params"]=s),r==="onUpdate"&&(this._onUpdate=n)):delete o[r],this):o[r]},e.then=function(r){var n=this,s=n._prom;return new Promise(function(o){var a=ue(r)?r:Ks,l=function(){var u=n.then;n.then=null,s&&s(),ue(a)&&(a=a(n))&&(a.then||a===n)&&(n.then=u),o(a),n.then=u};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?l():n._prom=l})},e.kill=function(){ar(this)},i})();He(gr.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-te,_prom:0,_ps:!1,_rts:1});var Re=(function(i){Ms(e,i);function e(r,n){var s;return r===void 0&&(r={}),s=i.call(this,r)||this,s.labels={},s.smoothChildTiming=!!r.smoothChildTiming,s.autoRemoveChildren=!!r.autoRemoveChildren,s._sort=Ae(r.sortChildren),le&&tt(r.parent||le,st(s),n),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&Zs(st(s),r.scrollTrigger),s}var t=e.prototype;return t.to=function(n,s,o){return ur(0,arguments,this),this},t.from=function(n,s,o){return ur(1,arguments,this),this},t.fromTo=function(n,s,o,a){return ur(2,arguments,this),this},t.set=function(n,s,o){return s.duration=0,s.parent=this,cr(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new he(n,s,qe(this,o),1),this},t.call=function(n,s,o){return tt(this,he.delayedCall(0,n,s),o)},t.staggerTo=function(n,s,o,a,l,c,u){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=u,o.parent=this,new he(n,o,qe(this,l)),this},t.staggerFrom=function(n,s,o,a,l,c,u){return o.runBackwards=1,cr(o).immediateRender=Ae(o.immediateRender),this.staggerTo(n,s,o,a,l,c,u)},t.staggerFromTo=function(n,s,o,a,l,c,u,f){return a.startAt=o,cr(a).immediateRender=Ae(a.immediateRender),this.staggerTo(n,s,a,l,c,u,f)},t.render=function(n,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,u=n<=0?0:ae(n),f=this._zTime<0!=n<0&&(this._initted||!c),d,m,_,h,y,g,v,w,S,b,T,E;if(this!==le&&u>l&&n>=0&&(u=l),u!==this._tTime||o||f){if(a!==this._time&&c&&(u+=this._time-a,n+=this._time-a),d=u,S=this._start,w=this._ts,g=!w,f&&(c||(a=this._zTime),(n||!s)&&(this._zTime=n)),this._repeat){if(T=this._yoyo,y=c+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(y*100+n,s,o);if(d=ae(u%y),u===l?(h=this._repeat,d=c):(b=ae(u/y),h=~~b,h&&h===b&&(d=c,h--),d>c&&(d=c)),b=Wt(this._tTime,y),!a&&this._tTime&&b!==h&&this._tTime-b*y-this._dur<=0&&(b=h),T&&h&1&&(d=c-d,E=1),h!==b&&!this._lock){var k=T&&b&1,C=k===(T&&h&1);
6if(h<b&&(k=!k),a=k?0:u%c?c:u,this._lock=1,this.render(a||(E?0:ae(h*y)),s,!c)._lock=0,this._tTime=u,!s&&this.parent&&Ve(this,"onRepeat"),this.vars.repeatRefresh&&!E&&(this.invalidate()._lock=1,b=h),a&&a!==this._time||g!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,C&&(this._lock=2,a=k?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!E&&this.invalidate()),this._lock=0,!this._ts&&!g)return this;po(this,E)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(v=Xc(this,ae(a),ae(d)),v&&(u-=d-(d=v._start))),this._tTime=u,this._time=d,this._act=!w,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,a=0),!a&&u&&c&&!s&&!b&&(Ve(this,"onStart"),this._tTime!==u))return this;if(d>=a&&n>=0)for(m=this._first;m;){if(_=m._next,(m._act||d>=m._start)&&m._ts&&v!==m){if(m.parent!==this)return this.render(n,s,o);if(m.render(m._ts>0?(d-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(d-m._start)*m._ts,s,o),d!==this._time||!this._ts&&!g){v=0,_&&(u+=this._zTime=-te);break}}m=_}else{m=this._last;for(var N=n<0?n:d;m;){if(_=m._prev,(m._act||N<=m._end)&&m._ts&&v!==m){if(m.parent!==this)return this.render(n,s,o);if(m.render(m._ts>0?(N-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(N-m._start)*m._ts,s,o||ve&&ri(m)),d!==this._time||!this._ts&&!g){v=0,_&&(u+=this._zTime=N?-te:te);break}}m=_}}if(v&&!s&&(this.pause(),v.render(d>=a?0:-te)._zTime=d>=a?1:-1,this._ts))return this._start=S,Zr(this),this.render(n,s,o);this._onUpdate&&!s&&Ve(this,"onUpdate",!0),(u===l&&this._tTime>=this.totalDuration()||!u&&a)&&(S===this._start||Math.abs(w)!==Math.abs(this._ts))&&(this._lock||((n||!c)&&(u===l&&this._ts>0||!u&&this._ts<0)&&_t(this,1),!s&&!(n<0&&!a)&&(u||a||!l)&&(Ve(this,u===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,s){var o=this;if(ct(s)||(s=qe(this,s,n)),!(n instanceof gr)){if(Ce(n))return n.forEach(function(a){return o.add(a,s)}),this;if(xe(n))return this.addLabel(n,s);if(ue(n))n=he.delayedCall(0,n);else return this}return this!==n?tt(this,n,s):this},t.getChildren=function(n,s,o,a){n===void 0&&(n=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-Ke);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof he?s&&l.push(c):(o&&l.push(c),n&&l.push.apply(l,c.getChildren(!0,s,o)))),c=c._next;return l},t.getById=function(n){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===n)return s[o]},t.remove=function(n){return xe(n)?this.removeLabel(n):ue(n)?this.killTweensOf(n):(n.parent===this&&Jr(this,n),n===this._recent&&(this._recent=this._last),It(this))},t.totalTime=function(n,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ae(ze.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),i.prototype.totalTime.call(this,n,s),this._forcing=0,this):this._tTime},t.addLabel=function(n,s){return this.labels[n]=qe(this,s),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,s,o){var a=he.delayedCall(0,s||hr,o);return a.data="isPause",this._hasPause=1,tt(this,a,qe(this,n))},t.removePause=function(n){var s=this._first;for(n=qe(this,n);s;)s._start===n&&s.data==="isPause"&&_t(s),s=s._next},t.killTweensOf=function(n,s,o){for(var a=this.getTweensOf(n,o),l=a.length;l--;)dt!==a[l]&&a[l].kill(n,s);return this},t.getTweensOf=function(n,s){for(var o=[],a=Xe(n),l=this._first,c=ct(s),u;l;)l instanceof he?$c(l._targets,a)&&(c?(!dt||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(u=l.getTweensOf(a,s)).length&&o.push.apply(o,u),l=l._next;return o},t.tweenTo=function(n,s){s=s||{};var o=this,a=qe(o,n),l=s,c=l.startAt,u=l.onStart,f=l.onStartParams,d=l.immediateRender,m,_=he.to(o,He({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||te,onStart:function(){if(o.pause(),!m){var y=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());_._dur!==y&&qt(_,y,0,1).render(_._time,!0,!0),m=1}u&&u.apply(_,f||[])}},s));return d?_.render(0):_},t.tweenFromTo=function(n,s,o){return this.tweenTo(s,He({startAt:{time:qe(this,n)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),zi(this,qe(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),zi(this,qe(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+te)},t.shiftChildren=function(n,s,o){o===void 0&&(o=0);var a=this._first,l=this.labels,c;for(n=ae(n);a;)a._start>=o&&(a._start+=n,a._end+=n),a=a._next;if(s)for(c in l)l[c]>=o&&(l[c]+=n);return It(this)},t.invalidate=function(n){var s=this._first;for(this._lock=0;s;)s.invalidate(n),s=s._next;return i.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),It(this)},t.totalDuration=function(n){var s=0,o=this,a=o._last,l=Ke,c,u,f;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-n:n));if(o._dirty){for(f=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,tt(o,a,u-a._delay,1)._lock=0):l=u,u<0&&a._ts&&(s-=u,(!f&&!o._dp||f&&f.smoothChildTiming)&&(o._start+=ae(u/o._ts),o._time-=u,o._tTime-=u),o.shiftChildren(-u,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;qt(o,o===le&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(n){if(le._ts&&(Ws(le,Vr(n,le)),Ys=ze.frame),ze.frame>=Mi){Mi+=Ge.autoSleep||120;var s=le._first;if((!s||!s._ts)&&Ge.autoSleep&&ze._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||ze.sleep()}}},e})(gr);He(Re.prototype,{_lock:0,_hasPause:0,_forcing:0});var du=function(e,t,r,n,s,o,a){var l=new De(this._pt,e,t,0,1,wo,null,s),c=0,u=0,f,d,m,_,h,y,g,v;for(l.b=r,l.e=n,r+="",n+="",(g=~n.indexOf("random("))&&(n=pr(n)),o&&(v=[r,n],o(v,e,t),r=v[0],n=v[1]),d=r.match(dn)||[];f=dn.exec(n);)_=f[0],h=n.substring(c,f.index),m?m=(m+1)%5:h.substr(-5)==="rgba("&&(m=1),_!==d[u++]&&(y=parseFloat(d[u-1])||0,l._pt={_next:l._pt,p:h||u===1?h:",",s:y,c:_.charAt(1)==="="?Vt(y,_)-y:parseFloat(_)-y,m:m&&m<4?Math.round:0},c=dn.lastIndex);return l.c=c<n.length?n.substring(c,n.length):"",l.fp=a,(zs.test(n)||g)&&(l.e=0),this._pt=l,l},ni=function(e,t,r,n,s,o,a,l,c,u){ue(n)&&(n=n(s||0,e,o));var f=e[t],d=r!=="get"?r:ue(f)?c?e[t.indexOf("set")||!ue(e["get"+t.substr(3)])?t:"get"+t.substr(3)](c):e[t]():f,m=ue(f)?c?_u:bo:si,_;if(xe(n)&&(~n.indexOf("random(")&&(n=pr(n)),n.charAt(1)==="="&&(_=Vt(d,n)+(Ee(d)||0),(_||_===0)&&(n=_))),!u||d!==n||Dn)return!isNaN(d*n)&&n!==""?(_=new De(this._pt,e,t,+d||0,n-(d||0),typeof f=="boolean"?xu:vo,0,m),c&&(_.fp=c),a&&_.modifier(a,this,e),this._pt=_):(!f&&!(t in e)&&Zn(t,n),du.call(this,e,t,d,n,m,l||Ge.stringFilter,c))},hu=function(e,t,r,n,s){if(ue(e)&&(e=fr(e,s,t,r,n)),!nt(e)||e.style&&e.nodeType||Ce(e)||Bs(e))return xe(e)?fr(e,s,t,r,n):e;var o={},a;for(a in e)o[a]=fr(e[a],s,t,r,n);return o},_o=function(e,t,r,n,s,o){var a,l,c,u;if(Be[e]&&(a=new Be[e]).init(s,a.rawVars?t[e]:hu(t[e],n,s,o,r),r,n,o)!==!1&&(r._pt=l=new De(r._pt,s,e,0,1,a.render,a,0,a.priority),r!==Ut))for(c=r._ptLookup[r._targets.indexOf(s)],u=a._props.length;u--;)c[a._props[u]]=l;return a},dt,Dn,ii=function i(e,t,r){var n=e.vars,s=n.ease,o=n.startAt,a=n.immediateRender,l=n.lazy,c=n.onUpdate,u=n.runBackwards,f=n.yoyoEase,d=n.keyframes,m=n.autoRevert,_=e._dur,h=e._startAt,y=e._targets,g=e.parent,v=g&&g.data==="nested"?g.vars.targets:y,w=e._overwrite==="auto"&&!qn,S=e.timeline,b,T,E,k,C,N,I,O,R,D,j,z,F;
6if(S&&(!d||!s)&&(s="none"),e._ease=At(s,Yt.ease),e._yEase=f?ho(At(f===!0?s:f,Yt.ease)):0,f&&e._yoyo&&!e._repeat&&(f=e._yEase,e._yEase=e._ease,e._ease=f),e._from=!S&&!!n.runBackwards,!S||d&&!n.stagger){if(O=y[0]?Nt(y[0]).harness:0,z=O&&n[O.prop],b=zr(n,Qn),h&&(h._zTime<0&&h.progress(1),t<0&&u&&a&&!m?h.render(-1,!0):h.revert(u&&_?jr:zc),h._lazy=0),o){if(_t(e._startAt=he.set(y,He({data:"isStart",overwrite:!1,parent:g,immediateRender:!0,lazy:!h&&Ae(l),startAt:null,delay:0,onUpdate:c&&function(){return Ve(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ve||!a&&!m)&&e._startAt.revert(jr),a&&_&&t<=0&&r<=0){t&&(e._zTime=t);return}}else if(u&&_&&!h){if(t&&(a=!1),E=He({overwrite:!1,data:"isFromStart",lazy:a&&!h&&Ae(l),immediateRender:a,stagger:0,parent:g},b),z&&(E[O.prop]=z),_t(e._startAt=he.set(y,E)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ve?e._startAt.revert(jr):e._startAt.render(-1,!0)),e._zTime=t,!a)i(e._startAt,te,te);else if(!t)return}for(e._pt=e._ptCache=0,l=_&&Ae(l)||l&&!_,T=0;T<y.length;T++){if(C=y[T],I=C._gsap||ti(y)[T]._gsap,e._ptLookup[T]=D={},Pn[I.id]&&mt.length&&Ur(),j=v===y?T:v.indexOf(C),O&&(R=new O).init(C,z||b,e,j,v)!==!1&&(e._pt=k=new De(e._pt,C,R.name,0,1,R.render,R,0,R.priority),R._props.forEach(function(L){D[L]=k}),R.priority&&(N=1)),!O||z)for(E in b)Be[E]&&(R=_o(E,b,e,j,C,v))?R.priority&&(N=1):D[E]=k=ni.call(e,C,E,"get",b[E],j,v,0,n.stringFilter);e._op&&e._op[T]&&e.kill(C,e._op[T]),w&&e._pt&&(dt=e,le.killTweensOf(C,D,e.globalTime(t)),F=!e.parent,dt=0),e._pt&&l&&(Pn[I.id]=1)}N&&So(e),e._onInit&&e._onInit(e)}e._onUpdate=c,e._initted=(!e._op||e._pt)&&!F,d&&t<=0&&S.render(Ke,!0,!0)},pu=function(e,t,r,n,s,o,a,l){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],u,f,d,m;if(!c)for(c=e._ptCache[t]=[],d=e._ptLookup,m=e._targets.length;m--;){if(u=d[m][t],u&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==t&&u.fp!==t;)u=u._next;if(!u)return Dn=1,e.vars[t]="+=0",ii(e,a),Dn=0,l?dr(t+" not eligible for reset"):1;c.push(u)}for(m=c.length;m--;)f=c[m],u=f._pt||f,u.s=(n||n===0)&&!s?n:u.s+(n||0)+o*u.c,u.c=r-u.s,f.e&&(f.e=fe(r)+Ee(f.e)),f.b&&(f.b=u.s+Ee(f.b))},mu=function(e,t){var r=e[0]?Nt(e[0]).harness:0,n=r&&r.aliases,s,o,a,l;if(!n)return t;s=Ht({},t);for(o in n)if(o in s)for(l=n[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},gu=function(e,t,r,n){var s=t.ease||n||"power1.inOut",o,a;if(Ce(t))a=r[e]||(r[e]=[]),t.forEach(function(l,c){return a.push({t:c/(t.length-1)*100,v:l,e:s})});else for(o in t)a=r[o]||(r[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:s})},fr=function(e,t,r,n,s){return ue(e)?e.call(t,r,n,s):xe(e)&&~e.indexOf("random(")?pr(e):e},yo=ei+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",xo={};je(yo+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return xo[i]=1});var he=(function(i){Ms(e,i);function e(r,n,s,o){var a;typeof n=="number"&&(s.duration=n,n=s,s=null),a=i.call(this,o?n:cr(n))||this;var l=a.vars,c=l.duration,u=l.delay,f=l.immediateRender,d=l.stagger,m=l.overwrite,_=l.keyframes,h=l.defaults,y=l.scrollTrigger,g=l.yoyoEase,v=n.parent||le,w=(Ce(r)||Bs(r)?ct(r[0]):"length"in n)?[r]:Xe(r),S,b,T,E,k,C,N,I;if(a._targets=w.length?ti(w):dr("GSAP target "+r+" not found. https://gsap.com",!Ge.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=m,_||d||kr(c)||kr(u)){if(n=a.vars,S=a.timeline=new Re({data:"nested",defaults:h||{},targets:v&&v.data==="nested"?v.vars.targets:w}),S.kill(),S.parent=S._dp=st(a),S._start=0,d||kr(c)||kr(u)){if(E=w.length,N=d&&ro(d),nt(d))for(k in d)~yo.indexOf(k)&&(I||(I={}),I[k]=d[k]);for(b=0;b<E;b++)T=zr(n,xo),T.stagger=0,g&&(T.yoyoEase=g),I&&Ht(T,I),C=w[b],T.duration=+fr(c,st(a),b,C,w),T.delay=(+fr(u,st(a),b,C,w)||0)-a._delay,!d&&E===1&&T.delay&&(a._delay=u=T.delay,a._start+=u,T.delay=0),S.to(C,T,N?N(b,C,w):0),S._ease=q.none;S.duration()?c=u=0:a.timeline=0}else if(_){cr(He(S.vars.defaults,{ease:"none"})),S._ease=At(_.ease||n.ease||"none");var O=0,R,D,j;if(Ce(_))_.forEach(function(z){return S.to(w,z,">")}),S.duration();else{T={};for(k in _)k==="ease"||k==="easeEach"||gu(k,_[k],T,_.easeEach);for(k in T)for(R=T[k].sort(function(z,F){return z.t-F.t}),O=0,b=0;b<R.length;b++)D=R[b],j={ease:D.e,duration:(D.t-(b?R[b-1].t:0))/100*c},j[k]=D.v,S.to(w,j,O),O+=j.duration;S.duration()<c&&S.to({},{duration:c-S.duration()})}}c||a.duration(c=S.duration())}else a.timeline=0;
6return m===!0&&!qn&&(dt=st(a),le.killTweensOf(w),dt=0),tt(v,st(a),s),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(f||!c&&!_&&a._start===ae(v._time)&&Ae(f)&&Wc(st(a))&&v.data!=="nested")&&(a._tTime=-te,a.render(Math.max(0,-u)||0)),y&&Zs(st(a),y),a}var t=e.prototype;return t.render=function(n,s,o){var a=this._time,l=this._tDur,c=this._dur,u=n<0,f=n>l-te&&!u?l:n<te?0:n,d,m,_,h,y,g,v,w,S;if(!c)Kc(this,n,s,o);else if(f!==this._tTime||!n||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==u||this._lazy){if(d=f,w=this.timeline,this._repeat){if(h=c+this._rDelay,this._repeat<-1&&u)return this.totalTime(h*100+n,s,o);if(d=ae(f%h),f===l?(_=this._repeat,d=c):(y=ae(f/h),_=~~y,_&&_===y?(d=c,_--):d>c&&(d=c)),g=this._yoyo&&_&1,g&&(S=this._yEase,d=c-d),y=Wt(this._tTime,h),d===a&&!o&&this._initted&&_===y)return this._tTime=f,this;_!==y&&(w&&this._yEase&&po(w,g),this.vars.repeatRefresh&&!g&&!this._lock&&d!==h&&this._initted&&(this._lock=o=1,this.render(ae(h*_),!0).invalidate()._lock=0))}if(!this._initted){if(Qs(this,u?n:d,o,s,f))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&_!==y))return this;if(c!==this._dur)return this.render(n,s,o)}if(this._tTime=f,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=v=(S||this._ease)(d/c),this._from&&(this.ratio=v=1-v),!a&&f&&!s&&!y&&(Ve(this,"onStart"),this._tTime!==f))return this;for(m=this._pt;m;)m.r(v,m.d),m=m._next;w&&w.render(n<0?n:w._dur*w._ease(d/this._dur),s,o)||this._startAt&&(this._zTime=n),this._onUpdate&&!s&&(u&&Rn(this,n,s,o),Ve(this,"onUpdate")),this._repeat&&_!==y&&this.vars.onRepeat&&!s&&this.parent&&Ve(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(u&&!this._onUpdate&&Rn(this,n,!0,!0),(n||!c)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&_t(this,1),!s&&!(u&&!a)&&(f||a||g)&&(Ve(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),i.prototype.invalidate.call(this,n)},t.resetTo=function(n,s,o,a,l){mr||ze.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||ii(this,c),u=this._ease(c/this._dur),pu(this,n,s,o,a,u,c,l)?this.resetTo(n,s,o,a,1):(Qr(this,0),this.parent||Xs(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,s){if(s===void 0&&(s="all"),!n&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?ar(this):this.scrollTrigger&&this.scrollTrigger.kill(!!ve),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,s,dt&&dt.vars.overwrite!==!0)._first||ar(this),this.parent&&o!==this.timeline.totalDuration()&&qt(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=n?Xe(n):a,c=this._ptLookup,u=this._pt,f,d,m,_,h,y,g;if((!s||s==="all")&&Yc(a,l))return s==="all"&&(this._pt=0),ar(this);for(f=this._op=this._op||[],s!=="all"&&(xe(s)&&(h={},je(s,function(v){return h[v]=1}),s=h),s=mu(a,s)),g=a.length;g--;)if(~l.indexOf(a[g])){d=c[g],s==="all"?(f[g]=s,_=d,m={}):(m=f[g]=f[g]||{},_=s);for(h in _)y=d&&d[h],y&&((!("kill"in y.d)||y.d.kill(h)===!0)&&Jr(this,y,"_pt"),delete d[h]),m!=="all"&&(m[h]=1)}return this._initted&&!this._pt&&u&&ar(this),this},e.to=function(n,s){return new e(n,s,arguments[2])},e.from=function(n,s){return ur(1,arguments)},e.delayedCall=function(n,s,o,a){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(n,s,o){return ur(2,arguments)},e.set=function(n,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(n,s)},e.killTweensOf=function(n,s,o){return le.killTweensOf(n,s,o)},e})(gr);He(he.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});je("staggerTo,staggerFrom,staggerFromTo",function(i){he[i]=function(){var e=new Re,t=In.call(arguments,0);return t.splice(i==="staggerFromTo"?5:4,0,0),e[i].apply(e,t)}});var si=function(e,t,r){return e[t]=r},bo=function(e,t,r){return e[t](r)},_u=function(e,t,r,n){return e[t](n.fp,r)},yu=function(e,t,r){return e.setAttribute(t,r)},oi=function(e,t){return ue(e[t])?bo:Kn(e[t])&&e.setAttribute?yu:si},vo=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},xu=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},wo=function(e,t){var r=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*e):Math.round((r.s+r.c*e)*1e4)/1e4)+n,r=r._next;n+=t.c}t.set(t.t,t.p,n,t)},ai=function(e,t){for(var r=t._pt;r;)r.r(e,r.d),r=r._next},bu=function(e,t,r,n){for(var s=this._pt,o;s;)o=s._next,s.p===n&&s.modifier(e,t,r),s=o},vu=function(e){for(var t=this._pt,r,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?Jr(this,t,"_pt"):t.dep||(r=1),t=n;return!r},wu=function(e,t,r,n){n.mSet(e,t,n.m.call(n.tween,r,n.mt),n)},So=function(e){for(var t=e._pt,r,n,s,o;t;){for(r=t._next,n=s;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:o)?t._prev._next=t:s=t,(t._next=n)?n._prev=t:o=t,t=r}e._pt=s},De=(function(){function i(t,r,n,s,o,a,l,c,u){this.t=r,this.s=s,this.c=o,this.p=n,this.r=a||vo,this.d=l||this,this.set=c||si,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=i.prototype;return e.modifier=function(r,n,s){this.mSet=this.mSet||this.set,this.set=wu,this.m=r,this.mt=s,this.tween=n},i})();je(ei+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(i){return Qn[i]=1});Ye.TweenMax=Ye.TweenLite=he;Ye.TimelineLite=Ye.TimelineMax=Re;le=new Re({sortChildren:!1,defaults:Yt,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Ge.stringFilter=fo;var jt=[],Lr={},Su=[],$i=0,Tu=0,_n=function(e){return(Lr[e]||Su).map(function(t){return t()})},Ln=function(){var e=Date.now(),t=[];e-$i>2&&(_n("matchMediaInit"),jt.forEach(function(r){var n=r.queries,s=r.conditions,o,a,l,c;for(a in n)o=et.matchMedia(n[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(r.revert(),l&&t.push(r))}),_n("matchMediaRevert"),t.forEach(function(r){return r.onMatch(r,function(n){return r.add(null,n)})}),$i=e,_n("matchMedia"))},To=(function(){function i(t,r){this.selector=r&&An(r),this.data=[],this._r=[],this.isReverted=!1,this.id=Tu++,t&&this.add(t)}var e=i.prototype;return e.add=function(r,n,s){ue(r)&&(s=n,n=r,r=ue);var o=this,a=function(){var c=oe,u=o.selector,f;return c&&c!==o&&c.data.push(o),s&&(o.selector=An(s)),oe=o,f=n.apply(o,arguments),ue(f)&&o._r.push(f),oe=c,o.selector=u,o.isReverted=!1,f};return o.last=a,r===ue?a(o,function(l){return o.add(null,l)}):r?o[r]=a:a},e.ignore=function(r){var n=oe;oe=null,r(this),oe=n},e.getTweens=function(){var r=[];return this.data.forEach(function(n){return n instanceof i?r.push.apply(r,n.getTweens()):n instanceof he&&!(n.parent&&n.parent.data==="nested")&&r.push(n)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,n){var s=this;if(r?(function(){for(var a=s.getTweens(),l=s.data.length,c;l--;)c=s.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEac
6h(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,f){return f.g-u.g||-1/0}).forEach(function(u){return u.t.revert(r)}),l=s.data.length;l--;)c=s.data[l],c instanceof Re?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof he)&&c.revert&&c.revert(r);s._r.forEach(function(u){return u(r,s)}),s.isReverted=!0})():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),n)for(var o=jt.length;o--;)jt[o].id===this.id&&jt.splice(o,1)},e.revert=function(r){this.kill(r||{})},i})(),Eu=(function(){function i(t){this.contexts=[],this.scope=t,oe&&oe.data.push(this)}var e=i.prototype;return e.add=function(r,n,s){nt(r)||(r={matches:r});var o=new To(0,s||this.scope),a=o.conditions={},l,c,u;oe&&!o.selector&&(o.selector=oe.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=r;for(c in r)c==="all"?u=1:(l=et.matchMedia(r[c]),l&&(jt.indexOf(o)<0&&jt.push(o),(a[c]=l.matches)&&(u=1),l.addListener?l.addListener(Ln):l.addEventListener("change",Ln)));return u&&n(o,function(f){return o.add(null,f)}),this},e.revert=function(r){this.kill(r||{})}
6,e.kill=function(r){this.contexts.forEach(function(n){return n.kill(r,!0)})},i})(),$r={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach(function(n){return lo(n)})},timeline:function(e){return new Re(e)},getTweensOf:function(e,t){return le.getTweensOf(e,t)},getProperty:function(e,t,r,n){xe(e)&&(e=Xe(e)[0]);var s=Nt(e||{}).get,o=r?Ks:qs;return r==="native"&&(r=""),e&&(t?o((Be[t]&&Be[t].get||s)(e,t,r,n)):function(a,l,c){return o((Be[a]&&Be[a].get||s)(e,a,l,c))})},quickSetter:function(e,t,r){if(e=Xe(e),e.length>1){var n=e.map(function(u){return Me.quickSetter(u,t,r)}),s=n.length;return function(u){for(var f=s;f--;)n[f](u)}}e=e[0]||{};var o=Be[t],a=Nt(e),l=a.harness&&(a.harness.aliases||{})[t]||t,c=o?function(u){var f=new o;Ut._pt=0,f.init(e,r?u+r:u,Ut,0,[e]),f.render(1,f),Ut._pt&&ai(1,Ut)}:a.set(e,l);return o?c:function(u){return c(e,l,r?u+r:u,a,1)}},quickTo:function(e,t,r){var n,s=Me.to(e,He((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),r||{})),o=function(l,c,u){return s.resetTo(t,l,c,u)};return o.tween=s,o},isTweening:function(e){return le.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=At(e.ease,Yt.ease)),Fi(Yt,e||{})},config:function(e){return Fi(Ge,e||{})},registerEffect:function(e){var t=e.name,r=e.effect,n=e.plugins,s=e.defaults,o=e.extendTimeline;(n||"").split(",").forEach(function(a){return a&&!Be[a]&&!Ye[a]&&dr(t+" effect requires "+a+" plugin.")}),hn[t]=function(a,l,c){return r(Xe(a),He(l||{},s),c)},o&&(Re.prototype[t]=function(a,l,c){return this.add(hn[t](a,nt(l)?l:(c=l)&&{},this),c)})},registerEase:function(e,t){q[e]=At(t)},parseEase:function(e,t){return arguments.length?At(e,t):q},getById:function(e){return le.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var r=new Re(e),n,s;for(r.smoothChildTiming=Ae(e.smoothChildTiming),le.remove(r),r._dp=0,r._time=r._tTime=le._time,n=le._first;n;)s=n._next,(t||!(!n._dur&&n instanceof he&&n.vars.onComplete===n._targets[0]))&&tt(r,n,n._start-n._delay),n=s;return tt(le,r,0),r},context:function(e,t){return e?new To(e,t):oe},matchMedia:function(e){return new Eu(e)},matchMediaRefresh:function(){return jt.forEach(function(e){var t=e.conditions,r,n;for(n in t)t[n]&&(t[n]=!1,r=1);r&&e.revert()})||Ln()},addEventListener:function(e,t){var r=Lr[e]||(Lr[e]=[]);~r.indexOf(t)||r.push(t)},removeEventListener:function(e,t){var r=Lr[e],n=r&&r.indexOf(t);n>=0&&r.splice(n,1)},utils:{wrap:nu,wrapYoyo:iu,distribute:ro,random:io,snap:no,normalize:ru,getUnit:Ee,clamp:Zc,splitColor:co,toArray:Xe,selector:An,mapRange:oo,pipe:eu,unitize:tu,interpolate:su,shuffle:to},install:$s,effects:hn,ticker:ze,updateRoot:Re.updateRoot,plugins:Be,globalTimeline:le,core:{PropTween:De,globals:Gs,Tween:he,Timeline:Re,Animation:gr,getCache:Nt,_removeLinkedListItem:Jr,reverting:function(){return ve},context:function(e){return e&&oe&&(oe.data.push(e),e._ctx=oe),oe},suppressOverwrites:function(e){return qn=e}}};je("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return $r[i]=he[i]});ze.add(Re.updateRoot);Ut=$r.to({},{duration:0});var Cu=function(e,t){for(var r=e._pt;r&&r.p!==t&&r.op!==t&&r.fp!==t;)r=r._next;return r},ku=function(e,t){var r=e._targets,n,s,o;for(n in t)for(s=r.length;s--;)o=e._ptLookup[s][n],o&&(o=o.d)&&(o._pt&&(o=Cu(o,n)),o&&o.modifier&&o.modifier(t[n],e,r[s],n))},yn=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,s,o){o._onInit=function(a){var l,c;if(xe(s)&&(l={},je(s,function(u){return l[u]=1}),s=l),t){l={};for(c in s)l[c]=t(s[c]);s=l}ku(a,s)}}}},Me=$r.registerPlugin({name:"attr",init:function(e,t,r,n,s){var o,a,l;this.tween=r;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],n,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var r=t._pt;r;)ve?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",headless:1,init:function(e,t){for(var r=t.length;r--;)this.add(e,r,e[r]||0,t[r],0,0,0,0,0,1)}},yn("roundProps",jn),yn("modifiers"),yn("snap",no))||$r;he.version=Re.version=Me.version="3.14.2";Vs=1;Xn()&&Kt();q.Power0;q.Power1;q.Power2;q.Power3;q.Power4;q.Linear;q.Quad;q.Cubic;q.Quart;q.Quint;q.Strong;q.Elastic;q.Back;q.SteppedEase;q.Bounce;q.Sine;q.Expo;q.Circ;var Gi,ht,$t,li,kt,Yi,ci,Ou=function(){return typeof window<"u"},ut={},Et=180/Math.PI,Gt=Math.PI/180,Mt=Math.atan2,Hi=1e8,ui=/([A-Z])/g,Pu=/(left|right|width|margin|padding|x)/i,Ru=/[\s,\(]\S/,rt={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Mn=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Nu=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Iu=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Au=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},ju=function(e,t){var r=t.s+t.c*e;t.set(t.t,t.p,~~(r+(r<0?-.5:.5))+t.u,t)},Eo=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Co=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},Du=function(e,t,r){return e.style[t]=r},Lu=function(e,t,r){return e.style.setProperty(t,r)},Mu=function(e,t,r){return e._gsap[t]=r},Fu=function(e,t,r){return e._gsap.scaleX=e._gsap.scaleY=r},Bu=function(e,t,r,n,s){var o=e._gsap;o.scaleX=o.scaleY=r,o.renderTransform(s,o)},Uu=function(e,t,r,n,s){var o=e._gsap;o[t]=r,o.renderTransform(s,o)},ce="transform",Le=ce+"Origin",zu=function i(e,t){var r=this,n=this.target,s=n.style,o=n._gsap;if(e in ut&&s){if(this.tfm=this.tfm||{},e!=="transform")e=rt[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return r.tfm[a]=ot(n,a)}):this.tfm[e]=o.x?o[e]:ot(n,e),e===Le&&(this.tfm.zOrigin=o.zOrigin);else return rt.transform.split(",").forEach(function(a){return i.call(r,a,t)});if(this.props.indexOf(ce)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(Le,t,"")),e=ce}(s||t)&&this.props.push(e,t,s[e])},ko=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Vu=function(){var e=this.props,t=this.target,r=t.style,n=t._gsap,s,o;for(s=0;s<e.length;s+=3)e[s+1]?e[s+1]===2?t[e[s]](e[s+2]):t[e[s]]=e[s+2]:e[s+2]?r[e[s]]=e[s+2]:r.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(ui,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)n[o]=this.tfm[o];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),s=ci(),(!s||!s.isStart)&&!r[ce]&&(ko(r),n.zOrigin&&r[Le]&&(r[Le]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},Oo=function(e,t){var r={target:e,props:[],revert:Vu,save:zu};return e._gsap||Me.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return r.s
6ave(n)}),r},Po,Fn=function(e,t){var r=ht.createElementNS?ht.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):ht.createElement(e);return r&&r.style?r:ht.createElement(e)},$e=function i(e,t,r){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(ui,"-$1").toLowerCase())||n.getPropertyValue(t)||!r&&i(e,Xt(t)||t,1)||""},Wi="O,Moz,ms,Ms,Webkit".split(","),Xt=function(e,t,r){var n=t||kt,s=n.style,o=5;if(e in s&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(Wi[o]+e in s););return o<0?null:(o===3?"ms":o>=0?Wi[o]:"")+e},Bn=function(){Ou()&&window.document&&(Gi=window,ht=Gi.document,$t=ht.documentElement,kt=Fn("div")||{style:{}},Fn("div"),ce=Xt(ce),Le=ce+"Origin",kt.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Po=!!Xt("perspective"),ci=Me.core.reverting,li=1)},qi=function(e){var t=e.ownerSVGElement,r=Fn("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),s;n.style.display="block",r.appendChild(n),$t.appendChild(r);try{s=n.getBBox()}catch{}return r.removeChild(n),$t.removeChild(r),s},Ki=function(e,t){for(var r=t.length;r--;)if(e.hasAttribute(t[r]))return e.getAttribute(t[r])},Ro=function(e){var t,r;try{t=e.getBBox()}catch{t=qi(e),r=1}return t&&(t.width||t.height)||r||(t=qi(e)),t&&!t.width&&!t.x&&!t.y?{x:+Ki(e,["x","cx","x1"])||0,y:+Ki(e,["y","cy","y1"])||0,width:0,height:0}:t},No=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Ro(e))},yt=function(e,t){if(t){var r=e.style,n;t in ut&&t!==Le&&(t=ce),r.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),r.removeProperty(n==="--"?t:t.replace(ui,"-$1").toLowerCase())):r.removeAttribute(t)}},pt=function(e,t,r,n,s,o){var a=new De(e._pt,t,r,0,1,o?Co:Eo);return e._pt=a,a.b=n,a.e=s,e._props.push(r),a},Xi={deg:1,rad:1,turn:1},$u={grid:1,flex:1},xt=function i(e,t,r,n){var s=parseFloat(r)||0,o=(r+"").trim().substr((s+"").length)||"px",a=kt.style,l=Pu.test(t),c=e.tagName.toLowerCase()==="svg",u=(c?"client":"offset")+(l?"Width":"Height"),f=100,d=n==="px",m=n==="%",_,h,y,g;if(n===o||!s||Xi[n]||Xi[o])return s;if(o!=="px"&&!d&&(s=i(e,t,r,"px")),g=e.getCTM&&No(e),(m||o==="%")&&(ut[t]||~t.indexOf("adius")))return _=g?e.getBBox()[l?"width":"height"]:e[u],fe(m?s/_*f:s/100*_);if(a[l?"width":"height"]=f+(d?o:n),h=n!=="rem"&&~t.indexOf("adius")||n==="em"&&e.appendChild&&!c?e:e.parentNode,g&&(h=(e.ownerSVGElement||{}).parentNode),(!h||h===ht||!h.appendChild)&&(h=ht.body),y=h._gsap,y&&m&&y.width&&l&&y.time===ze.time&&!y.uncache)return fe(s/y.width*f);if(m&&(t==="height"||t==="width")){var v=e.style[t];e.style[t]=f+n,_=e[u],v?e.style[t]=v:yt(e,t)}else(m||o==="%")&&!$u[$e(h,"display")]&&(a.position=$e(e,"position")),h===e&&(a.position="static"),h.appendChild(kt),_=kt[u],h.removeChild(kt),a.position="absolute";return l&&m&&(y=Nt(h),y.time=ze.time,y.width=h[u]),fe(d?_*s/f:_&&s?f/_*s:0)},ot=function(e,t,r,n){var s;return li||Bn(),t in rt&&t!=="transform"&&(t=rt[t],~t.indexOf(",")&&(t=t.split(",")[0])),ut[t]&&t!=="transform"?(s=yr(e,n),s=t!=="transformOrigin"?s[t]:s.svg?s.origin:Yr($e(e,Le))+" "+s.zOrigin+"px"):(s=e.style[t],(!s||s==="auto"||n||~(s+"").indexOf("calc("))&&(s=Gr[t]&&Gr[t](e,t,r)||$e(e,t)||Hs(e,t)||(t==="opacity"?1:0))),r&&!~(s+"").trim().indexOf(" ")?xt(e,t,s,r)+r:s},Gu=function(e,t,r,n){if(!r||r==="none"){var s=Xt(t,e,1),o=s&&$e(e,s,1);o&&o!==r?(t=s,r=o):t==="borderColor"&&(r=$e(e,"borderTopColor"))}var a=new De(this._pt,e.style,t,0,1,wo),l=0,c=0,u,f,d,m,_,h,y,g,v,w,S,b;if(a.b=r,a.e=n,r+="",n+="",n.substring(0,6)==="var(--"&&(n=$e(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(h=e.style[t],e.style[t]=n,n=$e(e,t)||n,h?e.style[t]=h:yt(e,t)),u=[r,n],fo(u),r=u[0],n=u[1],d=r.match(Bt)||[],b=n.match(Bt)||[],b.length){for(;f=Bt.exec(n);)y=f[0],v=n.substring(l,f.index),_?_=(_+1)%5:(v.substr(-5)==="rgba("||v.substr(-5)==="hsla(")&&(_=1),y!==(h=d[c++]||"")&&(m=parseFloat(h)||0,S=h.substr((m+"").length),y.charAt(1)==="="&&(y=Vt(m,y)+S),g=parseFloat(y),w=y.substr((g+"").length),l=Bt.lastIndex-w.length,w||(w=w||Ge.units[t]||S,l===n.length&&(n+=w,a.e+=w)),S!==w&&(m=xt(e,t,h,w)||0),a._pt={_next:a._pt,p:v||c===1?v:",",s:m,c:g-m,m:_&&_<4||t==="zIndex"?Math.round:0});a.c=l<n.length?n.substring(l,n.length):""}else a.r=t==="display"&&n==="none"?Co:Eo;return zs.test(n)&&(a.e=0),this._pt=a,a},Ji={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Yu=function(e){var t=e.split(" "),r=t[0],n=t[1]||"50%";return(r==="top"||r==="bottom"||n==="left"||n==="right")&&(e=r,r=n,n=e),t[0]=Ji[r]||r,t[1]=Ji[n]||n,t.join(" ")}
6,Hu=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var r=t.t,n=r.style,s=t.u,o=r._gsap,a,l,c;if(s==="all"||s===!0)n.cssText="",l=1;else for(s=s.split(","),c=s.length;--c>-1;)a=s[c],ut[a]&&(l=1,a=a==="transformOrigin"?Le:ce),yt(r,a);l&&(yt(r,ce),o&&(o.svg&&r.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",yr(r,1),o.uncache=1,ko(n)))}},Gr={clearProps:function(e,t,r,n,s){if(s.data!=="isFromStart"){var o=e._pt=new De(e._pt,t,r,0,0,Hu);return o.u=n,o.pr=-10,o.tween=s,e._props.push(r),1}}},_r=[1,0,0,1,0,0],Io={},Ao=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Zi=function(e){var t=$e(e,ce);return Ao(t)?_r:t.substr(7).match(Us).map(fe)},fi=function(e,t){var r=e._gsap||Nt(e),n=e.style,s=Zi(e),o,a,l,c;return r.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?_r:s):(s===_r&&!e.offsetParent&&e!==$t&&!r.svg&&(l=n.display,n.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,a=e.nextElementSibling,$t.appendChild(e)),s=Zi(e),l?n.display=l:yt(e,"display"),c&&(a?o.insertBefore(e,a):o?o.appendChild(e):$t.removeChild(e))),t&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Un=function(e,t,r,n,s,o){var a=e._gsap,l=s||fi(e,!0),c=a.xOrigin||0,u=a.yOrigin||0,f=a.xOffset||0,d=a.yOffset||0,m=l[0],_=l[1],h=l[2],y=l[3],g=l[4],v=l[5],w=t.split(" "),S=parseFloat(w[0])||0,b=parseFloat(w[1])||0,T,E,k,
6C;r?l!==_r&&(E=m*y-_*h)&&(k=S*(y/E)+b*(-h/E)+(h*v-y*g)/E,C=S*(-_/E)+b*(m/E)-(m*v-_*g)/E,S=k,b=C):(T=Ro(e),S=T.x+(~w[0].indexOf("%")?S/100*T.width:S),b=T.y+(~(w[1]||w[0]).indexOf("%")?b/100*T.height:b)),n||n!==!1&&a.smooth?(g=S-c,v=b-u,a.xOffset=f+(g*m+v*h)-g,a.yOffset=d+(g*_+v*y)-v):a.xOffset=a.yOffset=0,a.xOrigin=S,a.yOrigin=b,a.smooth=!!n,a.origin=t,a.originIsAbsolute=!!r,e.style[Le]="0px 0px",o&&(pt(o,a,"xOrigin",c,S),pt(o,a,"yOrigin",u,b),pt(o,a,"xOffset",f,a.xOffset),pt(o,a,"yOffset",d,a.yOffset)),e.setAttribute("data-svg-origin",S+" "+b)},yr=function(e,t){var r=e._gsap||new go(e);if("x"in r&&!t&&!r.uncache)return r;var n=e.style,s=r.scaleX<0,o="px",a="deg",l=getComputedStyle(e),c=$e(e,Le)||"0",u,f,d,m,_,h,y,g,v,w,S,b,T,E,k,C,N,I,O,R,D,j,z,F,L,V,G,we,Se,Lt,de,We;return u=f=d=h=y=g=v=w=S=0,m=_=1,r.svg=!!(e.getCTM&&No(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[ce]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[ce]!=="none"?l[ce]:"")),n.scale=n.rotate=n.translate="none"),E=fi(e,r.svg),r.svg&&(r.uncache?(L=e.getBBox(),c=r.xOrigin-L.x+"px "+(r.yOrigin-L.y)+"px",F=""):F=!t&&e.getAttribute("data-svg-origin"),Un(e,F||c,!!F||r.originIsAbsolute,r.smooth!==!1,E)),b=r.xOrigin||0,T=r.yOrigin||0,E!==_r&&(I=E[0],O=E[1],R=E[2],D=E[3],u=j=E[4],f=z=E[5],E.length===6?(m=Math.sqrt(I*I+O*O),_=Math.sqrt(D*D+R*R),h=I||O?Mt(O,I)*Et:0,v=R||D?Mt(R,D)*Et+h:0,v&&(_*=Math.abs(Math.cos(v*Gt))),r.svg&&(u-=b-(b*I+T*R),f-=T-(b*O+T*D))):(We=E[6],Lt=E[7],G=E[8],we=E[9],Se=E[10],de=E[11],u=E[12],f=E[13],d=E[14],k=Mt(We,Se),y=k*Et,k&&(C=Math.cos(-k),N=Math.sin(-k),F=j*C+G*N,L=z*C+we*N,V=We*C+Se*N,G=j*-N+G*C,we=z*-N+we*C,Se=We*-N+Se*C,de=Lt*-N+de*C,j=F,z=L,We=V),k=Mt(-R,Se),g=k*Et,k&&(C=Math.cos(-k),N=Math.sin(-k),F=I*C-G*N,L=O*C-we*N,V=R*C-Se*N,de=D*N+de*C,I=F,O=L,R=V),k=Mt(O,I),h=k*Et,k&&(C=Math.cos(k),N=Math.sin(k),F=I*C+O*N,L=j*C+z*N,O=O*C-I*N,z=z*C-j*N,I=F,j=L),y&&Math.abs(y)+Math.abs(h)>359.9&&(y=h=0,g=180-g),m=fe(Math.sqrt(I*I+O*O+R*R)),_=fe(Math.sqrt(z*z+We*We)),k=Mt(j,z),v=Math.abs(k)>2e-4?k*Et:0,S=de?1/(de<0?-de:de):0),r.svg&&(F=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!Ao($e(e,ce)),F&&e.setAttribute("transform",F))),Math.abs(v)>90&&Math.abs(v)<270&&(s?(m*=-1,v+=h<=0?180:-180,h+=h<=0?180:-180):(_*=-1,v+=v<=0?180:-180)),t=t||r.uncache,r.x=u-((r.xPercent=u&&(!t&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+o,r.y=f-((r.yPercent=f&&(!t&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-f)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+o,r.z=d+o,r.scaleX=fe(m),r.scaleY=fe(_),r.rotation=fe(h)+a,r.rotationX=fe(y)+a,r.rotationY=fe(g)+a,r.skewX=v+a,r.skewY=w+a,r.transformPerspective=S+o,(r.zOrigin=parseFloat(c.split(" ")[2])||!t&&r.zOrigin||0)&&(n[Le]=Yr(c)),r.xOffset=r.yOffset=0,r.force3D=Ge.force3D,r.renderTransform=r.svg?qu:Po?jo:Wu,r.uncache=0,r},Yr=function(e){return(e=e.split(" "))[0]+" "+e[1]},xn=function(e,t,r){var n=Ee(t);return fe(parseFloat(t)+parseFloat(xt(e,"x",r+"px",n)))+n},Wu=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,jo(e,t)},St="0deg",sr="0px",Tt=") ",jo=function(e,t){var r=t||this,n=r.xPercent,s=r.yPercent,o=r.x,a=r.y,l=r.z,c=r.rotation,u=r.rotationY,f=r.rotationX,d=r.skewX,m=r.skewY,_=r.scaleX,h=r.scaleY,y=r.transformPerspective,g=r.force3D,v=r.target,w=r.zOrigin,S="",b=g==="auto"&&e&&e!==1||g===!0;if(w&&(f!==St||u!==St)){var T=parseFloat(u)*Gt,E=Math.sin(T),k=Math.cos(T),C;T=parseFloat(f)*Gt,C=Math.cos(T),o=xn(v,o,E*C*-w),a=xn(v,a,-Math.sin(T)*-w),l=xn(v,l,k
6*C*-w+w)}y!==sr&&(S+="perspective("+y+Tt),(n||s)&&(S+="translate("+n+"%, "+s+"%) "),(b||o!==sr||a!==sr||l!==sr)&&(S+=l!==sr||b?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Tt),c!==St&&(S+="rotate("+c+Tt),u!==St&&(S+="rotateY("+u+Tt),f!==St&&(S+="rotateX("+f+Tt),(d!==St||m!==St)&&(S+="skew("+d+", "+m+Tt),(_!==1||h!==1)&&(S+="scale("+_+", "+h+Tt),v.style[ce]=S||"translate(0, 0)"},qu=function(e,t){var r=t||this,n=r.xPercent,s=r.yPercent,o=r.x,a=r.y,l=r.rotation,c=r.skewX,u=r.skewY,f=r.scaleX,d=r.scaleY,m=r.target,_=r.xOrigin,h=r.yOrigin,y=r.xOffset,g=r.yOffset,v=r.forceCSS,w=parseFloat(o),S=parseFloat(a),b,T,E,k,C;l=parseFloat(l),c=parseFloat(c),u=parseFloat(u),u&&(u=parseFloat(u),c+=u,l+=u),l||c?(l*=Gt,c*=Gt,b=Math.cos(l)*f,T=Math.sin(l)*f,E=Math.sin(l-c)*-d,k=Math.cos(l-c)*d,c&&(u*=Gt,C=Math.tan(c-u),C=Math.sqrt(1+C*C),E*=C,k*=C,u&&(C=Math.tan(u),C=Math.sqrt(1+C*C),b*=C,T*=C)),b=fe(b),T=fe(T),E=fe(E),k=fe(k)):(b=f,k=d,T=E=0),(w&&!~(o+"").indexOf("px")||S&&!~(a+"").indexOf("px"))&&(w=xt(m,"x",o,"px"),S=xt(m,"y",a,"px")),(_||h||y||g)&&(w=fe(w+_-(_*b+h*E)+y),S=fe(S+h-(_*T+h*k)+g)),(n||s)&&(C=m.getBBox(),w=fe(w+n/100*C.width),S=fe(S+s/100*C.height)),C="matrix("+b+","+T+","+E+","+k+","+w+","+S+")",m.setAttribute("transform",C),v&&(m.style[ce]=C)},Ku=function(e,t,r,n,s){var o=360,a=xe(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?Et:1),c=l-n,u=n+c+"deg",f,d;return a&&(f=s.split("_")[1],f==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),f==="cw"&&c<0?c=(c+o*Hi)%o-~~(c/o)*o:f==="ccw"&&c>0&&(c=(c-o*Hi)%o-~~(c/o)*o)),e._pt=d=new De(e._pt,t,r,n,c,Nu),d.e=u,d.u="deg",e._props.push(r),d},Qi=function(e,t){for(var r in t)e[r]=t[r];return e},Xu=function(e,t,r){var n=Qi({},r._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=r.style,a,l,c,u,f,d,m,_;n.svg?(c=r.getAttribute("transform"),r.setAttribute("transform",""),o[ce]=t,a=yr(r,1),yt(r,ce),r.setAttribute("transform",c)):(c=getComputedStyle(r)[ce],o[ce]=t,a=yr(r,1),o[ce]=c);for(l in ut)c=n[l],u=a[l],c!==u&&s.indexOf(l)<0&&(m=Ee(c),_=Ee(u),f=m!==_?xt(r,l,c,_):parseFloat(c),d=parseFloat(u),e._pt=new De(e._pt,a,l,f,d-f,Mn),e._pt.u=_||0,e._props.push(l));Qi(a,n)};je("padding,margin,Width,Radius",function(i,e){var t="Top",r="Right",n="Bottom",s="Left",o=(e<3?[t,r,n,s]:[t+s,t+r,n+r,n+s]).map(function(a){return e<2?i+a:"border"+a+i});Gr[e>1?"border"+i:i]=function(a,l,c,u,f){var d,m;if(arguments.length<4)return d=o.map(function(_){return ot(a,_,c)}),m=d.join(" "),m.split(d[0]).length===5?d[0]:m;d=(u+"").split(" "),m={},o.forEach(function(_,h){return m[_]=d[h]=d[h]||d[(h-1)/2|0]}),a.init(l,m,f)}});var Do={name:"css",register:Bn,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,r,n,s){var o=this._props,a=e.style,l=r.vars.startAt,c,u,f,d,m,_,h,y,g,v,w,S,b,T,E,k,C;li||Bn(),this.styles=this.styles||Oo(e),k=this.styles.props,this.tween=r;for(h in t)if(h!=="autoRound"&&(u=t[h],!(Be[h]&&_o(h,t,r,n,e,s)))){if(m=typeof u,_=Gr[h],m==="function"&&(u=u.call(r,n,e,s),m=typeof u),m==="string"&&~u.indexOf("random(")&&(u=pr(u)),_)_(this,e,h,u,r)&&(E=1);else if(h.substr(0,2)==="--")c=(getComputedStyle(e).getPropertyValue(h)+"").trim(),u+="",gt.lastIndex=0,gt.test(c)||(y=Ee(c),g=Ee(u),g?y!==g&&(c=xt(e,h,c,g)+g):y&&(u+=y)),this.add(a,"setProperty",c,u,n,s,0,0,h),o.push(h),k.push(h,0,a[h]);else if(m!=="undefined"){if(l&&h in l?(c=typeof l[h]=="function"?l[h].call(r,n,e,s):l[h],xe(c)&&~c.indexOf("random(")&&(c=pr(c)),Ee(c+"")||c==="auto"||(c+=Ge.units[h]||Ee(ot(e,h))||""),(c+"").charAt(1)==="="&&(c=ot(e,h))):c=ot(e,h),d=parseFloat(c),v=m==="string"&&u.charAt(1)==="="&&u.substr(0,2),v&&(u=u.substr(2)),f=parseFloat(u),h in rt&&(h==="autoAlpha"&&(d===1&&ot(e,"visibility")==="hidden"&&f&&(d=0),k.push("visibility",0,a.visibility),pt(this,a,"visibility",d?"inherit":"hidden",f?"inherit":"hidden",!f)),h!=="scale"&&h!=="transform"&&(h=rt[h],~h.indexOf(",")&&(h=h.split(",")[0]))),w=h in ut,w){if(this.styles.save(h),C=u,m==="string"&&u.substring(0,6)==="var(--"){if(u=$e(e,u.substring(4,u.indexOf(")"))),u.substring(0,5)==="calc("){var N=e.style.perspective;e.style.perspective=u,u=$e(e,"perspective"),N?e.style.perspective=N:yt(e,"perspective")}f=parseFloat(u)}
6if(S||(b=e._gsap,b.renderTransform&&!t.parseTransform||yr(e,t.parseTransform),T=t.smoothOrigin!==!1&&b.smooth,S=this._pt=new De(this._pt,a,ce,0,1,b.renderTransform,b,0,-1),S.dep=1),h==="scale")this._pt=new De(this._pt,b,"scaleY",b.scaleY,(v?Vt(b.scaleY,v+f):f)-b.scaleY||0,Mn),this._pt.u=0,o.push("scaleY",h),h+="X";else if(h==="transformOrigin"){k.push(Le,0,a[Le]),u=Yu(u),b.svg?Un(e,u,0,T,0,this):(g=parseFloat(u.split(" ")[2])||0,g!==b.zOrigin&&pt(this,b,"zOrigin",b.zOrigin,g),pt(this,a,h,Yr(c),Yr(u)));continue}else if(h==="svgOrigin"){Un(e,u,1,T,0,this);continue}else if(h in Io){Ku(this,b,h,d,v?Vt(d,v+u):u);continue}else if(h==="smoothOrigin"){pt(this,b,"smooth",b.smooth,u);continue}else if(h==="force3D"){b[h]=u;continue}else if(h==="transform"){Xu(this,u,e);continue}}else h in a||(h=Xt(h)||h);if(w||(f||f===0)&&(d||d===0)&&!Ru.test(u)&&h in a)y=(c+"").substr((d+"").length),f||(f=0),g=Ee(u)||(h in Ge.units?Ge.units[h]:y),y!==g&&(d=xt(e,h,c,g)),this._pt=new De(this._pt,w?b:a,h,d,(v?Vt(d,v+f):f)-d,!w&&(g==="px"||h==="zIndex")&&t.autoRound!==!1?ju:Mn),this._pt.u=g||0,w&&C!==u?(this._pt.b=c,this._pt.e=C,this._pt.r=Au):y!==g&&g!=="%"&&(this._pt.b=c,this._pt.r=Iu);else if(h in a)Gu.call(this,e,h,c,v?v+u:u);else if(h in e)this.add(e,h,c||e[h],v?v+u:u,n,s);else if(h!=="parseTransform"){Zn(h,u);continue}w||(h in a?k.push(h,0,a[h]):typeof e[h]=="function"?k.push(h,2,e[h]()):k.push(h,1,c||e[h])),o.push(h)}}E&&So(this)},render:function(e,t){if(t.tween._time||!ci())for(var r=t._pt;r;)r.r(e,r.d),r=r._next;else t.styles.revert()},get:ot,aliases:rt,getSetter:function(e,t,r){var n=rt[t];return n&&n.indexOf(",")<0&&(t=n),t in ut&&t!==Le&&(e._gsap.x||ot(e,"x"))?r&&Yi===r?t==="scale"?Fu:Mu:(Yi=r||{})&&(t==="scale"?Bu:Uu):e.style&&!Kn(e.style[t])?Du:~t.indexOf("-")?Lu:oi(e,t)},core:{_removeProperty:yt,_getMatrix:fi}};Me.utils.checkPrefix=Xt;Me.core.getStyleSaver=Oo;(function(i,e,t,r){var n=je(i+","+e+","+t,function(s){ut[s]=1});je(e,function(s){Ge.units[s]="deg",Io[s]=1}),rt[n[13]]=i+","+e,je(r,function(s){var o=s.split(":");rt[o[1]]=n[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");je("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(i){Ge.units[i]="px"});Me.registerPlugin(Do);var Lo=Me.registerPlugin(Do)||Me;Lo.core.Tween;
6function Ju(i,e){const[t,r]=x.useState(null),n=x.useCallback(()=>{localStorage.getItem(e)||r(i[0])},[e,i]),s=x.useCallback(u=>{r(f=>{if(f!==u)return f;const d=i[i.indexOf(u)+1]??null;return d===null&&localStorage.setItem(e,"1"),d})},[i,e]),o=x.useCallback(u=>t===u,[t]),a=x.useCallback(u=>t!==null&&i.indexOf(u)>i.indexOf(t),[t,i]),l=t===null?null:i.indexOf(t)+1,c=i.length;return{step:t,start:n,advance:s,isActive:o,isLocked:a,stepIndex:l,totalSteps:c}}const Zu="aecharts_new_chart_guide_v5",es=["pick-chart-type","confirm-chart-type","customize","download"],Qu=x.createContext(null);function ef({value:i,children:e}){return p.jsx(Qu.Provider,{value:i,children:e})}function Mo(i){return e=>typeof e===i}var tf=Mo("function"),rf=i=>i===null,ts=i=>Object.prototype.toString.call(i).slice(8,-1)==="RegExp",rs=i=>!nf(i)&&!rf(i)&&(tf(i)||typeof i=="object"),nf=Mo("undefined");function sf(i,e,t){return df(t,i,e)?!0:(hf(t,i,e),i.constructor!==e.constructor?!1:Array.isArray(i)&&Array.isArray(e)?of(i,e,t):i instanceof Map&&e instanceof Map?cf(i,e,t):i instanceof Set&&e instanceof Set?ff(i,e):i instanceof WeakMap||i instanceof WeakSet?!1:ArrayBuffer.isView(i)&&ArrayBuffer.isView(e)?af(i,e):ts(i)&&ts(e)?i.source===e.source&&i.flags===e.flags:i instanceof Error&&e instanceof Error?lf(i,e,t):i.valueOf!==Object.prototype.valueOf?i.valueOf()===e.valueOf():i.toString!==Object.prototype.toString?i.toString()===e.toString():uf(i,e,t))}function vr(i,e,t){return i===e||Number.isNaN(i)&&Number.isNaN(e)?!0:!i||!rs(i)||!e||!rs(e)?!1:sf(i,e,t)}function of(i,e,t){const{length:r}=i;if(r!==e.length)return!1;for(let n=r;n--!==0;)if(!vr(i[n],e[n],t))return!1;return!0}function af(i,e){if(i.byteLength!==e.byteLength)return!1;const t=new DataView(i.buffer),r=new DataView(e.buffer);let n=i.byteLength;for(;n--;)if(t.getUint8(n)!==r.getUint8(n))return!1;return!0}function lf(i,e,t){return i.message===e.message&&i.name===e.name&&vr(i.cause,e.cause,t)}function cf(i,e,t){if(i.size!==e.size)return!1;for(const r of i.entries())if(!e.has(r[0]))return!1;for(const r of i.entries())if(!vr(r[1],e.get(r[0]),t))return!1;return!0}function uf(i,e,t){const r=Object.keys(i);if(r.length!==Object.keys(e).length)return!1;for(let n=r.length;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,r[n]))return!1;for(let n=r.length;n--!==0;){const s=r[n];if(!(s==="_owner"&&i.$$typeof)&&!vr(i[s],e[s],t))return!1}return!0}function ff(i,e){if(i.size!==e.size)return!1;for(const t of i.entries())if(!e.has(t[0]))return!1;return!0}function df(i,e,t){return i.get(e)?.has(t)??!1}function hf(i,e,t){let r=i.get(e);r||(r=new WeakSet,i.set(e,r)),r.add(t)}function di(i,e){return vr(i,e,new WeakMap)}function bn(){return!!(typeof window<"u"&&window?.document?.createElement)}function pf(i,...e){i&&i.removeEventListener&&i.removeEventListener(...e)}function mf(i,...e){i&&i.addEventListener&&i.addEventListener(...e)}function gf(){const i=x.useRef(!0);return i.current?(i.current=!1,!0):i.current}function _f(i,e){const t=gf();x.useEffect(()=>{if(!t)return i()},e)}function Fo(i){const e=x.useRef(void 0);return x.useEffect(()=>{e.current=i}),e.current}function yf(i,e){const t=x.useRef(e);return di(e,t.current)||(t.current=e),x.useMemo(i,t.current)}function xf(i){x.useEffect(()=>{i()},[])}function bf(i=0){const[e,t]=x.useState({height:bn()?window.innerHeight:0,width:bn()?window.innerWidth:0}),r=x.useRef(0),n=x.useRef(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t({width:window.innerWidth,height:window.innerHeight})},i)});return x.useEffect(()=>{if(!bn())return()=>{};const s=n.current;return t({height:window.innerHeight,width:window.innerWidth}),mf(window,"resize",s),()=>{pf(window,"resize",s)}},[]),e}var vf=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","URL","WeakMap","WeakSet"],wf=["bigint","boolean","null","number","string","symbol","undefined"];function wr(i){const e=Object.prototype.toString.call(i).slice(8,-1);if(/HTML\w+Element/.test(e))return"HTMLElement";if(Sf(e))return e}function Ze(i){return e=>wr(e)===i}function Sf(i){return vf.includes(i)}function Zt(i){return e=>typeof e===i}function Tf(i){return wf.includes(i)}var Ef=["innerHTML","ownerDocument","style","attributes","nodeValue"],Sr=i=>Array.isArray(i),Cf=i=>wr(i)==="AsyncGeneratorFunction",kf=Ze("AsyncFunction"),Of=Zt("bigint"),Pf=i=>i===!0||i===!1,Rf=Ze("Date"),Nf=Ze("Error"),bt=Zt("function"),If=Ze("GeneratorFunction"),Af=i=>typeof i=="number"&&Number.isInteger(i),zn=Ze("Map"),Bo=i=>Number.isNaN(i),hi=i=>i===null,Uo=Ze("Function"),jf=Ze("Promise"),Df=Ze("RegExp"),Vn=Ze("Set"),Tr=Zt("string"),Lf=Zt("symbol"),pi=Zt("undefined"),Mf=Ze("WeakMap"),Ff=Ze("WeakSet"),mi=i=>hi(i)||pi(i),zo=i=>!pi(i),Bf=i=>Zt("number")(i)&&!Bo(i),Uf=i=>Tr(i)&&i.trim().length>0,zf=i=>{if(!Tr(i)||i.length===0)return!1;const e=i.trim();return e.length>0&&Number.isFinite(Number(e))},en=i=>!mi(i)&&(bt(i)||typeof i=="object"),Vo=i=>{if(wr(i)!=="Object")return!1;const e=Object.getPrototypeOf(i);return e===null||e===Object.getPrototypeOf({})},Vf=i=>hi(i)||Tf(typeof i),$f=i=>wr(i)==="URL",$o=i=>!mi(i)&&bt(i[Symbol.iterator]),Gf=i=>$o(i)&&bt(i.next)&&bt(i.throw),Yf=i=>bt(i)&&/^class\s/.test(i.toString()),Hf=(i,e)=>!Sr(i)||!bt(e)?!1:i.every(t=>e(t)),Wf=i=>en(i)&&!Vo(i)&&i.nodeType===1&&Tr(i.nodeName)&&Ef.every(e=>e in i),qf=i=>Tr(i)&&i.length===0||Sr(i)&&i.length===0||en(i)&&!zn(i)&&!Vn(i)&&Object.keys(i).length===0||Vn(i)&&i.size===0||zn(i)&&i.size===0,Kf=(i,e)=>!i||!e?!1:Object.getPrototypeOf(i)===e.prototype,Xf=(i,e)=>Sr(i)?i.indexOf(e)>-1:!1,Jf=(i,e,t)=>{if(!en(i)||!e)return!1;const r=i[e];return bt(t)?t(r):zo(r)};function $(i){if(i===null)return"null";switch(typeof i){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(Sr(i))return"Array";if(Uo(i))return"Function";const e=wr(i);return e||"Object"}$.array=Sr;$.arrayOf=Hf;$.asyncGeneratorFunction=Cf;$.asyncFunction=kf;$.bigint=Of;$.boolean=Pf;$.class=Yf;$.date=Rf;$.defined=zo;$.domElement=Wf;$.empty=qf;$.error=Nf;$.function=bt;$.generator=Gf;$.generatorFunction=If;$.instanceOf=Kf;$.integer=Af;$.iterable=$o;$.map=zn;$.nan=Bo;$.null=hi;$.nullOrUndefined=mi;$.nonEmptyString=Uf;$.number=Bf;$.numericString=zf;$.object=en;$.oneOf=Xf;$.plainFunction=Uo;$.plainObject=Vo;$.primitive=Vf;$.promise=jf;$.propertyOf=Jf;$.regexp=Df;$.set=Vn;$.string=Tr;$.symbol=Lf;$.undefined=pi;$.url=$f;$.weakMap=Mf;$.weakSet=Ff;var ke=$;var vn,ns;function Zf(){if(ns)return vn;ns=1;var i=function(r){return Object.prototype.hasOwnProperty.call(r,"props")},e=function(r,n){return r+t(n)},t=function(r){return r===null||typeof r=="boolean"||typeof r>"u"?"":typeof r=="number"?r.toString():typeof r=="string"?r:Array.isArray(r)?r.reduce(e,""):i(r)&&Object.prototype.hasOwnProperty.call(r.props,"children")?t(r.props.children):""};return t.default=t,vn=t,vn}var Qf=Zf();const wn=qr(Qf);var Sn={exports:{}},is;function ed(){return is||(is=1,(function(i){const e=Object.getPrototypeOf({});function t(){return function(s){return typeof s=="object"&&s!==null&&!(s instanceof RegExp)&&!(s instanceof Date)}}function r(n){function s(b){return b!=="constructor"&&b!=="prototype"&&b!=="__proto__"}function o(b){let T=0;const E=b.length,k=new Array(E);for(T;T<E;++T)k[T]=g(b[T]);return k}function a(b){const T={};if(d&&Object.getPrototypeOf(b)!==e)return d(b);const E=f(b);let k,C,N;for(k=0,C=E.length;k<C;++k)s(N=E[k])&&(T[N]=g(b[N]));return T}function l(b,T){const E=b.length,k=T.length;let C=0;const N=new Array(E+k);for(C;C<E;++C)N[C]=g(b[C]);for(C=0;C<k;++C)N[C+E]=g(T[C]);return N}const c=Object.prototype.propertyIsEnumerable;function u(b){const T=Object.keys(b),E=Object.getOwnPropertySymbols(b);for(let k=0,C=E.length;k<C;++k)c.call(b,E[k])&&T.push(E[k]);return T}const f=n?.symbols?u:Object.keys,d=typeof n?.cloneProtoObject=="function"?n.cloneProtoObject:void 0,m=typeof n?.isMergeableObject=="function"?n.isMergeableObject:t(),_=n?.onlyDefinedProperties===!0;function h(b){return typeof b!="object"||b===null}const y=n&&typeof n.mergeArray=="function"?n.mergeArray({clone:g,deepmerge:w,getKeys:f,isMergeableObject:m}):l;function g(b){return m(b)?Array.isArray(b)?o(b):a(b):b}function v(b,T){const E={},k=f(b),C=f(T);let N,I,O;for(N=0,I=k.length;N<I;++N)s(O=k[N])&&C.indexOf(O)===-1&&(E[O]=g(b[O]));for(N=0,I=C.length;N<I;++N)if(s(O=C[N]))if(O in b)k.indexOf(O)!==-1&&(d&&m(T[O])&&Object.getPrototypeOf(T[O])!==e?E[O]=d(T[O]):E[O]=w(b[O],T[O]));else{if(_&&typeof T[O]>"u")continue;E[O]=g(T[O])}return E}function w(b,T){if(_&&typeof T>"u")return g(b);const E=Array.isArray(T),k=Array.isArray(b);return h(T)?T:m(b)?E&&k?y(b,T):E!==k?g(T):v(b,T):g(T)}function S(){switch(arguments.length){case 0:return{};case 1:return g(arguments[0]);case 2:return w(arguments[0],arguments[1])}let b;for(let T=0,E=arguments.length;T<E;++T)b=w(b,arguments[T]);return b}return n?.all?S:w}i.exports=r,i.exports.default=r,i.exports.deepmerge=r,Object.defineProperty(i.exports,"isMergeableObject",{get:t})})(Sn)),Sn.exports}var td=ed();const rd=qr(td);var Tn,ss;
6function nd(){if(ss)return Tn;ss=1;var i=new Error("Element already at target scroll position"),e=new Error("Scroll cancelled"),t=Math.min,r=Date.now;Tn={left:n("scrollLeft"),top:n("scrollTop")};function n(a){return function(c,u,f,d){f=f||{},typeof f=="function"&&(d=f,f={}),typeof d!="function"&&(d=o);var m=r(),_=c[a],h=f.ease||s,y=isNaN(f.duration)?350:+f.duration,g=!1;return _===u?d(i,c[a]):requestAnimationFrame(w),v;function v(){g=!0}function w(S){if(g)return d(e,c[a]);var b=r(),T=t(1,(b-m)/y),E=h(T);c[a]=E*(u-_)+_,T<1?requestAnimationFrame(w):requestAnimationFrame(function(){d(null,c[a])})}}}function s(a){return .5*(1-Math.cos(Math.PI*a))}function o(){}return Tn}var id=nd();const sd=qr(id);var Mr={exports:{}},od=Mr.exports,os;function ad(){return os||(os=1,(function(i){(function(e,t){i.exports?i.exports=t():e.Scrollparent=t()})(od,function(){function e(r){var n=getComputedStyle(r,null).getPropertyValue("overflow");return n.indexOf("scroll")>-1||n.indexOf("auto")>-1}function t(r){if(r instanceof HTMLElement||r instanceof SVGElement){for(var n=r.parentNode;n.parentNode;){if(e(n))return n;n=n.parentNode}return document.scrollingElement||document.documentElement}}return t})})(Mr)),Mr.exports}var ld=ad();const Go=qr(ld),cd={arrowBase:32,arrowColor:"#ffffff",arrowSize:16,arrowSpacing:12,backgroundColor:"#ffffff",beaconSize:36,beaconTrigger:"click",beforeTimeout:5e3,blockTargetInteraction:!1,buttons:["back","close","primary"],closeButtonAction:"close",disableFocusTrap:!1,dismissKeyAction:"close",hideOverlay:!1,loaderDelay:300,offset:10,overlayClickAction:"close",overlayColor:"#00000080",primaryColor:"#000000",scrollDuration:300,scrollOffset:20,showProgress:!1,skipBeacon:!1,skipScroll:!1,spotlightPadding:10,spotlightRadius:4,targetWaitTimeout:1e3,textColor:"#000000",width:380,zIndex:100},ud={beaconOptions:{offset:-18}},Yo={back:"Back",close:"Close",last:"Last",next:"Next",nextWithProgress:"Next ({current} of {total})",open:"Open the dialog",skip:"Skip"},fd={isFixed:!1,locale:Yo,placement:"bottom"},dd={continuous:!1,debug:!1,run:!1,scrollToFirstStep:!1,steps:[]},H={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",REPLAY:"replay",UPDATE:"update",COMPLETE:"complete"},_e={TOUR_START:"tour:start",STEP_BEFORE_HOOK:"step:before_hook",STEP_BEFORE:"step:before",SCROLL_START:"scroll:start",SCROLL_END:"scroll:end",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",STEP_AFTER_HOOK:"step:after_hook",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},A={INIT:"init",READY:"ready",BEACON_BEFORE:"beacon_before",BEACON:"beacon",TOOLTIP_BEFORE:"tooltip_before",TOOLTIP:"tooltip",COMPLETE:"complete"},Ue={BUTTON_BACK:"button_back",BUTTON_CLOSE:"button_close",BUTTON_PRIMARY:"button_primary",BUTTON_SKIP:"button_skip",KEYBOARD:"keyboard",OVERLAY:"overlay"},W={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished"},hd="react-joyride-portal";function pd(i){const e={};for(const t in i)i[t]!==void 0&&(e[t]=i[t]);return e}function zt(...i){return rd({all:!0,isMergeableObject:e=>!(!ke.plainObject(e)||x.isValidElement(e))})(...i)}function Ho(i){return Object.prototype.toString.call(i).slice(8,-1).toLowerCase()}function at(i,e={}){const{defaultValue:t,step:r,steps:n}=e;let s=wn(i);if(s)(s.includes("{current}")||s.includes("{total}"))&&r&&n&&(s=s.replace("{current}",r.toString()).replace("{total}",n.toString()));else if(x.isValidElement(i)&&!Object.values(i.props).length&&Ho(i.type)==="function")try{s=at(i.type({}),e)}catch{s=wn(t)}else s=wn(t);return s}function ye(i,e,t,...r){if(!i)return;const n=new Date,s=`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}:${String(n.getSeconds()).padStart(2,"0")}.${String(n.getMilliseconds()).padStart(3,"0")}`;console.log(`${e} %c${t}%c ${s}`,"font-weight: bold","color: gray; font-weight: normal",...r)}function md(i,e){const t=pd(e);return{...i,...t}}function xr(){}function gd(i){return Object.keys(i)}function Hr(i,...e){if(!ke.plainObject(i))throw new TypeError("Expected an object");const t={};for(const r in i)({}).hasOwnProperty.call(i,r)&&!e.includes(r)&&(t[r]=i[r]);return t}function as(i,...e){if(!ke.plainObject(i))throw new TypeError("Expected an object");
6if(!e.length)return i;const t={};for(const r in i)({}).hasOwnProperty.call(i,r)&&e.includes(r)&&(t[r]=i[r]);return t}function $n(i,e,t){const r=s=>s.replace("{current}",String(e)).replace("{total}",String(t));if(Ho(i)==="string")return r(i);if(!x.isValidElement(i))return i;const{children:n}=i.props;if(ke.string(n)&&n.includes("{current}"))return x.cloneElement(i,{children:r(n)});if(Array.isArray(n))return x.cloneElement(i,{children:n.map(s=>typeof s=="string"?r(s):$n(s,e,t))});if(ke.function(i.type)&&!Object.values(i.props).length)try{return $n(i.type({}),e,t)}catch{return i}return i}function ls(i){return gd(i).sort().reduce((e,t)=>(e[t]=i[t],e),{})}function gi(){return!!(typeof window<"u"&&window.document?.createElement)}function _i(i){return i?i.getBoundingClientRect():null}function _d(i=!1){const{body:e,documentElement:t}=document;if(!e||!t)return 0;if(i){const r=[e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight].sort((s,o)=>s-o),n=Math.floor(r.length/2);return r.length%2===0?(r[n-1]+r[n])/2:r[n]}return Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight)}function Je(i){if(!i)return null;if(typeof i=="function")try{return i()}catch{return null}if(typeof i=="object"&&"current"in i)return i.current;if(typeof i=="string")try{return document.querySelector(i)}catch{return null}return i}function yd(i,e,t){const r=_i(i),n=Qt(i),s=n?!n.isSameNode(Ne()):!1,o=t??er(i);let a=0,l=r?.top??0;return s&&o?l=r?.top??0:n instanceof HTMLElement&&(a=n.scrollTop,!s&&!o&&(l+=a),n.isSameNode(Ne())||(l+=Ne().scrollTop)),Math.floor(l-e)}function Qt(i,e){if(!i)return Ne();const t=Go(i);if(t){if(t.isSameNode(Ne()))return e?document:Ne();if(!(t.scrollHeight>t.offsetHeight))return Ne()}return t}function xd(i){const e=i.getBoundingClientRect(),t=Ne(),r=e.top+e.height/2,n=window.innerHeight/2;return Math.max(0,t.scrollTop+r-n)}function bd(i,e){if(!i)return 0;const t=Go(i)??Ne(),r=parseFloat(getComputedStyle(i).scrollMarginTop)||0,n=_i(t),s=t.scrollTop??0,{offsetTop:o=0,scrollTop:a=0}=t;let l=i.getBoundingClientRect().top+a;if(o&&(Wo(i)||vd(i))){const u=i.getBoundingClientRect(),f=u.top-(n?.top??0),d=f+u.height,m=t.clientHeight,_=m*.2;f>=_&&d<=m-_?l=s:l=f+s}const c=Math.floor(l-e-r);return c<0?0:c}function vd(i){return i.offsetParent!==document.body}function Wo(i){if(!i)return!1;const e=Qt(i);return e?!e.isSameNode(Ne()):!1}function er(i,e="fixed"){if(!i||!(i instanceof Element))return!1;const{nodeName:t}=i;return t==="BODY"||t==="HTML"?!1:getComputedStyle(i).position===e?!0:i.parentNode?er(i.parentNode,e):!1}function Or(i){if(!i)return!1;let e=i;for(;e&&e!==document.body;){if(e instanceof HTMLElement){const{display:t,visibility:r}=getComputedStyle(e);if(t==="none"||r==="hidden")return!1}e=e.parentElement??null}return!0}function cs(i){const{isFirstStep:e,scrollToFirstStep:t,step:r,target:n,targetLifecycle:s}=i;if(r.skipScroll||e&&!t&&s!==A.TOOLTIP||r.placement==="center")return!1;const o=n?.isConnected?Qt(n):Ne(),a=o?!o.isSameNode(Ne()):!1;return(r.isFixed||er(n))&&!a?!1:o.scrollHeight>o.clientHeight}function Ne(){return document.scrollingElement??document.documentElement}function us(i,e){const{duration:t,element:r}=e;let n=()=>{};const s=new Promise(o=>{const{scrollTop:a}=r,l=i>a?i-a:a-i;n=sd.top(r,i,{duration:l<100?50:t},()=>{o()})});return{cancel:n,promise:s}}function wd(i){const e=i.replace(/^#?([\da-f])([\da-f])([\da-f])$/i,(r,n,s,o)=>n+n+s+s+o+o),t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[]}const qo={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555555",cursor:"pointer",fontSize:16,lineHeight:1,padding:0,WebkitAppearance:"none"},Pr={...qo,borderRadius:4,padding:8};function Sd(i,e){const{styles:t}=i,r=zt(t??{},e.styles??{});let{width:n}=e;gi()&&(n=typeof n=="number"&&window.innerWidth<n?window.innerWidth-30:n);const s={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:e.zIndex};return zt({arrow:{alignItems:"center",color:e.arrowColor,display:"inline-flex",justifyContent:"center",position:"absolute"},beaconWrapper:{...qo,display:"inline-flex",borderRadius:"50%",position:"relative"},beacon:{height:e.beaconSize,width:e.beaconSize},beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:e.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:`rgba(${wd(e.primaryColor).join(",")}, 0.2)`,border:`2px solid ${e.primaryColor}`,borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},buttonBack:{...Pr,color:e.primaryColor,marginLeft:"auto",marginRight:5},buttonClose:{...Pr,color:e.textColor,height:12,padding:8,position:"absolute",right:0,top:0,width:12},buttonPrimary:{...Pr,backgroundColor:e.primaryColor,color:e.backgroundColor},buttonSkip:{...Pr,color:e.textColor,fontSize:14},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:"100%",transition:"opacity 0.3s"},loader:{alignItems:"center",display:"flex",height:48,inset:0,justifyContent:"center",pointerEvents:"none",position:"fixed",width:48,zIndex:e.zIndex+1},overlay:{...s,backgroundColor:e.overlayColor},spotlight:{},tooltip:{backgroundColor:e.backgroundColor,borderRadius:5,boxSizing:"border-box",color:e.textColor,fontSize:16,maxWidth:"100%",padding:12,position:"relative",width:n},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{paddingBottom:12,paddingTop:12},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end"},tooltipFooterSpacer:{flex:1}},r)}const Td=["after","arrowBase","arrowColor","arrowSize","arrowSpacing","backgroundColor","beaconSize","beaconTrigger","before","beforeTimeout","buttons","closeButtonAction","skipBeacon","dismissKeyAction","disableFocusTrap","hideOverlay","skipScroll","blockTargetInteraction","loaderDelay","offset","overlayClickAction","overlayColor","primaryColor","scrollDuration","scrollOffset","showProgress","spotlightPadding","spotlightRadius","targetWaitTimeout","textColor","width","zIndex"];function yi(i,e){if(!e)return null;const t=zt(fd,as(i,"arrowComponent","beaconComponent","floatingOptions","loaderComponent","locale","styles","tooltipComponent"),e),r=zt(cd,i.options??{},as(e,...Td)),n=Sd(i,{...t,...r}),s=zt(ud,i.floatingOptions??{},t.floatingOptions??{});return{...t,...r,locale:zt(Yo,i.locale??{},t.locale||{}),floatingOptions:s,spotlightPadding:Ed(r.spotlightPadding),styles:n}}function Ed(i){return typeof i=="number"?{top:i,right:i,bottom:i,left:i}:{top:i?.top??0,right:i?.right??0,bottom:i?.bottom??0,left:i?.left??0}}function Cd(i,e,t){const{action:r}=e,n=t&&[H.PREV,H.NEXT].includes(r);return i.skipBeacon||i.placement==="center"||n}function Ko(i,e=!1){return ke.plainObject(i)?i.target?!0:(ye(e,"tour","target is missing from the step"),!1):(ye(e,"tour","step must be an object"),!1)}function Xo(i,e=!1){return ke.array(i)?i.every(t=>Ko(t,e)):(ye(e,"tour","steps must be an array"),!1)}var kd=class{beaconPosition=null;debug;eventListeners=new Map;listeners=new Set;props;snapshot;state;steps;tooltipPosition=null;constructor(i){const{initialStepIndex:e,stepIndex:t,steps:r=[]}=i??{},n=ke.number(t);let s=0;this.debug=i?.debug??!1,n?(s=t,ke.number(e)&&ye(this.debug,"tour","initialStepIndex is ignored in controlled mode")):ke.number(e)&&(e>=0&&e<r.length?s=e:r.length>0&&ye(this.debug,"tour","initialStepIndex is out of bounds")),this.props=i??{steps:[]},this.steps=r,this.state={action:H.INIT,controlled:n,index:s,lifecycle:A.INIT,origin:null,positioned:!1,scrolling:!1,size:r.length,status:r.length?W.READY:W.IDLE,waiting:!1},this.snapshot=Object.freeze({...this.state})}applyTransitions(i){return i.status===W.WAITING&&i.size>0?{...i,status:W.RUNNING}:i}getStep(i){return yi(this.props,this.steps[i??this.state.index])}cleanupPositionData=()=>{this.beaconPosition=null,this.tooltipPosition=null};getPositionData=i=>i==="beacon"?this.beaconPosition:this.tooltipPosition;getServerSnapshot=()=>this.snapshot;getSnapshot=()=>this.snapshot;getEventState=()=>Hr(this.snapshot,"positioned");getState=()=>Hr(this.snapshot,"positioned");setPositionData=(i,e)=>{(i==="beacon"?this.beaconPosition:this.tooltipPosition)?.placement!==e.placement&&ye(this.debug,`step:${this.state.index}`,"positioned",`${i} ${e.placement}`),i==="beacon"?this.beaconPosition=e:this.tooltipPosition=e,(this.state.lifecycle===A.BEACON_BEFORE||this.state.lifecycle===A.TOOLTIP_BEFORE)&&!this.state.positioned&&this.updateState({positioned:!0});const t=this.getStep()?.floatingOptions?.onPosition;t&&t(e)};setSteps=i=>{this.steps=i,this.updateState({size:i.length})};dispatch=(i,e)=>{const t=this.eventListeners.get(i.type);if(t)for(const r of t)try{r(i,e)}catch{}};on=(i,e)=>{let t=this.eventListeners.get(i);return t||(t=new Set,this.eventListeners.set(i,t)),t.add(e),()=>{t.delete(e)}};subscribe=i=>(this.listeners.add(i),()=>{this.listeners.delete(i)});updateState=(i,e=!1)=>{const{controlled:t,index:r}=this.state,n=this.snapshot,s=t&&!e&&i.index!==void 0?r:i.index??r,o={action:i.action??this.state.action,controlled:t,index:s,lifecycle:i.lifecycle??this.state.lifecycle,origin:i.origin??null,positioned:i.positioned??this.state.positioned,scrolling:i.scrolling??this.state.scrolling,size:i.size??this.state.size,status:i.status??this.state.status,waiting:i.waiting??this.state.waiting},a=this.applyTransitions(o);if(this.state=a,!di(n,a)){this.snapshot=Object.freeze({...a});for(const l of this.listeners)l(this.snapshot)}}};function Od(i){return new kd(i)}function fs(i,e){return Math.min(Math.max(i,0),e)}function Pd(i,e,t){const r=x.useRef(e),n=x.useRef(t);return r.current=e,n.current=t,x.useMemo(()=>{const s=()=>i.current.getSnapshot();return{close:(g=null)=>{const{index:v,status:w}=s();w===W.RUNNING&&i.current.updateState({action:H.CLOSE,index:v+1,origin:g,lifecycle:A.COMPLETE,positioned:!1,scrolling:!1,waiting:!1})},go:g=>{const{controlled:v,size:w,status:S}=s();if(v){ye(r.current,"tour","go() is not supported in controlled mode");return}S===W.RUNNING&&i.current.updateState({action:H.GO,index:g,lifecycle:A.COMPLETE,positioned:!1,scrolling:!1,status:g<w?S:W.FINISHED,waiting:!1})},info:()=>Hr(i.current.getSnapshot(),"positioned"),next:g=>{const{index:v,size:w,status:S}=s();S===W.RUNNING&&i.current.updateState({action:H.NEXT,index:fs(v+1,w),lifecycle:A.COMPLETE,origin:g,positioned:!1,scrolling:!1,waiting:!1})},open:()=>{const{status:g}=s();g===W.RUNNING&&i.current.updateState({action:H.UPDATE,lifecycle:A.TOOLTIP_BEFORE,positioned:!1,scrolling:!1,waiting:!1})},prev:g=>{const{index:v,size:w,status:S}=s();S===W.RUNNING&&i.current.updateState({action:H.PREV,index:fs(v-1,w),lifecycle:A.COMPLETE,origin:g,positioned:!1,scrolling:!1,waiting:!1})},replay:g=>{const{lifecycle:v,status:w}=s();w!==W.RUNNING||v!==A.TOOLTIP||i.current.updateState({action:H.REPLAY,lifecycle:A.COMPLETE,origin:g,positioned:!1,scrolling:!1,waiting:!1})},reset:(g=!1)=>{const{controlled:v}=s();if(v){ye(r.current,"tour","reset() is not supported in controlled mode");return}n.current(),i.current.updateState({action:H.RESET,index:0,lifecycle:A.INIT,positioned:!1,scrolling:!1,status:g?W.RUNNING:W.READY,waiting:!1})},skip:g=>{const{status:v}=s();v===W.RUNNING&&i.current.updateState({action:H.SKIP,lifecycle:A.COMPLETE,origin:g,positioned:!1,scrolling:!1,status:W.SKIPPED,waiting:!1})},start:g=>{const{index:v,size:w}=s();n.current(),i.current.updateState({action:H.START,index:ke.number(g)?g:v,lifecycle:A.INIT,positioned:!1,scrolling:!1,status:w?W.RUNNING:W.WAITING,waiting:!1},!0)},stop:(g=!1)=>{const{index:v,status:w}=s();[W.FINISHED,W.SKIPPED].includes(w)||i.current.updateState({action:H.STOP,index:v+(g?1:0),lifecycle:A.COMPLETE,positioned:!1,scrolling:!1,status:W.PAUSED,waiting:!1})}}},[i])}const Rd=new Set(["origin","positioned"]);function Nd(i,e){const t=x.useRef(null);x.useEffect(()=>{if(!e)return;const r=i.current.getSnapshot();return ye(!0,"tour","init",r),t.current=r,i.current.subscribe(n=>{const s=t.current;if(t.current=n,!s)return;const o={};let a=!1;for(const l of Object.keys(n))n[l]!==s[l]&&!Rd.has(l)&&(o[l]={from:s[l],to:n[l]},(l==="status"||l==="size")&&(a=!0));Object.keys(o).length&&(!a&&n.index>=n.size||ye(!0,a?"tour":`step:${n.index}`,"state",o))})},[e,i])}function Id(i,e,t){const r=x.useRef(i),n=x.useRef(e);return r.current=i,n.current=e,x.useCallback((s,o,a)=>{const l={...t.current.getEventState(),error:null,scroll:null,step:o,type:s,...a};r.current?.(l,n.current),t.current.dispatch(l,n.current)},[t])}function ft(i,e){return{hasChanged(t){return i[t]!==e[t]},hasChangedTo(t,r){const n=i[t],s=e[t];return Array.isArray(r)?r.includes(n)&&!r.includes(s):n===r&&s!==r},previous:e}}function Ad(i){const{addFailure:e,controls:t,emitEvent:r,previousState:n,props:s,state:o,step:a,store:l}=i,{action:c,index:u,lifecycle:f,positioned:d,scrolling:m,size:_,status:h}=o,y=Fo(a)??null,g=x.useRef(null),v=x.useRef(s),w=x.useRef(o),S=x.useRef(n),b=x.useRef(a),T=x.useRef(y),E=x.useRef(t),k=x.useRef(null),C=x.useRef(null),N=x.useRef(null);v.current=s,w.current=o,S.current=n,b.current=a,T.current=y,E.current=t;const I=()=>{k.current&&(clearInterval(k.current),k.current=null),C.current=null,N.current&&(N.current.cancel(),N.current=null)};x.useEffect(()=>
6{if(!S.current)return;const{hasChangedTo:O}=ft(w.current,S.current),R=O("action",[H.NEXT,H.PREV,H.SKIP,H.CLOSE,H.REPLAY]),D=c===H.START&&(g.current===H.CLOSE||g.current===H.REPLAY);(R||D)&&(g.current=c)},[c]),x.useEffect(()=>{if(!S.current)return()=>{I()};const{hasChanged:O}=ft(w.current,S.current),R=b.current;if(O("index")&&I(),h!==W.RUNNING||!R||f!==A.INIT)return()=>{I()};const{hasChangedTo:D}=ft(w.current,S.current);D("status",W.RUNNING)&&[W.IDLE,W.READY,W.PAUSED].includes(S.current.status)&&r(_e.TOUR_START,R),l.current.cleanupPositionData();const{debug:j}=v.current;if(R.before&&!N.current){ye(j,`step:${u}`,"before()",R),N.current={cancel:()=>{}},l.current.updateState({waiting:!0}),r(_e.STEP_BEFORE_HOOK,R,{action:g.current??w.current.action});const z=()=>{N.current=null,l.current.updateState({action:g.current??w.current.action,waiting:!1,lifecycle:A.READY})},F=new AbortController,L=R.beforeTimeout;N.current={cancel:()=>F.abort()};const V=L?setTimeout(()=>{F.signal.aborted||(ye(j,`step:${u}`,"before()","timed out",`${L}ms`),F.abort(),e(R,"before_hook"),r(_e.ERROR,R,{error:new Error("Step before hook timed out")}),z())},L):null;R.before({...l.current.getState(),action:g.current??l.current.getState().action,step:R}).then(()=>{F.signal.aborted||(V&&clearTimeout(V),z())}).catch(G=>{F.signal.aborted||(V&&clearTimeout(V),e(R,"before_hook"),r(_e.ERROR,R,{error:G instanceof Error?G:new Error(String(G))}),z())})}else if(!N.current){k.current&&C.current!==R.target&&I();const z=Je(R.target);if(z&&Or(z))I(),l.current.updateState({action:g.current??H.UPDATE,lifecycle:A.READY,waiting:!1});else if(R.targetWaitTimeout===0)l.current.updateState({action:g.current??H.UPDATE,lifecycle:A.READY,waiting:!1});else if(!k.current){const{targetWaitTimeout:F}=R,L=Date.now();C.current=R.target,ye(j,`step:${u}`,"polling","started",`${F}ms`),l.current.updateState({waiting:!0}),k.current=setInterval(()=>{const V=Je(R.target),G=Date.now()-L,we=G>=F;(V&&Or(V)||we)&&(ye(j,`step:${u}`,"polling",V&&Or(V)?"found":"timed out",`${G}ms`),I(),l.current.updateState({action:g.current??H.UPDATE,lifecycle:A.READY,waiting:!1}))},100)}}return()=>{I()}},[e,r,u,f,h,l]),x.useEffect(()=>{if(!S.current)return;const{hasChanged:O,hasChangedTo:R,previous:D}=ft(w.current,S.current),j=b.current;if(!j)return;const z=Je(j.target),F=!!z;if(F&&Or(z)){if(R("lifecycle",A.READY)&&D.lifecycle===A.INIT&&r(_e.STEP_BEFORE,j,{action:g.current??w.current.action}),R("lifecycle",A.READY)){const L=w.current,V=Cd(j,L,v.current.continuous)?A.TOOLTIP:A.BEACON,G=Je(j.scrollTarget??j.spotlightTarget??j.target),we=cs({isFirstStep:L.index===0,scrollToFirstStep:v.current.scrollToFirstStep,step:j,target:G,targetLifecycle:V}),Se=V===A.TOOLTIP?A.TOOLTIP_BEFORE:A.BEACON_BEFORE;ye(v.current.debug,`step:${u}`,"scroll",we?"needed":"skipped"),l.current.updateState({action:H.UPDATE,lifecycle:Se,scrolling:we})}}else if(w.current.status===W.RUNNING&&f!==A.INIT&&f!==A.COMPLETE&&O("lifecycle")){ye(v.current.debug,`step:${u}`,F?"Target not visible":"Target not mounted",j),e(j,"target_not_found"),r(_e.TARGET_NOT_FOUND,j);const L=w.current;L.controlled||l.current.updateState({action:H.UPDATE,index:L.index+(L.action===H.PREV?-1:1),lifecycle:A.INIT})}},[e,r,u,f,l]),x.useEffect(()=>{if(!S.current)return;const{hasChangedTo:O,previous:R}=ft(w.current,S.current),D=b.current,j=T.current;if(D&&O("lifecycle",A.TOOLTIP_BEFORE)&&R.lifecycle===A.BEACON){const L=Je(D.scrollTarget??D.spotlightTarget??D.target);if(cs({isFirstStep:w.current.index===0,scrollToFirstStep:v.current.scrollToFirstStep,step:D,target:L,targetLifecycle:A.TOOLTIP})){l.current.updateState({scrolling:!0,positioned:!1});return}}const z=f===A.BEACON_BEFORE||f===A.TOOLTIP_BEFORE;if(D&&z&&!m){const L=f===A.TOOLTIP_BEFORE?A.TOOLTIP:A.BEACON;l.current.updateState({action:H.UPDATE,lifecycle:L})}D&&O("lifecycle",A.BEACON)&&r(_e.BEACON,D),D&&O("lifecycle",A.TOOLTIP)&&r(_e.TOOLTIP,D);const F=w.current;if((F.status===W.RUNNING||F.controlled&&F.status===W.PAUSED&&D)&&j&&O("lifecycle",A.COMPLETE)&&R.lifecycle===A.TOOLTIP&&(r(_e.STEP_AFTER,j,{action:g.current??H.UPDATE,index:R.index??F.index,lifecycle:F.lifecycle}),j.after)){r(_e.STEP_AFTER_HOOK,j,{action:g.current??H.UPDATE,index:R.index??F.index,lifecycle:F.lifecycle});try{j.after({...l.current.getState(),action:g.current??H.UPDATE,index:R.index??F.index,lifecycle:F.lifecycle,step:j})}catch{}}},[r,f,d,m,l]),x.useEffect(()=>
6{if(!S.current)return;const{hasChangedTo:O,previous:R}=ft(w.current,S.current),D=b.current,j=T.current;if(O("action",H.REPLAY)&&O("lifecycle",A.COMPLETE)){l.current.updateState({lifecycle:A.INIT});return}_&&!D&&f===A.INIT&&l.current.updateState({action:H.UPDATE,lifecycle:A.COMPLETE,status:W.FINISHED}),!w.current.controlled&&h===W.RUNNING&&O("lifecycle",A.COMPLETE)&&u<_&&l.current.updateState({action:H.UPDATE,lifecycle:A.INIT}),O("lifecycle",A.COMPLETE)&&u>=_&&l.current.updateState({action:H.UPDATE,lifecycle:A.COMPLETE,status:W.FINISHED});const z=D??j??yi(v.current,v.current.steps[u-1]);if(z&&O("status",[W.FINISHED,W.SKIPPED])){let F;D?F=u:j?F=R.index??u:F=u-1,r(_e.TOUR_END,z,{index:F}),w.current.controlled||E.current.reset(),g.current=null}D&&O("action",H.STOP)&&(g.current=null,r(_e.TOUR_STATUS,D)),D&&O("action",H.RESET)&&(r(_e.TOUR_STATUS,D),g.current=null)},[c,r,u,f,_,h,l])}function jd({controls:i,emitEvent:e,props:t,state:r,store:n}){const{debug:s,initialStepIndex:o,run:a,stepIndex:l,steps:c}=t,u=x.useRef(void 0),f=x.useRef(r),d=x.useRef(i);f.current=r,d.current=i,x.useEffect(()=>{const m=u.current;if(u.current=t,!m||t===m)return;const{hasChanged:_}=ft(t,m);if(di(m.steps,c)||(Xo(c,s)?n.current.setSteps(c):(ye(s,"tour","Steps are not valid",c),e(_e.ERROR,c[0]??{target:"",content:""},{error:new Error("Steps are not valid")}))),_("run"))a?n.current.getState().size&&d.current.start(l??o):d.current.stop();else if(ke.number(l)&&_("stepIndex")){const h=ke.number(m.stepIndex)&&m.stepIndex<l?H.NEXT:H.PREV;[W.FINISHED,W.SKIPPED].includes(f.current.status)||n.current.updateState({action:h,index:l,lifecycle:A.INIT,positioned:!1},!0)}},[s,e,o,t,a,l,c,n])}function Dd(i,e){const{beaconPosition:t,lifecycle:r,scrollOffset:n,step:s}=e;if(s.scrollTarget||s.spotlightTarget)return Math.max(0,i);let o=i-s.spotlightPadding.top;if(r===A.BEACON_BEFORE&&t?.placement){const a=Ld(t);["bottom"].includes(t.placement)||(o+=Math.floor(a-n))}else if(r===A.TOOLTIP_BEFORE){const{placement:a}=s;
6if(a==="top"){const l=document.querySelector(".react-joyride__floater")?.getBoundingClientRect().height??0,c=s.floatingOptions?.hideArrow?0:s.arrowSize,u=s.offset+s.spotlightPadding.top+c;o-=l+u}else if(a==="left"||a==="right"){const l=document.querySelector(".react-joyride__floater")?.getBoundingClientRect().height??0,c=Je(s.target)?.getBoundingClientRect().height??0,u=n+s.spotlightPadding.top+c/2-l/2;u<n&&(o-=n-u)}}return Math.max(0,o)}function Ld(i){const e=i.middlewareData?.offset;return e?["left","right"].some(t=>i.placement.startsWith(t))?e.x:e.y:0}function Md({emitEvent:i,previousState:e,props:t,state:r,step:n,store:s}){const{index:o,lifecycle:a,positioned:l,scrolling:c,status:u}=r,f=x.useRef(null),d=x.useRef(r),m=x.useRef(e),_=x.useRef(t),h=x.useRef(n);d.current=r,m.current=e,_.current=t,h.current=n,x.useEffect(()=>()=>{f.current?.()},[]),x.useEffect(()=>{if(!m.current||!h.current)return;const{hasChangedTo:y}=ft(d.current,m.current),g=h.current,{debug:v}=_.current,{scrollDuration:w}=g,S=a===A.BEACON_BEFORE||a===A.TOOLTIP_BEFORE;if(u===W.RUNNING&&S&&c&&y("positioned",!0)){const b=Je(g.scrollTarget??g.spotlightTarget??g.target),T=s.current.getPositionData("beacon"),E=Qt(b),k=E?!E.isSameNode(Ne()):!1;f.current?.(),(async()=>{if(k&&!er(E)){const z=Ne(),F=xd(E),L={initial:z.scrollTop,target:F,element:z,duration:w};i(_e.SCROLL_START,g,{scroll:L});const{cancel:V,promise:G}=us(F,{element:z,duration:w});f.current=V,await G,i(_e.SCROLL_END,g,{scroll:L})}const N=Math.floor(bd(b,g.scrollOffset))||0,I=k?N:Dd(N,{beaconPosition:T,lifecycle:a,scrollOffset:g.scrollOffset,step:g});ye(v,`step:${o}`,"scroll",k?"custom":"document",`${N} â ${I}`);const O=E,R={initial:O.scrollTop,target:I,element:O,duration:w};i(_e.SCROLL_START,g,{scroll:R});const{cancel:D,promise:j}=us(I,{element:O,duration:w});f.current=D,await j,i(_e.SCROLL_END,g,{scroll:R}),s.current.updateState({scrolling:!1})})().catch(()=>{s.current.updateState({scrolling:!1})})}},[i,o,a,l,c,u,s])}function Fd(i){const e=yf(()=>md(dd,i),[i]),{debug:t,initialStepIndex:r,onEvent:n,run:s,stepIndex:o,steps:a}=e,l=x.useRef(Od(e)),c=_c.useSyncExternalStore(l.current.subscribe,l.current.getSnapshot,l.current.getServerSnapshot),[u,f]=x.useState([]),d=x.useCallback((b,T)=>{f(E=>[...E,{reason:T,step:b}])},[]),m=x.useCallback(()=>{f([])},[]);Nd(l,t);const _=Pd(l,t,m),h=Id(n,_,l),{index:y,size:g,status:v}=c,w=Fo(c),S=x.useMemo(()=>yi(e,a[y]),[y,e,a]);return xf(()=>{s&&g&&Xo(a,t)&&_.start(o??r)}),_f(()=>{s&&g&&v===W.IDLE&&l.current.updateState({status:W.READY})},[s,g,v]),jd({controls:_,emitEvent:h,props:e,state:c,store:l}),Ad({addFailure:d,controls:_,emitEvent:h,previousState:w,props:e,state:c,step:S,store:l}),Md({emitEvent:h,previousState:w,props:e,state:c,step:S,store:l}),{controls:_,failures:u,mergedProps:e,state:c,step:S,store:l}}function Bd(i){const[e,t]=x.useState(null);return x.useEffect(()=>{let r=null,n=!1;if(i)if(ke.domElement(i))r=i,n=!0;else{const s=document.querySelector(i);s&&(r=s)}else{const s=document.createElement("div");s.id=hd,document.body.appendChild(s),r=s}return t(r),()=>{!r||n||r.parentNode===document.body&&document.body.removeChild(r)}},[i]),e}const Ud={animation:"joyride-loader-spin 1s linear infinite",border:"5px solid rgba(0, 0, 0, 0.1)",borderRadius:"50%",borderTopColor:"#555"};function zd({nonce:i,step:e}){const{loaderComponent:t}=e,r=!!t;if(x.useEffect(()=>{if(r||document.getElementById("joyride-loader-animation"))return xr;const l=document.createElement("style");return l.id="joyride-loader-animation",i&&l.setAttribute("nonce",i),l.appendChild(document.createTextNode(` 7 @keyframes joyride-loader-spin { 8 to { transform: rotate(360deg); } 9 } 10 `)),document.head.appendChild(l),()=>{const c=document.getElementById("joyride-loader-animation");c?.parentNode&&c.parentNode.removeChild(c)}},[r,i]),t===null)return null;const{height:n,width:s,...o}=e.styles.loader;let a;if(t){const l=t;a=U.createElement(l,{step:e})}else a=U.createElement("div",{style:{...Ud,height:n,width:s,borderTopColor:e.primaryColor}});return U.createElement("div",{className:"react-joyride__loader","data-testid":"loader",style:o},a)}const Vd={height:0,isFixed:!1,left:0,top:0,width:0};function or(i,e){const t=Je(i);if(!t)return Vd;const r=_i(t),n=er(t),s=yd(t,e.top,n);return{height:Math.round((r?.height??0)+e.top+e.bottom),isFixed:n,left:Math.round((r?.left??0)-e.left),top:s,width:Math.round((r?.width??0)+e.left+e.right)}}function $d(i,e,t){const[r,n]=x.useState(()=>or(i,e)),s=x.useRef(void 0),o=x.useRef(null),a=x.useRef(t),l=x.useRef(null),c=x.useCallback(()=>{clearTimeout(s.current),s.current=window.setTimeout(()=>{n(f=>{const d=or(i,e);return f.top===d.top&&f.left===d.left&&f.width===d.width&&f.height===d.height&&f.isFixed===d.isFixed?f:d})},100)},[i,e]);x.useEffect(()=>{let f=null;const d=_=>{o.current=Qt(_,!0),o.current&&o.current.addEventListener("scroll",c,{passive:!0}),window.addEventListener("scroll",c,{passive:!0}),window.addEventListener("resize",c),typeof ResizeObserver<"u"&&(l.current=ne
10w ResizeObserver(c),l.current.observe(_)),n(or(i,e))},m=Je(i);return m?d(m):(f=new MutationObserver(()=>{const _=Je(i);_&&(f?.disconnect(),f=null,d(_))}),f.observe(document.body,{childList:!0,subtree:!0})),()=>{f?.disconnect(),o.current&&o.current.removeEventListener("scroll",c),window.removeEventListener("scroll",c),window.removeEventListener("resize",c),l.current?.disconnect(),clearTimeout(s.current)}},[i,e,c]),x.useEffect(()=>{a.current&&!t&&n(or(i,e)),a.current=t},[t,i,e]);let u=r;return a.current&&!t&&(u=or(i,e)),u}function Gd(i,e,t){let r=`M0 0H${i}V${e}H0Z`;return t&&(r+=` ${t}`),r}function Yd(i,e,t,r,n){if(t<=0||r<=0)return"";const s=Math.max(0,Math.min(n,t/2,r/2));let o=`M${i+s} ${e}`;return o+=`H${i+t-s}`,o+=`A${s} ${s} 0 0 1 ${i+t} ${e+s}`,o+=`V${e+r-s}`,o+=`A${s} ${s} 0 0 1 ${i+t-s} ${e+r}`,o+=`H${i+s}`,o+=`A${s} ${s} 0 0 1 ${i} ${e+r-s}`,o+=`V${e+s}`,o+=`A${s} ${s} 0 0 1 ${i+s} ${e}Z`,o}const Hd=[A.BEACON_BEFORE,A.BEACON];function Wd(i){const{blockTargetInteraction:e,continuous:t,hideOverlay:r,lifecycle:n,onClickOverlay:s,overlayClickAction:o,placement:a,portalElement:l,scrolling:c,spotlightPadding:u,spotlightRadius:f,spotlightTarget:d,styles:m,target:_,waiting:h}=i,y=bf(),g=$d(d??_,u,c||h),v=x.useRef(null),w=x.useRef(null),S=(n===A.TOOLTIP||n===A.TOOLTIP_BEFORE)&&a!=="center",[b,T]=x.useState(!1),E=l?v.current?.offsetParent:null,k=E?.clientWidth??y.width,C=E?.clientHeight??_d()??y.height,N=m.overlay?.backgroundColor??"rgba(0, 0, 0, 0.5)",I=x.useMemo(()=>{const{backgroundColor:F,mixBlendMode:L,...V}=m.overlay;return{height:C,pointerEvents:"none",...V}},[C,m.overlay]),O=S&&!c&&!h;x.useEffect(()=>{O?requestAnimationFrame(()=>T(!0)):T(!1)},[O]);const R=t&&Hd.includes(n),D=!t&&n!==A.TOOLTIP;if(r||!h&&(R||D))return null;let j="";if(O){let F=0,L=0;const V=w.current;if(l&&V&&!g.isFixed){const G=V.getBoundingClientRect();F=G.top+Ne().scrollTop,L=G.left}j=Yd(g.left-L,g.top-F,g.width,g.height,f)}const z=Gd(k,C,j);return U.createElement("div",{ref:v,"aria-hidden":"true",className:"react-joyride__overlay","data-testid":"overlay",style:I},U.createElement("svg",{ref:w,className:"react-joyride__spotlight","data-testid":"spotlight",style:{height:C,left:0,position:g.isFixed?"fixed":"absolute",top:0,width:k}},U.createElement("path",{d:z,fill:N,fillRule:"evenodd",onClick:s,style:{cursor:o?"pointer":"default",pointerEvents:"auto"}}),j&&U.createElement("path",{d:j,fill:N,style:{opacity:b?0:1,pointerEvents:e?"auto":"none",transition:"opacity 0.2s"}}),j&&Object.keys(m.spotlight).length>0&&U.createElement("path",{d:j,fill:"none",style:{pointerEvents:"none"},...m.spotlight})))}function Jo(i){const{children:e,element:t}=i;return t?bs.createPortal(e,t):null}const qd='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), area[href], [tabindex]:not([tabindex="-1"]), [contenteditable]';function Kd(i,e){const t=x.useRef(null);x.useEffect(()=>{if(!i)return xr;t.current=document.activeElement;const r=s=>{if(s.key!=="Tab")return;const o=[...i.querySelectorAll(qd)],{shiftKey:a}=s;if(!o.length)return;s.preventDefault();let l=document.activeElement?o.indexOf(document.activeElement):0;l===-1||!a&&l+1===o.length?l=0:a&&l===0?l=o.length-1:l+=a?-1:1,o[l].focus()};i.addEventListener("keydown",r,!1);let n;{const s=i.querySelector(e);s&&(n=setTimeout(()=>{s.focus({preventScroll:!0})},100))}return()=>{i.removeEventListener("keydown",r),n!==void 0&&clearTimeout(n),t.current?.focus({preventScroll:!0})}},[i,e])}function lt(i,e,t){const[r]=i.split("-");switch(r){case"top":case"bottom":return{width:e,height:t};case"left":case"right":return{width:t,height:e};default:return null}}function Xd(i,e,t){const[r]=i.split("-");switch(r){case"top":return{points:`0,0 ${e/2},${t} ${e},0`,...lt(i,e,t)};case"bottom":return{points:`${e},${t} ${e/2},0 0,${t}`,...lt(i,e,t)};case"left":return{points:`0,0 ${t},${e/2} 0,${e}`,...lt(i,e,t)};case"right":return{points:`${t},${e} ${t},0 0,${e/2}`,...lt(i,e,t)};default:return null}}function Jd(i,e,t,r){if(!e)return{};const[n]=i.split("-");switch(n){case"top":return{bottom:-t,left:e.x??0,...lt(i,r,t)};case"bottom":return{top:-t,left:e.x??0,...lt(i,r,t)};case"left":return{right:-t,top:e.y??0,...lt(i,r,t)};case"right":return{left:-t,top:e.y??0,...lt(i,r,t)};default:return{}}}function Zd({arrowComponent:i,arrowRef:e,base:t,placement:r,position:n,size:s,styles:o}){const a=i;let l=null;if(a){if(!lt(r,t,s))return null;l=U.createElement("span",{style:{flexShrink:0}},U.createElement(a,{base:t,placement:r,size:s}))}else{const c=Xd(r,t,s);if(!c)return null;l=U.createElement("svg",{height:c.height,width:c.width,xmlns:"http://www.w3.org/2000/svg"},U.createElement("polygon",{fill:"currentColor",points:c.points}))}return U.createElement("span",{ref:e,className:"react-joyride__arrow","data-testid":"arrow",style:{...o,...Jd(r,n,s,t),...n?{}:{visibility:"hidden"}}},l)}function Qd(i){const{beaconComponent:e,continuous:t,index:r,isLastStep:n,locale:s,nonce:o,onInteract:a,shouldFocus:l,size:c,step:u,styles:f}=i,d=x.useRef(null),m=!!e;x.useEffect(()=>{if(m||document.getElementById("joyride-beacon-animation"))return xr;const y=document.createElement("style");y.id="joyride-beacon-animation",o&&y.setAttribute("nonce",o),y.appendChild(document.createTextNode(` 11 @keyframes joyride-beacon-inner { 12 20% { 13 opacity: 0.9; 14 } 15 16 90% { 17 opacity: 0.7; 18 } 19 } 20 21 @keyframes joyride-beacon-outer { 22 0% { 23 transform: scale(1); 24 } 25 26 45% { 27 opacity: 0.7; 28 transform: scale(0.75); 29 } 30 31 100% { 32 opacity: 0.9; 33 transform: scale(1); 34 } 35 } 36 `)),document.head.appendChild(y);const g=setTimeout(()=>{ke.domElement(d.current)&&l&&d.current.focus()},0);return()=>{clearTimeout(g);const v=document.getElementById("joyride-beacon-animation");v?.parentNode&&v.parentNode.removeChild(v)}},[m,o,l]);const _=at(s.open);let h;if(e){const y=e;h=U.createElement(y,{continuous:t,index:r,isLastStep:n,size:c,step:u})}else h=U.createElement("span",{style:f.beacon},U.createElement("span",{style:f.beaconOuter}),U.createElement("span",{style:f.beaconInner}));return U.createElement("button",{ref:d,"aria-label":_,className:"react-joyride__beacon","data-testid":"button-beacon",onClick:a,onMouseEnter:a,style:f.beaconWrapper,title:_,type:"button"},h)}function eh({styles:i,...e}){const{color:t,height:r,width:n,...s}=i;return U.createElement("button",{style:s,type:"button",...e},U.createElement("svg",{height:typeof r=="number"?`${r}px`:r,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:typeof n=="number"?`${n}px`:n,xmlns:"http://www.w3.org/2000/svg"},U.createElement("g",null,U.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:t}))))}function th(i){const{backProps:e,closeProps:t,index:r,isLastStep:n,primaryProps:s,skipProps:o,step:a,tooltipProps:l}=i,{buttons:c,content:u,styles:f,title:d}=a,m={};c.includes("primary")&&(m.primary=U.createElement("button",{"data-testid":"button-primary",style:f.buttonPrimary,type:"button",...s})),c.includes("skip")&&!n&&(m.skip=U.createElement("button",{"aria-live":"off","data-testid":"button-skip",style:f.buttonSkip,type:"button",...o})),c.includes("back")&&r>0&&(m.back=U.createElement("button",{"data-testid":"button-back",style:f.buttonBack,type:"button",...e})),m.close=c.includes("close")&&U.createElement(eh,{"data-testid":"button-close",styles:f.buttonClose,...t});const _=d?{"aria-labelledby":"joyride-tooltip-title","aria-describedby":"joyride-tooltip-content"}:{"aria-label":at(u),"aria-describedby":"joyride-tooltip-content"};return U.createElement("div",{key:"JoyrideTooltip",className:"react-joyride__tooltip","data-joyride-step":r,...a.id&&{"data-joyride-id":a.id},style:f.tooltip,...l,..._},U.createElement("div",{style:f.tooltipContainer},d&&U.createElement("h4",{id:"joyride-tooltip-title",style:f.tooltipTitle},d),U.createElement("div",{id:"joyride-tooltip-content",style:f.tooltipContent},u)),c.some(h=>h==="back"||h==="primary"||h==="skip")&&U.createElement("div",{style:f.tooltipFooter},U.createElement("div",{style:f.tooltipFooterSpacer},m.skip),m.back,m.primary),m.close)}function rh(i){const{continuous:e,controls:t,index:r,isLastStep:n,size:s,step:o}=i,a=g=>{g.preventDefault(),t.prev(Ue.BUTTON_BACK)},l=g=>{g.preventDefault(),o.closeButtonAction==="skip"?t.skip(Ue.BUTTON_CLOSE):o.closeButtonAction==="replay"?t.replay(Ue.BUTTON_CLOSE):t.close(Ue.BUTTON_CLOSE)},c=g=>{if(g.preventDefault(),!e){t.close(Ue.BUTTON_PRIMARY);return}t.next(Ue.BUTTON_PRIMARY)},u=g=>{g.preventDefault(),t.skip(Ue.BUTTON_SKIP)},f=()=>{const{back:g,close:v,last:w,next:S,nextWithProgress:b,skip:T}=o.locale,E=at(g),k=at(v),C=at(w),N=at(S),I=at(T);let O=v,R=k;if(e){if(O=S,R=N,o.showProgress&&!n){const D=at(b,{step:r+1,steps:s});O=$n(b,r+1,s),R=D}n&&(O=w,R=C)}return{backProps:{"aria-label":E,children:g,"data-action":"back",onClick:a,role:"button",title:E},closeProps:{"aria-label":k,children:v,"data-action":"close",onClick:l,role:"button",title:k},primaryProps:{"aria-label":R,children:O,"data-action":"primary",onClick:c,role:"button",title:R},skipProps:{"aria-label":I,children:T,"data-action":"skip",onClick:u,role:"button",title:I},tooltipProps:{"aria-modal":!0,role:"alertdialog"}}},{arrowComponent:d,beaconComponent:m,tooltipComponent:_,...h}=o;let y;if(_){const g=_;y=U.createElement(g,{...f(),continuous:e,controls:t,index:r,isLastStep:n,size:s,step:h})}else y=U.createElement(th,{...f(),continuous:e,controls:t,index:r,isLastStep:n,size:s,step:h});return y}function nh(i){if(i.startsWith("left"))return["top","bottom"];if(i.startsWith("right"))return["bottom","top"]}function ih(i,e,t){return i?[ma()]:e.floatingOptions?.flipOptions===!1?[]:[ga({crossAxis:!1,fallbackPlacements:nh(t),padding:20,...e.floatingOptions?.flipOptions})]}function sh(i){const{continuous:e,controls:t,index:r,lifecycle:n,nonce:s,open:o,portalElement:a,setPositionData:l,setTooltipRef:c,shouldScroll:u,size:f,step:d,target:m,updateState:_}=i,h=x.useRef(null),y=x.useRef({}),g=x.useRef({}),v=d.placement==="center",w=d.placement==="auto",S=x.useMemo(()=>({getBoundingClientRect:()=>({x:window.innerWidth/2,y:window.innerHeight/2,top:window.innerHeight/2,left:window.innerWidth/2,bottom:window.innerHeight/2,right:window.innerWidth/2,width:0,height:0})}),[]),b=x.useMemo(()=>Wo(m)?Qt(m):void 0,[m]),T=x.useMemo(()=>er(m),[m]),E=x.useMemo(()=>b?{boundary:b,rootBoundary:"viewport"}:{},[b]),k=v||w?"bottom":d.placement,C=v?"fixed":d.floatingOptions?.strategy??(d.isFixed||T?"fixed":"absolute"),N=x.useMemo(()=>v?[{name:"center",fn:({rects:V})=>({x:(window.innerWidth-V.floating.width)/2,y:(window.innerHeight-V.floating.height)/2})}]:[Ei(({placement:V})=>{let G="right";V.startsWith("top")?G="top":V.startsWith("bottom")?G="bottom":V.startsWith("left")&&(G="left");const we=d.spotlightTarget?0:d.spotlightPadding[G];return d.offset+we+(d.floatingOptions?.hideArrow?0:d.arrowSize)},[d.offset,d.spotlightPadding,d.spotlightTarget,d.arrowSize,d.floatingOptions?.hideArrow]),...ih(w,d,k),ha({padding:10,...E,...d.floatingOptions?.shiftOptions}),...d.floatingOptions?.hideArrow?[]:[pa({element:h,padding:d.arrowSpacing},[d.arrowSpacing,d.arrowBase])],...d.floatingOptions?.middleware??[]],[v,d,w,k,E]),I=Ci({...v?{elements:{reference:S}}:{},placement:k,strategy:C,middleware:N}),O=Ci({strategy:C,placement:d.beaconPlacement??(w||v?"bottom":d.placement),middleware:x.useMemo(()=>[Ei(d.floatingOptions?.beaconOptions?.offset??-18)],[d.floatingOptions?.beaconOptions?.offset]),whileElementsMounted:ki});g.current=I.middlewareData,y.current=O.middlewareData,x.useEffect(()=>{const{floating:V,reference:G}=I.elements;if(!(!G||!V||n!==A.TOOLTIP))return ki(G,V,I.update,d.floatingOptions?.autoUpdate)},[n,I.update,d.floatingOptions?.autoUpdate,d.target,I.elements]),x.useEffect(()=>{!v&&m&&I.refs.setReference(m),m&&O.refs.setReference(m)},[O.refs,v,m,I.refs]),x.useEffect(()=>{I.isPositioned&&l("tooltip",{placement:I.placement,x:I.x??0,y:I.y??0,middlewareData:g.current})},[l,I.isPositioned,I.placement,I.x,I.y]),x.useEffect(()=>{O.isPositioned&&l("beacon",{placement:O.placement,x:O.x??0,y:O.y??0,middlewareData:y.current})},[l,O.isPositioned,O.placement,O.x,O.y]);const R=d.zIndex+1,D=x.useCallback(V=>{V.type==="mouseenter"&&d.beaconTrigger!=="hover"||_({lifecycle:A.TOOLTIP_BEFORE,positioned:!1})},[d.beaconTrigger,_]),j=x.useCallback(V=>{V&&(I.refs.setFloating(V),c(V))},[I.refs,c]),{arrow:z,floater:F}=d.styles;let L=null;if(n===A.TOOLTIP||n===A.TOOLTIP_BEFORE){const V=ls({...F,...I.floatingStyles,zIndex:R,opacity:o&&I.isPositioned?1:0,...!o&&{transition:"none"}});L=U.createElement("div",{ref:j,className:"react-joyride__floater","data-testid":"floater",id:`react-joyride-step-${r}`,style:V},U.createElement(rh,{continuous:e,controls:t,index:r,isLastStep:r+1===f,size:f,step:d}),!v&&!d.floatingOptions?.hideArrow&&U.createElement(Zd,{arrowComponent:d.arrowComponent,arrowRef:h,base:d.arrowBase,placement:I.placement,position:I.middlewareData.arrow,size:d.arrowSize,styles:z}))}else(n===A.BEACON||n===A.BEACON_BEFORE)&&(L=U.createElement("div",{ref:O.refs.setFloating,className:"react-joyride__floater","data-testid":"floater-beacon",i
36d:`react-joyride-step-${r}-beacon`,style:ls({...O.floatingStyles,zIndex:R})},U.createElement(Qd,{beaconComponent:d.beaconComponent,continuous:e,index:r,isLastStep:r+1===f,locale:d.locale,nonce:s,onInteract:D,shouldFocus:u,size:f,step:d,styles:d.styles})));return U.createElement(Jo,{element:a},L)}function oh(i){const{continuous:e,controls:t,index:r,lifecycle:n,nonce:s,portalElement:o,setPositionData:a,shouldScroll:l,size:c,step:u,updateState:f}=i,[d,m]=x.useState(null);Kd(u.disableFocusTrap?null:d,"[data-action=primary]");const _=Je(u.target),h=n===A.TOOLTIP;return!Ko(u)||!ke.domElement(_)?null:U.createElement(sh,{key:`JoyrideStep-${r}`,continuous:e,controls:t,index:r,lifecycle:n,nonce:s,open:h,portalElement:o,setPositionData:a,setTooltipRef:m,shouldScroll:l,size:c,step:u,target:_,updateState:f})}function ah({controls:i,mergedProps:e,state:t,step:r,store:n}){const{continuous:s,debug:o,nonce:a,portalElement:l,scrollToFirstStep:c}=e,u=Bd(l),{index:f,lifecycle:d,status:m}=t,_=m===W.RUNNING,[h,y]=x.useState(!1),g=x.useRef(null),v=r?.loaderDelay??0;x.useEffect(()=>(t.waiting?v===0?y(!0):g.current=setTimeout(()=>{y(!0)},v):y(!1),()=>{g.current&&(clearTimeout(g.current),g.current=null)}),[v,t.waiting]),x.useEffect(()=>{if(!_)return;const b=T=>{!r||d!==A.TOOLTIP||T.key==="Escape"&&r.dismissKeyAction&&(r.dismissKeyAction==="next"?i.next(Ue.KEYBOARD):r.dismissKeyAction==="replay"?i.replay(Ue.KEYBOARD):i.close(Ue.KEYBOARD))};return document.body.addEventListener("keydown",b,{passive:!0}),()=>{document.body.removeEventListener("keydown",b)}},[i,_,d,r]);const w=x.useCallback(()=>{switch(r?.overlayClickAction){case"close":i.close(Ue.OVERLAY);break;case"next":i.next(Ue.OVERLAY);break;case"replay":i.replay(Ue.OVERLAY);break}},[i,r?.overlayClickAction]);if(!r||!_)return null;const S=t.action===H.START&&!r.skipBeacon&&r.placement!=="center";return U.createElement(U.Fragment,null,d!==A.INIT&&U.createElement(oh,{...t,continuous:s,controls:i,debug:o,nonce:a,portalElement:u,setPositionData:n.current.setPositionData,shouldScroll:!r.skipScroll&&(f!==0||c),step:r,updateState:n.current.updateState}),U.createElement(Jo,{element:u},U.createElement(U.Fragment,null,h&&U.createElement(zd,{nonce:a,step:r}),!S&&U.createElement(Wd,{...r,continuous:s,lifecycle:d,onClickOverlay:w,portalElement:l?u:null,scrolling:t.scrolling,waiting:t.waiting}))))}function lh(i){const{controls:e,failures:t,mergedProps:r,state:n,step:s,store:o}=Fd(i);return{controls:e,failures:t,on:x.useCallback((a,l)=>o.current.on(a,l),[o]),state:x.useMemo(()=>Hr(n,"positioned"),[n]),step:s,Tour:gi()?U.createElement(ah,{controls:e,mergedProps:r,state:n,step:s,store:o}):null}}function ch(i){const{Tour:e}=lh(i);return e}function uh(i){return gi()?U.createElement(ch,i):null}function Rr({stepIndex:i,totalSteps:e,text:t}){return p.jsxs("div",{className:"flex items-start gap-1.5 text-xs",children:[p.jsx(lc,{className:"h-4 w-4 shrink-0 fill-amber-400 text-amber-500"}),p.jsxs("span",{children:[t," (",i,"/",e,")"]})]})}function fh(i){return{checks:[],error:i}}function dh(i,e){const t=$a[i];return t?.validateReport?t.validateReport(e):fh(t?.validate?.(e)??null)}const hh=va("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:!rounded-l-none [&>*:not(:first-child)]:!border-l-0 [&>*:not(:last-child)]:!rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:!rounded-t-none [&>*:not(:first-child)]:!border-t-0 [&>*:not(:last-child)]:!rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function ds({className:i,orientation:e,...t}){return p.jsx("div",{role:"group","data-slot":"button-group","data-orientation":e,className:Ot(hh({orientation:e}),i),...t})}
36function ph(){const[i,e]=x.useState(!1),[t,r]=x.useState(null);return{importFromUrl:x.useCallback(async s=>{const o=Ar.currentUser;if(!o)throw new Error("You must be signed in to import from a URL");e(!0),r(null);try{const a=await o.getIdToken(),l=await fetch(`${Ga}/api/import/url`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({url:s})});if(!l.ok){const d=await l.json().catch(()=>({}));throw new Error(d?.detail||`Import failed (${l.status})`)}const{format:c,data:u}=await l.json(),f=Ba(u,c);return{format:c,rows:f}}catch(a){const l=a instanceof Error?a.message:"Unknown error";throw r(l),a}finally{e(!1)}},[]),loading:i,error:t}}function mh(i){return i.map(e=>e.map(t=>t==null?"":String(t)))}function gh(){const{chartType:i,setMetadata:e,setBothData:t,dataSourceUrl:r,dataSourceFormat:n,setDataSource:s,clearDataSource:o}=me(),a=x.useRef(null);ph();const[l,c]=x.useState(!1),[u,f]=x.useState(""),[d,m]=x.useState(!1),_=(v,w)=>{const{metadata:S,rawData:b,typedData:T}=Cn(v,i);e(S),t(b,T),Ss(b.length,S.length,w==="CSV"?"csv":w==="Excel"?"excel":"url"),Oe.success(`Imported ${b.length} rows from ${w}`)},h=v=>{Va.parse(v,{complete(w){_(w.data??[],"CSV")},error(){Oe.error("Failed to parse CSV/TSV")}})},y=v=>{const w=new FileReader;w.onload=S=>{try{const b=S.target?.result,T=Ua(b,{type:"array"}),E=T.SheetNames[0],k=T.Sheets[E],C=za.sheet_to_json(k,{header:1,defval:""});_(mh(C),"Excel")}catch(b){console.error("Excel parse error:",b),Oe.error("Failed to parse Excel file")}},w.onerror=()=>Oe.error("Failed to read file"),w.readAsArrayBuffer(v)},g=v=>{const w=v.target.files?.[0];if(!w)return;const S=w.name.toLowerCase(),b=S.endsWith(".xlsx")||S.endsWith(".xls");o(),b?y(w):h(w),v.target.value=""};return p.jsxs(p.Fragment,{children:[bs.createPortal(p.jsx("input",{ref:a,type:"file",accept:".csv,.tsv,.xlsx,.xls",className:"hidden",onChange:g}),document.body),p.jsxs(Pe,{variant:"outline",size:"xs",className:"h-7 px-3 font-normal",onClick:()=>a.current?.click(),children:[p.jsx(nc,{}),"Upload Data"]})]})}let hs=!1;const _h=x.lazy(()=>Te(()=>import("./index-CguuqYtX.js"),[]));function ps({compact:i=!1,onExpand:e}={}){const{rawData:n,metadata:s,setMetadata:o,setBothData:a,chartType:l}=me(),c=Math.max(6,s.length),u=Math.max(15,n.length),f=Array.from({length:c},(M,B)=>({key:s[B]?.key??`__empty_col_${B}`,name:s[B]?.name??"",type:s[B]?.type})),d=x.useMemo(()=>dh(l,n),[l,n]);d.error;const m=d.checks.find(M=>M.blocking&&!M.ok),_=m?.location?.type==="cell"?m.location:null,h=i?"!min-w-[96px]":"!min-w-[120px]",y=x.useMemo(()=>[f.map(M=>{const B=m?.location?.type==="column"&&m.location.columnKey===M.key;return{value:M.name,className:`${B?"!bg-red-100 !text-red-800":"!bg-neutral-100 !text-neutral-800"} !font-semibold ${h}`}}),...Array.from({length:u},(M,B)=>{const Q=n[B]??{};return f.map(re=>{const ne=_&&_.rowIndex===B&&_.columnKey===re.key;return{value:Q[re.key]??"",className:`${ne?"!bg-red-100 !ring-1 !ring-red-400":""} ${h}`}})})],[n,s,m,_,h]),[g,v]=x.useState(y),w=x.useRef(g),S=x.useRef(null);x.useEffect(()=>{v(y)},[y]),x.useEffect(()=>{w.current=g},[g]),x.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]);const b=["VBarChart","HBarChart","LineChart","LineRaceChart","RadarChart","HeatmapChart","WaterfallChart","ComboChart"].includes(l),T=s.filter(M=>M.key==="y"||M.key.match(/^y\d+$/)),E=(M,B)=>{const Q=[M.map(Y=>Y.name),...B.map(Y=>M.map(se=>String(Y[se.key]??"")))],{metadata:re,rawData:ne,typedData:pe}=Cn(Q,l);o(re),a(ne,pe)},k=M=>E(s,M),C=x.useRef(null),[N,I]=x.useState(null);x.useEffect(()=>{const M=C.current;if(!M||!m){I(null);return}const B=()=>{const Q=M.querySelector('td[class*="ring-red"]')??M.querySelector('td[class*="text-red-800"]');if(!Q){I(null);return}const re=M.getBoundingClientRect(),ne=Q.getBoundingClientRect(),pe=ne.top-re.top+M.scrollTop+ne.height/2,Y=ne.left-re.left+M.scrollLeft+ne.width+8;I({top:pe,left:Y})};return B(),M.addEventListener("scroll",B),window.addEventListener("resize",B),()=>{M.removeEventListener("scroll",B),window.removeEventListener("resize",B)}},[m]);const[O,R]=x.useState(null),D=M=>{const B=document.elementsFromPoint(M.clientX,M.clientY).find(pe=>pe.matches("td, th"));if(!B)return null;const Q=B.closest("tr");if(!Q)return null;const re=Q.sectionRowIndex-2;if(re<-1)return null;const ne=B.cellIndex;return{row:re,col:ne}},j=M=>{const B=D(M);B&&R(B)},z=M=>{const B={};
36s.forEach(Q=>{B[Q.key]=Q.type==="number"?"0":""}),k([...n.slice(0,M),B,...n.slice(M)]),R(null)},F=M=>{n.length<=1||(k(n.filter((B,Q)=>Q!==M)),R(null))},L=M=>M===0?"y":`y${M}`,V=M=>M==="y"||/^y\d+$/.test(M),G=M=>{const B=s.slice(0,M).filter(Y=>V(Y.key)).length,Q=T.length,re=L(B),ne=s.map(Y=>({...Y}));for(let Y=Q-1;Y>=B;Y--){const se=ne.find(X=>X.key===L(Y));se&&(se.key=L(Y+1))}ne.splice(M,0,{key:re,type:"number",name:`Series ${B+1}`,ui:"column"});const pe=n.map(Y=>{const se={...Y};for(let X=Q-1;X>=B;X--)se[L(X+1)]=se[L(X)]??"0",delete se[L(X)];return se[re]="0",se});E(ne,pe),R(null)},we=M=>{const B=s[M]?.key;if(!B)return;const Q=T.findIndex(Y=>Y.key===B),re=T.length,ne=s.filter(Y=>Y.key!==B).map(Y=>({...Y}));for(let Y=Q+1;Y<re;Y++){const se=ne.find(X=>X.key===L(Y));se&&(se.key=L(Y-1))}const pe=n.map(Y=>{const se={...Y};delete se[B];for(let X=Q+1;X<re;X++)se[L(X-1)]=se[L(X)]??"0",delete se[L(X)];return se});E(ne,pe),R(null)},Se=x.useCallback(M=>{if(M.length===0)return;const B=M.map(X=>X.map(be=>String(be?.value??""))),Q=B.reduce((X,be)=>{for(let it=be.length-1;it>=0;it--)if((be[it]??"").trim()!=="")return Math.max(X,it);return X},-1),re=Math.max(Q+1,0),ne=B.map(X=>X.slice(0,re)),{metadata:pe,rawData:Y,typedData:se}=Cn(ne,l);Y.length!==0&&(o(pe),a(Y,se),hs||(hs=!0,Ss(Y.length,pe.length,"manual")))},[l,a,o]),Lt=x.useCallback(M=>{v(M)},[]),de=x.useCallback(()=>{S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{Se(w.current),S.current=null},75)},[Se]),We=x.useCallback(()=>{S.current&&(clearTimeout(S.current),S.current=null),Se(w.current)},[Se]);return p.jsx("div",{className:i?"flex h-full w-full":"flex h-full min-h-0 w-full",children:p.jsxs("div",{className:"flex h-full min-h-0 w-full flex-col gap-4",children:[!i&&p.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-2 items-center",children:[p.jsx(ds,{children:p.jsx(gh,{})}),O&&p.jsx(ds,{children:(()=>{const{row:M,col:B}=O,Q=M===-1,re=B===0,ne=!Q&&l!=="GanttChart",pe=!Q&&B>=0&&!re&&b;return p.jsxs(p.Fragment,{children:[p.jsxs(Pe,{variant:"outline",size:"xs",className:"h-7 px-3 font-normal",onClick:()=>z(Math.max(M,0)),disabled:!ne,children:[p.jsx(Cr,{className:"h-3 w-3"})," row above"]}),p.jsxs(Pe,{variant:"outline",size:"xs",className:"h-7 px-3 font-normal",onClick:()=>z(M+1),disabled:!ne,children:[p.jsx(Cr,{className:"h-3 w-3"})," row below"]}),p.jsxs(Pe,{variant:"outline",size:"xs",className:"h-7 px-3 font-normal",onClick:()=>F(M),disabled:!ne||n.length<=1,children:[p.jsx(Ri,{className:"h-3 w-3"})," row"]}),p.jsxs(Pe,{variant:"outline",size:"xs",className:"h-7 px-3 font-normal",onClick:()=>G(B),disabled:!pe,children:[p.jsx(Cr,{className:"h-3 w-3"})," column left"]}),p.jsxs(Pe,{variant:"outline",size:"xs",className:"h-7 px-3 font-normal",onClick:()=>G(B+1),disabled:!pe,children:[p.jsx(Cr,{className:"h-3 w-3"})," column right"]}),p.jsxs(Pe,{variant:"outline",size:"xs",className:"h-7 px-3 font-normal",onClick:()=>we(B),disabled:!pe||T.length<=1,children:[p.jsx(Ri,{className:"h-3 w-3"})," column"]})]})})()})]}),m?.location?.type==="table"&&p.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-600 px-3 py-2 text-sm text-white",children:[p.jsx(Ni,{className:"h-4 w-4 shrink-0"}),p.jsx("span",{children:m.message})]}),p.jsxs("div",{className:"relative flex flex-1 min-h-0 gap-4",children:[p.jsxs("div",{ref:C,className:"relative compact-spreadsheet overflow-auto flex-1 min-h-0",onClickCapture:j,children:[p.jsx("div",{className:"w-max min-w-full",children:p.jsx(_h,{data:g,onChange:Lt,onCellCommit:de,onBlur:We,hideRowIndicators:!0,hideColumnIndicators:!0})}
36),m&&N&&p.jsxs("div",{style:{position:"absolute",top:N.top,left:N.left,transform:"translateY(-50%)",zIndex:50},className:"pointer-events-auto flex max-w-[220px] flex-col gap-2 rounded-lg bg-red-600 px-3 py-2 shadow-lg",children:[p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx(Ni,{className:"mt-0.5 h-4 w-4 shrink-0 text-white"}),p.jsx("span",{className:"text-sm leading-snug text-white",children:m.message})]}),p.jsx("div",{className:"absolute left-0 top-1/2 h-3 w-3 -translate-x-1/2 -translate-y-1/2 rotate-45 bg-red-600"})]})]}),i&&e&&p.jsx(Pe,{type:"button",variant:"outline",size:"icon-sm",className:"absolute bottom-2 right-2 z-10 bg-white shadow-sm",onClick:e,title:"Expand data table",children:p.jsx(oc,{className:"h-3.5 w-3.5"})})]})]})})}let Wr=null;function Fp(i){Wr=i}const yh=new Set(["clip-rect","clip-ellipse","container","image"]);function Zo(i){const e=[];for(const t of i)t.kind==="container"?e.push(...Zo(t.children??[])):e.push(t);return e}function xh(i){const e=new Map;for(const t of i){if(yh.has(t.kind))continue;const r=t.role;r&&(e.has(r)||e.set(r,{nodes:[]}),e.get(r).nodes.push(t))}return e}const bh={title:"Title",subtitle:"Subtitle",footer:"Footer",xlabel:"X-Axis Title",ylabel:"Y-Axis Title",label:"Labels",labels:"Labels",lineLabel:"Labels",number:"Number",value:"Value",groupLabel:"Group Labels",timeIndicator:"Time",time:"Time",legend:"Legend",line:"Line",area:"Area",bar:"Bar",dot:"Dots",dots:"Dots",marker:"Markers",slice:"Slices",connector:"Connector",xaxis:"X Axis",yaxis:"Y Axis",yaxis2:"Y2 Axis",yticks2:"Y2 Labels",xgrid:"X Grid",ygrid:"Y Grid",xticks:"X Labels",yticks:"Y Labels",stackTotalLabel:"Stack Totals",stackConnector:"Stack Connectors",valueLabel:"Value Labels",netLabel:"Totals",centerTitle:"Center Text",dateLabel:"Date Labels",border:"Outer Border",rowDivider:"Row Separators",headerDivider:"Header Separators",columnDivider:"Column Separators",headerRow:"Header Row",header:"Header Labels"},vh={GanttChart:{yticks:"Task Labels"}},wh=new Set(["bar","label","stackTotalLabel","netLabel","xticks","yticks","dateLabel","legend","ygrid","xgrid","stackConnector","connector","xaxis","yaxis","yaxis2","yticks2","slice","centerTitle","line","area","dot","marker","valueLabel","title","subtitle","footer","xlabel","ylabel"]),Sh={VBarChart:new Set(["bar"]),HBarChart:new Set(["bar","xaxis","yaxis","xticks","yticks"]),MarimekkoChart:new Set(["bar"]),PieChart:new Set(["label","slice"]),LineChart:new Set(["label","line"]),ScatterChart:new Set(["xaxis","xticks","label"]),WaterfallChart:new Set(["bar","label"]),GanttChart:new Set(["row","headerRow","label","yticks","header"])};function Th(i,e,t){if(!i)return[];const r=Zo(i.nodes??[]),n=xh(r),s=i._resolvedStyle??e,o=[],a=new Set;for(const l of n.keys()){if(!(Sh[t]?.has(l)||wh.has(l)))continue;const u=vh[t]?.[l]??bh[l];if(!u||a.has(u))continue;a.add(u);const f=n.get(l),d=s[l]?.visible,m=d!==void 0?d!==!1:f.nodes.some(_=>_.visible!==!1);o.push({role:l,label:u,isVisible:m})}return o}const Eh=[{label:"16:9",width:1920,height:1080},{label:"1:1",width:1080,height:1080},{label:"9:16",width:1080,height:1920},{label:"4:5",width:1080,height:1350},{label:"4:3",width:1440,height:1080}];function Ch(){const{style:i,updateStyle:e,canvas:t,updateCanvas:r}=me(),n=Wr?.constructor?.chartType??"",s=Th(Wr,i,n);return p.jsxs("div",{className:"flex flex-col w-64 p-1.5 text-xs",children:[p.jsxs("div",{className:"flex flex-col px-2 py-1",children:[p.jsx(Ya,{width:t.width,height:t.height,presets:Eh,onChange:(o,a)=>r(l=>{l.width=o,l.height=a})}),p.jsx(Ha,{label:"Background",value:t.backgroundColor??"#FFFFFF",onChange:o=>r(a=>{a.backgroundColor=o})})]}),s.length>0&&p.jsx("div",{className:"flex flex-col px-2 pt-1.5 mt-1 border-t border-neutral-100",children:s.map(o=>p.jsx(Wa,{label:o.label,checked:o.isVisible,onChange:a=>e(l=>{l[o.role]||(l[o.role]={}),l[o.role].visible=a})},o.role))})]})}
36function kh(){const[i,e]=x.useState("idle"),[t,r]=x.useState(0),n=x.useRef(null),s=x.useRef(""),{isPro:o,isTeam:a,teamId:l}=Ts(),{currentFileId:c,currentFileName:u,setCurrentFile:f,chartType:d,data:m,metadata:_,style:h,canvas:y,backgroundImage:g,backgroundImageOpacity:v,source:w,isPublic:S,dataSourceUrl:b,dataSourceFormat:T,dataSourceSheetId:E}=me(),k=x.useCallback(()=>JSON.stringify({data:m,style:h,canvas:y,backgroundImage:g,backgroundImageOpacity:v,source:w,isPublic:S,dataSourceUrl:b,dataSourceFormat:T,dataSourceSheetId:E}),[m,h,y,g,v,w,S,b,T,E]),C=x.useCallback(async()=>{const O=Ar.currentUser;if(!O||!d)return;const R=k();if(R!==s.current){e("saving");try{const D={name:u,chartType:d,data:m,metadata:_,style:h,canvas:y,backgroundImage:g||null,backgroundImageOpacity:v??1,source:w||"",isPublic:S??!1,dataSourceUrl:b||null,dataSourceFormat:T||null,dataSourceSheetId:E??null,updatedAt:an()};if(c)await En(Ft(Ct,"charts",c),D,{merge:!0});else{const j={...D,userId:O.uid,isPublic:!1,createdAt:an()};a&&l&&(j.teamId=l);const z=await Ra(Na(Ct,"charts"),j);f(z.id,u)}s.current=R,e("saved"),r(j=>j+1),setTimeout(()=>e("idle"),2e3)}catch(D){console.error("Auto-save failed:",D),e("error")}}},[c,u,d,m,_,h,y,g,v,w,S,b,T,E,k,f,a,l]);x.useEffect(()=>{if(!(!Ar.currentUser||!d))return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{C()},2e3),()=>{n.current&&clearTimeout(n.current)}},[m,h,y,g,v,w,S,b,T,E,C,d]);const N=x.useCallback(()=>{n.current&&clearTimeout(n.current),C()},[C]),I=x.useCallback(async O=>{if(!(!Ar.currentUser||!c)){f(c,O);try{await En(Ft(Ct,"charts",c),{name:O,updatedAt:an()},{merge:!0})}catch(D){la(D,"file_operation")}}},[c,f]);return{saveStatus:i,saveCount:t,saveNow:N,renameFile:I,currentFileName:u,currentFileId:c,isPro:o}}function Oh(i){if(!(i instanceof HTMLElement))return!1;const e=i.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"||i.isContentEditable}function Ph(){x.useEffect(()=>{function i(e){const t=(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="z",r=e.ctrlKey&&e.key.toLowerCase()==="y";if(!t&&!r||Oh(e.target))return;const n=me.temporal.getState();r||t&&e.shiftKey?(e.preventDefault(),n.redo()):(e.preventDefault(),n.und
36o())}return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[])}const Rh=x.createContext(null);function Nh({children:i,onOpen:e}){const t=x.useRef(e);t.current=e;const r=n=>t.current(n);return p.jsx(Rh.Provider,{value:r,children:i})}function Ih(i){const[e,t]=x.useState(!1),r=xs(),{openCheckout:n,isPro:s}=Ts(),{user:o}=Kr(),a=Gn(),l=async u=>{t(!0);try{await n(u),i?.(u)}catch(f){console.error("Checkout error:",f)}finally{t(!1)}};return{checkoutLoading:e,handlePlanClick:u=>{if(u==="free"){i?i(u):r("/editor");return}if(!o){a("signin",()=>l(u));return}l(u)},isPro:s}}const Ah=["Advanced chart types - Waterfall, Mekko, Pareto, Stacked Column, Bubble etc.","Export PNG, transparent PNG, PPTX, MP4","Unlimited Watermark free exports","Unlimited AI Chat","Unlimited files with cloud saving","Access to premium templates"],jh={video_export:{title:"Get your animated chart as a video",cta:"Get Video Export"},png_export:{title:"Download your chart as a sharp PNG",cta:"Get PNG Export"},png_transparent_export:{title:"Export your chart with a transparent background",cta:"Get Transparent Export"},premium_template:{title:"Use this premium template",cta:"Unlock Template"},watermark:{title:"Export your chart without a watermark",cta:"Remove Watermark"},advanced:{title:"Fine-tune every element with advanced controls",cta:"Unlock Advanced"},ai_edit:{title:"Unlock unlimited AI chart edits",cta:"Upgrade to Pro"}};function Dh({open:i,onOpenChange:e,feature:t="video_export"}){const{title:r,cta:n}=jh[t],[s,o]=x.useState(!0),{handlePlanClick:a,isPro:l}=Ih(()=>e(!1)),{user:c}=Kr(),u=Gn(),f=s?"pro_annual":"pro",d=s?Za:Qa,m=s?"Billed yearly. Cancel anytime.":"Billed monthly. Cancel anytime.",_=()=>{if(l){e(!1);return}if(!c){u("signin",()=>a(f));return}a(f)},h=l?"You already have Pro":"Upgrade to Pro";return p.jsx(Ka,{open:i,onOpenChange:e,children:p.jsxs(Xa,{className:"sm:max-w-md p-0 overflow-hidden gap-0 border-0",children:[p.jsx("button",{onClick:()=>e(!1),className:"absolute right-3 top-3 z-10 p-1.5 transition-colors","aria-label":"Close",children:p.jsx(tl,{className:"h-4 w-4 text-foreground/70"})}),p.jsxs("div",{className:"p-8 flex flex-col gap-6",children:[p.jsx("h1",{className:"text-2xl font-semibold tracking-tight pr-6",children:r}),p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsxs("div",{className:"flex items-baseline gap-1.5",children:[p.jsx("span",{className:"text-4xl font-bold",children:d}),p.jsx("span",{className:"text-sm text-muted-foreground",children:"/month"})]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:m})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Ja,{checked:s,onCheckedChange:o}),p.jsxs("span",{className:"text-sm",children:["Pay annually, save ",el,"%"]})]}),p.jsx("div",{className:"flex flex-col gap-3",children:Ah.map(y=>p.jsxs("div",{className:"flex items-start gap-2.5 text-sm",children:[p.jsx(rl,{className:"h-4 w-4 shrink-0 mt-0.5 text-green-600"}),p.jsx("span",{className:"text-muted-foreground",children:y})]},y))}),p.jsxs(Pe,{onClick:_,className:"w-full h-11",children:[h,!l&&p.jsx(nl,{className:"h-4 w-4"})]}),p.jsxs("a",{href:"/pricing",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:["View all plans",p.jsx(tc,{className:"h-3 w-3"})]})]})]})})}function Lh(i,e){x.useEffect(()=>{if(!i)return;function t(r){r.clientY>0||r.relatedTarget!==null||e()}return document.addEventListener("mouseleave",t),()=>document.removeEventListener("mouseleave",t)},[i,e])}function Qo({label:i,icon:e,selected:t,showRadio:r,onClick:n}){return p.jsxs("button",{onClick:n,className:Ot("w-full flex items-center gap-3 px-4 py-3 rounded border text-sm text-left transition-colors cursor-pointer",t?"border-neutral-800 bg-neutral-50":"border-neutral-200 bg-white hover:border-neutral-400"),children:[e&&p.jsx("span",{className:"w-6 h-6 flex-shrink-0 flex items-center justify-center",children:e}),p.jsx("span",{className:Ot("flex-1",t&&"font-medium"),children:i}),r&&p.jsx("span",{className:Ot("w-4 h-4 rounded-full border-2 flex-shrink-0 flex items-center justify-center",t?"border-neutral-800":"border-neutral-300"),children:t&&p.jsx("span",{className:"w-2 h-2 rounded-full bg-neutral-800"})})]})}const Mh=[{value:"couldnt_customize_it",label:"Couldn't customise it the way I wanted"},{value:"didnt_understand",label:"Didn't understand how to get started"},{value:"ran_into_bug",label:"Ran into a bug"},{value:"data_issue",label:"Couldn't get my data to work"}];function Fh({open:i,onSubmit:e,onDismiss:t}){function r(s){e(s)}function n(){t()}return p.jsx(Pt,{open:i,onOpenChange:s=>{s||n()},children:p.jsxs(Rt,{showCloseButton:!1,className:"max-w-md p-0 gap-0 overflow-hidden",children:[p.jsxs("div",{className:"px-7 pt-8 pb-6",children:[p.jsx("h2",{className:"text-3xl font-bold leading-tight tracking-tight",children:"Something stopped you?"}),p.jsx("div",{className:"space-y-2 mt-5",children:Mh.map(({value:s,label:o})=>p.jsx(Qo,{label:o,onClick:()=>r(s)},s))})]}),p.jsx("div",{className:"px-7 pb-7",children:p.jsx("button",{onClick:n,className:"w-full text-center text-sm text-neutral-500 hover:text-neutral-800 transition-colors cursor-pointer py-1",children:"Go back"})})]})})}class Bh extends x.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){Oe.error("Something went wrong. Please try again."),il(e,{tags:{context:"react_error_boundary"},contexts:{react:{componentStack:t.componentStack}}}),console.error("[react_error_boundary] Error:",e,t),this.setState({hasError:!1})}render(){return this.props.children}}function Uh({className:i,value:e,...t}){return p.jsx(Tc,{"data-slot":"progress",className:Ot("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",i),...t,children:p.jsx(Ec,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})})}function zh({open:i,progress:e}){return p.jsx(Pt,{open:i,children:p.jsxs(Rt,{className:"sm:max-w-md",showCloseButton:!1,onPointerDownOutside:t=>t.preventDefault(),onEscapeKeyDown:t=>t.preventDefault(),children:[p.jsxs(Nr,{children:[p.jsx(Ir,{children:"Exporting Video"}),p.jsx(Oa,{children:"Please wait while your video is being generated..."})]}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsx(Uh,{value:e,className:"h-3"}),p.jsxs("p",{className:"text-center text-sm font-medium",children:[Math.round(e),"%"]})]})]})})}function Vh({chartType:i,onNewChart:e}){return p.jsx("div",{className:"flex flex-1 min-h-0 items-center justify-center bg-white p-6",children:p.jsx("div",{className:"max-w-md text-center flex flex-col items-center gap-4",children:p.jsxs("p",{className:"text-base text-neutral-700",children:[i," is no longer supported. Please contact [email protected] if you want it added back"]})})})}const $h=[{value:"google",label:"Google",icon:p.jsx("img",{src:"/icons/google.svg",alt:"",className:"w-4 h-4"})},{value:"chatgpt",label:"ChatGPT",icon:p.jsx("img",{src:"/icons/chatgpt.svg",alt:"",className:"w-4 h-4"})},{value:"youtube",label:"YouTube",icon:p.jsx("img",{src:"/icons/youtube.svg",alt:"",className:"w-5 h-5"})},{value:"reddit",label:"Reddit",icon:p.jsx("img",{src:"/icons/reddit.svg",alt:"",className:"w-5 h-5"})}];function Gh({open:i,onComplete:e}){function t(n){e(n)}function r(){e(void 0)}return p.jsx(Pt,{open:i,onOpenChange:n=>{n||r()},children:p.jsxs(Rt,{showCloseButton:!1,className:"max-w-md p-0 gap-0 overflow-hidden",children:[p.jsxs("div",{className:"px-7 pt-8 pb-6",children:[p.jsx("h2",{className:"text-3xl font-bold leading-tight tracking-tight",children:"Where did you hear about us?"}),p.jsx("div",{className:"space-y-2 mt-5",children:$h.map(({value:n,label:s,icon:o})=>p.jsx(Qo,{label:s,icon:o,onClick:()=>t(n)},n))})]}),p.jsx("div",{className:"px-7 pb-7",children:p.jsx("button",{onClick:r,className:"w-full text-center text-sm text-neutral-500 hover:text-neutral-800 transition-colors cursor-pointer py-1",children:"Skip"})})]})})}const ms={"auth/email-already-in-use":"An account with this email already exists.","auth/weak-password":"Password must be at least 6 characters.","auth/invalid-email":"Invalid email address.","auth/user-not-found":"Incorrect email or password.","auth/wrong-password":"Incorrect email or password.","auth/invalid-credential":"Incorrect email or password.","auth/too-many-requests":"Too many attempts. Try again later.","auth/disposable-email":"Temporary or disposable email addresses aren't allowed. Please use a permanent email address to sign up.","auth/popup-closed-by-user":"","auth/cancelled-popup-request":""};function Yh({open:i}){const{signInWithGoogle:e,signInWithEmail:t,signUpWithEmail:r,sendPasswordReset:n}=Kr(),[s,o]=x.useState("signin"),[a,l]=x.useState(""),[c,u]=x.useState(""),[f,d]=x.useState(""),[m,_]=x.useState(!1),[h,y]=x.useState(!1),g=S=>{o(S),d(""),u(""),y(!1)},v=async()=>{d(""),_(!0),await e(),_(!1)},w=async S=>{if(S.preventDefault(),d(""),_(!0),s==="forgot"){const E=await n(a);_(!1),E?d(ms[E]??"Failed to send reset email."):y(!0);return}const T=await(s==="signup"?r:t)(a,c);if(_(!1),T){const E=ms[T]??"Something went wrong. Please try again.";E&&d(E)}};return p.jsx(Pt,{open:i,onOpenChange:()=>{},children:p.jsxs(Rt,{showCloseButton:!1,onInteractOutside:S=>S.preventDefault(),className:"max-w-sm",children:[p.jsx("h2",{className:"text-xl font-semibold",children:s==="signup"?"Create account":s==="forgot"?"Reset password":"Sign in to continue"}),p.jsx("p",{className:"text-sm text-neutral-500",children:s==="signup"?"Free account, no credit card needed.":s==="forgot"?"We'll send a reset link to your email.":"Create a free account to build and export charts."}),p.jsxs("div",{className:"flex flex-col gap-3 mt-1",children:[s!=="forgot"&&p.jsxs(p.Fragment,{children:[p.jsxs(Pe,{variant:"outline",className:"w-full gap-2",onClick:v,disabled:m,children:[m?p.jsx("span",{className:"w-4 h-4 border-2 border-neutral-300 border-t-neutral-800 rounded-full animate-spin"}):p.jsx("img",{src:"/icons/google.svg",className:"w-4 h-4","aria-hidden":!0}),"Continue with Google"]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"flex-1 h-px bg-gray-200"}),p.jsx("span",{className:"text-xs text-gray-400",children:"or"}),p.jsx("div",{className:"flex-1 h-px bg-gray-200"})]})]}),p.jsxs("form",{onSubmit:w,className:"flex flex-col gap-3",children:[p.jsx("input",{type:"email",placeholder:"Email",value:a,onChange:S=>l(S.target.value),required:!0,autoComplete:"email",className:"border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-gray-900 focus:border-transparent"}),s!=="forgot"&&p.jsx("input",{type:"password",placeholder:"Password",value:c,onChange:S=>u(S.target.value),required:!0,autoComplete:s==="signup"?"new-password":"current-password",className:"border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-gray-900 focus:border-transparent"}),f&&p.jsx("p",{className:"text-xs text-red-600",children:f}),h?p.jsx("p",{className:"text-xs text-green-700",children:"Check your email for a reset link."}):p.jsx(Pe,{type:"submit",disabled:m,children:m?"...":s==="signup"?"Create account":s==="forgot"?"Send reset link":"Sign in"})]}),p.jsxs("div",{className:"flex flex-col items-center gap-1 text-xs text-gray-500",children:[s==="signin"&&p.jsxs(p.Fragment,{children:[p.jsx("button",{type:"button",className:"underline hover:text-gray-800",onClick:()=>g("forgot"),children:"Forgot password?"}),p.jsxs("span",{children:["No account?"," ",p.jsx("button",{type:"button",className:"underline hover:text-gray-800",onClick:()=>g("signup"),children:"Sign up free"})]})]}),s==="signup"&&p.jsxs("span",{children:["Already have an account?"," ",p.jsx("button",{type:"button",className:"underline hover:text-gray-800",onClick:()=>g("signin"),children:"Sign in"})]}),s==="forgot"&&p.jsx("button",{type:"button",className:"underline hover:text-gray-800",onClick:()=>g("signin"),children:"Back to sign in"})]})]})]})})}const gs=[{format:"png",label:"PNG",description:"Ideal for slides",icon:cn},{format:"jpeg",label:"JPG",description:"Smaller file size",icon:cn},{format:"png-transparent",label:"PNG",description:"Transparent background",icon:cn},{format:"svg",label:"SVG",description:"Scalable vector, editable",icon:uc},{format:"mp4",label:"MP4",description:"Animated video, 1080p",icon:pc}];function Hh({className:i,...e}){return p.jsx(Rc,{"data-slot":"tabs",className:Ot("flex flex-col gap-2",i
36),...e})}function Wh({className:i,...e}){return p.jsx(Nc,{"data-slot":"tabs-content",className:Ot("flex-1 outline-none",i),...e})}const _s=[{slug:"bar",name:"Column",icon:hl},{slug:"stacked-bar",name:"Stacked",icon:pl},{slug:"stacked-bar-100",name:"100% Stacked",icon:ml},{slug:"grouped-bar",name:"Grouped",icon:gl},{slug:"hbar",name:"Bar",icon:_l},{slug:"stacked-hbar",name:"Stacked",icon:yl},{slug:"stacked-hbar-100",name:"100% Stacked",icon:xl},{slug:"grouped-hbar",name:"Grouped",icon:bl},{slug:"line",name:"Line",icon:vl},{slug:"multi-line",name:"Multi",icon:wl},{slug:"area",name:"Area",icon:Sl},{slug:"stacked-area",name:"Stacked",icon:Tl},{slug:"pie",name:"Pie",icon:El},{slug:"donut",name:"Donut",icon:Cl},{slug:"scatter",name:"Scatter",icon:kl},{slug:"bubble",name:"Bubble",icon:Ol},{slug:"radar",name:"Radar",icon:Pl},{slug:"waffle",name:"Waffle",icon:Rl},{slug:"animated-number",name:"Counter",icon:Nl},{slug:"gauge",name:"Gauge",icon:Il},{slug:"funnel",name:"Funnel",icon:Al},{slug:"treemap",name:"Treemap",icon:jl},{slug:"waterfall",name:"Waterfall",icon:Dl},{slug:"pareto",name:"Pareto",icon:Ll},{slug:"mekko",name:"Mekko",icon:Ml},{slug:"mekko-units",name:"Bar Mekko",icon:Fl},{slug:"heatmap",name:"Heatmap",icon:Bl},{slug:"dumbbell",name:"Dumbbell",icon:Ul},{slug:"gantt",name:"Gantt",icon:zl},{slug:"pictograph",name:"Pictograph",icon:Vl},{slug:"bar-race",name:"Bar Race",icon:$l},{slug:"line-race",name:"Line Race",icon:Gl},{slug:"horizontal-flow",name:"Process Flow",icon:Yl},{slug:"cycle",name:"Cycle",icon:Hl},{slug:"process-funnel",name:"Funnel Diagram",icon:Wl},{slug:"pyramid",name:"Pyramid",icon:ql},{slug:"timeline",name:"Timeline",icon:Kl},{slug:"rising-bars",name:"Stairs",icon:Xl},{slug:"list",name:"List Diagram",icon:Jl}],qh=new Set(["bar","stacked-bar","stacked-bar-100","grouped-bar","hbar","stacked-hbar","stacked-hbar-100","grouped-hbar","line","multi-line","area","stacked-area","pie","donut","waterfall","scatter","bubble","mekko","mekko-units","gantt"]);function Kh({items:i,selectedSlug:e,onSelect:t}){return p.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-4",children:i.map(({slug:r,name:n,icon:s})=>p.jsxs("button",{onClick:()=>t(r),className:`aspect-square flex flex-col items-center justify-center gap-2 rounded hover:shadow transition-shadow cursor-pointer ${r===e?"border-2 border-neutral-900":"border border-neutral-200"}`,children:[p.jsx(s,{className:"w-12 h-12 text-neutral-800"}),p.jsx("span",{className:"text-xs font-medium",children:n})]},r))})}function Xh({items:i,selectedSlug:e,onSelect:t}){return p.jsx("div",{className:"flex flex-wrap gap-1",children:i.map(({slug:r,name:n,icon:s})=>p.jsxs("button",{onClick:()=>t(r),className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded bg-card hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer ${r===e?"border-2 border-neutral-900":"border border-border"}`,children:[p.jsx(s,{className:"w-5 h-5 text-neutral-700 shrink-0"}),p.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:n})]},r))})}x.lazy(()=>Te(()=>import("./TemplateBrowser-6Xr2kv39.js"),[]));const Jh=new Set(["bar-race","line-race"]),ys=!1;function Zh({selectedChartType:i,onSelectChartType:e,onSelectTemplate:t}){const r=_s.filter(s=>qh.has(s.slug)),n=_s.filter(s=>Jh.has(s.slug)||!1);return p.jsx("div",{className:"flex flex-col flex-1 min-h-0 bg-white",children:p.jsxs(Hh,{defaultValue:"new-chart",className:"flex flex-col flex-1 min-h-0",children:[ys,p.jsx(Wh,{value:"new-chart",className:"flex-1 overflow-auto p-6 mt-0",children:p.jsxs("div",{className:"max-w-4xl mx-auto flex flex-col gap-8",children:[p.jsx(Kh,{items:r,selectedSlug:i,onSelect:e}),p.jsx(cl,{type:"single",collapsible:!0,children:p.jsxs(ul,{value:"other-charts",className:"border-b-0",children:[p.jsx(fl,{className:"text-xs font-medium text-muted-foreground px-1 py-2 uppercase tracking-wide hover:no-underline",children:"Other charts"}),p.jsx(dl,{className:"px-1",children:p.jsx(Xh,{items:n,selectedSlug:i,onSelect:e})})]})})]})}),ys]})})}const Qh=x.lazy(()=>Te(()=>import("./Preview-BG5-SLAy.js"),[])),ep=x.lazy(()=>Te(()=>import("./AiStylePanel-C_tQl-t7.js"),[]).then(i=>({default:i.AiStylePanel}))),tp=x.lazy(()=>Te(()=>import("./FilesPicker-BlA-3hgF.js"),[])),Bp=ua(function(){const{clearSelection:e}=me(),t=xs(),[r,n]=fa(),s=da(),o=me(P=>P.setTemplate),a=me(P=>P.clearCurrentFile),l=me(P=>P.setCurrentFile),c=me(P=>
36P.chartType),[u,f]=x.useState("loading"),[d,m]=x.useState(null),[_,h]=x.useState(null),y=Ju(es,Zu),[g,v]=x.useState(null),w=()=>v(null),[S,b]=x.useState(!0),[T,E]=x.useState(!1),k=g==="files",C=g==="chart-type",N=g==="data",I=typeof g=="object"&&g!==null&&g.type==="paywall"?g:null,O=I!==null,R=I?.feature??"video_export",[D,j]=x.useState({isExporting:!1,progress:0}),z=al();Ph();const F=me(P=>P.selectedNodeIds),[L]=x.useState(()=>Lo.timeline({paused:!0,defaults:{ease:"none"}}));x.useEffect(()=>()=>L.kill(),[L]);const V=x.useRef(null),{user:G,onboarded:we,markOnboarded:Se}=Kr(),Lt=Gn(),de=G?we===!1?"onboarding":null:"signin",We=x.useRef(de);We.current=de;const M=x.useRef(!1),B=x.useCallback(()=>{We.current===null?y.start():M.current=!0},[y.start]),Q=P=>{if(Ma(P),G?.email&&P){const[ge,...K]=(G.displayName??"").split(" ");fetch("https://api.sequenzy.com/api/v1/subscribers",{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":"seq_live_PBJKIhBhgxYwQaR5XkdvplK-UVlo_Gay5nIZhoFhM-E"},body:JSON.stringify({email:G.email,firstName:ge||void 0,lastName:K.join(" ")||void 0,tags:[`source_${P}`],enrollInSequences:!0})}).catch(()=>{})}Se()},{canRemoveWatermark:re}=qa(),{saveStatus:ne,saveCount:pe,currentFileName:Y,renameFile:se,currentFileId:X}=kh(),be=me(P=>P.setCurrentFileName),[it,Er]=x.useState(Y),tn=x.useRef(0);x.useEffect(()=>{if(!V.current||!X||pe===0)return;const P=Date.now();if(!(tn.current===0)&&P-tn.current<6e4)return;tn.current=P;const K=me.getState().canvas.backgroundColor??"#ffffff";Te(async()=>{const{captureThumbnail:ie}=await import("./video.client-DQjdDq-n.js");return{captureThumbnail:ie}},[]).then(({captureThumbnail:ie})=>ie(V.current,L,K)).then(async ie=>{if(!ie)return;const Qe=Ia(Fa,`thumbnails/${X}.jpg`);await Aa(Qe,ie,{contentType:"image/jpeg",cacheControl:"public, max-age=31536000"});const Z=await ja(Qe);await En(Ft(Ct,"charts",X),{thumbnailUrl:Z},{merge:!0})}).catch(ie=>console.error("[thumbnail]",ie))},[pe]);const ea=x.useCallback(()=>{Wr?.resetInitialState(),L.play(0)},[L]),ta=x.useCallback(async P=>{const{CHART_DEFAULTS:ge}=await Te(async()=>{const{CHART_DEFAULTS:K}=await import("./chartDefaults-BVH-xQPd.js");return{CHART_DEFAULTS:K}},[]);if(!ge[P]){t(`/templates/${P}`);return}h(P),y.advance("pick-chart-type")},[t,y.advance]),ra=x.useCallback(async()=>{if(!_)return;const{CHART_DEFAULTS:P}=await Te(async()=>{const{CHART_DEFAULTS:K}=await import("./chartDefaults-BVH-xQPd.js");return{CHART_DEFAULTS:K}},[]),ge=P[_];ge&&(m(null),o(ge),X||(a(),be("Untitled")),e(),n({},{replace:!0}),w(),y.advance("confirm-chart-type"))},[_,X,o,a,be,e,n,y.advance]),xi=x.useCallback(()=>{if(!me.getState().chartType){t("/files");return}w()},[t]),na=x.useCallback(async P=>{const{CHART_CLASS_REGISTRY:ge,isSupportedChartType:K}=await Te(async()=>{const{CHART_CLASS_REGISTRY:Qe,isSupportedChartType:Z}=await import("./chartRegistry-D3YxSm07.js").then(J=>J.f);return{CHART_CLASS_REGISTRY:Qe,isSupportedChartType:Z}},[]),ie=ge[P.chartType];if(!ie){Oe.error("Unknown chart type");return}if(!K(P.chartType)){m(P.chartType),e(),w(),f("ready");return}m(null),o({chartClass:ie,data:P.data,metadata:P.metadata,style:P.style,canvas:P.canvas,hooks:P.hooks||{},backgroundImage:P.backgroundImage||null,backgroundImageOpacity:P.backgroundImageOpacity??1,source:P.source||"",isPublic:P.isPublic??!1,dataSourceUrl:P.dataSourceUrl||null,dataSourceFormat:P.dataSourceFormat||null,dataSourceSheetId:P.dataSourceSheetId??null}),l(P.id,P.name),e(),w(),f("ready")},[o,l,e]),rn=x.useCallback(()=>{a(),be("Untitled"),m(null),h(null),v("chart-type"),B()},[a,be,B]),ia=x.useCallback(async P=>{try{const ge=await ln(Ft(Ct,"templates",P));if(ge.exists()){const K=ge.data(),{CHART_CLASS_REGISTRY:ie,isSupportedChartType:Qe}=await Te(async()=>{const{CHART_CLASS_REGISTRY:J,isSupportedChartType:Ie}=await import("./chartRegistry-D3YxSm07.js").then(Fe=>Fe.f);return{CHART_CLASS_REGISTRY:J,isSupportedChartType:Ie}},[]),Z=ie[K.chartType];if(Z){if(!Qe(K.chartType)){m(K.chartType),a(),be("Untitled"),f("ready");return}m(null),o({chartClass:Z,data:K.data,style:K.style,canvas:K.canvas,metadata:K.metadata||[]}),a(),be("Untitled")}}}catch{Oe.error("Failed to load template")}},[o,a,be]),bi=x.useCallback(()=>{const P=it.trim()||"Untitled";Er(P),P!==Y&&(G&&X?se(P):be(P))},[it,Y,G,X,se,be]);x.useEffect(()=>{Er(Y)},[Y]),x.useEffect(()=>{u==="ready"&&r.get("new")==="1"&&(rn(),n({},{replace:!0}))},[r,u,rn,n]),x.useEffect(()=>{let P=!1;async function ge(){if(await new Promise(Z=>{if(me.persist.hasHydrated()){Z();return}const J=me.persist.onFinishHydration(()=>{J(),Z()})}),P)return;const K=Ic(s.state,r);switch(K.type){case"clone":{try{const Z=await ln(Ft(Ct,"charts",K.chartId));
36if(!Z.exists()||!Z.data().isPublic)Oe.error(Z.exists()?"This chart is private":"Chart not found");else{const J=Z.data(),{CHART_CLASS_REGISTRY:Ie}=await Te(async()=>{const{CHART_CLASS_REGISTRY:rr}=await import("./chartRegistry-D3YxSm07.js").then(nr=>nr.f);return{CHART_CLASS_REGISTRY:rr}},[]),Fe=Ie[J.chartType];Fe&&(o({chartClass:Fe,data:J.data||[],metadata:J.metadata||[],style:J.style||{},canvas:J.canvas,backgroundImage:J.backgroundImage||null,backgroundImageOpacity:J.backgroundImageOpacity??1,source:J.source||"",isPublic:!1}),a(),be(J.name?`Copy of ${J.name}`:"Copy of Untitled"))}}catch(Z){Ti(Z,"file_operation"),Oe.error("Failed to clone chart")}break}case"firestoreTemplate":{try{const Z=await ln(Ft(Ct,"templates",K.id));if(Z.exists()&&!P){const J=Z.data(),{CHART_CLASS_REGISTRY:Ie}=await Te(async()=>{const{CHART_CLASS_REGISTRY:rr}=await import("./chartRegistry-D3YxSm07.js").then(nr=>nr.f);return{CHART_CLASS_REGISTRY:rr}},[]),Fe=Ie[J.chartType];Fe&&(o({chartClass:Fe,data:J.data,style:J.style,canvas:J.canvas,metadata:J.metadata||[]}),a())}}catch{}break}case"template":{try{const Z=await ol(K.slug);P||(o(Z),a())}catch{}break}case"chart":{const{CHART_DEFAULTS:Z}=await Te(async()=>{const{CHART_DEFAULTS:Ie}=await import("./chartDefaults-BVH-xQPd.js");return{CHART_DEFAULTS:Ie}},[]),J=Z[K.chartType];J&&(o(J),a());break}case"new":{a(),be("Untitled"),v("chart-type"),B();break}case"generate":{try{const{generateChart:Z}=await Te(async()=>{const{generateChart:Ie}=await import("./api-DZex_AJA.js");return{generateChart:Ie}},[]),J=await Z(K.prompt);P||(o(J),a(),be("Untitled"))}catch{Oe.error("Couldn't generate chart. Try describing it differently.")}break}}if(P)return;K.type!=="restore"&&n({},{replace:!0}),await sl.preloadAllFonts();const{chartType:ie}=me.getState();ie||(v("chart-type"),B());const{isSupportedChartType:Qe}=await Te(async()=>{const{isSupportedChartType:Z}=await import("./chartRegistry-D3YxSm07.js").then(J=>J.f);return{isSupportedChartType:Z}},[]);m(ie&&!Qe(ie)?ie:null),f("ready")}return ge(),()=>{P=!0}},[]),x.useEffect(()=>{de===null&&M.current&&(M.current=!1,y.start())},[de,y.start]);const[sa,nn]=x.useState(!1),vi=x.useRef(!1);Lh(u==="ready"&&de===null&&g===null&&!vi.current,x.useCallback(()=>{vi.current=!0,nn(!0)},[]));const oa=x.useCallback(P=>{Da({reason:P,customization_count:me.temporal.getState().pastStates.length}),nn(!1),Oe.success("Thanks for the feedback")},[]),wi=x.useCallback(async(P,ge=!1)=>{if(!G){Oe.error("Please sign in to export");return}const K=V.current;if(!K){Oe.error("Nothing to export yet");return}const ie=me.getState().canvas.backgroundColor??"#ffffff",{record:Qe,exportImage:Z,exportSvg:J}=await Te(async()=>{const{record:Fe,exportImage:rr,exportSvg:nr}=await import("./video.client-DQjdDq-n.js");return{record:Fe,exportImage:rr,exportSvg:nr}},[]),Ie=!(ge&&re);if(La(P),P==="mp4"){j({isExporting:!0,progress:0});try{await Qe(K,L,ie,Fe=>j({isExporting:!0,progress:Fe}),Ie),Oe.success("Video exported!")}catch(Fe){Ti(Fe,"video_export")}finally{j({isExporting:!1,progress:0})}return}if(P==="png"||P==="jpeg"){await Z(K,L,ie,P,!1,Ie);return}if(P==="png-transparent"){await Z(K,L,ie,"png",!0,Ie);return}if(P==="svg"){await J(K,L,ie,Ie);return}Oe.info("Export coming soon")},[G,L,re]);if(z)return p.jsx("div",{className:"h-screen bg-neutral-950 flex items-center justify-center p-6 text-center",children:p.jsxs("div",{className:"max-w-xs",children:[p.jsx("img",{className:"h-6 mx-auto mb-4",src:"/aecharts_logo.svg"}),p.jsx("p",{className:"text-sm text-neutral-300",children:"The editor needs a bigger screen. Switch to a tablet, laptop, or desktop to continue."})]})});if(u==="loading")return p.jsx("div",{className:"h-screen bg-neutral-100 flex items-center justify-center",children:p.jsx(ir,{className:"animate-spin text-neutral-400 w-8 h-8"})});const tr=!(y.isActive("pick-chart-type")||y.isActive("confirm-chart-type"))||!!X,Si=y.step?es.indexOf(y.step):-1,sn=Si>=0&&de===null,aa=[{target:'[data-tour="pick-chart-type"]',content:p.jsx(Rr,{stepIndex:y.stepIndex??1,totalSteps:y.totalSteps,text:"Click any chart type to select it."}),placement:"left"},{target:'[data-tour="confirm-chart-type"]',content:p.jsx(Rr,{stepIndex:y.stepIndex??1,totalSteps:y.totalSteps,text:"Click Continue to create your chart."}),placement:"left"},{target:'[data-tour="customize"]',content:p.jsx(Rr,{stepIndex:y.stepIndex??1,totalSteps:y.totalSteps,text:"Edit your data on the left â paste it in, type it, or import a CSV/Excel file. Style the chart on the right, or ask AI to do it for you."}),placement:"right"},{target:'[data-tour="download"]',content:p.jsx(Rr,{stepIndex:y.stepIndex??1,totalSteps:y.totalSteps,text:"Click Download to export your chart."}),placement:"left"}];return p.jsx(Bh,{children:p.jsx(ef,{value:y,children:p.jsx(Nh,{onOpen:P=>{Pi("paywall_provider_open",P),v({type:"paywall",feature:P})},children:p.jsxs("div",{className:"h-screen bg-neutral-200 overflow-hidden flex flex-col",translate:"no",onClick:()=>{F?.length&&e()},children:[p.jsxs("div",{className:"shrink-0 px-2 z-10 flex items-stretch w-full h-12 bg-neutral-50 border-b border-neutral-200",children:[p.jsx("div",{className:"flex flex-col justify-center self-stretch px-2",children:p.jsxs("div",{className:"flex items-center leading-none",children:[p.jsx(_a,{value:it,onChange:P=>Er(P.target.value),onBlur:bi,onKeyDown:P=>{P.key==="Enter"?bi():P.key==="Escape"&&Er(Y)},size:Math.max(8,Math.min(it.length||8,32)),className:"h-6 w-auto min-w-[8ch] max-w-[32ch] text-sm font-semibold leading-none text-neutral-900 shadow-none border-none px-1 py-1 rounded bg-transparent hover:bg-neutral-200 focus:bg-neutral-200 selection:bg-neutral-300 selection:text-neutral-900"}),G?p.jsx("span",{className:"text-xs leading-none text-neutral-500",children:ne==="saving"?"saving...":"saved"}):p.jsx("button",{onClick:()=>Lt("signin"),className:"text-xs leading-none text-neutral-500 hover:text-neutral-700",children:"Sign in to save"})]})}),p.jsxs("div",{className:"ml-auto flex items-center gap-2 pr-2",children:[!1,!d&&p.jsxs("div",{className:"flex items-stretch gap-1.5",children:[p.jsxs(Pe,{"data-tour":"download",variant:"default",size:"sm",className:"text-xs cursor-pointer",onClick:()=>{y.advance("download"),wi(gs[0].format,re)},children:[p.jsx(Zl,{className:"w-3.5 h-3.5"}),"Download"]}),p.jsxs(Ta,{children:[p.jsx(Ea,{asChild:!0,children:p.jsx(Pe,{variant:"default",size:"sm",className:"cursor-pointer !px-1.5","aria-label":"More export formats",children:p.jsx(Ql,{className:"w-3.5 h-3.5"})})}),p.jsxs(Ca,{align:"end",className:"w-56",children:[gs.map(({format:P,label:ge,description:K,icon:ie})=>p.jsxs(Oi,{onClick:()=>wi(P,re),className:"gap-2",children:[p.jsx(ie,{className:"h-4 w-4 text-neutral-500"}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-sm",children:ge}),p.jsx("span",{className:"text-xs text-neutral-400",children:K})]})]},P)),!re&&p.jsxs(p.Fragment,{children:[p.jsx(ka,{}),p.jsxs(Oi,{onClick:()=>{Pi("watermark_cta","watermark"),v({type:"paywall",feature:"watermark"})},className:"gap-2",children:[p.jsx(dc,{className:"h-4 w-4 text-yellow-500"}),p.jsx("span",{className:"text-sm",children:"Download without watermark"})]})]})]})]})]})]})]}),p.jsx(Pt,{open:k,onOpenChange:P=>!P&&w(),children:p.jsxs(Rt,{className:"w-[95vw] max-w-[95vw] sm:max-w-[95vw] h-[85vh] flex flex-col",children:[p.jsx(Nr,{children:p.jsx(Ir,{children:"Open File"})}),p.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:p.jsx(x.Suspense,{fallback:p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx(ir,{className:"animate-spin text-gray-400"})}),children:p.jsx(tp,{onOpenFile:na})})})]})}),p.jsx(Pt,{open:N,onOpenChange:P=>!P&&w(),children:p.jsxs(Rt,{className:"w-[95vw] max-w-[95vw] sm:max-w-[95vw] h-[85vh] flex flex-col",children:[p.jsx(Nr,{children:p.jsx(Ir,{children:"Edit Data"})}),p.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:p.jsx(x.Suspense,{fallback:p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx(ir,{className:"animate-spin text-gray-400"})}),children:p.jsx(ps,{})})})]})}),p.jsx(Pt,{open:C,onOpenChange:P=>{!P&&tr&&xi()},children:p.jsxs(Rt,{className:"sm:max-w-4xl h-[80vh] flex flex-col",showCloseButton:tr,onEscapeKeyDown:P=>{tr||P.preventDefault()},onPointerDownOutside:P=>{tr||P.preventDefault()},children:[p.jsx(Nr,{children:p.jsx(Ir,{children:"Chart type"})}),p.jsx("div",{"data-tour":"pick-chart-type",className:"flex-1 min-h-0 overflow-auto",children:p.jsx(Zh,{selectedChartType:_,onSelectChartType:ta,onSelectTemplate:ia})}),p.jsxs(Pa,{children:[tr&&p.jsx(Pe,{variant:"outline",onClick:xi,className:"cursor-pointer",children:"Cancel"}),p.jsx(Pe,{"data-tour":"confirm-chart-type",disabled:!_,onClick:ra,className:"cursor-pointer",children:"Continue"})]})]})}),p.jsx("div",{className:"flex flex-col flex-1 min-h-0 bg-white",children:p.jsx("div",{className:"flex flex-col flex-1 min-h-0",children:d?p.jsx(Vh,{
36chartType:d,onNewChart:rn}):p.jsx(p.Fragment,{children:p.jsx("div",{className:"flex flex-1 min-h-0 overflow-hidden",onClickCapture:()=>y.advance("customize"),children:p.jsxs("div",{className:"relative flex flex-col flex-1 items-center h-full bg-neutral-200",children:[p.jsx("style",{children:` 37 @keyframes pipIn { 38 from { opacity: 0; transform: scale(0.95) translateY(4px); } 39 to { opacity: 1; transform: scale(1) translateY(0); } 40 } 41 `}),p.jsx("div",{className:"flex flex-1 w-full min-h-0",children:p.jsx("div",{className:"flex flex-1 min-w-0 min-h-0",children:p.jsx(x.Suspense,{fallback:p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx(ir,{className:"animate-spin text-gray-400"})}),children:p.jsx(Qh,{tl:L,svgRef:V,onPlay:ea,onToggleData:()=>b(P=>!P),dataVisible:S,onToggleOptions:()=>E(P=>!P),optionsVisible:T,dataPanelWidth:S?340:0,dataPanel:S?p.jsx("div",{"data-tour":"customize",className:"flex flex-col w-[340px] h-full overflow-hidden border bg-white",children:p.jsx(x.Suspense,{fallback:p.jsx("div",{className:"flex items-center justify-center w-full py-10",children:p.jsx(ir,{className:"animate-spin text-gray-400"})}),children:p.jsx(ps,{compact:!0,onExpand:()=>v("data")})})}):void 0,optionsPanel:p.jsx(Ch,{}),aiPanel:c==="GanttChart"?void 0:p.jsx(x.Suspense,{fallback:null,children:p.jsx(ep,{})})})})})})]})})})})}),p.jsx(uh,{steps:sn?aa:[],run:sn,stepIndex:sn?Si:0,options:{buttons:[],showProgress:!1,overlayClickAction:!1,dismissKeyAction:!1,blockTargetInteraction:!1,skipBeacon:!0}}),p.jsx(Dh,{open:O,onOpenChange:P=>!P&&w(),feature:R}),p.jsx(zh,{open:D.isExporting,progress:D.progress}),p.jsx(Yh,{open:de==="signin"}),p.jsx(Gh,{open:de==="onboarding",onComplete:Q}),p.jsx(Fh,{open:sa,onSubmit:oa,onDismiss:()=>nn(!1)})]})})})})});export{Dh as P,Wr as c,Bp as e,Fp as s};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.