!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3dbd8479-089e-4f51-a14a-bf32e66edd12",e._sentryDebugIdIdentifier="sentry-dbid-3dbd8479-089e-4f51-a14a-bf32e66edd12")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2795],{2704:(e,t,s)=>{"use strict";s.d(t,{$:()=>u,k:()=>d});var r=s(95155),a=s(40980),l=s(70872),n=s(6628),i=s(67317);let d={sm:"sm",xs:"xs"},o={sm:"px-2 type-label",xs:"px-2.5 type-eyebrow"},c={2:"@min-[15rem]:grid-cols-2 @min-[15rem]:divide-x @min-[15rem]:divide-y-0",3:"@min-[16.5rem]:grid-cols-3 @min-[16.5rem]:divide-x @min-[16.5rem]:divide-y-0",4:"@min-[22rem]:grid-cols-4 @min-[22rem]:divide-x @min-[22rem]:divide-y-0"},p={2:"@min-[24rem]:grid-cols-2 @min-[24rem]:divide-x @min-[24rem]:divide-y-0"};function u(e){let{value:t,onChange:s,options:u,testId:m,long:f=!1,size:x="sm",inline:h=!1,tone:y="default",tipSide:b,disabled:g=!1,className:_}=e,E="warn"===y,v=(0,r.jsx)("div",{role:"group",className:(0,a.cn)("border",E?"divide-ds-accent border-ds-accent":"divide-ds-border-strong border-ds-border-strong",h?(0,a.cn)("inline-flex divide-x",_):(0,a.cn)("grid grid-cols-1 divide-y",f&&p[u.length]||c[u.length]||c[4])),children:u.map(e=>{let c=e.value===t,p=(0,r.jsxs)("button",{type:"button","aria-pressed":c,"aria-label":e.ariaLabel,disabled:g,"data-testid":m?`${m}-${e.value}`:void 0,onClick:()=>s(e.value),className:(0,a.cn)("ds-press flex min-w-0 items-center justify-center gap-2 transition-colors disabled:cursor-not-allowed disabled:opacity-50",n.u8[d[x]],o[x],"focus-visible:outline-1 focus-visible:-outline-offset-4 focus-visible:outline-ds-accent",c?E?"border-ds-accent bg-ds-accent text-ds-fg-on-accent":i.E3:"text-ds-muted hover:text-ds-fg"),children:[(0,r.jsx)("span",{className:"truncate",children:e.label}),null!=e.aside&&(0,r.jsx)("span",{className:(0,a.cn)("shrink-0 type-mono-xs",!c&&"text-ds-accent"),children:e.aside})]},e.value);return e.tip?(0,r.jsx)(l.SimpleTooltip,{content:e.tip,side:b,children:p},e.value):p})});return h?v:(0,r.jsx)("div",{className:(0,a.cn)("@container",_),children:v})}},6628:(e,t,s)=>{"use strict";s.d(t,{C8:()=>r,fX:()=>a,u8:()=>n,vh:()=>l});let r={xs:"h-8",sm:"h-10",body:"h-12",default:"h-[58px]",cta:"h-[69px]"},a={xs:32,sm:40,body:48,default:58,cta:69},l={xs:"min-h-8",sm:"min-h-10",body:"min-h-12",default:"min-h-[58px]",cta:"min-h-[69px]"},n={xs:"h-[30px]",sm:"h-[38px]",body:"h-[46px]",default:"h-[56px]",cta:"h-[67px]"}},15250:(e,t,s)=>{"use strict";s.d(t,{EA:()=>d,dL:()=>c,ke:()=>p,rr:()=>o,y$:()=>i});var r=s(95155);s(12115);var a=s(40980);let l={sm:"size-4 border-2",md:"size-5 border-2",lg:"size-8 border-[3px]",xl:"size-12 border-4"},n={default:"border-ds-border-strong border-t-ds-accent",onAccent:"border-ds-fg-on-accent/30 border-t-ds-fg-on-accent"};function i(e){let{size:t="md",tone:s="default",label:i,className:d}=e;return(0,r.jsx)("span",{role:i?"status":void 0,"aria-label":i,"aria-hidden":!i||void 0,className:(0,a.cn)("inline-block shrink-0 animate-spin rounded-full",n[s],l[t],d)})}function d(e){let{className:t,ground:s="bg",inline:l=!1,...n}=e;return(0,r.jsx)(l?"span":"div",{"aria-hidden":!0,"data-skeleton":"",className:(0,a.cn)("animate-pulse rounded-none",l&&"inline-block align-middle","surface"===s?"bg-ds-bg":"bg-ds-surface",t),...n})}function o(e){let{lines:t=3,className:s}=e;return(0,r.jsx)("div",{className:(0,a.cn)("flex flex-col gap-2",s),children:Array.from({length:t},(e,s)=>(0,r.jsx)(d,{className:(0,a.cn)("h-4",s===t-1&&t>1&&"w-2/3")},s))})}function c(e){let{children:t,ground:s="bg"}=e;return(0,r.jsx)("span",{"aria-hidden":!0,"data-skeleton":"",className:(0,a.cn)("animate-pulse select-none text-transparent","surface"===s?"bg-ds-bg":"bg-ds-surface"),children:t})}function p(e){let{value:t,label:s,size:l="md",className:n}=e,i="number"==typeof t?Math.max(0,Math.min(100,t)):void 0;return(0,r.jsx)("div",{role:"progressbar","aria-label":s,"aria-valuenow":i,"aria-valuemin":void 0===i?void 0:0,"aria-valuemax":void 0===i?void 0:100,className:(0,a.cn)("w-full overflow-hidden rounded-none border border-ds-border-strong bg-ds-surface","sm"===l?"h-1.5":"h-3",n),children:void 0===i?(0,r.jsx)("div",{className:"h-full w-1/3 animate-pulse bg-ds-accent"}):(0,r.jsx)("div",{className:"h-full bg-ds-accent transition-[width] duration-ds-move ease-ds-enter",style:{width:`${i}%`}})})}},16357:(e,t,s)=>{"use strict";function r(e,t){let s=e?.response?.data?.error;return"string"==typeof s&&""!==s.trim()?s:t}function a(e){let t=e?.response?.data?.code;return"string"==typeof t&&""!==t?t:null}s.d(t,{Q:()=>r,g:()=>a})},16984:(e,t,s)=>{"use strict";s.d(t,{J:()=>a});var r=s(12115);function a(e){let[t,s]=(0,r.useState)(!1),[a,l]=(0,r.useState)({}),n=(0,r.useRef)(new Map),i=(0,r.useId)(),d=(0,r.useCallback)(e=>`${i}-${String(e)}-error`,[i]),o=(0,r.useCallback)(e=>{l(t=>t[e]?{...t,[e]:void 0}:t)},[]);return{field:(s,r)=>({ref:e=>{e?n.current.set(s,e):n.current.delete(s)},"aria-invalid":!!a[s]||void 0,"aria-describedby":a[s]?d(s):void 0,onInput:()=>o(s),onBlur:()=>{if(!t)return;let a=e[s](r);a&&l(e=>({...e,[s]:a}))}}),submit:t=>{s(!0);let r={},a=null;for(let s of Object.keys(e)){let l=e[s](t[s]);l&&(r[s]=l,a??=s)}if(l(r),null===a)return!0;for(let e of Object.keys(r))!function(e){if(!e)return;let t=e.closest("[data-field]")??e;t.classList.remove("ds-field-nudge"),t.offsetWidth,t.classList.add("ds-field-nudge")}(n.current.get(e));return n.current.get(a)?.focus(),!1},clear:o,reset:(0,r.useCallback)(()=>{s(!1),l({})},[]),errorId:d,error:e=>a[e]??null}}},18460:(e,t,s)=>{"use strict";s.d(t,{F:()=>n});var r=s(29722);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=r.$,n=(e,t)=>s=>{var r;if((null==t?void 0:t.variants)==null)return l(e,null==s?void 0:s.class,null==s?void 0:s.className);let{variants:n,defaultVariants:i}=t,d=Object.keys(n).map(e=>{let t=null==s?void 0:s[e],r=null==i?void 0:i[e];if(null===t)return null;let l=a(t)||a(r);return n[e][l]}),o=s&&Object.entries(s).reduce((e,t)=>{let[s,r]=t;return void 0===r||(e[s]=r),e},{});return l(e,d,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:s,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,s]=e;return Array.isArray(s)?s.includes({...i,...o}[t]):({...i,...o})[t]===s})?[...e,s,r]:e},[]),null==s?void 0:s.class,null==s?void 0:s.className)}},23900:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>et});var r=s(95155),a=s(12115),l=s(73321),n=s(94170),i=s(78269),d=s(50910),o=s(32985),c=s(10870),p=s(16357),u=s(34193),m=s(72539),f=s(89239),x=s(45160),h=s(32777),y=s(76465),b=s(2704),g=s(16984),_=s(40980),E=s(29543),v=s(32382),N=s(54932),j=s(44371),w=s(40016),A=s(90975),k=s(82551),C=s(66599),S=s(74753),R=s(61227),L=s(25768);let T={repertoire_builder:{group:"analysis",row:"repertoire"},repertoire_limit:{group:"analysis",row:"repertoire"},course_training:{group:"analysis",row:"courseTraining"},video_export:{group:"video",row:"hideWatermark"},analysis_settings:{group:"analysis",row:"serverAnalysis"},game_puzzles:{group:"coach",row:"gamePuzzles"},move_preview:{group:"analysis",row:"movePreview"},insights_study_moments:{group:"analysis",row:"studyMoments"},insights_opening_mistakes:{group:"analysis",row:"openingMistakes"},insights_repertoire:{group:"analysis",row:"repertoire"},coach_teaser:{group:"coach",row:"coachPlan"},insights_plan:{group:"coach",row:"coachPlan"},mistakes:{group:"coach",row:"mistakes"},woodpecker_source:{group:"coach",row:"woodpecker"},woodpecker_sets:{group:"coach",row:"woodpecker"}},D=[{groupKey:"analysis",rows:[{key:"stockfish",free:!0,premium:!0},{key:"serverAnalysis",free:!1,premium:!0},{key:"browserDepth",free:!1,premium:!0},{key:"movePreview",free:!1,premium:!0},{key:"autoImport",free:!1,premium:!0},{key:"autoAnalyze",free:!1,premium:!0},{key:"studyMoments",free:!1,premium:!0},{key:"openingMistakes",free:!1,premium:!0},{key:"repertoire",free:!1,premium:!0},{key:"courseTraining",free:!1,premium:!0}]},{groupKey:"coach",rows:[{key:"mistakes",free:!1,premium:!0},{key:"gamePuzzles",free:!1,premium:!0},{key:"woodpecker",free:!1,premium:!0},{key:"coachPlan",free:!1,premium:!0},{key:"coachDrill",free:!1,premium:!0},{key:"coachReview",free:!1,premium:!0}]},{groupKey:"video",rows:[{key:"videoDownload",free:!0,premium:!0},{key:"videoFormats",free:!0,premium:!0},{key:"hideWatermark",free:!1,premium:!0},{key:"effects",free:!1,premium:!0},{key:"posterEndings",free:!1,premium:!0},{key:"webcam",free:!1,premium:!0},{key:"customWatermark",free:!1,premium:!0},{key:"timelineModes",free:!1,premium:!0}]},{groupKey:"extras",rows:[{key:"prioritySupport",free:!1,premium:!0}]}],P=[{id:"repertoire",preview:"repertoire"},{id:"analysis",preview:"analysis"},{id:"coach",preview:"coach"},{id:"video",preview:"video"}],I=[{key:"openings",value:null},{key:"repertoires",value:"50"},{key:"analysis",value:"22"}],O=["refund","cancel","data","payment","currency"],M=["cancel","data","payment","currency"];var Y=s(67423),G=s(87746),U=s(81477);function $(e){let{children:t,caption:s}=e;return(0,r.jsxs)("div",{className:"border border-ds-border bg-ds-bg",children:[(0,r.jsx)("div",{className:"p-4",children:t}),(0,r.jsx)("p",{className:"border-t border-ds-border px-4 py-3 type-ds-body-xs leading-relaxed text-ds-muted",children:s})]})}let H=[[7,5],[4,2]],z={repertoire:function(){let e=(0,d.c)("upgrade"),t=(0,i.Ym)(),s=[{num:"1.",san:"e4",depth:0,mine:!0,sub:""},{san:"c5",depth:1,mine:!1,sub:"41%"},{num:"2.",san:"Nf3",depth:2,mine:!0,sub:e("tools.repertoire.preview.mine")},{san:"d6",depth:3,mine:!1,sub:"52%"},{san:"e6",depth:3,mine:!1,sub:"31%"},{san:"Nc6",depth:3,mine:!1,sub:"17%"}];return(0,r.jsxs)($,{caption:e("tools.repertoire.preview.caption"),children:[(0,r.jsx)("div",{className:"flex flex-col",children:s.map((e,s)=>(0,r.jsxs)("div",{className:"flex items-center gap-2.5 py-1.5",style:{paddingLeft:20*e.depth},children:[e.depth>0&&(0,r.jsx)("span",{className:"h-px w-3 shrink-0 bg-ds-border"}),(0,r.jsxs)("span",{className:e.mine?"bg-ds-accent px-1.5 py-0.5 font-ds-mono type-ds-body-xs type-strong text-ds-fg-on-accent":"font-ds-mono type-ds-body-xs text-ds-fg",children:[e.num?`${e.num} `:"",(0,G.i8)(e.san,t)]}),e.sub&&(0,r.jsx)("span",{className:"type-eyebrow-dense text-ds-muted-strong",children:e.sub})]},s))}),(0,r.jsxs)("div",{className:"mt-3 flex gap-4 border-t border-ds-border pt-3",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)("p",{className:"type-eyebrow-dense text-ds-muted-strong",children:e("tools.repertoire.preview.free")})}),(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)("p",{className:"type-eyebrow-dense text-ds-accent",children:e("tools.repertoire.preview.pro")})})]})]})},analysis:function(){let e=(0,d.c)("upgrade"),t=(0,i.Ym)(),s=[{label:e("tools.analysis.preview.free"),depth:"15",w:46,ev:"+0.4",line:"Nf3 Bd6 c4",dim:!0},{label:e("tools.analysis.preview.pro"),depth:"22",w:100,ev:"−1.8",line:"Nxe5!",dim:!1}];return(0,r.jsx)($,{caption:e("tools.analysis.preview.caption"),children:(0,r.jsx)("div",{className:"flex flex-col gap-3.5",children:s.map(s=>{let a;return(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,r.jsx)("span",{className:`type-eyebrow-dense ${s.dim?"text-ds-muted-strong":"text-ds-fg"}`,children:s.label}),(0,r.jsx)("span",{className:`font-ds-mono type-ds-body-xs type-strong tabular-nums ${s.dim?"text-ds-muted-strong":"text-ds-accent"}`,children:s.ev})]}),(0,r.jsx)("div",{className:"h-1.5 bg-ds-surface",children:(0,r.jsx)("div",{className:`h-full ${s.dim?"bg-ds-muted-strong":"bg-ds-accent"}`,style:{width:`${s.w}%`}})}),(0,r.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,r.jsx)("span",{className:`font-ds-mono type-ds-body-xs tabular-nums ${s.dim?"text-ds-muted-strong":"text-ds-muted"}`,children:(a=s.line,a.split(" ").map(e=>(0,G.i8)(e,t)).join(" "))}),(0,r.jsxs)("span",{className:"type-eyebrow-dense text-ds-muted-strong",children:[e("tools.analysis.preview.depth")," ",s.depth]})]})]},s.depth)})})})},coach:function(){let e=(0,d.c)("upgrade"),t=(0,i.Ym)();return(0,r.jsxs)($,{caption:e("tools.coach.preview.caption"),children:[(0,r.jsxs)(U.Zp,{className:"p-3",children:[(0,r.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,r.jsx)("span",{className:"type-eyebrow-dense text-ds-muted-strong",children:e("tools.coach.preview.game")}),(0,r.jsx)("span",{className:"font-ds-mono type-ds-body-xs type-strong tabular-nums text-ds-accent",children:"−2.1"})]}),(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap items-baseline gap-x-2 gap-y-1",children:[(0,r.jsxs)("span",{className:"font-ds-mono type-ds-body-xs text-ds-muted-strong line-through",children:[(0,G.i8)("Bxh3",t),"?"]}),(0,r.jsx)("span",{className:"type-eyebrow-dense text-ds-muted-strong",children:e("tools.coach.preview.better")}),(0,r.jsx)("span",{className:"bg-ds-accent px-1.5 py-0.5 font-ds-mono type-ds-body-xs type-strong text-ds-fg-on-accent",children:(0,G.i8)("Ne5",t)})]}),(0,r.jsxs)("div",{className:"mt-2.5 flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"type-eyebrow-dense text-ds-muted-strong",children:e("tools.coach.preview.repeat")}),(0,r.jsxs)("span",{className:"inline-flex text-ds-accent",children:[(0,r.jsx)(L.T,{mark:"dot"}),(0,r.jsx)(L.T,{mark:"dot"})]}),(0,r.jsxs)("span",{className:"inline-flex text-ds-border-strong",children:[(0,r.jsx)(L.T,{mark:"ring"}),(0,r.jsx)(L.T,{mark:"ring"}),(0,r.jsx)(L.T,{mark:"ring"})]})]})]}),(0,r.jsx)("div",{className:"mt-3 flex gap-3",children:[{n:"12",label:e("tools.coach.preview.mistakes")},{n:"8",label:e("tools.coach.preview.puzzles")}].map(e=>(0,r.jsxs)(U.Zp,{className:"flex-1 p-3",children:[(0,r.jsx)("p",{className:"ds-display text-[24px] leading-none tabular-nums text-ds-fg",children:e.n}),(0,r.jsx)("p",{className:"mt-1.5 type-ds-body-xs leading-tight text-ds-muted",children:e.label})]},e.label))})]})},video:function(){let e=(0,d.c)("upgrade"),t=(e,t)=>(0,r.jsx)("div",{className:"flex flex-1 flex-col gap-2",children:(0,r.jsxs)("div",{className:`relative overflow-hidden border ${t?"border-ds-accent":"border-ds-border"}`,style:{aspectRatio:"9 / 16"},children:[(0,r.jsx)("div",{className:"absolute inset-0",style:{background:"repeating-linear-gradient(135deg, var(--ds-surface) 0 6px, var(--ds-bg) 6px 12px)"}}),(0,r.jsx)("div",{className:"absolute inset-x-[12%] top-[22%]",children:(0,r.jsx)(Y.MiniBoard,{fen:"r1bqkbnr/pppp1ppp/2n5/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R",highlights:H})}),(0,r.jsx)("div",{className:`absolute inset-x-0 bottom-0 border-t border-ds-border bg-ds-bg py-1.5 text-center type-eyebrow-dense ${t?"text-ds-accent":"text-ds-muted-strong"}`,children:e})]})});return(0,r.jsx)($,{caption:e("tools.video.preview.caption"),children:(0,r.jsxs)("div",{className:"flex gap-3",children:[t(e("tools.video.preview.free"),!1),t(e("tools.video.preview.pro"),!0)]})})}};var K=s(75796);let F="robokassa-frame-script";async function B(e,t){await new Promise((e,t)=>{if(window.Robokassa)return void e();let s=()=>t(Error("Failed to load the Robokassa frame")),r=document.getElementById(F);if(r){r.addEventListener("load",()=>e()),r.addEventListener("error",s);return}let a=document.createElement("script");a.id=F,a.src="https://auth.robokassa.ru/Merchant/bundle/robokassa_iframe.js",a.async=!0,a.onload=()=>e(),a.onerror=()=>{a.remove(),s()},document.body.appendChild(a)});let s=window.Robokassa;if(!s?.Render)throw Error("Robokassa frame unavailable");s.Render(function(e){let t={};for(let s of e.fields)t[s.name]=s.value;let s=t.PaymentMethods?[t.PaymentMethods]:void 0;return t.Settings=JSON.stringify({PaymentMethods:s,Mode:"modal"}),t}(e),null,{onComplete:e=>t(e.status)})}var V=s(60529);async function W(e,t){await new Promise((e,t)=>{if(window.cp)return void e();let s=document.getElementById("cp-widget-script");if(s){s.addEventListener("load",()=>e()),s.addEventListener("error",()=>t(Error("Failed to load payment widget")));return}let r=document.createElement("script");r.id="cp-widget-script",r.src="https://widget.cloudpayments.ru/bundles/cloudpayments.js",r.async=!0,r.onload=()=>e(),r.onerror=()=>t(Error("Failed to load payment widget")),document.body.appendChild(r)});let s=window.cp;if(!s?.CloudPayments)throw Error("Payment widget unavailable");let r={plan:e.plan},a={};e.recurrent&&(a.recurrent=e.recurrent),e.receipt&&(a.customerReceipt=e.receipt),Object.keys(a).length>0&&(r.cloudPayments=a),new s.CloudPayments({language:"ru-RU"}).pay("charge",{publicId:e.public_id,description:e.description,amount:e.amount,currency:e.currency,accountId:e.account_id,invoiceId:e.invoice_id,email:e.email||void 0,skin:"modern",data:r},{onSuccess:()=>t.onSuccess(),onFail:e=>t.onFail(e),onComplete:()=>t.onComplete?.()})}function Z(e){let t=document.createElement("form");for(let s of(t.method=e.method,t.action=e.action_url,t.hidden=!0,e.fields)){let e=document.createElement("input");e.type="hidden",e.name=s.name,e.value=s.value,t.appendChild(e)}document.body.appendChild(t),t.submit()}function q(){let e=(0,n.rd)(),t=(0,l.useSearchParams)(),s=(0,i.Ym)(),Y=(0,d.c)("upgrade"),G=(0,d.c)("common"),{user:$,isAuthenticated:H,isLoading:F}=(0,o.As)(),q="ru"===s,J=(0,K.oD)($),[Q,ee]=(0,a.useState)("monthly"),[et,es]=(0,a.useState)(!1),[er,ea]=(0,a.useState)(""),[el,en]=(0,a.useState)(!1),[ei,ed]=(0,a.useState)(""),eo=(0,g.J)({email:e=>H?null:e.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim())?null:Y("checkoutEmail.invalid"):Y("checkoutEmail.required"),consent:e=>e?null:Y("consent.required")}),ec=e=>{eo.submit({email:ei,consent:el})&&eJ(e)},[ep,eu]=(0,a.useState)(null),[em,ef]=(0,a.useState)(!1),[ex,eh]=(0,a.useState)(null),[ey,eb]=(0,a.useState)(null),[eg,e_]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=!0;return(0,N.J)().then(async t=>{if(e){eh(t);try{let s=await c.uE.getInternationalRail(t);e&&eb(s)}catch{e&&eb({rail:"lavatop",switch:"lavatop",robokassa:null})}}}),()=>{e=!1}},[eg]),(0,a.useEffect)(()=>{let e=!0;return(0,A.xm)().then(t=>{e&&eu(t)}).catch(()=>{}),()=>{e=!1}},[]);let[eE,ev]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!J)return;let e=!0;return c.uE.getSubscriptionStatus().then(t=>{e&&ev(t)}).catch(()=>{}),()=>{e=!1}},[J]);let eN=(0,K.VF)(eE),ej=eE?.billing_period==="lifetime",ew=ey?.rail??null,eA=J&&eN&&"robokassa"===ew,ek=(0,j.LN)(q,ew??"lavatop"),eC=eA?null:(0,j.Xm)({isRu:q,country:ex,internationalEnabled:v.VK,foreignRail:ew}),eS=eA?"robokassa":em&&eC?eC:ek,eR="cloudpayments"===eS,eL=!eR&&null===ey,eT=eR&&!eA&&!!ep?.lifetime,{offer:eD,remainingMs:eP}=(0,C.K)(ep,eS),[eI,eO]=(0,a.useState)(!1),eM=(0,S.WJ)(eD)&&!eI,eY="robokassa"===eS?ey?.robokassa?.prices_rub??null:null,eG="lavatop"!==eS||v._U,eU=!eR&&!v.VK,e$="yearly"===Q?"yearly":"monthly",eH=eC?em?ek:eC:null,ez=eH?(0,j.Po)(eH,e$):null,eK=(0,a.useRef)(null);(0,a.useEffect)(()=>{eH&&eK.current!==eH&&(eK.current=eH,(0,u.sx)(u.oA.ALT_RAIL_SHOWN,{rail:eH}))},[eH]);let eF=t?.get("source")||"direct",eB=T[eF]??null,[eV,eW]=(0,a.useState)(0),[eZ,eq]=(0,a.useState)(0);(0,a.useEffect)(()=>{if(J)return;let e=!0;return c.uE.listCourses().then(t=>{e&&(eq(t.length),eW(t.filter(e=>!e.is_free).length))}).catch(()=>{}),()=>{e=!1}},[J]);let eX=eB?[...D.filter(e=>e.groupKey===eB.group),...D.filter(e=>e.groupKey!==eB.group)]:D;(0,a.useEffect)(()=>{(0,u.sx)(u.oA.UPGRADE_PAGE_VIEWED,{source:t?.get("source")||"direct",plan_from_url:t?.get("plan")||void 0})},[t]),(0,a.useEffect)(()=>{let e=t?.get("plan"),s=eG?["monthly","yearly"]:["monthly"];eT&&s.push("lifetime"),e&&s.includes(e)&&(ee(e),en(!1))},[t,eG,eT]),(0,a.useEffect)(()=>{"lifetime"===Q&&!eT&&ep&&(ee("monthly"),en(!1))},[Q,eT,ep]);let eJ=async t=>{if(eU||eL||"robokassa"===eS&&!eY||"lifetime"===Q&&"cloudpayments"!==eS||!el)return;let r=H?void 0:ei.trim().toLowerCase();if(!H){if(!r||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r))return void ea(Y("checkoutEmail.invalid"));try{sessionStorage.setItem("checkout_email",r)}catch{}}es(!0),ea(""),(0,u.sx)(u.oA.PAYMENT_INITIATED,{plan:Q,is_authenticated:H,rail:eS,provider:t??"default",offer:eM?"welcome":"none"});try{if("cloudpayments"===eS){let t=await c.uE.createCloudPaymentsPayment(Q,s,r),a=e5(Q);if(null!==a&&100*t.amount!==a){(0,u.sx)(u.oA.PAYMENT_ERROR,{plan:Q,rail:eS,error:"price_changed"}),100*t.amount>a&&eO(!0),en(!1),ea(Y("welcome.priceChanged",{price:e0(100*t.amount,"RUB")})),es(!1);return}(0,u.sx)(u.oA.PAYMENT_REDIRECT,{plan:Q,rail:eS}),await W(t,{onSuccess:()=>e.push("/payment/success"),onFail:e=>{(0,u.sx)(u.oA.PAYMENT_ERROR,{plan:Q,rail:eS,error:e||"cloudpayments_failed"}),ea(e||Y("paymentFailed")),es(!1)},onComplete:()=>es(!1)});return}if("robokassa"===eS){let t=await c.uE.createRobokassaPayment(e$,{locale:s,email:r});if((0,u.sx)(u.oA.PAYMENT_REDIRECT,{plan:Q,rail:eS}),!t.in_page)return void Z(t);try{await B(t,t=>{"success"===t?e.push("/payment/success"):("fail"===t&&((0,u.sx)(u.oA.PAYMENT_ERROR,{plan:Q,rail:eS,error:"robokassa_failed"}),ea(Y("paymentFailed"))),es(!1))})}catch{Z(t)}return}let{payment_url:a}=await c.uE.createLavaTopPayment(e$,{locale:s,email:r,provider:t});(0,u.sx)(u.oA.PAYMENT_REDIRECT,{plan:Q,rail:eS,provider:t??"default"}),window.location.href=a}catch(e){if("robokassa"===eS&&"provider_disabled"===(0,p.g)(e)){(0,u.sx)(u.oA.PAYMENT_ERROR,{plan:Q,rail:eS,error:"provider_disabled"}),eb(null),e_(e=>e+1),en(!1),ea(Y("robokassa.railChanged")),es(!1);return}(0,u.sx)(u.oA.PAYMENT_ERROR,{plan:Q,rail:eS,provider:t??"default",error:(0,p.Q)(e,"create_failed")}),ea((0,p.Q)(e,Y("paymentFailed"))),es(!1)}};if(F)return(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-ds-bg",children:(0,r.jsx)("div",{className:"text-ds-fg",children:G("loading")})});let eQ=(0,k.pM)(eS),e0=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eQ;return(0,k.up)(e,t,s)},e1=e=>(0,k.T6)((0,k.aX)(ep,e),eQ);function e5(e){let t=e1(e);return null!==t&&eM?(0,k.iU)((0,k.aX)(ep,e),eQ)??t:t}let e2=e5("monthly"),e3=e5("yearly"),e8=eT?e5("lifetime"):null,e4=(()=>{if(!eM)return null;let e=e1(Q),t=e5(Q);return null===e||null===t?null:(0,k.T0)(e,t)})(),e6=null!==e2&&null!==e3&&!eL&&("robokassa"!==eS||null!==eY),e9=eH?(0,k.pM)(eH):"USD",e7=ez?(0,k.T6)((0,k.BX)(ep,ez),e9):null,te=eH&&null!==e7?e0(e7,e9):"",tt=eH&&ez?(0,j.tq)(eH,ez):"",ts="lifetime"===Q,tr=ts||"robokassa"===eS,ta=ts?e8:"yearly"===Q?e3:e2,tl=eY?eY[e$]:null,tn=e=>"RUB"===eQ?100*Math.round(e/1200):Math.round(e/12),ti=tr?ta:"yearly"===Q&&null!==e3?tn(e3):e2,td=e6&&null!==ti?e0(ti):"…",to=ts?Y("lifetime.unit"):"robokassa"===eS?"":Y("usd.perMonth"),tc=(()=>{if(!e6||!eM)return null;let e=e1(Q);return null===e||null===ta||e<=ta?null:"yearly"!==Q||tr?e:tn(e)})(),tp=null===tc?null:e0(tc),tu=e6?ts?Y("lifetime.billedOnce"):"robokassa"===eS?"yearly"===Q?Y("robokassa.termYear"):Y("robokassa.termMonth"):"yearly"===Q?Y("usd.billedYearly",{total:e0(e3)}):Y("usd.billedMonthly"):"",tm="lavatop"===eS&&!eL,tf=et||eU||eL||"robokassa"===eS&&null===eY,tx=(()=>{if(null===e2||null===e3)return null;let e=12*e2-e3;return e>0?e0(e):null})(),th=(()=>{if(!e6||!tu)return"";if(ts)return tu;let e=[tu];"robokassa"===eS?"yearly"===Q&&null!==tx&&e.push(Y("sub.saving",{amount:tx})):eM?e.push(Y("sub.keepsPrice")):"yearly"===Q&&null!==tx?e.push(Y("sub.saving",{amount:tx})):"monthly"===Q&&e.push(Y("sub.cancelAnytime"));let t=e.join(" \xb7 ");return t.charAt(0).toLocaleUpperCase(s)+t.slice(1)})(),ty=(0,k.YK)(ep,eQ);return(0,r.jsx)(E.q,{children:(0,r.jsx)(E.T,{footer:(0,r.jsx)(m.Footer,{}),spacing:"loose",children:(0,r.jsxs)("div",{className:"grid gap-8 lg:gap-10 lg:grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)] items-start",children:[(0,r.jsx)("aside",{className:"lg:order-2 lg:sticky lg:top-1/2 lg:-translate-y-1/2 min-w-0",children:(0,r.jsx)(U.Zp,{fill:"surface",className:"p-6 space-y-5","data-rail":eS,children:J&&!eA?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3 text-center",children:[(0,r.jsx)("div",{className:"flex h-16 w-16 items-center justify-center bg-ds-pro shadow-ds-raise",children:(0,r.jsx)(L.L,{sign:"gem",className:"h-10 w-10 text-white"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"type-title text-ds-fg",children:"Pro"}),(0,r.jsx)("p",{className:"type-label text-ds-muted mt-1",children:Y("active.hasAccess")})]})]}),$?.subscription_expires_at&&(0,r.jsxs)("div",{className:"flex items-center justify-between border border-ds-border px-4 py-3",children:[(0,r.jsx)("span",{className:"type-label text-ds-muted",children:Y("active.validUntil")}),(0,r.jsx)("span",{className:"type-label text-ds-fg",children:ej?Y("active.forever"):(0,w.Yq)($.subscription_expires_at,s,w.ax.numeric)})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(f.$n,{onClick:()=>e.push("/account"),size:"cta",className:"w-full type-title",children:Y("active.manageSubscription")}),(0,r.jsx)(f.$n,{asChild:!0,variant:"outline",size:"cta",className:"w-full",children:(0,r.jsx)(n.N_,{href:"/",children:Y("active.goHome")})})]})]}):(0,r.jsxs)(r.Fragment,{children:[eA&&$?.subscription_expires_at&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border border-ds-border px-4 py-3",children:[(0,r.jsx)("span",{className:"type-label text-ds-muted",children:Y("active.validUntil")}),(0,r.jsx)("span",{className:"type-label text-ds-fg",children:(0,w.Yq)($.subscription_expires_at,s,w.ax.numeric)})]}),(0,r.jsx)("p",{className:"type-label text-center text-ds-muted",children:Y("robokassa.extendLead")})]}),null!==e4&&e6&&(0,r.jsx)(R.p,{percent:e4,remainingMs:eP}),eG&&(0,r.jsx)(b.$,{testId:"plan",value:Q,onChange:e=>{Q!==e&&(en(!1),eo.reset()),ee(e),(0,u.sx)(u.oA.PLAN_SELECTED,{plan:e})},options:[{value:"monthly",label:Y("billing.monthly")},{value:"yearly",label:Y("billing.annual"),aside:null!==ty?Y("billing.percentOff",{percent:ty}):void 0},...eT?[{value:"lifetime",label:Y("billing.lifetime")}]:[]]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-2.5",children:[(0,r.jsx)("span",{className:"type-display text-ds-fg",children:td}),tp&&(0,r.jsxs)("s",{className:"type-title text-ds-muted-strong","data-testid":"was-price",children:[(0,r.jsx)("span",{className:"sr-only",children:Y("welcome.was")}),tp]}),(0,r.jsx)("span",{className:"type-title text-ds-muted-strong",children:to})]}),(0,r.jsx)("p",{className:"type-ds-body-sm text-ds-muted","data-testid":"billed-as",children:th}),"robokassa"===eS&&e6&&null!==tl&&(0,r.jsx)("p",{className:"type-ds-body-sm text-ds-muted-strong","data-testid":"charge-note",children:Y("robokassa.chargeNote",{amount:(0,k.up)(100*tl,"RUB",s)})})]}),(0,r.jsx)(h.jQ,{children:er}),eU&&(0,r.jsx)("div",{className:"border border-ds-warn/40 bg-ds-warn/10 p-3",children:(0,r.jsx)("p",{className:"type-label text-ds-fg",children:Y("topup.unavailable")})}),!H&&(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)(h.JU,{htmlFor:"checkout-email",children:Y("checkoutEmail.label")}),(0,r.jsx)(V.p,{size:"sm",id:"checkout-email",type:"email",autoComplete:"email",inputMode:"email",value:ei,onChange:e=>ed(e.target.value),placeholder:Y("checkoutEmail.placeholder"),className:"w-full",...eo.field("email",ei)}),eo.error("email")?(0,r.jsx)(h.bg,{id:eo.errorId("email"),children:eo.error("email")}):(0,r.jsx)("p",{className:"type-ds-body-sm text-ds-muted-strong",children:Y("checkoutEmail.hint")})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1.5","data-field":!0,children:[(0,r.jsxs)(h.JU,{className:"flex cursor-pointer items-start gap-3",children:[(0,r.jsx)(h.Sc,{variant:"box",checked:el,onChange:e=>{en(e.target.checked),e.target.checked&&(0,u.sx)(u.oA.PAYMENT_CONSENT_CHECKED,{plan:Q})},className:"mt-0.5",...eo.field("consent",el)}),(0,r.jsxs)("span",{className:(0,_.cn)("type-ds-body-sm",eo.error("consent")?"text-ds-fg":"text-ds-muted"),children:["robokassa"===eS||ts?Y("consent.oneOffCheckboxPart1"):Y("consent.checkboxPart1")," ",(0,r.jsx)(n.N_,{href:"/terms",className:"text-ds-accent underline hover:opacity-80",target:"_blank",children:Y("consent.checkboxPart2")})]})]}),(0,r.jsx)(h.bg,{id:eo.errorId("consent"),children:eo.error("consent")})]}),(0,r.jsx)(f.$n,{size:"cta",className:"w-full type-title disabled:opacity-100 disabled:border disabled:border-ds-border disabled:bg-ds-surface disabled:text-ds-muted-strong",onClick:()=>ec("lavatop"===eS?"UNLIMINT":void 0),disabled:tf,"data-testid":"pay-card",children:et?Y("processing"):Y(tm?"payCard":"payContinue")}),tm&&(0,r.jsx)(f.$n,{size:"cta",variant:"outline",className:"w-full type-title",onClick:()=>ec("PAYPAL"),disabled:tf,"data-testid":"pay-paypal",children:Y("payPaypal")}),eH&&te&&(0,r.jsx)("div",{className:"text-center",children:(0,r.jsx)(f.$n,{type:"button",variant:"quiet",size:"inline",className:"type-label","data-testid":"alt-rail",onClick:()=>{eH&&ez&&((0,u.sx)(u.oA.ALT_RAIL_CLICKED,{rail:eH,plan:ez}),ef(e=>!e),ee(ez),en(!1),ea(""))},disabled:et,children:Y(tt,{price:te})})})]})})}),(0,r.jsxs)("div",{className:"lg:order-1 min-w-0 space-y-14",children:[J?(0,r.jsx)("section",{children:(0,r.jsx)("h1",{className:"type-display text-ds-fg",children:Y("active.title")})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{children:[(0,r.jsx)("div",{className:"mb-6",children:eB?(0,r.jsxs)(x.E,{variant:"accent",size:"dense",className:"gap-2",children:[Y(`compare.groups.${eB.group}`)," \xb7 ",Y("hero.locked")]}):(0,r.jsx)("span",{className:"type-eyebrow-dense text-ds-muted-strong",children:Y("hero.eyebrow")})}),(0,r.jsxs)("h1",{className:"type-display text-ds-fg",children:[Y("hero.title")," ",(0,r.jsx)("span",{className:"text-ds-accent",children:Y("hero.titleAccent")})]}),(0,r.jsx)("p",{className:"mt-5 type-body type-measure leading-relaxed text-ds-muted",children:Y("hero.subtitle")}),eB&&(0,r.jsxs)("div",{className:"mt-6 border-l-2 border-ds-accent bg-ds-accent/10 px-4 py-3",children:[(0,r.jsx)("p",{className:"font-medium text-ds-fg",children:Y(`context.${eF}.title`)}),(0,r.jsx)("p",{className:"mt-1 type-ds-body-sm leading-relaxed text-ds-muted",children:Y(`context.${eF}.body`,{count:eV})})]}),(0,r.jsx)("div",{className:"mt-8 grid grid-cols-3 gap-4 border-t border-ds-border pt-6",children:I.map(e=>{let t="openings"===e.key?eZ>0?String(eZ):"—":e.value;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"ds-display text-[30px] leading-none tabular-nums text-ds-fg sm:text-[36px]",children:t}),(0,r.jsx)("div",{className:"mt-2 type-ds-body-xs leading-tight text-ds-muted",children:Y(`hero.stats.${e.key}`)})]},e.key)})}),(0,r.jsx)("p",{className:"mt-3 type-ds-body-xs leading-relaxed text-ds-muted-strong",children:Y("hero.popular")})]}),(0,r.jsx)("section",{className:"space-y-10",children:P.map((e,t)=>{let s=z[e.preview];return(0,r.jsxs)("div",{className:"grid gap-6 border-t border-ds-border pt-8 sm:grid-cols-[1fr_minmax(0,300px)] sm:items-start",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center gap-3",children:[(0,r.jsx)("span",{className:"font-ds-mono type-ds-body-xs type-strong text-ds-accent",children:String(t+1).padStart(2,"0")}),(0,r.jsx)("span",{className:"type-eyebrow-dense text-ds-muted-strong",children:Y(`tools.${e.id}.kicker`)})]}),(0,r.jsx)("h2",{className:"type-title text-ds-fg",children:Y(`tools.${e.id}.title`)}),(0,r.jsx)("p",{className:"mt-3 type-body type-measure leading-relaxed text-ds-muted",children:Y(`tools.${e.id}.body`)})]}),(0,r.jsx)(s,{})]},e.id)})}),(0,r.jsxs)("section",{className:"border border-ds-fg p-6 sm:p-8",children:[(0,r.jsx)("h2",{className:"type-title text-ds-fg",children:Y("guarantee.title")}),(0,r.jsx)("p",{className:"mt-3 type-body type-measure leading-relaxed text-ds-muted",children:Y("guarantee.body")})]})]}),(0,r.jsx)(X,{compareGroups:eX,context:eB,isPremium:J}),(0,r.jsxs)("section",{children:[(0,r.jsx)("h2",{className:"type-display text-ds-fg mb-6",children:Y("faq.title")}),(0,r.jsx)("div",{className:"border border-ds-border",children:O.map(e=>(0,r.jsx)(y.M,{variant:"framed",question:Y(`faq.items.${e}.q`),children:"robokassa"===eS&&M.includes(e)?Y(`faq.items.${e}.aOneOff`):Y(`faq.items.${e}.a`)},e))})]}),(0,r.jsx)("p",{className:"type-ds-body-xs text-ds-muted-strong",children:"robokassa"===eS?Y("robokassa.pricesNote"):Y("pricesNote")})]})]})})})}function X(e){let{compareGroups:t,context:s,isPremium:a}=e,l=(0,d.c)("upgrade");return(0,r.jsx)("section",{children:(0,r.jsxs)("details",{open:!0,className:"group",children:[(0,r.jsxs)("summary",{className:"flex cursor-pointer list-none items-center justify-between border-b border-ds-border pb-3",children:[(0,r.jsx)("span",{className:"type-title text-ds-fg",children:l("compare.fullTitle")}),(0,r.jsx)("span",{className:"ml-4 type-eyebrow-dense text-ds-muted-strong group-open:hidden",children:l("compare.expand")})]}),(0,r.jsx)("div",{className:"mt-5 overflow-hidden border border-ds-border",children:(0,r.jsxs)("table",{className:"w-full type-ds-body-sm",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"bg-ds-surface border-b border-ds-border",children:[(0,r.jsx)("th",{className:"text-left px-4 py-3 font-medium text-ds-muted",children:l("compare.featureCol")}),(0,r.jsx)("th",{className:"w-20 text-center px-2 py-3 font-medium text-ds-muted",children:l("compare.freeCol")}),(0,r.jsx)("th",{className:"w-20 text-center px-2 py-3 font-medium text-ds-fg",children:l("compare.premiumCol")})]})}),(0,r.jsx)("tbody",{children:t.map(e=>(0,r.jsx)(J,{groupKey:e.groupKey,rows:e.rows,highlightRow:a||e.groupKey!==s?.group?void 0:s.row},e.groupKey))})]})})]})})}function J(e){let{groupKey:t,rows:s,highlightRow:a}=e,l=(0,d.c)("upgrade");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("tr",{className:"bg-ds-surface border-b border-ds-border",children:(0,r.jsx)("td",{colSpan:3,className:"px-4 py-2 type-eyebrow-dense text-ds-muted-strong",children:l(`compare.groups.${t}`)})}),s.map(e=>(0,r.jsxs)("tr",{"data-row":e.key,className:e.key===a?"border-b border-ds-border last:border-b-0 bg-ds-accent/10":"border-b border-ds-border last:border-b-0",children:[(0,r.jsx)("td",{className:e.key===a?"px-4 py-3 font-medium text-ds-accent":"px-4 py-3 text-ds-fg",children:l(`compare.rows.${e.key}`)}),(0,r.jsx)("td",{className:"text-center px-2 py-3",children:(0,r.jsx)(Q,{value:e.free})}),(0,r.jsx)("td",{className:"text-center px-2 py-3",children:(0,r.jsx)(Q,{value:e.premium})})]},e.key))]})}function Q(e){let{value:t}=e,s=(0,d.c)("upgrade");return t?(0,r.jsx)("span",{role:"img","aria-label":s("included"),className:"inline-flex align-middle text-ds-accent",children:(0,r.jsx)(L.L,{sign:"check",className:"h-5 w-5"})}):(0,r.jsx)("span",{className:"text-ds-muted-strong type-body","aria-label":s("notIncluded"),children:"—"})}function ee(){let e=(0,d.c)("upgrade");return(0,r.jsx)(E.q,{children:(0,r.jsx)(E.T,{children:(0,r.jsxs)("div",{className:"w-full px-4 py-16",children:[(0,r.jsx)("span",{className:"type-eyebrow-dense text-ds-muted-strong",children:e("hero.eyebrow")}),(0,r.jsxs)("h1",{className:"mt-4 type-display text-ds-fg",children:[e("hero.title")," ",(0,r.jsx)("span",{className:"text-ds-accent",children:e("hero.titleAccent")})]}),(0,r.jsx)("p",{className:"mt-5 type-body type-measure leading-relaxed text-ds-muted",children:e("hero.subtitle")})]})})})}function et(){return(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(ee,{}),children:(0,r.jsx)(q,{})})}},29543:(e,t,s)=>{"use strict";s.d(t,{T:()=>o,q:()=>i});var r=s(95155),a=s(12115),l=s(40980);let n={default:"min-h-dvh flex",game:"min-h-screen lg:h-screen flex flex-col lg:flex-row overflow-y-auto lg:overflow-hidden relative"},i=a.forwardRef((e,t)=>{let{className:s,variant:a="default",...i}=e;return(0,r.jsx)("main",{ref:t,className:(0,l.cn)(n[a],s),...i})});i.displayName="PageShell";let d={default:"space-y-4 lg:space-y-6",loose:"space-y-6 lg:space-y-10"},o=a.forwardRef((e,t)=>{let{className:s,children:a,footer:n,spacing:i="default",...o}=e;return(0,r.jsxs)("div",{ref:t,className:(0,l.cn)("flex-1 min-w-0",n&&"flex flex-col",s),...o,children:[(0,r.jsx)("div",{className:(0,l.cn)("max-w-content mx-auto w-full p-4 sm:p-6 lg:p-8",n&&"flex-1"),children:(0,r.jsx)("div",{className:(0,l.cn)("w-full",d[i]),children:a})}),n]})});o.displayName="PageContent"},29722:(e,t,s)=>{"use strict";function r(){for(var e,t,s=0,r="",a=arguments.length;sr})},32777:(e,t,s)=>{"use strict";s.d(t,{D0:()=>g,JU:()=>o,Sc:()=>h,TM:()=>u,bg:()=>y,eu:()=>m,jQ:()=>b,l6:()=>x});var r=s(95155),a=s(12115),l=s(40980),n=s(25768),i=s(6628),d=s(55917);let o=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("label",{ref:t,className:(0,l.cn)("type-label text-ds-fg",s),...a})});o.displayName="Label";let c={md:"px-4 py-3 type-ds-body-sm",sm:"px-2 py-1 type-ds-body-xs leading-snug",dense:"px-2 py-1 type-ds-body-sm"},p={default:"text-ds-fg",muted:"text-ds-muted"},u=a.forwardRef((e,t)=>{let{className:s,size:a="md",tone:n="default",...i}=e;return(0,r.jsx)("textarea",{ref:t,className:(0,l.cn)("flex w-full rounded-none border border-ds-border-strong bg-transparent","placeholder:text-ds-muted-strong","focus-visible:outline-hidden focus-visible:border-ds-fg",d.x,"disabled:cursor-not-allowed disabled:opacity-50",c[a],p[n],s),...i})});u.displayName="Textarea";let m={md:"default",sm:"sm",dense:"xs"},f={md:(0,l.cn)(i.C8[m.md],"px-5 type-ds-body-sm"),sm:(0,l.cn)(i.C8[m.sm],"px-4 type-ds-body-sm"),dense:(0,l.cn)(i.C8[m.dense],"px-2 type-ds-body-sm")},x=a.forwardRef((e,t)=>{let{className:s,size:a="md",...n}=e;return(0,r.jsx)("select",{ref:t,className:(0,l.cn)("flex w-full rounded-none border border-ds-border-strong bg-transparent","text-ds-fg","focus-visible:outline-hidden focus-visible:border-ds-fg",d.x,"disabled:cursor-not-allowed disabled:opacity-50",f[a],s),...n})});x.displayName="Select";let h=a.forwardRef((e,t)=>{let{className:s,variant:a="native",...i}=e;return"box"===a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{ref:t,type:"checkbox",className:"peer sr-only",...i}),(0,r.jsx)("span",{"aria-hidden":"true",className:(0,l.cn)("flex size-4.5 shrink-0 items-center justify-center border border-ds-border-strong bg-ds-bg text-transparent transition-colors","peer-checked:border-ds-fg peer-checked:bg-ds-fg peer-checked:text-ds-bg","peer-focus-visible:outline-1 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-ds-accent","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",d.O,s),children:(0,r.jsx)(n.T,{mark:"check"})})]}):(0,r.jsx)("input",{ref:t,type:"checkbox",className:(0,l.cn)("size-4 shrink-0 rounded-none border border-ds-border-strong accent-ds-accent","focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ds-accent focus-visible:ring-offset-2 focus-visible:ring-offset-ds-bg","disabled:cursor-not-allowed disabled:opacity-50",d.x,s),...i})});function y(e){let{id:t,children:s,className:a}=e;return s?(0,r.jsxs)("p",{id:t,className:(0,l.cn)("flex gap-1.75 type-ds-body-sm type-strong text-ds-fg",a),children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"mt-0.75 flex size-3.5 shrink-0 items-center justify-center bg-ds-fg type-mono-xs type-mono-strong leading-none text-ds-bg",children:"!"}),(0,r.jsx)("span",{children:s})]}):null}function b(e){let{children:t,className:s}=e;return t?(0,r.jsx)("div",{role:"alert",className:(0,l.cn)("border border-ds-bad/50 bg-ds-bad/10 px-3 py-2 type-ds-body-sm text-ds-fg",s),children:t}):null}function g(e){let{label:t,htmlFor:s,hint:a,error:n,className:i,children:d}=e;return(0,r.jsxs)("div",{className:(0,l.cn)("flex flex-col gap-2",i),children:[t&&(0,r.jsx)(o,{htmlFor:s,children:t}),d,a&&!n&&(0,r.jsx)("p",{className:"type-ds-body-sm text-ds-muted-strong",children:a}),(0,r.jsx)(y,{id:s?`${s}-error`:void 0,children:n})]})}h.displayName="Checkbox"},34193:(e,t,s)=>{"use strict";s.d(t,{Kd:()=>d,c3:()=>i,dK:()=>n,oA:()=>l,sx:()=>a});var r=s(59798);function a(e,t){if(!(0,r.isInternalTraffic)()&&(window.umami?.track(e,t),window.ym)){let s="104636135";s&&window.ym(Number(s),"reachGoal",e,t)}}let l={LOGIN_VIEWED:"login_viewed",AUTH_METHOD_SELECTED:"auth_method_selected",LOGIN_SUCCESS:"login_success",SIGNUP_COMPLETED:"signup_completed",LOGIN_ERROR:"login_error",AUTH_REQUIRED_VIEWED:"auth_required_viewed",LOGOUT:"logout",ONBOARDING_CONNECT_VIEWED:"onboarding_connect_viewed",ONBOARDING_ACCOUNT_LINKED:"onboarding_account_linked",IMPORT_GAMES_STARTED:"import_games_started",IMPORT_GAMES_SUCCESS:"import_games_success",IMPORT_GAMES_ERROR:"import_games_error",GAME_ANALYZED:"game_analyzed",GAME_REANALYZED:"game_reanalyzed",ANALYSIS_STARTED:"analysis_started",ANALYSIS_START_SHOWN:"analysis_start_shown",ANALYSIS_START_CLICKED:"analysis_start_clicked",ANALYSIS_SAVE_PROMPT_SHOWN:"analysis_save_prompt_shown",ANALYSIS_SAVE_PROMPT_CLICKED:"analysis_save_prompt_clicked",ANALYSIS_SAVE_PROMPT_DISMISSED:"analysis_save_prompt_dismissed",ANALYSIS_ERROR:"analysis_error",BATCH_ANALYSIS_STARTED:"batch_analysis_started",BATCH_ANALYSIS_COMPLETED:"batch_analysis_completed",BOARD_IMAGE_PARSED:"board_image_parsed",ANALYSIS_SAVED_TO_GAMES:"analysis_saved_to_games",ENGINE_LINE_EXPLORED:"engine_line_explored",BOARD_EXPLORATION_USED:"board_exploration_used",AUTOPLAY_STARTED:"autoplay_started",AUTOPLAY_STOPPED:"autoplay_stopped",BOARD_FLIPPED:"board_flipped",FILTER_APPLIED:"filter_applied",FILTER_CLEARED:"filter_cleared",PUZZLE_STARTED:"puzzle_started",PUZZLE_SOLVED:"puzzle_solved",PUZZLE_FAILED:"puzzle_failed",HINT_USED:"hint_used",PUZZLE_SKIPPED:"puzzle_skipped",COURSE_OPENED:"course_opened",COURSE_STUDY_VIEWED:"course_study_viewed",COURSE_ENROLLED:"course_enrolled",COURSE_SCOPE_CHANGED:"course_scope_changed",REPERTOIRE_CREATED:"repertoire_created",TRAINING_STARTED:"training_started",TRAINING_SESSION_COMPLETED:"training_session_completed",REPERTOIRE_SHARED:"repertoire_shared",SHARED_REPERTOIRE_VIEWED:"shared_repertoire_viewed",PLAY_GAME_STARTED:"play_game_started",PLAY_GAME_ENDED:"play_game_ended",PLAY_GAME_RESIGNED:"play_game_resigned",PLAY_GAME_REMATCH:"play_game_rematch",PLAY_GAME_ANALYZE:"play_game_analyze",PLAY_DIFFICULTY_SELECTED:"play_difficulty_selected",PLAY_TIME_CONTROL_SELECTED:"play_time_control_selected",PLAY_COLOR_SELECTED:"play_color_selected",PLAY_OPENING_SELECTED:"play_opening_selected",PLAY_MODE_SELECTED:"play_mode_selected",PLAY_ELO_SELECTED:"play_elo_selected",PLAY_BOT_SELECTED:"play_bot_selected",PLAY_MANNER_FILTERED:"play_manner_filtered",PLAY_ODDS_SELECTED:"play_odds_selected",PLAY_HELP_TOGGLED:"play_help_toggled",PLAY_GOAL_SELECTED:"play_goal_selected",PLAY_FORMAT_SELECTED:"play_format_selected",PLAY_RATING_DECLARED:"play_rating_declared",PLAY_HINT_USED:"play_hint_used",PLAY_TAKEBACK_USED:"play_takeback_used",PLAY_BLUNDER_WARNED:"play_blunder_warned",PLAY_STRENGTH_ADAPTED:"play_strength_adapted",PLAY_BOUT_STARTED:"play_bout_started",PLAY_BOUT_FINISHED:"play_bout_finished",PLAY_LADDER_STEP_PASSED:"play_ladder_step_passed",PLAY_BOT_RESIGNED:"play_bot_resigned",PLAY_DRAW_OFFERED:"play_draw_offered",PLAY_LEARN_OPENING_CLICKED:"play_learn_opening_clicked",LICHESS_CONNECT_COMPLETED:"lichess_connect_completed",LICHESS_CHALLENGE_CREATED:"lichess_challenge_created",LICHESS_ANALYZE_CLICKED:"lichess_analyze_clicked",LICHESS_CONNECT_CLICKED:"lichess_connect_clicked",LICHESS_SEEK_CANCELLED:"lichess_seek_cancelled",LICHESS_CHALLENGE_CANCELLED:"lichess_challenge_cancelled",LICHESS_CHALLENGE_ANSWERED:"lichess_challenge_answered",LICHESS_GAME_STARTED:"lichess_game_started",LICHESS_GAME_ENDED:"lichess_game_ended",LICHESS_GAME_RESIGNED:"lichess_game_resigned",LICHESS_GAME_ABORTED:"lichess_game_aborted",LICHESS_DRAW_OFFERED:"lichess_draw_offered",LICHESS_DRAW_ANSWERED:"lichess_draw_answered",LICHESS_REMATCH:"lichess_rematch",PLAY_PREMOVE_QUEUED:"play_premove_queued",PLAY_PREMOVE_SENT:"play_premove_sent",PLAY_PREMOVES_CLEARED:"play_premoves_cleared",PLAY_ZEN_TOGGLED:"play_zen_toggled",PLAY_CHATTER_TOGGLED:"play_chatter_toggled",INSIGHT_MOMENT_CLICKED:"insight_moment_clicked",GAME_OPENED:"game_opened",UPGRADE_PAGE_VIEWED:"upgrade_page_viewed",UPGRADE_CTA_CLICKED:"upgrade_cta_clicked",PREMIUM_FEATURE_BLOCKED:"premium_feature_blocked",PLAN_SELECTED:"plan_selected",PAYMENT_CONSENT_CHECKED:"payment_consent_checked",PAYMENT_INITIATED:"payment_initiated",ALT_RAIL_SHOWN:"alt_rail_shown",ALT_RAIL_CLICKED:"alt_rail_clicked",TRIAL_STARTED:"trial_started",PAYMENT_REDIRECT:"payment_redirect",PAYMENT_ERROR:"payment_error",PAYMENT_COMPLETED:"payment_completed",PAYMENT_FAILED:"payment_failed",PAYMENT_RECOVERY_CLICKED:"payment_recovery_clicked",SUBSCRIPTION_CANCELED:"subscription_canceled",VIDEO_EXPORT_PAGE_VIEWED:"video_export_page_viewed",VIDEO_EXPORT_SIGNIN_CLICKED:"video_export_signin_clicked",VIDEO_RENDER_STARTED:"video_render_started",VIDEO_RENDER_COMPLETED:"video_render_completed",VIDEO_RENDER_ERROR:"video_render_error",VIDEO_DOWNLOADED:"video_downloaded",SHARE_LINK_COPIED:"share_link_copied",SHARE_CLICKED:"share_clicked",SHARE_VIDEO_PLATFORM:"share_video_platform",SHARE_ARTIFACT:"share_artifact",FEATURE_DISCOVERY_VIDEO_BANNER_SHOWN:"feature_discovery_video_banner_shown",FEATURE_DISCOVERY_VIDEO_BANNER_CLICKED:"feature_discovery_video_banner_clicked",LANGUAGE_CHANGED:"language_changed",ACCOUNT_CONNECTION_CHANGED:"account_connection_changed",LIBRARY_GAME_ANALYZED:"library_game_analyzed",PROFILE_VIEWED:"profile_viewed",HOME_CTA_CLICKED:"home_cta_clicked",POSITION_VALIDATION_FAILED:"position_validation_failed",PUZZLE_THEME_SELECTED:"puzzle_theme_selected",PUZZLE_HUB_OWN_GAMES_CLICK:"puzzle_hub_own_games_click",PUZZLE_HUB_SHIELD_CLICK:"puzzle_hub_shield_click",WOODPECKER_SET_CREATED:"woodpecker_set_created",WOODPECKER_CYCLE_CLOSED:"woodpecker_cycle_closed",WORKSPACE_CUSTOMIZED:"workspace_customized",SUBSCRIPTION_MANAGE_CLICKED:"subscription_manage_clicked",WEB_VITALS:"web_vitals"};function n(){let e=window.location.pathname.split("/").filter(Boolean);return e[0]&&2===e[0].length&&e.shift(),e[0]||"home"}function i(e,t,s){let r=!0===t,n=s?{flow:s}:{};a(l.LOGIN_SUCCESS,{method:e,is_new_user:r,...n}),r&&a(l.SIGNUP_COMPLETED,{method:e,...n})}function d(e,t){a(l.UPGRADE_CTA_CLICKED,{source:e,...t?{context:t}:{}})}},35273:(e,t,s)=>{"use strict";s.d(t,{DX:()=>m,TL:()=>u});var r=s(12115),a=s.t(r,2),l=Object.defineProperty,n=(e,t)=>l(e,"name",{value:t,configurable:!0});function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function d(...e){return t=>{let s=!1,r=e.map(e=>{let r=i(e,t);return s||"function"!=typeof r||(s=!0),r});if(s)return()=>{for(let t=0;tc(e,"name",{value:t,configurable:!0});function u(e){let t=r.forwardRef((t,s)=>{let{children:a,...l}=t,n=null,i=!1,d=[];_(a)&&"function"==typeof j&&(a=j(a._payload)),r.Children.forEach(a,e=>{if(b(e)){i=!0;let t="child"in e.props?e.props.child:e.props.children;_(t)&&"function"==typeof j&&(t=j(t._payload)),n=x(e,t),d.push(n?.props?.children)}else d.push(e)}),n?n=r.cloneElement(n,void 0,d):!i&&1===r.Children.count(a)&&r.isValidElement(a)&&(n=a);let c=n?y(n):void 0,p=o(s,c);if(!n){if(a||0===a)throw Error(i?N(e):v(e));return a}let u=h(l,n.props??{});return n.type!==r.Fragment&&(u.ref=s?p:c),r.cloneElement(n,u)});return t.displayName=`${e}.Slot`,t}p(u,"createSlot");var m=u("Slot"),f=Symbol.for("radix.slottable");p(function(e){let t=p(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=f,t},"createSlottable");var x=p((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function h(e,t){let s={...t};for(let r in t){let a=e[r],l=t[r];/^on[A-Z]/.test(r)?a&&l?s[r]=(...e)=>{let t=l(...e);return a(...e),t}:a&&(s[r]=a):"style"===r?s[r]={...a,...l}:"className"===r&&(s[r]=[a,l].filter(Boolean).join(" "))}return{...e,...s}}function y(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(s=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}function b(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===f}p(h,"mergeProps"),p(y,"getElementRef"),p(b,"isSlottable");var g=Symbol.for("react.lazy");function _(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===g&&"_payload"in e&&E(e._payload)}function E(e){return"object"==typeof e&&null!==e&&"then"in e}p(_,"isLazyComponent"),p(E,"isPromiseLike");var v=p(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),N=p(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),j=a[" use ".trim().toString()]},40980:(e,t,s)=>{"use strict";s.d(t,{cn:()=>a,q:()=>l});var r=s(29722);function a(){for(var e=arguments.length,t=Array(e),s=0;s{"use strict";s.d(t,{u:()=>n});var r=s(12115),a=s(85909);let l={};function n(e){let[t,s]=(0,r.useState)(l),n=e.material,i=e.squares.light,d=e.squares.dark,o=e.night?.light,c=e.night?.dark;return(0,r.useEffect)(()=>{if(!n)return void s(l);let t=!0;return(0,a.c2)(e).then(e=>{t&&s(e)}),()=>{t=!1}},[n,i,d,o,c]),t}},50910:(e,t,s)=>{"use strict";s.d(t,{c:()=>l,k:()=>n});var r=s(78269);function a(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let l=a(0,r.c3),n=a(0,r.kc)},54932:(e,t,s)=>{"use strict";s.d(t,{I:()=>n,J:()=>l});let r=new Set(["RU","BY","KZ","KG","UZ","TJ","TM","AM","AZ"]),a=null;async function l(){if(a)return a;let e=function(){if("u"{"use strict";s.d(t,{O:()=>a,x:()=>r});let r="aria-[invalid=true]:border-ds-fg aria-[invalid=true]:shadow-[inset_0_0_0_1px_var(--ds-fg)]",a="peer-aria-[invalid=true]:border-ds-fg peer-aria-[invalid=true]:shadow-[inset_0_0_0_1px_var(--ds-fg)]"},59798:(e,t,s)=>{"use strict";s.d(t,{K:()=>o,isInternalTraffic:()=>d});var r=s(5390),a=s(46149);let l=a.d.analyticsInternal,n=a.d.umamiDisabled;function i(){return"1"===(0,r.bi)(l)}function d(){return i()}function o(){let e=null;try{e=new URLSearchParams(window.location.search).get("internal")}catch{}if("1"===e||"0"===e){let t="1"===e,s=i()!==t;t?((0,r.FX)(l,"1"),(0,r.FX)(n,"1")):((0,r.Pw)(l),(0,r.Pw)(n)),s&&console.info(`[analytics] this browser is now counted as ${t?"INTERNAL (not tracked)":"a normal visitor"}`)}return i()}},60529:(e,t,s)=>{"use strict";s.d(t,{Q:()=>d,p:()=>c});var r=s(95155),a=s(12115),l=s(40980),n=s(6628),i=s(55917);let d={default:"default",sm:"sm",xs:"xs",cta:"cta"},o={default:(0,l.cn)(n.C8[d.default],"px-5 type-ds-body-sm"),sm:(0,l.cn)(n.C8[d.sm],"px-3 type-ds-body-sm"),xs:(0,l.cn)(n.C8[d.xs],"px-2 type-ds-body-sm"),cta:(0,l.cn)(n.C8[d.cta],"px-6 type-body")},c=a.forwardRef((e,t)=>{let{className:s,type:a,size:n="default",frameless:d,...c}=e;return(0,r.jsx)("input",{type:a,className:(0,l.cn)(d?"w-full min-w-0 border-0 bg-transparent outline-none":(0,l.cn)("flex w-full rounded-none border border-ds-border-strong bg-transparent",o[n],"focus-visible:outline-hidden focus-visible:border-ds-fg",i.x),"text-ds-fg placeholder:text-ds-muted-strong","disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...c})});c.displayName="Input"},61227:(e,t,s)=>{"use strict";s.d(t,{p:()=>i});var r=s(95155),a=s(50910),l=s(45160),n=s(74753);function i(e){let{percent:t,remainingMs:s}=e,i=(0,a.c)("upgrade");return(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1 border border-ds-accent/30 bg-ds-accent/10 px-3 py-2","data-testid":"welcome-offer",children:[(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,r.jsx)(l.E,{variant:"default",size:"dense",children:i("welcome.percent",{percent:t})}),(0,r.jsx)("span",{className:"type-label text-ds-fg",children:i("welcome.firstDay")})]}),(0,r.jsx)("span",{className:"type-mono-md tabular-nums text-ds-accent","aria-live":"off",children:i("welcome.endsIn",{time:(0,n.zt)(s)})})]})}},67317:(e,t,s)=>{"use strict";s.d(t,{E3:()=>o,MM:()=>c,RA:()=>m,aN:()=>u});var r=s(95155),a=s(40980),l=s(70872),n=s(15250),i=s(6628);let d="font-[family-name:var(--font-ds-mono)]",o="border-ds-fg bg-ds-fg text-ds-bg",c={md:"sm",grid:"sm",dense:"xs",xs:"xs"},p={md:{text:"type-label px-3 py-1.5",mono:`${d} px-3 py-1.5 type-mono-md type-mono-strong`},grid:{text:"type-label px-1 py-1.5",mono:`${d} px-1 py-1.5 type-mono-md type-mono-strong`},dense:{text:"type-ds-body-xs px-2.25 py-1",mono:`${d} px-2.25 py-1 type-mono-xs type-mono-strong leading-none tracking-ds-wide`},xs:{text:"type-eyebrow px-2.5 py-1",mono:"type-eyebrow px-2.5 py-1"}};function u(e){let{active:t,onClick:s,disabled:n=!1,title:d,titleSide:u,ariaLabel:m,mono:f=!1,size:x="md",className:h,testId:y,children:b}=e;return(0,r.jsx)(l.SimpleTooltip,{content:d,side:u,children:(0,r.jsx)("button",{type:"button",onClick:s,disabled:n,"aria-pressed":t,"aria-label":m,"data-testid":y,className:(0,a.cn)("ds-press inline-flex items-center justify-center gap-1.5 border transition-colors",i.vh[c[x]],f?p[x].mono:p[x].text,t?o:"border-ds-border text-ds-muted hover:border-ds-muted-strong hover:text-ds-fg",n&&"cursor-not-allowed opacity-50",h),children:b})})}function m(e){let{size:t="md",className:s}=e;return(0,r.jsx)(n.EA,{className:(0,a.cn)(i.C8[c[t]],s)})}},68076:(e,t,s)=>{"use strict";s.d(t,{HN:()=>a,IW:()=>r,Mp:()=>c,ZY:()=>d,ch:()=>n,cs:()=>i,gH:()=>o,u2:()=>l,w8:()=>p});let r={lastMove:"rgba(255, 255, 0, 0.4)",lastMovePlay:"rgba(255, 255, 0, 0.25)",premove:"rgba(56, 132, 255, 0.5)",preview:"rgba(255, 213, 79, 0.5)",mate:"rgba(239, 68, 68, 0.35)",markAnchor:"rgba(255, 170, 0, 0.35)",hintSquare:"rgba(59, 130, 246, 0.40)",reveal:"rgba(245, 158, 11, 0.45)",puzzleHintRing:"rgba(250, 204, 21, 0.7)",coachTarget:"rgba(220, 38, 38, 0.85)",coachWeak:"rgba(180, 83, 9, 0.85)",posterClean:"rgba(255, 255, 0, 0.35)",posterHatched:"rgba(255, 255, 0, 0.26)"},a="radial-gradient(circle, rgba(220, 38, 38, 0.9) 0%, rgba(220, 38, 38, 0.55) 42%, transparent 72%)";function l(e){return{[e?"--sq-ring":"--sq-dot"]:1}}function n(){return{"--sq-sel":1}}let i={boxShadow:"none","--sq-over":1};function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{"--sq-check":1,...e?{animation:`board-check-pulse 900ms ease-in-out ${t}ms 3`}:{}}}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{animation:`${e%2?"board-capture-a":"board-capture-b"} 480ms ease-out ${t}ms backwards`}}function c(e,t){let s=Object.keys(e),r=Object.keys(t);if(s.length!==r.length)return!1;for(let r of s){let s=e[r],a=t[r];if(!a)return!1;let l=Object.keys(s??{});if(l.length!==Object.keys(a).length)return!1;for(let e of l)if(s[e]!==a[e])return!1}return!0}function p(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.lastMove;return{[e]:{backgroundColor:s,"--sq-last":1},[t]:{backgroundColor:s,"--sq-last":1}}}},72539:(e,t,s)=>{"use strict";s.r(t),s.d(t,{Footer:()=>m});var r=s(95155),a=s(94170),l=s(50910),n=s(78269),i=s(82854);let d=[{logical:"/free-chess-analysis",key:"freeAnalysis"},{logical:"/chess-game-analysis",key:"gameAnalysis"},{logical:"/chess-review",key:"review"},{logical:"/game-report",key:"report"},{logical:"/lichess-analysis",key:"lichess"}],o=[{logical:"/chess-analyzer",key:"analyzer"},{logical:"/chess-accuracy-calculator",key:"accuracy"},{logical:"/pgn-analyzer",key:"pgn"},{logical:"/fen-analyzer",key:"fen"},{logical:"/online-chess-board",key:"board"}],c=[{href:"/upgrade",key:"pricing"},{href:"/terms",key:"terms"},{href:"/privacy",key:"privacy"},{href:"/legal",key:"legal"}],p="mb-3.5 type-eyebrow-lg text-ds-muted-strong",u="type-ds-body-sm text-ds-muted transition-colors hover:text-ds-fg";function m(){let e=(0,l.c)("footer"),t=(0,n.Ym)();return(0,r.jsx)("footer",{className:"w-full border-t border-ds-border",children:(0,r.jsxs)("div",{className:"max-w-content mx-auto px-6 py-8",children:[(0,r.jsxs)("div",{className:"mb-7 grid grid-cols-2 gap-x-8 gap-y-8 border-b border-ds-border pb-7 sm:grid-cols-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:p,children:e("tools.groupAnalyze")}),(0,r.jsx)("nav",{className:"flex flex-col gap-2.5",children:d.map(s=>{let{logical:l,key:n}=s;return(0,r.jsx)(a.N_,{href:(0,i.dW)(l,t),className:u,children:e(`tools.${n}`)},n)})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:p,children:e("tools.groupTools")}),(0,r.jsx)("nav",{className:"flex flex-col gap-2.5",children:o.map(s=>{let{logical:l,key:n}=s;return(0,r.jsx)(a.N_,{href:(0,i.dW)(l,t),className:u,children:e(`tools.${n}`)},n)})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:p,children:e("companyHeading")}),(0,r.jsx)("nav",{className:"flex flex-col gap-2.5",children:c.map(t=>{let{href:s,key:l}=t;return(0,r.jsx)(a.N_,{href:s,className:u,children:e(l)},l)})})]})]}),(0,r.jsx)("div",{className:"type-ds-body-sm tracking-wide text-ds-muted",children:e("copyright",{year:new Date().getFullYear()})})]})})}},76465:(e,t,s)=>{"use strict";s.d(t,{M:()=>l});var r=s(95155),a=s(40980);function l(e){let{question:t,children:s,open:l=!1,variant:n="plain",className:i}=e;return(0,r.jsxs)("details",{open:l,className:(0,a.cn)("group border-b border-ds-border py-6","framed"===n&&"px-ds-inset-lg last:border-b-0",i),children:[(0,r.jsxs)("summary",{className:"flex list-none items-start justify-between gap-6 [&::-webkit-details-marker]:hidden",children:[(0,r.jsx)("span",{className:"type-h4 text-ds-fg",children:t}),(0,r.jsx)("span",{"aria-hidden":!0,className:"ds-display shrink-0 text-[30px] font-extralight leading-none text-ds-muted-strong transition-transform group-open:rotate-45",children:"+"})]}),null!=s&&!1!==s&&(0,r.jsx)("div",{className:"mt-3 type-body text-ds-muted",children:s})]})}},81477:(e,t,s)=>{"use strict";s.d(t,{BT:()=>u,Wu:()=>m,ZB:()=>p,Zp:()=>o,aR:()=>c});var r=s(95155),a=s(12115),l=s(35273),n=s(40980);let i={transparent:"bg-transparent",surface:"bg-ds-surface",bg:"bg-ds-bg"},d={hairline:"border-ds-border",accent:"border-ds-accent"},o=a.forwardRef((e,t)=>{let{className:s,fill:a="transparent",edge:o="hairline",asChild:c,...p}=e,u=c?l.DX:"div";return(0,r.jsx)(u,{ref:t,className:(0,n.cn)("rounded-none border",d[o],"text-ds-fg",i[a],s),...p})});o.displayName="Card";let c=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,n.cn)("flex flex-col gap-2 p-6 pb-3",s),...a})});c.displayName="CardHeader";let p=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("h3",{ref:t,className:(0,n.cn)("type-h3 text-ds-fg",s),...a})});p.displayName="CardTitle";let u=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("p",{ref:t,className:(0,n.cn)("type-ds-body-sm text-ds-muted",s),...a})});u.displayName="CardDescription";let m=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,n.cn)("p-6 pt-3",s),...a})});m.displayName="CardContent"},81642:(e,t,s)=>{Promise.resolve().then(s.bind(s,23900))},82430:(e,t,s)=>{"use strict";s.d(t,{A:()=>m});var r=s(73321),a=s(12115),l=s.t(a,2),n=s(78269),i=l["use".trim()],d=s(92651),o=s(76558),c=s(6144),p=s(95155),u=s(9780);function m(e){let{Link:t,config:s,getPathname:l,...m}=function(e,t){var s,l,n;let u={...s=t||{},localePrefix:"object"==typeof(n=s.localePrefix)?n:{mode:n||"always"},localeCookie:!!((l=s.localeCookie)??1)&&{name:"NEXT_LOCALE",sameSite:"lax",..."object"==typeof l&&l},localeDetection:s.localeDetection??!0,alternateLinks:s.alternateLinks??!0},m=u.pathnames,f=(0,a.forwardRef)(function({href:t,locale:s,...r},a){let l,n;"object"==typeof t?(l=t.pathname,n=t.params):l=t;let c=(0,d._x)(t),f=e(),h=(0,d.yL)(f)?i(f):f,y=c?x({locale:s||h,href:null==m?l:{pathname:l,params:n},forcePrefix:null!=s||void 0}):l;return(0,p.jsx)(o.default,{ref:a,href:"object"==typeof t?{...t,pathname:y}:y,locale:s,localeCookie:u.localeCookie,...r})});function x(e){let t,{forcePrefix:s,href:r,locale:a}=e;return null==m?"object"==typeof r?(t=r.pathname,r.query&&(t+=(0,c.Zn)(r.query))):t=r:t=(0,c.FP)({locale:a,...(0,c.TK)(r),pathnames:u.pathnames}),(0,c.x3)(t,a,u,s)}function h(e){return function(t,...s){return e(x(t),...s)}}return{config:u,Link:f,redirect:h(r.redirect),permanentRedirect:h(r.permanentRedirect),getPathname:x}}(n.Ym,e);return{...m,Link:t,usePathname:function(){let e,t,l=(e=(0,r.usePathname)(),t=(0,n.Ym)(),(0,a.useMemo)(()=>{if(!e)return e;let r=e,a=(0,d.XP)(t,s.localePrefix);if((0,d.wO)(a,e))r=(0,d.MY)(e,a);else if("never"!==s.localePrefix.mode&&s.localePrefix.prefixes){let s=(0,d.bL)(t);(0,d.wO)(s,e)&&(r=(0,d.MY)(e,s))}return r},[s.localePrefix,t,e])),i=(0,n.Ym)();return(0,a.useMemo)(()=>l&&s.pathnames?(0,c.aM)(i,l,s.pathnames):l,[i,l])},useRouter:function(){let e=(0,r.useRouter)(),t=(0,n.Ym)(),i=(0,r.usePathname)();return(0,a.useMemo)(()=>{function r(e){return function(r,a){let{locale:n,...d}=a||{},o=[l({href:r,locale:n||t,forcePrefix:null!=n||void 0})];Object.keys(d).length>0&&o.push(d),(0,u.A)(s.localeCookie,i,t,n),e(...o)}}return{...e,push:r(e.push),replace:r(e.replace),prefetch:r(e.prefetch)}},[t,i,e])},getPathname:l}}},87046:(e,t,s)=>{"use strict";s.d(t,{e:()=>d});var r=s(95155),a=s(32394),l=s(85909);let n=[...l.SK,0,0,...l.SK,0,0,...l.SK,0,0,0,0,0,1,0].join(" ");function i(e){let{id:t,ramp:s}=e,l=(0,a.E2)(s.lo),i=(0,a.E2)(s.hi),d=(e,t)=>`${e/255} ${t/255}`;return(0,r.jsxs)("filter",{id:t,colorInterpolationFilters:"sRGB",children:[(0,r.jsx)("feColorMatrix",{type:"matrix",values:n}),(0,r.jsxs)("feComponentTransfer",{children:[(0,r.jsx)("feFuncR",{type:"table",tableValues:d(l.r,i.r)}),(0,r.jsx)("feFuncG",{type:"table",tableValues:d(l.g,i.g)}),(0,r.jsx)("feFuncB",{type:"table",tableValues:d(l.b,i.b)})]})]})}function d(e){let{theme:t}=e;return t.tint?(0,r.jsx)("svg",{"aria-hidden":!0,width:"0",height:"0",style:{position:"absolute"},children:(0,r.jsxs)("defs",{children:[(0,r.jsx)(i,{id:`${t.tint.id}-w`,ramp:t.tint.white}),(0,r.jsx)(i,{id:`${t.tint.id}-b`,ramp:t.tint.black})]})}):null}},89239:(e,t,s)=>{"use strict";s.d(t,{$n:()=>u,kT:()=>o});var r=s(95155),a=s(12115),l=s(35273),n=s(18460),i=s(40980),d=s(6628);let o={default:"default",sm:"sm",xs:"xs",body:"body",lg:"cta",cta:"cta",icon:"sm",iconXs:"xs"},c={default:(0,i.cn)(d.C8.default,"px-6 type-button"),sm:(0,i.cn)(d.C8.sm,"px-4 type-button-sm"),xs:(0,i.cn)(d.C8.xs,"px-3 type-button-sm"),body:(0,i.cn)(d.C8.body,"px-5 type-button"),lg:(0,i.cn)(d.C8.cta,"px-8 type-button"),cta:(0,i.cn)(d.C8.cta,"px-9 gap-3 type-h3"),icon:(0,i.cn)(d.C8.sm,"w-10 px-0 type-button"),iconXs:(0,i.cn)(d.C8.xs,"w-8 px-0 type-button-sm"),inline:"h-auto px-0"},p=(0,n.F)((0,i.cn)("ds-press inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-none","transition-[background-color,color,border-color,opacity]","focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ds-accent focus-visible:ring-offset-2 focus-visible:ring-offset-ds-bg","disabled:pointer-events-none disabled:opacity-40"),{variants:{variant:{default:"bg-ds-accent text-ds-fg-on-accent hover:opacity-90",solid:"bg-ds-fg text-ds-bg hover:opacity-90",outline:"border border-ds-border-strong bg-transparent text-ds-fg hover:border-ds-fg",ghost:"bg-transparent text-ds-fg hover:text-ds-accent",link:"bg-transparent text-ds-accent hover:opacity-80 underline-offset-4 hover:underline px-0",destructive:"bg-ds-bad text-ds-fg-on-accent hover:opacity-90",quiet:"bg-transparent px-0 text-ds-muted-strong underline underline-offset-4 hover:text-ds-fg"},size:c},defaultVariants:{variant:"default",size:"default"}}),u=a.forwardRef((e,t)=>{let{className:s,variant:a,size:n,asChild:d=!1,...o}=e,c=d?l.DX:"button";return(0,r.jsx)(c,{className:(0,i.cn)(p({variant:a,size:n,className:s})),ref:t,...o})});u.displayName="Button"},93474:(e,t,s)=>{"use strict";function r(e){return e}s.d(t,{A:()=>r})}},e=>{e.O(0,[8269,6558,4798,1123,7176,870,3327,4045,9616,2922,8631,774,3197,7746,7423,2843,8441,3794,7358],()=>e(e.s=81642)),_N_E=e.O()}]); //# debugId=3dbd8479-089e-4f51-a14a-bf32e66edd12 //# sourceMappingURL=page-d77e5c56cef6ac32.js.map