var C4=Object.defineProperty,A4=Object.defineProperties;var O4=Object.getOwnPropertyDescriptors;var Gu=Object.getOwnPropertySymbols;var $b=Object.prototype.hasOwnProperty,Wb=Object.prototype.propertyIsEnumerable;var rc=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),M4=e=>{throw TypeError(e)};var ng=(e,t,a)=>t in e?C4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ie=(e,t)=>{for(var a in t||(t={}))$b.call(t,a)&&ng(e,a,t[a]);if(Gu)for(var a of Gu(t))Wb.call(t,a)&&ng(e,a,t[a]);return e},Ee=(e,t)=>A4(e,O4(t));var fn=(e,t)=>{var a={};for(var s in e)$b.call(e,s)&&t.indexOf(s)<0&&(a[s]=e[s]);if(e!=null&&Gu)for(var s of Gu(e))t.indexOf(s)<0&&Wb.call(e,s)&&(a[s]=e[s]);return a};var L4=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Kn=(e,t,a)=>ng(e,typeof t!="symbol"?t+"":t,a);var oe=(e,t,a)=>new Promise((s,i)=>{var d=g=>{try{f(a.next(g))}catch(p){i(p)}},c=g=>{try{f(a.throw(g))}catch(p){i(p)}},f=g=>g.done?s(g.value):Promise.resolve(g.value).then(d,c);f((a=a.apply(e,t)).next())}),Zl=function(e,t){this[0]=e,this[1]=t},sg=(e,t,a)=>{var s=(c,f,g,p)=>{try{var x=a[c](f),y=(f=x.value)instanceof Zl,_=x.done;Promise.resolve(y?f[0]:f).then(k=>y?s(c==="return"?c:"next",f[1]?{done:k.done,value:k.value}:k,g,p):g({value:k,done:_})).catch(k=>s("throw",k,g,p))}catch(k){p(k)}},i=c=>d[c]=f=>new Promise((g,p)=>s(c,f,g,p)),d={};return a=a.apply(e,t),d[rc("asyncIterator")]=()=>d,i("next"),i("throw"),i("return"),d},ig=e=>{var t=e[rc("asyncIterator")],a=!1,s,i={};return t==null?(t=e[rc("iterator")](),s=d=>i[d]=c=>t[d](c)):(t=t.call(e),s=d=>i[d]=c=>{if(a){if(a=!1,d==="throw")throw c;return c}return a=!0,{done:!1,value:new Zl(new Promise(f=>{var g=t[d](c);g instanceof Object||M4("Object expected"),f(g)}),1)}}),i[rc("iterator")]=()=>i,s("next"),"throw"in t?s("throw"):i.throw=d=>{throw d},"return"in t&&s("return"),i},Vb=(e,t,a)=>(t=e[rc("asyncIterator")])?t.call(e):(e=e[rc("iterator")](),t={},a=(s,i)=>(i=e[s])&&(t[s]=d=>new Promise((c,f,g)=>(d=i.call(e,d),g=d.done,Promise.resolve(d.value).then(p=>c({value:p,done:g}),f)))),a("next"),a("return"),t);var uD=L4(et=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const d of i)if(d.type==="childList")for(const c of d.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function a(i){const d={};return i.integrity&&(d.integrity=i.integrity),i.referrerPolicy&&(d.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?d.credentials="include":i.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function s(i){if(i.ep)return;i.ep=!0;const d=a(i);fetch(i.href,d)}})();function Jv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lg={exports:{}},Rd={};var Gb;function D4(){if(Gb)return Rd;Gb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(s,i,d){var c=null;if(d!==void 0&&(c=""+d),i.key!==void 0&&(c=""+i.key),"key"in i){d={};for(var f in i)f!=="key"&&(d[f]=i[f])}else d=i;return i=d.ref,{$$typeof:e,type:s,key:c,ref:i!==void 0?i:null,props:d}}return Rd.Fragment=t,Rd.jsx=a,Rd.jsxs=a,Rd}var Zb;function P4(){return Zb||(Zb=1,lg.exports=D4()),lg.exports}var r=P4(),og={exports:{}},Zt={};var qb;function R4(){if(qb)return Zt;qb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),_=Symbol.iterator;function k(F){return F===null||typeof F!="object"?null:(F=_&&F[_]||F["@@iterator"],typeof F=="function"?F:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,S={};function O(F,D,W){this.props=F,this.context=D,this.refs=S,this.updater=W||T}O.prototype.isReactComponent={},O.prototype.setState=function(F,D){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,D,"setState")},O.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function C(){}C.prototype=O.prototype;function A(F,D,W){this.props=F,this.context=D,this.refs=S,this.updater=W||T}var P=A.prototype=new C;P.constructor=A,N(P,O.prototype),P.isPureReactComponent=!0;var I=Array.isArray;function ee(){}var B={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function Y(F,D,W){var G=W.ref;return{$$typeof:e,type:F,key:D,ref:G!==void 0?G:null,props:W}}function ue(F,D){return Y(F.type,D,F.props)}function xe(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function le(F){var D={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(W){return D[W]})}var ge=/\/+/g;function be(F,D){return typeof F=="object"&&F!==null&&F.key!=null?le(""+F.key):D.toString(36)}function me(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(ee,ee):(F.status="pending",F.then(function(D){F.status==="pending"&&(F.status="fulfilled",F.value=D)},function(D){F.status==="pending"&&(F.status="rejected",F.reason=D)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function ae(F,D,W,G,J){var de=typeof F;(de==="undefined"||de==="boolean")&&(F=null);var De=!1;if(F===null)De=!0;else switch(de){case"bigint":case"string":case"number":De=!0;break;case"object":switch(F.$$typeof){case e:case t:De=!0;break;case x:return De=F._init,ae(De(F._payload),D,W,G,J)}}if(De)return J=J(F),De=G===""?"."+be(F,0):G,I(J)?(W="",De!=null&&(W=De.replace(ge,"$&/")+"/"),ae(J,D,W,"",function(Ve){return Ve})):J!=null&&(xe(J)&&(J=ue(J,W+(J.key==null||F&&F.key===J.key?"":(""+J.key).replace(ge,"$&/")+"/")+De)),D.push(J)),1;De=0;var Ne=G===""?".":G+":";if(I(F))for(var $e=0;$e>>1,se=ae[te];if(0>>1;tei(W,K))Gi(J,W)?(ae[te]=J,ae[G]=K,te=G):(ae[te]=W,ae[D]=K,te=D);else if(Gi(J,K))ae[te]=J,ae[G]=K,te=G;else break e}}return Z}function i(ae,Z){var K=ae.sortIndex-Z.sortIndex;return K!==0?K:ae.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;e.unstable_now=function(){return d.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var g=[],p=[],x=1,y=null,_=3,k=!1,T=!1,N=!1,S=!1,O=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate!="undefined"?setImmediate:null;function P(ae){for(var Z=a(p);Z!==null;){if(Z.callback===null)s(p);else if(Z.startTime<=ae)s(p),Z.sortIndex=Z.expirationTime,t(g,Z);else break;Z=a(p)}}function I(ae){if(N=!1,P(ae),!T)if(a(g)!==null)T=!0,ee||(ee=!0,le());else{var Z=a(p);Z!==null&&me(I,Z.startTime-ae)}}var ee=!1,B=-1,H=5,Y=-1;function ue(){return S?!0:!(e.unstable_now()-Yae&&ue());){var te=y.callback;if(typeof te=="function"){y.callback=null,_=y.priorityLevel;var se=te(y.expirationTime<=ae);if(ae=e.unstable_now(),typeof se=="function"){y.callback=se,P(ae),Z=!0;break t}y===a(g)&&s(g),P(ae)}else s(g);y=a(g)}if(y!==null)Z=!0;else{var F=a(p);F!==null&&me(I,F.startTime-ae),Z=!1}}break e}finally{y=null,_=K,k=!1}Z=void 0}}finally{Z?le():ee=!1}}}var le;if(typeof A=="function")le=function(){A(xe)};else if(typeof MessageChannel!="undefined"){var ge=new MessageChannel,be=ge.port2;ge.port1.onmessage=xe,le=function(){be.postMessage(null)}}else le=function(){O(xe,0)};function me(ae,Z){B=O(function(){ae(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(ae){ae.callback=null},e.unstable_forceFrameRate=function(ae){0>ae||125te?(ae.sortIndex=K,t(p,ae),a(g)===null&&ae===a(p)&&(N?(C(B),B=-1):N=!0,me(I,K-te))):(ae.sortIndex=se,t(g,ae),T||k||(T=!0,ee||(ee=!0,le()))),ae},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(ae){var Z=_;return function(){var K=_;_=Z;try{return ae.apply(this,arguments)}finally{_=K}}}})(ug)),ug}var Jb;function I4(){return Jb||(Jb=1,dg.exports=F4()),dg.exports}var fg={exports:{}},Ur={};var Kb;function z4(){if(Kb)return Ur;Kb=1;var e=Bf();function t(g){var p="https://react.dev/errors/"+g;if(1se||(n.current=te[se],te[se]=null,se--)}function W(n,l){se++,te[se]=n.current,n.current=l}var G=F(null),J=F(null),de=F(null),De=F(null);function Ne(n,l){switch(W(de,l),W(J,n),W(G,null),l.nodeType){case 9:case 11:n=(n=l.documentElement)&&(n=n.namespaceURI)?fb(n):0;break;default:if(n=l.tagName,l=l.namespaceURI)l=fb(l),n=hb(l,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}D(G),W(G,n)}function $e(){D(G),D(J),D(de)}function Ve(n){n.memoizedState!==null&&W(De,n);var l=G.current,u=hb(l,n.type);l!==u&&(W(J,n),W(G,u))}function st(n){J.current===n&&(D(G),D(J)),De.current===n&&(D(De),Md._currentValue=K)}var gt,zt;function Ge(n){if(gt===void 0)try{throw Error()}catch(u){var l=u.stack.trim().match(/\n( *(at )?)/);gt=l&&l[1]||"",zt=-1)":-1v||pe[m]!==Le[v]){var Ye=` `+pe[m].replace(" at new "," at ");return n.displayName&&Ye.includes("")&&(Ye=Ye.replace("",n.displayName)),Ye}while(1<=m&&0<=v);break}}}finally{Ct=!1,Error.prepareStackTrace=u}return(u=n?n.displayName||n.name:"")?Ge(u):""}function Ue(n,l){switch(n.tag){case 26:case 27:case 5:return Ge(n.type);case 16:return Ge("Lazy");case 13:return n.child!==l&&l!==null?Ge("Suspense Fallback"):Ge("Suspense");case 19:return Ge("SuspenseList");case 0:case 15:return St(n.type,!1);case 11:return St(n.type.render,!1);case 1:return St(n.type,!0);case 31:return Ge("Activity");default:return""}}function ce(n){try{var l="",u=null;do l+=Ue(n,u),u=n,n=n.return;while(n);return l}catch(m){return` Error generating stack: `+m.message+` `+m.stack}}var we=Object.prototype.hasOwnProperty,Ie=e.unstable_scheduleCallback,lt=e.unstable_cancelCallback,ft=e.unstable_shouldYield,Ze=e.unstable_requestPaint,ze=e.unstable_now,bt=e.unstable_getCurrentPriorityLevel,Nt=e.unstable_ImmediatePriority,Ot=e.unstable_UserBlockingPriority,Pt=e.unstable_NormalPriority,je=e.unstable_LowPriority,ut=e.unstable_IdlePriority,jt=e.log,$t=e.unstable_setDisableYieldValue,Fe=null,ot=null;function dt(n){if(typeof jt=="function"&&$t(n),ot&&typeof ot.setStrictMode=="function")try{ot.setStrictMode(Fe,n)}catch(l){}}var wt=Math.clz32?Math.clz32:Je,Ft=Math.log,la=Math.LN2;function Je(n){return n>>>=0,n===0?32:31-(Ft(n)/la|0)|0}var Lt=256,ye=262144,We=4194304;function at(n){var l=n&42;if(l!==0)return l;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Vt(n,l,u){var m=n.pendingLanes;if(m===0)return 0;var v=0,w=n.suspendedLanes,R=n.pingedLanes;n=n.warmLanes;var q=m&134217727;return q!==0?(m=q&~w,m!==0?v=at(m):(R&=q,R!==0?v=at(R):u||(u=q&~n,u!==0&&(v=at(u))))):(q=m&~w,q!==0?v=at(q):R!==0?v=at(R):u||(u=m&~n,u!==0&&(v=at(u)))),v===0?0:l!==0&&l!==v&&(l&w)===0&&(w=v&-v,u=l&-l,w>=u||w===32&&(u&4194048)!==0)?l:v}function aa(n,l){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&l)===0}function Va(n,l){switch(n){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ma(){var n=We;return We<<=1,(We&62914560)===0&&(We=4194304),n}function zn(n){for(var l=[],u=0;31>u;u++)l.push(n);return l}function Vr(n,l){n.pendingLanes|=l,l!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function ns(n,l,u,m,v,w){var R=n.pendingLanes;n.pendingLanes=u,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=u,n.entangledLanes&=u,n.errorRecoveryDisabledLanes&=u,n.shellSuspendCounter=0;var q=n.entanglements,pe=n.expirationTimes,Le=n.hiddenUpdates;for(u=R&~u;0=Ci),jo=" ",z0=!1;function B0(n,l){switch(n){case"keyup":return an.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qc(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ai=!1;function jn(n,l){switch(n){case"compositionend":return Qc(l);case"keypress":return l.which!==32?null:(z0=!0,jo);case"textInput":return n=l.data,n===jo&&z0?null:n;default:return null}}function Oi(n,l){if(Ai)return n==="compositionend"||!ko&&B0(n,l)?(n=Ts(),Ga=Ys=Hn=null,Ai=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:u,offset:l-n};n=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=To(u)}}function Eo(n,l){return n&&l?n===l?!0:n&&n.nodeType===3?!1:l&&l.nodeType===3?Eo(n,l.parentNode):"contains"in n?n.contains(l):n.compareDocumentPosition?!!(n.compareDocumentPosition(l)&16):!1:!1}function El(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var l=ki(n.document);l instanceof n.HTMLIFrameElement;){try{var u=typeof l.contentWindow.location.href=="string"}catch(m){u=!1}if(u)n=l.contentWindow;else break;l=ki(n.document)}return l}function Cs(n){var l=n&&n.nodeName&&n.nodeName.toLowerCase();return l&&(l==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||l==="textarea"||n.contentEditable==="true")}var Co=kn&&"documentMode"in document&&11>=document.documentMode,As=null,Ao=null,Cl=null,Pi=!1;function V0(n,l,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Pi||As==null||As!==ki(m)||(m=As,"selectionStart"in m&&Cs(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Cl&&Di(Cl,m)||(Cl=m,m=Ou(Ao,"onSelect"),0>=R,v-=R,Ke=1<<32-wt(l)+v|u<Jt?(sa=Mt,Mt=null):sa=Mt.sibling;var ua=Re(Se,Mt,Oe[Jt],Xe);if(ua===null){Mt===null&&(Mt=sa);break}n&&Mt&&ua.alternate===null&&l(Se,Mt),_e=w(ua,_e,Jt),da===null?Rt=ua:da.sibling=ua,da=ua,Mt=sa}if(Jt===Oe.length)return u(Se,Mt),Qt&&Dt(Se,Jt),Rt;if(Mt===null){for(;JtJt?(sa=Mt,Mt=null):sa=Mt.sibling;var rl=Re(Se,Mt,ua.value,Xe);if(rl===null){Mt===null&&(Mt=sa);break}n&&Mt&&rl.alternate===null&&l(Se,Mt),_e=w(rl,_e,Jt),da===null?Rt=rl:da.sibling=rl,da=rl,Mt=sa}if(ua.done)return u(Se,Mt),Qt&&Dt(Se,Jt),Rt;if(Mt===null){for(;!ua.done;Jt++,ua=Oe.next())ua=Qe(Se,ua.value,Xe),ua!==null&&(_e=w(ua,_e,Jt),da===null?Rt=ua:da.sibling=ua,da=ua);return Qt&&Dt(Se,Jt),Rt}for(Mt=m(Mt);!ua.done;Jt++,ua=Oe.next())ua=He(Mt,Se,Jt,ua.value,Xe),ua!==null&&(n&&ua.alternate!==null&&Mt.delete(ua.key===null?Jt:ua.key),_e=w(ua,_e,Jt),da===null?Rt=ua:da.sibling=ua,da=ua);return n&&Mt.forEach(function(E4){return l(Se,E4)}),Qt&&Dt(Se,Jt),Rt}function Aa(Se,_e,Oe,Xe){if(typeof Oe=="object"&&Oe!==null&&Oe.type===N&&Oe.key===null&&(Oe=Oe.props.children),typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case k:e:{for(var Rt=Oe.key;_e!==null;){if(_e.key===Rt){if(Rt=Oe.type,Rt===N){if(_e.tag===7){u(Se,_e.sibling),Xe=v(_e,Oe.props.children),Xe.return=Se,Se=Xe;break e}}else if(_e.elementType===Rt||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===H&&Bl(Rt)===_e.type){u(Se,_e.sibling),Xe=v(_e,Oe.props),cd(Xe,Oe),Xe.return=Se,Se=Xe;break e}u(Se,_e);break}else l(Se,_e);_e=_e.sibling}Oe.type===N?(Xe=Ks(Oe.props.children,Se.mode,Xe,Oe.key),Xe.return=Se,Se=Xe):(Xe=Pl(Oe.type,Oe.key,Oe.props,null,Se.mode,Xe),cd(Xe,Oe),Xe.return=Se,Se=Xe)}return R(Se);case T:e:{for(Rt=Oe.key;_e!==null;){if(_e.key===Rt)if(_e.tag===4&&_e.stateNode.containerInfo===Oe.containerInfo&&_e.stateNode.implementation===Oe.implementation){u(Se,_e.sibling),Xe=v(_e,Oe.children||[]),Xe.return=Se,Se=Xe;break e}else{u(Se,_e);break}else l(Se,_e);_e=_e.sibling}Xe=rd(Oe,Se.mode,Xe),Xe.return=Se,Se=Xe}return R(Se);case H:return Oe=Bl(Oe),Aa(Se,_e,Oe,Xe)}if(me(Oe))return Tt(Se,_e,Oe,Xe);if(le(Oe)){if(Rt=le(Oe),typeof Rt!="function")throw Error(s(150));return Oe=Rt.call(Oe),It(Se,_e,Oe,Xe)}if(typeof Oe.then=="function")return Aa(Se,_e,tu(Oe),Xe);if(Oe.$$typeof===A)return Aa(Se,_e,J0(Se,Oe),Xe);au(Se,Oe)}return typeof Oe=="string"&&Oe!==""||typeof Oe=="number"||typeof Oe=="bigint"?(Oe=""+Oe,_e!==null&&_e.tag===6?(u(Se,_e.sibling),Xe=v(_e,Oe),Xe.return=Se,Se=Xe):(u(Se,_e),Xe=Do(Oe,Se.mode,Xe),Xe.return=Se,Se=Xe),R(Se)):u(Se,_e)}return function(Se,_e,Oe,Xe){try{od=0;var Rt=Aa(Se,_e,Oe,Xe);return Bo=null,Rt}catch(Mt){if(Mt===zo||Mt===Q0)throw Mt;var da=Br(29,Mt,null,Se.mode);return da.lanes=Xe,da.return=Se,da}finally{}}}var Hl=rx(!0),nx=rx(!1),Bi=!1;function Dh(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ph(n,l){n=n.updateQueue,l.updateQueue===n&&(l.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ui(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Hi(n,l,u){var m=n.updateQueue;if(m===null)return null;if(m=m.shared,(ma&2)!==0){var v=m.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),m.pending=l,l=Dl(n),Ii(n,null,u),l}return Ls(n,m,l,u),Dl(n)}function dd(n,l,u){if(l=l.updateQueue,l!==null&&(l=l.shared,(u&4194048)!==0)){var m=l.lanes;m&=n.pendingLanes,u|=m,l.lanes=u,Bn(n,u)}}function Rh(n,l){var u=n.updateQueue,m=n.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var v=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var R={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?v=w=R:w=w.next=R,u=u.next}while(u!==null);w===null?v=w=l:w=w.next=l}else v=w=l;u={baseState:m.baseState,firstBaseUpdate:v,lastBaseUpdate:w,shared:m.shared,callbacks:m.callbacks},n.updateQueue=u;return}n=u.lastBaseUpdate,n===null?u.firstBaseUpdate=l:n.next=l,u.lastBaseUpdate=l}var Fh=!1;function ud(){if(Fh){var n=Io;if(n!==null)throw n}}function fd(n,l,u,m){Fh=!1;var v=n.updateQueue;Bi=!1;var w=v.firstBaseUpdate,R=v.lastBaseUpdate,q=v.shared.pending;if(q!==null){v.shared.pending=null;var pe=q,Le=pe.next;pe.next=null,R===null?w=Le:R.next=Le,R=pe;var Ye=n.alternate;Ye!==null&&(Ye=Ye.updateQueue,q=Ye.lastBaseUpdate,q!==R&&(q===null?Ye.firstBaseUpdate=Le:q.next=Le,Ye.lastBaseUpdate=pe))}if(w!==null){var Qe=v.baseState;R=0,Ye=Le=pe=null,q=w;do{var Re=q.lane&-536870913,He=Re!==q.lane;if(He?(na&Re)===Re:(m&Re)===Re){Re!==0&&Re===Fo&&(Fh=!0),Ye!==null&&(Ye=Ye.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});e:{var Tt=n,It=q;Re=l;var Aa=u;switch(It.tag){case 1:if(Tt=It.payload,typeof Tt=="function"){Qe=Tt.call(Aa,Qe,Re);break e}Qe=Tt;break e;case 3:Tt.flags=Tt.flags&-65537|128;case 0:if(Tt=It.payload,Re=typeof Tt=="function"?Tt.call(Aa,Qe,Re):Tt,Re==null)break e;Qe=y({},Qe,Re);break e;case 2:Bi=!0}}Re=q.callback,Re!==null&&(n.flags|=64,He&&(n.flags|=8192),He=v.callbacks,He===null?v.callbacks=[Re]:He.push(Re))}else He={lane:Re,tag:q.tag,payload:q.payload,callback:q.callback,next:null},Ye===null?(Le=Ye=He,pe=Qe):Ye=Ye.next=He,R|=Re;if(q=q.next,q===null){if(q=v.shared.pending,q===null)break;He=q,q=He.next,He.next=null,v.lastBaseUpdate=He,v.shared.pending=null}}while(!0);Ye===null&&(pe=Qe),v.baseState=pe,v.firstBaseUpdate=Le,v.lastBaseUpdate=Ye,w===null&&(v.shared.lanes=0),Zi|=R,n.lanes=R,n.memoizedState=Qe}}function sx(n,l){if(typeof n!="function")throw Error(s(191,n));n.call(l)}function ix(n,l){var u=n.callbacks;if(u!==null)for(n.callbacks=null,n=0;nw?w:8;var R=ae.T,q={};ae.T=q,am(n,!1,l,u);try{var pe=v(),Le=ae.S;if(Le!==null&&Le(q,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var Ye=xk(pe,m);gd(n,l,Ye,An(n))}else gd(n,l,m,An(n))}catch(Qe){gd(n,l,{then:function(){},status:"rejected",reason:Qe},An())}finally{Z.p=w,R!==null&&q.types!==null&&(R.types=q.types),ae.T=R}}function kk(){}function em(n,l,u,m){if(n.tag!==5)throw Error(s(476));var v=Ix(n).queue;Fx(n,v,l,K,u===null?kk:function(){return zx(n),u(m)})}function Ix(n){var l=n.memoizedState;if(l!==null)return l;l={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:K},next:null};var u={};return l.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:u},next:null},n.memoizedState=l,n=n.alternate,n!==null&&(n.memoizedState=l),l}function zx(n){var l=Ix(n);l.next===null&&(l=n.alternate.memoizedState),gd(n,l.next.queue,{},An())}function tm(){return Er(Md)}function Bx(){return ar().memoizedState}function Ux(){return ar().memoizedState}function Nk(n){for(var l=n.return;l!==null;){switch(l.tag){case 24:case 3:var u=An();n=Ui(u);var m=Hi(l,n,u);m!==null&&(un(m,l,u),dd(m,l,u)),l={cache:Ah()},n.payload=l;return}l=l.return}}function jk(n,l,u){var m=An();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},fu(n)?$x(l,u):(u=ed(n,l,u,m),u!==null&&(un(u,n,m),Wx(u,l,m)))}function Hx(n,l,u){var m=An();gd(n,l,u,m)}function gd(n,l,u,m){var v={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(fu(n))$x(l,v);else{var w=n.alternate;if(n.lanes===0&&(w===null||w.lanes===0)&&(w=l.lastRenderedReducer,w!==null))try{var R=l.lastRenderedState,q=w(R,u);if(v.hasEagerState=!0,v.eagerState=q,gr(q,R))return Ls(n,l,v,0),Da===null&&Ll(),!1}catch(pe){}finally{}if(u=ed(n,l,v,m),u!==null)return un(u,n,m),Wx(u,l,m),!0}return!1}function am(n,l,u,m){if(m={lane:2,revertLane:Dm(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},fu(n)){if(l)throw Error(s(479))}else l=ed(n,u,m,2),l!==null&&un(l,n,2)}function fu(n){var l=n.alternate;return n===qt||l!==null&&l===qt}function $x(n,l){Ho=su=!0;var u=n.pending;u===null?l.next=l:(l.next=u.next,u.next=l),n.pending=l}function Wx(n,l,u){if((u&4194048)!==0){var m=l.lanes;m&=n.pendingLanes,u|=m,l.lanes=u,Bn(n,u)}}var pd={readContext:Er,use:ou,useCallback:qa,useContext:qa,useEffect:qa,useImperativeHandle:qa,useLayoutEffect:qa,useInsertionEffect:qa,useMemo:qa,useReducer:qa,useRef:qa,useState:qa,useDebugValue:qa,useDeferredValue:qa,useTransition:qa,useSyncExternalStore:qa,useId:qa,useHostTransitionStatus:qa,useFormState:qa,useActionState:qa,useOptimistic:qa,useMemoCache:qa,useCacheRefresh:qa};pd.useEffectEvent=qa;var Vx={readContext:Er,use:ou,useCallback:function(n,l){return qr().memoizedState=[n,l===void 0?null:l],n},useContext:Er,useEffect:Ex,useImperativeHandle:function(n,l,u){u=u!=null?u.concat([n]):null,du(4194308,4,Mx.bind(null,l,n),u)},useLayoutEffect:function(n,l){return du(4194308,4,n,l)},useInsertionEffect:function(n,l){du(4,2,n,l)},useMemo:function(n,l){var u=qr();l=l===void 0?null:l;var m=n();if($l){dt(!0);try{n()}finally{dt(!1)}}return u.memoizedState=[m,l],m},useReducer:function(n,l,u){var m=qr();if(u!==void 0){var v=u(l);if($l){dt(!0);try{u(l)}finally{dt(!1)}}}else v=l;return m.memoizedState=m.baseState=v,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:v},m.queue=n,n=n.dispatch=jk.bind(null,qt,n),[m.memoizedState,n]},useRef:function(n){var l=qr();return n={current:n},l.memoizedState=n},useState:function(n){n=Yh(n);var l=n.queue,u=Hx.bind(null,qt,l);return l.dispatch=u,[n.memoizedState,u]},useDebugValue:Kh,useDeferredValue:function(n,l){var u=qr();return Qh(u,n,l)},useTransition:function(){var n=Yh(!1);return n=Fx.bind(null,qt,n.queue,!0,!1),qr().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,l,u){var m=qt,v=qr();if(Qt){if(u===void 0)throw Error(s(407));u=u()}else{if(u=l(),Da===null)throw Error(s(349));(na&127)!==0||fx(m,l,u)}v.memoizedState=u;var w={value:u,getSnapshot:l};return v.queue=w,Ex(mx.bind(null,m,w,n),[n]),m.flags|=2048,Wo(9,{destroy:void 0},hx.bind(null,m,w,u,l),null),u},useId:function(){var n=qr(),l=Da.identifierPrefix;if(Qt){var u=yt,m=Ke;u=(m&~(1<<32-wt(m)-1)).toString(32)+u,l="_"+l+"R_"+u,u=iu++,0<\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof m.is=="string"?R.createElement("select",{is:m.is}):R.createElement("select"),m.multiple?w.multiple=!0:m.size&&(w.size=m.size);break;default:w=typeof m.is=="string"?R.createElement(v,{is:m.is}):R.createElement(v)}}w[Q]=l,w[re]=m;e:for(R=l.child;R!==null;){if(R.tag===5||R.tag===6)w.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===l)break e;for(;R.sibling===null;){if(R.return===null||R.return===l)break e;R=R.return}R.sibling.return=R.return,R=R.sibling}l.stateNode=w;e:switch(Ar(w,v,m),v){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&ni(l)}}return za(l),pm(l,l.type,n===null?null:n.memoizedProps,l.pendingProps,u),null;case 6:if(n&&l.stateNode!=null)n.memoizedProps!==m&&ni(l);else{if(typeof m!="string"&&l.stateNode===null)throw Error(s(166));if(n=de.current,fs(l)){if(n=l.stateNode,u=l.memoizedProps,m=null,v=oa,v!==null)switch(v.tag){case 27:case 5:m=v.memoizedProps}n[Q]=l,n=!!(n.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||db(n.nodeValue,u)),n||Ps(l,!0)}else n=Mu(n).createTextNode(m),n[Q]=l,l.stateNode=n}return za(l),null;case 31:if(u=l.memoizedState,n===null||n.memoizedState!==null){if(m=fs(l),u!==null){if(n===null){if(!m)throw Error(s(318));if(n=l.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[Q]=l}else Qs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;za(l),n=!1}else u=sd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=u),n=!0;if(!n)return l.flags&256?(Tn(l),l):(Tn(l),null);if((l.flags&128)!==0)throw Error(s(558))}return za(l),null;case 13:if(m=l.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(v=fs(l),m!==null&&m.dehydrated!==null){if(n===null){if(!v)throw Error(s(318));if(v=l.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(s(317));v[Q]=l}else Qs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;za(l),v=!1}else v=sd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=v),v=!0;if(!v)return l.flags&256?(Tn(l),l):(Tn(l),null)}return Tn(l),(l.flags&128)!==0?(l.lanes=u,l):(u=m!==null,n=n!==null&&n.memoizedState!==null,u&&(m=l.child,v=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(v=m.alternate.memoizedState.cachePool.pool),w=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(w=m.memoizedState.cachePool.pool),w!==v&&(m.flags|=2048)),u!==n&&u&&(l.child.flags|=8192),xu(l,l.updateQueue),za(l),null);case 4:return $e(),n===null&&Im(l.stateNode.containerInfo),za(l),null;case 10:return ei(l.type),za(l),null;case 19:if(D(tr),m=l.memoizedState,m===null)return za(l),null;if(v=(l.flags&128)!==0,w=m.rendering,w===null)if(v)yd(m,!1);else{if(Ya!==0||n!==null&&(n.flags&128)!==0)for(n=l.child;n!==null;){if(w=nu(n),w!==null){for(l.flags|=128,yd(m,!1),n=w.updateQueue,l.updateQueue=n,xu(l,n),l.subtreeFlags=0,n=u,u=l.child;u!==null;)td(u,n),u=u.sibling;return W(tr,tr.current&1|2),Qt&&Dt(l,m.treeForkCount),l.child}n=n.sibling}m.tail!==null&&ze()>wu&&(l.flags|=128,v=!0,yd(m,!1),l.lanes=4194304)}else{if(!v)if(n=nu(w),n!==null){if(l.flags|=128,v=!0,n=n.updateQueue,l.updateQueue=n,xu(l,n),yd(m,!0),m.tail===null&&m.tailMode==="hidden"&&!w.alternate&&!Qt)return za(l),null}else 2*ze()-m.renderingStartTime>wu&&u!==536870912&&(l.flags|=128,v=!0,yd(m,!1),l.lanes=4194304);m.isBackwards?(w.sibling=l.child,l.child=w):(n=m.last,n!==null?n.sibling=w:l.child=w,m.last=w)}return m.tail!==null?(n=m.tail,m.rendering=n,m.tail=n.sibling,m.renderingStartTime=ze(),n.sibling=null,u=tr.current,W(tr,v?u&1|2:u&1),Qt&&Dt(l,m.treeForkCount),n):(za(l),null);case 22:case 23:return Tn(l),zh(),m=l.memoizedState!==null,n!==null?n.memoizedState!==null!==m&&(l.flags|=8192):m&&(l.flags|=8192),m?(u&536870912)!==0&&(l.flags&128)===0&&(za(l),l.subtreeFlags&6&&(l.flags|=8192)):za(l),u=l.updateQueue,u!==null&&xu(l,u.retryQueue),u=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==u&&(l.flags|=2048),n!==null&&D(zl),null;case 24:return u=null,n!==null&&(u=n.memoizedState.cache),l.memoizedState.cache!==u&&(l.flags|=2048),ei(nr),za(l),null;case 25:return null;case 30:return null}throw Error(s(156,l.tag))}function Ak(n,l){switch(Za(l),l.tag){case 1:return n=l.flags,n&65536?(l.flags=n&-65537|128,l):null;case 3:return ei(nr),$e(),n=l.flags,(n&65536)!==0&&(n&128)===0?(l.flags=n&-65537|128,l):null;case 26:case 27:case 5:return st(l),null;case 31:if(l.memoizedState!==null){if(Tn(l),l.alternate===null)throw Error(s(340));Qs()}return n=l.flags,n&65536?(l.flags=n&-65537|128,l):null;case 13:if(Tn(l),n=l.memoizedState,n!==null&&n.dehydrated!==null){if(l.alternate===null)throw Error(s(340));Qs()}return n=l.flags,n&65536?(l.flags=n&-65537|128,l):null;case 19:return D(tr),null;case 4:return $e(),null;case 10:return ei(l.type),null;case 22:case 23:return Tn(l),zh(),n!==null&&D(zl),n=l.flags,n&65536?(l.flags=n&-65537|128,l):null;case 24:return ei(nr),null;case 25:return null;default:return null}}function gy(n,l){switch(Za(l),l.tag){case 3:ei(nr),$e();break;case 26:case 27:case 5:st(l);break;case 4:$e();break;case 31:l.memoizedState!==null&&Tn(l);break;case 13:Tn(l);break;case 19:D(tr);break;case 10:ei(l.type);break;case 22:case 23:Tn(l),zh(),n!==null&&D(zl);break;case 24:ei(nr)}}function bd(n,l){try{var u=l.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var v=m.next;u=v;do{if((u.tag&n)===n){m=void 0;var w=u.create,R=u.inst;m=w(),R.destroy=m}u=u.next}while(u!==v)}}catch(q){ba(l,l.return,q)}}function Vi(n,l,u){try{var m=l.updateQueue,v=m!==null?m.lastEffect:null;if(v!==null){var w=v.next;m=w;do{if((m.tag&n)===n){var R=m.inst,q=R.destroy;if(q!==void 0){R.destroy=void 0,v=l;var pe=u,Le=q;try{Le()}catch(Ye){ba(v,pe,Ye)}}}m=m.next}while(m!==w)}}catch(Ye){ba(l,l.return,Ye)}}function py(n){var l=n.updateQueue;if(l!==null){var u=n.stateNode;try{ix(l,u)}catch(m){ba(n,n.return,m)}}}function xy(n,l,u){u.props=Wl(n.type,n.memoizedProps),u.state=n.memoizedState;try{u.componentWillUnmount()}catch(m){ba(n,l,m)}}function vd(n,l){try{var u=n.ref;if(u!==null){switch(n.tag){case 26:case 27:case 5:var m=n.stateNode;break;case 30:m=n.stateNode;break;default:m=n.stateNode}typeof u=="function"?n.refCleanup=u(m):u.current=m}}catch(v){ba(n,l,v)}}function Fs(n,l){var u=n.ref,m=n.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(v){ba(n,l,v)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(v){ba(n,l,v)}else u.current=null}function yy(n){var l=n.type,u=n.memoizedProps,m=n.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(v){ba(n,n.return,v)}}function xm(n,l,u){try{var m=n.stateNode;Kk(m,n.type,u,l),m[re]=l}catch(v){ba(n,n.return,v)}}function by(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ki(n.type)||n.tag===4}function ym(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||by(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ki(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function bm(n,l,u){var m=n.tag;if(m===5||m===6)n=n.stateNode,l?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(n,l):(l=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,l.appendChild(n),u=u._reactRootContainer,u!=null||l.onclick!==null||(l.onclick=tn));else if(m!==4&&(m===27&&Ki(n.type)&&(u=n.stateNode,l=null),n=n.child,n!==null))for(bm(n,l,u),n=n.sibling;n!==null;)bm(n,l,u),n=n.sibling}function yu(n,l,u){var m=n.tag;if(m===5||m===6)n=n.stateNode,l?u.insertBefore(n,l):u.appendChild(n);else if(m!==4&&(m===27&&Ki(n.type)&&(u=n.stateNode),n=n.child,n!==null))for(yu(n,l,u),n=n.sibling;n!==null;)yu(n,l,u),n=n.sibling}function vy(n){var l=n.stateNode,u=n.memoizedProps;try{for(var m=n.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);Ar(l,m,u),l[Q]=n,l[re]=u}catch(w){ba(n,n.return,w)}}var si=!1,lr=!1,vm=!1,_y=typeof WeakSet=="function"?WeakSet:Set,xr=null;function Ok(n,l){if(n=n.containerInfo,Um=zu,n=El(n),Cs(n)){if("selectionStart"in n)var u={start:n.selectionStart,end:n.selectionEnd};else e:{u=(u=n.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var v=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{u.nodeType,w.nodeType}catch(It){u=null;break e}var R=0,q=-1,pe=-1,Le=0,Ye=0,Qe=n,Re=null;t:for(;;){for(var He;Qe!==u||v!==0&&Qe.nodeType!==3||(q=R+v),Qe!==w||m!==0&&Qe.nodeType!==3||(pe=R+m),Qe.nodeType===3&&(R+=Qe.nodeValue.length),(He=Qe.firstChild)!==null;)Re=Qe,Qe=He;for(;;){if(Qe===n)break t;if(Re===u&&++Le===v&&(q=R),Re===w&&++Ye===m&&(pe=R),(He=Qe.nextSibling)!==null)break;Qe=Re,Re=Qe.parentNode}Qe=He}u=q===-1||pe===-1?null:{start:q,end:pe}}else u=null}u=u||{start:0,end:0}}else u=null;for(Hm={focusedElem:n,selectionRange:u},zu=!1,xr=l;xr!==null;)if(l=xr,n=l.child,(l.subtreeFlags&1028)!==0&&n!==null)n.return=l,xr=n;else for(;xr!==null;){switch(l=xr,w=l.alternate,n=l.flags,l.tag){case 0:if((n&4)!==0&&(n=l.updateQueue,n=n!==null?n.events:null,n!==null))for(u=0;u title"))),Ar(w,m,u),w[Q]=n,_t(w),m=w;break e;case"link":var R=Tb("link","href",v).get(m+(u.href||""));if(R){for(var q=0;qAa&&(R=Aa,Aa=It,It=R);var Se=Tl(q,It),_e=Tl(q,Aa);if(Se&&_e&&(He.rangeCount!==1||He.anchorNode!==Se.node||He.anchorOffset!==Se.offset||He.focusNode!==_e.node||He.focusOffset!==_e.offset)){var Oe=Qe.createRange();Oe.setStart(Se.node,Se.offset),He.removeAllRanges(),It>Aa?(He.addRange(Oe),He.extend(_e.node,_e.offset)):(Oe.setEnd(_e.node,_e.offset),He.addRange(Oe))}}}}for(Qe=[],He=q;He=He.parentNode;)He.nodeType===1&&Qe.push({element:He,left:He.scrollLeft,top:He.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;qu?32:u,ae.T=null,u=Tm,Tm=null;var w=Yi,R=di;if(hr=0,Yo=Yi=null,di=0,(ma&6)!==0)throw Error(s(331));var q=ma;if(ma|=4,My(w.current),Cy(w,w.current,R,u),ma=q,Sd(0,!1),ot&&typeof ot.onPostCommitFiberRoot=="function")try{ot.onPostCommitFiberRoot(Fe,w)}catch(pe){}return!0}finally{Z.p=v,ae.T=m,Xy(n,l)}}function Ky(n,l,u){l=h(u,l),l=im(n.stateNode,l,2),n=Hi(n,l,2),n!==null&&(Vr(n,2),Is(n))}function ba(n,l,u){if(n.tag===3)Ky(n,n,u);else for(;l!==null;){if(l.tag===3){Ky(l,n,u);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(qi===null||!qi.has(m))){n=h(u,n),u=Qx(2),m=Hi(l,u,2),m!==null&&(ey(u,m,l,n),Vr(m,2),Is(m));break}}l=l.return}}function Om(n,l,u){var m=n.pingCache;if(m===null){m=n.pingCache=new Dk;var v=new Set;m.set(l,v)}else v=m.get(l),v===void 0&&(v=new Set,m.set(l,v));v.has(u)||(km=!0,v.add(u),n=zk.bind(null,n,l,u),l.then(n,n))}function zk(n,l,u){var m=n.pingCache;m!==null&&m.delete(l),n.pingedLanes|=n.suspendedLanes&u,n.warmLanes&=~u,Da===n&&(na&u)===u&&(Ya===4||Ya===3&&(na&62914560)===na&&300>ze()-_u?(ma&2)===0&&Xo(n,0):Nm|=u,qo===na&&(qo=0)),Is(n)}function Qy(n,l){l===0&&(l=Ma()),n=Zn(n,l),n!==null&&(Vr(n,l),Is(n))}function Bk(n){var l=n.memoizedState,u=0;l!==null&&(u=l.retryLane),Qy(n,u)}function Uk(n,l){var u=0;switch(n.tag){case 31:case 13:var m=n.stateNode,v=n.memoizedState;v!==null&&(u=v.retryLane);break;case 19:m=n.stateNode;break;case 22:m=n.stateNode._retryCache;break;default:throw Error(s(314))}m!==null&&m.delete(l),Qy(n,u)}function Hk(n,l){return Ie(n,l)}var Eu=null,Ko=null,Mm=!1,Cu=!1,Lm=!1,Ji=0;function Is(n){n!==Ko&&n.next===null&&(Ko===null?Eu=Ko=n:Ko=Ko.next=n),Cu=!0,Mm||(Mm=!0,Wk())}function Sd(n,l){if(!Lm&&Cu){Lm=!0;do for(var u=!1,m=Eu;m!==null;){if(n!==0){var v=m.pendingLanes;if(v===0)var w=0;else{var R=m.suspendedLanes,q=m.pingedLanes;w=(1<<31-wt(42|n)+1)-1,w&=v&~(R&~q),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,rb(m,w))}else w=na,w=Vt(m,m===Da?w:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(w&3)===0||aa(m,w)||(u=!0,rb(m,w));m=m.next}while(u);Lm=!1}}function $k(){eb()}function eb(){Cu=Mm=!1;var n=0;Ji!==0&&e4()&&(n=Ji);for(var l=ze(),u=null,m=Eu;m!==null;){var v=m.next,w=tb(m,l);w===0?(m.next=null,u===null?Eu=v:u.next=v,v===null&&(Ko=u)):(u=m,(n!==0||(w&3)!==0)&&(Cu=!0)),m=v}hr!==0&&hr!==5||Sd(n),Ji!==0&&(Ji=0)}function tb(n,l){for(var u=n.suspendedLanes,m=n.pingedLanes,v=n.expirationTimes,w=n.pendingLanes&-62914561;0q)break;var Ye=pe.transferSize,Qe=pe.initiatorType;Ye&&ub(Qe)&&(pe=pe.responseEnd,R+=Ye*(pe title"):null)}function x4(n,l,u){if(u===1||l.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return n=l.disabled,typeof l.precedence=="string"&&n==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function Cb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function y4(n,l,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var v=ec(m.href),w=l.querySelector(Ad(v));if(w){l=w._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(n.count++,n=Ru.bind(n),l.then(n,n)),u.state.loading|=4,u.instance=w,_t(w);return}w=l.ownerDocument||l,m=jb(m),(v=Jn.get(v))&&Ym(m,v),w=w.createElement("link"),_t(w);var R=w;R._p=new Promise(function(q,pe){R.onload=q,R.onerror=pe}),Ar(w,"link",m),u.instance=w}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(u,l),(l=u.state.preload)&&(u.state.loading&3)===0&&(n.count++,u=Ru.bind(n),l.addEventListener("load",u),l.addEventListener("error",u))}}var Jm=0;function b4(n,l){return n.stylesheets&&n.count===0&&Iu(n,n.stylesheets),0Jm?50:800)+l);return n.unsuspend=u,function(){n.unsuspend=null,clearTimeout(m),clearTimeout(v)}}:null}function Ru(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Iu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Fu=null;function Iu(n,l){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Fu=new Map,l.forEach(v4,n),Fu=null,Ru.call(n))}function v4(n,l){if(!(l.state.loading&4)){var u=Fu.get(n);if(u)var m=u.get(null);else{u=new Map,Fu.set(n,u);for(var v=n.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;wtypeof e=="string",Id=()=>{let e,t;const a=new Promise((s,i)=>{e=s,t=i});return a.resolve=e,a.reject=t,a},a1=e=>e==null?"":""+e,$4=(e,t,a)=>{e.forEach(s=>{t[s]&&(a[s]=t[s])})},W4=/###/g,r1=e=>e&&e.indexOf("###")>-1?e.replace(W4,"."):e,n1=e=>!e||Wt(e),Vd=(e,t,a)=>{const s=Wt(t)?t.split("."):t;let i=0;for(;i{const{obj:s,k:i}=Vd(e,t,Object);if(s!==void 0||t.length===1){s[i]=a;return}let d=t[t.length-1],c=t.slice(0,t.length-1),f=Vd(e,c,Object);for(;f.obj===void 0&&c.length;)d=`${c[c.length-1]}.${d}`,c=c.slice(0,c.length-1),f=Vd(e,c,Object),f!=null&&f.obj&&typeof f.obj[`${f.k}.${d}`]!="undefined"&&(f.obj=void 0);f.obj[`${f.k}.${d}`]=a},V4=(e,t,a,s)=>{const{obj:i,k:d}=Vd(e,t,Object);i[d]=i[d]||[],i[d].push(a)},pf=(e,t)=>{const{obj:a,k:s}=Vd(e,t);if(a&&Object.prototype.hasOwnProperty.call(a,s))return a[s]},G4=(e,t,a)=>{const s=pf(e,a);return s!==void 0?s:pf(t,a)},Qv=(e,t,a)=>{for(const s in t)s!=="__proto__"&&s!=="constructor"&&(s in e?Wt(e[s])||e[s]instanceof String||Wt(t[s])||t[s]instanceof String?a&&(e[s]=t[s]):Qv(e[s],t[s],a):e[s]=t[s]);return e},nc=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Z4={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const q4=e=>Wt(e)?e.replace(/[&<>"'\/]/g,t=>Z4[t]):e;class Y4{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const a=this.regExpMap.get(t);if(a!==void 0)return a;const s=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,s),this.regExpQueue.push(t),s}}const X4=[" ",",","?","!",";"],J4=new Y4(20),K4=(e,t,a)=>{t=t||"",a=a||"";const s=X4.filter(c=>t.indexOf(c)<0&&a.indexOf(c)<0);if(s.length===0)return!0;const i=J4.getRegExp(`(${s.map(c=>c==="?"?"\\?":c).join("|")})`);let d=!i.test(e);if(!d){const c=e.indexOf(a);c>0&&!i.test(e.substring(0,c))&&(d=!0)}return d},Pg=(e,t,a=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const s=t.split(a);let i=e;for(let d=0;d-1&&ge==null?void 0:e.replace("_","-"),Q4={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var a,s;(s=(a=console==null?void 0:console[e])==null?void 0:a.apply)==null||s.call(a,console,t)}};class xf{constructor(t,a={}){this.init(t,a)}init(t,a={}){this.prefix=a.prefix||"i18next:",this.logger=t||Q4,this.options=a,this.debug=a.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,a,s,i){return i&&!this.debug?null:(Wt(t[0])&&(t[0]=`${s}${this.prefix} ${t[0]}`),this.logger[a](t))}create(t){return new xf(this.logger,ie({prefix:`${this.prefix}:${t}:`},this.options))}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new xf(this.logger,t)}}var Hs=new xf;class Uf{constructor(){this.observers={}}on(t,a){return t.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(a)||0;this.observers[s].set(a,i+1)}),this}off(t,a){if(this.observers[t]){if(!a){delete this.observers[t];return}this.observers[t].delete(a)}}emit(t,...a){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,d])=>{for(let c=0;c{for(let c=0;c-1&&this.options.ns.splice(a,1)}getResource(t,a,s,i={}){var p,x;const d=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,c=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;t.indexOf(".")>-1?f=t.split("."):(f=[t,a],s&&(Array.isArray(s)?f.push(...s):Wt(s)&&d?f.push(...s.split(d)):f.push(s)));const g=pf(this.data,f);return!g&&!a&&!s&&t.indexOf(".")>-1&&(t=f[0],a=f[1],s=f.slice(2).join(".")),g||!c||!Wt(s)?g:Pg((x=(p=this.data)==null?void 0:p[t])==null?void 0:x[a],s,d)}addResource(t,a,s,i,d={silent:!1}){const c=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator;let f=[t,a];s&&(f=f.concat(c?s.split(c):s)),t.indexOf(".")>-1&&(f=t.split("."),i=a,a=f[1]),this.addNamespaces(a),s1(this.data,f,i),d.silent||this.emit("added",t,a,s,i)}addResources(t,a,s,i={silent:!1}){for(const d in s)(Wt(s[d])||Array.isArray(s[d]))&&this.addResource(t,a,d,s[d],{silent:!0});i.silent||this.emit("added",t,a,s)}addResourceBundle(t,a,s,i,d,c={silent:!1,skipCopy:!1}){let f=[t,a];t.indexOf(".")>-1&&(f=t.split("."),i=s,s=a,a=f[1]),this.addNamespaces(a);let g=pf(this.data,f)||{};c.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?Qv(g,s,d):g=ie(ie({},g),s),s1(this.data,f,g),c.silent||this.emit("added",t,a,s)}removeResourceBundle(t,a){this.hasResourceBundle(t,a)&&delete this.data[t][a],this.removeNamespaces(a),this.emit("removed",t,a)}hasResourceBundle(t,a){return this.getResource(t,a)!==void 0}getResourceBundle(t,a){return a||(a=this.options.defaultNS),this.getResource(t,a)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const a=this.getDataByLanguage(t);return!!(a&&Object.keys(a)||[]).find(i=>a[i]&&Object.keys(a[i]).length>0)}toJSON(){return this.data}}var e_={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,a,s,i){return e.forEach(d=>{var c,f;t=(f=(c=this.processors[d])==null?void 0:c.process(t,a,s,i))!=null?f:t}),t}};const t_=Symbol("i18next/PATH_KEY");function e3(){const e=[],t=Object.create(null);let a;return t.get=(s,i)=>{var d;return(d=a==null?void 0:a.revoke)==null||d.call(a),i===t_?e:(e.push(i),a=Proxy.revocable(s,t),a.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Rg(e,t){var s;const{[t_]:a}=e(e3());return a.join((s=t==null?void 0:t.keySeparator)!=null?s:".")}const l1={},hg=e=>!Wt(e)&&typeof e!="boolean"&&typeof e!="number";class yf extends Uf{constructor(t,a={}){super(),$4(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Hs.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,a={interpolation:{}}){const s=ie({},a);if(t==null)return!1;const i=this.resolve(t,s);if((i==null?void 0:i.res)===void 0)return!1;const d=hg(i.res);return!(s.returnObjects===!1&&d)}extractFromKey(t,a){let s=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let d=a.ns||this.options.defaultNS||[];const c=s&&t.indexOf(s)>-1,f=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!K4(t,s,i);if(c&&!f){const g=t.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:t,namespaces:Wt(d)?[d]:d};const p=t.split(s);(s!==i||s===i&&this.options.ns.indexOf(p[0])>-1)&&(d=p.shift()),t=p.join(i)}return{key:t,namespaces:Wt(d)?[d]:d}}translate(t,a,s){let i=typeof a=="object"?ie({},a):a;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i=ie({},i)),i||(i={}),t==null)return"";typeof t=="function"&&(t=Rg(t,ie(ie({},this.options),i))),Array.isArray(t)||(t=[String(t)]);const d=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,c=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:f,namespaces:g}=this.extractFromKey(t[t.length-1],i),p=g[g.length-1];let x=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;x===void 0&&(x=":");const y=i.lng||this.language,_=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((y==null?void 0:y.toLowerCase())==="cimode")return _?d?{res:`${p}${x}${f}`,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:p,usedParams:this.getUsedParamsDetails(i)}:`${p}${x}${f}`:d?{res:f,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:p,usedParams:this.getUsedParamsDetails(i)}:f;const k=this.resolve(t,i);let T=k==null?void 0:k.res;const N=(k==null?void 0:k.usedKey)||f,S=(k==null?void 0:k.exactUsedKey)||f,O=["[object Number]","[object Function]","[object RegExp]"],C=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,P=i.count!==void 0&&!Wt(i.count),I=yf.hasDefaultValue(i),ee=P?this.pluralResolver.getSuffix(y,i.count,i):"",B=i.ordinal&&P?this.pluralResolver.getSuffix(y,i.count,{ordinal:!1}):"",H=P&&!i.ordinal&&i.count===0,Y=H&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${ee}`]||i[`defaultValue${B}`]||i.defaultValue;let ue=T;A&&!T&&I&&(ue=Y);const xe=hg(ue),le=Object.prototype.toString.apply(ue);if(A&&ue&&xe&&O.indexOf(le)<0&&!(Wt(C)&&Array.isArray(ue))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ge=this.options.returnedObjectHandler?this.options.returnedObjectHandler(N,ue,Ee(ie({},i),{ns:g})):`key '${f} (${this.language})' returned an object instead of string.`;return d?(k.res=ge,k.usedParams=this.getUsedParamsDetails(i),k):ge}if(c){const ge=Array.isArray(ue),be=ge?[]:{},me=ge?S:N;for(const ae in ue)if(Object.prototype.hasOwnProperty.call(ue,ae)){const Z=`${me}${c}${ae}`;I&&!T?be[ae]=this.translate(Z,Ee(ie({},i),{defaultValue:hg(Y)?Y[ae]:void 0,joinArrays:!1,ns:g})):be[ae]=this.translate(Z,Ee(ie({},i),{joinArrays:!1,ns:g})),be[ae]===Z&&(be[ae]=ue[ae])}T=be}}else if(A&&Wt(C)&&Array.isArray(T))T=T.join(C),T&&(T=this.extendTranslation(T,t,i,s));else{let ge=!1,be=!1;!this.isValidLookup(T)&&I&&(ge=!0,T=Y),this.isValidLookup(T)||(be=!0,T=f);const ae=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&be?void 0:T,Z=I&&Y!==T&&this.options.updateMissing;if(be||ge||Z){if(this.logger.log(Z?"updateKey":"missingKey",y,p,f,Z?Y:T),c){const F=this.resolve(f,Ee(ie({},i),{keySeparator:!1}));F&&F.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 K=[];const te=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&te&&te[0])for(let F=0;F{var J;const G=I&&W!==T?W:ae;this.options.missingKeyHandler?this.options.missingKeyHandler(F,p,D,G,Z,i):(J=this.backendConnector)!=null&&J.saveMissing&&this.backendConnector.saveMissing(F,p,D,G,Z,i),this.emit("missingKey",F,p,D,T)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?K.forEach(F=>{const D=this.pluralResolver.getSuffixes(F,i);H&&i[`defaultValue${this.options.pluralSeparator}zero`]&&D.indexOf(`${this.options.pluralSeparator}zero`)<0&&D.push(`${this.options.pluralSeparator}zero`),D.forEach(W=>{se([F],f+W,i[`defaultValue${W}`]||Y)})}):se(K,f,Y))}T=this.extendTranslation(T,t,i,k,s),be&&T===f&&this.options.appendNamespaceToMissingKey&&(T=`${p}${x}${f}`),(be||ge)&&this.options.parseMissingKeyHandler&&(T=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${x}${f}`:f,ge?T:void 0,i))}return d?(k.res=T,k.usedParams=this.getUsedParamsDetails(i),k):T}extendTranslation(t,a,s,i,d){var g,p;if((g=this.i18nFormat)!=null&&g.parse)t=this.i18nFormat.parse(t,ie(ie({},this.options.interpolation.defaultVariables),s),s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init(Ee(ie({},s),{interpolation:ie(ie({},this.options.interpolation),s.interpolation)}));const x=Wt(t)&&(((p=s==null?void 0:s.interpolation)==null?void 0:p.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(x){const k=t.match(this.interpolator.nestingRegexp);y=k&&k.length}let _=s.replace&&!Wt(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(_=ie(ie({},this.options.interpolation.defaultVariables),_)),t=this.interpolator.interpolate(t,_,s.lng||this.language||i.usedLng,s),x){const k=t.match(this.interpolator.nestingRegexp),T=k&&k.length;y(d==null?void 0:d[0])===k[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${k[0]} in key: ${a[0]}`),null):this.translate(...k,a),s)),s.interpolation&&this.interpolator.reset()}const c=s.postProcess||this.options.postProcess,f=Wt(c)?[c]:c;return t!=null&&(f!=null&&f.length)&&s.applyPostProcessor!==!1&&(t=e_.handle(f,t,a,this.options&&this.options.postProcessPassResolved?ie({i18nResolved:Ee(ie({},i),{usedParams:this.getUsedParamsDetails(s)})},s):s,this)),t}resolve(t,a={}){let s,i,d,c,f;return Wt(t)&&(t=[t]),t.forEach(g=>{if(this.isValidLookup(s))return;const p=this.extractFromKey(g,a),x=p.key;i=x;let y=p.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const _=a.count!==void 0&&!Wt(a.count),k=_&&!a.ordinal&&a.count===0,T=a.context!==void 0&&(Wt(a.context)||typeof a.context=="number")&&a.context!=="",N=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);y.forEach(S=>{var O,C;this.isValidLookup(s)||(f=S,!l1[`${N[0]}-${S}`]&&((O=this.utils)!=null&&O.hasLoadedNamespace)&&!((C=this.utils)!=null&&C.hasLoadedNamespace(f))&&(l1[`${N[0]}-${S}`]=!0,this.logger.warn(`key "${i}" for languages "${N.join(", ")}" won't get resolved as namespace "${f}" 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!!!")),N.forEach(A=>{var ee;if(this.isValidLookup(s))return;c=A;const P=[x];if((ee=this.i18nFormat)!=null&&ee.addLookupKeys)this.i18nFormat.addLookupKeys(P,x,A,S,a);else{let B;_&&(B=this.pluralResolver.getSuffix(A,a.count,a));const H=`${this.options.pluralSeparator}zero`,Y=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(_&&(a.ordinal&&B.indexOf(Y)===0&&P.push(x+B.replace(Y,this.options.pluralSeparator)),P.push(x+B),k&&P.push(x+H)),T){const ue=`${x}${this.options.contextSeparator||"_"}${a.context}`;P.push(ue),_&&(a.ordinal&&B.indexOf(Y)===0&&P.push(ue+B.replace(Y,this.options.pluralSeparator)),P.push(ue+B),k&&P.push(ue+H))}}let I;for(;I=P.pop();)this.isValidLookup(s)||(d=I,s=this.getResource(A,S,I,a))}))})}),{res:s,usedKey:i,exactUsedKey:d,usedLng:c,usedNS:f}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,a,s,i={}){var d;return(d=this.i18nFormat)!=null&&d.getResource?this.i18nFormat.getResource(t,a,s,i):this.resourceStore.getResource(t,a,s,i)}getUsedParamsDetails(t={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=t.replace&&!Wt(t.replace);let i=s?t.replace:t;if(s&&typeof t.count!="undefined"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i=ie(ie({},this.options.interpolation.defaultVariables),i)),!s){i=ie({},i);for(const d of a)delete i[d]}return i}static hasDefaultValue(t){const a="defaultValue";for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&a===s.substring(0,a.length)&&t[s]!==void 0)return!0;return!1}}class o1{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Hs.create("languageUtils")}getScriptPartFromCode(t){if(t=t0(t),!t||t.indexOf("-")<0)return null;const a=t.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(t){if(t=t0(t),!t||t.indexOf("-")<0)return t;const a=t.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(t){if(Wt(t)&&t.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(t)[0]}catch(s){}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let a;return t.forEach(s=>{if(a)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(a=i)}),!a&&this.options.supportedLngs&&t.forEach(s=>{if(a)return;const i=this.getScriptPartFromCode(s);if(this.isSupportedCode(i))return a=i;const d=this.getLanguagePartFromCode(s);if(this.isSupportedCode(d))return a=d;a=this.options.supportedLngs.find(c=>{if(c===d)return c;if(!(c.indexOf("-")<0&&d.indexOf("-")<0)&&(c.indexOf("-")>0&&d.indexOf("-")<0&&c.substring(0,c.indexOf("-"))===d||c.indexOf(d)===0&&d.length>1))return c})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(t,a){if(!t)return[];if(typeof t=="function"&&(t=t(a)),Wt(t)&&(t=[t]),Array.isArray(t))return t;if(!a)return t.default||[];let s=t[a];return s||(s=t[this.getScriptPartFromCode(a)]),s||(s=t[this.formatLanguageCode(a)]),s||(s=t[this.getLanguagePartFromCode(a)]),s||(s=t.default),s||[]}toResolveHierarchy(t,a){const s=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],t),i=[],d=c=>{c&&(this.isSupportedCode(c)?i.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return Wt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&d(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(t))):Wt(t)&&d(this.formatLanguageCode(t)),s.forEach(c=>{i.indexOf(c)<0&&d(this.formatLanguageCode(c))}),i}}const c1={zero:0,one:1,two:2,few:3,many:4,other:5},d1={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class t3{constructor(t,a={}){this.languageUtils=t,this.options=a,this.logger=Hs.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,a){this.rules[t]=a}clearCache(){this.pluralRulesCache={}}getRule(t,a={}){const s=t0(t==="dev"?"en":t),i=a.ordinal?"ordinal":"cardinal",d=JSON.stringify({cleanedCode:s,type:i});if(d in this.pluralRulesCache)return this.pluralRulesCache[d];let c;try{c=new Intl.PluralRules(s,{type:i})}catch(f){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),d1;if(!t.match(/-|_/))return d1;const g=this.languageUtils.getLanguagePartFromCode(t);c=this.getRule(g,a)}return this.pluralRulesCache[d]=c,c}needsPlural(t,a={}){let s=this.getRule(t,a);return s||(s=this.getRule("dev",a)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,a,s={}){return this.getSuffixes(t,s).map(i=>`${a}${i}`)}getSuffixes(t,a={}){let s=this.getRule(t,a);return s||(s=this.getRule("dev",a)),s?s.resolvedOptions().pluralCategories.sort((i,d)=>c1[i]-c1[d]).map(i=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,a,s={}){const i=this.getRule(t,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(a)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",a,s))}}const u1=(e,t,a,s=".",i=!0)=>{let d=G4(e,t,a);return!d&&i&&Wt(a)&&(d=Pg(e,a,s),d===void 0&&(d=Pg(t,a,s))),d},mg=e=>e.replace(/\$/g,"$$$$");class f1{constructor(t={}){var a;this.logger=Hs.create("interpolator"),this.options=t,this.format=((a=t==null?void 0:t.interpolation)==null?void 0:a.format)||(s=>s),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:a,escapeValue:s,useRawValueToEscape:i,prefix:d,prefixEscaped:c,suffix:f,suffixEscaped:g,formatSeparator:p,unescapeSuffix:x,unescapePrefix:y,nestingPrefix:_,nestingPrefixEscaped:k,nestingSuffix:T,nestingSuffixEscaped:N,nestingOptionsSeparator:S,maxReplaces:O,alwaysFormat:C}=t.interpolation;this.escape=a!==void 0?a:q4,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=d?nc(d):c||"{{",this.suffix=f?nc(f):g||"}}",this.formatSeparator=p||",",this.unescapePrefix=x?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":x||"",this.nestingPrefix=_?nc(_):k||nc("$t("),this.nestingSuffix=T?nc(T):N||nc(")"),this.nestingOptionsSeparator=S||",",this.maxReplaces=O||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(a,s)=>(a==null?void 0:a.source)===s?(a.lastIndex=0,a):new RegExp(s,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,a,s,i){var k;let d,c,f;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=T=>{if(T.indexOf(this.formatSeparator)<0){const C=u1(a,g,T,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,s,Ee(ie(ie({},i),a),{interpolationkey:T})):C}const N=T.split(this.formatSeparator),S=N.shift().trim(),O=N.join(this.formatSeparator).trim();return this.format(u1(a,g,S,this.options.keySeparator,this.options.ignoreJSONStructure),O,s,Ee(ie(ie({},i),a),{interpolationkey:S}))};this.resetRegExp();const x=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,y=((k=i==null?void 0:i.interpolation)==null?void 0:k.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:T=>mg(T)},{regex:this.regexp,safeValue:T=>this.escapeValue?mg(this.escape(T)):mg(T)}].forEach(T=>{for(f=0;d=T.regex.exec(t);){const N=d[1].trim();if(c=p(N),c===void 0)if(typeof x=="function"){const O=x(t,d,i);c=Wt(O)?O:""}else if(i&&Object.prototype.hasOwnProperty.call(i,N))c="";else if(y){c=d[0];continue}else this.logger.warn(`missed to pass in variable ${N} for interpolating ${t}`),c="";else!Wt(c)&&!this.useRawValueToEscape&&(c=a1(c));const S=T.safeValue(c);if(t=t.replace(d[0],S),y?(T.regex.lastIndex+=c.length,T.regex.lastIndex-=d[0].length):T.regex.lastIndex=0,f++,f>=this.maxReplaces)break}}),t}nest(t,a,s={}){let i,d,c;const f=(g,p)=>{var N;const x=this.nestingOptionsSeparator;if(g.indexOf(x)<0)return g;const y=g.split(new RegExp(`${x}[ ]*{`));let _=`{${y[1]}`;g=y[0],_=this.interpolate(_,c);const k=_.match(/'/g),T=_.match(/"/g);(((N=k==null?void 0:k.length)!=null?N:0)%2===0&&!T||T.length%2!==0)&&(_=_.replace(/'/g,'"'));try{c=JSON.parse(_),p&&(c=ie(ie({},p),c))}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,S),`${g}${x}${_}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,g};for(;i=this.nestingRegexp.exec(t);){let g=[];c=ie({},s),c=c.replace&&!Wt(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const p=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(p!==-1&&(g=i[1].slice(p).split(this.formatSeparator).map(x=>x.trim()).filter(Boolean),i[1]=i[1].slice(0,p)),d=a(f.call(this,i[1].trim(),c),c),d&&i[0]===t&&!Wt(d))return d;Wt(d)||(d=a1(d)),d||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),d=""),g.length&&(d=g.reduce((x,y)=>this.format(x,y,s.lng,Ee(ie({},s),{interpolationkey:i[1].trim()})),d.trim())),t=t.replace(i[0],d),this.regexp.lastIndex=0}return t}}const a3=e=>{let t=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const s=e.split("(");t=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);t==="currency"&&i.indexOf(":")<0?a.currency||(a.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?a.range||(a.range=i.trim()):i.split(";").forEach(c=>{if(c){const[f,...g]=c.split(":"),p=g.join(":").trim().replace(/^'+|'+$/g,""),x=f.trim();a[x]||(a[x]=p),p==="false"&&(a[x]=!1),p==="true"&&(a[x]=!0),isNaN(p)||(a[x]=parseInt(p,10))}})}return{formatName:t,formatOptions:a}},h1=e=>{const t={};return(a,s,i)=>{let d=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(d=Ee(ie({},d),{[i.interpolationkey]:void 0}));const c=s+JSON.stringify(d);let f=t[c];return f||(f=e(t0(s),i),t[c]=f),f(a)}},r3=e=>(t,a,s)=>e(t0(a),s)(t);class n3{constructor(t={}){this.logger=Hs.create("formatter"),this.options=t,this.init(t)}init(t,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const s=a.cacheInBuiltFormats?h1:r3;this.formats={number:s((i,d)=>{const c=new Intl.NumberFormat(i,ie({},d));return f=>c.format(f)}),currency:s((i,d)=>{const c=new Intl.NumberFormat(i,Ee(ie({},d),{style:"currency"}));return f=>c.format(f)}),datetime:s((i,d)=>{const c=new Intl.DateTimeFormat(i,ie({},d));return f=>c.format(f)}),relativetime:s((i,d)=>{const c=new Intl.RelativeTimeFormat(i,ie({},d));return f=>c.format(f,d.range||"day")}),list:s((i,d)=>{const c=new Intl.ListFormat(i,ie({},d));return f=>c.format(f)})}}add(t,a){this.formats[t.toLowerCase().trim()]=a}addCached(t,a){this.formats[t.toLowerCase().trim()]=h1(a)}format(t,a,s,i={}){const d=a.split(this.formatSeparator);if(d.length>1&&d[0].indexOf("(")>1&&d[0].indexOf(")")<0&&d.find(f=>f.indexOf(")")>-1)){const f=d.findIndex(g=>g.indexOf(")")>-1);d[0]=[d[0],...d.splice(1,f)].join(this.formatSeparator)}return d.reduce((f,g)=>{var y;const{formatName:p,formatOptions:x}=a3(g);if(this.formats[p]){let _=f;try{const k=((y=i==null?void 0:i.formatParams)==null?void 0:y[i.interpolationkey])||{},T=k.locale||k.lng||i.locale||i.lng||s;_=this.formats[p](f,T,ie(ie(ie({},x),i),k))}catch(k){this.logger.warn(k)}return _}else this.logger.warn(`there was no format function for ${p}`);return f},t)}}const s3=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class i3 extends Uf{constructor(t,a,s,i={}){var d,c;super(),this.backend=t,this.store=a,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=Hs.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=[],(c=(d=this.backend)==null?void 0:d.init)==null||c.call(d,s,i.backend,i)}queueLoad(t,a,s,i){const d={},c={},f={},g={};return t.forEach(p=>{let x=!0;a.forEach(y=>{const _=`${p}|${y}`;!s.reload&&this.store.hasResourceBundle(p,y)?this.state[_]=2:this.state[_]<0||(this.state[_]===1?c[_]===void 0&&(c[_]=!0):(this.state[_]=1,x=!1,c[_]===void 0&&(c[_]=!0),d[_]===void 0&&(d[_]=!0),g[y]===void 0&&(g[y]=!0)))}),x||(f[p]=!0)}),(Object.keys(d).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(d),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(g)}}loaded(t,a,s){const i=t.split("|"),d=i[0],c=i[1];a&&this.emit("failedLoading",d,c,a),!a&&s&&this.store.addResourceBundle(d,c,s,void 0,void 0,{skipCopy:!0}),this.state[t]=a?-1:2,a&&s&&(this.state[t]=0);const f={};this.queue.forEach(g=>{V4(g.loaded,[d],c),s3(g,t),a&&g.errors.push(a),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(p=>{f[p]||(f[p]={});const x=g.loaded[p];x.length&&x.forEach(y=>{f[p][y]===void 0&&(f[p][y]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(g=>!g.done)}read(t,a,s,i=0,d=this.retryTimeout,c){if(!t.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:a,fcName:s,tried:i,wait:d,callback:c});return}this.readingCalls++;const f=(p,x)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(p&&x&&i{this.read.call(this,t,a,s,i+1,d*2,c)},d);return}c(p,x)},g=this.backend[s].bind(this.backend);if(g.length===2){try{const p=g(t,a);p&&typeof p.then=="function"?p.then(x=>f(null,x)).catch(f):f(null,p)}catch(p){f(p)}return}return g(t,a,f)}prepareLoading(t,a,s={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Wt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Wt(a)&&(a=[a]);const d=this.queueLoad(t,a,s,i);if(!d.toLoad.length)return d.pending.length||i(),null;d.toLoad.forEach(c=>{this.loadOne(c)})}load(t,a,s){this.prepareLoading(t,a,{},s)}reload(t,a,s){this.prepareLoading(t,a,{reload:!0},s)}loadOne(t,a=""){const s=t.split("|"),i=s[0],d=s[1];this.read(i,d,"read",void 0,void 0,(c,f)=>{c&&this.logger.warn(`${a}loading namespace ${d} for language ${i} failed`,c),!c&&f&&this.logger.log(`${a}loaded namespace ${d} for language ${i}`,f),this.loaded(t,c,f)})}saveMissing(t,a,s,i,d,c={},f=()=>{}){var g,p,x,y,_;if((p=(g=this.services)==null?void 0:g.utils)!=null&&p.hasLoadedNamespace&&!((y=(x=this.services)==null?void 0:x.utils)!=null&&y.hasLoadedNamespace(a))){this.logger.warn(`did not save key "${s}" as the 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!!!");return}if(!(s==null||s==="")){if((_=this.backend)!=null&&_.create){const k=Ee(ie({},c),{isUpdate:d}),T=this.backend.create.bind(this.backend);if(T.length<6)try{let N;T.length===5?N=T(t,a,s,i,k):N=T(t,a,s,i),N&&typeof N.then=="function"?N.then(S=>f(null,S)).catch(f):f(null,N)}catch(N){f(N)}else T(t,a,s,i,f,k)}!t||!t[0]||this.store.addResource(t[0],a,s,i)}}}const m1=()=>({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(typeof e[1]=="object"&&(t=e[1]),Wt(e[1])&&(t.defaultValue=e[1]),Wt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(s=>{t[s]=a[s]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),g1=e=>{var t,a;return Wt(e.ns)&&(e.ns=[e.ns]),Wt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Wt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((a=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:a.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Zu=()=>{},l3=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class Gd extends Uf{constructor(t={},a){if(super(),this.options=g1(t),this.services={},this.logger=Hs,this.modules={external:[]},l3(this),a&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,a),this;setTimeout(()=>{this.init(t,a)},0)}}init(t={},a){this.isInitializing=!0,typeof t=="function"&&(a=t,t={}),t.defaultNS==null&&t.ns&&(Wt(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=m1();this.options=ie(ie(ie({},s),this.options),g1(t)),this.options.interpolation=ie(ie({},s.interpolation),this.options.interpolation),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler);const i=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?Hs.init(i(this.modules.logger),this.options):Hs.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=n3;const x=new o1(this.options);this.store=new i1(this.options.resources,this.options);const y=this.services;y.logger=Hs,y.resourceStore=this.store,y.languageUtils=x,y.pluralResolver=new t3(x,{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"),p&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(y.formatter=i(p),y.formatter.init&&y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new f1(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new i3(i(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",(k,...T)=>{this.emit(k,...T)}),this.modules.languageDetector&&(y.languageDetector=i(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=i(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new yf(this.services,this.options),this.translator.on("*",(k,...T)=>{this.emit(k,...T)}),this.modules.external.forEach(k=>{k.init&&k.init(this)})}if(this.format=this.options.interpolation.format,a||(a=Zu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[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(p=>{this[p]=(...x)=>this.store[p](...x)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...x)=>(this.store[p](...x),this)});const f=Id(),g=()=>{const p=(x,y)=>{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),f.resolve(y),a(x,y)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),f}loadResources(t,a=Zu){var d,c;let s=a;const i=Wt(t)?t:this.language;if(typeof t=="function"&&(s=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const f=[],g=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(y=>{y!=="cimode"&&f.indexOf(y)<0&&f.push(y)})};i?g(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(x=>g(x)),(c=(d=this.options.preload)==null?void 0:d.forEach)==null||c.call(d,p=>g(p)),this.services.backendConnector.load(f,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(p)})}else s(null)}reloadResources(t,a,s){const i=Id();return typeof t=="function"&&(s=t,t=void 0),typeof a=="function"&&(s=a,a=void 0),t||(t=this.languages),a||(a=this.options.ns),s||(s=Zu),this.services.backendConnector.reload(t,a,d=>{i.resolve(),s(d)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&e_.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let a=0;a-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,a){this.isLanguageChangingTo=t;const s=Id();this.emit("languageChanging",t);const i=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},d=(f,g)=>{g?this.isLanguageChangingTo===t&&(i(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,s.resolve((...p)=>this.t(...p)),a&&a(f,(...p)=>this.t(...p))},c=f=>{var x,y;!t&&!f&&this.services.languageDetector&&(f=[]);const g=Wt(f)?f:f&&f[0],p=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(Wt(f)?[f]:f);p&&(this.language||i(p),this.translator.language||this.translator.changeLanguage(p),(y=(x=this.services.languageDetector)==null?void 0:x.cacheUserLanguage)==null||y.call(x,p)),this.loadResources(p,_=>{d(_,p)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),s}getFixedT(t,a,s){const i=(d,c,...f)=>{let g;typeof c!="object"?g=this.options.overloadTranslationOptionHandler([d,c].concat(f)):g=ie({},c),g.lng=g.lng||i.lng,g.lngs=g.lngs||i.lngs,g.ns=g.ns||i.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||s||i.keyPrefix);const p=this.options.keySeparator||".";let x;return g.keyPrefix&&Array.isArray(d)?x=d.map(y=>(typeof y=="function"&&(y=Rg(y,ie(ie({},this.options),c))),`${g.keyPrefix}${p}${y}`)):(typeof d=="function"&&(d=Rg(d,ie(ie({},this.options),c))),x=g.keyPrefix?`${g.keyPrefix}${p}${d}`:d),this.t(x,g)};return Wt(t)?i.lng=t:i.lngs=t,i.ns=a,i.keyPrefix=s,i}t(...t){var a;return(a=this.translator)==null?void 0:a.translate(...t)}exists(...t){var a;return(a=this.translator)==null?void 0:a.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,a={}){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 s=a.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,d=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const c=(f,g)=>{const p=this.services.backendConnector.state[`${f}|${g}`];return p===-1||p===0||p===2};if(a.precheck){const f=a.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(s,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(s,t)&&(!i||c(d,t)))}loadNamespaces(t,a){const s=Id();return this.options.ns?(Wt(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),a&&a(i)}),s):(a&&a(),Promise.resolve())}loadLanguages(t,a){const s=Id();Wt(t)&&(t=[t]);const i=this.options.preload||[],d=t.filter(c=>i.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return d.length?(this.options.preload=i.concat(d),this.loadResources(c=>{s.resolve(),a&&a(c)}),s):(a&&a(),Promise.resolve())}dir(t){var i,d;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const c=new Intl.Locale(t);if(c&&c.getTextInfo){const f=c.getTextInfo();if(f&&f.direction)return f.direction}}catch(c){}const a=["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"],s=((d=this.services)==null?void 0:d.languageUtils)||new o1(m1());return t.toLowerCase().indexOf("-latn")>1?"ltr":a.indexOf(s.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},a){const s=new Gd(t,a);return s.createInstance=Gd.createInstance,s}cloneInstance(t={},a=Zu){const s=t.forkResourceStore;s&&delete t.forkResourceStore;const i=Ee(ie(ie({},this.options),t),{isClone:!0}),d=new Gd(i);if((t.debug!==void 0||t.prefix!==void 0)&&(d.logger=d.logger.clone(t)),["store","services","language"].forEach(f=>{d[f]=this[f]}),d.services=ie({},this.services),d.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},s){const f=Object.keys(this.store.data).reduce((g,p)=>(g[p]=ie({},this.store.data[p]),g[p]=Object.keys(g[p]).reduce((x,y)=>(x[y]=ie({},g[p][y]),x),g[p]),g),{});d.store=new i1(f,i),d.services.resourceStore=d.store}return t.interpolation&&(d.services.interpolator=new f1(i)),d.translator=new yf(d.services,i),d.translator.on("*",(f,...g)=>{d.emit(f,...g)}),d.init(i,a),d.translator.options=i,d.translator.backendConnector.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},d}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Nr=Gd.createInstance();Nr.createInstance;Nr.dir;Nr.init;Nr.loadResources;Nr.reloadResources;Nr.use;Nr.changeLanguage;Nr.getFixedT;Nr.t;Nr.exists;Nr.setDefaultNamespace;Nr.hasLoadedNamespace;Nr.loadNamespaces;Nr.loadLanguages;const o3=(e,t,a,s)=>{var d,c,f,g;const i=[a,ie({code:t},s||{})];if((c=(d=e==null?void 0:e.services)==null?void 0:d.logger)!=null&&c.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);no(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(g=(f=e==null?void 0:e.services)==null?void 0:f.logger)!=null&&g.warn?e.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},p1={},a_=(e,t,a,s)=>{no(a)&&p1[a]||(no(a)&&(p1[a]=new Date),o3(e,t,a,s))},r_=(e,t)=>()=>{if(e.isInitialized)t();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),t()};e.on("initialized",a)}},Fg=(e,t,a)=>{e.loadNamespaces(t,r_(e,a))},x1=(e,t,a,s)=>{if(no(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Fg(e,a,s);a.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,r_(e,s))},c3=(e,t,a={})=>!t.languages||!t.languages.length?(a_(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:a.lng,precheck:(s,i)=>{if(a.bindI18n&&a.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!i(s.isLanguageChangingTo,e))return!1}}),no=e=>typeof e=="string",d3=e=>typeof e=="object"&&e!==null,u3=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,f3={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},h3=e=>f3[e],m3=e=>e.replace(u3,h3);let Ig={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:m3};const g3=(e={})=>{Ig=ie(ie({},Ig),e)},p3=()=>Ig;let n_;const x3=e=>{n_=e},y3=()=>n_,b3={type:"3rdParty",init(e){g3(e.options.react),x3(e)}},v3=j.createContext();class _3{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var gg={exports:{}},pg={};var y1;function w3(){if(y1)return pg;y1=1;var e=Bf();function t(y,_){return y===_&&(y!==0||1/y===1/_)||y!==y&&_!==_}var a=typeof Object.is=="function"?Object.is:t,s=e.useState,i=e.useEffect,d=e.useLayoutEffect,c=e.useDebugValue;function f(y,_){var k=_(),T=s({inst:{value:k,getSnapshot:_}}),N=T[0].inst,S=T[1];return d(function(){N.value=k,N.getSnapshot=_,g(N)&&S({inst:N})},[y,k,_]),i(function(){return g(N)&&S({inst:N}),y(function(){g(N)&&S({inst:N})})},[y]),c(k),k}function g(y){var _=y.getSnapshot;y=y.value;try{var k=_();return!a(y,k)}catch(T){return!0}}function p(y,_){return _()}var x=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?p:f;return pg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:x,pg}var b1;function k3(){return b1||(b1=1,gg.exports=w3()),gg.exports}var N3=k3();const j3=(e,t)=>no(t)?t:d3(t)&&no(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,S3={t:j3,ready:!1},T3=()=>()=>{},Qa=(e,t={})=>{var Y,ue,xe;const{i18n:a}=t,{i18n:s,defaultNS:i}=j.useContext(v3)||{},d=a||s||y3();d&&!d.reportNamespaces&&(d.reportNamespaces=new _3),d||a_(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const c=j.useMemo(()=>{var le;return ie(ie(ie({},p3()),(le=d==null?void 0:d.options)==null?void 0:le.react),t)},[d,t]),{useSuspense:f,keyPrefix:g}=c,p=i||((Y=d==null?void 0:d.options)==null?void 0:Y.defaultNS),x=no(p)?[p]:p||["translation"],y=j.useMemo(()=>x,x);(xe=(ue=d==null?void 0:d.reportNamespaces)==null?void 0:ue.addUsedNamespaces)==null||xe.call(ue,y);const _=j.useRef(0),k=j.useCallback(le=>{if(!d)return T3;const{bindI18n:ge,bindI18nStore:be}=c,me=()=>{_.current+=1,le()};return ge&&d.on(ge,me),be&&d.store.on(be,me),()=>{ge&&ge.split(" ").forEach(ae=>d.off(ae,me)),be&&be.split(" ").forEach(ae=>d.store.off(ae,me))}},[d,c]),T=j.useRef(),N=j.useCallback(()=>{if(!d)return S3;const le=!!(d.isInitialized||d.initializedStoreOnce)&&y.every(K=>c3(K,d,c)),ge=t.lng||d.language,be=_.current,me=T.current;if(me&&me.ready===le&&me.lng===ge&&me.keyPrefix===g&&me.revision===be)return me;const Z={t:d.getFixedT(ge,c.nsMode==="fallback"?y:y[0],g),ready:le,lng:ge,keyPrefix:g,revision:be};return T.current=Z,Z},[d,y,g,c,t.lng]),[S,O]=j.useState(0),{t:C,ready:A}=N3.useSyncExternalStore(k,N,N);j.useEffect(()=>{if(d&&!A&&!f){const le=()=>O(ge=>ge+1);t.lng?x1(d,t.lng,y,le):Fg(d,y,le)}},[d,t.lng,y,A,f,S]);const P=d||{},I=j.useRef(null),ee=j.useRef(),B=le=>{const ge=Object.getOwnPropertyDescriptors(le);ge.__original&&delete ge.__original;const be=Object.create(Object.getPrototypeOf(le),ge);if(!Object.prototype.hasOwnProperty.call(be,"__original"))try{Object.defineProperty(be,"__original",{value:le,writable:!1,enumerable:!1,configurable:!1})}catch(me){}return be},H=j.useMemo(()=>{const le=P,ge=le==null?void 0:le.language;let be=le;le&&(I.current&&I.current.__original===le?ee.current!==ge?(be=B(le),I.current=be,ee.current=ge):be=I.current:(be=B(le),I.current=be,ee.current=ge));const me=[C,be,A];return me.t=C,me.i18n=be,me.ready=A,me},[C,P,A,P.resolvedLanguage,P.language,P.languages]);if(d&&f&&!A)throw new Promise(le=>{const ge=()=>le();t.lng?x1(d,t.lng,y,ge):Fg(d,y,ge)});return H},{slice:E3,forEach:C3}=[];function A3(e){return C3.call(E3.call(arguments,1),t=>{if(t)for(const a in t)e[a]===void 0&&(e[a]=t[a])}),e}function O3(e){return typeof e!="string"?!1:[/<\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(a=>a.test(e))}const v1=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,M3=function(e,t){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let d=`${e}=${i}`;if(s.maxAge>0){const c=s.maxAge-0;if(Number.isNaN(c))throw new Error("maxAge should be a Number");d+=`; Max-Age=${Math.floor(c)}`}if(s.domain){if(!v1.test(s.domain))throw new TypeError("option domain is invalid");d+=`; Domain=${s.domain}`}if(s.path){if(!v1.test(s.path))throw new TypeError("option path is invalid");d+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");d+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(d+="; HttpOnly"),s.secure&&(d+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"strict":d+="; SameSite=Strict";break;case"none":d+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(d+="; Partitioned"),d},_1={create(e,t,a,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};a&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+a*60*1e3)),s&&(i.domain=s),document.cookie=M3(e,t,i)},read(e){const t=`${e}=`,a=document.cookie.split(";");for(let s=0;s-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const c=i.substring(1).split("&");for(let f=0;f0&&c[f].substring(0,g)===t&&(a=c[f].substring(g+1))}}return a}},P3={name:"hash",lookup(e){var i;let{lookupHash:t,lookupFromHashIndex:a}=e,s;if(typeof window!="undefined"){const{hash:d}=window.location;if(d&&d.length>2){const c=d.substring(1);if(t){const f=c.split("&");for(let g=0;g0&&f[g].substring(0,p)===t&&(s=f[g].substring(p+1))}}if(s)return s;if(!s&&a>-1){const f=d.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?(i=f[typeof a=="number"?a:0])==null?void 0:i.replace("/",""):void 0}}}return s}};let sc=null;const w1=()=>{if(sc!==null)return sc;try{if(sc=typeof window!="undefined"&&window.localStorage!==null,!sc)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){sc=!1}return sc};var R3={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&w1())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:a}=t;a&&w1()&&window.localStorage.setItem(a,e)}};let ic=null;const k1=()=>{if(ic!==null)return ic;try{if(ic=typeof window!="undefined"&&window.sessionStorage!==null,!ic)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){ic=!1}return ic};var F3={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&k1())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:a}=t;a&&k1()&&window.sessionStorage.setItem(a,e)}},I3={name:"navigator",lookup(e){const t=[];if(typeof navigator!="undefined"){const{languages:a,userLanguage:s,language:i}=navigator;if(a)for(let d=0;d0?t:void 0}},z3={name:"htmlTag",lookup(e){let{htmlTag:t}=e,a;const s=t||(typeof document!="undefined"?document.documentElement:null);return s&&typeof s.getAttribute=="function"&&(a=s.getAttribute("lang")),a}},B3={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window=="undefined")return;const a=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(i=a[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},U3={name:"subdomain",lookup(e){var i,d;let{lookupFromSubdomainIndex:t}=e;const a=typeof t=="number"?t+1:1,s=typeof window!="undefined"&&((d=(i=window.location)==null?void 0:i.hostname)==null?void 0:d.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(s)return s[a]}};let s_=!1;try{document.cookie,s_=!0}catch(e){}const i_=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];s_||i_.splice(1,1);const H3=()=>({order:i_,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class l_{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,a)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=A3(a,this.options||{},H3()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(L3),this.addDetector(D3),this.addDetector(R3),this.addDetector(F3),this.addDetector(I3),this.addDetector(z3),this.addDetector(B3),this.addDetector(U3),this.addDetector(P3)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,a=[];return t.forEach(s=>{if(this.detectors[s]){let i=this.detectors[s].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(a=a.concat(i))}}),a=a.filter(s=>s!=null&&!O3(s)).map(s=>this.options.convertDetectedLanguage(s)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}cacheUserLanguage(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;a&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||a.forEach(s=>{this.detectors[s]&&this.detectors[s].cacheUserLanguage(t,this.options)}))}}l_.type="languageDetector";const $3={dashboard:"Dashboard",assets:"Assets",workOrders:"Work Orders",maintenance:"Asset Maintenance",ppm:"PPM",logout:"Logout",login:"Login",email:"Email",password:"Password",submit:"Submit",cancel:"Cancel",save:"Save",delete:"Delete",deleting:"Deleting...",edit:"Edit",create:"Create",search:"Search",filter:"Filter",export:"Export",import:"Import",loading:"Loading...",noData:"No data available",error:"Error",success:"Success",darkMode:"Dark Mode",lightMode:"Light Mode",language:"Language",english:"English",arabic:"Arabic",backToDashboard:"Back to Dashboard"},W3={title:"Seera-ASM",loggedInAs:"Logged in as:",version:"Seera-ASM v1.0",inventory:"Inventory",ppmPlanner:"PPM Planner",maintenanceCalendar:"Maintenance Calendar",activeMap:"Active Map",maintenanceTeam:"Maintenance Team",procurement:"Procurement",sla:"Service Level Agreement (SLA)",support:"Support"},V3={title:"Seera-ASM",subtitle:"Asset Management System",signIn:"Sign in to continue",emailPlaceholder:"Enter your email",passwordPlaceholder:"Enter your password",loginFailed:"Login failed. Please check your credentials.",demoLogin:"Demo Login"},G3={title:"Dashboard",loading:"Loading dashboard...",totalAssets:"TOTAL NO. OF ASSETS",openWorkOrders:"OPEN WORK ORDERS",workOrdersInProgress:"WORK ORDERS IN PROGRESS",completedWorkOrders:"COMPLETED WORK ORDERS",totalWorkOrders:"TOTAL WORK ORDERS",overdueWorkOrders:"OVERDUE WORK ORDERS",upTime:"Up Time",downTime:"Down Time",workOrderStatus:"Work Order Status",workOrderByType:"Work Order by Type",maintenanceByAsset:"Maintenance by Asset",assigneesStatus:"Assignees Status",maintenanceFrequency:"Maintenance Frequency",maintenanceLogs:"MAINTENANCE LOGS",assetUptime:"Asset Uptime",avgResponseTime:"Avg Response Time",maintenanceEfficiency:"Maintenance Efficiency",overdueMaintenance:"Overdue Maintenance",upDownTimeChart:"Up & Down Time Chart",ppmStatus:"PPM Status"},Z3={assetId:"Asset ID",assetName:"Asset Name",serialNumber:"Serial Number",company:"Company/Hospital",location:"Location",department:"Department",deviceStatus:"Device Status",modality:"Modality",manufacturer:"Manufacturer",supplier:"Supplier",assetCategory:"Asset Category",purchaseDate:"Purchase Date",purchaseAmount:"Purchase Amount",availableForUseDate:"Available For Use Date",createdOn:"Created On",modifiedOn:"Modified On",createdBy:"Created By",modifiedBy:"Modified By",workOrderId:"Work Order ID",workOrderType:"Type",status:"Status",priority:"Priority",description:"Description",assignedTo:"Assigned To",scheduledDate:"Scheduled Date",completedDate:"Completed Date",hospital:"Hospital",assetType:"Asset Type",siteName:"Site Name",assignedSupervisor:"Assigned Supervisor",assignedContractor:"Assigned Contractor",serialNumberShort:"Serial",departmentShort:"Dept",manufacturerShort:"Mfr",workOrderIdShort:"WO ID",assetShort:"Asset",typeShort:"Type",nameShort:"Name",pmId:"PM ID",name:"Name"},q3={assetId:"Asset ID",hospital:"Hospital",name:"Name",serial:"Serial",status:"Status",location:"Location",dept:"Dept",modality:"Modality",mfr:"Mfr",supplier:"Supplier",workOrderId:"WO ID",asset:"Asset",type:"Type",priority:"Priority",allHospitals:"All Hospitals",allModalities:"All Modalities",filterByCompany:"Filter by Company",allManufacturers:"All Manufacturers"},Y3={addNew:"Add New",searchPlaceholder:"Search...",noResults:"No results found",showing:"Showing",of:"of",results:"results",selectAll:"Select All",deselectAll:"Deselect All",selected:"selected",actions:"Actions",view:"View",edit:"Edit",delete:"Delete",duplicate:"Duplicate",export:"Export",print:"Print",filters:"Filters",clearFilters:"Clear filters",applyFilters:"Apply Filters",columns:"Columns",exportSelected:"Export Selected",exportAllOnPage:"Export All on Page",exportAllWithFilters:"Export All with Filters",exportFormat:"Export Format",csv:"CSV",excel:"Excel",exporting:"Exporting...",exportComplete:"Export Complete",close:"Close",loading:"Loading...",refresh:"Refresh",deselectAllTitle:"Deselect all",selectAllTitle:"Select all",typeToSearch:"Type to search...",enterFilterName:"Enter filter name",enterFilterNameExample:"Enter filter name (e.g., 'Open High Priority')",allStatuses:"All Statuses",noIssuesFound:"No issues found",createFirstIssue:"Create your first issue",saveFilterPreset:"Save Filter Preset",saveFilter:"Save Filter",filtering:"Filtering...",noMaintenanceTeamsFound:"No maintenance teams found",createFirstTeam:"Create your first team",all:"All",tryAdjustingFilters:"Try adjusting your search or filters",getStartedCreateFirst:"Get started by creating your first PPM Planner",noMaintenanceLogsFound:"No maintenance logs found",createFirstMaintenanceLog:"Create your first maintenance log",total:"Total",noPPMSchedulesFound:"No PPM schedules found",createFirstPPMSchedule:"Create your first PPM schedule"},X3={title:"Assets",addAsset:"Add New Asset",assetDetails:"Asset Details",assetInformation:"Asset Information",newAsset:"New Asset",duplicateAsset:"Duplicate Asset",fromAsset:"From Asset",creatingFromAsset:"Creating Work Order from Asset",assetInfoPrefilled:"Asset information prefilled from",pleaseSelectWorkOrderType:"Please select a Work Order type and add any additional details",loadingAssetDetails:"Loading asset details...",pleaseEnterAssetName:"Please enter an Asset Name",pleaseSelectCategory:"Please select a Category",assetDuplicatedSuccessfully:"Asset duplicated successfully!",assetCreatedSuccessfully:"Asset created successfully!",assetUpdatedSuccessfully:"Asset updated successfully!",sourceAssetNotFound:"Source Asset Not Found",assetNotFoundMessage:"The asset you're trying to duplicate could not be found.",backToAssetsList:"Back to Assets List",newAssetDetails:"New Asset Details",noAssetsFound:"No assets found",createFirstAsset:"Create your first asset"},J3={title:"Work Orders",addWorkOrder:"Add New Work Order",workOrderDetails:"Work Order Details",newWorkOrder:"New Work Order",duplicateWorkOrder:"Duplicate Work Order",createFromAsset:"Create Work Order from Asset"},K3={title:"Asset Maintenance",maintenanceLogs:"Maintenance Logs",maintenanceDetails:"Maintenance Details",addMaintenance:"Add New Maintenance",maintenanceTeam:"Maintenance Team",newMaintenanceTeam:"New Maintenance Team",teamId:"Team ID",teamName:"Team Name",managerEmail:"Manager Email",managerName:"Manager Name",expertise:"Expertise",selectTeam:"Select Team",viewDetails:"View Details",editTeam:"Edit Team",duplicateTeam:"Duplicate Team",deleteTeam:"Delete Team",selectHospital:"Select Hospital",selectExpertise:"Select Expertise",selectManager:"Select Manager",enterTeamName:"Enter Team Name",teamInformation:"Team Information",selectUser:"Select User",selectRole:"Select Role",totalMembers:"Total Members",teamSummary:"Team Summary",addFirstMember:"Add First Member",manager:"Maintenance Manager"},Q3={title:"PPM",ppmDetails:"PPM Details",addPPM:"Add New PPM",periodicity:"Periodicity",dueDate:"Due Date",manageSchedules:"Manage PM Schedules",pmId:"PM ID",name:"Name",manufacturer:"Manufacturer"},eN={title:"Export",whatToExport:"What to Export",selectedRows:"Selected Rows",currentPage:"Current Page",allWithFilters:"All with Filters",exportSelected:"Export {count} selected",exportPage:"Export {count} on current page",exportAll:"Export all {count}",columnsToExport:"Columns to Export",selectAll:"Select All",selectDefault:"Select Default",exporting:"Exporting...",exportingSelected:"Exporting {count} selected row(s)",exportingPage:"Exporting {count} row(s) from current page",exportingAll:"Exporting all {count} row(s)",selected:"selected",rows:"rows"},tN={title:"Items",itemDetails:"Item Details",newItem:"New Item",addItem:"Add New Item",itemId:"Item ID",itemCode:"Item Code",itemName:"Item Name",itemGroup:"Item Group",stockUOM:"Stock UOM",partDescription:"Part Description",brand:"Brand",valuationRate:"Valuation Rate",openingStock:"Opening Stock",lastCalibrationDate:"Last Calibration Date",nextCalibrationDate:"Next Calibration Date",selectItem:"Select Item",selectItemGroup:"Select Item Group",selectHospital:"Select Hospital",viewDetails:"View Details",editItem:"Edit Item",duplicateItem:"Duplicate Item",deleteItem:"Delete Item",basicInformation:"Basic Information",stockInformation:"Stock Information",isStockItem:"Is Stock Item",balanceQty:"Balance Qty",calibrationInformation:"Calibration Information",additionalInformation:"Additional Information",refreshBalanceQty:"Refresh Balance Qty",warrantyMonths:"Warranty (Months)"},aN={title:"Issues",issueDetails:"Issue Details",newIssue:"New Issue",addIssue:"Add New Issue",issueId:"Issue ID",subject:"Subject",raisedBy:"Raised By",contact:"Contact",issueType:"Issue Type",openingDate:"Opening Date",resolutionDate:"Resolution Date",resolvedBy:"Resolved By",firstRespondedOn:"First Responded On",resolutionDetails:"Resolution Details",selectIssue:"Select Issue",allPriorities:"All Priorities",allCompanies:"All Companies",viewDetails:"View Details",editIssue:"Edit Issue",deleteIssue:"Delete Issue",enterSubject:"Enter issue subject",selectPriority:"Select priority",selectIssueType:"Select issue type",describeIssue:"Describe the issue in detail...",contactInformation:"Contact Information",createNewIssue:"Create a new support issue",resolution:"Resolution",describeResolution:"Describe how the issue was resolved...",selectCompany:"Select company",statusInformation:"Status Information",currentStatus:"Current Status",timeline:"Timeline"},rN={title:"Users",userDetails:"User Details",newUser:"New User",addUser:"Add New User",searchUsers:"Search users...",manageUsers:"Manage user accounts and permissions",noUsersFound:"No users found",tryAdjustingSearch:"Try adjusting your search terms.",noUsersAvailable:"No users available.",backToDashboard:"Back to Dashboard"},nN={title:"Events",eventDetails:"Event Details",newEvent:"New Event",addEvent:"Add New Event",upcomingEvents:"Upcoming Events",eventsFromFrappe:"Events from your Frappe backend",noEventsFound:"No events found",noEventsScheduled:"No events are currently scheduled.",refreshEvents:"Refresh Events"},sN={common:$3,sidebar:W3,login:V3,dashboard:G3,commonFields:Z3,filters:q3,listPages:Y3,assets:X3,workOrders:J3,maintenance:K3,ppm:Q3,exportModal:eN,items:tN,issues:aN,users:rN,events:nN},iN={dashboard:"لوحة التحكم",assets:"الأصول",workOrders:"أوامر العمل",maintenance:"صيانة الأصول",ppm:"الصيانة الوقائية",logout:"تسجيل الخروج",login:"تسجيل الدخول",email:"البريد الإلكتروني",password:"كلمة المرور",submit:"إرسال",cancel:"إلغاء",save:"حفظ",delete:"حذف",edit:"تعديل",create:"إنشاء",search:"بحث",filter:"تصفية",export:"تصدير",import:"استيراد",loading:"جاري التحميل...",noData:"لا توجد بيانات",error:"خطأ",success:"نجح",darkMode:"الوضع الداكن",lightMode:"الوضع الفاتح",language:"اللغة",english:"الإنجليزية",arabic:"العربية"},lN={title:"أصول سيرا",loggedInAs:"تم تسجيل الدخول كـ:",version:"أصول سيرا نظام إدارة الأصول الإصدار 1.0"},oN={title:"أصول سيرا",subtitle:"نظام إدارة الأصول",signIn:"قم بتسجيل الدخول للمتابعة",emailPlaceholder:"أدخل بريدك الإلكتروني",passwordPlaceholder:"أدخل كلمة المرور",loginFailed:"فشل تسجيل الدخول. يرجى التحقق من بيانات الاعتماد الخاصة بك.",demoLogin:"تسجيل دخول تجريبي"},cN={title:"لوحة التحكم",loading:"جاري تحميل لوحة التحكم...",totalAssets:"إجمالي عدد الأصول",openWorkOrders:"أوامر العمل المفتوحة",workOrdersInProgress:"أوامر العمل قيد التنفيذ",completedWorkOrders:"أوامر العمل المكتملة",totalWorkOrders:"إجمالي أوامر العمل",overdueWorkOrders:"أوامر العمل المتأخرة",upTime:"وقت التشغيل",downTime:"وقت التوقف",workOrderStatus:"حالة أمر العمل",workOrderByType:"أمر العمل حسب النوع",maintenanceByAsset:"الصيانة حسب الأصل",assigneesStatus:"حالة المكلفين",maintenanceFrequency:"تكرار الصيانة",maintenanceLogs:"سجلات الصيانة",assetUptime:"وقت تشغيل الأصل",avgResponseTime:"متوسط وقت الاستجابة",maintenanceEfficiency:"كفاءة الصيانة",overdueMaintenance:"صيانة متأخرة",upDownTimeChart:"مخطط وقت التشغيل والتوقف",ppmStatus:"حالة الصيانة الوقائية"},dN={assetId:"معرف الأصل",assetName:"اسم الأصل",serialNumber:"الرقم التسلسلي",company:"الشركة/المستشفى",location:"الموقع",department:"القسم",deviceStatus:"حالة الجهاز",modality:"الطريقة",manufacturer:"الشركة المصنعة",supplier:"المورد",assetCategory:"فئة الأصل",purchaseDate:"تاريخ الشراء",purchaseAmount:"مبلغ الشراء",availableForUseDate:"تاريخ التوفر للاستخدام",createdOn:"تم الإنشاء في",modifiedOn:"تم التعديل في",createdBy:"تم الإنشاء بواسطة",modifiedBy:"تم التعديل بواسطة",workOrderId:"معرف أمر العمل",workOrderType:"النوع",status:"الحالة",priority:"الأولوية",description:"الوصف",assignedTo:"مكلف إلى",scheduledDate:"التاريخ المجدول",completedDate:"تاريخ الإكمال"},uN={addNew:"إضافة جديد",searchPlaceholder:"بحث...",noResults:"لم يتم العثور على نتائج",showing:"عرض",of:"من",results:"نتائج",selectAll:"تحديد الكل",deselectAll:"إلغاء تحديد الكل",selected:"محدد",actions:"الإجراءات",view:"عرض",edit:"تعديل",delete:"حذف",duplicate:"نسخ",export:"تصدير",print:"طباعة",filters:"المرشحات",clearFilters:"مسح المرشحات",applyFilters:"تطبيق المرشحات",columns:"الأعمدة",exportSelected:"تصدير المحدد",exportAllOnPage:"تصدير الكل في الصفحة",exportAllWithFilters:"تصدير الكل مع المرشحات",exportFormat:"تنسيق التصدير",csv:"CSV",excel:"Excel",exporting:"جاري التصدير...",exportComplete:"اكتمل التصدير",close:"إغلاق",loading:"جاري التحميل...",refresh:"تحديث"},fN={title:"الأصول",addAsset:"إضافة أصل جديد",assetDetails:"تفاصيل الأصل"},hN={title:"أوامر العمل",addWorkOrder:"إضافة أمر عمل جديد",workOrderDetails:"تفاصيل أمر العمل",newWorkOrder:"أمر عمل جديد",duplicateWorkOrder:"نسخ أمر العمل",createFromAsset:"إنشاء أمر عمل من الأصل"},mN={title:"صيانة الأصول",maintenanceLogs:"سجلات الصيانة",maintenanceDetails:"تفاصيل الصيانة",addMaintenance:"إضافة صيانة جديدة"},gN={title:"الصيانة الوقائية",ppmDetails:"تفاصيل الصيانة الوقائية",addPPM:"إضافة صيانة وقائية جديدة"},pN={title:"تصدير",whatToExport:"ما الذي سيتم تصديره",selectedRows:"الصفوف المحددة",currentPage:"الصفحة الحالية",allWithFilters:"الكل مع المرشحات",exportSelected:"تصدير {count} محدد",exportPage:"تصدير {count} في الصفحة الحالية",exportAll:"تصدير الكل {count}",columnsToExport:"الأعمدة للتصدير",selectAll:"تحديد الكل",selectDefault:"تحديد الافتراضي",exporting:"جاري التصدير...",exportingSelected:"جاري تصدير {count} صف(وف) محدد(ة)",exportingPage:"جاري تصدير {count} صف(وف) من الصفحة الحالية",exportingAll:"جاري تصدير جميع {count} صف(وف)",selected:"محدد",rows:"صفوف"},xN={common:iN,sidebar:lN,login:oN,dashboard:cN,commonFields:dN,listPages:uN,assets:fN,workOrders:hN,maintenance:mN,ppm:gN,exportModal:pN},Bt={BASE_URL:"https://imanrdh-seeraasm.seeraarabia.com",ENDPOINTS:{USER_DETAILS:"/api/method/asset_lite.api.custom_api.get_user_details",DOCTYPE_RECORDS:"/api/method/asset_lite.api.custom_api.get_doctype_records",DASHBOARD_STATS:"/api/method/asset_lite.api.custom_api.get_dashboard_stats",DASHBOARD_NUMBER_CARDS:"/api/method/asset_lite.api.dashboard_api.get_number_cards",DASHBOARD_LIST_CHARTS:"/api/method/asset_lite.api.dashboard_api.list_dashboard_charts",DASHBOARD_CHART_DATA:"/api/method/asset_lite.api.dashboard_api.get_dashboard_chart_data",DASHBOARD_REPAIR_COST:"/api/method/asset_lite.api.dashboard_api.get_repair_cost_by_item",KYC_DETAILS:"/api/method/asset_lite.api.custom_api.get_kyc_details",GET_ASSETS:"/api/method/asset_lite.api.asset_api.get_assets",GET_ASSET_DETAILS:"/api/method/asset_lite.api.asset_api.get_asset_details",CREATE_ASSET:"/api/method/asset_lite.api.asset_api.create_asset",UPDATE_ASSET:"/api/method/asset_lite.api.asset_api.update_asset",DELETE_ASSET:"/api/method/asset_lite.api.asset_api.delete_asset",GET_ASSET_FILTERS:"/api/method/asset_lite.api.asset_api.get_asset_filters",GET_ASSET_STATS:"/api/method/asset_lite.api.asset_api.get_asset_stats",SEARCH_ASSETS:"/api/method/asset_lite.api.asset_api.search_assets",SUBMIT_ASSET:"/api/method/asset_lite.api.asset_api.submit_asset",CANCEL_ASSET:"/api/method/asset_lite.api.asset_api.cancel_asset",GET_WORK_ORDERS:"/api/method/asset_lite.api.work_order_api.get_work_orders",GET_WORK_ORDER_DETAILS:"/api/method/asset_lite.api.work_order_api.get_work_order_details",CREATE_WORK_ORDER:"/api/method/asset_lite.api.work_order_api.create_work_order",UPDATE_WORK_ORDER:"/api/method/asset_lite.api.work_order_api.update_work_order",DELETE_WORK_ORDER:"/api/method/asset_lite.api.work_order_api.delete_work_order",UPDATE_WORK_ORDER_STATUS:"/api/method/asset_lite.api.work_order_api.update_work_order_status",GET_ASSET_MAINTENANCE_LOGS:"/api/method/asset_lite.api.asset_maintenance_api.get_asset_maintenance_logs",GET_ASSET_MAINTENANCE_LOG_DETAILS:"/api/method/asset_lite.api.asset_maintenance_api.get_asset_maintenance_log_details",CREATE_ASSET_MAINTENANCE_LOG:"/api/method/asset_lite.api.asset_maintenance_api.create_asset_maintenance_log",UPDATE_ASSET_MAINTENANCE_LOG:"/api/method/asset_lite.api.asset_maintenance_api.update_asset_maintenance_log",DELETE_ASSET_MAINTENANCE_LOG:"/api/method/asset_lite.api.asset_maintenance_api.delete_asset_maintenance_log",UPDATE_MAINTENANCE_STATUS:"/api/method/asset_lite.api.asset_maintenance_api.update_maintenance_status",GET_MAINTENANCE_LOGS_BY_ASSET:"/api/method/asset_lite.api.asset_maintenance_api.get_maintenance_logs_by_asset",GET_OVERDUE_MAINTENANCE_LOGS:"/api/method/asset_lite.api.asset_maintenance_api.get_overdue_maintenance_logs",GET_ASSET_MAINTENANCES:"/api/method/asset_lite.api.ppm_api.get_asset_maintenances",GET_ASSET_MAINTENANCE_DETAILS:"/api/method/asset_lite.api.ppm_api.get_asset_maintenance_details",CREATE_ASSET_MAINTENANCE:"/api/method/asset_lite.api.ppm_api.create_asset_maintenance",UPDATE_ASSET_MAINTENANCE:"/api/method/asset_lite.api.ppm_api.update_asset_maintenance",DELETE_ASSET_MAINTENANCE:"/api/method/asset_lite.api.ppm_api.delete_asset_maintenance",GET_MAINTENANCE_TASKS:"/api/method/asset_lite.api.ppm_api.get_maintenance_tasks",GET_SERVICE_COVERAGE:"/api/method/asset_lite.api.ppm_api.get_service_coverage",GET_MAINTENANCES_BY_ASSET:"/api/method/asset_lite.api.ppm_api.get_maintenances_by_asset",GET_ACTIVE_SERVICE_CONTRACTS:"/api/method/asset_lite.api.ppm_api.get_active_service_contracts",LOGIN:"/api/method/login",LOGOUT:"/api/method/logout",CSRF_TOKEN:"/api/method/frappe.sessions.get_csrf_token",UPLOAD_FILE:"/api/method/upload_file",GET_USER_PERMISSIONS:"/api/method/asset_lite.api.userperm_api.get_user_permissions",GET_PERMISSION_FILTERS:"/api/method/asset_lite.api.userperm_api.get_permission_filters",GET_ALLOWED_VALUES:"/api/method/asset_lite.api.userperm_api.get_allowed_values",CHECK_DOCUMENT_ACCESS:"/api/method/asset_lite.api.userperm_api.check_document_access",GET_CONFIGURED_DOCTYPES:"/api/method/asset_lite.api.userperm_api.get_configured_doctypes",GET_USER_DEFAULTS:"/api/method/asset_lite.api.userperm_api.get_user_defaults"},DEFAULT_HEADERS:{"Content-Type":"application/json",Accept:"application/json"},TIMEOUT:parseInt("60000")};class yN{constructor(){Kn(this,"baseURL");Kn(this,"endpoints");Kn(this,"defaultHeaders");Kn(this,"timeout");this.baseURL=Bt.BASE_URL,this.endpoints=Bt.ENDPOINTS,this.defaultHeaders=Bt.DEFAULT_HEADERS,this.timeout=Bt.TIMEOUT}getCSRFToken(){return oe(this,null,function*(){try{if(typeof window!="undefined"&&window.csrf_token)return window.csrf_token;if(!localStorage.getItem("user"))return null;const a=yield fetch(`${this.baseURL}${this.endpoints.CSRF_TOKEN}`,{method:"GET",headers:{Accept:"application/json"},credentials:"include"});return a.ok&&(yield a.json()).message||null}catch(t){return null}})}apiCall(s){return oe(this,arguments,function*(t,a={}){const i=`${this.baseURL}${t}`,d=ie({method:"GET",headers:ie(ie({},this.defaultHeaders),a.headers)},a),c=yield this.getCSRFToken();c&&(d.headers["X-Frappe-CSRF-Token"]=c);try{const f=new AbortController,g=setTimeout(()=>f.abort(),this.timeout),p=yield fetch(i,Ee(ie({},d),{signal:f.signal}));if(clearTimeout(g),!p.ok){const y=yield p.json().catch(()=>({}));throw new Kl(y.error||`HTTP error! status: ${p.status}`,p.status)}const x=yield p.json();return x.message!==void 0?x.message:x}catch(f){throw f instanceof Error?(console.error("API call failed:",f),new Kl(f.message)):f}})}login(t){return oe(this,null,function*(){const a=new FormData;a.append("usr",t.email),a.append("pwd",t.password);const s=`${this.baseURL}${this.endpoints.LOGIN}`;try{const i=new AbortController,d=setTimeout(()=>i.abort(),this.timeout),c=yield fetch(s,{method:"POST",headers:{Accept:"application/json"},body:a,credentials:"include",signal:i.signal});if(clearTimeout(d),!c.ok){const g=yield c.json().catch(()=>({})),p="Invalid credentials. Please try again.";throw new Kl(p,c.status)}const f=yield c.json();return typeof f.message=="string"&&f.message==="Logged In"?{message:{full_name:f.full_name,user_id:f.user||f.email,home_page:f.home_page,sid:f.sid}}:f.message&&typeof f.message=="object"?{message:f.message}:f.full_name||f.user?{message:f}:{message:f}}catch(i){throw i instanceof Error?new Kl("Login failed. Please try again."):i}})}logout(){return oe(this,null,function*(){yield this.apiCall(this.endpoints.LOGOUT,{method:"POST"})})}getUserDetails(t){return oe(this,null,function*(){const a=t?`?user_id=${t}`:"";return this.apiCall(`${this.endpoints.USER_DETAILS}${a}`)})}getDoctypeRecords(t,a,s,i=20,d=0){return oe(this,null,function*(){const c=new URLSearchParams({doctype:t,limit:i.toString(),offset:d.toString()});return a&&c.append("filters",JSON.stringify(a)),s&&c.append("fields",JSON.stringify(s)),this.apiCall(`${this.endpoints.DOCTYPE_RECORDS}?${c}`)})}getDashboardStats(){return oe(this,null,function*(){return this.apiCall(this.endpoints.DASHBOARD_STATS)})}getNumberCards(){return oe(this,null,function*(){return this.apiCall(this.endpoints.DASHBOARD_NUMBER_CARDS)})}listDashboardCharts(t=!0){return oe(this,null,function*(){const a=new URLSearchParams({public_only:t?"1":"0"});return this.apiCall(`${this.endpoints.DASHBOARD_LIST_CHARTS}?${a}`)})}getDashboardChartData(t,a){return oe(this,null,function*(){const s=new URLSearchParams({chart_name:t});return a&&s.append("report_filters",JSON.stringify(a)),this.apiCall(`${this.endpoints.DASHBOARD_CHART_DATA}?${s}`)})}getKycDetails(){return oe(this,null,function*(){return this.apiCall(this.endpoints.KYC_DETAILS)})}uploadFile(t){return oe(this,null,function*(){const a=new FormData;return a.append("file",t.file),a.append("doctype",t.doctype),a.append("docname",t.docname),a.append("fieldname",t.fieldname),this.apiCall(this.endpoints.UPLOAD_FILE,{method:"POST",headers:{},body:a})})}getUserPermissions(t){return oe(this,null,function*(){const a=t?`?user=${encodeURIComponent(t)}`:"";return this.apiCall(`${this.endpoints.GET_USER_PERMISSIONS}${a}`)})}getPermissionFilters(t,a){return oe(this,null,function*(){const s=new URLSearchParams({target_doctype:t});return a&&s.append("user",a),this.apiCall(`${this.endpoints.GET_PERMISSION_FILTERS}?${s}`)})}getAllowedValues(t,a){return oe(this,null,function*(){const s=new URLSearchParams({allow_doctype:t});return a&&s.append("user",a),this.apiCall(`${this.endpoints.GET_ALLOWED_VALUES}?${s}`)})}checkDocumentAccess(t,a,s){return oe(this,null,function*(){const i=new URLSearchParams({doctype:t,docname:a});return s&&i.append("user",s),this.apiCall(`${this.endpoints.CHECK_DOCUMENT_ACCESS}?${i}`)})}getConfiguredDoctypes(){return oe(this,null,function*(){return this.apiCall(this.endpoints.GET_CONFIGURED_DOCTYPES)})}getUserDefaults(t){return oe(this,null,function*(){const a=t?`?user=${encodeURIComponent(t)}`:"";return this.apiCall(`${this.endpoints.GET_USER_DEFAULTS}${a}`)})}isAuthenticated(){return!!localStorage.getItem("frappe_session_id")}getSessionId(){return localStorage.getItem("frappe_session_id")}setSessionId(t){localStorage.setItem("frappe_session_id",t)}}class Kl extends Error{constructor(a,s,i){super(a);Kn(this,"status");Kn(this,"code");this.name="ApiError",this.status=s,this.code=i}}const rt=new yN,bN=Object.freeze(Object.defineProperty({__proto__:null,ApiError:Kl,default:rt},Symbol.toStringTag,{value:"Module"}));function vN(e){return oe(this,null,function*(){try{const t=yield rt.getDoctypeRecords("Translation",{language:e},["source_text","translated_text","context"],1e4,0),a={};return t.records&&t.records.length>0&&t.records.forEach(s=>{const i=s.source_text,d=s.translated_text||i;if(s.context){const c=`${s.context}.${i}`;a[c]=d}else i.includes("."),a[i]=d}),a}catch(t){return console.error("Error fetching translations from Frappe:",t),{}}})}function _N(e){const t={};return Object.keys(e).forEach(a=>{if(a.includes(".")){const s=a.split(".");let i=t;for(let d=0;d0&&Nr.addResourceBundle("en","translation",t,!0,!0);const a=yield N1("ar");Object.keys(a).length>0&&Nr.addResourceBundle("ar","translation",a,!0,!0),console.log("✓ Translations loaded from Frappe")}catch(e){console.warn("⚠ Could not load translations from Frappe, using static translations:",e)}})}Nr.on("initialized",()=>{bf()});var j1="popstate";function wN(e={}){function t(s,i){let{pathname:d,search:c,hash:f}=s.location;return zg("",{pathname:d,search:c,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function a(s,i){return typeof i=="string"?i:a0(i)}return NN(t,a,null,e)}function $a(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function Rn(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch(a){}}}function kN(){return Math.random().toString(36).substring(2,10)}function S1(e,t){return{usr:e.state,key:e.key,idx:t}}function zg(e,t,a=null,s){return Ee(ie({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?jc(t):t),{state:a,key:t&&t.key||s||kN()})}function a0({pathname:e="/",search:t="",hash:a=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function jc(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function NN(e,t,a,s={}){let{window:i=document.defaultView,v5Compat:d=!1}=s,c=i.history,f="POP",g=null,p=x();p==null&&(p=0,c.replaceState(Ee(ie({},c.state),{idx:p}),""));function x(){return(c.state||{idx:null}).idx}function y(){f="POP";let S=x(),O=S==null?null:S-p;p=S,g&&g({action:f,location:N.location,delta:O})}function _(S,O){f="PUSH";let C=zg(N.location,S,O);p=x()+1;let A=S1(C,p),P=N.createHref(C);try{c.pushState(A,"",P)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;i.location.assign(P)}d&&g&&g({action:f,location:N.location,delta:1})}function k(S,O){f="REPLACE";let C=zg(N.location,S,O);p=x();let A=S1(C,p),P=N.createHref(C);c.replaceState(A,"",P),d&&g&&g({action:f,location:N.location,delta:0})}function T(S){return jN(S)}let N={get action(){return f},get location(){return e(i,c)},listen(S){if(g)throw new Error("A history only accepts one active listener");return i.addEventListener(j1,y),g=S,()=>{i.removeEventListener(j1,y),g=null}},createHref(S){return t(i,S)},createURL:T,encodeLocation(S){let O=T(S);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:_,replace:k,go(S){return c.go(S)}};return N}function jN(e,t=!1){let a="http://localhost";typeof window!="undefined"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),$a(a,"No window.location.(origin|href) available to create URL");let s=typeof e=="string"?e:a0(e);return s=s.replace(/ $/,"%20"),!t&&s.startsWith("//")&&(s=a+s),new URL(s,a)}function o_(e,t,a="/"){return SN(e,t,a,!1)}function SN(e,t,a,s){let i=typeof t=="string"?jc(t):t,d=pi(i.pathname||"/",a);if(d==null)return null;let c=c_(e);TN(c);let f=null;for(let g=0;f==null&&g{let x={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(s)&&g)return;$a(x.relativePath.startsWith(s),`Absolute route path "${x.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(s.length)}let y=fi([s,x.relativePath]),_=a.concat(x);c.children&&c.children.length>0&&($a(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),c_(c.children,t,_,y,g)),!(c.path==null&&!c.index)&&t.push({path:y,score:DN(y,c.index),routesMeta:_})};return e.forEach((c,f)=>{var g;if(c.path===""||!((g=c.path)!=null&&g.includes("?")))d(c,f);else for(let p of d_(c.path))d(c,f,!0,p)}),t}function d_(e){let t=e.split("/");if(t.length===0)return[];let[a,...s]=t,i=a.endsWith("?"),d=a.replace(/\?$/,"");if(s.length===0)return i?[d,""]:[d];let c=d_(s.join("/")),f=[];return f.push(...c.map(g=>g===""?d:[d,g].join("/"))),i&&f.push(...c),f.map(g=>e.startsWith("/")&&g===""?"/":g)}function TN(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:PN(t.routesMeta.map(s=>s.childrenIndex),a.routesMeta.map(s=>s.childrenIndex)))}var EN=/^:[\w-]+$/,CN=3,AN=2,ON=1,MN=10,LN=-2,T1=e=>e==="*";function DN(e,t){let a=e.split("/"),s=a.length;return a.some(T1)&&(s+=LN),t&&(s+=AN),a.filter(i=>!T1(i)).reduce((i,d)=>i+(EN.test(d)?CN:d===""?ON:MN),s)}function PN(e,t){return e.length===t.length&&e.slice(0,-1).every((s,i)=>s===t[i])?e[e.length-1]-t[t.length-1]:0}function RN(e,t,a=!1){let{routesMeta:s}=e,i={},d="/",c=[];for(let f=0;f{if(x==="*"){let T=f[_]||"";c=d.slice(0,d.length-T.length).replace(/(.)\/+$/,"$1")}const k=f[_];return y&&!k?p[x]=void 0:p[x]=(k||"").replace(/%2F/g,"/"),p},{}),pathname:d,pathnameBase:c,pattern:e}}function FN(e,t=!1,a=!0){Rn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,g)=>(s.push({paramName:f,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),s]}function IN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Rn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function pi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,s=e.charAt(a);return s&&s!=="/"?null:e.slice(a)||"/"}var zN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,BN=e=>zN.test(e);function UN(e,t="/"){let{pathname:a,search:s="",hash:i=""}=typeof e=="string"?jc(e):e,d;if(a)if(BN(a))d=a;else{if(a.includes("//")){let c=a;a=a.replace(/\/\/+/g,"/"),Rn(!1,`Pathnames cannot have embedded double slashes - normalizing ${c} -> ${a}`)}a.startsWith("/")?d=E1(a.substring(1),"/"):d=E1(a,t)}else d=t;return{pathname:d,search:WN(s),hash:VN(i)}}function E1(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?a.length>1&&a.pop():i!=="."&&a.push(i)}),a.length>1?a.join("/"):"/"}function xg(e,t,a,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function HN(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function rp(e){let t=HN(e);return t.map((a,s)=>s===t.length-1?a.pathname:a.pathnameBase)}function np(e,t,a,s=!1){let i;typeof e=="string"?i=jc(e):(i=ie({},e),$a(!i.pathname||!i.pathname.includes("?"),xg("?","pathname","search",i)),$a(!i.pathname||!i.pathname.includes("#"),xg("#","pathname","hash",i)),$a(!i.search||!i.search.includes("#"),xg("#","search","hash",i)));let d=e===""||i.pathname==="",c=d?"/":i.pathname,f;if(c==null)f=a;else{let y=t.length-1;if(!s&&c.startsWith("..")){let _=c.split("/");for(;_[0]==="..";)_.shift(),y-=1;i.pathname=_.join("/")}f=y>=0?t[y]:"/"}let g=UN(i,f),p=c&&c!=="/"&&c.endsWith("/"),x=(d||c===".")&&a.endsWith("/");return!g.pathname.endsWith("/")&&(p||x)&&(g.pathname+="/"),g}var fi=e=>e.join("/").replace(/\/\/+/g,"/"),$N=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),WN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,VN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function GN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ZN(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var u_=["POST","PUT","PATCH","DELETE"];new Set(u_);var qN=["GET",...u_];new Set(qN);var Sc=j.createContext(null);Sc.displayName="DataRouter";var Hf=j.createContext(null);Hf.displayName="DataRouterState";j.createContext(!1);var f_=j.createContext({isTransitioning:!1});f_.displayName="ViewTransition";var YN=j.createContext(new Map);YN.displayName="Fetchers";var XN=j.createContext(null);XN.displayName="Await";var as=j.createContext(null);as.displayName="Navigation";var u0=j.createContext(null);u0.displayName="Location";var ks=j.createContext({outlet:null,matches:[],isDataRoute:!1});ks.displayName="Route";var sp=j.createContext(null);sp.displayName="RouteError";function JN(e,{relative:t}={}){$a(Tc(),"useHref() may be used only in the context of a component.");let{basename:a,navigator:s}=j.useContext(as),{hash:i,pathname:d,search:c}=f0(e,{relative:t}),f=d;return a!=="/"&&(f=d==="/"?a:fi([a,d])),s.createHref({pathname:f,search:c,hash:i})}function Tc(){return j.useContext(u0)!=null}function Vs(){return $a(Tc(),"useLocation() may be used only in the context of a component."),j.useContext(u0).location}var h_="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function m_(e){j.useContext(as).static||j.useLayoutEffect(e)}function Na(){let{isDataRoute:e}=j.useContext(ks);return e?dj():KN()}function KN(){$a(Tc(),"useNavigate() may be used only in the context of a component.");let e=j.useContext(Sc),{basename:t,navigator:a}=j.useContext(as),{matches:s}=j.useContext(ks),{pathname:i}=Vs(),d=JSON.stringify(rp(s)),c=j.useRef(!1);return m_(()=>{c.current=!0}),j.useCallback((g,p={})=>{if(Rn(c.current,h_),!c.current)return;if(typeof g=="number"){a.go(g);return}let x=np(g,JSON.parse(d),i,p.relative==="path");e==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:fi([t,x.pathname])),(p.replace?a.replace:a.push)(x,p.state,p)},[t,a,d,i,e])}j.createContext(null);function ul(){let{matches:e}=j.useContext(ks),t=e[e.length-1];return t?t.params:{}}function f0(e,{relative:t}={}){let{matches:a}=j.useContext(ks),{pathname:s}=Vs(),i=JSON.stringify(rp(a));return j.useMemo(()=>np(e,JSON.parse(i),s,t==="path"),[e,i,s,t])}function QN(e,t){return g_(e,t)}function g_(e,t,a,s,i){var C;$a(Tc(),"useRoutes() may be used only in the context of a component.");let{navigator:d}=j.useContext(as),{matches:c}=j.useContext(ks),f=c[c.length-1],g=f?f.params:{},p=f?f.pathname:"/",x=f?f.pathnameBase:"/",y=f&&f.route;{let A=y&&y.path||"";p_(p,!y||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${p}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let _=Vs(),k;if(t){let A=typeof t=="string"?jc(t):t;$a(x==="/"||((C=A.pathname)==null?void 0:C.startsWith(x)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${x}" but pathname "${A.pathname}" was given in the \`location\` prop.`),k=A}else k=_;let T=k.pathname||"/",N=T;if(x!=="/"){let A=x.replace(/^\//,"").split("/");N="/"+T.replace(/^\//,"").split("/").slice(A.length).join("/")}let S=o_(e,{pathname:N});Rn(y||S!=null,`No routes matched location "${k.pathname}${k.search}${k.hash}" `),Rn(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${k.pathname}${k.search}${k.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let O=nj(S&&S.map(A=>Object.assign({},A,{params:Object.assign({},g,A.params),pathname:fi([x,d.encodeLocation?d.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?x:fi([x,d.encodeLocation?d.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),c,a,s,i);return t&&O?j.createElement(u0.Provider,{value:{location:ie({pathname:"/",search:"",hash:"",state:null,key:"default"},k),navigationType:"POP"}},O):O}function ej(){let e=cj(),t=GN(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:s},d={padding:"2px 4px",backgroundColor:s},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=j.createElement(j.Fragment,null,j.createElement("p",null,"💿 Hey developer 👋"),j.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",j.createElement("code",{style:d},"ErrorBoundary")," or"," ",j.createElement("code",{style:d},"errorElement")," prop on your route.")),j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),a?j.createElement("pre",{style:i},a):null,c)}var tj=j.createElement(ej,null),aj=class extends j.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?j.createElement(ks.Provider,{value:this.props.routeContext},j.createElement(sp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function rj({routeContext:e,match:t,children:a}){let s=j.useContext(Sc);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),j.createElement(ks.Provider,{value:e},a)}function nj(e,t=[],a=null,s=null,i=null){if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let d=e,c=a==null?void 0:a.errors;if(c!=null){let x=d.findIndex(y=>y.route.id&&(c==null?void 0:c[y.route.id])!==void 0);$a(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),d=d.slice(0,Math.min(d.length,x+1))}let f=!1,g=-1;if(a)for(let x=0;x=0?d=d.slice(0,g+1):d=[d[0]];break}}}let p=a&&s?(x,y)=>{var _,k,T;s(x,{location:a.location,params:(T=(k=(_=a.matches)==null?void 0:_[0])==null?void 0:k.params)!=null?T:{},unstable_pattern:ZN(a.matches),errorInfo:y})}:void 0;return d.reduceRight((x,y,_)=>{let k,T=!1,N=null,S=null;a&&(k=c&&y.route.id?c[y.route.id]:void 0,N=y.route.errorElement||tj,f&&(g<0&&_===0?(p_("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,S=null):g===_&&(T=!0,S=y.route.hydrateFallbackElement||null)));let O=t.concat(d.slice(0,_+1)),C=()=>{let A;return k?A=N:T?A=S:y.route.Component?A=j.createElement(y.route.Component,null):y.route.element?A=y.route.element:A=x,j.createElement(rj,{match:y,routeContext:{outlet:x,matches:O,isDataRoute:a!=null},children:A})};return a&&(y.route.ErrorBoundary||y.route.errorElement||_===0)?j.createElement(aj,{location:a.location,revalidation:a.revalidation,component:N,error:k,children:C(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:p}):C()},null)}function ip(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sj(e){let t=j.useContext(Sc);return $a(t,ip(e)),t}function ij(e){let t=j.useContext(Hf);return $a(t,ip(e)),t}function lj(e){let t=j.useContext(ks);return $a(t,ip(e)),t}function lp(e){let t=lj(e),a=t.matches[t.matches.length-1];return $a(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function oj(){return lp("useRouteId")}function cj(){var s;let e=j.useContext(sp),t=ij("useRouteError"),a=lp("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[a]}function dj(){let{router:e}=sj("useNavigate"),t=lp("useNavigate"),a=j.useRef(!1);return m_(()=>{a.current=!0}),j.useCallback((c,...f)=>oe(null,[c,...f],function*(i,d={}){Rn(a.current,h_),a.current&&(typeof i=="number"?yield e.navigate(i):yield e.navigate(i,ie({fromRouteId:t},d)))}),[e,t])}var C1={};function p_(e,t,a){!t&&!C1[e]&&(C1[e]=!0,Rn(!1,a))}j.memo(uj);function uj({routes:e,future:t,state:a,unstable_onError:s}){return g_(e,void 0,a,s,t)}function Bg({to:e,replace:t,state:a,relative:s}){$a(Tc()," may be used only in the context of a component.");let{static:i}=j.useContext(as);Rn(!i," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:d}=j.useContext(ks),{pathname:c}=Vs(),f=Na(),g=np(e,rp(d),c,s==="path"),p=JSON.stringify(g);return j.useEffect(()=>{f(JSON.parse(p),{replace:t,state:a,relative:s})},[f,p,s,t,a]),null}function ga(e){$a(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function fj({basename:e="/",children:t=null,location:a,navigationType:s="POP",navigator:i,static:d=!1,unstable_useTransitions:c}){$a(!Tc(),"You cannot render a inside another . You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),g=j.useMemo(()=>({basename:f,navigator:i,static:d,unstable_useTransitions:c,future:{}}),[f,i,d,c]);typeof a=="string"&&(a=jc(a));let{pathname:p="/",search:x="",hash:y="",state:_=null,key:k="default"}=a,T=j.useMemo(()=>{let N=pi(p,f);return N==null?null:{location:{pathname:N,search:x,hash:y,state:_,key:k},navigationType:s}},[f,p,x,y,_,k,s]);return Rn(T!=null,` is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the won't render anything.`),T==null?null:j.createElement(as.Provider,{value:g},j.createElement(u0.Provider,{children:t,value:T}))}function hj({children:e,location:t}){return QN(Ug(e),t)}function Ug(e,t=[]){let a=[];return j.Children.forEach(e,(s,i)=>{if(!j.isValidElement(s))return;let d=[...t,i];if(s.type===j.Fragment){a.push.apply(a,Ug(s.props.children,d));return}$a(s.type===ga,`[${typeof s.type=="string"?s.type:s.type.name}] is not a component. All component children of must be a or `),$a(!s.props.index||!s.props.children,"An index route cannot have child routes.");let c={id:s.props.id||d.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(c.children=Ug(s.props.children,d)),a.push(c)}),a}var df="get",uf="application/x-www-form-urlencoded";function $f(e){return typeof HTMLElement!="undefined"&&e instanceof HTMLElement}function mj(e){return $f(e)&&e.tagName.toLowerCase()==="button"}function gj(e){return $f(e)&&e.tagName.toLowerCase()==="form"}function pj(e){return $f(e)&&e.tagName.toLowerCase()==="input"}function xj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yj(e,t){return e.button===0&&(!t||t==="_self")&&!xj(e)}function Hg(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,a)=>{let s=e[a];return t.concat(Array.isArray(s)?s.map(i=>[a,i]):[[a,s]])},[]))}function bj(e,t){let a=Hg(e);return t&&t.forEach((s,i)=>{a.has(i)||t.getAll(i).forEach(d=>{a.append(i,d)})}),a}var qu=null;function vj(){if(qu===null)try{new FormData(document.createElement("form"),0),qu=!1}catch(e){qu=!0}return qu}var _j=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yg(e){return e!=null&&!_j.has(e)?(Rn(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${uf}"`),null):e}function wj(e,t){let a,s,i,d,c;if(gj(e)){let f=e.getAttribute("action");s=f?pi(f,t):null,a=e.getAttribute("method")||df,i=yg(e.getAttribute("enctype"))||uf,d=new FormData(e)}else if(mj(e)||pj(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a
${Pt}
Asset ID Asset Name Serial Number Due Date Periodicity Maintenance Type Assigned To Status
Summary: ${Nt.length} planned maintenance entries for the next 5 years
`),Ot.document.close()}catch(ce){console.error("Error fetching PPM Plan:",ce),alert("Failed to load PPM Plan. Please try again.")}}),Ge=()=>oe(null,null,function*(){if(!e||i){alert("Please save the asset first to view Asset History");return}try{const ce=yield rt.apiCall(`/api/resource/Asset/${e}`),we=(ce==null?void 0:ce.data)||{},Ie=yield rt.apiCall(`/api/resource/Work_Order?filters=[["asset","=","${e}"]]&fields=["name","work_order_type","repair_status","creation","total_repair_cost"]`),lt=(Ie==null?void 0:Ie.data)||[],ft=yield rt.apiCall(`/api/resource/Asset Maintenance?filters=[["asset_name","=","${e}"]]&fields=["name","maintenance_team","custom_type_of_maintenance"]`),Ze=(ft==null?void 0:ft.data)||[];let ze=[],bt=[];for(const Je of Ze){const Lt=yield rt.apiCall(`/api/resource/Asset Maintenance/${Je.name}`),ye=(Lt==null?void 0:Lt.data)||{};ye.asset_maintenance_tasks&&(bt=[...bt,...ye.asset_maintenance_tasks.map(at=>Ee(ie({},at),{maintenance_id:Je.name}))]);const We=yield rt.apiCall(`/api/resource/Asset Maintenance Log?filters=[["asset_maintenance","=","${Je.name}"]]&fields=["name","maintenance_status","assign_to_name","maintenance_type","due_date","completion_date","periodicity","actions_performed"]&order_by=completion_date desc`);ze=[...ze,...(We==null?void 0:We.data)||[]]}const Nt=ze.filter(Je=>Je.maintenance_status==="Completed"),Ot=ze.filter(Je=>Je.maintenance_status!=="Completed"),Pt={};ze.forEach(Je=>{Pt[Je.maintenance_status]=(Pt[Je.maintenance_status]||0)+1});const je=we.custom_spare_parts||[],ut={};je.forEach(Je=>{const Lt=Je.work_order||"Unassigned";ut[Lt]||(ut[Lt]=[]),ut[Lt].push(Je)});const jt=window.open("","_blank");if(!jt)return;const $t=lt.length>0?lt.map((Je,Lt)=>{const ye=Je.repair_status==="Completed"?"bg-green-100 text-green-800":Je.repair_status==="Work In Progress"?"bg-yellow-100 text-yellow-800":"bg-gray-100 text-gray-800";return` ${Je.name} ${Je.work_order_type||"-"} ${Je.repair_status||"-"} ${parseFloat(Je.total_repair_cost||0).toFixed(2)} ر.س ${Je.creation?new Date(Je.creation).toLocaleDateString():"-"} `}).join(""):'No Work Orders Found';let Fe="";Object.keys(ut).length>0?Object.keys(ut).forEach(Je=>{Fe+=`
Work Order: ${Je}
${ut[Je].map((Lt,ye)=>` `).join("")}
Item Name Quantity Cost Amount
${Lt.item_code||"-"} ${Lt.qty||0} ${Lt.rate||0} ر.س ${Lt.amount||0} ر.س
`}):Fe='

No Spare Parts Used

';const ot=Ze.length>0?Ze.map(Je=>`

Maintenance ID

${Je.name}

Type

${Je.custom_type_of_maintenance||"-"}

Maintenance Team

${Je.maintenance_team||"-"}

`).join(""):'

No Maintenance Records Found

',dt=bt.length>0?bt.map((Je,Lt)=>` ${Je.assign_to_name||"-"} ${Je.periodicity||"-"} ${Je.next_due_date||"-"} ${Je.maintenance_id||"-"} `).join(""):'No Maintenance Tasks Found',wt=Object.keys(Pt).length>0?Object.entries(Pt).map(([Je,Lt])=>`
${Je} ${Lt}
`).join(""):'

No Data

',Ft=Nt.length>0?Nt.map((Je,Lt)=>` ${Je.name} ${Je.assign_to_name||"-"} ${Je.maintenance_type||"-"} ${Je.due_date||"-"} ${Je.completion_date||"-"} ${Je.periodicity||"-"} ${Je.actions_performed||"-"} `).join(""):'No Completed Maintenance Logs',la=Ot.length>0?Ot.map((Je,Lt)=>{const ye=Je.maintenance_status==="Planned"?"bg-blue-100 text-blue-800":"bg-yellow-100 text-yellow-800";return` ${Je.name} ${Je.assign_to_name||"-"} ${Je.maintenance_type||"-"} ${Je.due_date||"-"} ${Je.periodicity||"-"} ${Je.maintenance_status||"-"} ${Je.actions_performed||"-"} `}).join(""):'No Pending/Planned Maintenance Logs';jt.document.write(` Asset History - ${e}