( globalThis . TURBOPACK || ( globalThis . TURBOPACK = [])). push ([ "object" == typeof document ? document . currentScript : void 0 , 57409 , 17176 , e =>{ "use strict" ; var t = e . i ( 43476 ), s = e . i ( 71645 ); let a = { xmlns : "http://www.w3.org/2000/svg" , width : 16 , height : 16 , viewBox : "0 0 24 24" , fill : "none" , stroke : "currentColor" , strokeWidth : 2 , strokeLinecap : "round" , strokeLinejoin : "round" , style : { display : "inline" , verticalAlign : "middle" }}; function i ({ name : e , size : s = 16 ,... n }){ return ( 0 , t . jsx )( "svg" ,{... a , width : s , height : s ,... n , children : r [ e ] || null })} let r = { message : ( 0 , t . jsx )( t . Fragment ,{ children : ( 0 , t . jsx )( "path" ,{ d : "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })}), reply : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M9 14l-4-4 4-4" }),( 0 , t . jsx )( "path" ,{ d : "M5 10h11a4 4 0 0 1 4 4v0" })]}), chevronDown : ( 0 , t . jsx )( t . Fragment ,{ children : ( 0 , t . jsx )( "path" ,{ d : "M6 9l6 6 6-6" })}), settings : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),( 0 , t . jsx )( "circle" ,{ cx : "12" , cy : "12" , r : "3" })]}), shieldAlert : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }),( 0 , t . jsx )( "path" ,{ d : "M12 8v4" }),( 0 , t . jsx )( "path" ,{ d : "M12 16h.01" })]}), user : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),( 0 , t . jsx )( "circle" ,{ cx : "12" , cy : "7" , r : "4" })]}), lock : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "rect" ,{ x : "3" , y : "11" , width : "18" , height : "11" , rx : "2" , ry : "2" }),( 0 , t . jsx )( "path" ,{ d : "M7 11V7a5 5 0 0 1 10 0v4" })]}), moon : ( 0 , t . jsx )( t . Fragment ,{ children : ( 0 , t . jsx )( "path" ,{ d : "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })}), sun : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "circle" ,{ cx : "12" , cy : "12" , r : "5" }),( 0 , t . jsx )( "line" ,{ x1 : "12" , y1 : "1" , x2 : "12" , y2 : "3" }),( 0 , t . jsx )( "line" ,{ x1 : "12" , y1 : "21" , x2 : "12" , y2 : "23" }),( 0 , t . jsx )( "line" ,{ x1 : "4.22" , y1 : "4.22" , x2 : "5.64" , y2 : "5.64" }),( 0 , t . jsx )( "line" ,{ x1 : "18.36" , y1 : "18.36" , x2 : "19.78" , y2 : "19.78" }),( 0 , t . jsx )( "line" ,{ x1 : "1" , y1 : "12" , x2 : "3" , y2 : "12" }),( 0 , t . jsx )( "line" ,{ x1 : "21" , y1 : "12" , x2 : "23" , y2 : "12" }),( 0 , t . jsx )( "line" ,{ x1 : "4.22" , y1 : "19.78" , x2 : "5.64" , y2 : "18.36" }),( 0 , t . jsx )( "line" ,{ x1 : "18.36" , y1 : "5.64" , x2 : "19.78" , y2 : "4.22" })]}), logout : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),( 0 , t . jsx )( "polyline" ,{ points : "16 17 21 12 16 7" }),( 0 , t . jsx )( "line" ,{ x1 : "21" , y1 : "12" , x2 : "9" , y2 : "12" })]}), book : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M21 12V7H5a2 2 0 0 1 0-4h14v4" }),( 0 , t . jsx )( "path" ,{ d : "M3 5v14a2 2 0 0 0 2 2h16v-5" }),( 0 , t . jsx )( "line" ,{ x1 : "18" , y1 : "12" , x2 : "18" , y2 : "12" })]}), link : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),( 0 , t . jsx )( "path" ,{ d : "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })]}), plus : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "line" ,{ x1 : "12" , y1 : "5" , x2 : "12" , y2 : "19" }),( 0 , t . jsx )( "line" ,{ x1 : "5" , y1 : "12" , x2 : "19" , y2 : "12" })]}), shield : ( 0 , t . jsx )( t . Fragment ,{ children : ( 0 , t . jsx )( "path" ,{ d : "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" })}), users : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),( 0 , t . jsx )( "circle" ,{ cx : "9" , cy : "7" , r : "4" }),( 0 , t . jsx )( "path" ,{ d : "M23 21v-2a4 4 0 0 0-3-3.87" }),( 0 , t . jsx )( "path" ,{ d : "M16 3.13a4 4 0 0 1 0 7.75" })]}), file : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),( 0 , t . jsx )( "polyline" ,{ points : "14 2 14 8 20 8" }),( 0 , t . jsx )( "line" ,{ x1 : "16" , y1 : "13" , x2 : "8" , y2 : "13" }),( 0 , t . jsx )( "line" ,{ x1 : "16" , y1 : "17" , x2 : "8" , y2 : "17" }),( 0 , t . jsx )( "polyline" ,{ points : "10 9 9 9 8 9" })]}), plus2 : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M12 5v14" }),( 0 , t . jsx )( "path" ,{ d : "M5 12h14" })]}), back : ( 0 , t . jsx )( t . Fragment ,{ children : ( 0 , t . jsx )( "polyline" ,{ points : "15 18 9 12 15 6" })}), close : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "line" ,{ x1 : "18" , y1 : "6" , x2 : "6" , y2 : "18" }),( 0 , t . jsx )( "line" ,{ x1 : "6" , y1 : "6" , x2 : "18" , y2 : "18" })]}), trash : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "polyline" ,{ points : "3 6 5 6 21 6" }),( 0 , t . jsx )( "path" ,{ d : "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })]}), success : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),( 0 , t . jsx )( "polyline" ,{ points : "22 4 12 14.01 9 11.01" })]}), error : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "circle" ,{ cx : "12" , cy : "12" , r : "10" }),( 0 , t . jsx )( "line" ,{ x1 : "15" , y1 : "9" , x2 : "9" , y2 : "15" }),( 0 , t . jsx )( "line" ,{ x1 : "9" , y1 : "9" , x2 : "15" , y2 : "15" })]}), warning : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M12 9v4" }),( 0 , t . jsx )( "path" ,{ d : "M12 17h.01" }),( 0 , t . jsx )( "circle" ,{ cx : "12" , cy : "12" , r : "10" })]}), pending : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "circle" ,{ cx : "12" , cy : "12" , r : "10" }),( 0 , t . jsx )( "polyline" ,{ points : "12 6 12 12 16 14" })]}), edit : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),( 0 , t . jsx )( "path" ,{ d : "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })]}), pin : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8.5" }),( 0 , t . jsx )( "polyline" ,{ points : "16 2 22 8 16 8" }),( 0 , t . jsx )( "line" ,{ x1 : "10" , y1 : "14" , x2 : "18" , y2 : "14" }),( 0 , t . jsx )( "line" ,{ x1 : "10" , y1 : "18" , x2 : "14" , y2 : "18" })]}), camera : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z" }),( 0 , t . jsx )( "circle" ,{ cx : "12" , cy : "13" , r : "4" })]}), image : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "rect" ,{ x : "3" , y : "3" , width : "18" , height : "18" , rx : "2" , ry : "2" }),( 0 , t . jsx )( "circle" ,{ cx : "8.5" , cy : "8.5" , r : "1.5" }),( 0 , t . jsx )( "polyline" ,{ points : "21 15 16 10 5 21" })]}), key : ( 0 , t . jsx )( t . Fragment ,{ children : ( 0 , t . jsx )( "path" ,{ d : "M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4" })}), calendar : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "rect" ,{ x : "3" , y : "4" , width : "18" , height : "18" , rx : "2" , ry : "2" }),( 0 , t . jsx )( "line" ,{ x1 : "16" , y1 : "2" , x2 : "16" , y2 : "6" }),( 0 , t . jsx )( "line" ,{ x1 : "8" , y1 : "2" , x2 : "8" , y2 : "6" }),( 0 , t . jsx )( "line" ,{ x1 : "3" , y1 : "10" , x2 : "21" , y2 : "10" })]}), refresh : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "polyline" ,{ points : "23 4 23 10 17 10" }),( 0 , t . jsx )( "path" ,{ d : "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })]}), list : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "line" ,{ x1 : "8" , y1 : "6" , x2 : "21" , y2 : "6" }),( 0 , t . jsx )( "line" ,{ x1 : "8" , y1 : "12" , x2 : "21" , y2 : "12" }),( 0 , t . jsx )( "line" ,{ x1 : "8" , y1 : "18" , x2 : "21" , y2 : "18" }),( 0 , t . jsx )( "line" ,{ x1 : "3" , y1 : "6" , x2 : "3.01" , y2 : "6" }),( 0 , t . jsx )( "line" ,{ x1 : "3" , y1 : "12" , x2 : "3.01" , y2 : "12" }),( 0 , t . jsx )( "line" ,{ x1 : "3" , y1 : "18" , x2 : "3.01" , y2 : "18" })]}), megaphone : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M17 18.5c0 1.5-1.5 3-3.5 3s-3.5-1.5-3.5-3c0-.5.5-1 1-1h5c.5 0 1 .5 1 1z" }),( 0 , t . jsx )( "path" ,{ d : "M4 11h16v6H4z" }),( 0 , t . jsx )( "path" ,{ d : "M8 17v3" }),( 0 , t . jsx )( "path" ,{ d : "M16 17v3" }),( 0 , t . jsx )( "path" ,{ d : "M9 11V7a3 3 0 0 1 6 0v4" })]}), code : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "polyline" ,{ points : "16 18 22 12 16 6" }),( 0 , t . jsx )( "polyline" ,{ points : "8 6 2 12 8 18" })]}), upload : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),( 0 , t . jsx )( "polyline" ,{ points : "17 8 12 3 7 8" }),( 0 , t . jsx )( "line" ,{ x1 : "12" , y1 : "3" , x2 : "12" , y2 : "15" })]}), save : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" }),( 0 , t . jsx )( "polyline" ,{ points : "17 21 17 13 7 13 7 21" }),( 0 , t . jsx )( "polyline" ,{ points : "7 3 7 8 15 8" })]}), flag : ( 0 , t . jsxs )( t . Fragment ,{ children : [( 0 , t . jsx )( "path" ,{ d : "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" }),( 0 , t . jsx )( "line" ,{ x1 : "4" , y1 : "22" , x2 : "4" , y2 : "15" })]})}; e . s ([ "Icon" , 0 , i ], 17176 ); let n = ( 0 , s . createContext )( null ), o = 0 ; e . s ([ "ToastProvider" , 0 , function ({ children : e }){ let [ a , r ] = ( 0 , s . useState )([]),[ l , u ] = ( 0 , s . useState )( null ), c = ( 0 , s . useRef )({}), d = ( 0 , s . useRef )( null ), p = ( 0 , s . useRef )( null ), g = ( 0 , s . useCallback )( e =>{ r ( t => t . filter ( t => t . id !== e )), delete c . current [ e ]},[]), h = ( 0 , s . useCallback )( e =>{ c . current [ e ] && clearTimeout ( c . current [ e ]), r ( t => t . map ( t => t . id === e ? {... t , closing :! 0 } : t )), c . current [ e ] = setTimeout (()=> g ( e ), 220 )},[ g ]), m = ( 0 , s . useCallback )(( e , t = "success" , s = 3e3 )=>{ let a =++ o ; r ( s =>[... s ,{ id : a , message : e , type : t , closing :! 1 }]), c . current [ a ] && clearTimeout ( c . current [ a ]), c . current [ a ] = setTimeout (()=> h ( a ), s )},[ h ]), f = ( 0 , s . useCallback )(( e , t = {})=>{ p . current && p . current ( ! 1 ); let s = "en" === localStorage . getItem ( "forumlify-lang" ); return u ({ message : e , title : t . title || ( s ? "Confirm action" : "确认操作" ), confirmLabel : t . confirmLabel || ( s ? "Confirm" : "确定" ), cancelLabel : t . cancelLabel || ( s ? "Cancel" : "取消" ), danger :! 1 !== t . danger , closing :! 1 }), new Promise ( e =>{ p . current = e })},[]), y = ( 0 , s . useCallback )( e =>{ u ( e => e ? {... e , closing :! 0 } : e ), d . current && clearTimeout ( d . current ), d . current = setTimeout (()=>{ u ( null ); let t = p . current ; p . current = null , t && t ( e )}, 340 )},[]); return ( 0 , s . useEffect )(()=>()=>{ Object . values ( c . current ). forEach ( clearTimeout ), d . current && clearTimeout ( d . current ), p . current && p . current ( ! 1 )},[]),( 0 , t . jsxs )( n . Provider ,{ value : { toast : m , confirmAction : f }, children : [ e ,( 0 , t . jsx )( "div" ,{ className : "toast-container" , children : a . map ( e =>( 0 , t . jsxs )( "div" ,{ className : "toast toast-" + e . type + ( e . closing ? " closing" : "" ), onClick : ()=> h ( e . id ), role : "status" , children : [( 0 , t . jsx )( i ,{ name : "error" === e . type ? "error" : "warning" === e . type ? "warning" : "success" , size : 16 }),( 0 , t . jsx )( "span" ,{ children : e . message })]}, e . id ))}), l && ( 0 , t . jsx )( "div" ,{ className : "modal active feedback-confirm" + ( l . closing ? " closing" : "" ), onClick : e =>{ e . target === e . currentTarget && y ( ! 1 )}, children : ( 0 , t . jsxs )( "div" ,{ className : "modal-content" , role : "alertdialog" , "aria-modal" : "true" , "aria-labelledby" : "feedbackConfirmTitle" , "aria-describedby" : "feedbackConfirmMessage" , children : [( 0 , t . jsxs )( "h2" ,{ id : "feedbackConfirmTitle" , children : [( 0 , t . jsx )( i ,{ name : "warning" , size : 20 }), " " , l . title ]}),( 0 , t . jsx )( "p" ,{ id : "feedbackConfirmMessage" , children : l . message }),( 0 , t . jsxs )( "div" ,{ className : "feedback-confirm-actions" , children : [( 0 , t . jsx )( "button" ,{ className : l . danger ? "btn-danger" : "btn-primary" , onClick : ()=> y ( ! 0 ), children : l . confirmLabel }),( 0 , t . jsx )( "button" ,{ className : "btn-secondary" , onClick : ()=> y ( ! 1 ), children : l . cancelLabel })]})]})})]})}, "useToast" , 0 , function (){ return ( 0 , s . useContext )( n )}], 57409 )}, 61525 ,( e , t , s )=>{ t . exports = { appName : "Forumlify" , nav : { home : "首页" , messages : "消息" , settings : "设置" , admin : "管理后台" , login : "登录" , register : "注册" , logout : "退出" , darkMode : "暗色模式" , lightMode : "亮色模式" , logoutConfirm : "确定要退出吗?" }, feed : { latest : "最新发布" , hot : "最新回复" , newPost : "发布新帖" , loading : "加载中..." , empty : "还没有帖子,快来发布第一条吧!" , pinned : "置顶" , deleted : "(已编辑)" , report : "举报" , delete : "删除" , confirmDelete : "确定要删除这条帖子吗?" , deleteFailed : "删除失败:{{msg}}" , noTitle : "无标题" , anonymous : "匿名用户" }, post : { title : "帖子详情" , back : "← 返回" , edit : "编辑" , save : "保存" , cancel : "取消" , editFailed : "加载失败:{{msg}}" , contentRequired : "请填写内容" , reply : "回复" , replyCount : "{{count}} 条回复" , reportReason : "举报原因" , confirmDelete : "确定要删除这条帖子吗?" , reportTitle : "举报帖子" , submitReport : "提交举报" }, newPost : { title : "标题" , content : "说点什么..." , publish : "发布帖子" , uploading : "上传中..." , pleaseLogin : "请先登录" , captchaError : "验证码错误,请重新计算" , publishSuccess : "发布成功" , publishFailed : "发布失败:{{msg}}" , answer : "答案" , captchaLoading : "验证码加载中..." , drop : "松开上传" , dropHint : "点击或拖拽上传图片" }, reply : { submit : "提交回复" , placeholder : "写下你的回复..." , empty : "还没有回复,快来发表第一条回复吧" , replyFailed : "回复失败:{{msg}}" , delete : "删除" , confirmDelete : "确定要删除这条回复吗?" , deleteFailed : "删除失败:{{msg}}" }, auth : { email : "邮箱" , password : "密码" , username : "用户名" , passwordHint : "密码(至少6位)" , forgotPassword : "忘记密码?" , captchaError : "验证码错误,请重新计算" , registerSuccess : "注册成功" , loginSuccess : "登录成功" , logoutSuccess : "已退出登录" , login : "登录" , register : "注册" }, settings : { title : "设置" , profile : "个人资料" , security : "安全设置" , recovery : "恢复码" , language : "语言" , languageZh : "中文" , languageEn : "English" , username : "用户名" , bio : "个人简介" , signature : "个性签名" , signatureHint : "显示在每篇帖子底部,支持 Markdown" , signaturePlaceholder : "签名..." , avatarFileRequired : "请选择图片文件" , avatarTooLarge : "图片不能超过 5MB" , avatarUpdated : "头像已更新" , changeAvatar : "更换头像" , save : "保存设置" , saved : "保存成功!" , saveFailed : "保存失败:{{msg}}" , usernameRequired : "用户名不能为空" , pleaseLogin : "请先登录" }, user : { title : "用户主页" , bioEmpty : "这个人很懒,什么都没写" , sendMessage : "发私信" , joined : "加入于 {{date}}" , posts : "发了 {{count}} 个帖子" , admin : "管理员" , noPosts : "还没有发帖" , notFound : "用户不存在" , loading : "加载中..." }, stats : { topics : "主题" , posts : "帖子" , users : "用户" , links : "友情链接" }, loading : "加载中..." , common : { confirm : "确定" , cancel : "取消" , close : "关闭" }, report : { spam : "垃圾广告" , abuse : "人身攻击" , illegal : "违法内容" , nsfw : "不适当内容" , other : "其他" }, security : { title : "账户安全" , currentPw : "当前密码" , newPw : "新密码" , changePw : "修改密码" , currentPwVerify : "当前密码(验证身份)" , newEmail : "新邮箱" , changeEmail : "修改邮箱" , fillAll : "请填写完整信息" , pwMin : "新密码至少6位" , pwChanged : "密码修改成功" , emailChanged : "邮箱修改成功" }, recovery : { title : "恢复码" , desc : "用于忘记密码时重置账户。每个恢复码只能使用一次。" , view : "查看恢复码" , regenerate : "重新生成" , remaining : "剩余 {{count}} 个可用恢复码" , confirmRegenerate : "重新生成将使所有旧恢复码失效,确定继续吗?" , genFailed : "生成失败:{{msg}}" , fetchFailed : "获取失败:{{msg}}" , newCodes : "新恢复码" , saveWarning : "请妥善保存这些恢复码,关闭窗口后无法再次查看。" , saved : "我已保存" }, admin : { title : "管理后台" , reports : "举报处理" , users : "用户管理" , logs : "事件日志" , links : "友情链接" , forumSettings : "论坛设置" , customPages : "自定义页面" , customCss : "自定义 CSS" , common : { loading : "加载中..." , loadFailed : "加载失败:{{msg}}" , operationFailed : "操作失败:{{msg}}" , deleteFailed : "删除失败:{{msg}}" , saveFailed : "保存失败:{{msg}}" , delete : "删除" , save : "保存" , cancel : "取消" , actions : "操作" , status : "状态" , enabled : "启用" , disabled : "禁用" }, report : { statusPending : "待处理" , statusApproved : "已删除" , statusRejected : "已驳回" , approvedNote : "已删除违规帖子" , rejectedNote : "举报不成立" , confirmApprove : "确定要删除该帖子并标记举报为已处理吗?" , empty : "暂无举报" , anonymous : "匿名" , reportedPost : "{{name}} 举报了帖子" , reason : "原因:{{reason}}" , post : "帖子:{{title}} — {{content}}" , untitled : "无标题" , handler : "处理人:{{name}}" , deletePost : "删除帖子" , reject : "驳回举报" }, user : { roleAdmin : "管理员" , roleUser : "普通用户" , confirmRole : "确定要将该用户设为「{{role}}」吗?" , count : "共 {{count}} 位用户" , user : "用户" , role : "角色" , registeredAt : "注册时间" , you : "你" , cannotSelf : "不可操作自己" , makeUser : "设为普通用户" , makeAdmin : "设为管理员" , roleSuper : "超级管理员" }, log : { empty : "暂无日志" , time : "时间" , user : "用户" , action : "操作" , system : "系统" }, link : { add : "添加链接" , empty : "暂无链接" , incomplete : "请填写完整信息" , addFailed : "添加失败:{{msg}}" , confirmDelete : "确定要删除这个链接吗?" , namePlaceholder : "链接名称" , urlPlaceholder : "链接地址" }, page : { confirmDelete : "确定要删除这个页面吗?" , title : "自定义页面" , add : "添加页面" , empty : "暂无自定义页面" , name : "名称" , columnTitle : "标题" , url : "URL" , edit : "编辑页面" , delete : "删除页面" , editTitle : "编辑页面" , addTitle : "添加页面" , nameRequired : "请输入页面名称" , titleRequired : "请输入导航栏显示名称" , contentRequired : "请输入页面内容" , nameInvalid : "页面名称只允许字母、数字、短横线和下划线" , nameLabel : "页面名称" , namePlaceholder : "about(用于 URL: ?custom=about) " , nameLocked : "名称不可修改" , nameHint : "只允许字母、数字、短横线和下划线" , navTitleLabel : "导航栏显示名称" , navTitlePlaceholder : "关于我们" , contentLabel : "页面内容(HTML + CSS + JS) " , contentHelp : "支持 HTML、CSS( <style>)、JS( <script>),内容会在独立的沙盒中渲染" }, css : { filenameInvalid : "文件名必须是 style.css" , sizeInvalid : "CSS 文件不能超过 1MB" , active : "自定义 CSS 已生效(刷新页面后应用)" , confirmDelete : "确定要删除自定义 CSS 吗?" , deleted : "已删除自定义 CSS" , title : "自定义 CSS" , description : "上传一个 style.css 文件覆盖默认样式(支持 CSS 变量、暗色模式等)。" , releaseUpload : "松开上传" , uploadHint : "点击或拖拽上传 style.css" , save : "保存 CSS" , delete : "删除自定义 CSS" , warningTitle : "警告" , warningBody : "若上传的 style.css 存在问题,将导致整个论坛界面样式错乱,甚至无法正常使用。" , warningHelp : "请确保 CSS 文件是完整的、经过测试的版本。如出现问题,可点击「删除自定义 CSS」恢复默认样式。" , continueUpload : "我了解,继续上传" }, forum : { nameRequired : "请输入论坛名称" , saved : "保存成功!" , saveFailed : "保存失败" , title : "论坛设置" , nameLabel : "论坛名称" , save : "保存" }}}}, 99307 ,( e , t , s )=>{ t . exports = { appName : "Forumlify" , nav : { home : "Home" , messages : "Messages" , settings : "Settings" , admin : "Admin" , login : "Login" , register : "Register" , logout : "Logout" , darkMode : "Dark mode" , lightMode : "Light mode" , logoutConfirm : "Are you sure you want to log out?" }, feed : { latest : "Latest posts" , hot : "Latest replies" , newPost : "New post" , loading : "Loading..." , empty : "No posts yet — be the first to publish!" , pinned : "Pinned" , deleted : "(edited)" , report : "Report" , delete : "Delete" , confirmDelete : "Are you sure you want to delete this post?" , deleteFailed : "Delete failed: {{msg}}" , noTitle : "Untitled" , anonymous : "Anonymous" }, post : { title : "Post detail" , back : "← Back" , edit : "Edit" , save : "Save" , cancel : "Cancel" , editFailed : "Load failed: {{msg}}" , contentRequired : "Please fill in the content" , reply : "Reply" , replyCount : "{{count}} replies" , reportReason : "Report reason" , confirmDelete : "Are you sure you want to delete this post?" , reportTitle : "Report post" , submitReport : "Submit report" }, newPost : { title : "Title" , content : "Say something..." , publish : "Publish post" , uploading : "Uploading..." , pleaseLogin : "Please log in first" , captchaError : "Wrong captcha, please try again" , publishSuccess : "Post published" , publishFailed : "Publish failed: {{msg}}" , answer : "Answer" , captchaLoading : "Loading captcha..." , drop : "Release to upload" , dropHint : "Click or drag to upload image" }, reply : { submit : "Submit reply" , placeholder : "Write your reply..." , empty : "No replies yet — be the first to comment" , replyFailed : "Reply failed: {{msg}}" , delete : "Delete" , confirmDelete : "Are you sure you want to delete this reply?" , deleteFailed : "Delete failed: {{msg}}" }, auth : { email : "Email" , password : "Password" , username : "Username" , passwordHint : "Password (min 6 chars)" , forgotPassword : "Forgot password?" , captchaError : "Wrong captcha, please try again" , registerSuccess : "Registration successful" , loginSuccess : "Logged in" , logoutSuccess : "Logged out" , login : "Login" , register : "Register" }, settings : { title : "Settings" , profile : "Profile" , security : "Security" , recovery : "Recovery codes" , language : "Language" , languageZh : "中文" , languageEn : "English" , username : "Username" , bio : "Bio" , signature : "Signature" , signatureHint : "Shown below every post; Markdown is supported" , signaturePlaceholder : "Signature..." , avatarFileRequired : "Please select an image file" , avatarTooLarge : "Image must be smaller than 5MB" , avatarUpdated : "Avatar updated" , changeAvatar : "Change avatar" , save : "Save settings" , saved : "Saved!" , saveFailed : "Save failed: {{msg}}" , usernameRequired : "Username cannot be empty" , pleaseLogin : "Please log in first" }, user : { title : "User profile" , bioEmpty : "This user hasn't written a bio yet" , sendMessage : "Send message" , joined : "Joined {{date}}" , posts : "{{count}} posts" , admin : "Admin" , noPosts : "No posts yet" , notFound : "User not found" , loading : "Loading..." }, stats : { topics : "Topics" , posts : "Posts" , users : "Users" , links : "Links" }, loading : "Loading..." , common : { confirm : "Confirm" , cancel : "Cancel" , close : "Close" }, report : { spam : "Spam" , abuse : "Harassment" , illegal : "Illegal content" , nsfw : "Inappropriate content" , other : "Other" }, security : { title : "Account security" , currentPw : "Current password" , newPw : "New password" , changePw : "Change password" , currentPwVerify : "Current password (verify identity)" , newEmail : "New email" , changeEmail : "Change email" , fillAll : "Please fill in all fields" , pwMin : "New password must be at least 6 characters" , pwChanged : "Password changed" , emailChanged : "Email changed" }, recovery : { title : "Recovery codes" , desc : "Use these to reset your account if you forget your password. Each code works once." , view : "View recovery codes" , regenerate : "Regenerate" , remaining : "{{count}} recovery codes remaining" , confirmRegenerate : "Regenerating will invalidate all old codes. Continue?" , genFailed : "Generation failed: {{msg}}" , fetchFailed : "Fetch failed: {{msg}}" , newCodes : "New recovery codes" , saveWarning : "Save these codes now — they cannot be viewed again after closing." , saved : "I have saved them" }, admin : { title : "Admin" , reports : "Reports" , users : "Users" , logs : "Event logs" , links : "Links" , forumSettings : "Forum settings" , customPages : "Custom pages" , customCss : "Custom CSS" , common : { loading : "Loading..." , loadFailed : "Load failed: {{msg}}" , operationFailed : "Operation failed: {{msg}}" , deleteFailed : "Delete failed: {{msg}}" , saveFailed : "Save failed: {{msg}}" , delete : "Delete" , save : "Save" , cancel : "Cancel" , actions : "Actions" , status : "Status" , enabled : "Enabled" , disabled : "Disabled" }, report : { statusPending : "Pending" , statusApproved : "Deleted" , statusRejected : "Rejected" , approvedNote : "Removed the reported post" , rejectedNote : "Report dismissed" , confirmApprove : "Delete this post and mark the report as resolved?" , empty : "No reports" , anonymous : "Anonymous" , reportedPost : "{{name}} reported a post" , reason : "Reason: {{reason}}" , post : "Post: {{title}} — {{content}}" , untitled : "Untitled" , handler : "Handled by: {{name}}" , deletePost : "Delete post" , reject : "Reject report" }, user : { roleAdmin : "Admin" , roleUser : "User" , confirmRole : "Set this user's role to {{role}}?" , count : "{{count}} users" , user : "User" , role : "Role" , registeredAt : "Registered" , you : "You" , cannotSelf : "You cannot edit yourself" , makeUser : "Make user" , makeAdmin : "Make admin" , roleSuper : "Super admin" }, log : { empty : "No logs" , time : "Time" , user : "User" , action : "Action" , system : "System" }, link : { add : "Add link" , empty : "No links yet" , incomplete : "Please fill in all fields" , addFailed : "Add failed: {{msg}}" , confirmDelete : "Delete this link?" , namePlaceholder : "Link name" , urlPlaceholder : "Link URL" }, page : { confirmDelete : "Delete this page?" , title : "Custom pages" , add : "Add page" , empty : "No custom pages" , name : "Name" , columnTitle : "Title" , url : "URL" , edit : "Edit page" , delete : "Delete page" , editTitle : "Edit page" , addTitle : "Add page" , nameRequired : "Enter a page name" , titleRequired : "Enter a navigation label" , contentRequired : "Enter page content" , nameInvalid : "Page names may only contain letters, numbers, hyphens, and underscores" , nameLabel : "Page name" , namePlaceholder : "about (used in URL: ?custom=about)" , nameLocked : "The name cannot be changed" , nameHint : "Letters, numbers, hyphens, and underscores only" , navTitleLabel : "Navigation label" , navTitlePlaceholder : "About us" , contentLabel : "Page content (HTML + CSS + JS)" , contentHelp : "HTML, CSS (<style>), and JS (<script>) are supported and rendered in an isolated sandbox" }, css : { filenameInvalid : "The file must be named style.css" , sizeInvalid : "The CSS file must be smaller than 1MB" , active : "Custom CSS is active (refresh to apply it)" , confirmDelete : "Delete the custom CSS?" , deleted : "Custom CSS deleted" , title : "Custom CSS" , description : "Upload a style.css file to override the default styles, including CSS variables and dark mode." , releaseUpload : "Release to upload" , uploadHint : "Click or drag to upload style.css" , save : "Save CSS" , delete : "Delete custom CSS" , warningTitle : "Warning" , warningBody : "Invalid style.css rules can break the forum layout or make the site unusable." , warningHelp : "Upload a complete, tested file. If something goes wrong, delete the custom CSS to restore the default styles." , continueUpload : "I understand, upload" }, forum : { nameRequired : "Enter a forum name" , saved : "Saved!" , saveFailed : "Save failed" , title : "Forum settings" , nameLabel : "Forum name" , save : "Save" }}}}, 16166 , 22831 , 85269 , e =>{ "use strict" ; let t , s = e => "string" == typeof e , a = ()=>{ let e , t , s = new Promise (( s , a )=>{ e = s , t = a }); return s . resolve = e , s . reject = t , s }, i = e => null == e ? "" : String ( e ), r = /###/g , n = e => e && e . includes ( "###" ) ? e . replace ( r , "." ) : e , o = e => ! e || s ( e ), l = ( e , t , a )=>{ let i = s ( t ) ? t . split ( "." ) : t , r = 0 ; for (; r < i . length - 1 ;){ if ( o ( e )) return {}; let t = n ( i [ r ]); ! e [ t ] && a && ( e [ t ] = new a ), e = Object . prototype . hasOwnProperty . call ( e , t ) ? e [ t ] : {}, ++ r } return o ( e ) ? {} : { obj : e , k : n ( i [ r ])}}, u = ( e , t , s )=>{ let { obj : a , k : i } = l ( e , t , Object ); if ( void 0 !== a || 1 === t . length ){ a [ i ] = s ; return } let r = t [ t . length - 1 ], n = t . slice ( 0 , t . length - 1 ), o = l ( e , n , Object ); for (; void 0 === o . obj && n . length ;) r = ` ${ n [ n . length - 1 ] } . ${ r } ` , o = l ( e , n = n . slice ( 0 , n . length - 1 ), Object ), o ? . obj && void 0 !== o . obj [ ` ${ o . k } . ${ r } ` ] && ( o . obj = void 0 ); o . obj [ ` ${ o . k } . ${ r } ` ] = s }, c = ( e , t )=>{ let { obj : s , k : a } = l ( e , t ); if ( s && Object . prototype . hasOwnProperty . call ( s , a )) return s [ a ]}, d = ( e , t , a )=>{ for ( let i in t ) "__proto__" !== i && "constructor" !== i && ( Object . prototype . hasOwnProperty . call ( e , i ) ? s ( e [ i ]) || e [ i ] instanceof String || s ( t [ i ]) || t [ i ] instanceof String ? a && ( e [ i ] = t [ i ]) : d ( e [ i ], t [ i ], a ) : e [ i ] = t [ i ]); return e }, p = { "&" : "&" , "<" : "<" , ">" : ">" , '"' : """ , "'" : "'" , "/" : "/" }, g = e => s ( e ) ? e . replace ( /[&<>"'\/]/g , e => p [ e ]) : e , h = [ " " , "," , "?" , "!" , ";" ], m = new class { constructor ( e ){ this . capacity = e , this . regExpMap = new Map , this . regExpQueue = []} getRegExp ( e ){ let t = this . regExpMap . get ( e ); if ( void 0 !== t ) return t ; let s = new RegExp ( e ); return this . regExpQueue . length === this . capacity && this . regExpMap . delete ( this . regExpQueue . shift ()), this . regExpMap . set ( e , s ), this . regExpQueue . push ( e ), s }}( 20 ), f = ( e , t , s = "." )=>{ if ( ! e ) return ; if ( e [ t ]){ if ( ! Object . prototype . hasOwnProperty . call ( e , t )) return ; return e [ t ]} let a = t . split ( s ), i = e ; for ( let e = 0 ; e < a . length ;){ let t ; if ( ! i || "object" != typeof i ) return ; let r = "" ; for ( let n = e ; n < a . length ; ++ n ) if ( n !== e && ( r += s ), r += a [ n ], void 0 !== ( t = i [ r ])){ if ([ "string" , "number" , "boolean" ]. includes ( typeof t ) && n < a . length - 1 ) continue ; e += n - e + 1 ; break } i = t } return i }, y = e => e ? . replace ( /_/g , "-" ), x = { type : "logger" , log ( e ){ this . output ( "log" , e )}, warn ( e ){ this . output ( "warn" , e )}, error ( e ){ this . output ( "error" , e )}, output ( e , t ){ console ? .[ e ] ? . apply ? .( console , t )}}; var v = new class e { constructor ( e , t = {}){ this . init ( e , t )} init ( e , t = {}){ this . prefix = t . prefix || "i18next:" , this . logger = e || x , this . options = t , this . debug = t . debug } log (... e ){ return this . forward ( e , "log" , "" , ! 0 )} warn (... e ){ return this . forward ( e , "warn" , "" , ! 0 )} error (... e ){ return this . forward ( e , "error" , "" )} deprecate (... e ){ return this . forward ( e , "warn" , "WARNING DEPRECATED: " , ! 0 )} forward ( e , t , a , i ){ return i &&! this . debug ? null : ( e = e . map ( e => s ( e ) ? e . replace ( /[\r\n\x00-\x1F\x7F]/g , " " ) : e ), s ( e [ 0 ]) && ( e [ 0 ] = ` ${ a }${ this . prefix } ${ e [ 0 ] } ` ), this . logger [ t ]( e ))} create ( t ){ return new e ( this . logger ,{...{ prefix : ` ${ this . prefix } : ${ t } :` },... this . options })} clone ( t ){ return ( t = t || this . options ). prefix = t . prefix || this . prefix , new e ( this . logger , t )}}; class b { constructor (){ this . observers = {}} on ( e , t ){ return e . split ( " " ). forEach ( e =>{ this . observers [ e ] || ( this . observers [ e ] = new Map ); let s = this . observers [ e ]. get ( t ) || 0 ; this . observers [ e ]. set ( t , s + 1 )}), this } off ( e , t ){ if ( this . observers [ e ]){ if ( ! t ) return void delete this . observers [ e ]; this . observers [ e ]. delete ( t )}} once ( e , t ){ let s = (... a )=>{ t (... a ), this . off ( e , s )}; return this . on ( e , s ), this } emit ( e ,... t ){ this . observers [ e ] && Array . from ( this . observers [ e ]. entries ()). forEach (([ e , s ])=>{ for ( let a = 0 ; a < s ; a ++ ) e (... t )}), this . observers [ "*" ] && Array . from ( this . observers [ "*" ]. entries ()). forEach (([ s , a ])=>{ for ( let i = 0 ; i < a ; i ++ ) s ( e ,... t )})}} class S extends b { constructor ( e , t = { ns : [ "translation" ], defaultNS : "translation" }){ super (), this . data = e || {}, this . options = t , void 0 === this . options . keySeparator && ( this . options . keySeparator = "." ), void 0 === this . options . ignoreJSONStructure && ( this . options . ignoreJSONStructure =! 0 )} addNamespaces ( e ){ this . options . ns . includes ( e ) || this . options . ns . push ( e )} removeNamespaces ( e ){ let t = this . options . ns . indexOf ( e ); t >- 1 && this . options . ns . splice ( t , 1 )} getResource ( e , t , a , i = {}){ let r , n = void 0 !== i . keySeparator ? i . keySeparator : this . options . keySeparator , o = void 0 !== i . ignoreJSONStructure ? i . ignoreJSONStructure : this . options . ignoreJSONStructure ; e . includes ( "." ) ? r = e . split ( "." ) : ( r = [ e , t ], a && ( Array . isArray ( a ) ? r . push (... a ) : s ( a ) && n ? r . push (... a . split ( n )) : r . push ( a ))); let l = c ( this . data , r ); return ( ! l &&! t &&! a && e . includes ( "." ) && ( e = r [ 0 ], t = r [ 1 ], a = r . slice ( 2 ). join ( "." )), ! l && o && s ( a )) ? f ( this . data ? .[ e ] ? .[ t ], a , n ) : l } addResource ( e , t , s , a , i = { silent :! 1 }){ let r = void 0 !== i . keySeparator ? i . keySeparator : this . options . keySeparator , n = [ e , t ]; s && ( n = n . concat ( r ? s . split ( r ) : s )), e . includes ( "." ) && ( n = e . split ( "." ), a = t , t = n [ 1 ]), this . addNamespaces ( t ), u ( this . data , n , a ), i . silent || this . emit ( "added" , e , t , s , a )} addResources ( e , t , a , i = { silent :! 1 }){ for ( let i in a )( s ( a [ i ]) || Array . isArray ( a [ i ])) && this . addResource ( e , t , i , a [ i ],{ silent :! 0 }); i . silent || this . emit ( "added" , e , t , a )} addResourceBundle ( e , t , s , a , i , r = { silent :! 1 , skipCopy :! 1 }){ let n = [ e , t ]; e . includes ( "." ) && ( n = e . split ( "." ), a = s , s = t , t = n [ 1 ]), this . addNamespaces ( t ); let o = c ( this . data , n ) || {}; r . skipCopy || ( s = JSON . parse ( JSON . stringify ( s ))), a ? d ( o , s , i ) : o = {... o ,... s }, u ( this . data , n , o ), r . silent || this . emit ( "added" , e , t , s )} removeResourceBundle ( e , t ){ this . hasResourceBundle ( e , t ) && delete this . data [ e ][ t ], this . removeNamespaces ( t ), this . emit ( "removed" , e , t )} hasResourceBundle ( e , t ){ return void 0 !== this . getResource ( e , t )} getResourceBundle ( e , t ){ return t || ( t = this . options . defaultNS ), this . getResource ( e , t )} getDataByLanguage ( e ){ return this . data [ e ]} hasLanguageSomeTranslations ( e ){ let t = this . getDataByLanguage ( e ); return !! ( t && Object . keys ( t ) || []). find ( e => t [ e ] && Object . keys ( t [ e ]). length > 0 )} toJSON (){ return this . data }} var j = { processors : {}, addPostProcessor ( e ){ this . processors [ e . name ] = e }, handle ( e , t , s , a , i ){ return e . forEach ( e =>{ t = this . processors [ e ] ? . process ( t , s , a , i ) ?? t }), t }}; let k = Symbol ( "i18next/PATH_KEY" ); function w ( e , t ){ let s , a , i ,{[ k ] : r } = e (( a = [],( i = Object . create ( null )). get = ( e , t )=>( s ? . revoke ? .(), t === k ) ? a : ( a . push ( t ),( s = Proxy . revocable ( e , i )). proxy ), Proxy . revocable ( Object . create ( null ), i ). proxy )), n = t ? . keySeparator ?? "." , o = t ? . nsSeparator ?? ":" , l = t ? . enableSelector === "strict" ; if ( r . length > 1 && o ){ let e = t ? . ns , s = l ? Array . isArray ( e ) ? e : e ? [ e ] : null : Array . isArray ( e ) ? e : null ; if ( s && ( l ? s : s . length > 1 ? s . slice ( 1 ) : []). includes ( r [ 0 ])) return ` ${ r [ 0 ] }${ o }${ r . slice ( 1 ). join ( n ) } ` } return r . join ( n )} let L = e => ! s ( e ) && "boolean" != typeof e && "number" != typeof e ; class C extends b { constructor ( e , t = {}){ super (),(( e , t , s )=>{ e . forEach ( e =>{ t [ e ] && ( s [ e ] = t [ e ])})})([ "resourceStore" , "languageUtils" , "pluralResolver" , "interpolator" , "backendConnector" , "i18nFormat" , "utils" ], e , this ), this . options = t , void 0 === this . options . keySeparator && ( this . options . keySeparator = "." ), this . logger = v . create ( "translator" ), this . checkedLoadedFor = {}} changeLanguage ( e ){ e && ( this . language = e )} exists ( e , t = { interpolation : {}}){ let s = {... t }; if ( null == e ) return ! 1 ; let a = this . resolve ( e , s ); if ( a ? . res === void 0 ) return ! 1 ; let i = L ( a . res ); return ! 1 !== s . returnObjects ||! i } extractFromKey ( e , t ){ let a = void 0 !== t . nsSeparator ? t . nsSeparator : this . options . nsSeparator ; void 0 === a && ( a = ":" ); let i = void 0 !== t . keySeparator ? t . keySeparator : this . options . keySeparator , r = t . ns || this . options . defaultNS || [], n = a && e . includes ( a ), o =! this . options . userDefinedKeySeparator &&! t . keySeparator &&! this . options . userDefinedNsSeparator &&! t . nsSeparator &&! (( e , t , s )=>{ t = t || "" , s = s || "" ; let a = h . filter ( e => ! t . includes ( e ) &&! s . includes ( e )); if ( 0 === a . length ) return ! 0 ; let i = m . getRegExp ( `( ${ a . map ( e => "?" === e ? "\\?" : e ). join ( "|" ) } )` ), r =! i . test ( e ); if ( ! r ){ let t = e . indexOf ( s ); t > 0 &&! i . test ( e . substring ( 0 , t )) && ( r =! 0 )} return r })( e , a , i ); if ( n &&! o ){ let t = e . match ( this . interpolator . nestingRegexp ); if ( t && t . length > 0 ) return { key : e , namespaces : s ( r ) ? [ r ] : r }; let n = e . split ( a );( a !== i || a === i && this . options . ns . includes ( n [ 0 ])) && ( r = n . shift ()), e = n . join ( i )} return { key : e , namespaces : s ( r ) ? [ r ] : r }} translate ( e , t , a ){ let i = "object" == typeof t ? {... t } : t ; if ( "object" != typeof i && this . options . overloadTranslationOptionHandler && ( i = this . options . overloadTranslationOptionHandler ( arguments )), "object" == typeof i && ( i = {... i }), i || ( i = {}), null == e ) return "" ; "function" == typeof e && ( e = w ( e ,{... this . options ,... i })), Array . isArray ( e ) || ( e = [ String ( e )]), e = e . map ( e => "function" == typeof e ? w ( e ,{... this . options ,... i }) : String ( e )); let r = void 0 !== i . returnDetails ? i . returnDetails : this . options . returnDetails , n = void 0 !== i . keySeparator ? i . keySeparator : this . options . keySeparator ,{ key : o , namespaces : l } = this . extractFromKey ( e [ e . length - 1 ], i ), u = l [ l . length - 1 ], c = void 0 !== i . nsSeparator ? i . nsSeparator : this . options . nsSeparator ; void 0 === c && ( c = ":" ); let d = i . lng || this . language , p = i . appendNamespaceToCIMode || this . options . appendNamespaceToCIMode ; if ( d ? . toLowerCase () === "cimode" ) return p ? r ? { res : ` ${ u }${ c }${ o } ` , usedKey : o , exactUsedKey : o , usedLng : d , usedNS : u , usedParams : this . getUsedParamsDetails ( i )} : ` ${ u }${ c }${ o } ` : r ? { res : o , usedKey : o , exactUsedKey : o , usedLng : d , usedNS : u , usedParams : this . getUsedParamsDetails ( i )} : o ; let g = this . resolve ( e , i ), h = g ? . res , m = g ? . usedKey || o , f = g ? . exactUsedKey || o , y = void 0 !== i . joinArrays ? i . joinArrays : this . options . joinArrays , x =! this . i18nFormat || this . i18nFormat . handleAsObject , v = void 0 !== i . count &&! s ( i . count ), b = C . hasDefaultValue ( i ), S = v ? this . pluralResolver . getSuffix ( d , i . count , i ) : "" , j = i . ordinal && v ? this . pluralResolver . getSuffix ( d , i . count ,{ ordinal :! 1 }) : "" , k = v &&! i . ordinal && 0 === i . count , R = k && i [ `defaultValue ${ this . options . pluralSeparator } zero` ] || i [ `defaultValue ${ S } ` ] || i [ `defaultValue ${ j } ` ] || i . defaultValue , P = h ; x &&! h && b && ( P = R ); let F = L ( P ), N = Object . prototype . toString . apply ( P ); if ( x && P && F &&! [ "[object Number]" , "[object Function]" , "[object RegExp]" ]. includes ( N ) &&! ( s ( y ) && Array . isArray ( P ))){ if ( ! i . returnObjects &&! this . options . returnObjects ){ this . options . returnedObjectHandler || this . logger . warn ( "accessing an object - but returnObjects options is not enabled!" ); let e = this . options . returnedObjectHandler ? this . options . returnedObjectHandler ( m , P ,{... i , ns : l }) : `key ' ${ o } ( ${ this . language } )' returned an object instead of string.` ; return r ? ( g . res = e , g . usedParams = this . getUsedParamsDetails ( i ), g ) : e } if ( n ){ let e = Array . isArray ( P ), t = e ? [] : {}, s = e ? f : m ; for ( let e in P ) if ( Object . prototype . hasOwnProperty . call ( P , e )){ let a = ` ${ s }${ n }${ e } ` ; b &&! h ? t [ e ] = this . translate ( a ,{... i , defaultValue : L ( R ) ? R [ e ] : void 0 ,...{ joinArrays :! 1 , ns : l }}) : t [ e ] = this . translate ( a ,{... i , joinArrays :! 1 , ns : l }), t [ e ] === a && ( t [ e ] = P [ e ])} h = t }} else if ( x && s ( y ) && Array . isArray ( h ))( h = h . join ( y )) && ( h = this . extendTranslation ( h , e , i , a )); else { let t =! 1 , s =! 1 ; ! this . isValidLookup ( h ) && b && ( t =! 0 , h = R ), this . isValidLookup ( h ) || ( s =! 0 , h = o ); let r = ( i . missingKeyNoValueFallbackToKey || this . options . missingKeyNoValueFallbackToKey ) && s ? void 0 : h , l = b && R !== h && this . options . updateMissing ; if ( s || t || l ){ if ( this . logger . log ( l ? "updateKey" : "missingKey" , d , u , v &&! l ? ` ${ o }${ this . pluralResolver . getSuffix ( d , i . count , i ) } ` : o , l ? R : h ), n ){ let e = this . resolve ( o ,{... i , keySeparator :! 1 }); e && e . res && this . logger . warn ( "Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format." )} let e = [], t = this . languageUtils . getFallbackCodes ( this . options . fallbackLng , i . lng || this . language ); if ( "fallback" === this . options . saveMissingTo && t && t [ 0 ]) for ( let s = 0 ; s < t . length ; s ++ ) e . push ( t [ s ]); else "all" === this . options . saveMissingTo ? e = this . languageUtils . toResolveHierarchy ( i . lng || this . language ) : e . push ( i . lng || this . language ); let s = ( e , t , s )=>{ let a = b && s !== h ? s : r ; this . options . missingKeyHandler ? this . options . missingKeyHandler ( e , u , t , a , l , i ) : this . backendConnector ? . saveMissing && this . backendConnector . saveMissing ( e , u , t , a , l , i ), this . emit ( "missingKey" , e , u , t , h )}; this . options . saveMissing && ( this . options . saveMissingPlurals && v ? e . forEach ( e =>{ let t = this . pluralResolver . getSuffixes ( e , i ); k && i [ `defaultValue ${ this . options . pluralSeparator } zero` ] &&! t . includes ( ` ${ this . options . pluralSeparator } zero` ) && t . push ( ` ${ this . options . pluralSeparator } zero` ), t . forEach ( t =>{ s ([ e ], o + t , i [ `defaultValue ${ t } ` ] || R )})}) : s ( e , o , R ))} h = this . extendTranslation ( h , e , i , g , a ), s && h === o && this . options . appendNamespaceToMissingKey && ( h = ` ${ u }${ c }${ o } ` ),( s || t ) && this . options . parseMissingKeyHandler && ( h = this . options . parseMissingKeyHandler ( this . options . appendNamespaceToMissingKey ? ` ${ u }${ c }${ o } ` : o , t ? h : void 0 , i ))} return r ? ( g . res = h , g . usedParams = this . getUsedParamsDetails ( i ), g ) : h } extendTranslation ( e , t , a , i , r ){ if ( this . i18nFormat ? . parse ) e = this . i18nFormat . parse ( e ,{... this . options . interpolation . defaultVariables ,... a }, a . lng || this . language || i . usedLng , i . usedNS , i . usedKey ,{ resolved : i }); else if ( ! a . skipInterpolation ){ let n ; a . interpolation && this . interpolator . init ({... a ,...{ interpolation : {... this . options . interpolation ,... a . interpolation }}}); let o = s ( e ) && ( a ? . interpolation ? . skipOnVariables !== void 0 ? a . interpolation . skipOnVariables : this . options . interpolation . skipOnVariables ); if ( o ){ let t = e . match ( this . interpolator . nestingRegexp ); n = t && t . length } let l = a . replace &&! s ( a . replace ) ? a . replace : a ; if ( this . options . interpolation . defaultVariables && ( l = {... this . options . interpolation . defaultVariables ,... l }), e = this . interpolator . interpolate ( e , l , a . lng || this . language || i . usedLng , a ), o ){ let t = e . match ( this . interpolator . nestingRegexp ); n < ( t && t . length ) && ( a . nest =! 1 )} ! a . lng && i && i . res && ( a . lng = this . language || i . usedLng ), ! 1 !== a . nest && ( e = this . interpolator . nest ( e ,(... e )=> r ? .[ 0 ] !== e [ 0 ] || a . context ? this . translate (... e , t ) : ( this . logger . warn ( `It seems you are nesting recursively key: ${ e [ 0 ] } in key: ${ t [ 0 ] } ` ), null ), a )), a . interpolation && this . interpolator . reset ()} let n = a . postProcess || this . options . postProcess , o = s ( n ) ? [ n ] : n ; return null != e && o ? . length &&! 1 !== a . applyPostProcessor && ( e = j . handle ( o , e , t , this . options && this . options . postProcessPassResolved ? { i18nResolved : {... i , usedParams : this . getUsedParamsDetails ( a )},... a } : a , this )), e } resolve ( e , t = {}){ let a , i , r , n , o ; return s ( e ) && ( e = [ e ]), Array . isArray ( e ) && ( e = e . map ( e => "function" == typeof e ? w ( e ,{... this . options ,... t }) : e )), e . forEach ( e =>{ if ( this . isValidLookup ( a )) return ; let l = this . extractFromKey ( e , t ), u = l . key ; i = u ; let c = l . namespaces ; this . options . fallbackNS && ( c = c . concat ( this . options . fallbackNS )); let d = void 0 !== t . count &&! s ( t . count ), p = d &&! t . ordinal && 0 === t . count , g = void 0 !== t . context && ( s ( t . context ) || "number" == typeof t . context ) && "" !== t . context , h = t . lngs ? t . lngs : this . languageUtils . toResolveHierarchy ( t . lng || this . language , t . fallbackLng ); c . forEach ( e =>{ this . isValidLookup ( a ) || ( o = e , ! this . checkedLoadedFor [ ` ${ h [ 0 ] } - ${ e } ` ] && this . utils ? . hasLoadedNamespace &&! this . utils ? . hasLoadedNamespace ( o ) && ( this . checkedLoadedFor [ ` ${ h [ 0 ] } - ${ e } ` ] =! 0 , this . logger . warn ( `key " ${ i } " for languages " ${ h . join ( ", " ) } " won't get resolved as namespace " ${ o } " was not yet loaded` , "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!" )), h . forEach ( s =>{ let i ; if ( this . isValidLookup ( a )) return ; n = s ; let o = [ u ]; if ( this . i18nFormat ? . addLookupKeys ) this . i18nFormat . addLookupKeys ( o , u , s , e , t ); else { let e ; d && ( e = this . pluralResolver . getSuffix ( s , t . count , t )); let a = ` ${ this . options . pluralSeparator } zero` , i = ` ${ this . options . pluralSeparator } ordinal ${ this . options . pluralSeparator } ` ; if ( d && ( t . ordinal && e . startsWith ( i ) && o . push ( u + e . replace ( i , this . options . pluralSeparator )), o . push ( u + e ), p && o . push ( u + a )), g ){ let s = ` ${ u }${ this . options . contextSeparator || "_" }${ t . context } ` ; o . push ( s ), d && ( t . ordinal && e . startsWith ( i ) && o . push ( s + e . replace ( i , this . options . pluralSeparator )), o . push ( s + e ), p && o . push ( s + a ))}} for (; i = o . pop ();) this . isValidLookup ( a ) || ( r = i , a = this . getResource ( s , e , i , t ))}))})}),{ res : a , usedKey : i , exactUsedKey : r , usedLng : n , usedNS : o }} isValidLookup ( e ){ return void 0 !== e &&! ( ! this . options . returnNull && null === e ) &&! ( ! this . options . returnEmptyString && "" === e )} getResource ( e , t , s , a = {}){ return this . i18nFormat ? . getResource ? this . i18nFormat . getResource ( e , t , s , a ) : this . resourceStore . getResource ( e , t , s , a )} getUsedParamsDetails ( e = {}){ let t = e . replace &&! s ( e . replace ), a = t ? e . replace : e ; if ( t && void 0 !== e . count && ( a = {... a , count : e . count }), this . options . interpolation . defaultVariables && ( a = {... this . options . interpolation . defaultVariables ,... a }), ! t ) for ( let e of ( a = {... a },[ "defaultValue" , "ordinal" , "context" , "replace" , "lng" , "lngs" , "fallbackLng" , "ns" , "keySeparator" , "nsSeparator" , "returnObjects" , "returnDetails" , "joinArrays" , "postProcess" , "interpolation" ])) delete a [ e ]; return a } static hasDefaultValue ( e ){ for ( let t in e ) if ( Object . prototype . hasOwnProperty . call ( e , t ) && t . startsWith ( "defaultValue" ) && void 0 !== e [ t ]) return ! 0 ; return ! 1 }} class R { constructor ( e ){ this . options = e , this . supportedLngs = this . options . supportedLngs ||! 1 , this . logger = v . create ( "languageUtils" )} getScriptPartFromCode ( e ){ if ( ! ( e = y ( e )) ||! e . includes ( "-" )) return null ; let t = e . split ( "-" ); return 2 === t . length || ( t . pop (), "x" === t [ t . length - 1 ]. toLowerCase ()) ? null : this . formatLanguageCode ( t . join ( "-" ))} getLanguagePartFromCode ( e ){ if ( ! ( e = y ( e )) ||! e . includes ( "-" )) return e ; let t = e . split ( "-" ); return this . formatLanguageCode ( t [ 0 ])} formatLanguageCode ( e ){ if ( s ( e ) && e . includes ( "-" )){ let t ; try { t = Intl . getCanonicalLocales ( e )[ 0 ]} catch ( e ){} return ( t && this . options . lowerCaseLng && ( t = t . toLowerCase ()), t ) ? t : this . options . lowerCaseLng ? e . toLowerCase () : e } return this . options . cleanCode || this . options . lowerCaseLng ? e . toLowerCase () : e } isSupportedCode ( e ){ return ( "languageOnly" === this . options . load || this . options . nonExplicitSupportedLngs ) && ( e = this . getLanguagePartFromCode ( e )), ! this . supportedLngs ||! this . supportedLngs . length || this . supportedLngs . includes ( e )} getBestMatchFromCodes ( e ){ let t ; return e ? ( e . forEach ( e =>{ if ( t ) return ; let s = this . formatLanguageCode ( e );( ! this . options . supportedLngs || this . isSupportedCode ( s )) && ( t = s )}), ! t && this . options . supportedLngs && e . forEach ( e =>{ if ( t ) return ; let s = this . getScriptPartFromCode ( e ); if ( this . isSupportedCode ( s )) return t = s ; let a = this . getLanguagePartFromCode ( e ); if ( this . isSupportedCode ( a )) return t = a ; t = this . options . supportedLngs . find ( e => e === a || ( !! e . includes ( "-" ) ||!! a . includes ( "-" )) &&!! ( e . includes ( "-" ) &&! a . includes ( "-" ) && e . slice ( 0 , e . indexOf ( "-" )) === a || e . startsWith ( a ) && a . length > 1 ))}), t || ( t = this . getFallbackCodes ( this . options . fallbackLng )[ 0 ]), t ) : null } getFallbackCodes ( e , t ){ if ( ! e ) return []; if ( "function" == typeof e && ( e = e ( t )), s ( e ) && ( e = [ e ]), Array . isArray ( e )) return e ; if ( ! t ) return e . default || []; let a = e [ t ]; return a || ( a = e [ this . getScriptPartFromCode ( t )]), a || ( a = e [ this . formatLanguageCode ( t )]), a || ( a = e [ this . getLanguagePartFromCode ( t )]), a || ( a = e . default ), a || []} toResolveHierarchy ( e , t ){ let a = this . getFallbackCodes (( ! 1 === t ? [] : t ) || this . options . fallbackLng || [], e ), i = [], r = e =>{ e && ( this . isSupportedCode ( e ) ? i . push ( e ) : this . logger . warn ( `rejecting language code not found in supportedLngs: ${ e } ` ))}; return s ( e ) && ( e . includes ( "-" ) || e . includes ( "_" )) ? ( "languageOnly" !== this . options . load && r ( this . formatLanguageCode ( e )), "languageOnly" !== this . options . load && "currentOnly" !== this . options . load && r ( this . getScriptPartFromCode ( e )), "currentOnly" !== this . options . load && r ( this . getLanguagePartFromCode ( e ))) : s ( e ) && r ( this . formatLanguageCode ( e )), a . forEach ( e =>{ i . includes ( e ) || r ( this . formatLanguageCode ( e ))}), i }} let P = { zero : 0 , one : 1 , two : 2 , few : 3 , many : 4 , other : 5 }, F = { select : e => 1 === e ? "one" : "other" , resolvedOptions : ()=>({ pluralCategories : [ "one" , "other" ]})}; class N { constructor ( e , t = {}){ this . languageUtils = e , this . options = t , this . logger = v . create ( "pluralResolver" ), this . pluralRulesCache = {}} clearCache (){ this . pluralRulesCache = {}} getRule ( e , t = {}){ let s , a = y ( "dev" === e ? "en" : e ), i = t . ordinal ? "ordinal" : "cardinal" , r = JSON . stringify ({ cleanedCode : a , type : i }); if ( r in this . pluralRulesCache ) return this . pluralRulesCache [ r ]; try { s = new Intl . PluralRules ( a ,{ type : i })} catch ( i ){ if ( "u" < typeof Intl ) return this . logger . error ( "No Intl support, please use an Intl polyfill!" ), F ; if ( ! e . match ( /-|_/ )) return F ; let a = this . languageUtils . getLanguagePartFromCode ( e ); s = this . getRule ( a , t )} return this . pluralRulesCache [ r ] = s , s } needsPlural ( e , t = {}){ let s = this . getRule ( e , t ); return s || ( s = this . getRule ( "dev" , t )), s ? . resolvedOptions (). pluralCategories . length > 1 } getPluralFormsOfKey ( e , t , s = {}){ return this . getSuffixes ( e , s ). map ( e => ` ${ t }${ e } ` )} getSuffixes ( e , t = {}){ let s = this . getRule ( e , t ); return ( s || ( s = this . getRule ( "dev" , t )), s ) ? s . resolvedOptions (). pluralCategories . sort (( e , t )=> P [ e ] - P [ t ]). map ( e => ` ${ this . options . prepend }${ t . ordinal ? `ordinal ${ this . options . prepend } ` : "" }${ e } ` ) : []} getSuffix ( e , t , s = {}){ let a = this . getRule ( e , s ); return a ? ` ${ this . options . prepend }${ s . ordinal ? `ordinal ${ this . options . prepend } ` : "" }${ a . select ( t ) } ` : ( this . logger . warn ( `no plural rule found for: ${ e } ` ), this . getSuffix ( "dev" , t , s ))}} let O = ( e , t , a , i = "." , r =! 0 )=>{ let n , o = void 0 !== ( n = c ( e , a )) ? n : c ( t , a ); return ! o && r && s ( a ) && void 0 === ( o = f ( e , a , i )) && ( o = f ( t , a , i )), o }, $ = e => e . replace ( /\$/g , "$$$$" ); class E { constructor ( e = {}){ this . logger = v . create ( "interpolator" ), this . options = e , this . format = e ? . interpolation ? . format || ( e => e ), this . init ( e )} init ( e = {}){ e . interpolation || ( e . interpolation = { escapeValue :! 0 }); let { escape : t , escapeValue : s , useRawValueToEscape : a , prefix : i , prefixEscaped : r , suffix : n , suffixEscaped : o , formatSeparator : l , unescapeSuffix : u , unescapePrefix : c , nestingPrefix : d , nestingPrefixEscaped : p , nestingSuffix : h , nestingSuffixEscaped : m , nestingOptionsSeparator : f , maxReplaces : y , alwaysFormat : x } = e . interpolation ; this . escape = void 0 !== t ? t : g , this . escapeValue = void 0 === s || s , this . useRawValueToEscape = void 0 !== a && a , this . prefix = i ? i . replace ( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g , "\\$&" ) : r || "{{" , this . suffix = n ? n . replace ( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g , "\\$&" ) : o || "}}" , this . formatSeparator = l || "," , this . unescapePrefix = u ? "" : c ? c . replace ( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g , "\\$&" ) : "-" , this . unescapeSuffix = this . unescapePrefix ? "" : u ? u . replace ( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g , "\\$&" ) : "" , this . nestingPrefix = d ? d . replace ( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g , "\\$&" ) : p || "$t(" . replace ( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g , "\\$&" ), this . nestingSuffix = h ? h . replace ( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g , "\\$&" ) : m || ")" . replace ( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g , "\\$&" ), this . nestingOptionsSeparator = f || "," , this . maxReplaces = y || 1e3 , this . alwaysFormat = void 0 !== x && x , this . resetRegExp ()} reset (){ this . options && this . init ( this . options )} resetRegExp (){ let e = ( e , t )=> e ? . source === t ? ( e . lastIndex = 0 , e ) : RegExp ( t , "g" ); this . regexp = e ( this . regexp , ` ${ this . prefix } (.+?) ${ this . suffix } ` ), this . regexpUnescape = e ( this . regexpUnescape , ` ${ this . prefix }${ this . unescapePrefix } (.+?) ${ this . unescapeSuffix }${ this . suffix } ` ), this . nestingRegexp = e ( this . nestingRegexp , ` ${ this . nestingPrefix } ((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?) ${ this . nestingSuffix } ` )} interpolate ( e , t , a , r ){ let n , o , l , u = this . options && this . options . interpolation && this . options . interpolation . defaultVariables || {}, c = e =>{ if ( ! e . includes ( this . formatSeparator )){ let s = O ( t , u , e , this . options . keySeparator , this . options . ignoreJSONStructure ); return this . alwaysFormat ? this . format ( s , void 0 , a ,{... r ,... t , interpolationkey : e }) : s } let s = e . split ( this . formatSeparator ), i = s . shift (). trim (), n = s . join ( this . formatSeparator ). trim (); return this . format ( O ( t , u , i , this . options . keySeparator , this . options . ignoreJSONStructure ), n , a ,{... r ,... t , interpolationkey : i })}; this . resetRegExp (), ! this . escapeValue && "string" == typeof e && /\$t\([^)]*\{[^}]*\{\{/ . test ( e ) && this . logger . warn ( "nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true." ); let d = r ? . missingInterpolationHandler || this . options . missingInterpolationHandler , p = r ? . interpolation ? . skipOnVariables !== void 0 ? r . interpolation . skipOnVariables : this . options . interpolation . skipOnVariables ; return [{ regex : this . regexpUnescape , safeValue : e => e },{ regex : this . regexp , safeValue : e => this . escapeValue ? this . escape ( e ) : e }]. forEach ( t =>{ for ( l = 0 ; n = t . regex . exec ( e );){ let a = n [ 1 ]. trim (); if ( void 0 === ( o = c ( a ))) if ( "function" == typeof d ){ let t = d ( e , n , r ); o = s ( t ) ? t : "" } else if ( r && Object . prototype . hasOwnProperty . call ( r , a )) o = "" ; else if ( p ){ o = n [ 0 ]; continue } else this . logger . warn ( `missed to pass in variable ${ a } for interpolating ${ e } ` ), o = "" ; else s ( o ) || this . useRawValueToEscape || ( o = i ( o )); let u = t . safeValue ( o ); if ( e = e . replace ( n [ 0 ], $ ( u )), p ? ( t . regex . lastIndex += u . length , t . regex . lastIndex -= n [ 0 ]. length ) : t . regex . lastIndex = 0 , ++ l >= this . maxReplaces ) break }}), e } nest ( e , t , a = {}){ let r , n , o , l = ( e , t )=>{ let s = this . nestingOptionsSeparator ; if ( ! e . includes ( s )) return e ; let a = e . split ( RegExp ( ` ${ s . replace ( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g , "\\$&" ) } [ ]*{` )), i = `{ ${ a [ 1 ] } ` ; e = a [ 0 ]; let r = ( i = this . interpolate ( i , o )). match ( /'/g ), n = i . match ( /"/g );(( r ? . length ?? 0 ) % 2 != 0 || n ) && ( n ? . length ?? 0 ) % 2 == 0 || ( i = i . replace ( /'/g , '"' )); try { o = JSON . parse ( i ), t && ( o = {... t ,... o })} catch ( t ){ return this . logger . warn ( `failed parsing options string in nesting for key ${ e } ` , t ), ` ${ e }${ s }${ i } ` } return o . defaultValue && o . defaultValue . includes ( this . prefix ) && delete o . defaultValue , e }; for (; r = this . nestingRegexp . exec ( e );){ let u = [];( o = ( o = {... a }). replace &&! s ( o . replace ) ? o . replace : o ). applyPostProcessor =! 1 , delete o . defaultValue ; let c = /{.*}/s.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==c&&(u=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),(n=t(l.call(this,r[1].trim(),o),o))&&r[0]===e&&!s(n))return n;s(n)||(n=i(n)),n||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),n=""),u.length&&(n=u.reduce((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:r[1].trim()}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}let T=e=>{let t={};return(s,a,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});let n=a+JSON.stringify(r),o=t[n];return o||(o=e(y(a),i),t[n]=o),o(s)}},A=e=>(t,s,a)=>e(y(s),a)(t);class M{constructor(e={}){this.logger=v.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let s=t.cacheInBuiltFormats?T:A;this.formats={number:s((e,t)=>{let s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:s((e,t)=>{let s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:s((e,t)=>{let s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:s((e,t)=>{let s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:s((e,t)=>{let s=new Intl.ListFormat(e,{...t});return e=>s.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=T(t)}format(e,t,s,a={}){if(!t||null==e)return e;let i=t.split(this.formatSeparator),r=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf("(")>-1&&!t.includes(")")&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;r.push(t)}return r.reduce((e,t)=>{let{formatName:i,formatOptions:r}=(e=>{let t=e.toLowerCase().trim(),s={};if(e.includes("(")){let a=e.split("(");t=a[0].toLowerCase().trim();let i=a[1].slice(0,-1);"currency"!==t||i.includes(":")?"relativetime"!==t||i.includes(":")?i.split(";").forEach(e=>{if(e){let[t,...a]=e.split(":"),i=a.join(":").trim().replace(/^'+|'+$/g,""),r=t.trim();s[r]||(s[r]=i),"false"===i&&(s[r]=!1),"true"===i&&(s[r]=!0),isNaN(i)||(s[r]=parseInt(i,10))}}):s.range||(s.range=i.trim()):s.currency||(s.currency=i.trim())}return{formatName:t,formatOptions:s}})(t);if(this.formats[i]){let t=e;try{let n=a?.formatParams?.[a.interpolationkey]||{},o=n.locale||n.lng||a.locale||a.lng||s;t=this.formats[i](e,o,{...r,...a,...n})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}}class D extends b{constructor(e,t,s,a={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=a,this.logger=v.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,a.backend,a)}queueLoad(e,t,s,a){let i={},r={},n={},o={};return e.forEach(e=>{let a=!0;t.forEach(t=>{let n=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[n]=2:this.state[n]<0||(1===this.state[n]?void 0===r[n]&&(r[n]=!0):(this.state[n]=1,a=!1,void 0===r[n]&&(r[n]=!0),void 0===i[n]&&(i[n]=!0),void 0===o[t]&&(o[t]=!0)))}),a||(n[e]=!0)}),(Object.keys(i).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(i),pending:Object.keys(r),toLoadLanguages:Object.keys(n),toLoadNamespaces:Object.keys(o)}}loaded(e,t,s){let a=e.split("|"),i=a[0],r=a[1];t&&this.emit("failedLoading",i,r,t),!t&&s&&this.store.addResourceBundle(i,r,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);let n={};this.queue.forEach(s=>{((e,t,s)=>{let{obj:a,k:i}=l(e,t,Object);a[i]=a[i]||[],a[i].push(s)})(s.loaded,[i],r),void 0!==s.pending[e]&&(delete s.pending[e],s.pendingCount--),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(e=>{n[e]||(n[e]={});let t=s.loaded[e];t.length&&t.forEach(t=>{void 0===n[e][t]&&(n[e][t]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",n),this.queue=this.queue.filter(e=>!e.done)}read(e,t,s,a=0,i=this.retryTimeout,r){if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:s,tried:a,wait:i,callback:r});this.readingCalls++;let n=(n,o)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}n&&o&&a<this.maxRetries?setTimeout(()=>{this.read(e,t,s,a+1,2*i,r)},i):r(n,o)},o=this.backend[s].bind(this.backend);if(2===o.length){try{let s=o(e,t);s&&"function"==typeof s.then?s.then(e=>n(null,e)).catch(n):n(null,s)}catch(e){n(e)}return}return o(e,t,n)}prepareLoading(e,t,a={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();s(e)&&(e=this.languageUtils.toResolveHierarchy(e)),s(t)&&(t=[t]);let r=this.queueLoad(e,t,a,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){let s=e.split("|"),a=s[0],i=s[1];this.read(a,i,"read",void 0,void 0,(s,r)=>{s&&this.logger.warn(`${t}loading namespace ${i} for language ${a} failed`,s),!s&&r&&this.logger.log(`${t}loaded namespace ${i} for language ${a}`,r),this.loaded(e,s,r)})}saveMissing(e,t,s,a,i,r={},n=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=s&&""!==s){if(this.backend?.create){let o={...r,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;(i=5===l.length?l(e,t,s,a,o):l(e,t,s,a))&&"function"==typeof i.then?i.then(e=>n(null,e)).catch(n):n(null,i)}catch(e){n(e)}else l(e,t,s,a,n,o)}e&&e[0]&&this.store.addResource(e[0],t,s,a)}}}let I=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),s(e[1])&&(t.defaultValue=e[1]),s(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let s=e[3]||e[2];Object.keys(s).forEach(e=>{t[e]=s[e]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),V=e=>(s(e.ns)&&(e.ns=[e.ns]),s(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),s(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),U=()=>{};class H extends b{constructor(e={},t){if(super(),this.options=V(e),this.services={},this.logger=v,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(s(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));let i=I();this.options={...i,...this.options,...V(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);let r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?v.init(r(this.modules.logger),this.options):v.init(null,this.options),e=this.modules.formatter?this.modules.formatter:M;let t=new R(this.options);this.store=new S(this.options.resources,this.options);let s=this.services;s.logger=v,s.resourceStore=this.store,s.languageUtils=t,s.pluralResolver=new N(t,{prepend:this.options.pluralSeparator}),e&&(s.formatter=r(e),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new E(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new D(r(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(s.languageDetector=r(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=r(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new C(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=U),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let n=a(),o=()=>{let e=(e,s)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),n.resolve(s),t(e,s)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),n}loadResources(e,t=U){let a=t,i=s(e)?e:this.language;if("function"==typeof e&&(a=e),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return a();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&(e.includes(t)||e.push(t))})};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),a(e)})}else a(null)}reloadResources(e,t,s){let i=a();return"function"==typeof e&&(s=e,e=void 0),"function"==typeof t&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=U),this.services.backendConnector.reload(e,t,e=>{i.resolve(),s(e)}),i}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&j.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!["cimode","dev"].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!["cimode","dev"].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let i=a();this.emit("languageChanging",e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},n=(s,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,i.resolve((...e)=>this.t(...e)),t&&t(s,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);let a=s(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(a)?a:this.services.languageUtils.getBestMatchFromCodes(s(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{n(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),i}getFixedT(e,t,a,i){let r=i?.scopeNs,n=(e,t,...s)=>{let i,o;(i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(s)):{...t}).lng=i.lng||n.lng,i.lngs=i.lngs||n.lngs;let l=void 0!==i.ns&&null!==i.ns;i.ns=i.ns||n.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||a||n.keyPrefix);let u={...this.options,...i};Array.isArray(r)&&!l&&(u.ns=r),"function"==typeof i.keyPrefix&&(i.keyPrefix=w(i.keyPrefix,u));let c=this.options.keySeparator||".";return i.keyPrefix&&Array.isArray(e)?o=e.map(e=>("function"==typeof e&&(e=w(e,u)),`${i.keyPrefix}${c}${e}`)):("function"==typeof e&&(e=w(e,u)),o=i.keyPrefix?`${i.keyPrefix}${c}${e}`:e),this.t(o,i)};return s(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=a,n}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let s=t.lng||this.resolvedLanguage||this.languages[0],a=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;let r=(e,t)=>{let s=this.services.backendConnector.state[`${e}|${t}`];return -1===s||0===s||2===s};if(t.precheck){let e=t.precheck(this,r);if(void 0!==e)return e}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(s,e)&&(!a||r(i,e)))}loadNamespaces(e,t){let i=a();return this.options.ns?(s(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){let i=a();s(e)&&(e=[e]);let r=this.options.preload||[],n=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));retur n n.length?(this.options.preload=r.concat(n),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new R(I());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].includes(t.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){let s=new H(e,t);return s.createInstance=H.createInstance,s}cloneInstance(e={},t=U){let s=e.forkResourceStore;s&&delete e.forkResourceStore;let a={...this.options,...e,isClone:!0},i=new H(a);if((void 0!==e.debug||void 0!==e.prefix)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},s&&(i.store=new S(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((s,a)=>(s[a]={...e[t][a]},s),e[t]),e),{}),a),i.services.resourceStore=i.store),e.interpolation){let t={...I().interpolation,...this.options.interpolation,...e.interpolation},s={...a,interpolation:t};i.services.interpolator=new E(s)}return i.translator=new C(i.services,a),i.translator.on("*",(e,...t)=>{i.emit(e,...t)}),i.init(a,t),i.translator.options=a,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let z=H.createInstance();z.createInstance,z.dir,z.init,z.loadResources,z.reloadResources,z.use,z.changeLanguage,z.getFixedT,z.t,z.exists,z.setDefaultNamespace,z.hasLoadedNamespace,z.loadNamespaces,z.loadLanguages;var q=e.i(71645);Object.create(null);let B=(e,t,s,a)=>{let i=[s,{code:t,...a||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);G(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},K={},_=(e,t,s,a)=>{G(s)&&K[s]||(G(s)&&(K[s]=new Date),B(e,t,s,a))},J=(e,t)=>()=>{if(e.isInitialized)t();else{let s=()=>{setTimeout(()=>{e.off("initialized",s)},0),t()};e.on("initialized",s)}},W=(e,t,s)=>{e.loadNamespaces(t,J(e,s))},Y=(e,t,s,a)=>{if(G(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return W(e,s,a);s.forEach(t=>{0>e.options.ns.indexOf(t)&&e.options.ns.push(t)}),e.loadLanguages(t,J(e,a))},G=e=>"string"==typeof e,Q=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Z={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},X=e=>Z[e],ee={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Q,X),transDefaultProps:void 0},et={type:"3rdParty",init(e){((e={})=>{ee={...ee,...e}})(e.options.react),t=e}},es=(0,q.createContext)();class ea{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}let ei={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'","©":"©","®":"®","™":"™","…":"…","–":"– ","—":"—","‘":"‘ ","’":"’ ","‚":"‚ ","“":"“","”":"”","„":"„","†":"†","‡":"‡","•":"•","′":"′ ","″":"″","‹":"‹ ","›":"› ","§":"§","¶":"¶","·":"·"," ":" "," ":" "," ":" ","€":"€","£":"£","¥":"¥","¢":"¢","¤":"¤","×":"× ","÷":"÷","−":"− ","±":"±","≠":"≠","≤":"≤","≥":"≥","≈":"≈","≡":"≡","∞":"∞","∫":"∫","∑":"∑","∏":"∏","√":"√","∂":"∂","‰":"‰","°":"°","µ":"µ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","α":"α ","β":"β","γ":"γ ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι ","κ":"κ","λ":"λ","μ":"μ","ν":"ν ","ξ":"ξ","ο":"ο ","π":"π","ρ":"ρ ","σ":"σ ","τ":"τ","υ":"υ ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","Α":"Α ","Β":"Β ","Γ":"Γ","Δ":"Δ","Ε":"Ε ","Ζ":"Ζ ","Η":"Η ","Θ":"Θ","Ι":"Ι ","Κ":"Κ ","Λ":"Λ","Μ":"Μ ","Ν":"Ν ","Ξ":"Ξ","Ο":"Ο ","Π":"Π","Ρ":"Ρ ","Σ":"Σ","Τ":"Τ ","Υ":"Υ ","Φ":"Φ","Χ":"Χ ","Ψ":"Ψ","Ω":"Ω","À":"À","Á":"Á","Â":"Â","Ã":"Ã","Ä":"Ä","Å":"Å","Æ":"Æ","Ç":"Ç","È":"È","É":"É","Ê":"Ê","Ë":"Ë","Ì":"Ì","Í":"Í","Î":"Î","Ï":"Ï","Ð":"Ð","Ñ":"Ñ","Ò":"Ò","Ó":"Ó","Ô":"Ô","Õ":"Õ","Ö":"Ö","Ø":"Ø","Ù":"Ù","Ú":"Ú","Û":"Û","Ü":"Ü","Ý":"Ý","Þ":"Þ","ß":"ß","à":"à","á":"á","â":"â","ã":"ã","ä":"ä","å":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","í":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ","¡":"¡","¿":"¿","ƒ":"ƒ","ˆ":"ˆ ","˜":"˜ ","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ª":"ª","º":"º","¯":"¯","´":"´ ","¸":"¸ ","¹":"¹","²":"²","³":"³","¼":"¼","½":"½","¾":"¾","♠":"♠","♣":"♣","♥":"♥","♦":"♦","◊":"◊","‾":"‾","⁄":"⁄ ","℘":"℘","ℑ":"ℑ ","ℜ":"ℜ ","ℵ":"ℵ"},er=RegExp(Object.keys(ei).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g");var en=e.i(2239);let eo={t:(e,t)=>{let s;if(G(t))return t;if("object"==typeof(s=t)&&null!==s&&G(t.defaultValue))return t.defaultValue;if("function"==typeof e)return"";if(Array.isArray(e)){let t=e[e.length-1];return"function"==typeof t?"":t}return e},ready:!1},el=()=>()=>{};e.s(["useTranslation",0,(e,s={})=>{let{i18n:a}=s,{i18n:i,defaultNS:r}=(0,q.useContext)(es)||{},n=a||i||t;n&&!n.reportNamespaces&&(n.reportNamespaces=new ea),n||_(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");let o=(0,q.useMemo)(()=>({...ee,...n?.options?.react,...s}),[n,s]),{useSuspense:l,keyPrefix:u}=o,c=e||r||n?.options?.defaultNS,d=G(c)?[c]:c||["translation"],p=(0,q.useMemo)(()=>d,d);n?.reportNamespaces?.addUsedNamespaces?.(p);let g=(0,q.useRef)(0),h=(0,q.useCallback)(e=>{if(!n)return el;let{bindI18n:t,bindI18nStore:s}=o,a=()=>{g.current+=1,e()};return t&&n.on(t,a),s&&n.store.on(s,a),( )=>{t&&t.split(" ").forEach(e=>n.off(e,a)),s&&s.split(" ").forEach(e=>n.store.off(e,a))}},[n,o]),m=(0,q.useRef)(),f=(0,q.useCallback)(()=>{if(!n)return eo;let e=!!(n.isInitialized||n.initializedStoreOnce)&&p.every(e=>((e,t,s={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:s.lng,precheck:(t,a)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))return!1}}):(_(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,n,o)),t=s.lng||n.language,a=g.current,i=m.current;if(i&&i.ready===e&&i.lng===t&&i.keyPrefix===u&&i.revision===a)return i;let r={t:n.getFixedT(t,"fallback"===o.nsMode?p:p[0],u,{scopeNs:p}),ready:e,lng:t,keyPrefix:u,revision:a};return m.current=r,r},[n,p,u,o,s.lng]),[y,x]=(0,q.useState)(0),{t:v,ready:b}=(0,en.useSyncExternalStore)(h,f,f);(0,q.useEffect)(()=>{if(n&&!b&&!l){let e=()=>x(e=>e+1);s.lng?Y(n,s.lng,p,e):W(n,p,e)}},[n,s.lng,p,b,l,y]);let S=n||{},j=(0,q.useRef)(null),k=(0,q.useRef)(),w=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let s=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(s,"__original"))try{Object.defineProperty(s,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch(e){}return s},L=(0,q.useMemo)(()=>{let e=S?.language,t=S;j.current&&j.current.__original===S?k.current!==e?(j.current=t=w(S),k.current=e):t=j.current:(j.current=t=w(S),k.current=e);let s=b||l?v:(...e)=>(_(n,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),v(...e)),a=[s,t,b];return a.t=s,a.i18n=t,a.ready=b,a},[v,S,b,S.resolvedLanguage,S.language,S.languages]);if(n&&l&&!b)throw new Promise(e=>{let t=()=>e();s.lng?Y(n,s.lng,p,t):W(n,p,t)});return L}],22831),e.s([],85269);var eu=e.i(61525),ec=e.i(99307);let ed=!1;e.s(["initI18n",0,function(e){if(ed)return e&&z.language!==e&&z.changeLanguage(e),z;if(ed=!0,!e){let t=localStorage.getItem("forumlify-lang"),s=(navigator.language||"zh").toLowerCase();e=t||(s.startsWith("en")?"en":"zh")}return z.use(et).init({resources:{zh:{translation:eu.default},en:{translation:ec.default}},lng:e||"zh",fallbackLng:"zh",interpolation:{escapeValue:!1},react:{useSuspense:!1},initImmediate:!1}),z},"setAppLanguage",0,function(e){return localStorage.setItem("forumlify-lang",e),document.cookie="forumlify-lang="+e+"; path=/; max-age=31536000",z.changeLanguage(e)}],16166)},55838,(e,t,s)=>{"use strict";var a=e.r(71645),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=a.useState,n=a.useEffect,o=a.useLayoutEffect,l=a.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!i(e,s)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),a=r({inst:{value:s,getSnapshot:t}}),i=a[0].inst,c=a[1];return o(function(){i.value=s,i.getSnapshot=t,u(i)&&c({inst:i})},[e,s,t]),n(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(s),s};s.useSyncExternalStore=void 0!==a.useSyncExternalStore?a.useSyncExternalStore:c},2239,(e,t,s)=>{"use strict";e.i(47167),t.exports=e.r(55838)}]);