const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProfilePage-CwsbkzAx.js","assets/ui-DGbmDh81.js","assets/vendor-Dq1MSLOW.js","assets/profileStore-CYGc9YCx.js","assets/client-BVEnUnuI.js","assets/Badge-C8PcvCed.js","assets/SubscriptionsPage-CNZBCCuv.js","assets/ReferralPage-b6ONrmmQ.js"])))=>i.map(i=>d[i]); var gt=Object.defineProperty;var pt=(n,e,t)=>e in n?gt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Re=(n,e,t)=>pt(n,typeof e!="symbol"?e+"":e,t);import{j as h,F as ht}from"./ui-DGbmDh81.js";import{a as mt,r as I,u as bt,b as xt,O as yt,R as ke,c as vt,d as ae,B as wt}from"./vendor-Dq1MSLOW.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function t(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=t(s);fetch(s.href,o)}})();var xe={},$e=mt;xe.createRoot=$e.createRoot,xe.hydrateRoot=$e.hydrateRoot;const St="modulepreload",kt=function(n){return"/"+n},je={},Le=function(e,t,r){let s=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(t.map(l=>{if(l=kt(l),l in je)return;je[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":St,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((u,g)=>{f.addEventListener("load",u),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return e().catch(o)})};function Lt(){if(console&&console.warn){for(var n=arguments.length,e=new Array(n),t=0;t()=>{if(n.isInitialized)e();else{const t=()=>{setTimeout(()=>{n.off("initialized",t)},0),e()};n.on("initialized",t)}},Ee=(n,e,t)=>{n.loadNamespaces(e,Xe(n,t))},Ae=(n,e,t,r)=>{H(t)&&(t=[t]),t.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(e,Xe(n,r))},Ct=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=e.languages[0],s=e.options?e.options.fallbackLng:!1,o=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(a,l)=>{const c=e.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};return t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!i(e.isLanguageChangingTo,n)?!1:!!(e.hasResourceBundle(r,n)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||i(r,n)&&(!s||i(o,n)))},Pt=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(ye("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(n,{lng:t.lng,precheck:(s,o)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!o(s.isLanguageChangingTo,n))return!1}}):Ct(n,e,t)},H=n=>typeof n=="string",Nt=n=>typeof n=="object"&&n!==null,Ot=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Rt={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},$t=n=>Rt[n],jt=n=>n.replace(Ot,$t);let ve={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:jt};const It=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ve={...ve,...n}},Et=()=>ve;let _e;const At=n=>{_e=n},Tt=()=>_e,Ft={type:"3rdParty",init(n){It(n.options.react),At(n)}},zt=I.createContext();class Mt{constructor(){Re(this,"getUsedNamespaces",()=>Object.keys(this.usedNamespaces));this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}}const Ut=(n,e)=>{const t=I.useRef();return I.useEffect(()=>{t.current=n},[n,e]),t.current},et=(n,e,t,r)=>n.getFixedT(e,t,r),Dt=(n,e,t,r)=>I.useCallback(et(n,e,t,r),[n,e,t,r]),Vt=function(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:t}=e,{i18n:r,defaultNS:s}=I.useContext(zt)||{},o=t||r||Tt();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Mt),!o){ye("You will need to pass in an i18next instance by using initReactI18next");const y=(N,L)=>H(L)?L:Nt(L)&&H(L.defaultValue)?L.defaultValue:Array.isArray(N)?N[N.length-1]:N,k=[y,{},!1];return k.t=y,k.i18n={},k.ready=!1,k}o.options.react&&o.options.react.wait!==void 0&&ye("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...Et(),...o.options.react,...e},{useSuspense:a,keyPrefix:l}=i;let c=n||s||o.options&&o.options.defaultNS;c=H(c)?[c]:c||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(c);const d=(o.isInitialized||o.initializedStoreOnce)&&c.every(y=>Pt(y,o,i)),f=Dt(o,e.lng||null,i.nsMode==="fallback"?c:c[0],l),u=()=>f,g=()=>et(o,e.lng||null,i.nsMode==="fallback"?c:c[0],l),[m,b]=I.useState(u);let p=c.join();e.lng&&(p=`${e.lng}${p}`);const S=Ut(p),w=I.useRef(!0);I.useEffect(()=>{const{bindI18n:y,bindI18nStore:k}=i;w.current=!0,!d&&!a&&(e.lng?Ae(o,e.lng,c,()=>{w.current&&b(g)}):Ee(o,c,()=>{w.current&&b(g)})),d&&S&&S!==p&&w.current&&b(g);const N=()=>{w.current&&b(g)};return y&&o&&o.on(y,N),k&&o&&o.store.on(k,N),()=>{w.current=!1,y&&o&&y.split(" ").forEach(L=>o.off(L,N)),k&&o&&k.split(" ").forEach(L=>o.store.off(L,N))}},[o,p]),I.useEffect(()=>{w.current&&d&&b(u)},[o,l,d]);const O=[m,o,d];if(O.t=m,O.i18n=o,O.ready=d,d||!d&&!a)return O;throw new Promise(y=>{e.lng?Ae(o,e.lng,c,()=>y()):Ee(o,c,()=>y())})};function tt(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(e=0;e{const e=Wt(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:i=>{const a=i.split(Ce);return a[0]===""&&a.length!==1&&a.shift(),nt(a,e)||Ht(i)},getConflictingClassGroupIds:(i,a)=>{const l=t[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},nt=(n,e)=>{var i;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),s=r?nt(n.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const o=n.join(Ce);return(i=e.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},Te=/^\[(.+)\]$/,Ht=n=>{if(Te.test(n)){const e=Te.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},Wt=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return Jt(Object.entries(n.classGroups),t).forEach(([o,i])=>{we(i,r,o,e)}),r},we=(n,e,t,r)=>{n.forEach(s=>{if(typeof s=="string"){const o=s===""?e:Fe(e,s);o.classGroupId=t;return}if(typeof s=="function"){if(Gt(s)){we(s(r),e,t,r);return}e.validators.push({validator:s,classGroupId:t});return}Object.entries(s).forEach(([o,i])=>{we(i,Fe(e,o),t,r)})})},Fe=(n,e)=>{let t=n;return e.split(Ce).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},Gt=n=>n.isThemeGetter,Jt=(n,e)=>e?n.map(([t,r])=>{const s=r.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[e+i,a])):o);return[t,s]}):n,qt=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const s=(o,i)=>{t.set(o,i),e++,e>n&&(e=0,r=t,t=new Map)};return{get(o){let i=t.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){t.has(o)?t.set(o,i):s(o,i)}}},rt="!",Qt=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,s=e[0],o=e.length,i=a=>{const l=[];let c=0,d=0,f;for(let p=0;pd?f-d:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:b}};return t?a=>t({className:a,parseClassName:i}):i},Yt=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},Zt=n=>({cache:qt(n.cacheSize),parseClassName:Qt(n),...Kt(n)}),Xt=/\s+/,_t=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s}=e,o=[],i=n.trim().split(Xt);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:d,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:g}=t(c);let m=!!g,b=r(m?u.substring(0,g):u);if(!b){if(!m){a=c+(a.length>0?" "+a:a);continue}if(b=r(u),!b){a=c+(a.length>0?" "+a:a);continue}m=!1}const p=Yt(d).join(":"),S=f?p+rt:p,w=S+b;if(o.includes(w))continue;o.push(w);const O=s(b,m);for(let y=0;y0?" "+a:a)}return a};function en(){let n=0,e,t,r="";for(;n{if(typeof n=="string")return n;let e,t="";for(let r=0;rf(d),n());return t=Zt(c),r=t.cache.get,s=t.cache.set,o=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=_t(l,t);return s(l,d),d}return function(){return o(en.apply(null,arguments))}}const P=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},ot=/^\[(?:([a-z-]+):)?(.+)\]$/i,nn=/^\d+\/\d+$/,rn=new Set(["px","full","screen"]),sn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,on=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,an=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ln=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,M=n=>q(n)||rn.has(n)||nn.test(n),V=n=>Q(n,"length",bn),q=n=>!!n&&!Number.isNaN(Number(n)),pe=n=>Q(n,"number",q),X=n=>!!n&&Number.isInteger(Number(n)),un=n=>n.endsWith("%")&&q(n.slice(0,-1)),v=n=>ot.test(n),B=n=>sn.test(n),dn=new Set(["length","size","percentage"]),fn=n=>Q(n,dn,it),gn=n=>Q(n,"position",it),pn=new Set(["image","url"]),hn=n=>Q(n,pn,yn),mn=n=>Q(n,"",xn),_=()=>!0,Q=(n,e,t)=>{const r=ot.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},bn=n=>on.test(n)&&!an.test(n),it=()=>!1,xn=n=>ln.test(n),yn=n=>cn.test(n),vn=()=>{const n=P("colors"),e=P("spacing"),t=P("blur"),r=P("brightness"),s=P("borderColor"),o=P("borderRadius"),i=P("borderSpacing"),a=P("borderWidth"),l=P("contrast"),c=P("grayscale"),d=P("hueRotate"),f=P("invert"),u=P("gap"),g=P("gradientColorStops"),m=P("gradientColorStopPositions"),b=P("inset"),p=P("margin"),S=P("opacity"),w=P("padding"),O=P("saturate"),y=P("scale"),k=P("sepia"),N=P("skew"),L=P("space"),K=P("translate"),Y=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",v,e],C=()=>[v,e],ie=()=>["",M,V],A=()=>["auto",q,v],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",v],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>[q,v];return{cacheSize:500,separator:":",theme:{colors:[_],spacing:[M,V],blur:["none","",B,v],brightness:E(),borderColor:[n],borderRadius:["none","","full",B,v],borderSpacing:C(),borderWidth:ie(),contrast:E(),grayscale:j(),hueRotate:E(),invert:j(),gap:C(),gradientColorStops:[n],gradientColorStopPositions:[un,V],inset:F(),margin:F(),opacity:E(),padding:C(),saturate:E(),scale:E(),sepia:j(),skew:E(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",v]}],container:["container"],columns:[{columns:[B]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),v]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",X,v]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",v]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",X,v]}],"grid-cols":[{"grid-cols":[_]}],"col-start-end":[{col:["auto",{span:["full",X,v]},v]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[_]}],"row-start-end":[{row:["auto",{span:[X,v]},v]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",v]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",v]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[p]}],mx:[{mx:[p]}],my:[{my:[p]}],ms:[{ms:[p]}],me:[{me:[p]}],mt:[{mt:[p]}],mr:[{mr:[p]}],mb:[{mb:[p]}],ml:[{ml:[p]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",v,e]}],"min-w":[{"min-w":[v,e,"min","max","fit"]}],"max-w":[{"max-w":[v,e,"none","full","min","max","fit","prose",{screen:[B]},B]}],h:[{h:[v,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[v,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[v,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[v,e,"auto","min","max","fit"]}],"font-size":[{text:["base",B,V]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pe]}],"font-family":[{font:[_]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",v]}],"line-clamp":[{"line-clamp":["none",q,pe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",M,v]}],"list-image":[{"list-image":["none",v]}],"list-style-type":[{list:["none","disc","decimal",v]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",M,V]}],"underline-offset":[{"underline-offset":["auto",M,v]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",v]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",v]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),gn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",fn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hn]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:z()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[M,v]}],"outline-w":[{outline:[M,V]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[M,V]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",B,mn]}],"shadow-color":[{shadow:[_]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",B,v]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[O]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",v]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",v]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",v]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[X,v]}],"translate-x":[{"translate-x":[K]}],"translate-y":[{"translate-y":[K]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",v]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",v]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",v]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[M,V,pe]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},wn=tn(vn);function Pe(...n){return wn(Bt(n))}function Ne(){var n,e;return typeof window<"u"&&((e=(n=window.Telegram)==null?void 0:n.WebApp)!=null&&e.HapticFeedback)?window.Telegram.WebApp.HapticFeedback:null}function Co(n="light"){var e;(e=Ne())==null||e.impactOccurred(n)}function Po(n){var e;(e=Ne())==null||e.notificationOccurred(n)}function Sn(){var n;(n=Ne())==null||n.selectionChanged()}const kn=()=>h.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),Ln=()=>h.jsxs("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 16l2-8 5 4 5-4 2 8H5z"}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 16h14"})]}),Cn=()=>h.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})}),Pn=[{path:"/",labelKey:"profile:title",icon:h.jsx(kn,{})},{path:"/subscriptions",labelKey:"subscriptions:title",icon:h.jsx(Ln,{})},{path:"/referral",labelKey:"referral:title",icon:h.jsx(Cn,{})}],Nn=()=>{const n=bt(),e=xt(),{t}=Vt();return h.jsx("nav",{className:"fixed bottom-0 inset-x-0 bg-surface-bg/80 backdrop-blur-xl border-t border-white/10 safe-area-bottom z-50",children:h.jsx("div",{className:"flex items-center justify-around h-16",children:Pn.map(r=>{const s=n.pathname===r.path;return h.jsxs("button",{onClick:()=>{Sn(),e(r.path)},className:Pe("flex flex-col items-center justify-center gap-1 flex-1 h-full transition-colors",s?"text-brand-primary":"text-content-tertiary"),children:[r.icon,h.jsx("span",{className:"text-xs font-medium",children:t(r.labelKey)})]},r.path)})})})},On=()=>h.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-surface-bg to-surface-secondary flex flex-col",children:[h.jsx("main",{className:"flex-1 pb-20 overflow-y-auto",children:h.jsx(yt,{})}),h.jsx(Nn,{})]}),Rn={primary:"relative overflow-hidden bg-gradient-to-r from-cyan-500 to-blue-600 text-white shadow-neon hover:shadow-neon-strong hover:from-cyan-400 hover:to-blue-500 hover:scale-105 active:scale-95 border border-cyan-400/30 transition-all duration-300",secondary:"bg-surface-card text-white border border-white/10 hover:border-brand-primary/30 hover:shadow-neon/20 active:scale-95 transition-all duration-300",outline:"border-2 border-brand-primary text-brand-primary hover:bg-brand-primary/10 transition-all duration-300",ghost:"text-content-tertiary hover:bg-surface-card transition-all duration-300",premium:"relative overflow-hidden bg-gradient-to-r from-yellow-500 to-pink-500 text-white shadow-gold hover:from-yellow-400 hover:to-pink-400 hover:scale-105 active:scale-95 transition-all duration-300"},$n={sm:"h-10 px-4 text-sm",md:"h-12 px-6 text-base",lg:"h-14 px-8 text-lg"},jn=ke.forwardRef(({className:n,variant:e="primary",size:t="md",fullWidth:r=!1,isLoading:s=!1,children:o,disabled:i,...a},l)=>h.jsxs("button",{className:Pe("inline-flex items-center justify-center rounded-xl font-medium transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",Rn[e],$n[t],r&&"w-full",n),ref:l,disabled:s||i,...a,children:[s?h.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):null,o]}));jn.displayName="Button";const he=({className:n,variant:e="text",width:t,height:r})=>h.jsx("div",{className:Pe("animate-pulse bg-surface-elevated",{"h-4 rounded":e==="text","rounded-full":e==="circular","rounded-lg":e==="rectangular"},n),style:{width:t,height:r}}),In=I.lazy(()=>Le(()=>import("./ProfilePage-CwsbkzAx.js"),__vite__mapDeps([0,1,2,3,4,5]))),En=I.lazy(()=>Le(()=>import("./SubscriptionsPage-CNZBCCuv.js"),__vite__mapDeps([6,1,2,3,4]))),An=I.lazy(()=>Le(()=>import("./ReferralPage-b6ONrmmQ.js"),__vite__mapDeps([7,1,2,4,5])));function Tn(){return h.jsxs("div",{className:"p-4 space-y-4",children:[h.jsx(he,{className:"h-28",variant:"rectangular"}),h.jsx(he,{className:"h-24",variant:"rectangular"}),h.jsx(he,{className:"h-64",variant:"rectangular"})]})}function Fn(){return h.jsx(I.Suspense,{fallback:h.jsx(Tn,{}),children:h.jsx(vt,{children:h.jsxs(ae,{element:h.jsx(On,{}),children:[h.jsx(ae,{path:"/",element:h.jsx(In,{})}),h.jsx(ae,{path:"/subscriptions",element:h.jsx(En,{})}),h.jsx(ae,{path:"/referral",element:h.jsx(An,{})})]})})})}class zn extends ke.Component{constructor(e){super(e),this.state={hasError:!1,error:""}}static getDerivedStateFromError(e){return{hasError:!0,error:e.message}}render(){return this.state.hasError?h.jsx("div",{className:"min-h-screen bg-[#0f0f23] flex items-center justify-center p-6",children:h.jsxs("div",{className:"text-center max-w-sm",children:[h.jsx("div",{className:"w-16 h-16 rounded-full bg-red-500/10 flex items-center justify-center mx-auto mb-4",children:h.jsx("svg",{className:"w-8 h-8 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),h.jsx("h2",{className:"text-white text-lg font-bold mb-2",children:"Something went wrong"}),h.jsx("p",{className:"text-gray-400 text-sm mb-4",children:this.state.error}),h.jsx("button",{onClick:()=>window.location.reload(),className:"text-[#00d4ff] text-sm font-medium",children:"Reload"})]})}):this.props.children}}function Mn(){return h.jsx(zn,{children:h.jsxs(wt,{children:[h.jsx(Fn,{}),h.jsx(ht,{position:"top-center",toastOptions:{style:{background:"#252547",color:"#fff",borderRadius:"12px"},success:{iconTheme:{primary:"#00d4ff",secondary:"#fff"}}}})]})})}const x=n=>typeof n=="string",ee=()=>{let n,e;const t=new Promise((r,s)=>{n=r,e=s});return t.resolve=n,t.reject=e,t},ze=n=>n==null?"":""+n,Un=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},Dn=/###/g,Me=n=>n&&n.indexOf("###")>-1?n.replace(Dn,"."):n,Ue=n=>!n||x(n),re=(n,e,t)=>{const r=x(e)?e.split("."):e;let s=0;for(;s{const{obj:r,k:s}=re(n,e,Object);if(r!==void 0||e.length===1){r[s]=t;return}let o=e[e.length-1],i=e.slice(0,e.length-1),a=re(n,i,Object);for(;a.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),a=re(n,i,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=t},Vn=(n,e,t,r)=>{const{obj:s,k:o}=re(n,e,Object);s[o]=s[o]||[],s[o].push(t)},ce=(n,e)=>{const{obj:t,k:r}=re(n,e);if(t)return t[r]},Bn=(n,e,t)=>{const r=ce(n,t);return r!==void 0?r:ce(e,t)},at=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?x(n[r])||n[r]instanceof String||x(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):at(n[r],e[r],t):n[r]=e[r]);return n},G=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Kn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Hn=n=>x(n)?n.replace(/[&<>"'\/]/g,e=>Kn[e]):n;class Wn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const Gn=[" ",",","?","!",";"],Jn=new Wn(20),qn=(n,e,t)=>{e=e||"",t=t||"";const r=Gn.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(r.length===0)return!0;const s=Jn.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(n);if(!o){const i=n.indexOf(t);i>0&&!s.test(n.substring(0,i))&&(o=!0)}return o},Se=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const r=e.split(t);let s=n;for(let o=0;o-1&&ln&&n.replace("_","-"),Qn={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class de{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Qn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(t)||0;this.observers[r].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s{let[a,l]=i;for(let c=0;c{let[a,l]=i;for(let c=0;c1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],r&&(Array.isArray(r)?a.push(...r):x(r)&&o?a.push(...r.split(o)):a.push(r)));const l=ce(this.data,a);return!l&&!t&&!r&&e.indexOf(".")>-1&&(e=a[0],t=a[1],r=a.slice(2).join(".")),l||!i||!x(r)?l:Se(this.data&&this.data[e]&&this.data[e][t],r,o)}addResource(e,t,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),De(this.data,a,s),o.silent||this.emit("added",e,t,r,s)}addResources(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(x(r[o])||Array.isArray(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});s.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),s=r,r=t,t=a[1]),this.addNamespaces(t);let l=ce(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?at(l,r,o):l={...l,...r},De(this.data,a,l),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var lt={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,s){return n.forEach(o=>{this.processors[o]&&(e=this.processors[o].process(e,t,r,s))}),e}};const Be={};class fe extends ge{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Un(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=T.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,t);return r&&r.res!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!qn(e,r,s);if(i&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:x(o)?[o]:o};const c=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),e=c.join(s)}return{key:e,namespaces:x(o)?[o]:o}}translate(e,t,r){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,o=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],c=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){const y=t.nsSeparator||this.options.nsSeparator;return s?{res:`${l}${y}${i}`,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${y}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:i}const f=this.resolve(e,t);let u=f&&f.res;const g=f&&f.usedKey||i,m=f&&f.exactUsedKey||i,b=Object.prototype.toString.apply(u),p=["[object Number]","[object Function]","[object RegExp]"],S=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,O=!x(u)&&typeof u!="boolean"&&typeof u!="number";if(w&&u&&O&&p.indexOf(b)<0&&!(x(S)&&Array.isArray(u))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,u,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(f.res=y,f.usedParams=this.getUsedParamsDetails(t),f):y}if(o){const y=Array.isArray(u),k=y?[]:{},N=y?m:g;for(const L in u)if(Object.prototype.hasOwnProperty.call(u,L)){const K=`${N}${o}${L}`;k[L]=this.translate(K,{...t,joinArrays:!1,ns:a}),k[L]===K&&(k[L]=u[L])}u=k}}else if(w&&x(S)&&Array.isArray(u))u=u.join(S),u&&(u=this.extendTranslation(u,e,t,r));else{let y=!1,k=!1;const N=t.count!==void 0&&!x(t.count),L=fe.hasDefaultValue(t),K=N?this.pluralResolver.getSuffix(c,t.count,t):"",Y=t.ordinal&&N?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",W=N&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),F=W&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${K}`]||t[`defaultValue${Y}`]||t.defaultValue;!this.isValidLookup(u)&&L&&(y=!0,u=F),this.isValidLookup(u)||(k=!0,u=i);const ie=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:u,A=L&&F!==u&&this.options.updateMissing;if(k||y||A){if(this.logger.log(A?"updateKey":"missingKey",c,l,i,A?F:u),o){const R=this.resolve(i,{...t,keySeparator:!1});R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let R=0;R{const E=L&&D!==u?D:ie;this.options.missingKeyHandler?this.options.missingKeyHandler(R,l,j,E,A,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(R,l,j,E,A,t),this.emit("missingKey",R,l,j,u)};this.options.saveMissing&&(this.options.saveMissingPlurals&&N?U.forEach(R=>{const j=this.pluralResolver.getSuffixes(R,t);W&&t[`defaultValue${this.options.pluralSeparator}zero`]&&j.indexOf(`${this.options.pluralSeparator}zero`)<0&&j.push(`${this.options.pluralSeparator}zero`),j.forEach(D=>{Z([R],i+D,t[`defaultValue${D}`]||F)})}):Z(U,i,F))}u=this.extendTranslation(u,e,t,f,r),k&&u===i&&this.options.appendNamespaceToMissingKey&&(u=`${l}:${i}`),(k||y)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?u=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,y?u:void 0):u=this.options.parseMissingKeyHandler(u))}return s?(f.res=u,f.usedParams=this.getUsedParamsDetails(t),f):u}extendTranslation(e,t,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=x(e)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const u=e.match(this.interpolator.nestingRegexp);d=u&&u.length}let f=r.replace&&!x(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,r.lng||this.language||s.usedLng,r),c){const u=e.match(this.interpolator.nestingRegexp),g=u&&u.length;d1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,a;return x(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,t),d=c.key;s=d;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const u=t.count!==void 0&&!x(t.count),g=u&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),m=t.context!==void 0&&(x(t.context)||typeof t.context=="number")&&t.context!=="",b=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);f.forEach(p=>{this.isValidLookup(r)||(a=p,!Be[`${b[0]}-${p}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Be[`${b[0]}-${p}`]=!0,this.logger.warn(`key "${s}" for languages "${b.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(S=>{if(this.isValidLookup(r))return;i=S;const w=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,d,S,p,t);else{let y;u&&(y=this.pluralResolver.getSuffix(S,t.count,t));const k=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(w.push(d+y),t.ordinal&&y.indexOf(N)===0&&w.push(d+y.replace(N,this.options.pluralSeparator)),g&&w.push(d+k)),m){const L=`${d}${this.options.contextSeparator}${t.context}`;w.push(L),u&&(w.push(L+y),t.ordinal&&y.indexOf(N)===0&&w.push(L+y.replace(N,this.options.pluralSeparator)),g&&w.push(L+k))}}let O;for(;O=w.pop();)this.isValidLookup(r)||(o=O,r=this.getResource(S,p,O,t))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,s):this.resourceStore.getResource(e,t,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!x(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of t)delete s[o]}return s}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}const me=n=>n.charAt(0).toUpperCase()+n.slice(1);class Ke{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=T.create("languageUtils")}getScriptPartFromCode(e){if(e=ue(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=ue(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(x(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(e)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=me(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=me(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=me(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),x(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return x(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):x(e)&&o(this.formatLanguageCode(e)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let Yn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Zn={1:n=>+(n>1),2:n=>+(n!=1),3:n=>0,4:n=>n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,5:n=>n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5,6:n=>n==1?0:n>=2&&n<=4?1:2,7:n=>n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,8:n=>n==1?0:n==2?1:n!=8&&n!=11?2:3,9:n=>+(n>=2),10:n=>n==1?0:n==2?1:n<7?2:n<11?3:4,11:n=>n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3,12:n=>+(n%10!=1||n%100==11),13:n=>+(n!==0),14:n=>n==1?0:n==2?1:n==3?2:3,15:n=>n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2,16:n=>n%10==1&&n%100!=11?0:n!==0?1:2,17:n=>n==1||n%10==1&&n%100!=11?0:1,18:n=>n==0?0:n==1?1:2,19:n=>n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3,20:n=>n==1?0:n==0||n%100>0&&n%100<20?1:2,21:n=>n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0,22:n=>n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3};const Xn=["v1","v2","v3"],_n=["v4"],He={zero:0,one:1,two:2,few:3,many:4,other:5},er=()=>{const n={};return Yn.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:Zn[e.fc]}})}),n};class tr{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=T.create("pluralResolver"),(!this.options.compatibilityJSON||_n.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=er(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=ue(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,t)}return this.pluralRulesCache[o]=i,i}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,t);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>He[s]-He[o]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(e,s,t)):[]}getSuffix(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:this.getSuffixRetroCompatible(s,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let s=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!Xn.includes(this.options.compatibilityJSON)}}const We=function(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Bn(n,e,t);return!o&&s&&x(t)&&(o=Se(n,t,r),o===void 0&&(o=Se(e,t,r))),o},be=n=>n.replace(/\$/g,"$$$$");class nr{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=T.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:u,nestingPrefixEscaped:g,nestingSuffix:m,nestingSuffixEscaped:b,nestingOptionsSeparator:p,maxReplaces:S,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:Hn,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?G(o):i||"{{",this.suffix=a?G(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=u?G(u):g||G("$t("),this.nestingSuffix=m?G(m):b||G(")"),this.nestingOptionsSeparator=p||",",this.maxReplaces=S||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>t&&t.source===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,s){let o,i,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const S=We(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(S,void 0,r,{...s,...t,interpolationkey:g}):S}const m=g.split(this.formatSeparator),b=m.shift().trim(),p=m.join(this.formatSeparator).trim();return this.format(We(t,l,b,this.options.keySeparator,this.options.ignoreJSONStructure),p,r,{...s,...t,interpolationkey:b})};this.resetRegExp();const d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>be(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?be(this.escape(g)):be(g)}].forEach(g=>{for(a=0;o=g.regex.exec(e);){const m=o[1].trim();if(i=c(m),i===void 0)if(typeof d=="function"){const p=d(e,o,s);i=x(p)?p:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))i="";else if(f){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),i="";else!x(i)&&!this.useRawValueToEscape&&(i=ze(i));const b=g.safeValue(i);if(e=e.replace(o[0],b),f?(g.regex.lastIndex+=i.length,g.regex.lastIndex-=o[0].length):g.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const a=(l,c)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let u=`{${f[1]}`;l=f[0],u=this.interpolate(u,i);const g=u.match(/'/g),m=u.match(/"/g);(g&&g.length%2===0&&!m||m.length%2!==0)&&(u=u.replace(/'/g,'"'));try{i=JSON.parse(u),c&&(i={...c,...i})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,b),`${l}${d}${u}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];i={...r},i=i.replace&&!x(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=d.shift(),l=d,c=!0}if(o=t(a.call(this,s[1].trim(),i),i),o&&s[0]===e&&!x(o))return o;x(o)||(o=ze(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),c&&(o=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const rr=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(i=>{if(i){const[a,...l]=i.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();t[d]||(t[d]=c),c==="false"&&(t[d]=!1),c==="true"&&(t[d]=!0),isNaN(c)||(t[d]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},J=n=>{const e={};return(t,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let a=e[i];return a||(a=n(ue(r),s),e[i]=a),a(t)}};class sr{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=T.create("formatter"),this.options=e,this.formats={number:J((t,r)=>{const s=new Intl.NumberFormat(t,{...r});return o=>s.format(o)}),currency:J((t,r)=>{const s=new Intl.NumberFormat(t,{...r,style:"currency"});return o=>s.format(o)}),datetime:J((t,r)=>{const s=new Intl.DateTimeFormat(t,{...r});return o=>s.format(o)}),relativetime:J((t,r)=>{const s=new Intl.RelativeTimeFormat(t,{...r});return o=>s.format(o,r.range||"day")}),list:J((t,r)=>{const s=new Intl.ListFormat(t,{...r});return o=>s.format(o)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=J(t)}format(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,l)=>{const{formatName:c,formatOptions:d}=rr(l);if(this.formats[c]){let f=a;try{const u=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},g=u.locale||u.lng||s.locale||s.lng||r;f=this.formats[c](a,g,{...d,...s,...u})}catch(u){this.logger.warn(u)}return f}else this.logger.warn(`there was no format function for ${c}`);return a},e)}}const or=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class ir extends ge{constructor(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=T.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(e,t,r,s){const o={},i={},a={},l={};return e.forEach(c=>{let d=!0;t.forEach(f=>{const u=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,f)?this.state[u]=2:this.state[u]<0||(this.state[u]===1?i[u]===void 0&&(i[u]=!0):(this.state[u]=1,d=!1,i[u]===void 0&&(i[u]=!0),o[u]===void 0&&(o[u]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(a[c]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,r){const s=e.split("|"),o=s[0],i=s[1];t&&this.emit("failedLoading",o,i,t),!t&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const a={};this.queue.forEach(l=>{Vn(l.loaded,[o],i),or(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const d=l.loaded[c];d.length&&d.forEach(f=>{a[c][f]===void 0&&(a[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const a=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&d&&s{this.read.call(this,e,t,r,s+1,o*2,i)},o);return}i(c,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(e,t);c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}return}return l(e,t,a)}prepareLoading(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();x(e)&&(e=this.languageUtils.toResolveHierarchy(e)),x(t)&&(t=[t]);const o=this.queueLoad(e,t,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,a)=>{i&&this.logger.warn(`${t}loading namespace ${o} for language ${s} failed`,i),!i&&a&&this.logger.log(`${t}loaded namespace ${o} for language ${s}`,a),this.loaded(e,i,a)})}saveMissing(e,t,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...i,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let d;c.length===5?d=c(e,t,r,s,l):d=c(e,t,r,s),d&&typeof d.then=="function"?d.then(f=>a(null,f)).catch(a):a(null,d)}catch(d){a(d)}else c(e,t,r,s,a,l)}!e||!e[0]||this.store.addResource(e[0],t,r,s)}}}const Ge=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),x(n[1])&&(e.defaultValue=n[1]),x(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Je=n=>(x(n.ns)&&(n.ns=[n.ns]),x(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),x(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),le=()=>{},ar=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class se extends ge{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Je(e),this.services={},this.logger=T,this.modules={external:[]},ar(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(x(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=Ge();this.options={...s,...this.options,...Je(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?T.init(o(this.modules.logger),this.options):T.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=sr);const f=new Ke(this.options);this.store=new Ve(this.options.resources,this.options);const u=this.services;u.logger=T,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new tr(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(u.formatter=o(d),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new nr(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new ir(o(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(g){for(var m=arguments.length,b=new Array(m>1?m-1:0),p=1;p1?m-1:0),p=1;p{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,r||(r=le),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const l=ee(),c=()=>{const d=(f,u)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(u),r(f,u)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le;const s=x(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload&&this.options.preload.forEach(a=>i(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(e,t,r){const s=ee();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=le),this.services.backendConnector.reload(e,t,o=>{s.resolve(),r(o)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&<.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const s=ee();this.emit("languageChanging",e);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},i=(l,c)=>{c?(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),t&&t(l,function(){return r.t(...arguments)})},a=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const c=x(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,d=>{i(d,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),s}getFixedT(e,t,r){var s=this;const o=function(i,a){let l;if(typeof a!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),f=2;f`${l.keyPrefix}${u}${m}`):g=l.keyPrefix?`${l.keyPrefix}${u}${i}`:i,s.t(g,l)};return x(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(t.precheck){const a=t.precheck(this,i);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!s||i(o,e)))}loadNamespaces(e,t){const r=ee();return this.options.ns?(x(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=ee();x(e)&&(e=[e]);const s=this.options.preload||[],o=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),t&&t(i)}),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Ke(Ge());return t.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new se(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new se(s);return(e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new Ve(this.store.data,s),o.services.resourceStore=o.store),o.translator=new fe(o.services,s),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),d=1;d0){var a=s.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+="; Max-Age=".concat(Math.floor(a))}if(s.domain){if(!qe.test(s.domain))throw new TypeError("option domain is invalid");i+="; Domain=".concat(s.domain)}if(s.path){if(!qe.test(s.path))throw new TypeError("option path is invalid");i+="; Path=".concat(s.path)}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+="; Expires=".concat(s.expires.toUTCString())}if(s.httpOnly&&(i+="; HttpOnly"),s.secure&&(i+="; Secure"),s.sameSite){var l=typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite;switch(l){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i},Qe={create:function(e,t,r,s){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),s&&(o.domain=s),document.cookie=mr(e,encodeURIComponent(t),o)},read:function(e){for(var t="".concat(e,"="),r=document.cookie.split(";"),s=0;s-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var s=r.substring(1),o=s.split("&"),i=0;i0){var l=o[i].substring(0,a);l===e.lookupQuerystring&&(t=o[i].substring(a+1))}}}return t}},te=null,Ye=function(){if(te!==null)return te;try{te=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{te=!1}return te},yr={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&Ye()){var r=window.localStorage.getItem(e.lookupLocalStorage);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&Ye()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},ne=null,Ze=function(){if(ne!==null)return ne;try{ne=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ne=!1}return ne},vr={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&Ze()){var r=window.sessionStorage.getItem(e.lookupSessionStorage);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&Ze()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},wr={name:"navigator",lookup:function(e){var t=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?t:void 0}},Sr={name:"htmlTag",lookup:function(e){var t,r=e.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(t=r.getAttribute("lang")),t}},kr={name:"path",lookup:function(e){var t;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof r[e.lookupFromPathIndex]!="string")return;t=r[e.lookupFromPathIndex].replace("/","")}else t=r[0].replace("/","")}return t}},Lr={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[t]}},ut=!1;try{document.cookie,ut=!0}catch{}var dt=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];ut||dt.splice(1,1);function Cr(){return{order:dt,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var ft=function(){function n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};lr(this,n),this.type="languageDetector",this.detectors={},this.init(e,t)}return fr(n,[{key:"init",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=hr(r,this.options||{},Cr()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(o){return o.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(br),this.addDetector(xr),this.addDetector(yr),this.addDetector(vr),this.addDetector(wr),this.addDetector(Sr),this.addDetector(kr),this.addDetector(Lr)}},{key:"addDetector",value:function(t){return this.detectors[t.name]=t,this}},{key:"detect",value:function(t){var r=this;t||(t=this.options.order);var s=[];return t.forEach(function(o){if(r.detectors[o]){var i=r.detectors[o].lookup(r.options);i&&typeof i=="string"&&(i=[i]),i&&(s=s.concat(i))}}),s=s.map(function(o){return r.options.convertDetectedLanguage(o)}),this.services.languageUtils.getBestMatchFromCodes?s:s.length>0?s[0]:null}},{key:"cacheUserLanguage",value:function(t,r){var s=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(function(o){s.detectors[o]&&s.detectors[o].cacheUserLanguage(t,s.options)}))}}])}();ft.type="languageDetector";const Pr="Close",Nr="Buy",Or="Cancel",Rr="Confirm",$r="Loading...",jr="Error",Ir="Success",Er="Retry",Ar="Copied!",Tr={close:Pr,buy:Nr,cancel:Or,confirm:Rr,loading:$r,error:jr,success:Ir,retry:Er,copied:Ar},Fr="Your Profile",zr="Credit Balance",Mr="Current Plan",Ur="View Plans",Dr="Manage Plan",Vr="Credit Usage",Br="Total Spent",Kr="Requests",Hr={text:"Text",image:"Image",video:"Video",audio:"Audio",money:"Money"},Wr={title:Fr,creditBalance:zr,currentPlan:Mr,viewPlans:Ur,managePlan:Dr,creditUsage:Vr,totalSpent:Br,totalRequests:Kr,balances:Hr},Gr="Subscriptions",Jr="Credits: {{count}}",qr="What's Included",Qr={allModels:"Access to all neural networks",referralBonus:"{{percentage}}% referral program payout"},Yr={title:Gr,credits:Jr,whatsIncluded:qr,features:Qr},Zr="Referral Program",Xr="Send your unique links to friends and earn together with {{botName}}.",_r="Create Link",es="Benefits",ts="My Referral Links",ns="Invited: {{count}}",rs="Credits Purchased: {{count}}",ss="Copy Link",os="Swipe left or right to view other links.",is="LINK #{{number}}",as={title:Zr,description:Xr,createLink:_r,benefits:es,myLinks:ts,invited:ns,creditsPurchased:rs,copyLink:ss,swipeHint:os,linkLabel:is},ls="Plans",cs="Choose Your Plan",us="Unlock more AI models and credits",ds="Compare Plans",fs="Current Plan",gs="Upgrade",ps="Downgrade",hs="Cancel Plan",ms="Features",bs="Credits",xs="Unlimited",ys="/mo",vs="Contact Us",ws="Popular",Ss={free:"Free",basic:"Basic",pro:"Pro",vip:"VIP",elite:"Elite",enterprise:"Enterprise"},ks={title:ls,choosePlan:cs,subtitle:us,compareTitle:ds,currentPlan:fs,upgrade:gs,downgrade:ps,cancel:hs,features:ms,credits:bs,unlimited:xs,perMonth:ys,contactUs:vs,popular:ws,tiers:Ss},Ls="Закрыть",Cs="Купить",Ps="Отмена",Ns="Подтвердить",Os="Загрузка...",Rs="Ошибка",$s="Успешно",js="Повторить",Is="Скопировано!",Es={close:Ls,buy:Cs,cancel:Ps,confirm:Ns,loading:Os,error:Rs,success:$s,retry:js,copied:Is},As="Ваш Профиль",Ts="Баланс кредитов",Fs="Текущий тариф",zs="Купить дополнительные кредиты",Ms="Всего потрачено",Us={text:"Текст",image:"Изображения",video:"Видео",audio:"Аудио",money:"Деньги"},Ds={title:As,creditBalance:Ts,currentPlan:Fs,buyCredits:zs,totalSpent:Ms,balances:Us},Vs="Подписки",Bs="Кредитов: {{count}}",Ks="Что входит в тариф",Hs={allModels:"Доступ ко всем нейросетям",referralBonus:"{{percentage}}% к выплате в реферальной программе"},Ws={title:Vs,credits:Bs,whatsIncluded:Ks,features:Hs},Gs="Партнёрство",Js="Отправляйте друзьям свои уникальные ссылки и зарабатывайте вместе с {{botName}}.",qs="Создать ссылку",Qs="Привилегии",Ys="Мои реферальные ссылки",Zs="Приглашено: {{count}}",Xs="Куплено кредитов: {{count}}",_s="Скопировать ссылку",eo="Свайпните влево или вправо, чтобы посмотреть остальные ссылки.",to="ССЫЛКА #{{number}}",no={title:Gs,description:Js,createLink:qs,benefits:Qs,myLinks:Ys,invited:Zs,creditsPurchased:Xs,copyLink:_s,swipeHint:eo,linkLabel:to},ro="Тарифы",so="Выберите тариф",oo="Откройте доступ к новым моделям и кредитам",io="Сравнить тарифы",ao="Текущий тариф",lo="Улучшить",co="Понизить",uo="Отменить тариф",fo="Возможности",go="Кредиты",po="Безлимит",ho="/мес",mo="Связаться",bo="Популярный",xo={free:"Бесплатный",basic:"Базовый",pro:"Про",vip:"VIP",elite:"Элит",enterprise:"Корпоративный"},yo={title:ro,choosePlan:so,subtitle:oo,compareTitle:io,currentPlan:ao,upgrade:lo,downgrade:co,cancel:uo,features:fo,credits:go,unlimited:po,perMonth:ho,contactUs:mo,popular:bo,tiers:xo},vo={en:{common:Tr,profile:Wr,packages:Yr,referral:as,subscriptions:ks},ru:{common:Es,profile:Ds,packages:Ws,referral:no,subscriptions:yo}};$.use(ft).use(Ft).init({resources:vo,fallbackLng:"en",defaultNS:"common",ns:["common","profile","packages","referral","subscriptions"],interpolation:{escapeValue:!1},detection:{order:["querystring","navigator"],caches:[]}});function Oe(){var n;return typeof window<"u"&&((n=window.Telegram)!=null&&n.WebApp)?window.Telegram.WebApp:null}function wo(){const n=Oe();if(!n){console.warn("Telegram WebApp SDK not available - running outside Telegram");return}n.ready(),n.expand(),n.setHeaderColor("#0a0a0a"),n.setBackgroundColor("#0a0a0a");const e=n.initDataUnsafe.user;if(e!=null&&e.language_code){const t=e.language_code.startsWith("ru")?"ru":"en";$.changeLanguage(t)}}function No(){var n;return((n=Oe())==null?void 0:n.initDataUnsafe.user)??null}function Oo(){var n;return((n=Oe())==null?void 0:n.initData)??""}try{wo(),xe.createRoot(document.getElementById("root")).render(h.jsx(ke.StrictMode,{children:h.jsx(Mn,{})}))}catch(n){const e=n instanceof Error?n.message+` `+n.stack:String(n),t=document.getElementById("loading-fallback");t&&(t.style.whiteSpace="pre-wrap",t.style.padding="20px",t.style.fontSize="12px",t.style.color="#ff6b6b",t.textContent=`App failed to load: `+e),console.error("App failed to load:",n)}export{jn as B,he as S,Co as a,Po as b,Pe as c,Oo as d,No as g,Sn as h,Vt as u};