@camstack/addon-admin-ui 0.1.15 → 0.1.17

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.
Files changed (51) hide show
  1. package/dist/assets/{__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-CKfGBI-Z.js → __mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-CeLhKMin.js} +1 -1
  2. package/dist/assets/{__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-CykPKLuU.js → __mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-DXPQtD9p.js} +1 -1
  3. package/dist/assets/{__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-xMlwAAY4.js → __mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-OcRSBqRe.js} +1 -1
  4. package/dist/assets/{__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-Clpxla3F.js → __mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-GvBGLFI2.js} +1 -1
  5. package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs-B_akQFxJ.js → __mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs-Dl4u0xYE.js} +1 -1
  6. package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs_commonjs-proxy-BZBxNMgx.js → __mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs_commonjs-proxy-CSyOECfO.js} +1 -1
  7. package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs-CCRqQaXq.js → __mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs-CzO_Esxm.js} +1 -1
  8. package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-B5D3mvYP.js → __mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-xw6c6JeS.js} +1 -1
  9. package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-CRHuTm5p.js → __mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-DNpf5SLz.js} +1 -1
  10. package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs_commonjs-proxy-XIS4Ck9-.js → __mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs_commonjs-proxy-BEKtiDI3.js} +1 -1
  11. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-D4TBsvIB.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CziSE-Do.js} +1 -1
  12. package/dist/assets/auth-records-BEfan3dC.js +1 -0
  13. package/dist/assets/capability-router-map-B3jHfbHt.js +1 -0
  14. package/dist/assets/devices-BfsgGvwu.js +1 -0
  15. package/dist/assets/{hostInit-DpSCsYyA.js → hostInit-7yPTCcmg.js} +1 -1
  16. package/dist/assets/index-BlKJSHE9.js +80 -0
  17. package/dist/assets/index-ByDDdVKJ.css +1 -0
  18. package/dist/assets/index-C-M4yvxf.js +1 -0
  19. package/dist/assets/index-DculG9Gi.js +1098 -0
  20. package/dist/assets/index-DfH297U6.js +1 -0
  21. package/dist/assets/index-Dvmk3HcY.js +1 -0
  22. package/dist/assets/index-K1-f6oQr.js +1 -0
  23. package/dist/assets/index-X-IEwb-L.js +80 -0
  24. package/dist/assets/index-cfq-Npln.js +1 -0
  25. package/dist/assets/index-iCcWZGKs.js +1 -0
  26. package/dist/assets/index-ptcmLXsE.js +1 -0
  27. package/dist/assets/{remoteEntry-0zDoMSWf.js → remoteEntry-Da_G1gka.js} +1 -1
  28. package/dist/assets/{schemas-BOzikgNT.js → schemas-XgIEoUz3.js} +1 -1
  29. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BnGk9xo_.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-kSAHDLPS.js} +2 -2
  30. package/dist/index.html +7 -8
  31. package/dist/mf-entry-bootstrap-0.js +2 -2
  32. package/dist/server/addon.js +11 -25
  33. package/dist/server/addon.js.map +1 -1
  34. package/dist/sw.js +1 -1
  35. package/package.json +4 -3
  36. package/dist/assets/capability-router-map-Bqwnkkax.js +0 -1
  37. package/dist/assets/devices-CFL4MLSo.js +0 -511
  38. package/dist/assets/index-BP0PcGIN.js +0 -1
  39. package/dist/assets/index-BQVATbZy.js +0 -5
  40. package/dist/assets/index-BZhZ3Jvf.js +0 -1
  41. package/dist/assets/index-BfdtdylV.js +0 -533
  42. package/dist/assets/index-BkJ1uzOh.js +0 -8420
  43. package/dist/assets/index-BuajxCgS.js +0 -1
  44. package/dist/assets/index-CKMQgnc3.js +0 -1
  45. package/dist/assets/index-DAq7g5_U.js +0 -1
  46. package/dist/assets/index-DRebE_bu.js +0 -22
  47. package/dist/assets/index-DUjRaULz.js +0 -1
  48. package/dist/assets/index-OcuNiGT5.js +0 -34
  49. package/dist/assets/index-R6tzT59K.css +0 -1
  50. package/dist/assets/index-pmj5N6Ix.js +0 -5
  51. package/dist/server/addon.d.ts +0 -12
@@ -61,4 +61,4 @@ var ve;function l(e,t,n){function r(u,c){if(u._zod||Object.defineProperty(u,"_zo
61
61
 
62
62
  `)}h.write("payload.value = newResult;"),h.write("return payload;");const kt=h.compile();return(T,k)=>kt(m,T,k)};let i;const s=L,u=!ce.jitless,a=u&&Ot.value,f=t.catchall;let p;e._zod.parse=(m,h)=>{p??(p=r.value);const g=m.value;return s(g)?u&&a&&h?.async===!1&&h.jitless!==!0?(i||(i=o(t.shape)),m=i(m,h),f?at([],g,m,h,p,e):m):n(m,h):(m.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),m)}});function ke(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!D(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>P(s,r,E())))}),t)}const lt=l("$ZodUnion",(e,t)=>{v.init(e,t),_(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),_(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),_(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),_(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>le(o.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1;const s=[];for(const u of t.options){const c=u._zod.run({value:r.value,issues:[]},o);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}return i?Promise.all(s).then(u=>ke(u,r,e,o)):ke(s,r,e,o)}}),br=l("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,lt.init(e,t);const n=e._zod.parse;_(e._zod,"propValues",()=>{const o={};for(const i of t.options){const s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,c]of Object.entries(s)){o[u]||(o[u]=new Set);for(const a of c)o[u].add(a)}}return o});const r=ee(()=>{const o=t.options,i=new Map;for(const s of o){const u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const c of u){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(o,i)=>{const s=o.value;if(!L(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const u=r.value.get(s?.[t.discriminator]);return u?u._zod.run(o,i):t.unionFallback||i.direction==="backward"?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:s,path:[t.discriminator],inst:e}),o)}}),wr=l("$ZodIntersection",(e,t)=>{v.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,a])=>$e(n,c,a)):$e(n,i,s)}});function ie(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(x(e)&&x(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=ie(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],s=ie(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function $e(e,t,n){const r=new Map;let o;for(const u of t.issues)if(u.code==="unrecognized_keys"){o??(o=u);for(const c of u.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const c of u.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(u);const i=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&o&&e.issues.push({...o,keys:i}),D(e))return e;const s=ie(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const kr=l("$ZodTuple",(e,t)=>{v.init(e,t);const n=t.items;e._zod.parse=(r,o)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const s=[],u=Ze(n,"optin"),c=Ze(n,"optout");if(!t.rest){if(i.length<u)return r.issues.push({code:"too_small",minimum:u,inclusive:!0,input:i,inst:e,origin:"array"}),r;i.length>n.length&&r.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:e,origin:"array"})}const a=new Array(n.length);for(let f=0;f<n.length;f++){const p=n[f]._zod.run({value:i[f],issues:[]},o);p instanceof Promise?s.push(p.then(m=>{a[f]=m})):a[f]=p}if(t.rest){let f=n.length-1;const p=i.slice(n.length);for(const m of p){f++;const h=t.rest._zod.run({value:m,issues:[]},o);h instanceof Promise?s.push(h.then(g=>Se(g,r,f))):Se(h,r,f)}}return s.length?Promise.all(s).then(()=>Oe(a,r,n,i,c)):Oe(a,r,n,i,c)}});function Ze(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function Se(e,t,n){e.issues.length&&t.issues.push(...N(n,e.issues)),t.value[n]=e.value}function Oe(e,t,n,r,o){for(let i=0;i<n.length;i++){const s=e[i],u=i<r.length;if(s.issues.length){if(!u&&i>=o){t.value.length=i;break}t.issues.push(...N(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=r.length&&(n[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}const $r=l("$ZodRecord",(e,t)=>{v.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!x(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[],s=t.keyType._zod.values;if(s){n.value={};const u=new Set;for(const a of s)if(typeof a=="string"||typeof a=="number"||typeof a=="symbol"){u.add(typeof a=="number"?a.toString():a);const f=t.keyType._zod.run({value:a,issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(f.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(h=>P(h,r,E())),input:a,path:[a],inst:e});continue}const p=f.value,m=t.valueType._zod.run({value:o[a],issues:[]},r);m instanceof Promise?i.push(m.then(h=>{h.issues.length&&n.issues.push(...N(a,h.issues)),n.value[p]=h.value})):(m.issues.length&&n.issues.push(...N(a,m.issues)),n.value[p]=m.value)}let c;for(const a in o)u.has(a)||(c=c??[],c.push(a));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{n.value={};for(const u of Reflect.ownKeys(o)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let c=t.keyType._zod.run({value:u,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&nt.test(u)&&c.issues.length){const p=t.keyType._zod.run({value:Number(u),issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?n.value[u]=o[u]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>P(p,r,E())),input:u,path:[u],inst:e});continue}const f=t.valueType._zod.run({value:o[u],issues:[]},r);f instanceof Promise?i.push(f.then(p=>{p.issues.length&&n.issues.push(...N(u,p.issues)),n.value[c.value]=p.value})):(f.issues.length&&n.issues.push(...N(u,f.issues)),n.value[c.value]=f.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Zr=l("$ZodEnum",(e,t)=>{v.init(e,t);const n=Ke(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>It.has(typeof o)).map(o=>typeof o=="string"?U(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),Sr=l("$ZodLiteral",(e,t)=>{if(v.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?U(r):r?U(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),Or=l("$ZodTransform",(e,t)=>{v.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new We(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n.fallback=!0,n));if(o instanceof Promise)throw new C;return n.value=o,n.fallback=!0,n}});function Ie(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const ft=l("$ZodOptional",(e,t)=>{v.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${le(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=n.value,i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>Ie(s,o)):Ie(i,o)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Ir=l("$ZodExactOptional",(e,t)=>{ft.init(e,t),_(e._zod,"values",()=>t.innerType._zod.values),_(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Tr=l("$ZodNullable",(e,t)=>{v.init(e,t),_(e._zod,"optin",()=>t.innerType._zod.optin),_(e._zod,"optout",()=>t.innerType._zod.optout),_(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${le(n.source)}|null)$`):void 0}),_(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Er=l("$ZodDefault",(e,t)=>{v.init(e,t),e._zod.optin="optional",_(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Te(i,t)):Te(o,t)}});function Te(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Pr=l("$ZodPrefault",(e,t)=>{v.init(e,t),e._zod.optin="optional",_(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),Nr=l("$ZodNonOptional",(e,t)=>{v.init(e,t),_(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Ee(i,e)):Ee(o,e)}});function Ee(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const jr=l("$ZodCatch",(e,t)=>{v.init(e,t),e._zod.optin="optional",_(e._zod,"optout",()=>t.innerType._zod.optout),_(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>P(s,r,E()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>P(i,r,E()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Ar=l("$ZodPipe",(e,t)=>{v.init(e,t),_(e._zod,"values",()=>t.in._zod.values),_(e._zod,"optin",()=>t.in._zod.optin),_(e._zod,"optout",()=>t.out._zod.optout),_(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>K(s,t.in,r)):K(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>K(i,t.out,r)):K(o,t.out,r)}});function K(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Rr=l("$ZodReadonly",(e,t)=>{v.init(e,t),_(e._zod,"propValues",()=>t.innerType._zod.propValues),_(e._zod,"values",()=>t.innerType._zod.values),_(e._zod,"optin",()=>t.innerType?._zod?.optin),_(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Pe):Pe(o)}});function Pe(e){return e.value=Object.freeze(e.value),e}const Dr=l("$ZodLazy",(e,t)=>{v.init(e,t),_(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),_(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),_(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),_(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),_(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),Cr=l("$ZodCustom",(e,t)=>{O.init(e,t),v.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>Ne(i,n,r,e));Ne(o,n,r,e)}});function Ne(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(V(o))}}var je;class xr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Ur(){return new xr}(je=globalThis).__zod_globalRegistry??(je.__zod_globalRegistry=Ur());const M=globalThis.__zod_globalRegistry;function Fr(e,t){return new e({type:"string",...d(t)})}function Jr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...d(t)})}function Ae(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...d(t)})}function Mr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...d(t)})}function Lr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...d(t)})}function Vr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...d(t)})}function Br(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...d(t)})}function Wr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...d(t)})}function Kr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...d(t)})}function Gr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...d(t)})}function Yr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...d(t)})}function qr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...d(t)})}function Xr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...d(t)})}function Hr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...d(t)})}function Qr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...d(t)})}function eo(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...d(t)})}function to(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...d(t)})}function no(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...d(t)})}function ro(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...d(t)})}function oo(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...d(t)})}function so(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...d(t)})}function io(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...d(t)})}function uo(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...d(t)})}function co(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...d(t)})}function ao(e,t){return new e({type:"string",format:"date",check:"string_format",...d(t)})}function lo(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...d(t)})}function fo(e,t){return new e({type:"string",format:"duration",check:"string_format",...d(t)})}function po(e,t){return new e({type:"number",checks:[],...d(t)})}function ho(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...d(t)})}function mo(e,t){return new e({type:"boolean",...d(t)})}function _o(e,t){return new e({type:"null",...d(t)})}function go(e){return new e({type:"any"})}function vo(e){return new e({type:"unknown"})}function zo(e,t){return new e({type:"never",...d(t)})}function yo(e,t){return new e({type:"void",...d(t)})}function bo(e,t){return new e({type:"date",...d(t)})}function Re(e,t){return new ot({check:"less_than",...d(t),value:e,inclusive:!1})}function Y(e,t){return new ot({check:"less_than",...d(t),value:e,inclusive:!0})}function De(e,t){return new st({check:"greater_than",...d(t),value:e,inclusive:!1})}function q(e,t){return new st({check:"greater_than",...d(t),value:e,inclusive:!0})}function Ce(e,t){return new Zn({check:"multiple_of",...d(t),value:e})}function pt(e,t){return new On({check:"max_length",...d(t),maximum:e})}function H(e,t){return new In({check:"min_length",...d(t),minimum:e})}function dt(e,t){return new Tn({check:"length_equals",...d(t),length:e})}function wo(e,t){return new En({check:"string_format",format:"regex",...d(t),pattern:e})}function ko(e){return new Pn({check:"string_format",format:"lowercase",...d(e)})}function $o(e){return new Nn({check:"string_format",format:"uppercase",...d(e)})}function Zo(e,t){return new jn({check:"string_format",format:"includes",...d(t),includes:e})}function So(e,t){return new An({check:"string_format",format:"starts_with",...d(t),prefix:e})}function Oo(e,t){return new Rn({check:"string_format",format:"ends_with",...d(t),suffix:e})}function F(e){return new Dn({check:"overwrite",tx:e})}function Io(e){return F(t=>t.normalize(e))}function To(){return F(e=>e.trim())}function Eo(){return F(e=>e.toLowerCase())}function Po(){return F(e=>e.toUpperCase())}function No(){return F(e=>St(e))}function jo(e,t,n){return new e({type:"array",element:t,...d(n)})}function Ao(e,t,n){const r=d(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function Ro(e,t,n){return new e({type:"custom",check:"custom",fn:t,...d(n)})}function Do(e,t){const n=Co(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(V(o,r.value,n._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),r.issues.push(V(i))}},e(r.value,r)),t);return n}function Co(e,t){const n=new O({check:"custom",...d(t)});return n._zod.check=e,n}function ht(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??M,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function b(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const u=e._zod.toJSONSchema?.();if(u)s.schema=u;else{const f={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,f);else{const m=s.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,m,f)}const p=e._zod.parent;p&&(s.ref||(s.ref=p),b(p,t,f),t.seen.get(p).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&S(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function mt(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const s of e.seen.entries()){const u=e.metadataRegistry.get(s[0])?.id;if(u){const c=r.get(u);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,s[0])}}const o=s=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(s[0])?.id,m=e.external.uri??(g=>g);if(p)return{ref:m(p)};const h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${m("__shared")}#/${u}/${h}`}}if(s[1]===n)return{ref:"#"};const a=`#/${u}/`,f=s[1].schema.id??`__schema${e.counter++}`;return{defId:f,ref:a+f}},i=s=>{if(s[1].schema.$ref)return;const u=s[1],{ref:c,defId:a}=o(s);u.def={...u.schema},a&&(u.defId=a);const f=u.schema;for(const p in f)delete f[p];f.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const u=s[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
63
63
 
64
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const u=s[1];if(t===s[0]){i(s);continue}if(e.external){const a=e.external.registry.get(s[0])?.id;if(t!==s[0]&&a){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}function _t(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=e.seen.get(u);if(c.ref===null)return;const a=c.def??c.schema,f={...a},p=c.ref;if(c.ref=null,p){r(p);const h=e.seen.get(p),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(g)):Object.assign(a,g),Object.assign(a,f),u._zod.parent===p)for(const $ in a)$==="$ref"||$==="allOf"||$ in f||delete a[$];if(g.$ref&&h.def)for(const $ in a)$==="$ref"||$==="allOf"||$ in h.def&&JSON.stringify(a[$])===JSON.stringify(h.def[$])&&delete a[$]}const m=u._zod.parent;if(m&&m!==p){r(m);const h=e.seen.get(m);if(h?.schema.$ref&&(a.$ref=h.schema.$ref,h.def))for(const g in a)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(a[g])===JSON.stringify(h.def[g])&&delete a[g]}e.override({zodSchema:u,jsonSchema:a,path:c.path??[]})};for(const u of[...e.seen.entries()].reverse())r(u[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}Object.assign(o,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const s=e.external?.defs??{};for(const u of e.seen.entries()){const c=u[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Q(t,"input",e.processors),output:Q(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function S(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return S(r.element,n);if(r.type==="set")return S(r.valueType,n);if(r.type==="lazy")return S(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return S(r.innerType,n);if(r.type==="intersection")return S(r.left,n)||S(r.right,n);if(r.type==="record"||r.type==="map")return S(r.keyType,n)||S(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:S(r.in,n)||S(r.out,n);if(r.type==="object"){for(const o in r.shape)if(S(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(S(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(S(o,n))return!0;return!!(r.rest&&S(r.rest,n))}return!1}const xo=(e,t={})=>n=>{const r=ht({...n,processors:t});return b(e,r),mt(r,e),_t(r,e)},Q=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=ht({...o??{},target:i,io:t,processors:n});return b(e,s),mt(s,e),_t(s,e)},Uo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Fo=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:u,patterns:c,contentEncoding:a}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=Uo[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),a&&(o.contentEncoding=a),c&&c.size>0){const f=[...c];f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Jo=(e,t,n,r)=>{const o=n,{minimum:i,maximum:s,format:u,multipleOf:c,exclusiveMaximum:a,exclusiveMinimum:f}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";const p=typeof f=="number"&&f>=(i??Number.NEGATIVE_INFINITY),m=typeof a=="number"&&a<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";p?h?(o.minimum=f,o.exclusiveMinimum=!0):o.exclusiveMinimum=f:typeof i=="number"&&(o.minimum=i),m?h?(o.maximum=a,o.exclusiveMaximum=!0):o.exclusiveMaximum=a:typeof s=="number"&&(o.maximum=s),typeof c=="number"&&(o.multipleOf=c)},Mo=(e,t,n,r)=>{n.type="boolean"},Lo=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Vo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Bo=(e,t,n,r)=>{n.not={}},Wo=(e,t,n,r)=>{},Ko=(e,t,n,r)=>{},Go=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Yo=(e,t,n,r)=>{const o=e._zod.def,i=Ke(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},qo=(e,t,n,r)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},Xo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Ho=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Qo=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=b(i.element,t,{...r,path:[...r.path,"items"]})},es=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const a in s)o.properties[a]=b(s[a],t,{...r,path:[...r.path,"properties",a]});const u=new Set(Object.keys(s)),c=new Set([...u].filter(a=>{const f=i.shape[a]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=b(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},ts=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,c)=>b(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},ns=(e,t,n,r)=>{const o=e._zod.def,i=b(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=b(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=a=>"allOf"in a&&Object.keys(a).length===1,c=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=c},rs=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="array";const s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((m,h)=>b(m,t,{...r,path:[...r.path,s,h]})),a=i.rest?b(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=c,a&&(o.items=a)):t.target==="openapi-3.0"?(o.items={anyOf:c},a&&o.items.anyOf.push(a),o.minItems=c.length,a||(o.maxItems=c.length)):(o.items=c,a&&(o.additionalItems=a));const{minimum:f,maximum:p}=e._zod.bag;typeof f=="number"&&(o.minItems=f),typeof p=="number"&&(o.maxItems=p)},os=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object";const s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){const f=b(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const p of c)o.patternProperties[p.source]=f}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=b(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=b(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const a=s._zod.values;if(a){const f=[...a].filter(p=>typeof p=="string"||typeof p=="number");f.length>0&&(o.required=f)}},ss=(e,t,n,r)=>{const o=e._zod.def,i=b(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},is=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},us=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},cs=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},as=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},ls=(e,t,n,r)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;b(s,t,r);const u=t.seen.get(e);u.ref=s},fs=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},gt=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},ps=(e,t,n,r)=>{const o=e._zod.innerType;b(o,t,r);const i=t.seen.get(e);i.ref=o},ds=l("ZodISODateTime",(e,t)=>{qn.init(e,t),w.init(e,t)});function hs(e){return co(ds,e)}const ms=l("ZodISODate",(e,t)=>{Xn.init(e,t),w.init(e,t)});function _s(e){return ao(ms,e)}const gs=l("ZodISOTime",(e,t)=>{Hn.init(e,t),w.init(e,t)});function vs(e){return lo(gs,e)}const zs=l("ZodISODuration",(e,t)=>{Qn.init(e,t),w.init(e,t)});function ys(e){return fo(zs,e)}const bs=(e,t)=>{Xe.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ft(e,n)},flatten:{value:n=>Ut(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,se,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,se,2)}},isEmpty:{get(){return e.issues.length===0}}})},I=l("ZodError",bs,{Parent:Error}),ws=pe(I),ks=de(I),$s=te(I),Zs=ne(I),Ss=Lt(I),Os=Vt(I),Is=Bt(I),Ts=Wt(I),Es=Kt(I),Ps=Gt(I),Ns=Yt(I),js=qt(I),xe=new WeakMap;function B(e,t,n){const r=Object.getPrototypeOf(e);let o=xe.get(r);if(o||(o=new Set,xe.set(r,o)),!o.has(t)){o.add(t);for(const i in n){const s=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){const u=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}const z=l("ZodType",(e,t)=>(v.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Q(e,"input"),output:Q(e,"output")}}),e.toJSONSchema=xo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>ws(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>$s(e,n,r),e.parseAsync=async(n,r)=>ks(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Zs(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Ss(e,n,r),e.decode=(n,r)=>Os(e,n,r),e.encodeAsync=async(n,r)=>Is(e,n,r),e.decodeAsync=async(n,r)=>Ts(e,n,r),e.safeEncode=(n,r)=>Es(e,n,r),e.safeDecode=(n,r)=>Ps(e,n,r),e.safeEncodeAsync=async(n,r)=>Ns(e,n,r),e.safeDecodeAsync=async(n,r)=>js(e,n,r),B(e,"ZodType",{check(...n){const r=this.def;return this.clone(j(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return A(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Ai(n,r))},superRefine(n,r){return this.check(Ri(n,r))},overwrite(n){return this.check(F(n))},optional(){return Le(this)},exactOptional(){return bi(this)},nullable(){return Ve(this)},nullish(){return Le(Ve(this))},nonoptional(n){return Oi(this,n)},array(){return ai(this)},or(n){return fi([this,n])},and(n){return hi(this,n)},transform(n){return Be(this,zi(n))},default(n){return $i(this,n)},prefault(n){return Si(this,n)},catch(n){return Ti(this,n)},pipe(n){return Be(this,n)},readonly(){return Ni(this)},describe(n){const r=this.clone();return M.add(r,{description:n}),r},meta(...n){if(n.length===0)return M.get(this);const r=this.clone();return M.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return M.get(e)?.description},configurable:!0}),e)),vt=l("_ZodString",(e,t)=>{he.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Fo(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,B(e,"_ZodString",{regex(...r){return this.check(wo(...r))},includes(...r){return this.check(Zo(...r))},startsWith(...r){return this.check(So(...r))},endsWith(...r){return this.check(Oo(...r))},min(...r){return this.check(H(...r))},max(...r){return this.check(pt(...r))},length(...r){return this.check(dt(...r))},nonempty(...r){return this.check(H(1,...r))},lowercase(r){return this.check(ko(r))},uppercase(r){return this.check($o(r))},trim(){return this.check(To())},normalize(...r){return this.check(Io(...r))},toLowerCase(){return this.check(Eo())},toUpperCase(){return this.check(Po())},slugify(){return this.check(No())}})}),As=l("ZodString",(e,t)=>{he.init(e,t),vt.init(e,t),e.email=n=>e.check(Jr(Ds,n)),e.url=n=>e.check(Wr(Cs,n)),e.jwt=n=>e.check(uo(Hs,n)),e.emoji=n=>e.check(Kr(xs,n)),e.guid=n=>e.check(Ae(Ue,n)),e.uuid=n=>e.check(Mr(G,n)),e.uuidv4=n=>e.check(Lr(G,n)),e.uuidv6=n=>e.check(Vr(G,n)),e.uuidv7=n=>e.check(Br(G,n)),e.nanoid=n=>e.check(Gr(Us,n)),e.guid=n=>e.check(Ae(Ue,n)),e.cuid=n=>e.check(Yr(Fs,n)),e.cuid2=n=>e.check(qr(Js,n)),e.ulid=n=>e.check(Xr(Ms,n)),e.base64=n=>e.check(oo(Ys,n)),e.base64url=n=>e.check(so(qs,n)),e.xid=n=>e.check(Hr(Ls,n)),e.ksuid=n=>e.check(Qr(Vs,n)),e.ipv4=n=>e.check(eo(Bs,n)),e.ipv6=n=>e.check(to(Ws,n)),e.cidrv4=n=>e.check(no(Ks,n)),e.cidrv6=n=>e.check(ro(Gs,n)),e.e164=n=>e.check(io(Xs,n)),e.datetime=n=>e.check(hs(n)),e.date=n=>e.check(_s(n)),e.time=n=>e.check(vs(n)),e.duration=n=>e.check(ys(n))});function Rs(e){return Fr(As,e)}const w=l("ZodStringFormat",(e,t)=>{y.init(e,t),vt.init(e,t)}),Ds=l("ZodEmail",(e,t)=>{Jn.init(e,t),w.init(e,t)}),Ue=l("ZodGUID",(e,t)=>{Un.init(e,t),w.init(e,t)}),G=l("ZodUUID",(e,t)=>{Fn.init(e,t),w.init(e,t)}),Cs=l("ZodURL",(e,t)=>{Mn.init(e,t),w.init(e,t)}),xs=l("ZodEmoji",(e,t)=>{Ln.init(e,t),w.init(e,t)}),Us=l("ZodNanoID",(e,t)=>{Vn.init(e,t),w.init(e,t)}),Fs=l("ZodCUID",(e,t)=>{Bn.init(e,t),w.init(e,t)}),Js=l("ZodCUID2",(e,t)=>{Wn.init(e,t),w.init(e,t)}),Ms=l("ZodULID",(e,t)=>{Kn.init(e,t),w.init(e,t)}),Ls=l("ZodXID",(e,t)=>{Gn.init(e,t),w.init(e,t)}),Vs=l("ZodKSUID",(e,t)=>{Yn.init(e,t),w.init(e,t)}),Bs=l("ZodIPv4",(e,t)=>{er.init(e,t),w.init(e,t)}),Ws=l("ZodIPv6",(e,t)=>{tr.init(e,t),w.init(e,t)}),Ks=l("ZodCIDRv4",(e,t)=>{nr.init(e,t),w.init(e,t)}),Gs=l("ZodCIDRv6",(e,t)=>{rr.init(e,t),w.init(e,t)}),Ys=l("ZodBase64",(e,t)=>{or.init(e,t),w.init(e,t)}),qs=l("ZodBase64URL",(e,t)=>{ir.init(e,t),w.init(e,t)}),Xs=l("ZodE164",(e,t)=>{ur.init(e,t),w.init(e,t)}),Hs=l("ZodJWT",(e,t)=>{ar.init(e,t),w.init(e,t)}),zt=l("ZodNumber",(e,t)=>{ut.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Jo(e,r,o),B(e,"ZodNumber",{gt(r,o){return this.check(De(r,o))},gte(r,o){return this.check(q(r,o))},min(r,o){return this.check(q(r,o))},lt(r,o){return this.check(Re(r,o))},lte(r,o){return this.check(Y(r,o))},max(r,o){return this.check(Y(r,o))},int(r){return this.check(Fe(r))},safe(r){return this.check(Fe(r))},positive(r){return this.check(De(0,r))},nonnegative(r){return this.check(q(0,r))},negative(r){return this.check(Re(0,r))},nonpositive(r){return this.check(Y(0,r))},multipleOf(r,o){return this.check(Ce(r,o))},step(r,o){return this.check(Ce(r,o))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Di(e){return po(zt,e)}const Qs=l("ZodNumberFormat",(e,t)=>{lr.init(e,t),zt.init(e,t)});function Fe(e){return ho(Qs,e)}const ei=l("ZodBoolean",(e,t)=>{fr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Mo(e,n,r)});function Ci(e){return mo(ei,e)}const ti=l("ZodNull",(e,t)=>{pr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Lo(e,n,r)});function xi(e){return _o(ti,e)}const ni=l("ZodAny",(e,t)=>{dr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wo()});function Ui(){return go(ni)}const ri=l("ZodUnknown",(e,t)=>{hr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ko()});function Je(){return vo(ri)}const oi=l("ZodNever",(e,t)=>{mr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bo(e,n,r)});function si(e){return zo(oi,e)}const ii=l("ZodVoid",(e,t)=>{_r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vo(e,n)});function Fi(e){return yo(ii,e)}const ui=l("ZodDate",(e,t)=>{gr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Go(e,r),e.min=(r,o)=>e.check(q(r,o)),e.max=(r,o)=>e.check(Y(r,o));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Ji(e){return bo(ui,e)}const ci=l("ZodArray",(e,t)=>{vr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qo(e,n,r,o),e.element=t.element,B(e,"ZodArray",{min(n,r){return this.check(H(n,r))},nonempty(n){return this.check(H(1,n))},max(n,r){return this.check(pt(n,r))},length(n,r){return this.check(dt(n,r))},unwrap(){return this.element}})});function ai(e,t){return jo(ci,e,t)}const li=l("ZodObject",(e,t)=>{yr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>es(e,n,r,o),_(e,"shape",()=>t.shape),B(e,"ZodObject",{keyof(){return _i(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Je()})},loose(){return this.clone({...this._zod.def,catchall:Je()})},strict(){return this.clone({...this._zod.def,catchall:si()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return jt(this,n)},safeExtend(n){return At(this,n)},merge(n){return Rt(this,n)},pick(n){return Pt(this,n)},omit(n){return Nt(this,n)},partial(...n){return Dt(bt,this,n[0])},required(...n){return Ct(wt,this,n[0])}})});function Mi(e,t){const n={type:"object",shape:e??{},...d(t)};return new li(n)}const yt=l("ZodUnion",(e,t)=>{lt.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ts(e,n,r,o),e.options=t.options});function fi(e,t){return new yt({type:"union",options:e,...d(t)})}const pi=l("ZodDiscriminatedUnion",(e,t)=>{yt.init(e,t),br.init(e,t)});function Li(e,t,n){return new pi({type:"union",options:t,discriminator:e,...d(n)})}const di=l("ZodIntersection",(e,t)=>{wr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ns(e,n,r,o)});function hi(e,t){return new di({type:"intersection",left:e,right:t})}const mi=l("ZodTuple",(e,t)=>{kr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rs(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Vi(e,t,n){const r=t instanceof v,o=r?n:t,i=r?t:null;return new mi({type:"tuple",items:e,rest:i,...d(o)})}const Me=l("ZodRecord",(e,t)=>{$r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>os(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Bi(e,t,n){return!t||!t._zod?new Me({type:"record",keyType:Rs(),valueType:e,...d(t)}):new Me({type:"record",keyType:e,valueType:t,...d(n)})}const ue=l("ZodEnum",(e,t)=>{Zr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Yo(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ue({...t,checks:[],...d(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ue({...t,checks:[],...d(o),entries:i})}});function _i(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ue({type:"enum",entries:n,...d(t)})}const gi=l("ZodLiteral",(e,t)=>{Sr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qo(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Wi(e,t){return new gi({type:"literal",values:Array.isArray(e)?e:[e],...d(t)})}const vi=l("ZodTransform",(e,t)=>{Or.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ho(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new We(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(V(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(V(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function zi(e){return new vi({type:"transform",transform:e})}const bt=l("ZodOptional",(e,t)=>{ft.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gt(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Le(e){return new bt({type:"optional",innerType:e})}const yi=l("ZodExactOptional",(e,t)=>{Ir.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gt(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function bi(e){return new yi({type:"optional",innerType:e})}const wi=l("ZodNullable",(e,t)=>{Tr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ss(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ve(e){return new wi({type:"nullable",innerType:e})}const ki=l("ZodDefault",(e,t)=>{Er.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>us(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $i(e,t){return new ki({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ye(t)}})}const Zi=l("ZodPrefault",(e,t)=>{Pr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cs(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Si(e,t){return new Zi({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ye(t)}})}const wt=l("ZodNonOptional",(e,t)=>{Nr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>is(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Oi(e,t){return new wt({type:"nonoptional",innerType:e,...d(t)})}const Ii=l("ZodCatch",(e,t)=>{jr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>as(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ti(e,t){return new Ii({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ei=l("ZodPipe",(e,t)=>{Ar.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ls(e,n,r,o),e.in=t.in,e.out=t.out});function Be(e,t){return new Ei({type:"pipe",in:e,out:t})}const Pi=l("ZodReadonly",(e,t)=>{Rr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fs(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ni(e){return new Pi({type:"readonly",innerType:e})}const ji=l("ZodLazy",(e,t)=>{Dr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ps(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function Ki(e){return new ji({type:"lazy",getter:e})}const me=l("ZodCustom",(e,t)=>{Cr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xo(e,n)});function Gi(e,t){return Ao(me,(()=>!0),t)}function Ai(e,t={}){return Ro(me,e,t)}function Ri(e,t){return Do(e,t)}function Yi(e,t={}){const n=new me({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...d(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}export{As as Z,Fi as _,ai as a,Ci as b,Yi as c,_i as d,Ji as e,fi as f,Ki as g,Gi as h,Li as i,zt as j,ei as k,Wi as l,ue as m,Di as n,Mi as o,ci as p,li as q,Bi as r,Rs as s,Vi as t,Je as u,ki as v,bt as w,wi as x,Ui as y,xi as z};
64
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const u=s[1];if(t===s[0]){i(s);continue}if(e.external){const a=e.external.registry.get(s[0])?.id;if(t!==s[0]&&a){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}function _t(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=e.seen.get(u);if(c.ref===null)return;const a=c.def??c.schema,f={...a},p=c.ref;if(c.ref=null,p){r(p);const h=e.seen.get(p),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(g)):Object.assign(a,g),Object.assign(a,f),u._zod.parent===p)for(const $ in a)$==="$ref"||$==="allOf"||$ in f||delete a[$];if(g.$ref&&h.def)for(const $ in a)$==="$ref"||$==="allOf"||$ in h.def&&JSON.stringify(a[$])===JSON.stringify(h.def[$])&&delete a[$]}const m=u._zod.parent;if(m&&m!==p){r(m);const h=e.seen.get(m);if(h?.schema.$ref&&(a.$ref=h.schema.$ref,h.def))for(const g in a)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(a[g])===JSON.stringify(h.def[g])&&delete a[g]}e.override({zodSchema:u,jsonSchema:a,path:c.path??[]})};for(const u of[...e.seen.entries()].reverse())r(u[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}Object.assign(o,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const s=e.external?.defs??{};for(const u of e.seen.entries()){const c=u[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Q(t,"input",e.processors),output:Q(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function S(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return S(r.element,n);if(r.type==="set")return S(r.valueType,n);if(r.type==="lazy")return S(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return S(r.innerType,n);if(r.type==="intersection")return S(r.left,n)||S(r.right,n);if(r.type==="record"||r.type==="map")return S(r.keyType,n)||S(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:S(r.in,n)||S(r.out,n);if(r.type==="object"){for(const o in r.shape)if(S(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(S(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(S(o,n))return!0;return!!(r.rest&&S(r.rest,n))}return!1}const xo=(e,t={})=>n=>{const r=ht({...n,processors:t});return b(e,r),mt(r,e),_t(r,e)},Q=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=ht({...o??{},target:i,io:t,processors:n});return b(e,s),mt(s,e),_t(s,e)},Uo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Fo=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:u,patterns:c,contentEncoding:a}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=Uo[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),a&&(o.contentEncoding=a),c&&c.size>0){const f=[...c];f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Jo=(e,t,n,r)=>{const o=n,{minimum:i,maximum:s,format:u,multipleOf:c,exclusiveMaximum:a,exclusiveMinimum:f}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";const p=typeof f=="number"&&f>=(i??Number.NEGATIVE_INFINITY),m=typeof a=="number"&&a<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";p?h?(o.minimum=f,o.exclusiveMinimum=!0):o.exclusiveMinimum=f:typeof i=="number"&&(o.minimum=i),m?h?(o.maximum=a,o.exclusiveMaximum=!0):o.exclusiveMaximum=a:typeof s=="number"&&(o.maximum=s),typeof c=="number"&&(o.multipleOf=c)},Mo=(e,t,n,r)=>{n.type="boolean"},Lo=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Vo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Bo=(e,t,n,r)=>{n.not={}},Wo=(e,t,n,r)=>{},Ko=(e,t,n,r)=>{},Go=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Yo=(e,t,n,r)=>{const o=e._zod.def,i=Ke(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},qo=(e,t,n,r)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},Xo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Ho=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Qo=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=b(i.element,t,{...r,path:[...r.path,"items"]})},es=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const a in s)o.properties[a]=b(s[a],t,{...r,path:[...r.path,"properties",a]});const u=new Set(Object.keys(s)),c=new Set([...u].filter(a=>{const f=i.shape[a]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=b(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},ts=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,c)=>b(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},ns=(e,t,n,r)=>{const o=e._zod.def,i=b(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=b(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=a=>"allOf"in a&&Object.keys(a).length===1,c=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=c},rs=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="array";const s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((m,h)=>b(m,t,{...r,path:[...r.path,s,h]})),a=i.rest?b(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=c,a&&(o.items=a)):t.target==="openapi-3.0"?(o.items={anyOf:c},a&&o.items.anyOf.push(a),o.minItems=c.length,a||(o.maxItems=c.length)):(o.items=c,a&&(o.additionalItems=a));const{minimum:f,maximum:p}=e._zod.bag;typeof f=="number"&&(o.minItems=f),typeof p=="number"&&(o.maxItems=p)},os=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object";const s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){const f=b(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const p of c)o.patternProperties[p.source]=f}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=b(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=b(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const a=s._zod.values;if(a){const f=[...a].filter(p=>typeof p=="string"||typeof p=="number");f.length>0&&(o.required=f)}},ss=(e,t,n,r)=>{const o=e._zod.def,i=b(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},is=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},us=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},cs=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},as=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},ls=(e,t,n,r)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;b(s,t,r);const u=t.seen.get(e);u.ref=s},fs=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},gt=(e,t,n,r)=>{const o=e._zod.def;b(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},ps=(e,t,n,r)=>{const o=e._zod.innerType;b(o,t,r);const i=t.seen.get(e);i.ref=o},ds=l("ZodISODateTime",(e,t)=>{qn.init(e,t),w.init(e,t)});function hs(e){return co(ds,e)}const ms=l("ZodISODate",(e,t)=>{Xn.init(e,t),w.init(e,t)});function _s(e){return ao(ms,e)}const gs=l("ZodISOTime",(e,t)=>{Hn.init(e,t),w.init(e,t)});function vs(e){return lo(gs,e)}const zs=l("ZodISODuration",(e,t)=>{Qn.init(e,t),w.init(e,t)});function ys(e){return fo(zs,e)}const bs=(e,t)=>{Xe.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ft(e,n)},flatten:{value:n=>Ut(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,se,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,se,2)}},isEmpty:{get(){return e.issues.length===0}}})},I=l("ZodError",bs,{Parent:Error}),ws=pe(I),ks=de(I),$s=te(I),Zs=ne(I),Ss=Lt(I),Os=Vt(I),Is=Bt(I),Ts=Wt(I),Es=Kt(I),Ps=Gt(I),Ns=Yt(I),js=qt(I),xe=new WeakMap;function B(e,t,n){const r=Object.getPrototypeOf(e);let o=xe.get(r);if(o||(o=new Set,xe.set(r,o)),!o.has(t)){o.add(t);for(const i in n){const s=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){const u=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}const z=l("ZodType",(e,t)=>(v.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Q(e,"input"),output:Q(e,"output")}}),e.toJSONSchema=xo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>ws(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>$s(e,n,r),e.parseAsync=async(n,r)=>ks(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Zs(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Ss(e,n,r),e.decode=(n,r)=>Os(e,n,r),e.encodeAsync=async(n,r)=>Is(e,n,r),e.decodeAsync=async(n,r)=>Ts(e,n,r),e.safeEncode=(n,r)=>Es(e,n,r),e.safeDecode=(n,r)=>Ps(e,n,r),e.safeEncodeAsync=async(n,r)=>Ns(e,n,r),e.safeDecodeAsync=async(n,r)=>js(e,n,r),B(e,"ZodType",{check(...n){const r=this.def;return this.clone(j(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return A(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Ai(n,r))},superRefine(n,r){return this.check(Ri(n,r))},overwrite(n){return this.check(F(n))},optional(){return Le(this)},exactOptional(){return bi(this)},nullable(){return Ve(this)},nullish(){return Le(Ve(this))},nonoptional(n){return Oi(this,n)},array(){return ai(this)},or(n){return fi([this,n])},and(n){return hi(this,n)},transform(n){return Be(this,zi(n))},default(n){return $i(this,n)},prefault(n){return Si(this,n)},catch(n){return Ti(this,n)},pipe(n){return Be(this,n)},readonly(){return Ni(this)},describe(n){const r=this.clone();return M.add(r,{description:n}),r},meta(...n){if(n.length===0)return M.get(this);const r=this.clone();return M.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return M.get(e)?.description},configurable:!0}),e)),vt=l("_ZodString",(e,t)=>{he.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Fo(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,B(e,"_ZodString",{regex(...r){return this.check(wo(...r))},includes(...r){return this.check(Zo(...r))},startsWith(...r){return this.check(So(...r))},endsWith(...r){return this.check(Oo(...r))},min(...r){return this.check(H(...r))},max(...r){return this.check(pt(...r))},length(...r){return this.check(dt(...r))},nonempty(...r){return this.check(H(1,...r))},lowercase(r){return this.check(ko(r))},uppercase(r){return this.check($o(r))},trim(){return this.check(To())},normalize(...r){return this.check(Io(...r))},toLowerCase(){return this.check(Eo())},toUpperCase(){return this.check(Po())},slugify(){return this.check(No())}})}),As=l("ZodString",(e,t)=>{he.init(e,t),vt.init(e,t),e.email=n=>e.check(Jr(Ds,n)),e.url=n=>e.check(Wr(Cs,n)),e.jwt=n=>e.check(uo(Hs,n)),e.emoji=n=>e.check(Kr(xs,n)),e.guid=n=>e.check(Ae(Ue,n)),e.uuid=n=>e.check(Mr(G,n)),e.uuidv4=n=>e.check(Lr(G,n)),e.uuidv6=n=>e.check(Vr(G,n)),e.uuidv7=n=>e.check(Br(G,n)),e.nanoid=n=>e.check(Gr(Us,n)),e.guid=n=>e.check(Ae(Ue,n)),e.cuid=n=>e.check(Yr(Fs,n)),e.cuid2=n=>e.check(qr(Js,n)),e.ulid=n=>e.check(Xr(Ms,n)),e.base64=n=>e.check(oo(Ys,n)),e.base64url=n=>e.check(so(qs,n)),e.xid=n=>e.check(Hr(Ls,n)),e.ksuid=n=>e.check(Qr(Vs,n)),e.ipv4=n=>e.check(eo(Bs,n)),e.ipv6=n=>e.check(to(Ws,n)),e.cidrv4=n=>e.check(no(Ks,n)),e.cidrv6=n=>e.check(ro(Gs,n)),e.e164=n=>e.check(io(Xs,n)),e.datetime=n=>e.check(hs(n)),e.date=n=>e.check(_s(n)),e.time=n=>e.check(vs(n)),e.duration=n=>e.check(ys(n))});function Rs(e){return Fr(As,e)}const w=l("ZodStringFormat",(e,t)=>{y.init(e,t),vt.init(e,t)}),Ds=l("ZodEmail",(e,t)=>{Jn.init(e,t),w.init(e,t)}),Ue=l("ZodGUID",(e,t)=>{Un.init(e,t),w.init(e,t)}),G=l("ZodUUID",(e,t)=>{Fn.init(e,t),w.init(e,t)}),Cs=l("ZodURL",(e,t)=>{Mn.init(e,t),w.init(e,t)}),xs=l("ZodEmoji",(e,t)=>{Ln.init(e,t),w.init(e,t)}),Us=l("ZodNanoID",(e,t)=>{Vn.init(e,t),w.init(e,t)}),Fs=l("ZodCUID",(e,t)=>{Bn.init(e,t),w.init(e,t)}),Js=l("ZodCUID2",(e,t)=>{Wn.init(e,t),w.init(e,t)}),Ms=l("ZodULID",(e,t)=>{Kn.init(e,t),w.init(e,t)}),Ls=l("ZodXID",(e,t)=>{Gn.init(e,t),w.init(e,t)}),Vs=l("ZodKSUID",(e,t)=>{Yn.init(e,t),w.init(e,t)}),Bs=l("ZodIPv4",(e,t)=>{er.init(e,t),w.init(e,t)}),Ws=l("ZodIPv6",(e,t)=>{tr.init(e,t),w.init(e,t)}),Ks=l("ZodCIDRv4",(e,t)=>{nr.init(e,t),w.init(e,t)}),Gs=l("ZodCIDRv6",(e,t)=>{rr.init(e,t),w.init(e,t)}),Ys=l("ZodBase64",(e,t)=>{or.init(e,t),w.init(e,t)}),qs=l("ZodBase64URL",(e,t)=>{ir.init(e,t),w.init(e,t)}),Xs=l("ZodE164",(e,t)=>{ur.init(e,t),w.init(e,t)}),Hs=l("ZodJWT",(e,t)=>{ar.init(e,t),w.init(e,t)}),zt=l("ZodNumber",(e,t)=>{ut.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Jo(e,r,o),B(e,"ZodNumber",{gt(r,o){return this.check(De(r,o))},gte(r,o){return this.check(q(r,o))},min(r,o){return this.check(q(r,o))},lt(r,o){return this.check(Re(r,o))},lte(r,o){return this.check(Y(r,o))},max(r,o){return this.check(Y(r,o))},int(r){return this.check(Fe(r))},safe(r){return this.check(Fe(r))},positive(r){return this.check(De(0,r))},nonnegative(r){return this.check(q(0,r))},negative(r){return this.check(Re(0,r))},nonpositive(r){return this.check(Y(0,r))},multipleOf(r,o){return this.check(Ce(r,o))},step(r,o){return this.check(Ce(r,o))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Di(e){return po(zt,e)}const Qs=l("ZodNumberFormat",(e,t)=>{lr.init(e,t),zt.init(e,t)});function Fe(e){return ho(Qs,e)}const ei=l("ZodBoolean",(e,t)=>{fr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Mo(e,n,r)});function Ci(e){return mo(ei,e)}const ti=l("ZodNull",(e,t)=>{pr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Lo(e,n,r)});function xi(e){return _o(ti,e)}const ni=l("ZodAny",(e,t)=>{dr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wo()});function Ui(){return go(ni)}const ri=l("ZodUnknown",(e,t)=>{hr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ko()});function Je(){return vo(ri)}const oi=l("ZodNever",(e,t)=>{mr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bo(e,n,r)});function si(e){return zo(oi,e)}const ii=l("ZodVoid",(e,t)=>{_r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vo(e,n)});function Fi(e){return yo(ii,e)}const ui=l("ZodDate",(e,t)=>{gr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Go(e,r),e.min=(r,o)=>e.check(q(r,o)),e.max=(r,o)=>e.check(Y(r,o));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Ji(e){return bo(ui,e)}const ci=l("ZodArray",(e,t)=>{vr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qo(e,n,r,o),e.element=t.element,B(e,"ZodArray",{min(n,r){return this.check(H(n,r))},nonempty(n){return this.check(H(1,n))},max(n,r){return this.check(pt(n,r))},length(n,r){return this.check(dt(n,r))},unwrap(){return this.element}})});function ai(e,t){return jo(ci,e,t)}const li=l("ZodObject",(e,t)=>{yr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>es(e,n,r,o),_(e,"shape",()=>t.shape),B(e,"ZodObject",{keyof(){return _i(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Je()})},loose(){return this.clone({...this._zod.def,catchall:Je()})},strict(){return this.clone({...this._zod.def,catchall:si()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return jt(this,n)},safeExtend(n){return At(this,n)},merge(n){return Rt(this,n)},pick(n){return Pt(this,n)},omit(n){return Nt(this,n)},partial(...n){return Dt(bt,this,n[0])},required(...n){return Ct(wt,this,n[0])}})});function Mi(e,t){const n={type:"object",shape:e??{},...d(t)};return new li(n)}const yt=l("ZodUnion",(e,t)=>{lt.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ts(e,n,r,o),e.options=t.options});function fi(e,t){return new yt({type:"union",options:e,...d(t)})}const pi=l("ZodDiscriminatedUnion",(e,t)=>{yt.init(e,t),br.init(e,t)});function Li(e,t,n){return new pi({type:"union",options:t,discriminator:e,...d(n)})}const di=l("ZodIntersection",(e,t)=>{wr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ns(e,n,r,o)});function hi(e,t){return new di({type:"intersection",left:e,right:t})}const mi=l("ZodTuple",(e,t)=>{kr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rs(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Vi(e,t,n){const r=t instanceof v,o=r?n:t,i=r?t:null;return new mi({type:"tuple",items:e,rest:i,...d(o)})}const Me=l("ZodRecord",(e,t)=>{$r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>os(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Bi(e,t,n){return!t||!t._zod?new Me({type:"record",keyType:Rs(),valueType:e,...d(t)}):new Me({type:"record",keyType:e,valueType:t,...d(n)})}const ue=l("ZodEnum",(e,t)=>{Zr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Yo(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ue({...t,checks:[],...d(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ue({...t,checks:[],...d(o),entries:i})}});function _i(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ue({type:"enum",entries:n,...d(t)})}const gi=l("ZodLiteral",(e,t)=>{Sr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qo(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Wi(e,t){return new gi({type:"literal",values:Array.isArray(e)?e:[e],...d(t)})}const vi=l("ZodTransform",(e,t)=>{Or.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ho(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new We(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(V(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(V(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function zi(e){return new vi({type:"transform",transform:e})}const bt=l("ZodOptional",(e,t)=>{ft.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gt(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Le(e){return new bt({type:"optional",innerType:e})}const yi=l("ZodExactOptional",(e,t)=>{Ir.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gt(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function bi(e){return new yi({type:"optional",innerType:e})}const wi=l("ZodNullable",(e,t)=>{Tr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ss(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ve(e){return new wi({type:"nullable",innerType:e})}const ki=l("ZodDefault",(e,t)=>{Er.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>us(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $i(e,t){return new ki({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ye(t)}})}const Zi=l("ZodPrefault",(e,t)=>{Pr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cs(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Si(e,t){return new Zi({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ye(t)}})}const wt=l("ZodNonOptional",(e,t)=>{Nr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>is(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Oi(e,t){return new wt({type:"nonoptional",innerType:e,...d(t)})}const Ii=l("ZodCatch",(e,t)=>{jr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>as(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ti(e,t){return new Ii({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ei=l("ZodPipe",(e,t)=>{Ar.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ls(e,n,r,o),e.in=t.in,e.out=t.out});function Be(e,t){return new Ei({type:"pipe",in:e,out:t})}const Pi=l("ZodReadonly",(e,t)=>{Rr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fs(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ni(e){return new Pi({type:"readonly",innerType:e})}const ji=l("ZodLazy",(e,t)=>{Dr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ps(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function Ki(e){return new ji({type:"lazy",getter:e})}const me=l("ZodCustom",(e,t)=>{Cr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xo(e,n)});function Gi(e,t){return Ao(me,(()=>!0),t)}function Ai(e,t={}){return Ro(me,e,t)}function Ri(e,t){return Do(e,t)}function Yi(e,t={}){const n=new me({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...d(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}export{As as Z,Fi as _,ai as a,Ci as b,Yi as c,_i as d,Ji as e,fi as f,Ki as g,Gi as h,Li as i,Ui as j,xi as k,Wi as l,zt as m,Di as n,Mi as o,ei as p,ue as q,Bi as r,Rs as s,Vi as t,Je as u,ci as v,li as w,ki as x,bt as y,wi as z};
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-pmj5N6Ix.js","assets/index-BP0PcGIN.js","assets/schemas-BOzikgNT.js","assets/index-DAq7g5_U.js","assets/index-OcuNiGT5.js","assets/index-DRebE_bu.js","assets/capability-router-map-Bqwnkkax.js","assets/devices-CFL4MLSo.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-cfq-Npln.js","assets/auth-records-BEfan3dC.js","assets/schemas-XgIEoUz3.js","assets/index-C-M4yvxf.js","assets/index-X-IEwb-L.js","assets/capability-router-map-B3jHfbHt.js","assets/devices-BfsgGvwu.js"])))=>i.map(i=>d[i]);
2
2
  import{_ as G}from"./preload-helper-BlTxHScW.js";var cr={},ur={},Pt={},M={},D={},P={};const fn="federation-manifest.json",dn=".json",hn="FEDERATION_DEBUG",j={AT:"@",HYPHEN:"-",SLASH:"/"},Ue={[j.AT]:"scope_",[j.HYPHEN]:"_",[j.SLASH]:"__"},mn={[Ue[j.AT]]:j.AT,[Ue[j.HYPHEN]]:j.HYPHEN,[Ue[j.SLASH]]:j.SLASH},_n=":",pn="mf-manifest.json",gn="mf-stats.json",En={NPM:"npm",APP:"app"},yn="__MF_DEVTOOLS_MODULE_INFO__",Sn="ENCODE_NAME_PREFIX",bn=".federation";let Rn=(function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e})({});P.BROWSER_LOG_KEY=hn;P.ENCODE_NAME_PREFIX=Sn;P.EncodedNameTransformMap=mn;P.FederationModuleManifest=fn;P.MANIFEST_EXT=dn;P.MFModuleType=En;P.MODULE_DEVTOOL_IDENTIFIER=yn;P.ManifestFileName=pn;P.NameTransformMap=Ue;P.NameTransformSymbol=j;P.SEPARATOR=_n;P.StatsFileName=gn;P.TEMP_DIR=bn;P.TreeShakingStatus=Rn;var fr={},re={},Ht=Object.defineProperty,Tn=(e,t)=>{let r={};for(var n in e)Ht(r,n,{get:e[n],enumerable:!0});return t||Ht(r,Symbol.toStringTag,{value:"Module"}),r};re.__exportAll=Tn;(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ContainerPlugin_exports",{enumerable:!0,get:function(){return r}})})(fr);var dr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ContainerReferencePlugin_exports",{enumerable:!0,get:function(){return r}})})(dr);var hr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ModuleFederationPlugin_exports",{enumerable:!0,get:function(){return r}})})(hr);var mr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"SharePlugin_exports",{enumerable:!0,get:function(){return r}})})(mr);var _r={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ConsumeSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(_r);var pr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ProvideSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(pr);var Z={},Re={};const In=P,gr=!0;function Er(){return gr}function Mn(){return typeof navigator<"u"&&navigator?.product==="ReactNative"}function Nn(){try{if(Er()&&window.localStorage)return!!localStorage.getItem(In.BROWSER_LOG_KEY)}catch{return!1}return!1}function $n(){return typeof process<"u"&&Re&&Re.FEDERATION_DEBUG?!!Re.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:Nn()}const Pn=function(){return typeof process<"u"&&Re?Re:{}};Z.getProcessEnv=Pn;Z.isBrowserEnv=Er;Z.isBrowserEnvValue=gr;Z.isDebugMode=$n;Z.isReactNativeEnv=Mn;var H={};const y=P,gt=Z,yr="[ Federation Runtime ]",vn=(e,t,r=y.SEPARATOR)=>{const n=e.split(r),o=gt.getProcessEnv().NODE_ENV==="development"&&t,s="*",i=a=>a.startsWith("http")||a.includes(y.MANIFEST_EXT);if(n.length>=2){let[a,...l]=n;e.startsWith(r)&&(a=n.slice(0,2).join(r),l=[o||n.slice(2).join(r)]);let c=o||l.join(r);return i(c)?{name:a,entry:c}:{name:a,version:c||s}}else if(n.length===1){const[a]=n;return o&&i(o)?{name:a,entry:o}:{name:a,version:o||s}}else throw`Invalid entry value: ${e}`},On=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}${y.SEPARATOR}${r}`:r:t,""):""},vt=function(e,t="",r=!1){try{const n=r?".js":"";return`${t}${e.replace(new RegExp(`${y.NameTransformSymbol.AT}`,"g"),y.NameTransformMap[y.NameTransformSymbol.AT]).replace(new RegExp(`${y.NameTransformSymbol.HYPHEN}`,"g"),y.NameTransformMap[y.NameTransformSymbol.HYPHEN]).replace(new RegExp(`${y.NameTransformSymbol.SLASH}`,"g"),y.NameTransformMap[y.NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},An=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(new RegExp(t,"g"),"")}return n=n.replace(new RegExp(`${y.NameTransformMap[y.NameTransformSymbol.AT]}`,"g"),y.EncodedNameTransformMap[y.NameTransformMap[y.NameTransformSymbol.AT]]).replace(new RegExp(`${y.NameTransformMap[y.NameTransformSymbol.SLASH]}`,"g"),y.EncodedNameTransformMap[y.NameTransformMap[y.NameTransformSymbol.SLASH]]).replace(new RegExp(`${y.NameTransformMap[y.NameTransformSymbol.HYPHEN]}`,"g"),y.EncodedNameTransformMap[y.NameTransformMap[y.NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},kn=(e,t)=>{if(!e)return"";let r=e;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),vt(r,"__federation_expose_",t)},wn=(e,t)=>e?vt(e,"__federation_shared_",t):"",Fn=(e,t)=>{if("getPublicPath"in e){let r;return e.getPublicPath.startsWith("function")?r=new Function("return "+e.getPublicPath)()():r=new Function(e.getPublicPath)(),`${r}${t}`}else return"publicPath"in e?!gt.isBrowserEnv()&&!gt.isReactNativeEnv()&&"ssrPublicPath"in e&&typeof e.ssrPublicPath=="string"?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},Ln=(e,t)=>{e||Sr(t)},Sr=e=>{throw new Error(`${yr}: ${e}`)},Dn=e=>{console.warn(`${yr}: ${e}`)};function Hn(e){try{return JSON.stringify(e,null,2)}catch{return""}}const qn=/^([\d^=v<>~]|[*xX]$)/;function Cn(e){return qn.test(e)}H.assert=Ln;H.composeKeyWithSeparator=On;H.decodeName=An;H.encodeName=vt;H.error=Sr;H.generateExposeFilename=kn;H.generateShareFilename=wn;H.getResourceUrl=Fn;H.isRequiredVersion=Cn;H.parseEntry=vn;H.safeToString=Hn;H.warn=Dn;var fe={};const ye=P,ce=(e,t)=>{if(!e)return t;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const s=o.slice(1);return s.endsWith("/")?s.slice(0,-1):s}return o})(e);return n?n.endsWith("/")?`${n}${t}`:`${n}/${t}`:t};function br(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Un(e,t={}){const{remotes:r={},overrides:n={},version:o}=t;let s;const i=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&o?br(o):e.metaData.publicPath:e.metaData.getPublicPath,a=Object.keys(n);let l={};Object.keys(r).length||(l=e.remotes?.reduce((p,k)=>{let F;const v=k.federationContainerName;return a.includes(v)?F=n[v]:"version"in k?F=k.version:F=k.entry,p[v]={matchedVersion:F},p},{})||{}),Object.keys(r).forEach(p=>l[p]={matchedVersion:a.includes(p)?n[p]:r[p]});const{remoteEntry:{path:c,name:u,type:f},types:d={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:h},globalName:_,ssrRemoteEntry:m}=e.metaData,{exposes:E}=e;let g={version:o||"",buildVersion:h,globalName:_,remoteEntry:ce(c,u),remoteEntryType:f,remoteTypes:ce(d.path,d.name),remoteTypesZip:d.zip||"",remoteTypesAPI:d.api||"",remotesInfo:l,shared:e?.shared.map(p=>({assets:p.assets,sharedName:p.name,version:p.version,usedExports:p.referenceExports||[]})),modules:E?.map(p=>({moduleName:p.name,modulePath:p.path,assets:p.assets}))};if("publicPath"in e.metaData?(s={...g,publicPath:i()},typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s={...g,getPublicPath:i()},m){const p=ce(m.path,m.name);s.ssrRemoteEntry=p,s.ssrRemoteEntryType=m.type||"commonjs-module"}return s}function Gn(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(ye.MANIFEST_EXT))}function Wn(e){if(!e)return{statsFileName:ye.StatsFileName,manifestFileName:ye.ManifestFileName};let t=typeof e=="boolean"?"":e.filePath||"",r=typeof e=="boolean"?"":e.fileName||"";const n=".json",o=a=>a.endsWith(n)?a:`${a}${n}`,s=(a,l)=>a.replace(n,`${l}${n}`),i=r?o(r):ye.ManifestFileName;return{statsFileName:ce(t,r?s(i,"-stats"):ye.StatsFileName),manifestFileName:ce(t,i)}}fe.generateSnapshotFromManifest=Un;fe.getManifestFileName=Wn;fe.inferAutoPublicPath=br;fe.isManifestProvider=Gn;fe.simpleJoinRemoteEntry=ce;var de={};const qt=Z,Rr="[ Module Federation ]",ge=console,Bn=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Vn(){try{const e=new Error().stack;if(!e)return;const[,...t]=e.split(`
3
3
  `),r=t.filter(n=>!Bn.some(o=>n.includes(o)));return r.length?`Stack trace:
4
4
  ${r.slice(0,5).join(`
5
5
  `)}`:void 0}catch{return}}var Tr=class{constructor(e,t=ge){this.prefix=e,this.delegate=t??ge}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??ge}emit(e,t){const r=this.delegate,n=qt.isDebugMode()?Vn():void 0,o=n?[...t,n]:t,s=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}})();for(const i of s){const a=r[i];if(typeof a=="function"){a.call(r,this.prefix,...o);return}}for(const i of s){const a=ge[i];if(typeof a=="function"){a.call(ge,this.prefix,...o);return}}}log(...e){this.emit("log",e)}warn(...e){this.emit("warn",e)}error(...e){this.emit("error",e)}success(...e){this.emit("info",e)}info(...e){this.emit("info",e)}ready(...e){this.emit("info",e)}debug(...e){qt.isDebugMode()&&this.emit("debug",e)}};function Ir(e){return new Tr(e)}function Mr(e){const t=new Tr(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function jn(e,t,r){if(e.__mf_infrastructure_logger__&&t?.getInfrastructureLogger)try{const n=t.getInfrastructureLogger(r);n&&typeof n=="object"&&(typeof n.log=="function"||typeof n.info=="function"||typeof n.warn=="function"||typeof n.error=="function")&&e.setDelegate(n)}catch{e.setDelegate(void 0)}}const xn=Ir(Rr),Xn=Mr(Rr);de.bindLoggerToCompiler=jn;de.createInfrastructureLogger=Mr;de.createLogger=Ir;de.infrastructureLogger=Xn;de.logger=xn;var he={};const Kn=H;async function Ot(e,t){try{return await e()}catch(r){!t&&Kn.warn(r);return}}function je(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function Nr(e){let t=null,r=!0,n=2e4,o;const s=document.getElementsByTagName("script");for(let c=0;c<s.length;c++){const u=s[c],f=u.getAttribute("src");if(f&&je(f,e.url)){t=u,r=!1;break}}if(!t){const c=e.attrs;t=document.createElement("script"),t.type=c?.type==="module"?"module":"text/javascript";let u;e.createScriptHook&&(u=e.createScriptHook(e.url,e.attrs),u instanceof HTMLScriptElement?t=u:typeof u=="object"&&("script"in u&&u.script&&(t=u.script),"timeout"in u&&u.timeout&&(n=u.timeout))),t.src||(t.src=e.url),c&&!u&&Object.keys(c).forEach(f=>{t&&(f==="async"||f==="defer"?t[f]=c[f]:t.getAttribute(f)||t.setAttribute(f,c[f]))})}let i=null;const a=typeof window<"u"?c=>{if(c.filename&&je(c.filename,e.url)){const u=new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${c.message} (${c.filename}:${c.lineno}:${c.colno})`);u.name="ScriptExecutionError",i=u}}:null;a&&window.addEventListener("error",a);const l=async(c,u)=>{clearTimeout(o),a&&window.removeEventListener("error",a);const f=()=>{if(u?.type==="error"){const d=new Error(u?.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);d.name="ScriptNetworkError",e?.onErrorCallback&&e?.onErrorCallback(d)}else i?e?.onErrorCallback&&e?.onErrorCallback(i):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,Ot(()=>{const{needDeleteScript:d=!0}=e;d&&t?.parentNode&&t.parentNode.removeChild(t)}),c&&typeof c=="function")){const d=c(u);if(d instanceof Promise){const h=await d;return f(),h}return f(),d}f()};return t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o=setTimeout(()=>{l(null,{type:"error",isTimeout:!0})},n),{script:t,needAttach:r}}function Yn(e){let t=null,r=!0;const n=document.getElementsByTagName("link");for(let s=0;s<n.length;s++){const i=n[s],a=i.getAttribute("href"),l=i.getAttribute("rel");if(a&&je(a,e.url)&&l===e.attrs.rel){t=i,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let s;const i=e.attrs;e.createLinkHook&&(s=e.createLinkHook(e.url,i),s instanceof HTMLLinkElement&&(t=s)),i&&!s&&Object.keys(i).forEach(a=>{t&&!t.getAttribute(a)&&t.setAttribute(a,i[a])})}const o=(s,i)=>{const a=()=>{i?.type==="error"?e?.onErrorCallback&&e?.onErrorCallback(i):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,Ot(()=>{const{needDeleteLink:l=!0}=e;l&&t?.parentNode&&t.parentNode.removeChild(t)}),s)){const l=s(i);return a(),l}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),{link:t,needAttach:r}}function zn(e,t){const{attrs:r={},createScriptHook:n}=t;return new Promise((o,s)=>{const{script:i,needAttach:a}=Nr({url:e,cb:o,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:n,needDeleteScript:!0});a&&document.head.appendChild(i)})}he.createLink=Yn;he.createScript=Nr;he.isStaticResourcesEqual=je;he.loadScript=zn;he.safeWrapper=Ot;var At={};const Jn=(e,t,r,n)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},Zn=(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};At.createScriptNode=Jn;At.loadScriptNode=Zn;var $r={};function Qn(e,t,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return e?t:!1;if(n===!0)return t;if(n&&typeof n=="object")return{...t,...n};throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}$r.normalizeOptions=Qn;var Pr={};const eo=e=>e;Pr.createModuleFederationConfig=eo;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=P,r=fr,n=dr,o=hr,s=mr,i=_r,a=pr,l=Z,c=H,u=fe,f=de,d=he,h=At,_=$r,m=Pr;e.BROWSER_LOG_KEY=t.BROWSER_LOG_KEY,e.ENCODE_NAME_PREFIX=t.ENCODE_NAME_PREFIX,e.EncodedNameTransformMap=t.EncodedNameTransformMap,e.FederationModuleManifest=t.FederationModuleManifest,e.MANIFEST_EXT=t.MANIFEST_EXT,e.MFModuleType=t.MFModuleType,e.MODULE_DEVTOOL_IDENTIFIER=t.MODULE_DEVTOOL_IDENTIFIER,e.ManifestFileName=t.ManifestFileName,e.NameTransformMap=t.NameTransformMap,e.NameTransformSymbol=t.NameTransformSymbol,e.SEPARATOR=t.SEPARATOR,e.StatsFileName=t.StatsFileName,e.TEMP_DIR=t.TEMP_DIR,e.TreeShakingStatus=t.TreeShakingStatus,e.assert=c.assert,e.bindLoggerToCompiler=f.bindLoggerToCompiler,e.composeKeyWithSeparator=c.composeKeyWithSeparator,Object.defineProperty(e,"consumeSharedPlugin",{enumerable:!0,get:function(){return i.ConsumeSharedPlugin_exports}}),Object.defineProperty(e,"containerPlugin",{enumerable:!0,get:function(){return r.ContainerPlugin_exports}}),Object.defineProperty(e,"containerReferencePlugin",{enumerable:!0,get:function(){return n.ContainerReferencePlugin_exports}}),e.createInfrastructureLogger=f.createInfrastructureLogger,e.createLink=d.createLink,e.createLogger=f.createLogger,e.createModuleFederationConfig=m.createModuleFederationConfig,e.createScript=d.createScript,e.createScriptNode=h.createScriptNode,e.decodeName=c.decodeName,e.encodeName=c.encodeName,e.error=c.error,e.generateExposeFilename=c.generateExposeFilename,e.generateShareFilename=c.generateShareFilename,e.generateSnapshotFromManifest=u.generateSnapshotFromManifest,e.getManifestFileName=u.getManifestFileName,e.getProcessEnv=l.getProcessEnv,e.getResourceUrl=c.getResourceUrl,e.inferAutoPublicPath=u.inferAutoPublicPath,e.infrastructureLogger=f.infrastructureLogger,e.isBrowserEnv=l.isBrowserEnv,e.isBrowserEnvValue=l.isBrowserEnvValue,e.isDebugMode=l.isDebugMode,e.isManifestProvider=u.isManifestProvider,e.isReactNativeEnv=l.isReactNativeEnv,e.isRequiredVersion=c.isRequiredVersion,e.isStaticResourcesEqual=d.isStaticResourcesEqual,e.loadScript=d.loadScript,e.loadScriptNode=h.loadScriptNode,e.logger=f.logger,Object.defineProperty(e,"moduleFederationPlugin",{enumerable:!0,get:function(){return o.ModuleFederationPlugin_exports}}),e.normalizeOptions=_.normalizeOptions,e.parseEntry=c.parseEntry,Object.defineProperty(e,"provideSharedPlugin",{enumerable:!0,get:function(){return a.ProvideSharedPlugin_exports}}),e.safeToString=c.safeToString,e.safeWrapper=d.safeWrapper,Object.defineProperty(e,"sharePlugin",{enumerable:!0,get:function(){return s.SharePlugin_exports}}),e.simpleJoinRemoteEntry=u.simpleJoinRemoteEntry,e.warn=c.warn})(D);var vr={},kt={};const to=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,ro=(e,t,r,n)=>{const o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(to(e)),n&&o.push(`Original Error Message:
6
6
  ${n}`),o.join(`
7
7
  `)};kt.getShortErrorMsg=ro;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kt;function r(n,o,s,i,a,l){return i(t.getShortErrorMsg(n,o,s,a))}e.logAndReport=r})(vr);let no=D,oo=vr;const ee="[ Federation Runtime ]",Et=(0,no.createLogger)(ee);function so(e,t,r,n,o){e||(r!==void 0?yt(t,r,n,void 0,o):yt(t))}function yt(e,t,r,n,o){if(t!==void 0)return(0,oo.logAndReport)(e,t,r??{},i=>{throw new Error(`${ee}: ${i}`)},n,o);const s=e;throw s instanceof Error?(s.message.startsWith(ee)||(s.message=`${ee}: ${s.message}`),s):new Error(`${ee}: ${s}`)}function io(e){e instanceof Error&&(e.message.startsWith(ee)||(e.message=`${ee}: ${e.message}`)),Et.warn(e)}M.assert=so;M.error=yt;M.logger=Et;M.warn=io;var R={};const ao=M;let Ct=D;function lo(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function co(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function uo(e){return typeof e.entry<"u"}function fo(e){return!e.entry.includes(".json")}async function ho(e,t){try{return await e()}catch(r){!t&&ao.warn(r);return}}function mo(e){return e&&typeof e=="object"}const Or=Object.prototype.toString;function _o(e){return Or.call(e)==="[object Object]"}function po(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function go(e){return Array.isArray(e)?e:[e]}function Eo(e){const t={url:"",type:"global",globalName:""};return Ct.isBrowserEnvValue||(0,Ct.isReactNativeEnv)()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}const yo=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r};R.addUniqueItem=lo;R.arrayOptions=go;R.getFMId=co;R.getRemoteEntryInfoFromSnapshot=Eo;R.isObject=mo;R.isPlainObject=_o;R.isPureRemoteEntry=fo;R.isRemoteInfoWithEntry=uo;R.isStaticResourcesEqual=po;R.objectToString=Or;R.processModuleAlias=yo;R.safeWrapper=ho;var S={};const Ar=M,St=R;let So=D;const $=typeof globalThis=="object"?globalThis:window,q=(()=>{try{return document.defaultView}catch{return $}})(),bo=q;function Ge(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function We(e,t){return Object.hasOwnProperty.call(e,t)}We($,"__GLOBAL_LOADING_REMOTE_ENTRY__")||Ge($,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const bt=$.__GLOBAL_LOADING_REMOTE_ENTRY__;function kr(e){We(e,"__VMOK__")&&!We(e,"__FEDERATION__")&&Ge(e,"__FEDERATION__",e.__VMOK__),We(e,"__FEDERATION__")||(Ge(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),Ge(e,"__VMOK__",e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}kr($);kr(q);function Ro(){$.__FEDERATION__.__GLOBAL_PLUGIN__=[],$.__FEDERATION__.__INSTANCES__=[],$.__FEDERATION__.moduleInfo={},$.__FEDERATION__.__SHARE__={},$.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(bt).forEach(e=>{delete bt[e]})}function To(e){$.__FEDERATION__.__INSTANCES__.push(e)}function Io(){return $.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Mo(e,t=(0,So.isDebugMode)()){t&&($.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,$.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.4.0")}function Rt(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{const r=Object.keys(e);for(const n of r){const[o,s]=n.split(":"),i=`${o}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}}else Ar.error(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const No=()=>q.__FEDERATION__.moduleInfo,wr=(e,t)=>{const r=Rt(t,St.getFMId(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){const{version:n,...o}=e,s=St.getFMId(o),i=Rt(q.__FEDERATION__.moduleInfo,s).value;if(i?.version===n)return i}},$o=e=>wr(e,q.__FEDERATION__.moduleInfo),Po=(e,t)=>{const r=St.getFMId(e);return q.__FEDERATION__.moduleInfo[r]=t,q.__FEDERATION__.moduleInfo},vo=e=>(q.__FEDERATION__.moduleInfo={...q.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete q.__FEDERATION__.moduleInfo[r]}),Oo=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:$[r]}},Ao=e=>{const{__GLOBAL_PLUGIN__:t}=q.__FEDERATION__;e.forEach(r=>{t.findIndex(n=>n.name===r.name)===-1?t.push(r):Ar.warn(`The plugin ${r.name} has been registered.`)})},ko=()=>q.__FEDERATION__.__GLOBAL_PLUGIN__,wo=e=>$.__FEDERATION__.__PRELOADED_MAP__.get(e),Fo=e=>$.__FEDERATION__.__PRELOADED_MAP__.set(e,!0);S.CurrentGlobal=$;S.Global=bo;S.addGlobalSnapshot=vo;S.getGlobalFederationConstructor=Io;S.getGlobalHostPlugins=ko;S.getGlobalSnapshot=No;S.getGlobalSnapshotInfoByModuleInfo=$o;S.getInfoWithoutType=Rt;S.getPreloaded=wo;S.getRemoteEntryExports=Oo;S.getTargetSnapshotInfoByModuleInfo=wr;S.globalLoading=bt;S.nativeGlobal=q;S.registerGlobalPlugins=Ao;S.resetFederationGlobalInfo=Ro;S.setGlobalFederationConstructor=Mo;S.setGlobalFederationInstance=To;S.setGlobalSnapshotInfoByModuleInfo=Po;S.setPreloaded=Fo;var wt={},ne={},B={};const Ut="[0-9A-Za-z-]+",Ft=`(?:\\+(${Ut}(?:\\.${Ut})*))`,Te="0|[1-9]\\d*",Be="[0-9]+",Fr="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Gt=`(?:${Be}|${Fr})`,Lo=`(?:-?(${Gt}(?:\\.${Gt})*))`,Wt=`(?:${Te}|${Fr})`,Lr=`(?:-(${Wt}(?:\\.${Wt})*))`,tt=`${Te}|x|X|\\*`,ue=`[v=\\s]*(${tt})(?:\\.(${tt})(?:\\.(${tt})(?:${Lr})?${Ft}?)?)?`,Do=`^\\s*(${ue})\\s+-\\s+(${ue})\\s*$`,Ho=`[v=\\s]*${`(${Be})\\.(${Be})\\.(${Be})`}${Lo}?${Ft}?`,Lt="((?:<|>)?=?)",qo=`(\\s*)${Lt}\\s*(${Ho}|${ue})`,Dr="(?:~>?)",Co=`(\\s*)${Dr}\\s+`,Hr="(?:\\^)",Uo=`(\\s*)${Hr}\\s+`,Go="(<|>)?=?\\s*\\*",Wo=`^${Hr}${ue}$`,Bo=`v?${`(${Te})\\.(${Te})\\.(${Te})`}${Lr}?${Ft}?`,Vo=`^${Dr}${ue}$`,jo=`^${Lt}\\s*${ue}$`,xo=`^${Lt}\\s*(${Bo})$|^$`,Xo="^\\s*>=\\s*0.0.0\\s*$";B.caret=Wo;B.caretTrim=Uo;B.comparator=xo;B.comparatorTrim=qo;B.gte0=Xo;B.hyphenRange=Do;B.star=Go;B.tilde=Vo;B.tildeTrim=Co;B.xRange=jo;const Ko=B;function qr(e){return new RegExp(e)}function Yo(e){return!e||e.toLowerCase()==="x"||e==="*"}function zo(...e){return t=>e.reduce((r,n)=>n(r),t)}function Jo(e){return e.match(qr(Ko.comparator))}function Zo(e,t,r,n){const o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}ne.combineVersion=Zo;ne.extractComparator=Jo;ne.isXVersion=Yo;ne.parseRegex=qr;ne.pipe=zo;var x={};const Y=B,b=ne;function Qo(e){return e.replace(b.parseRegex(Y.hyphenRange),(t,r,n,o,s,i,a,l,c,u,f,d)=>(b.isXVersion(n)?r="":b.isXVersion(o)?r=`>=${n}.0.0`:b.isXVersion(s)?r=`>=${n}.${o}.0`:r=`>=${r}`,b.isXVersion(c)?l="":b.isXVersion(u)?l=`<${Number(c)+1}.0.0-0`:b.isXVersion(f)?l=`<${c}.${Number(u)+1}.0-0`:d?l=`<=${c}.${u}.${f}-${d}`:l=`<=${l}`,`${r} ${l}`.trim()))}function es(e){return e.replace(b.parseRegex(Y.comparatorTrim),"$1$2$3")}function ts(e){return e.replace(b.parseRegex(Y.tildeTrim),"$1~")}function rs(e){return e.replace(b.parseRegex(Y.caretTrim),"$1^")}function ns(e){return e.trim().split(/\s+/).map(t=>t.replace(b.parseRegex(Y.caret),(r,n,o,s,i)=>b.isXVersion(n)?"":b.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:b.isXVersion(s)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:i?n==="0"?o==="0"?`>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s}-${i} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${s} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${Number(n)+1}.0.0-0`)).join(" ")}function os(e){return e.trim().split(/\s+/).map(t=>t.replace(b.parseRegex(Y.tilde),(r,n,o,s,i)=>b.isXVersion(n)?"":b.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:b.isXVersion(s)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:i?`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`)).join(" ")}function ss(e){return e.split(/\s+/).map(t=>t.trim().replace(b.parseRegex(Y.xRange),(r,n,o,s,i,a)=>{const l=b.isXVersion(o),c=l||b.isXVersion(s),u=c||b.isXVersion(i);return n==="="&&u&&(n=""),a="",l?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(c&&(s=0),i=0,n===">"?(n=">=",c?(o=Number(o)+1,s=0,i=0):(s=Number(s)+1,i=0)):n==="<="&&(n="<",c?o=Number(o)+1:s=Number(s)+1),n==="<"&&(a="-0"),`${n+o}.${s}.${i}${a}`):c?`>=${o}.0.0${a} <${Number(o)+1}.0.0-0`:u?`>=${o}.${s}.0${a} <${o}.${Number(s)+1}.0-0`:r})).join(" ")}function is(e){return e.trim().replace(b.parseRegex(Y.star),"")}function as(e){return e.trim().replace(b.parseRegex(Y.gte0),"")}x.parseCaretTrim=rs;x.parseCarets=ns;x.parseComparatorTrim=es;x.parseGTE0=as;x.parseHyphen=Qo;x.parseStar=is;x.parseTildeTrim=ts;x.parseTildes=os;x.parseXRanges=ss;var Cr={};function Ve(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function ls(e,t){const{preRelease:r}=e,{preRelease:n}=t;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,s=r.length;o<=s;o++){const i=r[o],a=n[o];if(i!==a)return i===void 0&&a===void 0?0:i?a?Ve(i,a):-1:1}return 0}function we(e,t){return Ve(e.major,t.major)||Ve(e.minor,t.minor)||Ve(e.patch,t.patch)||ls(e,t)}function rt(e,t){return e.version===t.version}function cs(e,t){switch(e.operator){case"":case"=":return rt(e,t);case">":return we(e,t)<0;case">=":return rt(e,t)||we(e,t)<0;case"<":return we(e,t)>0;case"<=":return rt(e,t)||we(e,t)>0;case void 0:return!0;default:return!1}}Cr.compare=cs;const ae=ne,K=x,us=Cr;function fs(e){return ae.pipe(K.parseCarets,K.parseTildes,K.parseXRanges,K.parseStar)(e)}function ds(e){return ae.pipe(K.parseHyphen,K.parseComparatorTrim,K.parseTildeTrim,K.parseCaretTrim)(e.trim()).split(/\s+/).join(" ")}function hs(e,t){if(!e)return!1;const r=ae.extractComparator(e);if(!r)return!1;const[,n,,o,s,i,a]=r,l={operator:n,version:ae.combineVersion(o,s,i,a),major:o,minor:s,patch:i,preRelease:a?.split(".")},c=t.split("||");for(const u of c){const f=u.trim();if(!f||f==="*"||f==="x")return!0;try{const d=ds(f);if(!d.trim())return!0;const h=d.split(" ").map(E=>fs(E)).join(" ");if(!h.trim())return!0;const _=h.split(/\s+/).map(E=>K.parseGTE0(E)).filter(Boolean);if(_.length===0)continue;let m=!0;for(const E of _){const g=ae.extractComparator(E);if(!g){m=!1;break}const[,p,,k,F,v,T]=g;if(!us.compare({operator:p,version:ae.combineVersion(k,F,v,T),major:k,minor:F,patch:v,preRelease:T?.split(".")},l)){m=!1;break}}if(m)return!0}catch(d){console.error(`[semver] Error processing range part "${f}":`,d);continue}}return!1}wt.satisfy=hs;var C={},oe={};const ms="default",_s="global";oe.DEFAULT_REMOTE_TYPE=_s;oe.DEFAULT_SCOPE=ms;const xe=M,Ur=R,Gr=S,ps=oe,Se=wt;let Tt=D;function gs(e,t,r,n){let o;return"get"in e?o=e.get:"lib"in e?o=()=>Promise.resolve(e.lib):o=()=>Promise.resolve(()=>{xe.error(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&xe.error(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e?.loaded||"lib"in e?!0:void 0,version:e.version??"0",scope:Array.isArray(e.scope)?e.scope:[e.scope??"default"],strategy:(e.strategy??n)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??Tt.TreeShakingStatus.UNKNOWN,useIn:[]}:void 0}}function Es(e,t){const r=t.shared||{},n=t.name,o=Object.keys(r).reduce((i,a)=>{const l=Ur.arrayOptions(r[a]);return i[a]=i[a]||[],l.forEach(c=>{i[a].push(gs(c,n,a,t.shareStrategy))}),i},{}),s={...e.shared};return Object.keys(o).forEach(i=>{s[i]?o[i].forEach(a=>{s[i].find(l=>l.version===a.version)||s[i].push(a)}):s[i]=o[i]}),{allShareInfos:s,newShareInfos:o}}function Ie(e,t){if(!e)return!1;const{status:r,mode:n}=e;return r===Tt.TreeShakingStatus.NO_USE?!1:r===Tt.TreeShakingStatus.CALCULATED?!0:n==="runtime-infer"?t?Ss(e,t):!0:!1}function te(e,t){const r=n=>{if(!Number.isNaN(Number(n))){const o=n.split(".");let s=n;for(let i=0;i<3-o.length;i++)s+=".0";return s}return n};return!!Se.satisfy(r(e),`<=${r(t)}`)}const Me=(e,t)=>{const r=t||function(n,o){return te(n,o)};return Object.keys(e).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},Xe=e=>!!e.loaded||typeof e.lib=="function",ys=e=>!!e.loading,Ss=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(n=>r.includes(n)):!1};function bs(e,t,r,n){const o=e[t][r];let s="",i=Ie(n);const a=function(l,c){return i?o[l].treeShaking?o[c].treeShaking?!Xe(o[l].treeShaking)&&te(l,c):!1:!0:!Xe(o[l])&&te(l,c)};if(i){if(s=Me(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Me(e[t][r],a),useTreesShaking:i}}const se=e=>Xe(e)||ys(e);function Rs(e,t,r,n){const o=e[t][r];let s="",i=Ie(n);const a=function(l,c){if(i){if(!o[l].treeShaking)return!0;if(!o[c].treeShaking)return!1;if(se(o[c].treeShaking))return se(o[l].treeShaking)?!!te(l,c):!0;if(se(o[l].treeShaking))return!1}return se(o[c])?se(o[l])?!!te(l,c):!0:se(o[l])?!1:te(l,c)};if(i){if(s=Me(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Me(e[t][r],a),useTreesShaking:i}}function Ts(e){return e==="loaded-first"?Rs:bs}function Is(e,t,r,n){if(!e)return;const{shareConfig:o,scope:s=ps.DEFAULT_SCOPE,strategy:i,treeShaking:a}=r,l=Array.isArray(s)?s:[s];for(const c of l)if(o&&e[c]&&e[c][t]){const{requiredVersion:u}=o,{version:f,useTreesShaking:d}=Ts(i)(e,c,t,a),h=()=>{const m=e[c][t][f];if(o.singleton){if(typeof u=="string"&&!Se.satisfy(f,u)){const E=`Version ${f} from ${f&&m.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;o.strictVersion?xe.error(E):xe.warn(E)}return{shared:m,useTreesShaking:d}}else{if(u===!1||u==="*")return{shared:m,useTreesShaking:d};if(Se.satisfy(f,u))return{shared:m,useTreesShaking:d};const E=Ie(a);if(E){for(const[g,p]of Object.entries(e[c][t]))if(Ie(p.treeShaking,a?.usedExports)&&Se.satisfy(g,u))return{shared:p,useTreesShaking:E}}for(const[g,p]of Object.entries(e[c][t]))if(Se.satisfy(g,u))return{shared:p,useTreesShaking:!1}}},_={shareScopeMap:e,scope:c,pkgName:t,version:f,GlobalFederation:Gr.Global.__FEDERATION__,shareInfo:r,resolver:h};return(n.emit(_)||_).resolver()}}function Ms(){return Gr.Global.__FEDERATION__.__SHARE__}function Ns(e){const{pkgName:t,extraOptions:r,shareInfos:n}=e,o=l=>{if(!l)return;const c={};return l.forEach(f=>{c[f.version]=f}),c[Me(c,function(f,d){return!Xe(c[f])&&te(f,d)})]},s=r?.resolver??o,i=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),a=(...l)=>{const c={};for(const u of l)if(u)for(const[f,d]of Object.entries(u)){const h=c[f];i(h)&&i(d)?c[f]=a(h,d):d!==void 0&&(c[f]=d)}return c};return a(s(n[t]),r?.customShareInfo)}const $s=(e,t)=>{e.useIn||(e.useIn=[]),Ur.addUniqueItem(e.useIn,t)};function Ps(e,t){return t&&e.treeShaking?e.treeShaking:e}C.addUseIn=$s;C.directShare=Ps;C.formatShareConfigs=Es;C.getGlobalShareScope=Ms;C.getRegisteredShare=Is;C.getTargetSharedOptions=Ns;C.shouldUseTreeShaking=Ie;var me={};function vs(e,t){for(const r of e){const n=t.startsWith(r.name);let o=t.replace(r.name,"");if(n){if(o.startsWith("/")){const a=r.name;return o=`.${o}`,{pkgNameOrAlias:a,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&t.startsWith(r.alias);let i=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(i&&i.startsWith("/")){const a=r.alias;return i=`.${i}`,{pkgNameOrAlias:a,expose:i,remote:r}}else if(i==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Os(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}me.matchRemote=Os;me.matchRemoteWithNameAndExpose=vs;var X={},z={},A={};const As="RUNTIME-001",ks="RUNTIME-002",ws="RUNTIME-003",Fs="RUNTIME-004",Ls="RUNTIME-005",Ds="RUNTIME-006",Hs="RUNTIME-007",qs="RUNTIME-008",Cs="RUNTIME-009",Us="RUNTIME-010",Gs="RUNTIME-011",Ws="RUNTIME-012",Bs="TYPE-001",Vs="BUILD-001",js="BUILD-002";A.BUILD_001=Vs;A.BUILD_002=js;A.RUNTIME_001=As;A.RUNTIME_002=ks;A.RUNTIME_003=ws;A.RUNTIME_004=Fs;A.RUNTIME_005=Ls;A.RUNTIME_006=Ds;A.RUNTIME_007=Hs;A.RUNTIME_008=qs;A.RUNTIME_009=Cs;A.RUNTIME_010=Us;A.RUNTIME_011=Gs;A.RUNTIME_012=Ws;A.TYPE_001=Bs;var Pe={};const w=A,Wr={[w.RUNTIME_001]:"Failed to get remoteEntry exports.",[w.RUNTIME_002]:'The remote entry interface does not contain "init"',[w.RUNTIME_003]:"Failed to get manifest.",[w.RUNTIME_004]:"Failed to locate remote.",[w.RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[w.RUNTIME_006]:"Invalid loadShareSync function call from runtime",[w.RUNTIME_007]:"Failed to get remote snapshot.",[w.RUNTIME_008]:"Failed to load script resources.",[w.RUNTIME_009]:"Please call createInstance first.",[w.RUNTIME_010]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[w.RUNTIME_011]:"The remoteEntry URL is missing from the remote snapshot.",[w.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},Br={[w.TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},Vr={[w.BUILD_001]:"Failed to find expose module.",[w.BUILD_002]:"PublicPath is required in prod mode."},xs={...Wr,...Br,...Vr};Pe.buildDescMap=Vr;Pe.errorDescMap=xs;Pe.runtimeDescMap=Wr;Pe.typeDescMap=Br;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=A,r=kt,n=Pe;e.BUILD_001=t.BUILD_001,e.BUILD_002=t.BUILD_002,e.RUNTIME_001=t.RUNTIME_001,e.RUNTIME_002=t.RUNTIME_002,e.RUNTIME_003=t.RUNTIME_003,e.RUNTIME_004=t.RUNTIME_004,e.RUNTIME_005=t.RUNTIME_005,e.RUNTIME_006=t.RUNTIME_006,e.RUNTIME_007=t.RUNTIME_007,e.RUNTIME_008=t.RUNTIME_008,e.RUNTIME_009=t.RUNTIME_009,e.RUNTIME_010=t.RUNTIME_010,e.RUNTIME_011=t.RUNTIME_011,e.RUNTIME_012=t.RUNTIME_012,e.TYPE_001=t.TYPE_001,e.buildDescMap=n.buildDescMap,e.errorDescMap=n.errorDescMap,e.getShortErrorMsg=r.getShortErrorMsg,e.runtimeDescMap=n.runtimeDescMap,e.typeDescMap=n.typeDescMap})(z);const Ye=M,le=S,Bt=oe;let jr=D,Ne=z;const xr=".then(callbacks[0]).catch(callbacks[1])";async function Xs({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${xr}`)([r,n]):import(e).then(r).catch(n)}catch(o){Ye.error(`Failed to load ESM entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}async function Ks({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${xr}`)([r,n])}catch(o){Ye.error(`Failed to load SystemJS entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}function Ys(e,t,r){const{remoteEntryKey:n,entryExports:o}=le.getRemoteEntryExports(e,t);return o||Ye.error(Ne.RUNTIME_001,Ne.runtimeDescMap,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n}),o}async function zs({name:e,globalName:t,entry:r,remoteInfo:n,loaderHook:o,getEntryUrl:s}){const{entryExports:i}=le.getRemoteEntryExports(e,t);if(i)return i;const a=s?s(r):r;return(0,jr.loadScript)(a,{attrs:{},createScriptHook:(l,c)=>{const u=o.lifecycle.createScript.emit({url:l,attrs:c,remoteInfo:n});if(u&&(u instanceof HTMLScriptElement||"script"in u||"timeout"in u))return u}}).then(()=>Ys(e,t,r),l=>{const c=l instanceof Error?l.message:String(l);Ye.error(Ne.RUNTIME_008,Ne.runtimeDescMap,{remoteName:e,resourceUrl:a},c)})}async function Js({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n}){const{entry:o,entryGlobalName:s,name:i,type:a}=e;switch(a){case"esm":case"module":return Xs({entry:o,remoteEntryExports:t});case"system":return Ks({entry:o,remoteEntryExports:t});default:return zs({entry:o,globalName:s,name:i,remoteInfo:e,loaderHook:r,getEntryUrl:n})}}function It(e){const{entry:t,name:r}=e;return(0,jr.composeKeyWithSeparator)(r,t)}async function Xr(e){const{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:s=!1}=e,i=It(n);if(r)return r;if(!le.globalLoading[i]){const a=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;le.globalLoading[i]=a.emit({loaderHook:l,remoteInfo:n,remoteEntryExports:r}).then(c=>c||Js({remoteInfo:n,remoteEntryExports:r,loaderHook:l,getEntryUrl:o})).catch(async c=>{const u=It(n),f=c instanceof Error&&c.message.includes("ScriptExecutionError");if(c instanceof Error&&c.message.includes(Ne.RUNTIME_008)&&!f&&!s){const d=_=>Xr({..._,_inErrorHandling:!0}),h=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:d,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:le.globalLoading,uniqueKey:u});if(h)return h}throw c})}return le.globalLoading[i]}function Zs(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||Bt.DEFAULT_REMOTE_TYPE,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||Bt.DEFAULT_SCOPE}}X.getRemoteEntry=Xr;X.getRemoteEntryUniqueKey=It;X.getRemoteInfo=Zs;var Kr={};function Qs(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}Kr.getBuilderId=Qs;var Yr={};const ei=S;function ti(e,t){const r=ei.getGlobalHostPlugins(),n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(o=>{e?.find(s=>s.name!==o.name)&&e.push(o)}),e&&e.length>0&&e.forEach(o=>{n.forEach(s=>{s.applyPlugin(o,t)})}),e}Yr.registerPlugins=ti;var ve={};function ri(e){return{name:e.name,alias:e.alias,entry:"entry"in e?e.entry:void 0,version:"version"in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function ni(e){const t={};for(const[r,n]of Object.entries(e.shared)){const o=n[0];o&&(t[r]={version:o.version,singleton:o.shareConfig?.singleton,requiredVersion:o.shareConfig?.requiredVersion===!1?!1:o.shareConfig?.requiredVersion,eager:o.eager,strictVersion:o.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?"host":"unknown"},mfConfig:{name:e.name,remotes:e.remotes?.map(ri)??[],shared:t}}}ve.optionsToMFContext=ni;var zr={},Q={};const oi=M,si=me,Vt=X;let be=D;function Jr(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,...e}}function ii(e,t){return t.map(r=>{const n=si.matchRemote(e,r.nameOrAlias);return oi.assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&(0,be.safeToString)({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Jr(r)}})}function ai(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function li(e,t,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:i}=r;if(t.options.inBrowser){if(i.forEach(a=>{const{moduleInfo:l}=a,c=t.moduleCache.get(e.name);c?Vt.getRemoteEntry({origin:t,remoteInfo:l,remoteEntryExports:c.remoteEntryExports}):Vt.getRemoteEntry({origin:t,remoteInfo:l,remoteEntryExports:void 0})}),n){const a={rel:"preload",as:"style"};o.forEach(l=>{const{link:c,needAttach:u}=(0,be.createLink)({url:l,cb:()=>{},attrs:a,createLinkHook:(f,d)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(c)})}else{const a={rel:"stylesheet",type:"text/css"};o.forEach(l=>{const{link:c,needAttach:u}=(0,be.createLink)({url:l,cb:()=>{},attrs:a,createLinkHook:(f,d)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLLinkElement)return h},needDeleteLink:!1});u&&document.head.appendChild(c)})}if(n){const a={rel:"preload",as:"script"};s.forEach(l=>{const{link:c,needAttach:u}=(0,be.createLink)({url:l,cb:()=>{},attrs:a,createLinkHook:(f,d)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(c)})}else{const a={fetchpriority:"high",type:e?.type==="module"?"module":"text/javascript"};s.forEach(l=>{const{script:c,needAttach:u}=(0,be.createScript)({url:l,cb:()=>{},attrs:a,createScriptHook:(f,d)=>{const h=t.loaderHook.lifecycle.createScript.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLScriptElement)return h},needDeleteScript:!0});u&&document.head.appendChild(c)})}}}Q.defaultPreloadArgs=Jr;Q.formatPreloadArgs=ii;Q.normalizePreloadExposes=ai;Q.preloadAssets=li;const O=S,jt=C,ci=me,ui=X,fi=Q,di={getRegisteredShare:jt.getRegisteredShare,getGlobalShareScope:jt.getGlobalShareScope},hi={Global:O.Global,nativeGlobal:O.nativeGlobal,resetFederationGlobalInfo:O.resetFederationGlobalInfo,setGlobalFederationInstance:O.setGlobalFederationInstance,getGlobalFederationConstructor:O.getGlobalFederationConstructor,setGlobalFederationConstructor:O.setGlobalFederationConstructor,getInfoWithoutType:O.getInfoWithoutType,getGlobalSnapshot:O.getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo:O.getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo:O.getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo:O.setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot:O.addGlobalSnapshot,getRemoteEntryExports:O.getRemoteEntryExports,registerGlobalPlugins:O.registerGlobalPlugins,getGlobalHostPlugins:O.getGlobalHostPlugins,getPreloaded:O.getPreloaded,setPreloaded:O.setPreloaded};var mi={global:hi,share:di,utils:{matchRemoteWithNameAndExpose:ci.matchRemoteWithNameAndExpose,preloadAssets:fi.preloadAssets,getRemoteInfo:ui.getRemoteInfo}};zr.default=mi;var ze={};const nt=M,xt=R,_i=X,pi=ve;let gi=D,Xt=z;function Ei(e,t,r){const n=t,o=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];o.length||o.push("default"),o.forEach(i=>{n[i]||(n[i]={})});const s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?o:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:n,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:n[o[0]],initScope:r??[]}}var yi=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;const e=await _i.getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports});return nt.assert(e,`remoteEntryExports is undefined
8
- ${(0,gi.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=Ei(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof n?.init>"u"&&nt.error(Xt.RUNTIME_002,Xt.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,pi.optionsToMFContext(this.host.options)),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),nt.assert(i,`${xt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=xt.processModuleAlias(this.remoteInfo.name,t),l=this.wraperFactory(i,a);return o?await l():l}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};ze.Module=yi;var Zr={},_e={},Si=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}};_e.SyncHook=Si;var Oe={};const bi=_e;var Ri=class extends bi.SyncHook{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n<r.length?Promise.resolve(r[n++].apply(null,e)).then(o):s;t=o()}return Promise.resolve(t)}};Oe.AsyncHook=Ri;var pe={};const ot=M,Qr=R,Ti=_e;function en(e,t){if(!Qr.isObject(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var Ii=class extends Ti.SyncHook{constructor(e){super(),this.onerror=ot.error,this.type=e}emit(e){Qr.isObject(e)||ot.error(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(en(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){ot.warn(r),this.onerror(r)}return e}};pe.SyncWaterfallHook=Ii;pe.checkReturnData=en;var Ae={};const st=M,Mi=R,Ni=_e,$i=pe;var Pi=class extends Ni.SyncHook{constructor(e){super(),this.onerror=st.error,this.type=e}emit(e){Mi.isObject(e)||st.error(`The response data for the "${this.type}" hook must be an object.`);const t=Array.from(this.listeners);if(t.length>0){let r=0;const n=s=>(st.warn(s),this.onerror(s),e),o=s=>{if($i.checkReturnData(e,s)){if(e=s,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(i){return n(i)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(o(e))}return Promise.resolve(e)}};Ae.AsyncWaterfallHook=Pi;var ke={};const Fe=M,vi=R;var Oi=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){Fe.assert(vi.isPlainObject(e),"Plugin configuration is invalid.");const r=e.name;Fe.assert(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,e.apply?.(t),Object.keys(this.lifecycle).forEach(n=>{const o=e[n];o&&this.lifecycle[n].on(o)}))}removePlugin(e){Fe.assert(e,"A name is required.");const t=this.registerPlugins[e];Fe.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};ke.PluginSystem=Oi;var Je={};const Ai=M,Mt=R,ki=Q;let Kt=D,Yt=z;function tn(e,t){const r=Mt.getRemoteEntryInfoFromSnapshot(t);r.url||Ai.error(Yt.RUNTIME_011,Yt.runtimeDescMap,{remoteName:e.name});let n=(0,Kt.getResourceUrl)(t,r.url);!Kt.isBrowserEnvValue&&!n.startsWith("http")&&(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function wi(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!Mt.isRemoteInfoWithEntry(t)||!Mt.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:l}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});tn(s,a);const c={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:c,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:l});return u&&ki.preloadAssets(s,o,u,!1),{...e,remoteSnapshot:a}}return e}}}Je.assignRemoteInfo=tn;Je.snapshotPlugin=wi;var rn={};const $e=R,Nt=S,Fi=C,zt=Q,Li=Je;let Ke=D;function Di(e){const t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function nn(e,t,r,n,o={},s){const{value:i}=Nt.getInfoWithoutType(e,$e.getFMId(t)),a=s||i;if(a&&!(0,Ke.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const l=Object.keys(a.remotesInfo);for(const c of l){if(o[c])continue;o[c]=!0;const u=Di(c),f=a.remotesInfo[c];nn(e,{name:u.name,version:f.matchedVersion},r,!1,o,void 0)}}}const it=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Hi(e,t,r,n,o){const s=[],i=[],a=[],l=new Set,c=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:d}=f;if(nn(n,r,(_,m,E)=>{let g;if(E)g=f;else if(Array.isArray(d)){const T=d.find(L=>L.nameOrAlias===m.name||L.nameOrAlias===m.alias);if(!T)return;g=zt.defaultPreloadArgs(T)}else if(d===!0)g=f;else return;const p=(0,Ke.getResourceUrl)(_,$e.getRemoteEntryInfoFromSnapshot(_).url);p&&a.push({name:m.name,moduleInfo:{name:m.name,entry:p,type:"remoteEntryType"in _?_.remoteEntryType:"global",entryGlobalName:"globalName"in _?_.globalName:m.name,shareScope:"",version:"version"in _?_.version:void 0},url:p});let k="modules"in _?_.modules:[];const F=zt.normalizePreloadExposes(g.exposes);F.length&&"modules"in _&&(k=_?.modules?.reduce((T,L)=>(F?.indexOf(L.moduleName)!==-1&&T.push(L),T),[]));function v(T){const L=T.map(V=>(0,Ke.getResourceUrl)(_,V));return g.filter?L.filter(g.filter):L}if(k){const T=k.length;for(let L=0;L<T;L++){const V=k[L],et=`${m.name}/${V.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:V.moduleName==="."?m.name:et,name:m.name,remoteSnapshot:_,preloadConfig:g,remote:m,origin:e}),!Nt.getPreloaded(et)&&(g.resourceCategory==="all"?(s.push(...v(V.assets.css.async)),s.push(...v(V.assets.css.sync)),i.push(...v(V.assets.js.async)),i.push(...v(V.assets.js.sync))):g.resourceCategory==="sync"&&(s.push(...v(V.assets.css.sync)),i.push(...v(V.assets.js.sync))),Nt.setPreloaded(et))}}},!0,{},o),o.shared&&o.shared.length>0){const _=(m,E)=>{const{shared:g}=Fi.getRegisteredShare(e.shareScopeMap,E.sharedName,m,e.sharedHandler.hooks.lifecycle.resolveShare)||{};g&&typeof g.lib=="function"&&(E.assets.js.sync.forEach(p=>{l.add(p)}),E.assets.css.sync.forEach(p=>{c.add(p)}))};o.shared.forEach(m=>{const E=u.shared?.[m.sharedName];if(!E)return;const g=m.version?E.find(p=>p.version===m.version):E;g&&$e.arrayOptions(g).forEach(p=>{_(p,m)})})}const h=i.filter(_=>!l.has(_)&&!it("script",_));return{cssAssets:s.filter(_=>!c.has(_)&&!it("link",_)),jsAssetsWithoutEntry:h,entryAssets:a.filter(_=>!it("script",_.url))}}const qi=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return Ke.isBrowserEnvValue?$e.isRemoteInfoWithEntry(o)&&$e.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(Li.assignRemoteInfo(n,i),Hi(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};rn.generatePreloadAssetsPlugin=qi;var Ze={};const at=M,Ci=R,W=S,Ui=X,Jt=ve,Gi=Oe,lt=Ae,Wi=ke;let ct=D,Le=z;function on(e,t){const r=W.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&W.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:W.getGlobalSnapshot(),remoteSnapshot:W.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:W.getGlobalSnapshot(),remoteSnapshot:W.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var Bi=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Wi.PluginSystem({beforeLoadRemoteSnapshot:new Gi.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new lt.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new lt.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new lt.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=W.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=W.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},W.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!W.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o?.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:l,globalSnapshot:c}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let u,f;if(l)if((0,ct.isManifestProvider)(l)){const d=ct.isBrowserEnvValue?l.remoteEntry:l.ssrRemoteEntry||l.remoteEntry||"",h=await this.getManifestJson(d,e,{}),_=W.setGlobalSnapshotInfoByModuleInfo({...e,entry:d},h);u=h,f=_}else{const{remoteSnapshot:d}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:l,from:"global"});u=d,f=c}else if(Ci.isRemoteInfoWithEntry(e)){const d=await this.getManifestJson(e.entry,e,{}),h=W.setGlobalSnapshotInfoByModuleInfo(e,d),{remoteSnapshot:_}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:d,from:"global"});u=_,f=h}else at.error(Le.RUNTIME_007,Le.runtimeDescMap,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(c)},void 0,Jt.optionsToMFContext(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:f}}getGlobalRemoteInfo(e){return on(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{},Ui.getRemoteInfo(t));(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],at.error(Le.RUNTIME_003,Le.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,Jt.optionsToMFContext(this.HostInstance.options)))}return at.assert(s.metaData&&s.exposes&&s.shared,`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[!s.metaData&&"metaData",!s.exposes&&"exposes",!s.shared&&"shared"].filter(Boolean).join(", ")}.`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,ct.generateSnapshotFromManifest)(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=o().then(s=>s)),this.manifestLoading[e]}};Ze.SnapshotHandler=Bi;Ze.getGlobalRemoteInfo=on;var sn={};const ut=M,Vi=oe,N=C,Zt=ve,ji=Oe,ft=pe,Qt=Ae,xi=ke;let Ee=z;var Xi=class{constructor(e){this.hooks=new xi.PluginSystem({beforeRegisterShare:new ft.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new Qt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new Qt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new ji.AsyncHook,resolveShare:new ft.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new ft.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=N.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),this.shareScopeMap[i]?.[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=N.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n?.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});ut.assert(o,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);const{shared:s,useTreesShaking:i}=N.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=N.directShare(s,i);if(a.lib)return N.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const l=await a.loading;return a.loaded=!0,a.lib||(a.lib=l),N.addUseIn(a,r.options.name),l}else{const c=(async()=>{const u=await a.get();return N.addUseIn(a,r.options.name),a.loaded=!0,a.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:c,treeShaking:i?a:void 0}),c}}else{if(t?.customShareInfo)return!1;const a=N.shouldUseTreeShaking(o.treeShaking),l=N.directShare(o,a),u=(async()=>{const f=await l.get();l.lib=f,l.loaded=!0,N.addUseIn(l,r.options.name);const{shared:d,useTreesShaking:h}=N.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(d){const _=N.directShare(d,h);_.lib=f,_.loaded=!0,d.from=o.from}return f})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:u,treeShaking:a?l:void 0}),u}}initializeSharing(e=Vi.DEFAULT_SCOPE,t){const{host:r}=this,n=t?.from,o=t?.strategy;let s=t?.initScope;const i=[];if(n!=="build"){const{initTokens:d}=this;s||(s=[]);let h=d[e];if(h||(h=d[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,l=r.options.name;a[e]||(a[e]={});const c=a[e],u=(d,h)=>{const{version:_,eager:m}=h;c[d]=c[d]||{};const E=c[d],g=E[_]&&N.directShare(E[_]),p=!!(g&&("eager"in g&&g.eager||"shareConfig"in g&&g.shareConfig?.eager));(!g||g.strategy!=="loaded-first"&&!g.loaded&&(!m!=!p?m:l>E[_].from))&&(E[_]=h)},f=async d=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:d});let _;try{_=await h.getEntry()}catch(m){if(_=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:d,error:m,from:"runtime",lifecycle:"beforeLoadShare",origin:r}),!_)return}finally{_?.init&&!h.initing&&(h.remoteEntryExports=_,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(d=>{r.options.shared[d].forEach(h=>{h.scope.includes(e)&&u(d,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(d=>{d.shareScope===e&&i.push(f(d.name))}),i}loadShareSync(e,t){const{host:r}=this,n=N.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n?.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=N.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return N.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return N.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();return i instanceof Promise&&ut.error(t?.from==="build"?Ee.RUNTIME_005:Ee.RUNTIME_006,Ee.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Zt.optionsToMFContext(r.options)),n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}ut.error(Ee.RUNTIME_006,Ee.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Zt.optionsToMFContext(r.options))}initShareScopeMap(e,t,r={}){const{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:s,get:i,treeShaking:a}){const{version:l,scope:c="default",...u}=t,f=Array.isArray(c)?c:[c],d=h=>{const _=(E,g,p)=>{p&&!E[g]&&(E[g]=p)},m=a?h.treeShaking:h;_(m,"loaded",s),_(m,"loading",o),_(m,"get",i)};f.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][l]||(this.shareScopeMap[h][e][l]={version:l,scope:[h],...u,lib:n});const _=this.shareScopeMap[h][e][l];d(_),r&&_.from!==r&&(_.from=r)})}_setGlobalShareScopeMap(e){const t=N.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};sn.SharedHandler=Xi;var an={};const De=M,U=S,er=oe,Ki=C,Yi=me,dt=X,zi=ve,tr=Q,Ji=ze,Zi=_e,ie=Oe,rr=pe,Qi=Ae,ea=ke,ta=Ze;let ht=D,nr=z;var ra=class{constructor(e){this.hooks=new ea.PluginSystem({beforeRegisterRemote:new rr.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new rr.SyncWaterfallHook("registerRemote"),beforeRequest:new Qi.AsyncWaterfallHook("beforeRequest"),onLoad:new ie.AsyncHook("onLoad"),handlePreloadModule:new Zi.SyncHook("handlePreloadModule"),errorLoadRemote:new ie.AsyncHook("errorLoadRemote"),beforePreloadRemote:new ie.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new ie.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new ie.AsyncHook,loadEntry:new ie.AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:l,expose:c,id:u,remoteSnapshot:f}=i,d=await o.get(u,c,t,f),h=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:c,exposeModule:n?d:void 0,exposeModuleFactory:n?void 0:d,remote:l,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:d}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=tr.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=dt.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});l&&tr.preloadAssets(s,t,l)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t?.force})})}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=Yi.matchRemoteWithNameAndExpose(t.options.remotes,o);s||De.error(nr.RUNTIME_004,nr.runtimeDescMap,{hostName:t.options.name,requestId:o},void 0,zi.optionsToMFContext(t.options));const{remote:i}=s,a=dt.getRemoteInfo(i),l=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:c,expose:u}=l;De.assert(c&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let f=t.moduleCache.get(c.name);const d={host:t,remoteInfo:a};return f||(f=new Ji.Module(d),t.moduleCache.set(c.name,f)),{module:f,moduleOptions:d,remoteMatchInfo:l}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>e.alias&&(a.name.startsWith(e.alias)||a.alias?.startsWith(e.alias)));De.assert(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.name} name or alias`)}"entry"in e&&ht.isBrowserEnvValue&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=er.DEFAULT_SCOPE),e.type||(e.type=er.DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r?.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,ht.warn)(i.join(" ")))}}removeRemote(e){try{const{host:t}=this,{name:r}=e,n=t.options.remotes.findIndex(s=>s.name===r);n!==-1&&t.options.remotes.splice(n,1);const o=t.moduleCache.get(e.name);if(o){const s=o.remoteInfo,i=s.entryGlobalName;U.CurrentGlobal[i]&&(Object.getOwnPropertyDescriptor(U.CurrentGlobal,i)?.configurable?delete U.CurrentGlobal[i]:U.CurrentGlobal[i]=void 0);const a=dt.getRemoteEntryUniqueKey(o.remoteInfo);U.globalLoading[a]&&delete U.globalLoading[a],t.snapshotHandler.manifestCache.delete(s.entry);let l=s.buildVersion?(0,ht.composeKeyWithSeparator)(s.name,s.buildVersion):s.name;const c=U.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(f=>s.buildVersion?f.options.id===l:f.name===l);if(c!==-1){const f=U.CurrentGlobal.__FEDERATION__.__INSTANCES__[c];l=f.options.id||l;const d=Ki.getGlobalShareScope();let h=!0;const _=[];Object.keys(d).forEach(m=>{const E=d[m];E&&Object.keys(E).forEach(g=>{const p=E[g];p&&Object.keys(p).forEach(k=>{const F=p[k];F&&Object.keys(F).forEach(v=>{const T=F[v];T&&typeof T=="object"&&T.from===s.name&&(T.loaded||T.loading?(T.useIn=T.useIn.filter(L=>L!==s.name),T.useIn.length?h=!1:_.push([m,g,k,v])):_.push([m,g,k,v]))})})})}),h&&(f.shareScopeMap={},delete d[l]),_.forEach(([m,E,g,p])=>{delete d[m]?.[E]?.[g]?.[p]}),U.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(c,1)}const{hostGlobalSnapshot:u}=ta.getGlobalRemoteInfo(e,t);if(u){const f=u&&"remotesInfo"in u&&u.remotesInfo&&U.getInfoWithoutType(u.remotesInfo,e.name).key;f&&(delete u.remotesInfo[f],U.Global.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete U.Global.__FEDERATION__.__MANIFEST_LOADING__[f])}t.moduleCache.delete(e.name)}}catch(t){De.logger.error(`removeRemote failed: ${t instanceof Error?t.message:String(t)}`)}}};an.RemoteHandler=ra;const na=M,oa=oe,sa=C,ia=Kr,aa=Yr,la=X,ca=ze,J=_e,mt=Oe,ua=pe,or=Ae,_t=ke,fa=Je,da=rn,ha=Ze,ma=sn,_a=an;let pa=D,pt=z;const ga=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var Ea=class{constructor(e){this.hooks=new _t.PluginSystem({beforeInit:new ua.SyncWaterfallHook("beforeInit"),init:new J.SyncHook,beforeInitContainer:new or.AsyncWaterfallHook("beforeInitContainer"),initContainer:new or.AsyncWaterfallHook("initContainer")}),this.version="2.4.0",this.moduleCache=new Map,this.loaderHook=new _t.PluginSystem({getModuleInfo:new J.SyncHook,createScript:new J.SyncHook,createLink:new J.SyncHook,fetch:new mt.AsyncHook,loadEntryError:new mt.AsyncHook,getModuleFactory:new mt.AsyncHook}),this.bridgeHook=new _t.PluginSystem({beforeBridgeRender:new J.SyncHook,afterBridgeRender:new J.SyncHook,beforeBridgeDestroy:new J.SyncHook,afterBridgeDestroy:new J.SyncHook});const t=ga?[fa.snapshotPlugin(),da.generatePreloadAssetsPlugin()]:[],r={id:ia.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:pa.isBrowserEnvValue};this.name=e.name,this.options=r,this.snapshotHandler=new ha.SnapshotHandler(this),this.sharedHandler=new ma.SharedHandler(this),this.remoteHandler=new _a.RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&na.error((0,pt.getShortErrorMsg)(pt.RUNTIME_010,pt.runtimeDescMap)),this.registerPlugins(e.plugins);const t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=oa.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=la.getRemoteInfo({name:e,entry:t}),o=new ca.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const{allShareInfos:r}=sa.formatShareConfigs(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(c=>{a.includes(c)||a.push(c)});const l={...e,...t,plugins:a,remotes:s,shared:i,id:n.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:l}),l}registerPlugins(e){const t=aa.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Zr.ModuleFederation=Ea;var ln={},cn={},sr=Object.defineProperty,ya=(e,t)=>{let r={};for(var n in e)sr(r,n,{get:e[n],enumerable:!0});return t||sr(r,Symbol.toStringTag,{value:"Module"}),r};cn.__exportAll=ya;(function(e){var r=cn.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(ln);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M,r=R,n=S,o=wt,s=C,i=me,a=X,l=zr,c=ze,u=Zr,f=ln;let d=D;const h=l.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=c.Module,e.ModuleFederation=u.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.error=t.error,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return d.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return d.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return f.type_exports}})})(Pt);let Sa=Pt;function ba(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function Ra(e,t){const r=ba();return Sa.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}ur.getGlobalFederationInstance=Ra;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ur;let r=Pt,n=z;function o(m){const E=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)({id:`${m.name}@${m.version||Date.now()}`,...m});return(0,r.setGlobalFederationInstance)(E),E}let s=null;function i(m){const E=t.getGlobalFederationInstance(m.name,m.version),g={...m,id:m.id||""};return E?(E.initOptions(g),s||(s=E),E):(s=o(g),s)}function a(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadRemote.apply(s,m)}function l(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShare.apply(s,m)}function c(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShareSync.apply(s,m)}function u(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.preloadRemote.apply(s,m)}function f(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerRemotes.apply(s,m)}function d(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerPlugins.apply(s,m)}function h(){return s}function _(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerShared.apply(s,m)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=l,e.loadShareSync=c,e.preloadRemote=u,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=d,e.registerRemotes=f,e.registerShared=_})(cr);typeof __VUE_HMR_RUNTIME__>"u"&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});const un="__mf_init____mf__virtual/__mfe_internal__admin_ui_host__mf_v__runtimeInit__mf_v__.js__";let $t=globalThis[un];if(!$t){let e,t;const r=new Promise((n,o)=>{e=n,t=o});$t=globalThis[un]={initPromise:r,initResolve:e,initReject:t},typeof window>"u"&&e({loadRemote:function(){return Promise.resolve(void 0)},loadShare:function(){return Promise.resolve(void 0)}})}const Ta=$t.initResolve,Qe="__mf_module_cache__";globalThis[Qe]||={share:{},remote:{}};globalThis[Qe].share||={};globalThis[Qe].remote||={};const I=globalThis[Qe],ir={},ar="default",lr="__mfe_internal__admin_ui_host";let He,qe,Ce;async function Dt(e){for(let t=0;;t++)try{return await e()}catch(r){throw r}}async function Ia(){return qe||(qe=Dt(()=>G(()=>import("./_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-D4TBsvIB.js"),[])).catch(e=>{throw qe=void 0,e})),qe}async function Ma(){return Ce||(Ce=Dt(()=>G(()=>import("./virtualExposes-_ivNhQLP.js"),[])).then(e=>e.default??e).catch(e=>{throw Ce=void 0,e})),Ce}async function $a(e={},t=[]){const{usedShared:r,usedRemotes:n}=await Ia();if(I.share.react===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs-B_akQFxJ.js").then(c=>c.a),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share.react=l}if(I.share["react-dom"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs-CCRqQaXq.js").then(c=>c.a),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["react-dom"]=l}if(I.share["react/jsx-runtime"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-C_6K4VBY.js").then(c=>c.a),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["react/jsx-runtime"]=l}if(I.share["@camstack/sdk"]===void 0){const l={...await G(()=>import("./index-pmj5N6Ix.js"),__vite__mapDeps([0,1,2]))};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@camstack/sdk"]=l}if(I.share["@camstack/types"]===void 0){const l={...await G(()=>import("./index-DAq7g5_U.js"),__vite__mapDeps([3,2]))};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@camstack/types"]=l}if(I.share["@camstack/ui-library"]===void 0){const l={...await G(()=>import("./index-OcuNiGT5.js"),__vite__mapDeps([4,5,6,1,2,7]))};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@camstack/ui-library"]=l}if(I.share["@tanstack/react-query"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-CKfGBI-Z.js").then(c=>c._),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@tanstack/react-query"]=l}if(I.share["@trpc/client"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DIkg6-MH.js").then(c=>c._),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@trpc/client"]=l}if(I.share["@trpc/react-query"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-xMlwAAY4.js").then(c=>c._),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@trpc/react-query"]=l}if(I.share["react-dom/client"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-CRHuTm5p.js").then(c=>c.a),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["react-dom/client"]=l}const o={name:lr,remotes:n,shared:r,plugins:[],shareStrategy:"version-first"};He?He.initOptions(o):He=cr.createInstance(o);const s=He;var i=ir[ar];if(i||(i=ir[ar]={from:lr}),!(t.indexOf(i)>=0)){t.push(i),s.initShareScopeMap("default",e),Ta(s);try{await Dt(async()=>{await Promise.all(await s.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))})}catch(a){console.error("[Module Federation]",a)}return s}}async function Pa(e){const t=await Ma();if(!(e in t))throw new Error(`[Module Federation] Module ${e} does not exist in container.`);return t[e]().then(r=>()=>r)}export{cr as d,Pa as g,$a as i};
8
+ ${(0,gi.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=Ei(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof n?.init>"u"&&nt.error(Xt.RUNTIME_002,Xt.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,pi.optionsToMFContext(this.host.options)),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),nt.assert(i,`${xt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=xt.processModuleAlias(this.remoteInfo.name,t),l=this.wraperFactory(i,a);return o?await l():l}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};ze.Module=yi;var Zr={},_e={},Si=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}};_e.SyncHook=Si;var Oe={};const bi=_e;var Ri=class extends bi.SyncHook{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n<r.length?Promise.resolve(r[n++].apply(null,e)).then(o):s;t=o()}return Promise.resolve(t)}};Oe.AsyncHook=Ri;var pe={};const ot=M,Qr=R,Ti=_e;function en(e,t){if(!Qr.isObject(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var Ii=class extends Ti.SyncHook{constructor(e){super(),this.onerror=ot.error,this.type=e}emit(e){Qr.isObject(e)||ot.error(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(en(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){ot.warn(r),this.onerror(r)}return e}};pe.SyncWaterfallHook=Ii;pe.checkReturnData=en;var Ae={};const st=M,Mi=R,Ni=_e,$i=pe;var Pi=class extends Ni.SyncHook{constructor(e){super(),this.onerror=st.error,this.type=e}emit(e){Mi.isObject(e)||st.error(`The response data for the "${this.type}" hook must be an object.`);const t=Array.from(this.listeners);if(t.length>0){let r=0;const n=s=>(st.warn(s),this.onerror(s),e),o=s=>{if($i.checkReturnData(e,s)){if(e=s,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(i){return n(i)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(o(e))}return Promise.resolve(e)}};Ae.AsyncWaterfallHook=Pi;var ke={};const Fe=M,vi=R;var Oi=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){Fe.assert(vi.isPlainObject(e),"Plugin configuration is invalid.");const r=e.name;Fe.assert(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,e.apply?.(t),Object.keys(this.lifecycle).forEach(n=>{const o=e[n];o&&this.lifecycle[n].on(o)}))}removePlugin(e){Fe.assert(e,"A name is required.");const t=this.registerPlugins[e];Fe.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};ke.PluginSystem=Oi;var Je={};const Ai=M,Mt=R,ki=Q;let Kt=D,Yt=z;function tn(e,t){const r=Mt.getRemoteEntryInfoFromSnapshot(t);r.url||Ai.error(Yt.RUNTIME_011,Yt.runtimeDescMap,{remoteName:e.name});let n=(0,Kt.getResourceUrl)(t,r.url);!Kt.isBrowserEnvValue&&!n.startsWith("http")&&(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function wi(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!Mt.isRemoteInfoWithEntry(t)||!Mt.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:l}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});tn(s,a);const c={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:c,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:l});return u&&ki.preloadAssets(s,o,u,!1),{...e,remoteSnapshot:a}}return e}}}Je.assignRemoteInfo=tn;Je.snapshotPlugin=wi;var rn={};const $e=R,Nt=S,Fi=C,zt=Q,Li=Je;let Ke=D;function Di(e){const t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function nn(e,t,r,n,o={},s){const{value:i}=Nt.getInfoWithoutType(e,$e.getFMId(t)),a=s||i;if(a&&!(0,Ke.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const l=Object.keys(a.remotesInfo);for(const c of l){if(o[c])continue;o[c]=!0;const u=Di(c),f=a.remotesInfo[c];nn(e,{name:u.name,version:f.matchedVersion},r,!1,o,void 0)}}}const it=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Hi(e,t,r,n,o){const s=[],i=[],a=[],l=new Set,c=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:d}=f;if(nn(n,r,(_,m,E)=>{let g;if(E)g=f;else if(Array.isArray(d)){const T=d.find(L=>L.nameOrAlias===m.name||L.nameOrAlias===m.alias);if(!T)return;g=zt.defaultPreloadArgs(T)}else if(d===!0)g=f;else return;const p=(0,Ke.getResourceUrl)(_,$e.getRemoteEntryInfoFromSnapshot(_).url);p&&a.push({name:m.name,moduleInfo:{name:m.name,entry:p,type:"remoteEntryType"in _?_.remoteEntryType:"global",entryGlobalName:"globalName"in _?_.globalName:m.name,shareScope:"",version:"version"in _?_.version:void 0},url:p});let k="modules"in _?_.modules:[];const F=zt.normalizePreloadExposes(g.exposes);F.length&&"modules"in _&&(k=_?.modules?.reduce((T,L)=>(F?.indexOf(L.moduleName)!==-1&&T.push(L),T),[]));function v(T){const L=T.map(V=>(0,Ke.getResourceUrl)(_,V));return g.filter?L.filter(g.filter):L}if(k){const T=k.length;for(let L=0;L<T;L++){const V=k[L],et=`${m.name}/${V.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:V.moduleName==="."?m.name:et,name:m.name,remoteSnapshot:_,preloadConfig:g,remote:m,origin:e}),!Nt.getPreloaded(et)&&(g.resourceCategory==="all"?(s.push(...v(V.assets.css.async)),s.push(...v(V.assets.css.sync)),i.push(...v(V.assets.js.async)),i.push(...v(V.assets.js.sync))):g.resourceCategory==="sync"&&(s.push(...v(V.assets.css.sync)),i.push(...v(V.assets.js.sync))),Nt.setPreloaded(et))}}},!0,{},o),o.shared&&o.shared.length>0){const _=(m,E)=>{const{shared:g}=Fi.getRegisteredShare(e.shareScopeMap,E.sharedName,m,e.sharedHandler.hooks.lifecycle.resolveShare)||{};g&&typeof g.lib=="function"&&(E.assets.js.sync.forEach(p=>{l.add(p)}),E.assets.css.sync.forEach(p=>{c.add(p)}))};o.shared.forEach(m=>{const E=u.shared?.[m.sharedName];if(!E)return;const g=m.version?E.find(p=>p.version===m.version):E;g&&$e.arrayOptions(g).forEach(p=>{_(p,m)})})}const h=i.filter(_=>!l.has(_)&&!it("script",_));return{cssAssets:s.filter(_=>!c.has(_)&&!it("link",_)),jsAssetsWithoutEntry:h,entryAssets:a.filter(_=>!it("script",_.url))}}const qi=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return Ke.isBrowserEnvValue?$e.isRemoteInfoWithEntry(o)&&$e.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(Li.assignRemoteInfo(n,i),Hi(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};rn.generatePreloadAssetsPlugin=qi;var Ze={};const at=M,Ci=R,W=S,Ui=X,Jt=ve,Gi=Oe,lt=Ae,Wi=ke;let ct=D,Le=z;function on(e,t){const r=W.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&W.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:W.getGlobalSnapshot(),remoteSnapshot:W.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:W.getGlobalSnapshot(),remoteSnapshot:W.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var Bi=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Wi.PluginSystem({beforeLoadRemoteSnapshot:new Gi.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new lt.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new lt.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new lt.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=W.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=W.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},W.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!W.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o?.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:l,globalSnapshot:c}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let u,f;if(l)if((0,ct.isManifestProvider)(l)){const d=ct.isBrowserEnvValue?l.remoteEntry:l.ssrRemoteEntry||l.remoteEntry||"",h=await this.getManifestJson(d,e,{}),_=W.setGlobalSnapshotInfoByModuleInfo({...e,entry:d},h);u=h,f=_}else{const{remoteSnapshot:d}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:l,from:"global"});u=d,f=c}else if(Ci.isRemoteInfoWithEntry(e)){const d=await this.getManifestJson(e.entry,e,{}),h=W.setGlobalSnapshotInfoByModuleInfo(e,d),{remoteSnapshot:_}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:d,from:"global"});u=_,f=h}else at.error(Le.RUNTIME_007,Le.runtimeDescMap,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(c)},void 0,Jt.optionsToMFContext(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:f}}getGlobalRemoteInfo(e){return on(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{},Ui.getRemoteInfo(t));(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],at.error(Le.RUNTIME_003,Le.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,Jt.optionsToMFContext(this.HostInstance.options)))}return at.assert(s.metaData&&s.exposes&&s.shared,`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[!s.metaData&&"metaData",!s.exposes&&"exposes",!s.shared&&"shared"].filter(Boolean).join(", ")}.`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,ct.generateSnapshotFromManifest)(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=o().then(s=>s)),this.manifestLoading[e]}};Ze.SnapshotHandler=Bi;Ze.getGlobalRemoteInfo=on;var sn={};const ut=M,Vi=oe,N=C,Zt=ve,ji=Oe,ft=pe,Qt=Ae,xi=ke;let Ee=z;var Xi=class{constructor(e){this.hooks=new xi.PluginSystem({beforeRegisterShare:new ft.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new Qt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new Qt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new ji.AsyncHook,resolveShare:new ft.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new ft.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=N.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),this.shareScopeMap[i]?.[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=N.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n?.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});ut.assert(o,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);const{shared:s,useTreesShaking:i}=N.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=N.directShare(s,i);if(a.lib)return N.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const l=await a.loading;return a.loaded=!0,a.lib||(a.lib=l),N.addUseIn(a,r.options.name),l}else{const c=(async()=>{const u=await a.get();return N.addUseIn(a,r.options.name),a.loaded=!0,a.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:c,treeShaking:i?a:void 0}),c}}else{if(t?.customShareInfo)return!1;const a=N.shouldUseTreeShaking(o.treeShaking),l=N.directShare(o,a),u=(async()=>{const f=await l.get();l.lib=f,l.loaded=!0,N.addUseIn(l,r.options.name);const{shared:d,useTreesShaking:h}=N.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(d){const _=N.directShare(d,h);_.lib=f,_.loaded=!0,d.from=o.from}return f})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:u,treeShaking:a?l:void 0}),u}}initializeSharing(e=Vi.DEFAULT_SCOPE,t){const{host:r}=this,n=t?.from,o=t?.strategy;let s=t?.initScope;const i=[];if(n!=="build"){const{initTokens:d}=this;s||(s=[]);let h=d[e];if(h||(h=d[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,l=r.options.name;a[e]||(a[e]={});const c=a[e],u=(d,h)=>{const{version:_,eager:m}=h;c[d]=c[d]||{};const E=c[d],g=E[_]&&N.directShare(E[_]),p=!!(g&&("eager"in g&&g.eager||"shareConfig"in g&&g.shareConfig?.eager));(!g||g.strategy!=="loaded-first"&&!g.loaded&&(!m!=!p?m:l>E[_].from))&&(E[_]=h)},f=async d=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:d});let _;try{_=await h.getEntry()}catch(m){if(_=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:d,error:m,from:"runtime",lifecycle:"beforeLoadShare",origin:r}),!_)return}finally{_?.init&&!h.initing&&(h.remoteEntryExports=_,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(d=>{r.options.shared[d].forEach(h=>{h.scope.includes(e)&&u(d,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(d=>{d.shareScope===e&&i.push(f(d.name))}),i}loadShareSync(e,t){const{host:r}=this,n=N.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n?.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=N.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return N.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return N.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();return i instanceof Promise&&ut.error(t?.from==="build"?Ee.RUNTIME_005:Ee.RUNTIME_006,Ee.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Zt.optionsToMFContext(r.options)),n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}ut.error(Ee.RUNTIME_006,Ee.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Zt.optionsToMFContext(r.options))}initShareScopeMap(e,t,r={}){const{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:s,get:i,treeShaking:a}){const{version:l,scope:c="default",...u}=t,f=Array.isArray(c)?c:[c],d=h=>{const _=(E,g,p)=>{p&&!E[g]&&(E[g]=p)},m=a?h.treeShaking:h;_(m,"loaded",s),_(m,"loading",o),_(m,"get",i)};f.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][l]||(this.shareScopeMap[h][e][l]={version:l,scope:[h],...u,lib:n});const _=this.shareScopeMap[h][e][l];d(_),r&&_.from!==r&&(_.from=r)})}_setGlobalShareScopeMap(e){const t=N.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};sn.SharedHandler=Xi;var an={};const De=M,U=S,er=oe,Ki=C,Yi=me,dt=X,zi=ve,tr=Q,Ji=ze,Zi=_e,ie=Oe,rr=pe,Qi=Ae,ea=ke,ta=Ze;let ht=D,nr=z;var ra=class{constructor(e){this.hooks=new ea.PluginSystem({beforeRegisterRemote:new rr.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new rr.SyncWaterfallHook("registerRemote"),beforeRequest:new Qi.AsyncWaterfallHook("beforeRequest"),onLoad:new ie.AsyncHook("onLoad"),handlePreloadModule:new Zi.SyncHook("handlePreloadModule"),errorLoadRemote:new ie.AsyncHook("errorLoadRemote"),beforePreloadRemote:new ie.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new ie.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new ie.AsyncHook,loadEntry:new ie.AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:l,expose:c,id:u,remoteSnapshot:f}=i,d=await o.get(u,c,t,f),h=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:c,exposeModule:n?d:void 0,exposeModuleFactory:n?void 0:d,remote:l,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:d}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=tr.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=dt.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});l&&tr.preloadAssets(s,t,l)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t?.force})})}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=Yi.matchRemoteWithNameAndExpose(t.options.remotes,o);s||De.error(nr.RUNTIME_004,nr.runtimeDescMap,{hostName:t.options.name,requestId:o},void 0,zi.optionsToMFContext(t.options));const{remote:i}=s,a=dt.getRemoteInfo(i),l=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:c,expose:u}=l;De.assert(c&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let f=t.moduleCache.get(c.name);const d={host:t,remoteInfo:a};return f||(f=new Ji.Module(d),t.moduleCache.set(c.name,f)),{module:f,moduleOptions:d,remoteMatchInfo:l}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>e.alias&&(a.name.startsWith(e.alias)||a.alias?.startsWith(e.alias)));De.assert(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.name} name or alias`)}"entry"in e&&ht.isBrowserEnvValue&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=er.DEFAULT_SCOPE),e.type||(e.type=er.DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r?.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,ht.warn)(i.join(" ")))}}removeRemote(e){try{const{host:t}=this,{name:r}=e,n=t.options.remotes.findIndex(s=>s.name===r);n!==-1&&t.options.remotes.splice(n,1);const o=t.moduleCache.get(e.name);if(o){const s=o.remoteInfo,i=s.entryGlobalName;U.CurrentGlobal[i]&&(Object.getOwnPropertyDescriptor(U.CurrentGlobal,i)?.configurable?delete U.CurrentGlobal[i]:U.CurrentGlobal[i]=void 0);const a=dt.getRemoteEntryUniqueKey(o.remoteInfo);U.globalLoading[a]&&delete U.globalLoading[a],t.snapshotHandler.manifestCache.delete(s.entry);let l=s.buildVersion?(0,ht.composeKeyWithSeparator)(s.name,s.buildVersion):s.name;const c=U.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(f=>s.buildVersion?f.options.id===l:f.name===l);if(c!==-1){const f=U.CurrentGlobal.__FEDERATION__.__INSTANCES__[c];l=f.options.id||l;const d=Ki.getGlobalShareScope();let h=!0;const _=[];Object.keys(d).forEach(m=>{const E=d[m];E&&Object.keys(E).forEach(g=>{const p=E[g];p&&Object.keys(p).forEach(k=>{const F=p[k];F&&Object.keys(F).forEach(v=>{const T=F[v];T&&typeof T=="object"&&T.from===s.name&&(T.loaded||T.loading?(T.useIn=T.useIn.filter(L=>L!==s.name),T.useIn.length?h=!1:_.push([m,g,k,v])):_.push([m,g,k,v]))})})})}),h&&(f.shareScopeMap={},delete d[l]),_.forEach(([m,E,g,p])=>{delete d[m]?.[E]?.[g]?.[p]}),U.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(c,1)}const{hostGlobalSnapshot:u}=ta.getGlobalRemoteInfo(e,t);if(u){const f=u&&"remotesInfo"in u&&u.remotesInfo&&U.getInfoWithoutType(u.remotesInfo,e.name).key;f&&(delete u.remotesInfo[f],U.Global.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete U.Global.__FEDERATION__.__MANIFEST_LOADING__[f])}t.moduleCache.delete(e.name)}}catch(t){De.logger.error(`removeRemote failed: ${t instanceof Error?t.message:String(t)}`)}}};an.RemoteHandler=ra;const na=M,oa=oe,sa=C,ia=Kr,aa=Yr,la=X,ca=ze,J=_e,mt=Oe,ua=pe,or=Ae,_t=ke,fa=Je,da=rn,ha=Ze,ma=sn,_a=an;let pa=D,pt=z;const ga=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var Ea=class{constructor(e){this.hooks=new _t.PluginSystem({beforeInit:new ua.SyncWaterfallHook("beforeInit"),init:new J.SyncHook,beforeInitContainer:new or.AsyncWaterfallHook("beforeInitContainer"),initContainer:new or.AsyncWaterfallHook("initContainer")}),this.version="2.4.0",this.moduleCache=new Map,this.loaderHook=new _t.PluginSystem({getModuleInfo:new J.SyncHook,createScript:new J.SyncHook,createLink:new J.SyncHook,fetch:new mt.AsyncHook,loadEntryError:new mt.AsyncHook,getModuleFactory:new mt.AsyncHook}),this.bridgeHook=new _t.PluginSystem({beforeBridgeRender:new J.SyncHook,afterBridgeRender:new J.SyncHook,beforeBridgeDestroy:new J.SyncHook,afterBridgeDestroy:new J.SyncHook});const t=ga?[fa.snapshotPlugin(),da.generatePreloadAssetsPlugin()]:[],r={id:ia.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:pa.isBrowserEnvValue};this.name=e.name,this.options=r,this.snapshotHandler=new ha.SnapshotHandler(this),this.sharedHandler=new ma.SharedHandler(this),this.remoteHandler=new _a.RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&na.error((0,pt.getShortErrorMsg)(pt.RUNTIME_010,pt.runtimeDescMap)),this.registerPlugins(e.plugins);const t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=oa.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=la.getRemoteInfo({name:e,entry:t}),o=new ca.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const{allShareInfos:r}=sa.formatShareConfigs(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(c=>{a.includes(c)||a.push(c)});const l={...e,...t,plugins:a,remotes:s,shared:i,id:n.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:l}),l}registerPlugins(e){const t=aa.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Zr.ModuleFederation=Ea;var ln={},cn={},sr=Object.defineProperty,ya=(e,t)=>{let r={};for(var n in e)sr(r,n,{get:e[n],enumerable:!0});return t||sr(r,Symbol.toStringTag,{value:"Module"}),r};cn.__exportAll=ya;(function(e){var r=cn.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(ln);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M,r=R,n=S,o=wt,s=C,i=me,a=X,l=zr,c=ze,u=Zr,f=ln;let d=D;const h=l.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=c.Module,e.ModuleFederation=u.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.error=t.error,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return d.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return d.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return f.type_exports}})})(Pt);let Sa=Pt;function ba(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function Ra(e,t){const r=ba();return Sa.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}ur.getGlobalFederationInstance=Ra;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ur;let r=Pt,n=z;function o(m){const E=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)({id:`${m.name}@${m.version||Date.now()}`,...m});return(0,r.setGlobalFederationInstance)(E),E}let s=null;function i(m){const E=t.getGlobalFederationInstance(m.name,m.version),g={...m,id:m.id||""};return E?(E.initOptions(g),s||(s=E),E):(s=o(g),s)}function a(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadRemote.apply(s,m)}function l(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShare.apply(s,m)}function c(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShareSync.apply(s,m)}function u(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.preloadRemote.apply(s,m)}function f(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerRemotes.apply(s,m)}function d(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerPlugins.apply(s,m)}function h(){return s}function _(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerShared.apply(s,m)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=l,e.loadShareSync=c,e.preloadRemote=u,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=d,e.registerRemotes=f,e.registerShared=_})(cr);typeof __VUE_HMR_RUNTIME__>"u"&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});const un="__mf_init____mf__virtual/__mfe_internal__admin_ui_host__mf_v__runtimeInit__mf_v__.js__";let $t=globalThis[un];if(!$t){let e,t;const r=new Promise((n,o)=>{e=n,t=o});$t=globalThis[un]={initPromise:r,initResolve:e,initReject:t},typeof window>"u"&&e({loadRemote:function(){return Promise.resolve(void 0)},loadShare:function(){return Promise.resolve(void 0)}})}const Ta=$t.initResolve,Qe="__mf_module_cache__";globalThis[Qe]||={share:{},remote:{}};globalThis[Qe].share||={};globalThis[Qe].remote||={};const I=globalThis[Qe],ir={},ar="default",lr="__mfe_internal__admin_ui_host";let He,qe,Ce;async function Dt(e){for(let t=0;;t++)try{return await e()}catch(r){throw r}}async function Ia(){return qe||(qe=Dt(()=>G(()=>import("./_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CziSE-Do.js"),[])).catch(e=>{throw qe=void 0,e})),qe}async function Ma(){return Ce||(Ce=Dt(()=>G(()=>import("./virtualExposes-_ivNhQLP.js"),[])).then(e=>e.default??e).catch(e=>{throw Ce=void 0,e})),Ce}async function $a(e={},t=[]){const{usedShared:r,usedRemotes:n}=await Ia();if(I.share.react===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs-Dl4u0xYE.js").then(c=>c.a),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share.react=l}if(I.share["react-dom"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs-CzO_Esxm.js").then(c=>c.a),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["react-dom"]=l}if(I.share["react/jsx-runtime"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-C_6K4VBY.js").then(c=>c.a),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["react/jsx-runtime"]=l}if(I.share["@camstack/sdk"]===void 0){const l={...await G(()=>import("./index-cfq-Npln.js"),__vite__mapDeps([0,1,2]))};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@camstack/sdk"]=l}if(I.share["@camstack/types"]===void 0){const l={...await G(()=>import("./index-C-M4yvxf.js"),__vite__mapDeps([3,2]))};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@camstack/types"]=l}if(I.share["@camstack/ui-library"]===void 0){const l={...await G(()=>import("./index-X-IEwb-L.js"),__vite__mapDeps([4,5,1,2,6]))};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@camstack/ui-library"]=l}if(I.share["@tanstack/react-query"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-CeLhKMin.js").then(c=>c._),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@tanstack/react-query"]=l}if(I.share["@trpc/client"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DIkg6-MH.js").then(c=>c._),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@trpc/client"]=l}if(I.share["@trpc/react-query"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-OcRSBqRe.js").then(c=>c._),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["@trpc/react-query"]=l}if(I.share["react-dom/client"]===void 0){const l={...await G(()=>import("./__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-DNpf5SLz.js").then(c=>c.a),[])};Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),I.share["react-dom/client"]=l}const o={name:lr,remotes:n,shared:r,plugins:[],shareStrategy:"version-first"};He?He.initOptions(o):He=cr.createInstance(o);const s=He;var i=ir[ar];if(i||(i=ir[ar]={from:lr}),!(t.indexOf(i)>=0)){t.push(i),s.initShareScopeMap("default",e),Ta(s);try{await Dt(async()=>{await Promise.all(await s.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))})}catch(a){console.error("[Module Federation]",a)}return s}}async function Pa(e){const t=await Ma();if(!(e in t))throw new Error(`[Module Federation] Module ${e} does not exist in container.`);return t[e]().then(r=>()=>r)}export{cr as d,Pa as g,$a as i};
package/dist/index.html CHANGED
@@ -12,14 +12,13 @@
12
12
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
13
13
  <link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
14
14
  <script type="module" crossorigin src="/mf-entry-bootstrap-0.js"></script>
15
- <link rel="modulepreload" crossorigin href="/assets/index-DRebE_bu.js">
16
- <link rel="modulepreload" crossorigin href="/assets/schemas-BOzikgNT.js">
17
- <link rel="modulepreload" crossorigin href="/assets/index-BP0PcGIN.js">
18
- <link rel="modulepreload" crossorigin href="/assets/devices-CFL4MLSo.js">
19
- <link rel="modulepreload" crossorigin href="/assets/capability-router-map-Bqwnkkax.js">
20
- <link rel="modulepreload" crossorigin href="/assets/index-CKMQgnc3.js">
21
- <link rel="modulepreload" crossorigin href="/assets/index-BZhZ3Jvf.js">
22
- <link rel="stylesheet" crossorigin href="/assets/index-R6tzT59K.css">
15
+ <link rel="modulepreload" crossorigin href="/assets/schemas-XgIEoUz3.js">
16
+ <link rel="modulepreload" crossorigin href="/assets/auth-records-BEfan3dC.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/devices-BfsgGvwu.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/capability-router-map-B3jHfbHt.js">
19
+ <link rel="modulepreload" crossorigin href="/assets/index-Dvmk3HcY.js">
20
+ <link rel="modulepreload" crossorigin href="/assets/index-DfH297U6.js">
21
+ <link rel="stylesheet" crossorigin href="/assets/index-ByDDdVKJ.css">
23
22
  <script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
24
23
  <body>
25
24
  <div id="root"></div>
@@ -10,8 +10,8 @@ const __mfImport = (src) =>
10
10
  ? globalThis.System.import(src)
11
11
  : import(src);
12
12
  (async () => {
13
- const { initHost } = await __mfImport("/assets/hostInit-DpSCsYyA.js");
13
+ const { initHost } = await __mfImport("/assets/hostInit-7yPTCcmg.js");
14
14
  const runtime = await initHost();
15
15
  const __mfRemotePreloads = [];
16
16
  await Promise.all(__mfRemotePreloads);
17
- })().then(() => __mfImport("/assets/index-BfdtdylV.js"));
17
+ })().then(() => __mfImport("/assets/index-DculG9Gi.js"));
@@ -1,39 +1,25 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/server/addon.ts
5
- import path from "path";
6
- import { fileURLToPath } from "url";
1
+ import path from "node:path";
2
+ import { fileURLToPath } from "node:url";
7
3
  import { BaseAddon, adminUiCapability } from "@camstack/types";
8
- var __dirname = path.dirname(fileURLToPath(import.meta.url));
4
+ const __dirname$1 = path.dirname(fileURLToPath(import.meta.url));
9
5
  function resolveAdminUiDistDir() {
10
- return path.resolve(__dirname, "..");
6
+ return path.resolve(__dirname$1, "..");
11
7
  }
12
- __name(resolveAdminUiDistDir, "resolveAdminUiDistDir");
13
- var AdminUIAddon = class extends BaseAddon {
14
- static {
15
- __name(this, "AdminUIAddon");
16
- }
8
+ class AdminUIAddon extends BaseAddon {
17
9
  id = "admin-ui";
18
10
  constructor() {
19
11
  super({});
20
12
  }
21
13
  async onInitialize() {
22
14
  const provider = {
23
- getStaticDir: /* @__PURE__ */ __name(() => resolveAdminUiDistDir(), "getStaticDir"),
24
- getVersion: /* @__PURE__ */ __name(() => "0.1.0", "getVersion")
15
+ getStaticDir: () => resolveAdminUiDistDir(),
16
+ getVersion: () => "0.1.0"
25
17
  };
26
- return [
27
- {
28
- capability: adminUiCapability,
29
- provider
30
- }
31
- ];
18
+ return [{ capability: adminUiCapability, provider }];
32
19
  }
33
- };
34
- var addon_default = AdminUIAddon;
20
+ }
35
21
  export {
36
22
  AdminUIAddon,
37
- addon_default as default
23
+ AdminUIAddon as default
38
24
  };
39
- //# sourceMappingURL=addon.js.map
25
+ //# sourceMappingURL=addon.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/server/addon.ts"],"sourcesContent":["import path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport type { IAdminUI, ProviderRegistration } from '@camstack/types'\nimport { BaseAddon, adminUiCapability } from '@camstack/types'\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url))\n\nfunction resolveAdminUiDistDir(): string {\n return path.resolve(__dirname, '..')\n}\n\n/**\n * AdminUIAddon — serves the Vite-built frontend.\n */\nexport class AdminUIAddon extends BaseAddon {\n readonly id = 'admin-ui'\n\n constructor() { super({}) }\n\n protected async onInitialize(): Promise<ProviderRegistration[]> {\n const provider: IAdminUI = {\n getStaticDir: () => resolveAdminUiDistDir(),\n getVersion: () => '0.1.0',\n }\n return [{ capability: adminUiCapability, provider }]\n }\n}\n\nexport default AdminUIAddon\n"],"mappings":";;;;AAAA,OAAOA,UAAU;AACjB,SAASC,qBAAqB;AAE9B,SAASC,WAAWC,yBAAyB;AAE7C,IAAMC,YAAYC,KAAKC,QAAQC,cAAc,YAAYC,GAAG,CAAA;AAE5D,SAASC,wBAAAA;AACP,SAAOJ,KAAKK,QAAQN,WAAW,IAAA;AACjC;AAFSK;AAOF,IAAME,eAAN,cAA2BC,UAAAA;EAdlC,OAckCA;;;EACvBC,KAAK;EAEd,cAAc;AAAE,UAAM,CAAC,CAAA;EAAG;EAE1B,MAAgBC,eAAgD;AAC9D,UAAMC,WAAqB;MACzBC,cAAc,6BAAMP,sBAAAA,GAAN;MACdQ,YAAY,6BAAM,SAAN;IACd;AACA,WAAO;MAAC;QAAEC,YAAYC;QAAmBJ;MAAS;;EACpD;AACF;AAEA,IAAA,gBAAeJ;","names":["path","fileURLToPath","BaseAddon","adminUiCapability","__dirname","path","dirname","fileURLToPath","url","resolveAdminUiDistDir","resolve","AdminUIAddon","BaseAddon","id","onInitialize","provider","getStaticDir","getVersion","capability","adminUiCapability"]}
1
+ {"version":3,"file":"addon.js","sources":["../../src/server/addon.ts"],"sourcesContent":["import path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport type { IAdminUI, ProviderRegistration } from '@camstack/types'\nimport { BaseAddon, adminUiCapability } from '@camstack/types'\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url))\n\nfunction resolveAdminUiDistDir(): string {\n return path.resolve(__dirname, '..')\n}\n\n/**\n * AdminUIAddon — serves the Vite-built frontend.\n */\nexport class AdminUIAddon extends BaseAddon {\n readonly id = 'admin-ui'\n\n constructor() { super({}) }\n\n protected async onInitialize(): Promise<ProviderRegistration[]> {\n const provider: IAdminUI = {\n getStaticDir: () => resolveAdminUiDistDir(),\n getVersion: () => '0.1.0',\n }\n return [{ capability: adminUiCapability, provider }]\n }\n}\n\nexport default AdminUIAddon\n"],"names":["__dirname"],"mappings":";;;AAKA,MAAMA,cAAY,KAAK,QAAQ,cAAc,YAAY,GAAG,CAAC;AAE7D,SAAS,wBAAgC;AACvC,SAAO,KAAK,QAAQA,aAAW,IAAI;AACrC;AAKO,MAAM,qBAAqB,UAAU;AAAA,EACjC,KAAK;AAAA,EAEd,cAAc;AAAE,UAAM,CAAA,CAAE;AAAA,EAAE;AAAA,EAE1B,MAAgB,eAAgD;AAC9D,UAAM,WAAqB;AAAA,MACzB,cAAc,MAAM,sBAAA;AAAA,MACpB,YAAY,MAAM;AAAA,IAAA;AAEpB,WAAO,CAAC,EAAE,YAAY,mBAAmB,UAAU;AAAA,EACrD;AACF;"}