1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6843],{68571:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{cancelIdleCallback:function(){return i},requestIdleCallback:function(){return s}});let s="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4147:e=>{e.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_246ccd",variable:"__variable_246ccd"}},38489:e=>{e.exports={style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"},className:"__className_c29908",variable:"__variable_c29908"}},79876:(e,t,s)=>{"use strict";s.d(t,{Qv:()=>h,hw:()=>u});var i=s(41277),r=s(84403);function n(e){return e}
1function a(e){return e.state.isPaused}function o(e){return"success"===e.state.status}function l(e){return!0}function u(e,t={}){let s=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??a,i=e.getMutationCache().getAll().flatMap(e=>s(e)?[{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}]:[]),h=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??o,c=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors??l,d=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??n;return{mutations:i,queries:e.getQueryCache().getAll().flatMap(e=>h(e)?[{dehydratedAt:Date.now(),state:{...e.state,...void 0!==e.state.data&&{data:d(e.state.data)}},queryKey:e.queryKey,queryHash:e.queryHash,..."pending"===e.state.status&&{promise:(()=>{let t=e.promise?.then(d).catch(e=>c(e)?Promise.reject(Error("redacted")):Promise.reject(e));return t?.catch(r.lQ),t})()},...e.meta&&{meta:e.meta}}]:[])}}function h(e,t,s){if("object"!=typeof t||null===t)return;let a=e.getMutationCache(),o=e.getQueryCache(),l=s?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??n,u=t.mutations||[],h=t.queries||[];u.forEach(({state:t,...i})=>{a.build(e,{...e.getDefaultOptions().hydrate?.mutations,...s?.defaultOptions?.mutations,...i},t)}),h.forEach(({queryKey:t,state:n,queryHash:a,meta:u,promise:h,dehydratedAt:c})=>{let d=h?(0,i.b)(h):void 0,p=void 0===n.data?d?.data:n.data,f=void 0===p?p:l(p),g=o.get(a),m=g?.state.status==="pending",y=g?.state.fetchStatus==="fetching";if(g){let e=d&&void 0!==c&&c>g.state.dataUpdatedAt;if(n.dataUpdatedAt>g.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=n;g.setState({...t,data:f})}}else g=o.build(e,{...e.getDefaultOptions().hydrate?.queries,...s?.defaultOptions?.queries,queryKey:t,queryHash:a,meta:u},{...n,data:f,fetchStatus:"idle",status:void 0!==f?"success":n.status});h&&!m&&!y&&(void 0===c||c>g.state.dataUpdatedAt)&&g.fetch(void 0,{initialPromise:Promise.resolve(h).then(l)}).catch(r.lQ)})}},30460:(e,t,s)=>{"use strict";s.d(t,{E:()=>L});var i=s(84403),r=s(71768),n=r.Zq,a=function(){let e=[],t=0,s=e=>{e()},i=e=>{e()},r=n,a=i=>{t?e.push(i):r(()=>{s(i)})},o=()=>{let t=e;e=[],t.length&&r(()=>{i(()=>{t.forEach(e=>{s(e)})})})};return{batch:e=>{let s;t++;try{s=e()}finally{--t||o()}return s},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{s=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{r=e}}}(),o=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},l=new class extends o{#e;#t;#s;constructor(){super(),this.#s=e=>{if("undefined"!=typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#s=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}},u=new class extends o{#i=!0;#t;#s;constructor(){super(),this.#s=e=>{if("undefined"!=typeof window&&window.addEventListener){let t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#s=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#i!==e&&(this.#i=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#i}},h=s(41277),c=(()=>{let e=()=>i.S$;return{isServer:()=>e(),setIsServer(t){e=t}}})();function d(e){return Math.min(1e3*2**e,3e4)}function p(e){return(e??"online")!=="online"||u.isOnline()}
1var f=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function g(e){let t,s=!1,r=0,n=(0,h.T)(),a=()=>"pending"!==n.status,o=()=>l.isFocused()&&("always"===e.networkMode||u.isOnline())&&e.canRun(),g=()=>p(e.networkMode)&&e.canRun(),m=e=>{a()||(t?.(),n.resolve(e))},y=e=>{a()||(t?.(),n.reject(e))},v=()=>new Promise(s=>{t=e=>{(a()||o())&&s(e)},e.onPause?.()}).then(()=>{t=void 0,a()||e.onContinue?.()}),b=()=>{let t;if(a())return;let n=0===r?e.initialPromise:void 0;try{t=n??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(m).catch(t=>{if(a())return;let n=e.retry??(c.isServer()?0:3),l=e.retryDelay??d,u="function"==typeof l?l(r,t):l,h=!0===n||"number"==typeof n&&r<n||"function"==typeof n&&n(r,t);if(s||!h){y(t);return}r++,e.onFail?.(r,t),(0,i.yy)(u).then(()=>o()?void 0:v()).then(()=>{s?y(t):b()})})};return{promise:n,status:()=>n.status,cancel:t=>{if(!a()){let s=new f(t);y(s),e.onCancel?.(s)}},continue:()=>(t?.(),n),cancelRetry:()=>{s=!0},continueRetry:()=>{s=!1},canStart:g,start:()=>(g()?b():v().then(b),n)}}var m=class{#r;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,i.gn)(this.gcTime)&&(this.#r=r.zs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(c.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#r&&(r.zs.clearTimeout(this.#r),this.#r=void 0)}},y=class extends m{#n;#a;#o;#l;#u;#h;#c;constructor(e){super(),this.#c=!1,this.#h=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#l=e.client,this.#o=this.#l.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#n=b(this.options),this.state=e.state??this.#n,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#u?.promise}setOptions(e){if(this.options={...this.#h,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=b(this.options);void 0!==e.data&&(this.setState(v(e.data,e.dataUpdatedAt)),this.#n=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#o.remove(this)}setData(e,t){let s=(0,i.pl)(this.state.data,e,this.options);return this.#d({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e,t){this.#d({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#u?.promise;return this.#u?.cancel(e),t?t.then(i.lQ).catch(i.lQ):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#n}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,i.Eh)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===i.hT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,i.d2)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,i.j3)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#u?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#u?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#u&&(this.#c||this.#p()?this.#u.cancel({revert:!0}):this.#u.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#p(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&this.#u?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#u)return this.#u.continueRetry(),this.#u.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let s=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#c=!0,s.signal)}
1)},n=()=>{let e=(0,i.ZM)(this.options,t),s=(()=>{let e={client:this.#l,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return(this.#c=!1,this.options.persister)?this.options.persister(e,s,this):e(s)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:n};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#a=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#d({type:"fetch",meta:a.fetchOptions?.meta}),this.#u=g({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof f&&e.revert&&this.setState({...this.#a,fetchStatus:"idle"}),s.abort()},onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#u.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#o.config.onSuccess?.(e,this),this.#o.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof f){if(e.silent)return this.#u.promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#d({type:"error",error:e}),this.#o.config.onError?.(e,this),this.#o.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var s;return{...t,...(s=t.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:p(this.options.networkMode)?"fetching":"paused",...void 0===s&&{error:null,status:"pending"}}),fetchMeta:e.meta??null};case"success":let i={...t,...v(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#a=e.manual?i:void 0,i;case"error":let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),a.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#o.notify({query:this,type:"updated",action:e})})}};function v(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function b(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,s=void 0!==t,i=s?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var w=class extends o{constructor(e={}){super(),this.config=e,this.#f=new Map}#f;build(e,t,s){let r=t.queryKey,n=t.queryHash??(0,i.F$)(r,t),a=this.get(n);return a||(a=new y({client:e,queryKey:r,queryHash:n,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#f.has(e.queryHash)||(this.#f.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#f.get(e.queryHash);t&&(e.destroy(),t===e&&this.#f.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){a.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#f.get(e)}getAll(){return[...this.#f.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i.MK)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,i.MK)(e,t)):t}notify(e){a.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){a.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){a.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},x=class extends m{#l;#g;#m;#u;constructor(e){super(),this.#l=e.client,this.mutationId=e.mutationId,this.#m=e.mutationCache,this.#g=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#g.includes(e)||(this.#g.push(e),this.clearGcTimeout(),this.#m.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#g=this.#g.filter(t=>t!==e),this.scheduleGc(),this.#m.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#g.length||("pending"===this.state.status?this.scheduleGc():this.#m.remove(this))}continue(){return this.#u?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#d({type:"continue"})},s={client:this.#l,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#u=g({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#m.canRun(this)});let i="pending"===this.state.status,r=!this.#u.canStart();try{if(i)t();else{this.#d({type:"pending",variables:e,isPaused:r}),this.#m.config.onMutate&&await this.#m.config.onMutate(e,this,s);let t=await this.options.onMutate?.(e,s);t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:r})}let n=await this.#u.start();return await this.#m.config.onSuccess?.(n,e,this.state.context,this,s),await this.options.onSuccess?.(n,e,this.state.context,s),await this.#m.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,e,this.state.context,s),this.#d({type:"success",data:n}),n}catch(t){try{await this.#m.config.onError?.(t,e,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,s)}catch(e){Promise.reject(e)}try{await this.#m.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,s)}catch(e){Promise.reject(e)}throw this.#d({type:"error",error:t}),t}finally{this.#m.runNext(this)}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
1case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),a.batch(()=>{this.#g.forEach(t=>{t.onMutationUpdate(e)}),this.#m.notify({mutation:this,type:"updated",action:e})})}},S=class extends o{constructor(e={}){super(),this.config=e,this.#y=new Set,this.#v=new Map,this.#b=0}#y;#v;#b;build(e,t,s){let i=new x({client:e,mutationCache:this,mutationId:++this.#b,options:e.defaultMutationOptions(t),state:s});return this.add(i),i}add(e){this.#y.add(e);let t=O(e);if("string"==typeof t){let s=this.#v.get(t);s?s.push(e):this.#v.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#y.delete(e)){let t=O(e);if("string"==typeof t){let s=this.#v.get(t);if(s){if(s.length>1){let t=s.indexOf(e);-1!==t&&s.splice(t,1)}else s[0]===e&&this.#v.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=O(e);if("string"!=typeof t)return!0;{let s=this.#v.get(t),i=s?.find(e=>"pending"===e.state.status);return!i||i===e}}runNext(e){let t=O(e);if("string"!=typeof t)return Promise.resolve();{let s=this.#v.get(t)?.find(t=>
1t!==e&&t.state.isPaused);return s?.continue()??Promise.resolve()}}clear(){a.batch(()=>{this.#y.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#y.clear(),this.#v.clear()})}getAll(){return Array.from(this.#y)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i.nJ)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,i.nJ)(e,t))}notify(e){a.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return a.batch(()=>Promise.all(e.map(e=>e.continue().catch(i.lQ))))}};function O(e){return e.options.scope?.id}function k(e){return{onFetch:(t,s)=>{let r=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},u=0,h=async()=>{let s=!1,h=e=>{(0,i.ox)(e,()=>t.signal,()=>s=!0)},c=(0,i.ZM)(t.options,t.fetchOptions),d=async(e,r,n)=>{if(s)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:n?"backward":"forward",meta:t.options.meta};return h(e),e})(),o=await c(a),{maxPages:l}=t.options,u=n?i.ZZ:i.y9;return{pages:u(e.pages,o,l),pageParams:u(e.pageParams,r,l)}};if(n&&a.length){let e="backward"===n,t={pages:a,pageParams:o},s=(e?function(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}:C)(r,t);l=await d(t,s,e)}else{let t=e??a.length;do{let e=0===u?o[0]??r.initialPageParam:C(r,l);if(u>0&&null==e)break;l=await d(l,e),u++}while(u<t)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=h}}}function C(e,{pages:t,pageParams:s}){let i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,s[i],s):void 0}var L=class{#w;#m;#h;#x;#S;#O;#k;#C;constructor(e={}){this.#w=e.queryCache||new w,this.#m=e.mutationCache||new S,this.#h=e.defaultOptions||{},this.#x=new Map,this.#S=new Map,this.#O=0}mount(){this.#O++,1===this.#O&&(this.#k=l.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#w.onFocus())}),this.#C=u.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#w.onOnline())}))}unmount(){this.#O--,0===this.#O&&(this.#k?.(),this.#k=void 0,this.#C?.(),this.#C=void 0)}isFetching(e){return this.#w.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#m.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#w.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#w.build(this,t),r=s.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime((0,i.d2)(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#w.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){let r=this.defaultQueryOptions({queryKey:e}),n=this.#w.get(r.queryHash),a=n?.state.data,o=(0,i.Zw)(t,a);if(void 0!==o)return this.#w.build(this,r).setData(o,{...s,manual:!0})}setQueriesData(e,t,s){return a.batch(()=>this.#w.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,s)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#w.get(t.queryHash)?.state}removeQueries(e){let t=this.#w;a.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let s=this.#w;return a.batch(()=>(s.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let s={revert:!0,...t};return Promise.all(a.batch(()=>this.#w.findAll(e).map(e=>e.cancel(s)))).then(i.lQ).catch(i.lQ)}invalidateQueries(e,t={}){return a.batch(()=>(this.#w.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let s={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(a.batch(()=>this.#w.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(i.lQ)),"paused"===e.state.fetchStatus?Promise.resolve():t}
1))).then(i.lQ)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#w.build(this,t);return s.isStaleByTime((0,i.d2)(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(i.lQ).catch(i.lQ)}fetchInfiniteQuery(e){return e.behavior=k(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(i.lQ).catch(i.lQ)}ensureInfiniteQueryData(e){return e.behavior=k(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return u.isOnline()?this.#m.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#w}getMutationCache(){return this.#m}getDefaultOptions(){return this.#h}setDefaultOptions(e){this.#h=e}setQueryDefaults(e,t){this.#x.set((0,i.EN)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#x.values()],s={};return t.forEach(t=>{(0,i.Cp)(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#S.set((0,i.EN)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#S.values()],s={};return t.forEach(t=>{(0,i.Cp)(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#h.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,i.F$)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===i.hT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#h.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#w.clear(),this.#m.clear()}}},41277:(e,t,s)=>{"use strict";s.d(t,{T:()=>r,b:()=>n});var i=s(84403);function r(){let e,t;let s=new Promise((s,i)=>{e=s,t=i});function i(e){Object.assign(s,e),delete s.resolve,delete s.reject}return s.status="pending",s.catch(()=>{}),s.resolve=t=>{i({status:"fulfilled",value:t}),e(t)},s.reject=e=>{i({status:"rejected",reason:e}),t(e)},s}function n(e){let t;if(e.then(e=>(t=e,e),i.lQ)?.catch(i.lQ),void 0!==t)return{data:t}}},71768:(e,t,s)=>{"use strict";s.d(t,{Zq:()=>n,zs:()=>r});var i={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#L=i;#P=!1;setTimeoutProvider(e){this.#L=e}setTimeout(e,t){return this.#L.setTimeout(e,t)}clearTimeout(e){this.#L.clearTimeout(e)}setInterval(e,t){return this.#L.setInterval(e,t)}clearInterval(e){this.#L.clearInterval(e)}};function n(e){setTimeout(e,0)}},84403:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>g,EN:()=>f,Eh:()=>h,F$:()=>p,MK:()=>c,S$:()=>r,ZM:()=>C,ZZ:()=>O,Zw:()=>a,d2:()=>u,gn:()=>o,hT:()=>k,j3:()=>l,lQ:()=>n,nJ:()=>d,ox:()=>L,pl:()=>x,y9:()=>S,yy:()=>w});var i=s(71768),r="undefined"==typeof window||"Deno"in globalThis;function n(){}function a(e,t){return"function"==typeof e?e(t):e}function o(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function h(e,t){return"function"==typeof e?e(t):e}function c(e,t){let{type:s="all",exact:i,fetchStatus:r,predicate:n,queryKey:a,stale:o}=e;if(a){if(i){if(t.queryHash!==p(a,t.options))return!1}else if(!g(t.queryKey,a))return!1}if("all"!==s){let e=t.isActive();if("active"===s&&!e||"inactive"===s&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!r||r===t.state.fetchStatus)&&(!n||!!n(t))}function d(e,t){let{exact:s,status:i,predicate:r,mutationKey:n}=e;if(n){if(!t.options.mutationKey)return!1;if(s){if(f(t.options.mutationKey)!==f(n))return!1}else if(!g(t.options.mutationKey,n))return!1}return(!i||t.state.status===i)&&(!r||!!r(t))}function p(e,t){return(t?.queryKeyHashFn||f)(e)}function f(e){return JSON.stringify(e,(e,t)=>v(t)?Object.keys(t).sort().reduce((e,s)=>(e[s]=t[s],e),{}):t)}function g(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(s=>
1g(e[s],t[s]))}var m=Object.prototype.hasOwnProperty;function y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function v(e){if(!b(e))return!1;let t=e.constructor;if(void 0===t)return!0;let s=t.prototype;return!!(b(s)&&s.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function b(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e){return new Promise(t=>{i.zs.setTimeout(t,e)})}function x(e,t,s){return"function"==typeof s.structuralSharing?s.structuralSharing(e,t):!1!==s.structuralSharing?function e(t,s,i=0){if(t===s)return t;if(i>500)return s;let r=y(t)&&y(s);if(!r&&!(v(t)&&v(s)))return s;let n=(r?t:Object.keys(t)).length,a=r?s:Object.keys(s),o=a.length,l=r?Array(o):{},u=0;for(let h=0;h<o;h++){let o=r?h:a[h],c=t[o],d=s[o];if(c===d){l[o]=c,(r?h<n:m.call(t,o))&&u++;continue}if(null===c||null===d||"object"!=typeof c||"object"!=typeof d){l[o]=d;continue}let p=e(c,d,i+1);l[o]=p,p===c&&u++}return n===o&&u===n?t:l}(e,t):t}function S(e,t,s=0){let i=[...e,t];return s&&i.length>s?i.slice(1):i}function O(e,t,s=0){let i=[t,...e];return s&&i.length>s?i.slice(0,-1):i}var k=Symbol();function C(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==k?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function L(e,t,s){let i,r=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),e}},34416:(e,t,s)=>{"use strict";s.d(t,{f:()=>a});var i=s(12115),r=s(79876),n=s(35906),a=e=>{let{children:t,options:s={},state:a,queryClient:o}=e,l=(0,n.jE)(o),u=i.useRef(s);i.useEffect(()=>{u.current=s});let h=i.useMemo(()=>{if(a){if("object"!=typeof a)return;let e=l.getQueryCache(),t=a.queries||[],s=[],i=[];for(let r of t){let t=e.get(r.queryHash);t?(r.state.dataUpdatedAt>t.state.dataUpdatedAt||r.promise&&"pending"!==t.state.status&&"fetching"!==t.state.fetchStatus&&void 0!==r.dehydratedAt&&r.dehydratedAt>t.state.dataUpdatedAt)&&i.push(r):s.push(r)}if(s.length>0&&(0,r.Qv)(l,{queries:s},u.current),i.length>0)return i}},[l,a]);return i.useEffect(()=>{h&&(0,r.Qv)(l,{queries:h},u.current)},[l,h]),t}},35906:(e,t,s)=>{"use strict";s.d(t,{Ht:()=>o,jE:()=>a});var i=s(12115),r=s(95155),n=i.createContext(void 0),a=e=>{let t=i.useContext(n);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},o=e=>{let{client:t,children:s}=e;return i.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,r.jsx)(n.Provider,{value:t,children:s})}},57570:(e,t,s)=>{"use strict";s.d(t,{A:()=>k});let{slice:i,forEach:r}=[],n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,a=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"},i=encodeURIComponent(t),r=`${e}=${i}`;if(s.maxAge>0){let e=s.maxAge-0;if(Number.isNaN(e))throw Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(s.domain){if(!n.test(s.domain))throw TypeError("option domain is invalid");r+=`; Domain=${s.domain}`}if(s.path){if(!n.test(s.path))throw TypeError("option path is invalid");r+=`; Path=${s.path}`}if(s.expires){if("function"!=typeof s.expires.toUTCString)throw TypeError("option expires is invali
1d");r+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(r+="; HttpOnly"),s.secure&&(r+="; Secure"),s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"none":r+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return s.partitioned&&(r+="; Partitioned"),r},o={create(e,t,s,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};s&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+6e4*s)),i&&(r.domain=i),document.cookie=a(e,t,r)},read(e){let t=`${e}=`,s=document.cookie.split(";");for(let e=0;e<s.length;e++){let i=s[e];for(;" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var l={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return o.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:s,cookieMinutes:i,cookieDomain:r,cookieOptions:n}=t;s&&"undefined"!=typeof document&&o.create(s,e,i,r,n)}},u={name:"querystring",lookup(e){let t,{lookupQuerystring:s}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));let i=e.substring(1).split("&");for(let e=0;e<i.length;e++){let r=i[e].indexOf("=");r>0&&i[e].substring(0,r)===s&&(t=i[e].substring(r+1))}}return t}},h={name:"hash",lookup(e){let t,{lookupHash:s,lookupFromHashIndex:i}=e;if("undefined"!=typeof window){let{hash:e}=window.location;if(e&&e.length>2){let r=e.substring(1);if(s){let e=r.split("&");for(let i=0;i<e.length;i++){let r=e[i].indexOf("=");r>0&&e[i].substring(0,r)===s&&(t=e[i].substring(r+1))}}if(t)return t;if(!t&&i>-1){let t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;return t["number"==typeof i?i:0]?.replace("/","")}}}return t}};let c=null,d=()=>{if(null!==c)return c;try{if(!(c="undefined"!=typeof window&&null!==window.localStorage))return!1;let e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){c=!1}return c};var p={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&d())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:s}=t;s&&d()&&window.localStorage.setItem(s,e)}};let f=null,g=()=>{if(null!==f)return f;try{if(!(f="undefined"!=typeof window&&null!==window.sessionStorage))return!1;let e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){f=!1}return f};var m={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&g())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:s}=t;s&&g()&&window.sessionStorage.setItem(s,e)}},y={name:"navigator",lookup(e){let t=[];if("undefined"!=typeof navigator){let{languages:e,userLanguage:s,language:i}=navigator;if(e)for(let s=0;s<e.length;s++)t.push(e[s]);s&&t.push(s),i&&t.push(i)}return t.length>0?t:void 0}},v={name:"htmlTag",lookup(e){let t,{htmlTag:s}=e,i=s||("undefined"!=typeof document?document.documentElement:null);return i&&"function"==typeof i.getAttribute&&(t=i.getAttribute("lang")),t}},b={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;let s=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(s))return s["number"==typeof t?t:0]?.replace("/","")}},w={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e,s="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s["number"==typeof t?t+1:1]}};let x=!1;try{document.cookie,x=!0}catch(e){}let S=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];x||S.splice(1,1);let O=()=>({order:S,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class k{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return r.call(i.call(arguments,1
1),t=>{if(t)for(let s in t)void 0===e[s]&&(e[s]=t[s])}),e}(t,this.options||{},O()),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(l),this.addDetector(u),this.addDetector(p),this.addDetector(m),this.addDetector(y),this.addDetector(v),this.addDetector(b),this.addDetector(w),this.addDetector(h)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return(e.forEach(e=>{if(this.detectors[e]){let s=this.detectors[e].lookup(this.options);s&&"string"==typeof s&&(s=[s]),s&&(t=t.concat(s))}}),t=t.filter(e=>null!=e&&!("string"==typeof e&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e)))).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes)?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}k.type="languageDetector"},93768:(e,t,s)=>{"use strict";s.d(t,{Ay:()=>en});var i=s(2818);let r=e=>"string"==typeof e,n=()=>{let e,t;let s=new Promise((s,i)=>{e=s,t=i});return s.resolve=e,s.reject=t,s},a=e=>null==e?"":""+e,o=(e,t,s)=>{e.forEach(e=>{t[e]&&(s[e]=t[e])})},l=/###/g,u=e=>e&&e.indexOf("###")>-1?e.replace(l,"."):e,h=e=>!e||r(e),c=(e,t,s)=>{let i=r(t)?t.split("."):t,n=0;for(;n<i.length-1;){if(h(e))return{};let t=u(i[n]);!e[t]&&s&&(e[t]=new s),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++n}return h(e)?{}:{obj:e,k:u(i[n])}},d=(e,t,s)=>{let{obj:i,k:r}=c(e,t,Object);if(void 0!==i||1===t.length){i[r]=s;return}let n=t[t.length-1],a=t.slice(0,t.length-1),o=c(e,a,Object);for(;void 0===o.obj&&a.length;)n=`${a[a.length-1]}.${n}`,o=c(e,a=a.slice(0,a.length-1),Object),o?.obj&&void 0!==o.obj[`${o.k}.${n}`]&&(o.obj=void 0);o.obj[`${o.k}.${n}`]=s},p=(e,t,s,i)=>{let{obj:r,k:n}=c(e,t,Object);r[n]=r[n]||[],r[n].push(s)},f=(e,t)=>{let{obj:s,k:i}=c(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},g=(e,t,s)=>{let i=f(e,s);return void 0!==i?i:f(t,s)},m=(e,t,s)=>{for(let i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?r(e[i])||e[i]instanceof String||r(t[i])||t[i]instanceof String?s&&(e[i]=t[i]):m(e[i],t[i],s):e[i]=t[i]);return e},y=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var v={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let b=e=>r(e)?e.replace(/[&<>"'\/]/g,e=>v[e]):e;class w{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}let x=[" ",",","?","!",";"],S=new w(20),O=(e,t,s)=>{t=t||"",s=s||"";let i=x.filter(e=>0>t.indexOf(e)&&0>s.indexOf(e));if(0===i.length)return!0;let r=S.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`),n=!r.test(e);
1if(!n){let t=e.indexOf(s);t>0&&!r.test(e.substring(0,t))&&(n=!0)}return n},k=(e,t,s=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let i=t.split(s),r=e;for(let e=0;e<i.length;){let t;if(!r||"object"!=typeof r)return;let n="";for(let a=e;a<i.length;++a)if(a!==e&&(n+=s),n+=i[a],void 0!==(t=r[n])){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<i.length-1)continue;e+=a-e+1;break}r=t}return r},C=e=>e?.replace(/_/g,"-"),L={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class P{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||L,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,i){return i&&!this.debug?null:(r(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new P(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new P(this.logger,e)}}var E=new P;class R{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let s=this.observers[e].get(t)||0;this.observers[e].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,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,s])=>{for(let i=0;i<s;i++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let r=0;r<i;r++)s.apply(s,[e,...t])})}}class j extends R{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,i={}){let n;let a=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?n=e.split("."):(n=[e,t],s&&(Array.isArray(s)?n.push(...s):r(s)&&a?n.push(...s.split(a)):n.push(s)));let l=f(this.data,n);return(!l&&!t&&!s&&e.indexOf(".")>-1&&(e=n[0],t=n[1],s=n.slice(2).join(".")),!l&&o&&r(s))?k(this.data?.[e]?.[t],s,a):l}addResource(e,t,s,i,r={silent:!1}){let n=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=[e,t];s&&(a=a.concat(n?s.split(n):s)),e.indexOf(".")>-1&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),d(this.data,a,i),r.silent||this.emit("added",e,t,s,i)}addResources(e,t,s,i={silent:!1}){for(let i in s)(r(s[i])||Array.isArray(s[i]))&&this.addResource(e,t,i,s[i],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,r,n={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),i=s,s=t,t=a[1]),this.addNamespaces(t);let o=f(this.data,a)||{};n.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?m(o,s,r):o={...o,...s},d(this.data,a,o),n.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var D={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,r){return e.forEach(e=>{t=this.processors[e]?.process(t,s,i,r)??t}),t}};let T=Symbol("i18next/PATH_KEY");function F(e,t){let{[T]:s}=e(function(){let e;let t=[],s=Object.create(null);return s.get=(i,r)=>(e?.revoke?.(),r===T)?t:(t.push(r),(e=Proxy.revocable(i,s)).proxy),Proxy.revocable(Object.create(null),s).proxy}()),i=t?.keySeparator??".",r=t?.nsSeparator??":";if(s.length>1&&r){let e=t?.ns,n=Array.isArray(e)?e:null;if(n&&n.length>1&&n.slice(1).includes(s[0]))return`${s[0]}${r}${s.slice(1).join(i)}`}return s.join(i)}let $={},A=e=>!r(e)&&"boolean"!=typeof e&&"number"!=typeof e;class N extends R{constructor(e,t={}){super(),o(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=E.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let s={...t};if(null==e)return!1;let i=this.resolve(e,s);if(i?.res===void 0)return!1;let r=A(i.res);return!1!==s.returnObjects||!r}extractFromKey(e,t){let s=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===s&&(s=":");let i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,n=t.ns||this.options.defaultNS||[],a=s&&e.indexOf(s)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!O(e,s,i);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:r(n)?[n]:n};let a=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(a[0])>-1)&&(n=a.shift()),e=a.join(i)}return{key:e,namespaces:r(n)?[n]:n}}translate(e,t,s){let i="object"==typeof t?{...t}:t;if("object"!=typeof i&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof i&&(i={...i}),i||(i={}),null==e)return"";"function"==typeof e&&(e=F(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?F(e,{...this.options,...i}):String(e));let n=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,a=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],i),u=l[l.length-1],h=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===h&&(h=":");let c=i.lng||this.language,d=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return d?n?{res:`${u}${h}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${h}${o}`:n?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:o;let p=this.resolve(e,i),f=p?.res,g=p?.usedKey||o,m=p?.exactUsedKey||o,y=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==i.count&&!r(i.count),w=N.hasDefaultValue(i),x=b?this.pluralResolver.getSuffix(c,i.count,i):"",S=i.ordinal&&b?this.pluralResolver.getSuffix(c,i.count,{ordinal:!1}):"",O=b&&!i.ordinal&&0===i.count,k=O&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${x}`]||i[`defaultValue${S}`]||i.defaultValue,C=f;v&&!f&&w&&(C=k);let L=A(C),P=Object.prototype.toString.apply(C);if(v&&C&&L&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(P)&&!(r(y)&&Array.isArray(C))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,C,{...i,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(a){let e=Array.isArray(C),t=e?[]:{},s=e?m:g;for(let e in C)if(Object.prototype.hasOwnProperty.call(C,e)){let r=`${s}${a}${e}`;w&&!f?t[e]=this.translate(r,{...i,defaultValue:A(k)?k[e]:void 0,joinArrays:!1,ns:l}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:l}),t[e]===r&&(t[e]=C[e])}f=t}}else if(v&&r(y)&&Array.isArray(f))(f=f.join(y))&&(f=this.extendTranslation(f,e,i,s));else{let t=!1,r=!1;!this.isValidLookup(f)&&w&&(t=!0,f=k),this.isValidLookup(f)||(r=!0,f=o);let n=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:f,l=w&&k!==f&&this.options.updateMissing;if(r||t||l){if(this.logger.log(l?"updateKey":"missingKey",c,u,o,l?k:f),a){let e=this.resolve(o,{...i,keySeparator:!1});e&&e.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 e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let s=0;s<t.length;s++)e.push(t[s]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let s=(e,t,s)=>{let r=w&&s!==f?s:n;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,r,l,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,r,l,i),this.emit
1("missingKey",e,u,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);O&&i[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{s([e],o+t,i[`defaultValue${t}`]||k)})}):s(e,o,k))}f=this.extendTranslation(f,e,i,p,s),r&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${u}${h}${o}`),(r||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${h}${o}`:o,t?f:void 0,i))}return n?(p.res=f,p.usedParams=this.getUsedParamsDetails(i),p):f}extendTranslation(e,t,s,i,n){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){let a;s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});let o=r(e)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(o){let t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=s.replace&&!r(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,s.lng||this.language||i.usedLng,s),o){let t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(s.nest=!1)}!s.lng&&i&&i.res&&(s.lng=this.language||i.usedLng),!1!==s.nest&&(e=this.interpolator.nest(e,(...e)=>n?.[0]!==e[0]||s.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),s)),s.interpolation&&this.interpolator.reset()}let a=s.postProcess||this.options.postProcess,o=r(a)?[a]:a;return null!=e&&o?.length&&!1!==s.applyPostProcessor&&(e=D.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,i,n,a,o;return r(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?F(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(s))return;let l=this.extractFromKey(e,t),u=l.key;i=u;let h=l.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));let c=void 0!==t.count&&!r(t.count),d=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(r(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(e=>{this.isValidLookup(s)||(o=e,!$[`${f[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&($[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${f.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),f.forEach(i=>{let r;if(this.isValidLookup(s))return;a=i;let o=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,u,i,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(i,t.count,t));let s=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(r)&&o.push(u+e.replace(r,this.options.pluralSeparator)),o.push(u+e),d&&o.push(u+s)),p){let i=`${u}${this.options.contextSeparator||"_"}${t.context}`;o.push(i),c&&(t.ordinal&&0===e.indexOf(r)&&o.push(i+e.replace(r,this.options.pluralSeparator)),o.push(i+e),d&&o.push(i+s))}}for(;r=o.pop();)this.isValidLookup(s)||(n=r,s=this.getResource(i,e,r,t))}))})}),{res:s,usedKey:i,exactUsedKey:n,usedLng:a,usedNS:o}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}
1getUsedParamsDetails(e={}){let t=e.replace&&!r(e.replace),s=t?e.replace:e;if(t&&void 0!==e.count&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!t)for(let e of(s={...s},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete s[e];return s}static hasDefaultValue(e){let t="defaultValue";for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&void 0!==e[s])return!0;return!1}}class q{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=E.create("languageUtils")}getScriptPartFromCode(e){if(!(e=C(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=C(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(r(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let s=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let s=this.getScriptPartFromCode(e);if(this.isSupportedCode(s))return t=s;let i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>{if(e===i||!(0>e.indexOf("-")&&0>i.indexOf("-"))&&(e.indexOf("-")>0&&0>i.indexOf("-")&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),r(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){let s=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),i=[],n=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return r(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&n(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&n(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&n(this.getLanguagePartFromCode(e))):r(e)&&n(this.formatLanguageCode(e)),s.forEac
1h(e=>{0>i.indexOf(e)&&n(this.formatLanguageCode(e))}),i}}let I={zero:0,one:1,two:2,few:3,many:4,other:5},M={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class U{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=E.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let s;let i=C("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:i,type:r});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];try{s=new Intl.PluralRules(i,{type:r})}catch(r){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),M;if(!e.match(/-|_/))return M;let i=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(i,t)}return this.pluralRulesCache[n]=s,s}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return(s||(s=this.getRule("dev",t)),s)?s.resolvedOptions().pluralCategories.sort((e,t)=>I[e]-I[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,s={}){let i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}let Q=(e,t,s,i=".",n=!0)=>{let a=g(e,t,s);return!a&&n&&r(s)&&void 0===(a=k(e,s,i))&&(a=k(t,s,i)),a},K=e=>e.replace(/\$/g,"$$$$");class H{constructor(e={}){this.logger=E.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:r,prefixEscaped:n,suffix:a,suffixEscaped:o,formatSeparator:l,unescapeSuffix:u,unescapePrefix:h,nestingPrefix:c,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:b,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=r?y(r):n||"{{",this.suffix=a?y(a):o||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=c?y(c):d||y("$t("),this.nestingSuffix=p?y(p):f||y(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"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,s,i){let n,o,l;let u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=e=>{if(0>e.indexOf(this.formatSeparator)){let r=Q(t,u,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,s,{...i,...t,interpolationkey:e}):r}let r=e.split(this.formatSeparator),n=r.shift().trim(),a=r.join(this.formatSeparator).trim();return this.format(Q(t,u,n,this.options.keySeparator,this.options.ignoreJSONStructure),a,s,{...i,...t,interpolationkey:n})};this.resetRegExp();let c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>K(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?K(this.escape(e)):K(e)}].forEach(t=>{for(l=0;n=t.regex.exec(e);){let s=n[1].trim();if(void 0===(o=h(s))){if("function"==typeof c){let t=c(e,n,i);o=r(t)?t:""}else if(i&&Object.prototype.hasOwnProperty.call(i,s))o="";else if(d){o=n[0];continue}else this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),o=""}else r(o)||this.useRawValueToEscape||(o=a(o));let u=t.safeValue(o);if(e=e.replace(n[0],u),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=n[0].length):t.regex.lastIndex=0,++l>=this.maxReplaces)break}}),e}nest(e,t,s={}){let i,n,o;let l=(e,t)=>
1{let s=this.nestingOptionsSeparator;if(0>e.indexOf(s))return e;let i=e.split(RegExp(`${y(s)}[ ]*{`)),r=`{${i[1]}`;e=i[0];let n=(r=this.interpolate(r,o)).match(/'/g),a=r.match(/"/g);((n?.length??0)%2!=0||a)&&(a?.length??0)%2==0||(r=r.replace(/'/g,'"'));try{o=JSON.parse(r),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${r}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;i=this.nestingRegexp.exec(e);){let u=[];(o=(o={...s}).replace&&!r(o.replace)?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;let h=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(-1!==h&&(u=i[1].slice(h).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),i[1]=i[1].slice(0,h)),(n=t(l.call(this,i[1].trim(),o),o))&&i[0]===e&&!r(n))return n;r(n)||(n=a(n)),n||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),n=""),u.length&&(n=u.reduce((e,t)=>this.format(e,t,s.lng,{...s,interpolationkey:i[1].trim()}),n.trim())),e=e.replace(i[0],n),this.regexp.lastIndex=0}return e}}let V=e=>{let t=e.toLowerCase().trim(),s={};if(e.indexOf("(")>-1){let i=e.split("(");t=i[0].toLowerCase().trim();let r=i[1].substring(0,i[1].length-1);"currency"===t&&0>r.indexOf(":")?s.currency||(s.currency=r.trim()):"relativetime"===t&&0>r.indexOf(":")?s.range||(s.range=r.trim()):r.split(";").forEach(e=>{if(e){let[t,...i]=e.split(":"),r=i.join(":").trim().replace(/^'+|'+$/g,""),n=t.trim();s[n]||(s[n]=r),"false"===r&&(s[n]=!1),"true"===r&&(s[n]=!0),isNaN(r)||(s[n]=parseInt(r,10))}})}return{formatName:t,formatOptions:s}},_=e=>{let t={};return(s,i,r)=>{let n=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(n={...n,[r.interpolationkey]:void 0});let a=i+JSON.stringify(n),o=t[a];return o||(o=e(C(i),r),t[a]=o),o(s)}},z=e=>(t,s,i)=>e(C(s),i)(t);class B{constructor(e={}){this.logger=E.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let s=t.cacheInBuiltFormats?_:z;this.formats={number:s((e,t)=>{let s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:s((e,t)=>{let s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:s((e,t)=>{let s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:s((e,t)=>{let s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:s((e,t)=>{let s=new Intl.ListFormat(e,{...t});return e=>s.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=_(t)}format(e,t,s,i={}){let r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&0>r[0].indexOf(")")&&r.find(e=>e.indexOf(")")>-1)){let e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{let{formatName:r,formatOptions:n}=V(t);if(this.formats[r]){let t=e;try{let a=i?.formatParams?.[i.interpolationkey]||{},o=a.locale||a.lng||i.locale||i.lng||s;t=this.formats[r](e,o,{...n,...i,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}let G=(e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)};class J extends R{constructor(e,t,s,i={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=E.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(e,t,s,i){let r={},n={},a={},o={};return e.forEach(e=>{let i=!0;t.forEach(t=>{let a=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===n[a]&&(n[a]=!0):(this.state[a]=1,i=!1,void 0===n[a]&&(n[a]=!0),void 0===r[a]&&(r[a]=!0),void 0===o[t]&&(o[t]=!0)))}),i||(a[e]=!0)}),(Object.keys(r).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(n),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(o)}}loaded(e,t,s){let i=e.split("|"),r=i[0],n=i[1];
1t&&this.emit("failedLoading",r,n,t),!t&&s&&this.store.addResourceBundle(r,n,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);let a={};this.queue.forEach(s=>{p(s.loaded,[r],n),G(s,e),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(e=>{a[e]||(a[e]={});let t=s.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,s,i=0,r=this.retryTimeout,n){if(!e.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:r,callback:n});return}this.readingCalls++;let a=(a,o)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(a&&o&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,i+1,2*r,n)},r);return}n(a,o)},o=this.backend[s].bind(this.backend);if(2===o.length){try{let s=o(e,t);s&&"function"==typeof s.then?s.then(e=>a(null,e)).catch(a):a(null,s)}catch(e){a(e)}return}return o(e,t,a)}prepareLoading(e,t,s={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();r(e)&&(e=this.languageUtils.toResolveHierarchy(e)),r(t)&&(t=[t]);let n=this.queueLoad(e,t,s,i);if(!n.toLoad.length)return n.pending.length||i(),null;n.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){let s=e.split("|"),i=s[0],r=s[1];this.read(i,r,"read",void 0,void 0,(s,n)=>{s&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,s),!s&&n&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,n),this.loaded(e,s,n)})}saveMissing(e,t,s,i,r,n={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${s}" 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(null!=s&&""!==s){if(this.backend?.create){let o={...n,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;(r=5===l.length?l(e,t,s,i,o):l(e,t,s,i))&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}else l(e,t,s,i,a,o)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}}let Z=()=>({debug:!1,initAsync:!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:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),r(e[1])&&(t.defaultValue=e[1]),r(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let s=e[3]||e[2];Object.keys(s).forEach(e=>{t[e]=s[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),W=e=>(r(e.ns)&&(e.ns=[e.ns]),r(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),r(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Y=()=>{},X=e=>
1{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})},ee="__i18next_supportNoticeShown",et=()=>"undefined"!=typeof globalThis&&!!globalThis[ee]||void 0!==i&&!!i.env&&!!i.env.I18NEXT_NO_SUPPORT_NOTICE||void 0!==i&&!!i.env,es=()=>{"undefined"!=typeof globalThis&&(globalThis[ee]=!0)},ei=e=>!!(e?.modules?.backend?.name?.indexOf("Locize")>0||e?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId));class er extends R{constructor(e={},t){if(super(),this.options=W(e),this.services={},this.logger=E,this.modules={external:[]},X(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(r(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let s=Z();this.options={...s,...this.options,...W(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation}
1,void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||ei(this)||et()||("undefined"!=typeof console&&void 0!==console.info&&console.info("\uD83C\uDF10 i18next is made possible by our own product, Locize â consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \uD83D\uDC99"),es());let i=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?E.init(i(this.modules.logger),this.options):E.init(null,this.options),e=this.modules.formatter?this.modules.formatter:B;let t=new q(this.options);this.store=new j(this.options.resources,this.options);let r=this.services;r.logger=E,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new U(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(r.formatter=i(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new H(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new J(i(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=i(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=i(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new N(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Y),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[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(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let a=n(),o=()=>{let e=(e,s)=>{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),a.resolve(s),t(e,s)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),a}loadResources(e,t=Y){let s=t,i=r(e)?e:this.language;if("function"==typeof e&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return s();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),s(e)})}else s(null)}reloadResources(e,t,s){let i=n();return"function"==typeof e&&(s=e,e=void 0),"function"==typeof t&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=Y),this.services.backendConnector.reload(e,t,e=>{i.resolve(),s(e)}),i}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&D.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let s=n();
1this.emit("languageChanging",e);let i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(r,n)=>{n?this.isLanguageChangingTo===e&&(i(n),this.translator.changeLanguage(n),this.isLanguageChangingTo=void 0,this.emit("languageChanged",n),this.logger.log("languageChanged",n)):this.isLanguageChangingTo=void 0,s.resolve((...e)=>this.t(...e)),t&&t(r,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);let s=r(t)?t:t&&t[0],n=this.store.hasLanguageSomeTranslations(s)?s:this.services.languageUtils.getBestMatchFromCodes(r(t)?[t]:t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,e=>{a(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),s}getFixedT(e,t,s){let i=(e,t,...r)=>{let n,a;(n="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t}).lng=n.lng||i.lng,n.lngs=n.lngs||i.lngs,n.ns=n.ns||i.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||s||i.keyPrefix);let o={...this.options,...n};"function"==typeof n.keyPrefix&&(n.keyPrefix=F(n.keyPrefix,o));let l=this.options.keySeparator||".";return n.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=F(e,o)),`${n.keyPrefix}${l}${e}`)):("function"==typeof e&&(e=F(e,o)),a=n.keyPrefix?`${n.keyPrefix}${l}${e}`:e),this.t(a,n)};return r(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=s,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
1if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;let n=(e,t)=>{let s=this.services.backendConnector.state[`${e}|${t}`];return -1===s||0===s||2===s};if(t.precheck){let e=t.precheck(this,n);if(void 0!==e)return e}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||n(s,e)&&(!i||n(r,e)))}loadNamespaces(e,t){let s=n();return this.options.ns?(r(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){let s=n();r(e)&&(e=[e]);let i=this.options.preload||[],a=e.filter(e=>0>i.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=i.concat(a),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new q(Z());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){let s=new er(e,t);return s.createInstance=er.createInstance,s}cloneInstance(e={},t=Y){let s=e.forkResourceStore;s&&delete e.forkResourceStore;let i={...this.options,...e,isClone:!0},r=new er(i);if((void 0!==e.debug||void 0!==e.prefix)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s){let e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((s,i)=>(s[i]={...e[t][i]},s),e[t]),e),{});r.store=new j(e,i),r.services.resourceStore=r.store}if(e.interpolation){let t={...Z().interpolation,...this.options.interpolation,...e.interpolation},s={...i,interpolation:t};r.services.interpolator=new H(s)}return r.translator=new N(r.services,i),r.translator.on("*",(e,...t)=>{r.emit(e,...t)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let en=er.createInstance();en.createInstance,en.dir,en.init,en.loadResources,en.reloadResources,en.use,en.changeLanguage,en.getFixedT,en.t,en.exists,en.setDefaultNamespace,en.hasLoadedNamespace,en.loadNamespaces,en.loadLanguages},67113:(e,t,s)=>{"use strict";s.d(t,{D:()=>h,N:()=>c});var i=s(12115),r=(e,t,s,i,r,n,a,o)=>{let l=document.documentElement,u=["light","dark"];function h(t){(Array.isArray(e)?e:[e]).forEach(e=>{let s="class"===e,i=s&&n?r.map(e=>n[e]||e):r;s?(l.classList.remove(...i),l.classList.add(n&&n[t]?n[t]:t)):l.setAttribute(e,t)}),o&&u.includes(t)&&(l.style.colorScheme=t)}if(i)h(i);else try{let e=localStorage.getItem(t)||s,i=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;h(i)}catch(e){}},n=["light","dark"],a="(prefers-color-scheme: dark)",o="undefined"==typeof window,l=i.createContext(void 0),u={setTheme:e=>{},themes:[]},h=()=>{var e;return null!=(e=i.useContext(l))?e:u},c=e=>i.useContext(l)?i.createElement(i.Fragment,null,e.children):i.createElement(p,{...e}),d=["light","dark"],p=e=>{let{forcedTheme:t,disableTransitionOnChange:s=!1,enableSystem:r=!0,enableColorScheme:o=!0,storageKey:u="theme",themes:h=d,defaultTheme:c=r?"system":"light",attribute:p="data-theme",value:v,children:b,nonce:w,scriptProps:x}=e,[S,O]=i.useState(()=>g(u,c)),[k,C]=i.useState(()=>"system"===S?y():S),L=v?Object.values(v):h,P=i.useCallback(e=>{let t=e;if(!t)return;"system"===e&&r&&(t=y());let i=v?v[t]:t,a=s?m(w):null,l=document.documentElement,u=e=>{"class"===e?(l.classList.remove(...L),i&&l.classList.add(i)):e.startsWith("data-")&&(i?l.setAttribute(e,i):l.removeAttribute(e))};if(Array.isArray(p)?p.forEach(u):u(p),o){let e=n.includes(c)?c:null,s=n.includes(t)?t:e;l.style.colorScheme=s}null==a||a()},[w]),E=i.useCallback(e=>{let t="function"==typeof e?e(S):e;O(t);try{localStorage.setItem(u,t)}catch(e){}},[S]),R=i.useCallback(e=>{C(y(e)),"system"===S&&r&&!t&&P("system")},[S,t]);i.useEffect(()=>{let e=window.matchMedia(a);return e.addListener(R),R(e),()=>e.removeListener(R)},[R]),i.useEffect(()=>{let e=e=>{e.key===u&&(e.newValue?O(e.newValue):E(c))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[E]),i.useEffect(()=>{P(null!=t?t:S)},[t,S]);let j=i.useMemo(()=>({theme:S,setTheme:E,forcedTheme:t,resolvedTheme:"system"===S?k:S,themes:r?[...h,"system"]:h,systemTheme:r?k:void 0}),[S,E,t,k,r,h]);return i.createElement(l.Provider,{value:j},i.createElement(f,{forcedTheme:t,storageKey:u,attribute:p,enableSystem:r,enableColorScheme:o,defaultTheme:c,value:v,themes:h,nonce:w,scriptProps:x}),b)},f=i.memo(e=>{let{forcedTheme:t,storageKey:s,attribute:n,enableSystem:a,enableColorScheme:o,defaultTheme:l,value:u,themes:h,nonce:c,scriptProps:d}=e,p=JSON.stringify([n,s,l,t,h,u,a,o]).slice(1,-1);return i.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?c:"",dangerouslySetInnerHTML:{__html:"(".concat(r.toString(),")(").concat(p,")")}})}),g=(e,t)=>{let s;if(!o){try{s=localStorage.getItem(e)||void 0}catch(e){}return s||t}},m=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},y=e=>
1(e||(e=window.matchMedia(a)),e.matches?"dark":"light")}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.