@axiom-lattice/react-sdk 8.2.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AgentDetailSideApp-PNN6EZAK.mjs → AgentDetailSideApp-YQS5GL7P.mjs} +11 -11
- package/dist/AgentGovernanceWorkbench-KYHOZTRY.mjs +24 -0
- package/dist/{LangfuseDashboard-LRYMXATJ.mjs → LangfuseDashboard-LSPULCS3.mjs} +2 -2
- package/dist/{MessageGraph-G4S25PLS.mjs → MessageGraph-WUWP2CE3.mjs} +7 -7
- package/dist/{ReactChart-UNBTHGFX.mjs → ReactChart-7WQQAQ73.mjs} +7 -7
- package/dist/SkillFlow-JD3N76HE.mjs +14 -0
- package/dist/{TasksSideApp-PKIA6WVE.mjs → TasksSideApp-IPFBRDSJ.mjs} +8 -8
- package/dist/ThreadMaintenancePanel-7I7GQXRA.mjs +12 -0
- package/dist/{TopologyRuntimeView-EQIYLMTF.mjs → TopologyRuntimeView-WFMC2GME.mjs} +8 -8
- package/dist/WorkflowAutomationView-CZIAN5D7.mjs +22 -0
- package/dist/{chunk-UAZQVVSC.mjs → chunk-26OKWQ4A.mjs} +7 -7
- package/dist/{chunk-O6LQDULL.mjs → chunk-32DXGO5I.mjs} +8 -8
- package/dist/{chunk-HJBIRTLF.mjs → chunk-3AO7CBZZ.mjs} +3 -3
- package/dist/{chunk-M5PVHJ2T.mjs → chunk-5RHFR3E7.mjs} +10 -10
- package/dist/{chunk-MDGPZ6PT.mjs → chunk-A5M2ER2U.mjs} +2825 -2302
- package/dist/chunk-A5M2ER2U.mjs.map +1 -0
- package/dist/{chunk-7IRISB5X.mjs → chunk-FAACGXSL.mjs} +2 -2
- package/dist/{chunk-MI623NH3.mjs → chunk-J53HT62X.mjs} +35 -16
- package/dist/{chunk-MI623NH3.mjs.map → chunk-J53HT62X.mjs.map} +1 -1
- package/dist/{chunk-ON5OXKYT.mjs → chunk-KX44YKCV.mjs} +3 -3
- package/dist/{chunk-THI4W7JV.mjs → chunk-QGHDHTJT.mjs} +3 -3
- package/dist/{chunk-ZZ23HKVT.mjs → chunk-SXIYLREM.mjs} +4 -4
- package/dist/{chunk-FXPJL27K.mjs → chunk-TZBEU4AN.mjs} +4 -4
- package/dist/{chunk-6KAXO3UV.mjs → chunk-VSNPATWP.mjs} +4 -4
- package/dist/{chunk-PT4E2OUU.mjs → chunk-WQ4VG47Y.mjs} +3 -3
- package/dist/{chunk-UHXZUMQE.mjs → chunk-XW7LPNDA.mjs} +3 -3
- package/dist/{embed-page-AgentDetailSideApp-RY4FAEAM.js → embed-page-AgentDetailSideApp-WDDE7BEH.js} +1 -1
- package/dist/{embed-page-AgentGovernanceWorkbench-UFDULZ5A.js → embed-page-AgentGovernanceWorkbench-7YPU3QB2.js} +1 -1
- package/dist/{embed-page-LangfuseDashboard-GNNJGAA2.js → embed-page-LangfuseDashboard-BEOJDMWF.js} +1 -1
- package/dist/{embed-page-MessageGraph-S7GCLNLR.js → embed-page-MessageGraph-LNNMCH6I.js} +1 -1
- package/dist/{embed-page-ReactChart-LWZPH244.js → embed-page-ReactChart-D7RZQB2H.js} +1 -1
- package/dist/{embed-page-SkillFlow-OVIGJFUH.js → embed-page-SkillFlow-3X24ILKU.js} +1 -1
- package/dist/{embed-page-TasksSideApp-AOS4MZAI.js → embed-page-TasksSideApp-KD4S22SL.js} +1 -1
- package/dist/{embed-page-ThreadMaintenancePanel-PXL2TJBO.js → embed-page-ThreadMaintenancePanel-V327PV5R.js} +1 -1
- package/dist/{embed-page-TopologyRuntimeView-GRM34Z2Z.js → embed-page-TopologyRuntimeView-Z7MY6U5T.js} +1 -1
- package/dist/{embed-page-WorkflowAutomationView-JV26AHRB.js → embed-page-WorkflowAutomationView-4MY4HG7R.js} +1 -1
- package/dist/embed-page-chunk-4XKCMM5C.js +211 -0
- package/dist/{embed-page-chunk-YCTDKWKW.js → embed-page-chunk-ASEIOK7X.js} +1 -1
- package/dist/{embed-page-chunk-6ZHR5GWS.js → embed-page-chunk-BSRASK7V.js} +6 -6
- package/dist/{embed-page-chunk-ABGWNVMG.js → embed-page-chunk-BZKAPY7M.js} +1 -1
- package/dist/embed-page-chunk-CFFDP526.js +6835 -0
- package/dist/{embed-page-chunk-5XP4FJW7.js → embed-page-chunk-EM6VGUZ2.js} +1 -1
- package/dist/{embed-page-chunk-3UK7XM33.js → embed-page-chunk-G5MXFDNZ.js} +1 -1
- package/dist/{embed-page-chunk-OQUMCCF5.js → embed-page-chunk-G5PDHDBZ.js} +1 -1
- package/dist/{embed-page-chunk-YM76GTXK.js → embed-page-chunk-HZZ5HNTF.js} +1 -1
- package/dist/{embed-page-chunk-ONXC5S22.js → embed-page-chunk-PMOGSY6W.js} +1 -1
- package/dist/{embed-page-en-G5J7KW6V.js → embed-page-en-JOTELYAL.js} +1 -1
- package/dist/{embed-page-zh-72QSTYRF.js → embed-page-zh-BPO6ZSJM.js} +1 -1
- package/dist/embed-page.js +1 -1
- package/dist/{en-4BUDQBEG.mjs → en-NBPWP767.mjs} +7 -2
- package/dist/{en-4BUDQBEG.mjs.map → en-NBPWP767.mjs.map} +1 -1
- package/dist/index.d.mts +36 -2
- package/dist/index.d.ts +36 -2
- package/dist/index.js +2291 -1733
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -14
- package/dist/web-app.js +12 -2
- package/dist/web-app.js.map +1 -1
- package/dist/web-app.mjs +2 -2
- package/dist/{zh-CRWCRGUL.mjs → zh-RL3CUJIQ.mjs} +7 -2
- package/dist/{zh-CRWCRGUL.mjs.map → zh-RL3CUJIQ.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/AgentGovernanceWorkbench-RHZHXKXL.mjs +0 -24
- package/dist/SkillFlow-ZZZGU7G5.mjs +0 -14
- package/dist/ThreadMaintenancePanel-HJQ24NMZ.mjs +0 -12
- package/dist/WorkflowAutomationView-WR4LQ7CY.mjs +0 -22
- package/dist/chunk-MDGPZ6PT.mjs.map +0 -1
- package/dist/embed-page-chunk-NNQHJZ5Q.js +0 -211
- package/dist/embed-page-chunk-SQSVDSG6.js +0 -6746
- /package/dist/{AgentDetailSideApp-PNN6EZAK.mjs.map → AgentDetailSideApp-YQS5GL7P.mjs.map} +0 -0
- /package/dist/{AgentGovernanceWorkbench-RHZHXKXL.mjs.map → AgentGovernanceWorkbench-KYHOZTRY.mjs.map} +0 -0
- /package/dist/{LangfuseDashboard-LRYMXATJ.mjs.map → LangfuseDashboard-LSPULCS3.mjs.map} +0 -0
- /package/dist/{MessageGraph-G4S25PLS.mjs.map → MessageGraph-WUWP2CE3.mjs.map} +0 -0
- /package/dist/{ReactChart-UNBTHGFX.mjs.map → ReactChart-7WQQAQ73.mjs.map} +0 -0
- /package/dist/{SkillFlow-ZZZGU7G5.mjs.map → SkillFlow-JD3N76HE.mjs.map} +0 -0
- /package/dist/{TasksSideApp-PKIA6WVE.mjs.map → TasksSideApp-IPFBRDSJ.mjs.map} +0 -0
- /package/dist/{ThreadMaintenancePanel-HJQ24NMZ.mjs.map → ThreadMaintenancePanel-7I7GQXRA.mjs.map} +0 -0
- /package/dist/{TopologyRuntimeView-EQIYLMTF.mjs.map → TopologyRuntimeView-WFMC2GME.mjs.map} +0 -0
- /package/dist/{WorkflowAutomationView-WR4LQ7CY.mjs.map → WorkflowAutomationView-CZIAN5D7.mjs.map} +0 -0
- /package/dist/{chunk-UAZQVVSC.mjs.map → chunk-26OKWQ4A.mjs.map} +0 -0
- /package/dist/{chunk-O6LQDULL.mjs.map → chunk-32DXGO5I.mjs.map} +0 -0
- /package/dist/{chunk-HJBIRTLF.mjs.map → chunk-3AO7CBZZ.mjs.map} +0 -0
- /package/dist/{chunk-M5PVHJ2T.mjs.map → chunk-5RHFR3E7.mjs.map} +0 -0
- /package/dist/{chunk-7IRISB5X.mjs.map → chunk-FAACGXSL.mjs.map} +0 -0
- /package/dist/{chunk-ON5OXKYT.mjs.map → chunk-KX44YKCV.mjs.map} +0 -0
- /package/dist/{chunk-THI4W7JV.mjs.map → chunk-QGHDHTJT.mjs.map} +0 -0
- /package/dist/{chunk-ZZ23HKVT.mjs.map → chunk-SXIYLREM.mjs.map} +0 -0
- /package/dist/{chunk-FXPJL27K.mjs.map → chunk-TZBEU4AN.mjs.map} +0 -0
- /package/dist/{chunk-6KAXO3UV.mjs.map → chunk-VSNPATWP.mjs.map} +0 -0
- /package/dist/{chunk-PT4E2OUU.mjs.map → chunk-WQ4VG47Y.mjs.map} +0 -0
- /package/dist/{chunk-UHXZUMQE.mjs.map → chunk-XW7LPNDA.mjs.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{a as ur}from"./embed-page-chunk-QV7QAJ4N.js";import{a as F}from"./embed-page-chunk-R5QL57JJ.js";import{b as cr,c as lr,d as cn,f as j}from"./embed-page-chunk-QBTAJ2YI.js";var Xr=lr(Gr=>{"use strict";var tt=F();function li(r,e){return r===e&&(r!==0||1/r===1/e)||r!==r&&e!==e}var ui=typeof Object.is=="function"?Object.is:li,di=tt.useState,fi=tt.useEffect,pi=tt.useLayoutEffect,hi=tt.useDebugValue;function mi(r,e){var t=e(),n=di({inst:{value:t,getSnapshot:e}}),s=n[0].inst,i=n[1];return pi(function(){s.value=t,s.getSnapshot=e,er(s)&&i({inst:s})},[r,t,e]),fi(function(){return er(s)&&i({inst:s}),r(function(){er(s)&&i({inst:s})})},[r]),hi(t),t}function er(r){var e=r.getSnapshot;r=r.value;try{var t=e();return!ui(r,t)}catch{return!0}}function gi(r,e){return e()}var yi=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?gi:mi;Gr.useSyncExternalStore=tt.useSyncExternalStore!==void 0?tt.useSyncExternalStore:yi});var en=lr((Eo,Qr)=>{"use strict";Qr.exports=Xr()});var ve={};cn(ve,{BRAND:()=>jn,DIRTY:()=>Ie,EMPTY_PATH:()=>fn,INVALID:()=>v,NEVER:()=>xs,OK:()=>D,ParseStatus:()=>P,Schema:()=>I,ZodAny:()=>ye,ZodArray:()=>ue,ZodBigInt:()=>we,ZodBoolean:()=>Te,ZodBranded:()=>at,ZodCatch:()=>De,ZodDate:()=>ke,ZodDefault:()=>$e,ZodDiscriminatedUnion:()=>vt,ZodEffects:()=>J,ZodEnum:()=>je,ZodError:()=>U,ZodFirstPartyTypeKind:()=>_,ZodFunction:()=>bt,ZodIntersection:()=>Ce,ZodIssueCode:()=>f,ZodLazy:()=>Ne,ZodLiteral:()=>Le,ZodMap:()=>qe,ZodNaN:()=>Ge,ZodNativeEnum:()=>Pe,ZodNever:()=>G,ZodNull:()=>Re,ZodNullable:()=>ie,ZodNumber:()=>Se,ZodObject:()=>B,ZodOptional:()=>Y,ZodParsedType:()=>m,ZodPipeline:()=>ot,ZodPromise:()=>xe,ZodReadonly:()=>Me,ZodRecord:()=>_t,ZodSchema:()=>I,ZodSet:()=>Je,ZodString:()=>ge,ZodSymbol:()=>We,ZodTransformer:()=>J,ZodTuple:()=>se,ZodType:()=>I,ZodUndefined:()=>Oe,ZodUnion:()=>Ae,ZodUnknown:()=>le,ZodVoid:()=>Ye,addIssueToContext:()=>h,any:()=>zn,array:()=>Wn,bigint:()=>Mn,boolean:()=>br,coerce:()=>ys,custom:()=>xr,date:()=>Fn,datetimeRegex:()=>gr,defaultErrorMap:()=>oe,discriminatedUnion:()=>Gn,effect:()=>ls,enum:()=>as,function:()=>ns,getErrorMap:()=>Ke,getParsedType:()=>ne,instanceof:()=>$n,intersection:()=>Xn,isAborted:()=>yt,isAsync:()=>He,isDirty:()=>xt,isValid:()=>me,late:()=>Pn,lazy:()=>ss,literal:()=>is,makeIssue:()=>it,map:()=>ts,nan:()=>Dn,nativeEnum:()=>os,never:()=>Hn,null:()=>Bn,nullable:()=>ds,number:()=>_r,object:()=>Yn,objectUtil:()=>jt,oboolean:()=>gs,onumber:()=>ms,optional:()=>us,ostring:()=>hs,pipeline:()=>ps,preprocess:()=>fs,promise:()=>cs,quotelessJson:()=>ln,record:()=>es,set:()=>rs,setErrorMap:()=>dn,strictObject:()=>qn,string:()=>vr,symbol:()=>Vn,transformer:()=>ls,tuple:()=>Qn,undefined:()=>Un,union:()=>Jn,unknown:()=>Kn,util:()=>w,void:()=>Zn});var w;(function(r){r.assertEqual=s=>{};function e(s){}r.assertIs=e;function t(s){throw new Error}r.assertNever=t,r.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},r.getValidEnumValues=s=>{let i=r.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of i)o[a]=s[a];return r.objectValues(o)},r.objectValues=s=>r.objectKeys(s).map(function(i){return s[i]}),r.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},r.find=(s,i)=>{for(let o of s)if(i(o))return o},r.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}r.joinValues=n,r.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(w||(w={}));var jt;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(jt||(jt={}));var m=w.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ne=r=>{switch(typeof r){case"undefined":return m.undefined;case"string":return m.string;case"number":return Number.isNaN(r)?m.nan:m.number;case"boolean":return m.boolean;case"function":return m.function;case"bigint":return m.bigint;case"symbol":return m.symbol;case"object":return Array.isArray(r)?m.array:r===null?m.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?m.promise:typeof Map<"u"&&r instanceof Map?m.map:typeof Set<"u"&&r instanceof Set?m.set:typeof Date<"u"&&r instanceof Date?m.date:m.object;default:return m.unknown}};var f=w.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ln=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:"),U=class r extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(i){return i.message},n={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let a=n,l=0;for(;l<o.path.length;){let c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(t(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),n}static assert(e){if(!(e instanceof r))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,w.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];t[i]=t[i]||[],t[i].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};U.create=r=>new U(r);var un=(r,e)=>{let t;switch(r.code){case f.invalid_type:r.received===m.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case f.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,w.jsonStringifyReplacer)}`;break;case f.unrecognized_keys:t=`Unrecognized key(s) in object: ${w.joinValues(r.keys,", ")}`;break;case f.invalid_union:t="Invalid input";break;case f.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${w.joinValues(r.options)}`;break;case f.invalid_enum_value:t=`Invalid enum value. Expected ${w.joinValues(r.options)}, received '${r.received}'`;break;case f.invalid_arguments:t="Invalid function arguments";break;case f.invalid_return_type:t="Invalid function return type";break;case f.invalid_date:t="Invalid date";break;case f.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:w.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case f.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case f.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case f.custom:t="Invalid input";break;case f.invalid_intersection_types:t="Intersection results could not be merged";break;case f.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case f.not_finite:t="Number must be finite";break;default:t=e.defaultError,w.assertNever(r)}return{message:t}},oe=un;var dr=oe;function dn(r){dr=r}function Ke(){return dr}var it=r=>{let{data:e,path:t,errorMaps:n,issueData:s}=r,i=[...t,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",l=n.filter(c=>!!c).slice().reverse();for(let c of l)a=c(o,{data:e,defaultError:a}).message;return{...s,path:i,message:a}},fn=[];function h(r,e){let t=Ke(),n=it({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===oe?void 0:oe].filter(s=>!!s)});r.common.issues.push(n)}var P=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let s of t){if(s.status==="aborted")return v;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let s of t){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return r.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let s of t){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return v;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}},v=Object.freeze({status:"aborted"}),Ie=r=>({status:"dirty",value:r}),D=r=>({status:"valid",value:r}),yt=r=>r.status==="aborted",xt=r=>r.status==="dirty",me=r=>r.status==="valid",He=r=>typeof Promise<"u"&&r instanceof Promise;var g;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(g||(g={}));var q=class{constructor(e,t,n,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},fr=(r,e)=>{if(me(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new U(r.common.issues);return this._error=t,this._error}}};function E(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:n,description:s}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>{let{message:l}=r;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??t??a.defaultError}},description:s}}var I=class{get description(){return this._def.description}_getType(e){return ne(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ne(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new P,ctx:{common:e.parent.common,data:e.data,parsedType:ne(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(He(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ne(e)},s=this._parseSync({data:e,path:n.path,parent:n});return fr(n,s)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ne(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:t});return me(n)?{value:n.value}:{issues:t.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>me(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ne(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(He(s)?s:Promise.resolve(s));return fr(n,i)}refine(e,t){let n=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,i)=>{let o=e(s),a=()=>i.addIssue({code:f.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof t=="function"?t(n,s):t),!1))}_refinement(e){return new J({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return Y.create(this,this._def)}nullable(){return ie.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ue.create(this)}promise(){return xe.create(this,this._def)}or(e){return Ae.create([this,e],this._def)}and(e){return Ce.create(this,e,this._def)}transform(e){return new J({...E(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new $e({...E(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new at({typeName:_.ZodBranded,type:this,...E(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new De({...E(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ot.create(this,e)}readonly(){return Me.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},pn=/^c[^\s-]{8,}$/i,hn=/^[0-9a-z]+$/,mn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,gn=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,yn=/^[a-z0-9_-]{21}$/i,xn=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vn=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_n=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Pt,En=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,In=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Sn=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,wn=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Tn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kn=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,hr="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",On=new RegExp(`^${hr}$`);function mr(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);let t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Rn(r){return new RegExp(`^${mr(r)}$`)}function gr(r){let e=`${hr}T${mr(r)}`,t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function An(r,e){return!!((e==="v4"||!e)&&En.test(r)||(e==="v6"||!e)&&Sn.test(r))}function Cn(r,e){if(!xn.test(r))return!1;try{let[t]=r.split(".");if(!t)return!1;let n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function Nn(r,e){return!!((e==="v4"||!e)&&In.test(r)||(e==="v6"||!e)&&wn.test(r))}var ge=class r extends I{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==m.string){let i=this._getOrReturnCtx(e);return h(i,{code:f.invalid_type,expected:m.string,received:i.parsedType}),v}let n=new P,s;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),h(s,{code:f.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),h(s,{code:f.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?h(s,{code:f.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&h(s,{code:f.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")_n.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"email",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Pt||(Pt=new RegExp(bn,"u")),Pt.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"emoji",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")gn.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"uuid",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")yn.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"nanoid",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")pn.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"cuid",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")hn.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"cuid2",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")mn.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"ulid",code:f.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),h(s,{validation:"url",code:f.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"regex",code:f.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?gr(i).test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?On.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?Rn(i).test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?vn.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"duration",code:f.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?An(e.data,i.version)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"ip",code:f.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?Cn(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"jwt",code:f.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?Nn(e.data,i.version)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"cidr",code:f.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Tn.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"base64",code:f.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?kn.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"base64url",code:f.invalid_string,message:i.message}),n.dirty()):w.assertNever(i);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(s=>e.test(s),{validation:t,code:f.invalid_string,...g.errToObj(n)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...g.errToObj(e)})}url(e){return this._addCheck({kind:"url",...g.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...g.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...g.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...g.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...g.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...g.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...g.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...g.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...g.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...g.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...g.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...g.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...g.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...g.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...g.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...g.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...g.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...g.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...g.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...g.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...g.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...g.errToObj(t)})}nonempty(e){return this.min(1,g.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};ge.create=r=>new ge({checks:[],typeName:_.ZodString,coerce:r?.coerce??!1,...E(r)});function Ln(r,e){let t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=t>n?t:n,i=Number.parseInt(r.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return i%o/10**s}var Se=class r extends I{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==m.number){let i=this._getOrReturnCtx(e);return h(i,{code:f.invalid_type,expected:m.number,received:i.parsedType}),v}let n,s=new P;for(let i of this._def.checks)i.kind==="int"?w.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:f.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?Ln(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:f.not_finite,message:i.message}),s.dirty()):w.assertNever(i);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,n,s){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:g.toString(s)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:g.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:g.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:g.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:g.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&w.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}};Se.create=r=>new Se({checks:[],typeName:_.ZodNumber,coerce:r?.coerce||!1,...E(r)});var we=class r extends I{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==m.bigint)return this._getInvalidInput(e);let n,s=new P;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):w.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return h(t,{code:f.invalid_type,expected:m.bigint,received:t.parsedType}),v}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,n,s){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:g.toString(s)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};we.create=r=>new we({checks:[],typeName:_.ZodBigInt,coerce:r?.coerce??!1,...E(r)});var Te=class extends I{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==m.boolean){let n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:m.boolean,received:n.parsedType}),v}return D(e.data)}};Te.create=r=>new Te({typeName:_.ZodBoolean,coerce:r?.coerce||!1,...E(r)});var ke=class r extends I{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==m.date){let i=this._getOrReturnCtx(e);return h(i,{code:f.invalid_type,expected:m.date,received:i.parsedType}),v}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return h(i,{code:f.invalid_date}),v}let n=new P,s;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),h(s,{code:f.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),h(s,{code:f.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):w.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:g.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:g.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};ke.create=r=>new ke({checks:[],coerce:r?.coerce||!1,typeName:_.ZodDate,...E(r)});var We=class extends I{_parse(e){if(this._getType(e)!==m.symbol){let n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:m.symbol,received:n.parsedType}),v}return D(e.data)}};We.create=r=>new We({typeName:_.ZodSymbol,...E(r)});var Oe=class extends I{_parse(e){if(this._getType(e)!==m.undefined){let n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:m.undefined,received:n.parsedType}),v}return D(e.data)}};Oe.create=r=>new Oe({typeName:_.ZodUndefined,...E(r)});var Re=class extends I{_parse(e){if(this._getType(e)!==m.null){let n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:m.null,received:n.parsedType}),v}return D(e.data)}};Re.create=r=>new Re({typeName:_.ZodNull,...E(r)});var ye=class extends I{constructor(){super(...arguments),this._any=!0}_parse(e){return D(e.data)}};ye.create=r=>new ye({typeName:_.ZodAny,...E(r)});var le=class extends I{constructor(){super(...arguments),this._unknown=!0}_parse(e){return D(e.data)}};le.create=r=>new le({typeName:_.ZodUnknown,...E(r)});var G=class extends I{_parse(e){let t=this._getOrReturnCtx(e);return h(t,{code:f.invalid_type,expected:m.never,received:t.parsedType}),v}};G.create=r=>new G({typeName:_.ZodNever,...E(r)});var Ye=class extends I{_parse(e){if(this._getType(e)!==m.undefined){let n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:m.void,received:n.parsedType}),v}return D(e.data)}};Ye.create=r=>new Ye({typeName:_.ZodVoid,...E(r)});var ue=class r extends I{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),s=this._def;if(t.parsedType!==m.array)return h(t,{code:f.invalid_type,expected:m.array,received:t.parsedType}),v;if(s.exactLength!==null){let o=t.data.length>s.exactLength.value,a=t.data.length<s.exactLength.value;(o||a)&&(h(t,{code:o?f.too_big:f.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&t.data.length<s.minLength.value&&(h(t,{code:f.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&t.data.length>s.maxLength.value&&(h(t,{code:f.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,a)=>s.type._parseAsync(new q(t,o,t.path,a)))).then(o=>P.mergeArray(n,o));let i=[...t.data].map((o,a)=>s.type._parseSync(new q(t,o,t.path,a)));return P.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:g.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:g.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:g.toString(t)}})}nonempty(e){return this.min(1,e)}};ue.create=(r,e)=>new ue({type:r,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...E(e)});function Ze(r){if(r instanceof B){let e={};for(let t in r.shape){let n=r.shape[t];e[t]=Y.create(Ze(n))}return new B({...r._def,shape:()=>e})}else return r instanceof ue?new ue({...r._def,type:Ze(r.element)}):r instanceof Y?Y.create(Ze(r.unwrap())):r instanceof ie?ie.create(Ze(r.unwrap())):r instanceof se?se.create(r.items.map(e=>Ze(e))):r}var B=class r extends I{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=w.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==m.object){let c=this._getOrReturnCtx(e);return h(c,{code:f.invalid_type,expected:m.object,received:c.parsedType}),v}let{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof G&&this._def.unknownKeys==="strip"))for(let c in s.data)o.includes(c)||a.push(c);let l=[];for(let c of o){let u=i[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new q(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof G){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")a.length>0&&(h(s,{code:f.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of a){let d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new q(s,d,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of l){let d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>P.mergeObjectSync(n,c)):P.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return g.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{let s=this._def.errorMap?.(t,n).message??n.defaultError;return t.code==="unrecognized_keys"?{message:g.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};for(let n of w.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new r({...this._def,shape:()=>t})}omit(e){let t={};for(let n of w.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new r({...this._def,shape:()=>t})}deepPartial(){return Ze(this)}partial(e){let t={};for(let n of w.objectKeys(this.shape)){let s=this.shape[n];e&&!e[n]?t[n]=s:t[n]=s.optional()}return new r({...this._def,shape:()=>t})}required(e){let t={};for(let n of w.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Y;)i=i._def.innerType;t[n]=i}return new r({...this._def,shape:()=>t})}keyof(){return yr(w.objectKeys(this.shape))}};B.create=(r,e)=>new B({shape:()=>r,unknownKeys:"strip",catchall:G.create(),typeName:_.ZodObject,...E(e)});B.strictCreate=(r,e)=>new B({shape:()=>r,unknownKeys:"strict",catchall:G.create(),typeName:_.ZodObject,...E(e)});B.lazycreate=(r,e)=>new B({shape:r,unknownKeys:"strip",catchall:G.create(),typeName:_.ZodObject,...E(e)});var Ae=class extends I{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function s(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return t.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new U(a.ctx.common.issues));return h(t,{code:f.invalid_union,unionErrors:o}),v}if(t.common.async)return Promise.all(n.map(async i=>{let o={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let l of n){let c={...t,common:{...t.common,issues:[]},parent:null},u=l._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(l=>new U(l));return h(t,{code:f.invalid_union,unionErrors:a}),v}}get options(){return this._def.options}};Ae.create=(r,e)=>new Ae({options:r,typeName:_.ZodUnion,...E(e)});var ce=r=>r instanceof Ne?ce(r.schema):r instanceof J?ce(r.innerType()):r instanceof Le?[r.value]:r instanceof je?r.options:r instanceof Pe?w.objectValues(r.enum):r instanceof $e?ce(r._def.innerType):r instanceof Oe?[void 0]:r instanceof Re?[null]:r instanceof Y?[void 0,...ce(r.unwrap())]:r instanceof ie?[null,...ce(r.unwrap())]:r instanceof at||r instanceof Me?ce(r.unwrap()):r instanceof De?ce(r._def.innerType):[],vt=class r extends I{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==m.object)return h(t,{code:f.invalid_type,expected:m.object,received:t.parsedType}),v;let n=this.discriminator,s=t.data[n],i=this.optionsMap.get(s);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:f.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),v)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let s=new Map;for(let i of t){let o=ce(i.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(s.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);s.set(a,i)}}return new r({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...E(n)})}};function $t(r,e){let t=ne(r),n=ne(e);if(r===e)return{valid:!0,data:r};if(t===m.object&&n===m.object){let s=w.objectKeys(e),i=w.objectKeys(r).filter(a=>s.indexOf(a)!==-1),o={...r,...e};for(let a of i){let l=$t(r[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(t===m.array&&n===m.array){if(r.length!==e.length)return{valid:!1};let s=[];for(let i=0;i<r.length;i++){let o=r[i],a=e[i],l=$t(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return t===m.date&&n===m.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var Ce=class extends I{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),s=(i,o)=>{if(yt(i)||yt(o))return v;let a=$t(i.value,o.value);return a.valid?((xt(i)||xt(o))&&t.dirty(),{status:t.value,value:a.data}):(h(n,{code:f.invalid_intersection_types}),v)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Ce.create=(r,e,t)=>new Ce({left:r,right:e,typeName:_.ZodIntersection,...E(t)});var se=class r extends I{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.array)return h(n,{code:f.invalid_type,expected:m.array,received:n.parsedType}),v;if(n.data.length<this._def.items.length)return h(n,{code:f.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&n.data.length>this._def.items.length&&(h(n,{code:f.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let i=[...n.data].map((o,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new q(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>P.mergeArray(t,o)):P.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};se.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new se({items:r,typeName:_.ZodTuple,rest:null,...E(e)})};var _t=class r extends I{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.object)return h(n,{code:f.invalid_type,expected:m.object,received:n.parsedType}),v;let s=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new q(n,a,n.path,a)),value:o._parse(new q(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?P.mergeObjectAsync(t,s):P.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof I?new r({keyType:e,valueType:t,typeName:_.ZodRecord,...E(n)}):new r({keyType:ge.create(),valueType:e,typeName:_.ZodRecord,...E(t)})}},qe=class extends I{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.map)return h(n,{code:f.invalid_type,expected:m.map,received:n.parsedType}),v;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,l],c)=>({key:s._parse(new q(n,a,n.path,[c,"key"])),value:i._parse(new q(n,l,n.path,[c,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of o){let c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return v;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),a.set(c.value,u.value)}return{status:t.value,value:a}})}else{let a=new Map;for(let l of o){let c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return v;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),a.set(c.value,u.value)}return{status:t.value,value:a}}}};qe.create=(r,e,t)=>new qe({valueType:e,keyType:r,typeName:_.ZodMap,...E(t)});var Je=class r extends I{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.set)return h(n,{code:f.invalid_type,expected:m.set,received:n.parsedType}),v;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(h(n,{code:f.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(h(n,{code:f.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());let i=this._def.valueType;function o(l){let c=new Set;for(let u of l){if(u.status==="aborted")return v;u.status==="dirty"&&t.dirty(),c.add(u.value)}return{status:t.value,value:c}}let a=[...n.data.values()].map((l,c)=>i._parse(new q(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,t){return new r({...this._def,minSize:{value:e,message:g.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:g.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Je.create=(r,e)=>new Je({valueType:r,minSize:null,maxSize:null,typeName:_.ZodSet,...E(e)});var bt=class r extends I{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==m.function)return h(t,{code:f.invalid_type,expected:m.function,received:t.parsedType}),v;function n(a,l){return it({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ke(),oe].filter(c=>!!c),issueData:{code:f.invalid_arguments,argumentsError:l}})}function s(a,l){return it({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ke(),oe].filter(c=>!!c),issueData:{code:f.invalid_return_type,returnTypeError:l}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof xe){let a=this;return D(async function(...l){let c=new U([]),u=await a._def.args.parseAsync(l,i).catch(y=>{throw c.addIssue(n(l,y)),c}),d=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(y=>{throw c.addIssue(s(d,y)),c})})}else{let a=this;return D(function(...l){let c=a._def.args.safeParse(l,i);if(!c.success)throw new U([n(l,c.error)]);let u=Reflect.apply(o,this,c.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new U([s(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:se.create(e).rest(le.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new r({args:e||se.create([]).rest(le.create()),returns:t||le.create(),typeName:_.ZodFunction,...E(n)})}},Ne=class extends I{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Ne.create=(r,e)=>new Ne({getter:r,typeName:_.ZodLazy,...E(e)});var Le=class extends I{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:f.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}};Le.create=(r,e)=>new Le({value:r,typeName:_.ZodLiteral,...E(e)});function yr(r,e){return new je({values:r,typeName:_.ZodEnum,...E(e)})}var je=class r extends I{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{expected:w.joinValues(n),received:t.parsedType,code:f.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{received:t.data,code:f.invalid_enum_value,options:n}),v}return D(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return r.create(e,{...this._def,...t})}exclude(e,t=this._def){return r.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}};je.create=yr;var Pe=class extends I{_parse(e){let t=w.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==m.string&&n.parsedType!==m.number){let s=w.objectValues(t);return h(n,{expected:w.joinValues(s),received:n.parsedType,code:f.invalid_type}),v}if(this._cache||(this._cache=new Set(w.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let s=w.objectValues(t);return h(n,{received:n.data,code:f.invalid_enum_value,options:s}),v}return D(e.data)}get enum(){return this._def.values}};Pe.create=(r,e)=>new Pe({values:r,typeName:_.ZodNativeEnum,...E(e)});var xe=class extends I{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==m.promise&&t.common.async===!1)return h(t,{code:f.invalid_type,expected:m.promise,received:t.parsedType}),v;let n=t.parsedType===m.promise?t.data:Promise.resolve(t.data);return D(n.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}};xe.create=(r,e)=>new xe({type:r,typeName:_.ZodPromise,...E(e)});var J=class extends I{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{h(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(t.value==="aborted")return v;let l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?v:l.status==="dirty"?Ie(l.value):t.value==="dirty"?Ie(l.value):l});{if(t.value==="aborted")return v;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?v:a.status==="dirty"?Ie(a.value):t.value==="dirty"?Ie(a.value):a}}if(s.type==="refinement"){let o=a=>{let l=s.refinement(a,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?v:(a.status==="dirty"&&t.dirty(),o(a.value),{status:t.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?v:(a.status==="dirty"&&t.dirty(),o(a.value).then(()=>({status:t.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!me(o))return v;let a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>me(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:t.value,value:a})):v);w.assertNever(s)}};J.create=(r,e,t)=>new J({schema:r,typeName:_.ZodEffects,effect:e,...E(t)});J.createWithPreprocess=(r,e,t)=>new J({schema:e,effect:{type:"preprocess",transform:r},typeName:_.ZodEffects,...E(t)});var Y=class extends I{_parse(e){return this._getType(e)===m.undefined?D(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Y.create=(r,e)=>new Y({innerType:r,typeName:_.ZodOptional,...E(e)});var ie=class extends I{_parse(e){return this._getType(e)===m.null?D(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ie.create=(r,e)=>new ie({innerType:r,typeName:_.ZodNullable,...E(e)});var $e=class extends I{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===m.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};$e.create=(r,e)=>new $e({innerType:r,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...E(e)});var De=class extends I{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return He(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new U(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new U(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};De.create=(r,e)=>new De({innerType:r,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...E(e)});var Ge=class extends I{_parse(e){if(this._getType(e)!==m.nan){let n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:m.nan,received:n.parsedType}),v}return{status:"valid",value:e.data}}};Ge.create=r=>new Ge({typeName:_.ZodNaN,...E(r)});var jn=Symbol("zod_brand"),at=class extends I{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},ot=class r extends I{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?v:i.status==="dirty"?(t.dirty(),Ie(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?v:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,t){return new r({in:e,out:t,typeName:_.ZodPipeline})}},Me=class extends I{_parse(e){let t=this._def.innerType._parse(e),n=s=>(me(s)&&(s.value=Object.freeze(s.value)),s);return He(t)?t.then(s=>n(s)):n(t)}unwrap(){return this._def.innerType}};Me.create=(r,e)=>new Me({innerType:r,typeName:_.ZodReadonly,...E(e)});function pr(r,e){let t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function xr(r,e={},t){return r?ye.create().superRefine((n,s)=>{let i=r(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=pr(e,n),l=a.fatal??t??!0;s.addIssue({code:"custom",...a,fatal:l})}});if(!i){let o=pr(e,n),a=o.fatal??t??!0;s.addIssue({code:"custom",...o,fatal:a})}}):ye.create()}var Pn={object:B.lazycreate},_;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(_||(_={}));var $n=(r,e={message:`Input not instance of ${r.name}`})=>xr(t=>t instanceof r,e),vr=ge.create,_r=Se.create,Dn=Ge.create,Mn=we.create,br=Te.create,Fn=ke.create,Vn=We.create,Un=Oe.create,Bn=Re.create,zn=ye.create,Kn=le.create,Hn=G.create,Zn=Ye.create,Wn=ue.create,Yn=B.create,qn=B.strictCreate,Jn=Ae.create,Gn=vt.create,Xn=Ce.create,Qn=se.create,es=_t.create,ts=qe.create,rs=Je.create,ns=bt.create,ss=Ne.create,is=Le.create,as=je.create,os=Pe.create,cs=xe.create,ls=J.create,us=Y.create,ds=ie.create,fs=J.createWithPreprocess,ps=ot.create,hs=()=>vr().optional(),ms=()=>_r().optional(),gs=()=>br().optional(),ys={string:(r=>ge.create({...r,coerce:!0})),number:(r=>Se.create({...r,coerce:!0})),boolean:(r=>Te.create({...r,coerce:!0})),bigint:(r=>we.create({...r,coerce:!0})),date:(r=>ke.create({...r,coerce:!0}))};var xs=v;var Xe={HUMAN:"human",AI:"ai",TOOL:"tool",INTERRUPT:"interrupt",ERROR:"error",MESSAGE_COMPLETED:"message_completed",MESSAGE_FAILED:"message_failed",THREAD_IDLE:"thread_idle"};var na="workspace_public_";function sa(r){let e=r.indexOf("/");return e<=0||e===r.length-1?null:{providerId:r.slice(0,e),modelId:r.slice(e+1)}}var vs="^execution-result:[A-Za-z0-9._:-]+$",ia=new RegExp(vs);var _s="## Belief State";var Dt=["Belief Key","Probability","Target","Basis"],bs=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,Es=/^(?:100|[0-9]{1,2})%$/;function wr(r){let e=[],t=0,n;for(;t<=r.length;){let s=r.indexOf(`
|
|
2
|
-
`,t),i=s===-1?r.length:s+1,o=s===-1?r.length:s,a=r.slice(t,o),l=a.endsWith("\r")?a.slice(0,-1):a,c=l.match(/^ {0,3}(`{3,}|~{3,})/),u=n!==void 0;if(!n&&c?n={marker:c[1][0],length:c[1].length}:n&&new RegExp(`^ {0,3}\\${n.marker}{${n.length},}[ \\t]*$`).test(l)&&(n=void 0),e.push({text:l,start:t,end:i,fenced:u||c!==null,lineNumber:e.length+1}),s===-1)break;t=i}return e}function Is(r,e){let t=wr(r),n=[];for(let s=0;s<t.length;s+=1){let i=t[s];if(i.fenced||i.text.trimEnd().replace(/^ {0,3}/,"")!==e)continue;let o=r.length;for(let a=s+1;a<t.length;a+=1)if(!t[a].fenced&&/^ {0,3}#{1,2}(?:[ \t]+|$)/.test(t[a].text)){o=t[a].start;break}n.push({headingLine:s,start:i.start,end:o})}return n}function Mt(r){let e=r.trim(),t=e.length-1;if(!e.startsWith("|")||!e.endsWith("|")||Ir(e,t))return;let n=[],s="";for(let i=1;i<e.length-1;i+=1){let o=e[i];o==="|"&&Ir(e,i)?s+=o:o==="|"?(n.push(Er(s.trim())),s=""):s+=o}return n.push(Er(s.trim())),n}function Er(r){let e="";for(let t=0;t<r.length;t+=1)r[t]==="\\"&&(r[t+1]==="\\"||r[t+1]==="|")&&(t+=1),e+=r[t];return e}function Ir(r,e){let t=0;for(let n=e-1;n>=0&&r[n]==="\\";n-=1)t+=1;return t%2===1}function Fe(r,e,t={}){return{success:!1,code:r,message:e,...t}}function aa(r){let e=Is(r,_s);if(e.length===0)return Fe("MISSING_BELIEF_STATE","Markdown does not contain a Belief State section.");if(e.length>1)return Fe("DUPLICATE_BELIEF_STATE","Markdown contains more than one Belief State section.");let t=wr(r),n=e[0],s=t.slice(n.headingLine+1).filter(c=>c.start<n.end&&c.text.trim()!==""),i=s[0]&&Mt(s[0].text),o=s[1]&&Mt(s[1].text);if(!i||i.length!==Dt.length||i.some((c,u)=>c!==Dt[u])||!o||o.length!==Dt.length||o.some(c=>!/^:?-{3,}:?$/.test(c)))return Fe("INVALID_BELIEF_HEADERS","Belief State must use the canonical four-column headers.");let a=[],l=new Set;for(let c of s.slice(2)){let u=Mt(c.text);if(!u||u.length!==4||u[3].length===0)return Fe("MALFORMED_BELIEF_ROW","Belief State contains a malformed row.",{line:c.lineNumber});let d=u[0].match(/^`([^`]+)`$/);if(!d||!bs.test(d[1]))return Fe("INVALID_BELIEF_KEY","Belief keys must be backtick-wrapped kebab-case.",{line:c.lineNumber});let p=d[1];if(l.has(p))return Fe("DUPLICATE_BELIEF_KEY",`Belief key '${p}' appears more than once.`,{line:c.lineNumber,key:p});for(let[y,x]of[[1,"probability"],[2,"target"]])if(!Es.test(u[y]))return Fe("INVALID_BELIEF_PERCENT",`Belief ${x} must be an integer from 0% to 100%.`,{line:c.lineNumber,column:x});l.add(p),a.push({key:p,probability:Number.parseInt(u[1],10),target:Number.parseInt(u[2],10),basis:u[3]})}return{success:!0,state:{entries:a}}}var Ss=2e3,ws=12,Ts=100;function ks(r){if(!Os(r,["type","widget"])||r.type!=="widget"||!Tr(r.widget))return;let e=r.widget;if(e.kind==="callout")return!Sr(e,["kind","text"],["title","tone"])||!ct(e.text)||e.title!==void 0&&!ct(e.title)||e.tone!==void 0&&e.tone!=="info"&&e.tone!=="success"&&e.tone!=="warning"?void 0:{type:"widget",widget:{kind:"callout",text:e.text,...typeof e.title=="string"?{title:e.title}:{},...e.tone?{tone:e.tone}:{}}};if(e.kind==="table"){if(!Sr(e,["kind","columns","rows"],["caption"])||!Array.isArray(e.columns)||!Array.isArray(e.rows))return;let t=e.columns,n=e.rows;return t.length===0||t.length>ws||!t.every(ct)||n.length>Ts||!n.every(s=>Array.isArray(s)&&s.length===t.length&&s.every(ct))||e.caption!==void 0&&!ct(e.caption)?void 0:{type:"widget",widget:{kind:"table",columns:[...t],rows:n.map(s=>[...s]),...typeof e.caption=="string"?{caption:e.caption}:{}}}}}function ct(r){return typeof r=="string"&&r.length<=Ss}function Tr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Os(r,e){return Tr(r)&&Object.keys(r).length===e.length&&e.every(t=>t in r)}function Sr(r,e,t){let n=Object.keys(r);return e.every(s=>s in r)&&n.every(s=>e.includes(s)||t.includes(s))}function oa(r={}){return{startedToolIds:new Set,allowInterrupts:r.allowInterrupts??!0,allowGenUI:r.allowGenUI??!1}}function ca(r,e){if(r.type===Xe.AI){let t=[],n=e?.startedToolIds??new Set;if(typeof r.data.content=="string"&&r.data.content&&t.push({type:"message.delta",text:r.data.content}),e?.allowGenUI&&Array.isArray(r.data.content))for(let s of r.data.content){let i=ks(s);i&&t.push({type:"genui.render",block:i})}for(let s of r.data.tool_call_chunks??[])s.id&&s.name&&!n.has(s.id)&&(n.add(s.id),t.push({type:"tool.started",id:s.id,name:s.name}));for(let s of r.data.tool_calls??[])n.has(s.id)||(n.add(s.id),t.push({type:"tool.started",id:s.id,name:s.name}));return t}if(r.type===Xe.TOOL&&r.data.tool_call_id)return[{type:"tool.completed",id:r.data.tool_call_id}];if(r.type===Xe.INTERRUPT){if(e&&!e.allowInterrupts)return[{type:"stream.completed"}];let t=Rs(r);return t?[{type:"interrupt.created",interrupt:t},{type:"stream.completed"}]:[{type:"stream.completed"}]}if(r.type===Xe.MESSAGE_COMPLETED)return[{type:"message.completed",messageId:r.data.id},{type:"stream.completed"}];if(r.type===Xe.ERROR){let t=typeof r.data.code=="string"?r.data.code:"stream_error";return t==="aborted"||t==="superseded"?[{type:"stream.completed"}]:[{type:"error",error:{code:"STREAM_FAILED",message:typeof r.data.content=="string"&&r.data.content?r.data.content:"Stream failed",retryable:!1}},{type:"stream.completed"}]}return r.type===Xe.MESSAGE_FAILED?[{type:"error",error:{code:"STREAM_FAILED",message:"Stream failed",retryable:!0}},{type:"stream.completed"}]:[]}function Rs(r){let e=As(r.data.content);if(!e)return;let t=r.id,n=typeof t=="string"?t:r.data.id;if(n)return{id:n,type:typeof e.type=="string"?e.type:"input",prompt:typeof e.prompt=="string"?e.prompt:typeof e.message=="string"?e.message:"Input required",...Ft(e.data)?{data:e.data}:{}}}function As(r){if(!r)return{};if(Ft(r))return r;if(typeof r=="string")try{let e=JSON.parse(r);return Ft(e)?e:{prompt:r}}catch{return{prompt:r}}}function Ft(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}var Cs=64*1024,Z=ve.string().min(1).max(Cs),Ns=["abort","a2a.cancel","shutdown"],ua=ve.object({commandId:Z,tenantId:Z,assistantId:Z,threadId:Z,runId:Z,reason:ve.enum(Ns),createdAt:Z}).strict(),da=ve.object({tenantId:Z,assistantId:Z,threadId:Z,interruptId:Z}).strict(),fa=ve.object({taskId:Z,lastEventId:Z,updatedAt:Z}).strict(),Ls="x-axiom-affinity";function pa(r){return r?{[Ls]:r}:{}}var js=["inline","fullscreen","pip"],Ps=4096,$s=r=>typeof r=="object"&&r!==null;function ha(r){if(!$s(r))return null;let e=js.includes(r.displayMode)?r.displayMode:"inline",t=typeof r.title=="string"?r.title:void 0;if(r.kind==="mcp"&&typeof r.serverKey=="string"&&typeof r.resourceUri=="string")return{kind:"mcp",serverKey:r.serverKey,resourceUri:r.resourceUri,displayMode:e,...t?{title:t}:{},...r.structuredContent!==void 0?{structuredContent:r.structuredContent}:{}};if(r.kind==="plugin"&&typeof r.pluginType=="string"&&typeof r.resource=="string"){let n=typeof r.scope=="string"&&r.scope.length>0&&r.scope.length<=Ps?r.scope:void 0;return{kind:"plugin",pluginType:r.pluginType,resource:r.resource,displayMode:e,...t?{title:t}:{},...n?{scope:n}:{}}}return null}var ma=3;var sn=j(F());var ai=j(F(),1);var pt=j(F(),1);var b=r=>typeof r=="string",lt=()=>{let r,e,t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},Vt=r=>r==null?"":String(r),Ds=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},Ms=/###/g,kr=r=>r&&r.includes("###")?r.replace(Ms,"."):r,Or=r=>!r||b(r),ut=(r,e,t)=>{let n=b(e)?e.split("."):e,s=0;for(;s<n.length-1;){if(Or(r))return{};let i=kr(n[s]);!r[i]&&t&&(r[i]=new t),Object.prototype.hasOwnProperty.call(r,i)?r=r[i]:r={},++s}return Or(r)?{}:{obj:r,k:kr(n[s])}},Rr=(r,e,t)=>{let{obj:n,k:s}=ut(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=ut(r,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=ut(r,o,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=t},Fs=(r,e,t,n)=>{let{obj:s,k:i}=ut(r,e,Object);s[i]=s[i]||[],s[i].push(t)},It=(r,e)=>{let{obj:t,k:n}=ut(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},Vs=(r,e,t)=>{let n=It(r,t);return n!==void 0?n:It(e,t)},$r=(r,e,t)=>{for(let n in e)n!=="__proto__"&&n!=="constructor"&&(Object.prototype.hasOwnProperty.call(r,n)?b(r[n])||r[n]instanceof String||b(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):$r(r[n],e[n],t):r[n]=e[n]);return r},de=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Us={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Bs=r=>b(r)?r.replace(/[&<>"'\/]/g,e=>Us[e]):r,zt=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},zs=[" ",",","?","!",";"],Ks=new zt(20),Hs=(r,e,t)=>{e=e||"",t=t||"";let n=zs.filter(o=>!e.includes(o)&&!t.includes(o));if(n.length===0)return!0;let s=Ks.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`),i=!s.test(r);if(!i){let o=r.indexOf(t);o>0&&!s.test(r.substring(0,o))&&(i=!0)}return i},Kt=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;let n=e.split(t),s=r;for(let i=0;i<n.length;){if(!s||typeof s!="object")return;let o,a="";for(let l=i;l<n.length;++l)if(l!==i&&(a+=t),a+=n[l],o=s[a],o!==void 0){if(["string","number","boolean"].includes(typeof o)&&l<n.length-1)continue;i+=l-i+1;break}s=o}return s},dt=r=>r?.replace(/_/g,"-"),Zs={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){console?.[r]?.apply?.(console,e)}},Ht=class r{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Zs,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,n,s){return s&&!this.debug?null:(e=e.map(i=>b(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),b(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new r(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new r(this.logger,e)}},ae=new Ht,Qe=class{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);let s=this.observers[n].get(t)||0;this.observers[n].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...s)=>{t(...s),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s(e,...t)})}},St=class extends Qe{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.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,n,s={}){let i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,a;e.includes(".")?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):b(n)&&i?a.push(...n.split(i)):a.push(n)));let l=It(this.data,a);return!l&&!t&&!n&&e.includes(".")&&(e=a[0],t=a[1],n=a.slice(2).join(".")),l||!o||!b(n)?l:Kt(this.data?.[e]?.[t],n,i)}addResource(e,t,n,s,i={silent:!1}){let o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.includes(".")&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),Rr(this.data,a,s),i.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(let i in n)(b(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,i,o={silent:!1,skipCopy:!1}){let a=[e,t];e.includes(".")&&(a=e.split("."),s=n,n=t,t=a[1]),this.addNamespaces(t);let l=It(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?$r(l,n,i):l={...l,...n},Rr(this.data,a,l),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}},Dr={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(i=>{e=this.processors[i]?.process(e,t,n,s)??e}),e}},Mr=Symbol("i18next/PATH_KEY");function Ws(){let r=[],e=Object.create(null),t;return e.get=(n,s)=>(t?.revoke?.(),s===Mr?r:(r.push(s),t=Proxy.revocable(n,e),t.proxy)),Proxy.revocable(Object.create(null),e).proxy}function Ve(r,e){let{[Mr]:t}=r(Ws()),n=e?.keySeparator??".",s=e?.nsSeparator??":",i=e?.enableSelector==="strict";if(t.length>1&&s){let o=e?.ns,a=i?Array.isArray(o)?o:o?[o]:null:Array.isArray(o)?o:null;if(a&&(i?a:a.length>1?a.slice(1):[]).includes(t[0]))return`${t[0]}${s}${t.slice(1).join(n)}`}return t.join(n)}var Ut=r=>!b(r)&&typeof r!="boolean"&&typeof r!="number",wt=class r extends Qe{constructor(e,t={}){super(),Ds(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ae.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let s=this.resolve(e,n);if(s?.res===void 0)return!1;let i=Ut(s.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");let s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.includes(n),a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Hs(e,n,s);if(o&&!a){let l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:b(i)?[i]:i};let c=e.split(n);(n!==s||n===s&&this.options.ns.includes(c[0]))&&(i=c.shift()),e=c.join(s)}return{key:e,namespaces:b(i)?[i]:i}}translate(e,t,n){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=Ve(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]),e=e.map(T=>typeof T=="function"?Ve(T,{...this.options,...s}):String(T));let i=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],s),c=l[l.length-1],u=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");let d=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return p?i?{res:`${c}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:`${c}${u}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:a;let y=this.resolve(e,s),x=y?.res,k=y?.usedKey||a,$=y?.exactUsedKey||a,K=["[object Number]","[object Function]","[object RegExp]"],C=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,N=s.count!==void 0&&!b(s.count),V=r.hasDefaultValue(s),ee=N?this.pluralResolver.getSuffix(d,s.count,s):"",he=s.ordinal&&N?this.pluralResolver.getSuffix(d,s.count,{ordinal:!1}):"",rt=N&&!s.ordinal&&s.count===0,te=rt&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${ee}`]||s[`defaultValue${he}`]||s.defaultValue,S=x;M&&!x&&V&&(S=te);let R=Ut(S),O=Object.prototype.toString.apply(S);if(M&&S&&R&&!K.includes(O)&&!(b(C)&&Array.isArray(S))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(k,S,{...s,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(y.res=T,y.usedParams=this.getUsedParamsDetails(s),y):T}if(o){let T=Array.isArray(S),A=T?[]:{},be=T?$:k;for(let W in S)if(Object.prototype.hasOwnProperty.call(S,W)){let re=`${be}${o}${W}`;V&&!x?A[W]=this.translate(re,{...s,defaultValue:Ut(te)?te[W]:void 0,joinArrays:!1,ns:l}):A[W]=this.translate(re,{...s,joinArrays:!1,ns:l}),A[W]===re&&(A[W]=S[W])}x=A}}else if(M&&b(C)&&Array.isArray(x))x=x.join(C),x&&(x=this.extendTranslation(x,e,s,n));else{let T=!1,A=!1;!this.isValidLookup(x)&&V&&(T=!0,x=te),this.isValidLookup(x)||(A=!0,x=a);let W=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:x,re=V&&te!==x&&this.options.updateMissing;if(A||T||re){if(this.logger.log(re?"updateKey":"missingKey",d,c,N&&!re?`${a}${this.pluralResolver.getSuffix(d,s.count,s)}`:a,re?te:x),o){let H=this.resolve(a,{...s,keySeparator:!1});H&&H.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 nt=[],gt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&>&>[0])for(let H=0;H<gt.length;H++)nt.push(gt[H]);else this.options.saveMissingTo==="all"?nt=this.languageUtils.toResolveHierarchy(s.lng||this.language):nt.push(s.lng||this.language);let ar=(H,Ee,st)=>{let or=V&&st!==x?st:W;this.options.missingKeyHandler?this.options.missingKeyHandler(H,c,Ee,or,re,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(H,c,Ee,or,re,s),this.emit("missingKey",H,c,Ee,x)};this.options.saveMissing&&(this.options.saveMissingPlurals&&N?nt.forEach(H=>{let Ee=this.pluralResolver.getSuffixes(H,s);rt&&s[`defaultValue${this.options.pluralSeparator}zero`]&&!Ee.includes(`${this.options.pluralSeparator}zero`)&&Ee.push(`${this.options.pluralSeparator}zero`),Ee.forEach(st=>{ar([H],a+st,s[`defaultValue${st}`]||te)})}):ar(nt,a,te))}x=this.extendTranslation(x,e,s,y,n),A&&x===a&&this.options.appendNamespaceToMissingKey&&(x=`${c}${u}${a}`),(A||T)&&this.options.parseMissingKeyHandler&&(x=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${a}`:a,T?x:void 0,s))}return i?(y.res=x,y.usedParams=this.getUsedParamsDetails(s),y):x}extendTranslation(e,t,n,s,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let l=b(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(l){let d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let u=n.replace&&!b(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||s.usedLng,n),l){let d=e.match(this.interpolator.nestingRegexp),p=d&&d.length;c<p&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>i?.[0]===d[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),n)),n.interpolation&&this.interpolator.reset()}let o=n.postProcess||this.options.postProcess,a=b(o)?[o]:o;return e!=null&&a?.length&&n.applyPostProcessor!==!1&&(e=Dr.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,i,o,a;return b(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?Ve(l,{...this.options,...t}):l)),e.forEach(l=>{if(this.isValidLookup(n))return;let c=this.extractFromKey(l,t),u=c.key;s=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));let p=t.count!==void 0&&!b(t.count),y=p&&!t.ordinal&&t.count===0,x=t.context!==void 0&&(b(t.context)||typeof t.context=="number")&&t.context!=="",k=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach($=>{this.isValidLookup(n)||(a=$,!this.checkedLoadedFor[`${k[0]}-${$}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${k[0]}-${$}`]=!0,this.logger.warn(`key "${s}" for languages "${k.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),k.forEach(K=>{if(this.isValidLookup(n))return;o=K;let C=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(C,u,K,$,t);else{let N;p&&(N=this.pluralResolver.getSuffix(K,t.count,t));let V=`${this.options.pluralSeparator}zero`,ee=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&N.startsWith(ee)&&C.push(u+N.replace(ee,this.options.pluralSeparator)),C.push(u+N),y&&C.push(u+V)),x){let he=`${u}${this.options.contextSeparator||"_"}${t.context}`;C.push(he),p&&(t.ordinal&&N.startsWith(ee)&&C.push(he+N.replace(ee,this.options.pluralSeparator)),C.push(he+N),y&&C.push(he+V))}}let M;for(;M=C.pop();)this.isValidLookup(n)||(i=M,n=this.getResource(K,$,M,t))}))})}),{res:n,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(e={}){let t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!b(e.replace),s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s={...s,count:e.count}),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(let i of t)delete s[i]}return s}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n.startsWith(t)&&e[n]!==void 0)return!0;return!1}},Tt=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ae.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=dt(e),!e||!e.includes("-"))return null;let t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=dt(e),!e||!e.includes("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(b(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;let s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;let s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return t=s;let i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(o=>o===i?!0:!o.includes("-")&&!i.includes("-")?!1:!!(o.includes("-")&&!i.includes("-")&&o.slice(0,o.indexOf("-"))===i||o.startsWith(i)&&i.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),b(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,s=Array.isArray(n)?n.join("|"):n;s!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=s);let i=t===void 0||t===!1||b(t),o=t===void 0&&typeof this.options.fallbackLng=="function",a=b(e)&&i&&!o,l=null;if(a){let p;t===void 0?p="undefined":t===!1?p="boolean:false":p=`string:${t}`,l=`${e.length}:${e}|${p}`}if(l!==null){let p=this.resolveHierarchyCache[l];if(p!==void 0)return p.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),u=[],d=p=>{p&&(this.isSupportedCode(p)?u.push(p):this.logger.warn(`rejecting language code not found in supportedLngs: ${p}`))};return b(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&d(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(e))):b(e)&&d(this.formatLanguageCode(e)),c.forEach(p=>{u.includes(p)||d(this.formatLanguageCode(p))}),l!==null?(this.resolveHierarchyCache[l]=u,u.slice()):u}},Ar={zero:0,one:1,two:2,few:3,many:4,other:5},Cr={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},Zt=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ae.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=dt(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Cr;if(!e.match(/-|_/))return Cr;let l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((s,i)=>Ar[s]-Ar[i]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,n={}){let s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}},Nr=(r,e,t,n=".",s=!0)=>{let i=Vs(r,e,t);return!i&&s&&b(t)&&(i=Kt(r,t,n),i===void 0&&(i=Kt(e,t,n))),i},Lr=r=>r.replace(/\$/g,"$$$$"),kt=class{constructor(e={}){this.logger=ae.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:p,nestingPrefixEscaped:y,nestingSuffix:x,nestingSuffixEscaped:k,nestingOptionsSeparator:$,maxReplaces:K,alwaysFormat:C}=e.interpolation;this.escape=t!==void 0?t:Bs,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?de(i):o||"{{",this.suffix=a?de(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d?de(d):"-",this.unescapeSuffix=this.unescapePrefix?"":u?de(u):"",this.nestingPrefix=p?de(p):y||de("$t("),this.nestingSuffix=x?de(x):k||de(")"),this.nestingOptionsSeparator=$||",",this.maxReplaces=K||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(t,n)=>t?.source===n?(t.lastIndex=0,t):new RegExp(n,"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,n,s){let i,o,a,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=y=>{if(!y.includes(this.formatSeparator)){let K=Nr(t,l,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(K,void 0,n,{...s,...t,interpolationkey:y}):K}let x=y.split(this.formatSeparator),k=x.shift().trim(),$=x.join(this.formatSeparator).trim();return this.format(Nr(t,l,k,this.options.keySeparator,this.options.ignoreJSONStructure),$,n,{...s,...t,interpolationkey:k})};this.resetRegExp(),!this.escapeValue&&typeof e=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false \u2014 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 u=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>y},{regex:this.regexp,safeValue:y=>this.escapeValue?this.escape(y):y}].forEach(y=>{for(a=0;i=y.regex.exec(e);){let x=i[1].trim();if(o=c(x),o===void 0)if(typeof u=="function"){let $=u(e,i,s);o=b($)?$:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))o="";else if(d){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${e}`),o="";else!b(o)&&!this.useRawValueToEscape&&(o=Vt(o));let k=y.safeValue(o);if(e=e.replace(i[0],Lr(k)),d?(y.regex.lastIndex+=k.length,y.regex.lastIndex-=i[0].length):y.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,i,o,a=(l,c)=>{let u=this.nestingOptionsSeparator;if(!l.includes(u))return l;let d=l.split(new RegExp(`${de(u)}[ ]*{`)),p=`{${d[1]}`;l=d[0],p=this.interpolate(p,o);let y=p.match(/'/g),x=p.match(/"/g);((y?.length??0)%2===0&&!x||(x?.length??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),c&&(o={...c,...o})}catch(k){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,k),`${l}${u}${p}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];o={...n},o=o.replace&&!b(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=/{.*}/s.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(c!==-1&&(l=s[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),s[1]=s[1].slice(0,c)),i=t(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&!b(i))return i;b(i)||(i=Vt(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),l.length&&(i=l.reduce((u,d)=>this.format(u,d,n.lng,{...n,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],Lr(Vt(i))),this.regexp.lastIndex=0}return e}},Ys=r=>{let e=r.toLowerCase().trim(),t={};if(r.includes("(")){let n=r.split("(");e=n[0].toLowerCase().trim();let s=n[1].slice(0,-1);e==="currency"&&!s.includes(":")?t.currency||(t.currency=s.trim()):e==="relativetime"&&!s.includes(":")?t.range||(t.range=s.trim()):s.split(";").forEach(o=>{if(o){let[a,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();t[u]||(t[u]=c),c==="false"&&(t[u]=!1),c==="true"&&(t[u]=!0),isNaN(c)||(t[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},jr=r=>{let e={};return(t,n,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});let o=n+JSON.stringify(i),a=e[o];return a||(a=r(dt(n),s),e[o]=a),a(t)}},qs=r=>(e,t,n)=>r(dt(t),n)(e),Wt=class{constructor(e={}){this.logger=ae.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?jr:qs;this.formats={number:n((s,i)=>{let o=new Intl.NumberFormat(s,{...i});return a=>o.format(a)}),currency:n((s,i)=>{let o=new Intl.NumberFormat(s,{...i,style:"currency"});return a=>o.format(a)}),datetime:n((s,i)=>{let o=new Intl.DateTimeFormat(s,{...i});return a=>o.format(a)}),relativetime:n((s,i)=>{let o=new Intl.RelativeTimeFormat(s,{...i});return a=>o.format(a,i.range||"day")}),list:n((s,i)=>{let o=new Intl.ListFormat(s,{...i});return a=>o.format(a)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=jr(t)}format(e,t,n,s={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),o=[];for(let l=0;l<i.length;l++){let c=i[l];for(;c.indexOf("(")>-1&&!c.includes(")")&&l+1<i.length;)c=`${c}${this.formatSeparator}${i[++l]}`;o.push(c)}return o.reduce((l,c)=>{let{formatName:u,formatOptions:d}=Ys(c);if(this.formats[u]){let p=l;try{let y=s?.formatParams?.[s.interpolationkey]||{},x=y.locale||y.lng||s.locale||s.lng||n;p=this.formats[u](l,x,{...d,...s,...y})}catch(y){this.logger.warn(y)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},e)}},Js=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)},Yt=class extends Qe{constructor(e,t,n,s={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=ae.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,s.backend,s)}queueLoad(e,t,n,s){let i={},o={},a={},l={};return e.forEach(c=>{let u=!0;t.forEach(d=>{let p=`${c}|${d}`;!n.reload&&this.store.hasResourceBundle(c,d)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?o[p]===void 0&&(o[p]=!0):(this.state[p]=1,u=!1,o[p]===void 0&&(o[p]=!0),i[p]===void 0&&(i[p]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(a[c]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){let s=e.split("|"),i=s[0],o=s[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let a={};this.queue.forEach(l=>{Fs(l.loaded,[i],o),Js(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});let u=l.loaded[c];u.length&&u.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,t,n,s=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:i,callback:o});return}this.readingCalls++;let a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){let d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&s<this.maxRetries){setTimeout(()=>{this.read(e,t,n,s+1,i*2,o)},i);return}o(c,u)},l=this.backend[n].bind(this.backend);if(l.length===2){try{let c=l(e,t);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(e,t,a)}prepareLoading(e,t,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();b(e)&&(e=this.languageUtils.toResolveHierarchy(e)),b(t)&&(t=[t]);let i=this.queueLoad(e,t,n,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){let n=e.split("|"),s=n[0],i=n[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,t,n,s,i,o={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend?.create){let l={...o,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(e,t,n,s,l):u=c(e,t,n,s),u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}else c(e,t,n,s,a,l)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}},Bt=()=>({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:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),b(r[1])&&(e.defaultValue=r[1]),b(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){let t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Pr=r=>(b(r.ns)&&(r.ns=[r.ns]),b(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),b(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&!r.supportedLngs.includes("cimode")&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r),Et=()=>{},Gs=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})},qt=class r extends Qe{constructor(e={},t){if(super(),this.options=Pr(e),this.services={},this.logger=ae,this.modules={external:[]},Gs(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,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(b(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));let n=Bt();this.options={...n,...this.options,...Pr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ae.init(s(this.modules.logger),this.options):ae.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Wt;let u=new Tt(this.options);this.store=new St(this.options.resources,this.options);let d=this.services;d.logger=ae,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new Zt(u,{prepend:this.options.pluralSeparator}),c&&(d.formatter=s(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new kt(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Yt(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(p,...y)=>{this.emit(p,...y)}),this.modules.languageDetector&&(d.languageDetector=s(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=s(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new wt(this.services,this.options),this.translator.on("*",(p,...y)=>{this.emit(p,...y)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Et),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});let a=lt(),l=()=>{let c=(u,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),t(u,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,t=Et){let n=t,s=b(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();let i=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&(i.includes(c)||i.push(c))})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload?.forEach?.(a=>o(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,t,n){let s=lt();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Et),this.services.backendConnector.reload(e,t,i=>{s.resolve(),n(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Dr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let t=0;t<this.languages.length;t++){let n=this.languages[t];if(!["cimode","dev"].includes(n)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;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 n=lt();this.emit("languageChanging",e);let s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),t&&t(a,(...c)=>this.t(...c))},o=a=>{!e&&!a&&this.services.languageDetector&&(a=[]);let l=b(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(b(a)?[a]:a);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,u=>{i(u,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),n}getFixedT(e,t,n,s){let i=s?.scopeNs,o=(a,l,...c)=>{let u;typeof l!="object"?u=this.options.overloadTranslationOptionHandler([a,l].concat(c)):u={...l},u.lng=u.lng||o.lng,u.lngs=u.lngs||o.lngs;let d=u.ns!==void 0&&u.ns!==null;u.ns=u.ns||o.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||o.keyPrefix);let p={...this.options,...u};Array.isArray(i)&&!d&&(p.ns=i),typeof u.keyPrefix=="function"&&(u.keyPrefix=Ve(u.keyPrefix,p));let y=this.options.keySeparator||".",x;return u.keyPrefix&&Array.isArray(a)?x=a.map(k=>(typeof k=="function"&&(k=Ve(k,p)),`${u.keyPrefix}${y}${k}`)):(typeof a=="function"&&(a=Ve(a,p)),x=u.keyPrefix?`${u.keyPrefix}${y}${a}`:a),this.t(x,u)};return b(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}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 n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;let o=(a,l)=>{let c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(t.precheck){let a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!s||o(i,e)))}loadNamespaces(e,t){let n=lt();return this.options.ns?(b(e)&&(e=[e]),e.forEach(s=>{this.options.ns.includes(s)||this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=lt();b(e)&&(e=[e]);let s=this.options.preload||[],i=e.filter(o=>!s.includes(o)&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(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 s=new Intl.Locale(e);if(s&&s.getTextInfo){let i=s.getTextInfo();if(i&&i.direction)return i.direction}}catch{}let t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services?.languageUtils||new Tt(Bt());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){let n=new r(e,t);return n.createInstance=r.createInstance,n}cloneInstance(e={},t=Et){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let s={...this.options,...e,isClone:!0},i=new r(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){let a=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,d)=>(u[d]={...l[c][d]},u),l[c]),l),{});i.store=new St(a,s),i.services.resourceStore=i.store}if(e.interpolation){let l={...Bt().interpolation,...this.options.interpolation,...e.interpolation},c={...s,interpolation:l};i.services.interpolator=new kt(c)}return i.translator=new wt(i.services,s),i.translator.on("*",(a,...l)=>{i.emit(a,...l)}),i.init(s,t),i.translator.options=s,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}}},z=qt.createInstance(),Jt=z.createInstance,ya=z.dir,xa=z.init,va=z.loadResources,_a=z.reloadResources,ba=z.use,Ea=z.changeLanguage,Ia=z.getFixedT,Sa=z.t,wa=z.exists,Ta=z.setDefaultNamespace,ka=z.hasLoadedNamespace,Oa=z.loadNamespaces,Ra=z.loadLanguages;var Ot=(r,e,t,n)=>{let s=[t,{code:e,...n||{}}];if(r?.services?.logger?.forward)return r.services.logger.forward(s,"warn","react-i18next::",!0);X(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),r?.services?.logger?.warn?r.services.logger.warn(...s):console?.warn&&console.warn(...s)},Fr={},fe=(r,e,t,n)=>{X(t)&&Fr[t]||(X(t)&&(Fr[t]=new Date),Ot(r,e,t,n))},Vr=(r,e)=>()=>{if(r.isInitialized)e();else{let t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},Rt=(r,e,t)=>{r.loadNamespaces(e,Vr(r,t))},Gt=(r,e,t,n)=>{if(X(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return Rt(r,t,n);t.forEach(s=>{r.options.ns.indexOf(s)<0&&r.options.ns.push(s)}),r.loadLanguages(e,Vr(r,n))},Ur=(r,e,t={})=>!e.languages||!e.languages.length?(fe(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(n,s)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!s(n.isLanguageChangingTo,r))return!1}});var X=r=>typeof r=="string",Xt=r=>typeof r=="object"&&r!==null;var Xs=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Qs={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},ei=r=>Qs[r],Qt=r=>r.replace(Xs,ei);var ti={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Qt,transDefaultProps:void 0};var ft=()=>ti;var ri;var Q=()=>ri;var Kr=j(F(),1);var pe=(0,Kr.createContext)(),At=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};var qr=j(F(),1);var Ue=j(F(),1);var et=class r extends Error{constructor(e,t,n){super(e),this.name="TranslationParserError",this.position=t,this.translationString=n,Error.captureStackTrace&&Error.captureStackTrace(this,r)}};var Hr={" ":"\xA0","&":"&","<":"<",">":">",""":'"',"'":"'","©":"\xA9","®":"\xAE","™":"\u2122","…":"\u2026","–":"\u2013","—":"\u2014","‘":"\u2018","’":"\u2019","‚":"\u201A","“":"\u201C","”":"\u201D","„":"\u201E","†":"\u2020","‡":"\u2021","•":"\u2022","′":"\u2032","″":"\u2033","‹":"\u2039","›":"\u203A","§":"\xA7","¶":"\xB6","·":"\xB7"," ":"\u2002"," ":"\u2003"," ":"\u2009","€":"\u20AC","£":"\xA3","¥":"\xA5","¢":"\xA2","¤":"\xA4","×":"\xD7","÷":"\xF7","−":"\u2212","±":"\xB1","≠":"\u2260","≤":"\u2264","≥":"\u2265","≈":"\u2248","≡":"\u2261","∞":"\u221E","∫":"\u222B","∑":"\u2211","∏":"\u220F","√":"\u221A","∂":"\u2202","‰":"\u2030","°":"\xB0","µ":"\xB5","←":"\u2190","↑":"\u2191","→":"\u2192","↓":"\u2193","↔":"\u2194","↵":"\u21B5","⇐":"\u21D0","⇑":"\u21D1","⇒":"\u21D2","⇓":"\u21D3","⇔":"\u21D4","α":"\u03B1","β":"\u03B2","γ":"\u03B3","δ":"\u03B4","ε":"\u03B5","ζ":"\u03B6","η":"\u03B7","θ":"\u03B8","ι":"\u03B9","κ":"\u03BA","λ":"\u03BB","μ":"\u03BC","ν":"\u03BD","ξ":"\u03BE","ο":"\u03BF","π":"\u03C0","ρ":"\u03C1","σ":"\u03C3","τ":"\u03C4","υ":"\u03C5","φ":"\u03C6","χ":"\u03C7","ψ":"\u03C8","ω":"\u03C9","Α":"\u0391","Β":"\u0392","Γ":"\u0393","Δ":"\u0394","Ε":"\u0395","Ζ":"\u0396","Η":"\u0397","Θ":"\u0398","Ι":"\u0399","Κ":"\u039A","Λ":"\u039B","Μ":"\u039C","Ν":"\u039D","Ξ":"\u039E","Ο":"\u039F","Π":"\u03A0","Ρ":"\u03A1","Σ":"\u03A3","Τ":"\u03A4","Υ":"\u03A5","Φ":"\u03A6","Χ":"\u03A7","Ψ":"\u03A8","Ω":"\u03A9","À":"\xC0","Á":"\xC1","Â":"\xC2","Ã":"\xC3","Ä":"\xC4","Å":"\xC5","Æ":"\xC6","Ç":"\xC7","È":"\xC8","É":"\xC9","Ê":"\xCA","Ë":"\xCB","Ì":"\xCC","Í":"\xCD","Î":"\xCE","Ï":"\xCF","Ð":"\xD0","Ñ":"\xD1","Ò":"\xD2","Ó":"\xD3","Ô":"\xD4","Õ":"\xD5","Ö":"\xD6","Ø":"\xD8","Ù":"\xD9","Ú":"\xDA","Û":"\xDB","Ü":"\xDC","Ý":"\xDD","Þ":"\xDE","ß":"\xDF","à":"\xE0","á":"\xE1","â":"\xE2","ã":"\xE3","ä":"\xE4","å":"\xE5","æ":"\xE6","ç":"\xE7","è":"\xE8","é":"\xE9","ê":"\xEA","ë":"\xEB","ì":"\xEC","í":"\xED","î":"\xEE","ï":"\xEF","ð":"\xF0","ñ":"\xF1","ò":"\xF2","ó":"\xF3","ô":"\xF4","õ":"\xF5","ö":"\xF6","ø":"\xF8","ù":"\xF9","ú":"\xFA","û":"\xFB","ü":"\xFC","ý":"\xFD","þ":"\xFE","ÿ":"\xFF","¡":"\xA1","¿":"\xBF","ƒ":"\u0192","ˆ":"\u02C6","˜":"\u02DC","Œ":"\u0152","œ":"\u0153","Š":"\u0160","š":"\u0161","Ÿ":"\u0178","ª":"\xAA","º":"\xBA","¯":"\xAF","´":"\xB4","¸":"\xB8","¹":"\xB9","²":"\xB2","³":"\xB3","¼":"\xBC","½":"\xBD","¾":"\xBE","♠":"\u2660","♣":"\u2663","♥":"\u2665","♦":"\u2666","◊":"\u25CA","‾":"\u203E","⁄":"\u2044","℘":"\u2118","ℑ":"\u2111","ℜ":"\u211C","ℵ":"\u2135"},oi=new RegExp(Object.keys(Hr).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g"),Zr=r=>r.replace(oi,e=>Hr[e]).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&#x([0-9a-fA-F]+);/g,(e,t)=>String.fromCharCode(parseInt(t,16)));var Wr=r=>{let e=[],t=0,n="",s=()=>{n&&(e.push({type:"Text",value:n,position:t-n.length}),n="")};for(;t<r.length;){let i=r[t];if(i==="<"){let o=r.slice(t).match(/^<(\d+)>/);if(o)s(),e.push({type:"TagOpen",value:o[0],position:t,tagNumber:parseInt(o[1],10)}),t+=o[0].length;else{let a=r.slice(t).match(/^<\/(\d+)>/);a?(s(),e.push({type:"TagClose",value:a[0],position:t,tagNumber:parseInt(a[1],10)}),t+=a[0].length):(n+=i,t+=1)}}else n+=i,t+=1}return s(),e};var ht=j(F(),1);var ci=(r,e,t)=>{let{type:n,props:s={}}=r;if(s.children&&Array.isArray(s.children)&&t){let{children:i,...o}=s;return ht.default.createElement(n,o,...e)}return e.length===0?ht.default.createElement(n,s):e.length===1?ht.default.createElement(n,s,e[0]):ht.default.createElement(n,s,...e)},Yr=(r,e=[])=>{if(!r)return[];let t=Wr(r),n=[],s=[],i=new Set,o=()=>{if(s.length===0)return e;let a=s[s.length-1];return a.declaration.props?.children&&Array.isArray(a.declaration.props.children)?a.declaration.props.children:a.declarations};if(t.forEach(a=>{switch(a.type){case"Text":{let l=Zr(a.value);(s.length>0?s[s.length-1].children:n).push(l)}break;case"TagOpen":{let{tagNumber:l}=a,c=o(),u=c[l];if(!u){i.add(l);let d=`<${l}>`;(s.length>0?s[s.length-1].children:n).push(d);break}s.push({tagNumber:l,children:[],position:a.position,declaration:u,declarations:c})}break;case"TagClose":{let{tagNumber:l}=a;if(i.has(l)){let p=`</${l}>`;(s.length>0?s[s.length-1].children:n).push(p),i.delete(l);break}if(s.length===0)throw new et(`Unexpected closing tag </${l}> at position ${a.position}`,a.position,r);let c=s.pop();if(c.tagNumber!==l)throw new et(`Mismatched tags: expected </${c.tagNumber}> but got </${l}> at position ${a.position}`,a.position,r);let u=ci(c.declaration,c.children,c.declarations);(s.length>0?s[s.length-1].children:n).push(u)}break}}),s.length>0){let a=s[s.length-1];throw new et(`Unclosed tag <${a.tagNumber}> at position ${a.position}`,a.position,r)}return n};function Ct({i18nKey:r,defaultTranslation:e,content:t,ns:n,values:s={},i18n:i,t:o}){let a=i||Q();if(!a)return fe(a,"NO_I18NEXT_INSTANCE","IcuTrans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:r}),Ue.default.createElement(Ue.default.Fragment,{},e);let l=o||a.t?.bind(a)||(p=>p),c=n||l.ns||a.options?.defaultNS;c=X(c)?[c]:c||["translation"];let u=s;a.options?.interpolation?.defaultVariables&&(u=s&&Object.keys(s).length>0?{...s,...a.options.interpolation.defaultVariables}:{...a.options.interpolation.defaultVariables});let d=l(r||e,{defaultValue:e,...u,ns:c});try{let p=Yr(d,t);return Ue.default.createElement(Ue.default.Fragment,{},...p)}catch(p){return Ot(a,"ICU_TRANS_RENDER_ERROR",`IcuTrans component error for key "${r}": ${p.message}`,{i18nKey:r,error:p}),Ue.default.createElement(Ue.default.Fragment,{},d)}}Ct.displayName="IcuTransWithoutContext";function Jr({i18nKey:r,defaultTranslation:e,content:t,ns:n,values:s={},i18n:i,t:o}){let{i18n:a,defaultNS:l}=(0,qr.useContext)(pe)||{},c=i||a||Q(),u=o||c?.t.bind(c);return Ct({i18nKey:r,defaultTranslation:e,content:t,ns:n||u?.ns||l||c?.options?.defaultNS,values:s,i18n:c,t:o})}Jr.displayName="IcuTrans";var L=j(F(),1),tn=j(en(),1);var xi=(r,e)=>{if(X(e))return e;if(Xt(e)&&X(e.defaultValue))return e.defaultValue;if(typeof r=="function")return"";if(Array.isArray(r)){let t=r[r.length-1];return typeof t=="function"?"":t}return r},vi={t:xi,ready:!1},_i=()=>()=>{},mt=(r,e={})=>{let{i18n:t}=e,{i18n:n,defaultNS:s}=(0,L.useContext)(pe)||{},i=t||n||Q();i&&!i.reportNamespaces&&(i.reportNamespaces=new At),i||fe(i,"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,L.useMemo)(()=>({...ft(),...i?.options?.react,...e}),[i,e]),{useSuspense:a,keyPrefix:l}=o,c=r||s||i?.options?.defaultNS,u=X(c)?[c]:c||["translation"],d=(0,L.useMemo)(()=>u,u);i?.reportNamespaces?.addUsedNamespaces?.(d);let p=(0,L.useRef)(0),y=(0,L.useCallback)(S=>{if(!i)return _i;let{bindI18n:R,bindI18nStore:O}=o,T=()=>{p.current+=1,S()};return R&&i.on(R,T),O&&i.store.on(O,T),()=>{R&&R.split(" ").forEach(A=>i.off(A,T)),O&&O.split(" ").forEach(A=>i.store.off(A,T))}},[i,o]),x=(0,L.useRef)(),k=(0,L.useCallback)(()=>{if(!i)return vi;let S=!!(i.isInitialized||i.initializedStoreOnce)&&d.every(W=>Ur(W,i,o)),R=e.lng||i.language,O=p.current,T=x.current;if(T&&T.ready===S&&T.lng===R&&T.keyPrefix===l&&T.revision===O)return T;let be={t:i.getFixedT(R,o.nsMode==="fallback"?d:d[0],l,{scopeNs:d}),ready:S,lng:R,keyPrefix:l,revision:O};return x.current=be,be},[i,d,l,o,e.lng]),[$,K]=(0,L.useState)(0),{t:C,ready:M}=(0,tn.useSyncExternalStore)(y,k,k);(0,L.useEffect)(()=>{if(i&&!M&&!a){let S=()=>K(R=>R+1);e.lng?Gt(i,e.lng,d,S):Rt(i,d,S)}},[i,e.lng,d,M,a,$]);let N=i||{},V=(0,L.useRef)(null),ee=(0,L.useRef)(),he=S=>`${S.language}|${S.resolvedLanguage}|${S.languages?.join(",")}`,rt=S=>{let R=Object.getOwnPropertyDescriptors(S);R.__original&&delete R.__original;let O=Object.create(Object.getPrototypeOf(S),R);if(!Object.prototype.hasOwnProperty.call(O,"__original"))try{Object.defineProperty(O,"__original",{value:S,writable:!1,enumerable:!1,configurable:!1})}catch{}return O},te=(0,L.useMemo)(()=>{let S=N,R=S&&he(S),O=S;S&&(V.current&&V.current.__original===S?ee.current!==R?(O=rt(S),V.current=O,ee.current=R):O=V.current:(O=rt(S),V.current=O,ee.current=R));let T=!M&&!a?(...be)=>(fe(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),C(...be)):C,A=[T,O,M];return A.t=T,A.i18n=O,A.ready=M,A},[C,N,M,N.resolvedLanguage,N.language,N.languages]);if(i&&a&&!M){let S=!1;try{S=!1}catch{}throw S&&fe(i,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),new Promise(R=>{let O=()=>R();e.lng?Gt(i,e.lng,d,O):Rt(i,d,O)})}return te};var rn=j(F(),1);var Nt=j(F(),1);function tr({i18n:r,defaultNS:e,children:t}){let n=(0,Nt.useMemo)(()=>({i18n:r,defaultNS:e}),[r,e]);return(0,Nt.createElement)(pe.Provider,{value:n},t)}var wi=j(F(),1);var Ei=j(F(),1);var Ti=cr({"./locales/a2a/en.json":()=>import("./embed-page-en-XJYWUJEL.js"),"./locales/a2a/zh.json":()=>import("./embed-page-zh-6EBUEFKP.js"),"./locales/auth/en.json":()=>import("./embed-page-en-ISNUZBPO.js"),"./locales/auth/zh.json":()=>import("./embed-page-zh-MDJTBW2K.js"),"./locales/capability/en.json":()=>import("./embed-page-en-CKNSRQK4.js"),"./locales/capability/zh.json":()=>import("./embed-page-zh-UHYXJQJ2.js"),"./locales/chat/en.json":()=>import("./embed-page-en-G5J7KW6V.js"),"./locales/chat/zh.json":()=>import("./embed-page-zh-72QSTYRF.js"),"./locales/chatConfig/en.json":()=>import("./embed-page-en-E35GE7TA.js"),"./locales/chatConfig/zh.json":()=>import("./embed-page-zh-ZLK3GLM3.js"),"./locales/chatMenu/en.json":()=>import("./embed-page-en-ZCNNAMUD.js"),"./locales/chatMenu/zh.json":()=>import("./embed-page-zh-Z3URTIHW.js"),"./locales/chatWorkspace/en.json":()=>import("./embed-page-en-HDSVQ4O6.js"),"./locales/chatWorkspace/zh.json":()=>import("./embed-page-zh-IR652A6J.js"),"./locales/common/en.json":()=>import("./embed-page-en-KAXIJJ4X.js"),"./locales/common/zh.json":()=>import("./embed-page-zh-B3WBWQAV.js"),"./locales/cospace/en.json":()=>import("./embed-page-en-YEFZNGUW.js"),"./locales/cospace/zh.json":()=>import("./embed-page-zh-HVQX6Q43.js"),"./locales/crons/en.json":()=>import("./embed-page-en-EKHHBS6L.js"),"./locales/crons/zh.json":()=>import("./embed-page-zh-KEMYJJLT.js"),"./locales/entities/en.json":()=>import("./embed-page-en-FPTYKHAK.js"),"./locales/entities/zh.json":()=>import("./embed-page-zh-NBMPWZ3W.js"),"./locales/eval/en.json":()=>import("./embed-page-en-A6F6L2TT.js"),"./locales/eval/zh.json":()=>import("./embed-page-zh-ODXFDX4F.js"),"./locales/genui/en.json":()=>import("./embed-page-en-H4P63IAK.js"),"./locales/genui/zh.json":()=>import("./embed-page-zh-IB3422D4.js"),"./locales/governance/en.json":()=>import("./embed-page-en-TMGUHZ6Y.js"),"./locales/governance/zh.json":()=>import("./embed-page-zh-RMGMUSDH.js"),"./locales/info/en.json":()=>import("./embed-page-en-3Z4N5KXB.js"),"./locales/info/zh.json":()=>import("./embed-page-zh-GXE63PQ7.js"),"./locales/integration/en.json":()=>import("./embed-page-en-BLF5THT6.js"),"./locales/integration/zh.json":()=>import("./embed-page-zh-N2STRBUG.js"),"./locales/mcpapp/en.json":()=>import("./embed-page-en-GLT2HEZZ.js"),"./locales/mcpapp/zh.json":()=>import("./embed-page-zh-XMEJPDMF.js"),"./locales/migration/en.json":()=>import("./embed-page-en-5R5CQCHP.js"),"./locales/migration/zh.json":()=>import("./embed-page-zh-6ZDI4LQX.js"),"./locales/projectRoom/en.json":()=>import("./embed-page-en-H66IJ36N.js"),"./locales/projectRoom/zh.json":()=>import("./embed-page-zh-GEYMOUQO.js"),"./locales/store/en.json":()=>import("./embed-page-en-OIICQSPX.js"),"./locales/store/zh.json":()=>import("./embed-page-zh-2UVQB4RP.js"),"./locales/tasks/en.json":()=>import("./embed-page-en-RBT7ZUI5.js"),"./locales/tasks/zh.json":()=>import("./embed-page-zh-5L4NNHXH.js"),"./locales/training/en.json":()=>import("./embed-page-en-P5NUAAD7.js"),"./locales/training/zh.json":()=>import("./embed-page-zh-GTQRI6XG.js")});var Be=["en-US","zh-CN"];function Lt(r){return r==="zh-CN"?"zh":"en"}function rr(r){return r.startsWith("zh")?"zh-CN":"en-US"}var _e=["common","a2a","auth","capability","chat","chatConfig","chatMenu","chatWorkspace","cospace","crons","entities","eval","genui","governance","info","integration","mcpapp","migration","projectRoom","store","tasks","training"];function nr(r){let[e]=r.split(".");return _e.includes(e)?e:_e[0]}var nn={type:"backend",read(r,e,t){Ti(`./locales/${e}/${r}.json`).then(n=>{let s=n.default??n;t(null,s.messages??s)}).catch(n=>t(n,null))}};function ki(r,e){let t=((n,s)=>r(n,{ns:nr(n),...s}));return t.locale=rr(e??"en"),t}function Oi(){let{t:r,i18n:e}=mt(),t=e?.language;return(0,sn.useMemo)(()=>ki(r,t),[r,t])}var sr=j(F());var an=(0,sr.createContext)(null);var ze=j(F());var ir=j(ur());function Ri({locale:r="en-US",overrides:e,storageKey:t,onLocaleChange:n,children:s}){let[i,o]=(0,ze.useState)(!1),a=(0,ze.useMemo)(()=>Jt(),[]);(0,ze.useEffect)(()=>{let c=!1;return o(!1),a.use(nn).init({lng:Lt(r),fallbackLng:"en",ns:[..._e],defaultNS:_e[0],keySeparator:!1,nsSeparator:!1,interpolation:{escapeValue:!1},resources:e?{[Lt(r)]:{[_e[0]]:e[r]??{}}}:void 0}).then(()=>a.loadNamespaces([..._e])).then(()=>{c||o(!0)}).catch(()=>{c||o(!0)}),()=>{c=!0}},[a,r,e]);let l=(0,ze.useMemo)(()=>({locale:r,supportedLocales:Be,setLocale:c=>{if(Be.includes(c)){if(t&&typeof window<"u")try{window.localStorage.setItem(t,c)}catch{}n?.(c)}}}),[r,t,n]);return i?(0,ir.jsx)(an.Provider,{value:l,children:(0,ir.jsx)(tr,{i18n:a,children:s})}):null}var on="lattice.locale";function Ai(r=on){if(!(typeof window>"u"))try{let e=window.localStorage.getItem(r);return e!==null&&Be.includes(e)?e:void 0}catch{return}}export{Xe as a,na as b,sa as c,aa as d,ks as e,oa as f,ca as g,pa as h,ha as i,ma as j,Oi as k,an as l,Ri as m,on as n,Ai as o};
|
|
2
|
+
`,t),i=s===-1?r.length:s+1,o=s===-1?r.length:s,a=r.slice(t,o),l=a.endsWith("\r")?a.slice(0,-1):a,c=l.match(/^ {0,3}(`{3,}|~{3,})/),u=n!==void 0;if(!n&&c?n={marker:c[1][0],length:c[1].length}:n&&new RegExp(`^ {0,3}\\${n.marker}{${n.length},}[ \\t]*$`).test(l)&&(n=void 0),e.push({text:l,start:t,end:i,fenced:u||c!==null,lineNumber:e.length+1}),s===-1)break;t=i}return e}function Is(r,e){let t=wr(r),n=[];for(let s=0;s<t.length;s+=1){let i=t[s];if(i.fenced||i.text.trimEnd().replace(/^ {0,3}/,"")!==e)continue;let o=r.length;for(let a=s+1;a<t.length;a+=1)if(!t[a].fenced&&/^ {0,3}#{1,2}(?:[ \t]+|$)/.test(t[a].text)){o=t[a].start;break}n.push({headingLine:s,start:i.start,end:o})}return n}function Mt(r){let e=r.trim(),t=e.length-1;if(!e.startsWith("|")||!e.endsWith("|")||Ir(e,t))return;let n=[],s="";for(let i=1;i<e.length-1;i+=1){let o=e[i];o==="|"&&Ir(e,i)?s+=o:o==="|"?(n.push(Er(s.trim())),s=""):s+=o}return n.push(Er(s.trim())),n}function Er(r){let e="";for(let t=0;t<r.length;t+=1)r[t]==="\\"&&(r[t+1]==="\\"||r[t+1]==="|")&&(t+=1),e+=r[t];return e}function Ir(r,e){let t=0;for(let n=e-1;n>=0&&r[n]==="\\";n-=1)t+=1;return t%2===1}function Fe(r,e,t={}){return{success:!1,code:r,message:e,...t}}function aa(r){let e=Is(r,_s);if(e.length===0)return Fe("MISSING_BELIEF_STATE","Markdown does not contain a Belief State section.");if(e.length>1)return Fe("DUPLICATE_BELIEF_STATE","Markdown contains more than one Belief State section.");let t=wr(r),n=e[0],s=t.slice(n.headingLine+1).filter(c=>c.start<n.end&&c.text.trim()!==""),i=s[0]&&Mt(s[0].text),o=s[1]&&Mt(s[1].text);if(!i||i.length!==Dt.length||i.some((c,u)=>c!==Dt[u])||!o||o.length!==Dt.length||o.some(c=>!/^:?-{3,}:?$/.test(c)))return Fe("INVALID_BELIEF_HEADERS","Belief State must use the canonical four-column headers.");let a=[],l=new Set;for(let c of s.slice(2)){let u=Mt(c.text);if(!u||u.length!==4||u[3].length===0)return Fe("MALFORMED_BELIEF_ROW","Belief State contains a malformed row.",{line:c.lineNumber});let d=u[0].match(/^`([^`]+)`$/);if(!d||!bs.test(d[1]))return Fe("INVALID_BELIEF_KEY","Belief keys must be backtick-wrapped kebab-case.",{line:c.lineNumber});let p=d[1];if(l.has(p))return Fe("DUPLICATE_BELIEF_KEY",`Belief key '${p}' appears more than once.`,{line:c.lineNumber,key:p});for(let[y,x]of[[1,"probability"],[2,"target"]])if(!Es.test(u[y]))return Fe("INVALID_BELIEF_PERCENT",`Belief ${x} must be an integer from 0% to 100%.`,{line:c.lineNumber,column:x});l.add(p),a.push({key:p,probability:Number.parseInt(u[1],10),target:Number.parseInt(u[2],10),basis:u[3]})}return{success:!0,state:{entries:a}}}var Ss=2e3,ws=12,Ts=100;function ks(r){if(!Os(r,["type","widget"])||r.type!=="widget"||!Tr(r.widget))return;let e=r.widget;if(e.kind==="callout")return!Sr(e,["kind","text"],["title","tone"])||!ct(e.text)||e.title!==void 0&&!ct(e.title)||e.tone!==void 0&&e.tone!=="info"&&e.tone!=="success"&&e.tone!=="warning"?void 0:{type:"widget",widget:{kind:"callout",text:e.text,...typeof e.title=="string"?{title:e.title}:{},...e.tone?{tone:e.tone}:{}}};if(e.kind==="table"){if(!Sr(e,["kind","columns","rows"],["caption"])||!Array.isArray(e.columns)||!Array.isArray(e.rows))return;let t=e.columns,n=e.rows;return t.length===0||t.length>ws||!t.every(ct)||n.length>Ts||!n.every(s=>Array.isArray(s)&&s.length===t.length&&s.every(ct))||e.caption!==void 0&&!ct(e.caption)?void 0:{type:"widget",widget:{kind:"table",columns:[...t],rows:n.map(s=>[...s]),...typeof e.caption=="string"?{caption:e.caption}:{}}}}}function ct(r){return typeof r=="string"&&r.length<=Ss}function Tr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Os(r,e){return Tr(r)&&Object.keys(r).length===e.length&&e.every(t=>t in r)}function Sr(r,e,t){let n=Object.keys(r);return e.every(s=>s in r)&&n.every(s=>e.includes(s)||t.includes(s))}function oa(r={}){return{startedToolIds:new Set,allowInterrupts:r.allowInterrupts??!0,allowGenUI:r.allowGenUI??!1}}function ca(r,e){if(r.type===Xe.AI){let t=[],n=e?.startedToolIds??new Set;if(typeof r.data.content=="string"&&r.data.content&&t.push({type:"message.delta",text:r.data.content}),e?.allowGenUI&&Array.isArray(r.data.content))for(let s of r.data.content){let i=ks(s);i&&t.push({type:"genui.render",block:i})}for(let s of r.data.tool_call_chunks??[])s.id&&s.name&&!n.has(s.id)&&(n.add(s.id),t.push({type:"tool.started",id:s.id,name:s.name}));for(let s of r.data.tool_calls??[])n.has(s.id)||(n.add(s.id),t.push({type:"tool.started",id:s.id,name:s.name}));return t}if(r.type===Xe.TOOL&&r.data.tool_call_id)return[{type:"tool.completed",id:r.data.tool_call_id}];if(r.type===Xe.INTERRUPT){if(e&&!e.allowInterrupts)return[{type:"stream.completed"}];let t=Rs(r);return t?[{type:"interrupt.created",interrupt:t},{type:"stream.completed"}]:[{type:"stream.completed"}]}if(r.type===Xe.MESSAGE_COMPLETED)return[{type:"message.completed",messageId:r.data.id},{type:"stream.completed"}];if(r.type===Xe.ERROR){let t=typeof r.data.code=="string"?r.data.code:"stream_error";return t==="aborted"||t==="superseded"?[{type:"stream.completed"}]:[{type:"error",error:{code:"STREAM_FAILED",message:typeof r.data.content=="string"&&r.data.content?r.data.content:"Stream failed",retryable:!1}},{type:"stream.completed"}]}return r.type===Xe.MESSAGE_FAILED?[{type:"error",error:{code:"STREAM_FAILED",message:"Stream failed",retryable:!0}},{type:"stream.completed"}]:[]}function Rs(r){let e=As(r.data.content);if(!e)return;let t=r.id,n=typeof t=="string"?t:r.data.id;if(n)return{id:n,type:typeof e.type=="string"?e.type:"input",prompt:typeof e.prompt=="string"?e.prompt:typeof e.message=="string"?e.message:"Input required",...Ft(e.data)?{data:e.data}:{}}}function As(r){if(!r)return{};if(Ft(r))return r;if(typeof r=="string")try{let e=JSON.parse(r);return Ft(e)?e:{prompt:r}}catch{return{prompt:r}}}function Ft(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}var Cs=64*1024,Z=ve.string().min(1).max(Cs),Ns=["abort","a2a.cancel","shutdown"],ua=ve.object({commandId:Z,tenantId:Z,assistantId:Z,threadId:Z,runId:Z,reason:ve.enum(Ns),createdAt:Z}).strict(),da=ve.object({tenantId:Z,assistantId:Z,threadId:Z,interruptId:Z}).strict(),fa=ve.object({taskId:Z,lastEventId:Z,updatedAt:Z}).strict(),Ls="x-axiom-affinity";function pa(r){return r?{[Ls]:r}:{}}var js=["inline","fullscreen","pip"],Ps=4096,$s=r=>typeof r=="object"&&r!==null;function ha(r){if(!$s(r))return null;let e=js.includes(r.displayMode)?r.displayMode:"inline",t=typeof r.title=="string"?r.title:void 0;if(r.kind==="mcp"&&typeof r.serverKey=="string"&&typeof r.resourceUri=="string")return{kind:"mcp",serverKey:r.serverKey,resourceUri:r.resourceUri,displayMode:e,...t?{title:t}:{},...r.structuredContent!==void 0?{structuredContent:r.structuredContent}:{}};if(r.kind==="plugin"&&typeof r.pluginType=="string"&&typeof r.resource=="string"){let n=typeof r.scope=="string"&&r.scope.length>0&&r.scope.length<=Ps?r.scope:void 0;return{kind:"plugin",pluginType:r.pluginType,resource:r.resource,displayMode:e,...t?{title:t}:{},...n?{scope:n}:{}}}return null}var ma=3;var sn=j(F());var ai=j(F(),1);var pt=j(F(),1);var b=r=>typeof r=="string",lt=()=>{let r,e,t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},Vt=r=>r==null?"":String(r),Ds=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},Ms=/###/g,kr=r=>r&&r.includes("###")?r.replace(Ms,"."):r,Or=r=>!r||b(r),ut=(r,e,t)=>{let n=b(e)?e.split("."):e,s=0;for(;s<n.length-1;){if(Or(r))return{};let i=kr(n[s]);!r[i]&&t&&(r[i]=new t),Object.prototype.hasOwnProperty.call(r,i)?r=r[i]:r={},++s}return Or(r)?{}:{obj:r,k:kr(n[s])}},Rr=(r,e,t)=>{let{obj:n,k:s}=ut(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=ut(r,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=ut(r,o,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=t},Fs=(r,e,t,n)=>{let{obj:s,k:i}=ut(r,e,Object);s[i]=s[i]||[],s[i].push(t)},It=(r,e)=>{let{obj:t,k:n}=ut(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},Vs=(r,e,t)=>{let n=It(r,t);return n!==void 0?n:It(e,t)},$r=(r,e,t)=>{for(let n in e)n!=="__proto__"&&n!=="constructor"&&(Object.prototype.hasOwnProperty.call(r,n)?b(r[n])||r[n]instanceof String||b(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):$r(r[n],e[n],t):r[n]=e[n]);return r},de=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Us={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Bs=r=>b(r)?r.replace(/[&<>"'\/]/g,e=>Us[e]):r,zt=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},zs=[" ",",","?","!",";"],Ks=new zt(20),Hs=(r,e,t)=>{e=e||"",t=t||"";let n=zs.filter(o=>!e.includes(o)&&!t.includes(o));if(n.length===0)return!0;let s=Ks.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`),i=!s.test(r);if(!i){let o=r.indexOf(t);o>0&&!s.test(r.substring(0,o))&&(i=!0)}return i},Kt=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;let n=e.split(t),s=r;for(let i=0;i<n.length;){if(!s||typeof s!="object")return;let o,a="";for(let l=i;l<n.length;++l)if(l!==i&&(a+=t),a+=n[l],o=s[a],o!==void 0){if(["string","number","boolean"].includes(typeof o)&&l<n.length-1)continue;i+=l-i+1;break}s=o}return s},dt=r=>r?.replace(/_/g,"-"),Zs={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){console?.[r]?.apply?.(console,e)}},Ht=class r{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Zs,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,n,s){return s&&!this.debug?null:(e=e.map(i=>b(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),b(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new r(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new r(this.logger,e)}},ae=new Ht,Qe=class{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);let s=this.observers[n].get(t)||0;this.observers[n].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...s)=>{t(...s),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s(e,...t)})}},St=class extends Qe{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.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,n,s={}){let i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,a;e.includes(".")?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):b(n)&&i?a.push(...n.split(i)):a.push(n)));let l=It(this.data,a);return!l&&!t&&!n&&e.includes(".")&&(e=a[0],t=a[1],n=a.slice(2).join(".")),l||!o||!b(n)?l:Kt(this.data?.[e]?.[t],n,i)}addResource(e,t,n,s,i={silent:!1}){let o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.includes(".")&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),Rr(this.data,a,s),i.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(let i in n)(b(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,i,o={silent:!1,skipCopy:!1}){let a=[e,t];e.includes(".")&&(a=e.split("."),s=n,n=t,t=a[1]),this.addNamespaces(t);let l=It(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?$r(l,n,i):l={...l,...n},Rr(this.data,a,l),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}},Dr={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(i=>{e=this.processors[i]?.process(e,t,n,s)??e}),e}},Mr=Symbol("i18next/PATH_KEY");function Ws(){let r=[],e=Object.create(null),t;return e.get=(n,s)=>(t?.revoke?.(),s===Mr?r:(r.push(s),t=Proxy.revocable(n,e),t.proxy)),Proxy.revocable(Object.create(null),e).proxy}function Ve(r,e){let{[Mr]:t}=r(Ws()),n=e?.keySeparator??".",s=e?.nsSeparator??":",i=e?.enableSelector==="strict";if(t.length>1&&s){let o=e?.ns,a=i?Array.isArray(o)?o:o?[o]:null:Array.isArray(o)?o:null;if(a&&(i?a:a.length>1?a.slice(1):[]).includes(t[0]))return`${t[0]}${s}${t.slice(1).join(n)}`}return t.join(n)}var Ut=r=>!b(r)&&typeof r!="boolean"&&typeof r!="number",wt=class r extends Qe{constructor(e,t={}){super(),Ds(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ae.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let s=this.resolve(e,n);if(s?.res===void 0)return!1;let i=Ut(s.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");let s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.includes(n),a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Hs(e,n,s);if(o&&!a){let l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:b(i)?[i]:i};let c=e.split(n);(n!==s||n===s&&this.options.ns.includes(c[0]))&&(i=c.shift()),e=c.join(s)}return{key:e,namespaces:b(i)?[i]:i}}translate(e,t,n){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=Ve(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]),e=e.map(T=>typeof T=="function"?Ve(T,{...this.options,...s}):String(T));let i=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],s),c=l[l.length-1],u=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");let d=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return p?i?{res:`${c}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:`${c}${u}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:a;let y=this.resolve(e,s),x=y?.res,k=y?.usedKey||a,$=y?.exactUsedKey||a,K=["[object Number]","[object Function]","[object RegExp]"],C=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,N=s.count!==void 0&&!b(s.count),V=r.hasDefaultValue(s),ee=N?this.pluralResolver.getSuffix(d,s.count,s):"",he=s.ordinal&&N?this.pluralResolver.getSuffix(d,s.count,{ordinal:!1}):"",rt=N&&!s.ordinal&&s.count===0,te=rt&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${ee}`]||s[`defaultValue${he}`]||s.defaultValue,S=x;M&&!x&&V&&(S=te);let R=Ut(S),O=Object.prototype.toString.apply(S);if(M&&S&&R&&!K.includes(O)&&!(b(C)&&Array.isArray(S))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(k,S,{...s,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(y.res=T,y.usedParams=this.getUsedParamsDetails(s),y):T}if(o){let T=Array.isArray(S),A=T?[]:{},be=T?$:k;for(let W in S)if(Object.prototype.hasOwnProperty.call(S,W)){let re=`${be}${o}${W}`;V&&!x?A[W]=this.translate(re,{...s,defaultValue:Ut(te)?te[W]:void 0,joinArrays:!1,ns:l}):A[W]=this.translate(re,{...s,joinArrays:!1,ns:l}),A[W]===re&&(A[W]=S[W])}x=A}}else if(M&&b(C)&&Array.isArray(x))x=x.join(C),x&&(x=this.extendTranslation(x,e,s,n));else{let T=!1,A=!1;!this.isValidLookup(x)&&V&&(T=!0,x=te),this.isValidLookup(x)||(A=!0,x=a);let W=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:x,re=V&&te!==x&&this.options.updateMissing;if(A||T||re){if(this.logger.log(re?"updateKey":"missingKey",d,c,N&&!re?`${a}${this.pluralResolver.getSuffix(d,s.count,s)}`:a,re?te:x),o){let H=this.resolve(a,{...s,keySeparator:!1});H&&H.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 nt=[],gt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&>&>[0])for(let H=0;H<gt.length;H++)nt.push(gt[H]);else this.options.saveMissingTo==="all"?nt=this.languageUtils.toResolveHierarchy(s.lng||this.language):nt.push(s.lng||this.language);let ar=(H,Ee,st)=>{let or=V&&st!==x?st:W;this.options.missingKeyHandler?this.options.missingKeyHandler(H,c,Ee,or,re,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(H,c,Ee,or,re,s),this.emit("missingKey",H,c,Ee,x)};this.options.saveMissing&&(this.options.saveMissingPlurals&&N?nt.forEach(H=>{let Ee=this.pluralResolver.getSuffixes(H,s);rt&&s[`defaultValue${this.options.pluralSeparator}zero`]&&!Ee.includes(`${this.options.pluralSeparator}zero`)&&Ee.push(`${this.options.pluralSeparator}zero`),Ee.forEach(st=>{ar([H],a+st,s[`defaultValue${st}`]||te)})}):ar(nt,a,te))}x=this.extendTranslation(x,e,s,y,n),A&&x===a&&this.options.appendNamespaceToMissingKey&&(x=`${c}${u}${a}`),(A||T)&&this.options.parseMissingKeyHandler&&(x=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${a}`:a,T?x:void 0,s))}return i?(y.res=x,y.usedParams=this.getUsedParamsDetails(s),y):x}extendTranslation(e,t,n,s,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let l=b(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(l){let d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let u=n.replace&&!b(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||s.usedLng,n),l){let d=e.match(this.interpolator.nestingRegexp),p=d&&d.length;c<p&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>i?.[0]===d[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),n)),n.interpolation&&this.interpolator.reset()}let o=n.postProcess||this.options.postProcess,a=b(o)?[o]:o;return e!=null&&a?.length&&n.applyPostProcessor!==!1&&(e=Dr.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,i,o,a;return b(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?Ve(l,{...this.options,...t}):l)),e.forEach(l=>{if(this.isValidLookup(n))return;let c=this.extractFromKey(l,t),u=c.key;s=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));let p=t.count!==void 0&&!b(t.count),y=p&&!t.ordinal&&t.count===0,x=t.context!==void 0&&(b(t.context)||typeof t.context=="number")&&t.context!=="",k=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach($=>{this.isValidLookup(n)||(a=$,!this.checkedLoadedFor[`${k[0]}-${$}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${k[0]}-${$}`]=!0,this.logger.warn(`key "${s}" for languages "${k.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),k.forEach(K=>{if(this.isValidLookup(n))return;o=K;let C=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(C,u,K,$,t);else{let N;p&&(N=this.pluralResolver.getSuffix(K,t.count,t));let V=`${this.options.pluralSeparator}zero`,ee=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&N.startsWith(ee)&&C.push(u+N.replace(ee,this.options.pluralSeparator)),C.push(u+N),y&&C.push(u+V)),x){let he=`${u}${this.options.contextSeparator||"_"}${t.context}`;C.push(he),p&&(t.ordinal&&N.startsWith(ee)&&C.push(he+N.replace(ee,this.options.pluralSeparator)),C.push(he+N),y&&C.push(he+V))}}let M;for(;M=C.pop();)this.isValidLookup(n)||(i=M,n=this.getResource(K,$,M,t))}))})}),{res:n,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(e={}){let t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!b(e.replace),s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s={...s,count:e.count}),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(let i of t)delete s[i]}return s}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n.startsWith(t)&&e[n]!==void 0)return!0;return!1}},Tt=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ae.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=dt(e),!e||!e.includes("-"))return null;let t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=dt(e),!e||!e.includes("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(b(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;let s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;let s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return t=s;let i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(o=>o===i?!0:!o.includes("-")&&!i.includes("-")?!1:!!(o.includes("-")&&!i.includes("-")&&o.slice(0,o.indexOf("-"))===i||o.startsWith(i)&&i.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),b(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,s=Array.isArray(n)?n.join("|"):n;s!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=s);let i=t===void 0||t===!1||b(t),o=t===void 0&&typeof this.options.fallbackLng=="function",a=b(e)&&i&&!o,l=null;if(a){let p;t===void 0?p="undefined":t===!1?p="boolean:false":p=`string:${t}`,l=`${e.length}:${e}|${p}`}if(l!==null){let p=this.resolveHierarchyCache[l];if(p!==void 0)return p.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),u=[],d=p=>{p&&(this.isSupportedCode(p)?u.push(p):this.logger.warn(`rejecting language code not found in supportedLngs: ${p}`))};return b(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&d(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(e))):b(e)&&d(this.formatLanguageCode(e)),c.forEach(p=>{u.includes(p)||d(this.formatLanguageCode(p))}),l!==null?(this.resolveHierarchyCache[l]=u,u.slice()):u}},Ar={zero:0,one:1,two:2,few:3,many:4,other:5},Cr={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},Zt=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ae.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=dt(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Cr;if(!e.match(/-|_/))return Cr;let l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((s,i)=>Ar[s]-Ar[i]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,n={}){let s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}},Nr=(r,e,t,n=".",s=!0)=>{let i=Vs(r,e,t);return!i&&s&&b(t)&&(i=Kt(r,t,n),i===void 0&&(i=Kt(e,t,n))),i},Lr=r=>r.replace(/\$/g,"$$$$"),kt=class{constructor(e={}){this.logger=ae.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:p,nestingPrefixEscaped:y,nestingSuffix:x,nestingSuffixEscaped:k,nestingOptionsSeparator:$,maxReplaces:K,alwaysFormat:C}=e.interpolation;this.escape=t!==void 0?t:Bs,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?de(i):o||"{{",this.suffix=a?de(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d?de(d):"-",this.unescapeSuffix=this.unescapePrefix?"":u?de(u):"",this.nestingPrefix=p?de(p):y||de("$t("),this.nestingSuffix=x?de(x):k||de(")"),this.nestingOptionsSeparator=$||",",this.maxReplaces=K||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(t,n)=>t?.source===n?(t.lastIndex=0,t):new RegExp(n,"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,n,s){let i,o,a,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=y=>{if(!y.includes(this.formatSeparator)){let K=Nr(t,l,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(K,void 0,n,{...s,...t,interpolationkey:y}):K}let x=y.split(this.formatSeparator),k=x.shift().trim(),$=x.join(this.formatSeparator).trim();return this.format(Nr(t,l,k,this.options.keySeparator,this.options.ignoreJSONStructure),$,n,{...s,...t,interpolationkey:k})};this.resetRegExp(),!this.escapeValue&&typeof e=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false \u2014 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 u=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>y},{regex:this.regexp,safeValue:y=>this.escapeValue?this.escape(y):y}].forEach(y=>{for(a=0;i=y.regex.exec(e);){let x=i[1].trim();if(o=c(x),o===void 0)if(typeof u=="function"){let $=u(e,i,s);o=b($)?$:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))o="";else if(d){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${e}`),o="";else!b(o)&&!this.useRawValueToEscape&&(o=Vt(o));let k=y.safeValue(o);if(e=e.replace(i[0],Lr(k)),d?(y.regex.lastIndex+=k.length,y.regex.lastIndex-=i[0].length):y.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,i,o,a=(l,c)=>{let u=this.nestingOptionsSeparator;if(!l.includes(u))return l;let d=l.split(new RegExp(`${de(u)}[ ]*{`)),p=`{${d[1]}`;l=d[0],p=this.interpolate(p,o);let y=p.match(/'/g),x=p.match(/"/g);((y?.length??0)%2===0&&!x||(x?.length??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),c&&(o={...c,...o})}catch(k){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,k),`${l}${u}${p}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];o={...n},o=o.replace&&!b(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=/{.*}/s.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(c!==-1&&(l=s[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),s[1]=s[1].slice(0,c)),i=t(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&!b(i))return i;b(i)||(i=Vt(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),l.length&&(i=l.reduce((u,d)=>this.format(u,d,n.lng,{...n,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],Lr(Vt(i))),this.regexp.lastIndex=0}return e}},Ys=r=>{let e=r.toLowerCase().trim(),t={};if(r.includes("(")){let n=r.split("(");e=n[0].toLowerCase().trim();let s=n[1].slice(0,-1);e==="currency"&&!s.includes(":")?t.currency||(t.currency=s.trim()):e==="relativetime"&&!s.includes(":")?t.range||(t.range=s.trim()):s.split(";").forEach(o=>{if(o){let[a,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();t[u]||(t[u]=c),c==="false"&&(t[u]=!1),c==="true"&&(t[u]=!0),isNaN(c)||(t[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},jr=r=>{let e={};return(t,n,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});let o=n+JSON.stringify(i),a=e[o];return a||(a=r(dt(n),s),e[o]=a),a(t)}},qs=r=>(e,t,n)=>r(dt(t),n)(e),Wt=class{constructor(e={}){this.logger=ae.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?jr:qs;this.formats={number:n((s,i)=>{let o=new Intl.NumberFormat(s,{...i});return a=>o.format(a)}),currency:n((s,i)=>{let o=new Intl.NumberFormat(s,{...i,style:"currency"});return a=>o.format(a)}),datetime:n((s,i)=>{let o=new Intl.DateTimeFormat(s,{...i});return a=>o.format(a)}),relativetime:n((s,i)=>{let o=new Intl.RelativeTimeFormat(s,{...i});return a=>o.format(a,i.range||"day")}),list:n((s,i)=>{let o=new Intl.ListFormat(s,{...i});return a=>o.format(a)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=jr(t)}format(e,t,n,s={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),o=[];for(let l=0;l<i.length;l++){let c=i[l];for(;c.indexOf("(")>-1&&!c.includes(")")&&l+1<i.length;)c=`${c}${this.formatSeparator}${i[++l]}`;o.push(c)}return o.reduce((l,c)=>{let{formatName:u,formatOptions:d}=Ys(c);if(this.formats[u]){let p=l;try{let y=s?.formatParams?.[s.interpolationkey]||{},x=y.locale||y.lng||s.locale||s.lng||n;p=this.formats[u](l,x,{...d,...s,...y})}catch(y){this.logger.warn(y)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},e)}},Js=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)},Yt=class extends Qe{constructor(e,t,n,s={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=ae.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,s.backend,s)}queueLoad(e,t,n,s){let i={},o={},a={},l={};return e.forEach(c=>{let u=!0;t.forEach(d=>{let p=`${c}|${d}`;!n.reload&&this.store.hasResourceBundle(c,d)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?o[p]===void 0&&(o[p]=!0):(this.state[p]=1,u=!1,o[p]===void 0&&(o[p]=!0),i[p]===void 0&&(i[p]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(a[c]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){let s=e.split("|"),i=s[0],o=s[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let a={};this.queue.forEach(l=>{Fs(l.loaded,[i],o),Js(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});let u=l.loaded[c];u.length&&u.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,t,n,s=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:i,callback:o});return}this.readingCalls++;let a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){let d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&s<this.maxRetries){setTimeout(()=>{this.read(e,t,n,s+1,i*2,o)},i);return}o(c,u)},l=this.backend[n].bind(this.backend);if(l.length===2){try{let c=l(e,t);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(e,t,a)}prepareLoading(e,t,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();b(e)&&(e=this.languageUtils.toResolveHierarchy(e)),b(t)&&(t=[t]);let i=this.queueLoad(e,t,n,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){let n=e.split("|"),s=n[0],i=n[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,t,n,s,i,o={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend?.create){let l={...o,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(e,t,n,s,l):u=c(e,t,n,s),u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}else c(e,t,n,s,a,l)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}},Bt=()=>({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:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),b(r[1])&&(e.defaultValue=r[1]),b(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){let t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Pr=r=>(b(r.ns)&&(r.ns=[r.ns]),b(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),b(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&!r.supportedLngs.includes("cimode")&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r),Et=()=>{},Gs=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})},qt=class r extends Qe{constructor(e={},t){if(super(),this.options=Pr(e),this.services={},this.logger=ae,this.modules={external:[]},Gs(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,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(b(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));let n=Bt();this.options={...n,...this.options,...Pr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ae.init(s(this.modules.logger),this.options):ae.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Wt;let u=new Tt(this.options);this.store=new St(this.options.resources,this.options);let d=this.services;d.logger=ae,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new Zt(u,{prepend:this.options.pluralSeparator}),c&&(d.formatter=s(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new kt(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Yt(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(p,...y)=>{this.emit(p,...y)}),this.modules.languageDetector&&(d.languageDetector=s(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=s(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new wt(this.services,this.options),this.translator.on("*",(p,...y)=>{this.emit(p,...y)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Et),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});let a=lt(),l=()=>{let c=(u,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),t(u,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,t=Et){let n=t,s=b(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();let i=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&(i.includes(c)||i.push(c))})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload?.forEach?.(a=>o(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,t,n){let s=lt();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Et),this.services.backendConnector.reload(e,t,i=>{s.resolve(),n(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Dr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let t=0;t<this.languages.length;t++){let n=this.languages[t];if(!["cimode","dev"].includes(n)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;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 n=lt();this.emit("languageChanging",e);let s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),t&&t(a,(...c)=>this.t(...c))},o=a=>{!e&&!a&&this.services.languageDetector&&(a=[]);let l=b(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(b(a)?[a]:a);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,u=>{i(u,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),n}getFixedT(e,t,n,s){let i=s?.scopeNs,o=(a,l,...c)=>{let u;typeof l!="object"?u=this.options.overloadTranslationOptionHandler([a,l].concat(c)):u={...l},u.lng=u.lng||o.lng,u.lngs=u.lngs||o.lngs;let d=u.ns!==void 0&&u.ns!==null;u.ns=u.ns||o.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||o.keyPrefix);let p={...this.options,...u};Array.isArray(i)&&!d&&(p.ns=i),typeof u.keyPrefix=="function"&&(u.keyPrefix=Ve(u.keyPrefix,p));let y=this.options.keySeparator||".",x;return u.keyPrefix&&Array.isArray(a)?x=a.map(k=>(typeof k=="function"&&(k=Ve(k,p)),`${u.keyPrefix}${y}${k}`)):(typeof a=="function"&&(a=Ve(a,p)),x=u.keyPrefix?`${u.keyPrefix}${y}${a}`:a),this.t(x,u)};return b(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}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 n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;let o=(a,l)=>{let c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(t.precheck){let a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!s||o(i,e)))}loadNamespaces(e,t){let n=lt();return this.options.ns?(b(e)&&(e=[e]),e.forEach(s=>{this.options.ns.includes(s)||this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=lt();b(e)&&(e=[e]);let s=this.options.preload||[],i=e.filter(o=>!s.includes(o)&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(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 s=new Intl.Locale(e);if(s&&s.getTextInfo){let i=s.getTextInfo();if(i&&i.direction)return i.direction}}catch{}let t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services?.languageUtils||new Tt(Bt());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){let n=new r(e,t);return n.createInstance=r.createInstance,n}cloneInstance(e={},t=Et){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let s={...this.options,...e,isClone:!0},i=new r(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){let a=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,d)=>(u[d]={...l[c][d]},u),l[c]),l),{});i.store=new St(a,s),i.services.resourceStore=i.store}if(e.interpolation){let l={...Bt().interpolation,...this.options.interpolation,...e.interpolation},c={...s,interpolation:l};i.services.interpolator=new kt(c)}return i.translator=new wt(i.services,s),i.translator.on("*",(a,...l)=>{i.emit(a,...l)}),i.init(s,t),i.translator.options=s,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}}},z=qt.createInstance(),Jt=z.createInstance,ya=z.dir,xa=z.init,va=z.loadResources,_a=z.reloadResources,ba=z.use,Ea=z.changeLanguage,Ia=z.getFixedT,Sa=z.t,wa=z.exists,Ta=z.setDefaultNamespace,ka=z.hasLoadedNamespace,Oa=z.loadNamespaces,Ra=z.loadLanguages;var Ot=(r,e,t,n)=>{let s=[t,{code:e,...n||{}}];if(r?.services?.logger?.forward)return r.services.logger.forward(s,"warn","react-i18next::",!0);X(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),r?.services?.logger?.warn?r.services.logger.warn(...s):console?.warn&&console.warn(...s)},Fr={},fe=(r,e,t,n)=>{X(t)&&Fr[t]||(X(t)&&(Fr[t]=new Date),Ot(r,e,t,n))},Vr=(r,e)=>()=>{if(r.isInitialized)e();else{let t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},Rt=(r,e,t)=>{r.loadNamespaces(e,Vr(r,t))},Gt=(r,e,t,n)=>{if(X(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return Rt(r,t,n);t.forEach(s=>{r.options.ns.indexOf(s)<0&&r.options.ns.push(s)}),r.loadLanguages(e,Vr(r,n))},Ur=(r,e,t={})=>!e.languages||!e.languages.length?(fe(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(n,s)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!s(n.isLanguageChangingTo,r))return!1}});var X=r=>typeof r=="string",Xt=r=>typeof r=="object"&&r!==null;var Xs=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Qs={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},ei=r=>Qs[r],Qt=r=>r.replace(Xs,ei);var ti={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Qt,transDefaultProps:void 0};var ft=()=>ti;var ri;var Q=()=>ri;var Kr=j(F(),1);var pe=(0,Kr.createContext)(),At=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};var qr=j(F(),1);var Ue=j(F(),1);var et=class r extends Error{constructor(e,t,n){super(e),this.name="TranslationParserError",this.position=t,this.translationString=n,Error.captureStackTrace&&Error.captureStackTrace(this,r)}};var Hr={" ":"\xA0","&":"&","<":"<",">":">",""":'"',"'":"'","©":"\xA9","®":"\xAE","™":"\u2122","…":"\u2026","–":"\u2013","—":"\u2014","‘":"\u2018","’":"\u2019","‚":"\u201A","“":"\u201C","”":"\u201D","„":"\u201E","†":"\u2020","‡":"\u2021","•":"\u2022","′":"\u2032","″":"\u2033","‹":"\u2039","›":"\u203A","§":"\xA7","¶":"\xB6","·":"\xB7"," ":"\u2002"," ":"\u2003"," ":"\u2009","€":"\u20AC","£":"\xA3","¥":"\xA5","¢":"\xA2","¤":"\xA4","×":"\xD7","÷":"\xF7","−":"\u2212","±":"\xB1","≠":"\u2260","≤":"\u2264","≥":"\u2265","≈":"\u2248","≡":"\u2261","∞":"\u221E","∫":"\u222B","∑":"\u2211","∏":"\u220F","√":"\u221A","∂":"\u2202","‰":"\u2030","°":"\xB0","µ":"\xB5","←":"\u2190","↑":"\u2191","→":"\u2192","↓":"\u2193","↔":"\u2194","↵":"\u21B5","⇐":"\u21D0","⇑":"\u21D1","⇒":"\u21D2","⇓":"\u21D3","⇔":"\u21D4","α":"\u03B1","β":"\u03B2","γ":"\u03B3","δ":"\u03B4","ε":"\u03B5","ζ":"\u03B6","η":"\u03B7","θ":"\u03B8","ι":"\u03B9","κ":"\u03BA","λ":"\u03BB","μ":"\u03BC","ν":"\u03BD","ξ":"\u03BE","ο":"\u03BF","π":"\u03C0","ρ":"\u03C1","σ":"\u03C3","τ":"\u03C4","υ":"\u03C5","φ":"\u03C6","χ":"\u03C7","ψ":"\u03C8","ω":"\u03C9","Α":"\u0391","Β":"\u0392","Γ":"\u0393","Δ":"\u0394","Ε":"\u0395","Ζ":"\u0396","Η":"\u0397","Θ":"\u0398","Ι":"\u0399","Κ":"\u039A","Λ":"\u039B","Μ":"\u039C","Ν":"\u039D","Ξ":"\u039E","Ο":"\u039F","Π":"\u03A0","Ρ":"\u03A1","Σ":"\u03A3","Τ":"\u03A4","Υ":"\u03A5","Φ":"\u03A6","Χ":"\u03A7","Ψ":"\u03A8","Ω":"\u03A9","À":"\xC0","Á":"\xC1","Â":"\xC2","Ã":"\xC3","Ä":"\xC4","Å":"\xC5","Æ":"\xC6","Ç":"\xC7","È":"\xC8","É":"\xC9","Ê":"\xCA","Ë":"\xCB","Ì":"\xCC","Í":"\xCD","Î":"\xCE","Ï":"\xCF","Ð":"\xD0","Ñ":"\xD1","Ò":"\xD2","Ó":"\xD3","Ô":"\xD4","Õ":"\xD5","Ö":"\xD6","Ø":"\xD8","Ù":"\xD9","Ú":"\xDA","Û":"\xDB","Ü":"\xDC","Ý":"\xDD","Þ":"\xDE","ß":"\xDF","à":"\xE0","á":"\xE1","â":"\xE2","ã":"\xE3","ä":"\xE4","å":"\xE5","æ":"\xE6","ç":"\xE7","è":"\xE8","é":"\xE9","ê":"\xEA","ë":"\xEB","ì":"\xEC","í":"\xED","î":"\xEE","ï":"\xEF","ð":"\xF0","ñ":"\xF1","ò":"\xF2","ó":"\xF3","ô":"\xF4","õ":"\xF5","ö":"\xF6","ø":"\xF8","ù":"\xF9","ú":"\xFA","û":"\xFB","ü":"\xFC","ý":"\xFD","þ":"\xFE","ÿ":"\xFF","¡":"\xA1","¿":"\xBF","ƒ":"\u0192","ˆ":"\u02C6","˜":"\u02DC","Œ":"\u0152","œ":"\u0153","Š":"\u0160","š":"\u0161","Ÿ":"\u0178","ª":"\xAA","º":"\xBA","¯":"\xAF","´":"\xB4","¸":"\xB8","¹":"\xB9","²":"\xB2","³":"\xB3","¼":"\xBC","½":"\xBD","¾":"\xBE","♠":"\u2660","♣":"\u2663","♥":"\u2665","♦":"\u2666","◊":"\u25CA","‾":"\u203E","⁄":"\u2044","℘":"\u2118","ℑ":"\u2111","ℜ":"\u211C","ℵ":"\u2135"},oi=new RegExp(Object.keys(Hr).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g"),Zr=r=>r.replace(oi,e=>Hr[e]).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&#x([0-9a-fA-F]+);/g,(e,t)=>String.fromCharCode(parseInt(t,16)));var Wr=r=>{let e=[],t=0,n="",s=()=>{n&&(e.push({type:"Text",value:n,position:t-n.length}),n="")};for(;t<r.length;){let i=r[t];if(i==="<"){let o=r.slice(t).match(/^<(\d+)>/);if(o)s(),e.push({type:"TagOpen",value:o[0],position:t,tagNumber:parseInt(o[1],10)}),t+=o[0].length;else{let a=r.slice(t).match(/^<\/(\d+)>/);a?(s(),e.push({type:"TagClose",value:a[0],position:t,tagNumber:parseInt(a[1],10)}),t+=a[0].length):(n+=i,t+=1)}}else n+=i,t+=1}return s(),e};var ht=j(F(),1);var ci=(r,e,t)=>{let{type:n,props:s={}}=r;if(s.children&&Array.isArray(s.children)&&t){let{children:i,...o}=s;return ht.default.createElement(n,o,...e)}return e.length===0?ht.default.createElement(n,s):e.length===1?ht.default.createElement(n,s,e[0]):ht.default.createElement(n,s,...e)},Yr=(r,e=[])=>{if(!r)return[];let t=Wr(r),n=[],s=[],i=new Set,o=()=>{if(s.length===0)return e;let a=s[s.length-1];return a.declaration.props?.children&&Array.isArray(a.declaration.props.children)?a.declaration.props.children:a.declarations};if(t.forEach(a=>{switch(a.type){case"Text":{let l=Zr(a.value);(s.length>0?s[s.length-1].children:n).push(l)}break;case"TagOpen":{let{tagNumber:l}=a,c=o(),u=c[l];if(!u){i.add(l);let d=`<${l}>`;(s.length>0?s[s.length-1].children:n).push(d);break}s.push({tagNumber:l,children:[],position:a.position,declaration:u,declarations:c})}break;case"TagClose":{let{tagNumber:l}=a;if(i.has(l)){let p=`</${l}>`;(s.length>0?s[s.length-1].children:n).push(p),i.delete(l);break}if(s.length===0)throw new et(`Unexpected closing tag </${l}> at position ${a.position}`,a.position,r);let c=s.pop();if(c.tagNumber!==l)throw new et(`Mismatched tags: expected </${c.tagNumber}> but got </${l}> at position ${a.position}`,a.position,r);let u=ci(c.declaration,c.children,c.declarations);(s.length>0?s[s.length-1].children:n).push(u)}break}}),s.length>0){let a=s[s.length-1];throw new et(`Unclosed tag <${a.tagNumber}> at position ${a.position}`,a.position,r)}return n};function Ct({i18nKey:r,defaultTranslation:e,content:t,ns:n,values:s={},i18n:i,t:o}){let a=i||Q();if(!a)return fe(a,"NO_I18NEXT_INSTANCE","IcuTrans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:r}),Ue.default.createElement(Ue.default.Fragment,{},e);let l=o||a.t?.bind(a)||(p=>p),c=n||l.ns||a.options?.defaultNS;c=X(c)?[c]:c||["translation"];let u=s;a.options?.interpolation?.defaultVariables&&(u=s&&Object.keys(s).length>0?{...s,...a.options.interpolation.defaultVariables}:{...a.options.interpolation.defaultVariables});let d=l(r||e,{defaultValue:e,...u,ns:c});try{let p=Yr(d,t);return Ue.default.createElement(Ue.default.Fragment,{},...p)}catch(p){return Ot(a,"ICU_TRANS_RENDER_ERROR",`IcuTrans component error for key "${r}": ${p.message}`,{i18nKey:r,error:p}),Ue.default.createElement(Ue.default.Fragment,{},d)}}Ct.displayName="IcuTransWithoutContext";function Jr({i18nKey:r,defaultTranslation:e,content:t,ns:n,values:s={},i18n:i,t:o}){let{i18n:a,defaultNS:l}=(0,qr.useContext)(pe)||{},c=i||a||Q(),u=o||c?.t.bind(c);return Ct({i18nKey:r,defaultTranslation:e,content:t,ns:n||u?.ns||l||c?.options?.defaultNS,values:s,i18n:c,t:o})}Jr.displayName="IcuTrans";var L=j(F(),1),tn=j(en(),1);var xi=(r,e)=>{if(X(e))return e;if(Xt(e)&&X(e.defaultValue))return e.defaultValue;if(typeof r=="function")return"";if(Array.isArray(r)){let t=r[r.length-1];return typeof t=="function"?"":t}return r},vi={t:xi,ready:!1},_i=()=>()=>{},mt=(r,e={})=>{let{i18n:t}=e,{i18n:n,defaultNS:s}=(0,L.useContext)(pe)||{},i=t||n||Q();i&&!i.reportNamespaces&&(i.reportNamespaces=new At),i||fe(i,"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,L.useMemo)(()=>({...ft(),...i?.options?.react,...e}),[i,e]),{useSuspense:a,keyPrefix:l}=o,c=r||s||i?.options?.defaultNS,u=X(c)?[c]:c||["translation"],d=(0,L.useMemo)(()=>u,u);i?.reportNamespaces?.addUsedNamespaces?.(d);let p=(0,L.useRef)(0),y=(0,L.useCallback)(S=>{if(!i)return _i;let{bindI18n:R,bindI18nStore:O}=o,T=()=>{p.current+=1,S()};return R&&i.on(R,T),O&&i.store.on(O,T),()=>{R&&R.split(" ").forEach(A=>i.off(A,T)),O&&O.split(" ").forEach(A=>i.store.off(A,T))}},[i,o]),x=(0,L.useRef)(),k=(0,L.useCallback)(()=>{if(!i)return vi;let S=!!(i.isInitialized||i.initializedStoreOnce)&&d.every(W=>Ur(W,i,o)),R=e.lng||i.language,O=p.current,T=x.current;if(T&&T.ready===S&&T.lng===R&&T.keyPrefix===l&&T.revision===O)return T;let be={t:i.getFixedT(R,o.nsMode==="fallback"?d:d[0],l,{scopeNs:d}),ready:S,lng:R,keyPrefix:l,revision:O};return x.current=be,be},[i,d,l,o,e.lng]),[$,K]=(0,L.useState)(0),{t:C,ready:M}=(0,tn.useSyncExternalStore)(y,k,k);(0,L.useEffect)(()=>{if(i&&!M&&!a){let S=()=>K(R=>R+1);e.lng?Gt(i,e.lng,d,S):Rt(i,d,S)}},[i,e.lng,d,M,a,$]);let N=i||{},V=(0,L.useRef)(null),ee=(0,L.useRef)(),he=S=>`${S.language}|${S.resolvedLanguage}|${S.languages?.join(",")}`,rt=S=>{let R=Object.getOwnPropertyDescriptors(S);R.__original&&delete R.__original;let O=Object.create(Object.getPrototypeOf(S),R);if(!Object.prototype.hasOwnProperty.call(O,"__original"))try{Object.defineProperty(O,"__original",{value:S,writable:!1,enumerable:!1,configurable:!1})}catch{}return O},te=(0,L.useMemo)(()=>{let S=N,R=S&&he(S),O=S;S&&(V.current&&V.current.__original===S?ee.current!==R?(O=rt(S),V.current=O,ee.current=R):O=V.current:(O=rt(S),V.current=O,ee.current=R));let T=!M&&!a?(...be)=>(fe(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),C(...be)):C,A=[T,O,M];return A.t=T,A.i18n=O,A.ready=M,A},[C,N,M,N.resolvedLanguage,N.language,N.languages]);if(i&&a&&!M){let S=!1;try{S=!1}catch{}throw S&&fe(i,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),new Promise(R=>{let O=()=>R();e.lng?Gt(i,e.lng,d,O):Rt(i,d,O)})}return te};var rn=j(F(),1);var Nt=j(F(),1);function tr({i18n:r,defaultNS:e,children:t}){let n=(0,Nt.useMemo)(()=>({i18n:r,defaultNS:e}),[r,e]);return(0,Nt.createElement)(pe.Provider,{value:n},t)}var wi=j(F(),1);var Ei=j(F(),1);var Ti=cr({"./locales/a2a/en.json":()=>import("./embed-page-en-XJYWUJEL.js"),"./locales/a2a/zh.json":()=>import("./embed-page-zh-6EBUEFKP.js"),"./locales/auth/en.json":()=>import("./embed-page-en-ISNUZBPO.js"),"./locales/auth/zh.json":()=>import("./embed-page-zh-MDJTBW2K.js"),"./locales/capability/en.json":()=>import("./embed-page-en-CKNSRQK4.js"),"./locales/capability/zh.json":()=>import("./embed-page-zh-UHYXJQJ2.js"),"./locales/chat/en.json":()=>import("./embed-page-en-JOTELYAL.js"),"./locales/chat/zh.json":()=>import("./embed-page-zh-BPO6ZSJM.js"),"./locales/chatConfig/en.json":()=>import("./embed-page-en-E35GE7TA.js"),"./locales/chatConfig/zh.json":()=>import("./embed-page-zh-ZLK3GLM3.js"),"./locales/chatMenu/en.json":()=>import("./embed-page-en-ZCNNAMUD.js"),"./locales/chatMenu/zh.json":()=>import("./embed-page-zh-Z3URTIHW.js"),"./locales/chatWorkspace/en.json":()=>import("./embed-page-en-HDSVQ4O6.js"),"./locales/chatWorkspace/zh.json":()=>import("./embed-page-zh-IR652A6J.js"),"./locales/common/en.json":()=>import("./embed-page-en-KAXIJJ4X.js"),"./locales/common/zh.json":()=>import("./embed-page-zh-B3WBWQAV.js"),"./locales/cospace/en.json":()=>import("./embed-page-en-YEFZNGUW.js"),"./locales/cospace/zh.json":()=>import("./embed-page-zh-HVQX6Q43.js"),"./locales/crons/en.json":()=>import("./embed-page-en-EKHHBS6L.js"),"./locales/crons/zh.json":()=>import("./embed-page-zh-KEMYJJLT.js"),"./locales/entities/en.json":()=>import("./embed-page-en-FPTYKHAK.js"),"./locales/entities/zh.json":()=>import("./embed-page-zh-NBMPWZ3W.js"),"./locales/eval/en.json":()=>import("./embed-page-en-A6F6L2TT.js"),"./locales/eval/zh.json":()=>import("./embed-page-zh-ODXFDX4F.js"),"./locales/genui/en.json":()=>import("./embed-page-en-H4P63IAK.js"),"./locales/genui/zh.json":()=>import("./embed-page-zh-IB3422D4.js"),"./locales/governance/en.json":()=>import("./embed-page-en-TMGUHZ6Y.js"),"./locales/governance/zh.json":()=>import("./embed-page-zh-RMGMUSDH.js"),"./locales/info/en.json":()=>import("./embed-page-en-3Z4N5KXB.js"),"./locales/info/zh.json":()=>import("./embed-page-zh-GXE63PQ7.js"),"./locales/integration/en.json":()=>import("./embed-page-en-BLF5THT6.js"),"./locales/integration/zh.json":()=>import("./embed-page-zh-N2STRBUG.js"),"./locales/mcpapp/en.json":()=>import("./embed-page-en-GLT2HEZZ.js"),"./locales/mcpapp/zh.json":()=>import("./embed-page-zh-XMEJPDMF.js"),"./locales/migration/en.json":()=>import("./embed-page-en-5R5CQCHP.js"),"./locales/migration/zh.json":()=>import("./embed-page-zh-6ZDI4LQX.js"),"./locales/projectRoom/en.json":()=>import("./embed-page-en-H66IJ36N.js"),"./locales/projectRoom/zh.json":()=>import("./embed-page-zh-GEYMOUQO.js"),"./locales/store/en.json":()=>import("./embed-page-en-OIICQSPX.js"),"./locales/store/zh.json":()=>import("./embed-page-zh-2UVQB4RP.js"),"./locales/tasks/en.json":()=>import("./embed-page-en-RBT7ZUI5.js"),"./locales/tasks/zh.json":()=>import("./embed-page-zh-5L4NNHXH.js"),"./locales/training/en.json":()=>import("./embed-page-en-P5NUAAD7.js"),"./locales/training/zh.json":()=>import("./embed-page-zh-GTQRI6XG.js")});var Be=["en-US","zh-CN"];function Lt(r){return r==="zh-CN"?"zh":"en"}function rr(r){return r.startsWith("zh")?"zh-CN":"en-US"}var _e=["common","a2a","auth","capability","chat","chatConfig","chatMenu","chatWorkspace","cospace","crons","entities","eval","genui","governance","info","integration","mcpapp","migration","projectRoom","store","tasks","training"];function nr(r){let[e]=r.split(".");return _e.includes(e)?e:_e[0]}var nn={type:"backend",read(r,e,t){Ti(`./locales/${e}/${r}.json`).then(n=>{let s=n.default??n;t(null,s.messages??s)}).catch(n=>t(n,null))}};function ki(r,e){let t=((n,s)=>r(n,{ns:nr(n),...s}));return t.locale=rr(e??"en"),t}function Oi(){let{t:r,i18n:e}=mt(),t=e?.language;return(0,sn.useMemo)(()=>ki(r,t),[r,t])}var sr=j(F());var an=(0,sr.createContext)(null);var ze=j(F());var ir=j(ur());function Ri({locale:r="en-US",overrides:e,storageKey:t,onLocaleChange:n,children:s}){let[i,o]=(0,ze.useState)(!1),a=(0,ze.useMemo)(()=>Jt(),[]);(0,ze.useEffect)(()=>{let c=!1;return o(!1),a.use(nn).init({lng:Lt(r),fallbackLng:"en",ns:[..._e],defaultNS:_e[0],keySeparator:!1,nsSeparator:!1,interpolation:{escapeValue:!1},resources:e?{[Lt(r)]:{[_e[0]]:e[r]??{}}}:void 0}).then(()=>a.loadNamespaces([..._e])).then(()=>{c||o(!0)}).catch(()=>{c||o(!0)}),()=>{c=!0}},[a,r,e]);let l=(0,ze.useMemo)(()=>({locale:r,supportedLocales:Be,setLocale:c=>{if(Be.includes(c)){if(t&&typeof window<"u")try{window.localStorage.setItem(t,c)}catch{}n?.(c)}}}),[r,t,n]);return i?(0,ir.jsx)(an.Provider,{value:l,children:(0,ir.jsx)(tr,{i18n:a,children:s})}):null}var on="lattice.locale";function Ai(r=on){if(!(typeof window>"u"))try{let e=window.localStorage.getItem(r);return e!==null&&Be.includes(e)?e:void 0}catch{return}}export{Xe as a,na as b,sa as c,aa as d,ks as e,oa as f,ca as g,pa as h,ha as i,ma as j,Oi as k,an as l,Ri as m,on as n,Ai as o};
|
|
3
3
|
/*! Bundled license information:
|
|
4
4
|
|
|
5
5
|
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|