omniroute 1.4.10 → 1.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +34 -34
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +4 -4
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/status/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/evals/[suiteId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/evals/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/logs/console/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/defaults/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/rate-limit/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/rate-limits/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/resilience/reset/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/resilience/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/combo-defaults/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/route.js +1 -1
- package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/system-prompt/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/thinking-budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/token-health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/detect/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs/page.js +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password/page.js +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login/page.js +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +34 -34
- package/app/.next/server/chunks/1259.js +1 -1
- package/app/.next/server/chunks/1960.js +1 -1
- package/app/.next/server/chunks/1990.js +1 -1
- package/app/.next/server/chunks/3498.js +5 -3
- package/app/.next/server/chunks/9824.js +2 -2
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/{5846-bac355f56b136439.js → 5846-19c878280decbd16.js} +1 -1
- package/app/.next/static/chunks/{993-961f6e199b93539a.js → 993-e3050ebfd4f5032f.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/page-a50474b6ebdf468a.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/page-08f3ed204d01b6a0.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-fbe1442b61df950a.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-b351778975cb8622.js +4 -0
- package/app/.next/static/chunks/app/forgot-password/page-a440e0c1675842bf.js +1 -0
- package/app/.next/static/chunks/app/login/page-164f6b6b41167c5a.js +1 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/page-3fcbbdb2221f0b0c.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/page-f256689b8410bd74.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-a5a48afa8c125ada.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-75c8b38a55e13042.js +0 -4
- package/app/.next/static/chunks/app/forgot-password/page-057ea91c6f140e0b.js +0 -1
- package/app/.next/static/chunks/app/login/page-c1d7bfab91a7877c.js +0 -1
- /package/app/.next/static/{8UAle4UTGR7gIVofXmh_1 → g7Mie-iq39oZ7ts610YtL}/_buildManifest.js +0 -0
- /package/app/.next/static/{8UAle4UTGR7gIVofXmh_1 → g7Mie-iq39oZ7ts610YtL}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
exports.id=3498,exports.ids=[3498],exports.modules={300:(a,b,c)=>{"use strict";c.d(b,{Zr:()=>e});let d=a=>b=>{try{let c=a(b);if(c instanceof Promise)return c;return{then:a=>d(a)(c),catch(a){return this}}}catch(a){return{then(a){return this},catch:b=>d(b)(a)}}},e=(a,b)=>(c,e,f)=>{let g,h={storage:function(a,b){let c;try{c=a()}catch(a){return}return{getItem:a=>{var b;let d=a=>null===a?null:JSON.parse(a,void 0),e=null!=(b=c.getItem(a))?b:null;return e instanceof Promise?e.then(d):d(e)},setItem:(a,b)=>c.setItem(a,JSON.stringify(b,void 0)),removeItem:a=>c.removeItem(a)}}(()=>window.localStorage),partialize:a=>a,version:0,merge:(a,b)=>({...b,...a}),...b},i=!1,j=0,k=new Set,l=new Set,m=h.storage;if(!m)return a((...a)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),c(...a)},e,f);let n=()=>{let a=h.partialize({...e()});return m.setItem(h.name,{state:a,version:h.version})},o=f.setState;f.setState=(a,b)=>(o(a,b),n());let p=a((...a)=>(c(...a),n()),e,f);f.getInitialState=()=>p;let q=()=>{var a,b;if(!m)return;let f=++j;i=!1,k.forEach(a=>{var b;return a(null!=(b=e())?b:p)});let o=(null==(b=h.onRehydrateStorage)?void 0:b.call(h,null!=(a=e())?a:p))||void 0;return d(m.getItem.bind(m))(h.name).then(a=>{if(a)if("number"!=typeof a.version||a.version===h.version)return[!1,a.state];else{if(h.migrate){let b=h.migrate(a.state,a.version);return b instanceof Promise?b.then(a=>[!0,a]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(a=>{var b;if(f!==j)return;let[d,i]=a;if(c(g=h.merge(i,null!=(b=e())?b:p),!0),d)return n()}).then(()=>{f===j&&(null==o||o(g,void 0),g=e(),i=!0,l.forEach(a=>a(g)))}).catch(a=>{f===j&&(null==o||o(void 0,a))})};return f.persist={setOptions:a=>{h={...h,...a},a.storage&&(m=a.storage)},clearStorage:()=>{null==m||m.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>q(),hasHydrated:()=>i,onHydrate:a=>(k.add(a),()=>{k.delete(a)}),onFinishHydration:a=>(l.add(a),()=>{l.delete(a)})},h.skipHydration||q(),g||p}},9157:(a,b,c)=>{"use strict";c.d(b,{A:()=>A});var d,e=c(91986);function f(a,b,c,d){let e=null==d||"number"==typeof d||"boolean"==typeof d?d:c(d),f=b.get(e);return void 0===f&&(f=a.call(this,d),b.set(e,f)),f}function g(a,b,c){let d=Array.prototype.slice.call(arguments,3),e=c(d),f=b.get(e);return void 0===f&&(f=a.apply(this,d),b.set(e,f)),f}let h=function(){return JSON.stringify(arguments)};class i{cache;constructor(){this.cache=Object.create(null)}get(a){return this.cache[a]}set(a,b){this.cache[a]=b}}let j={create:function(){return new i}},k={variadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,g.bind(this,a,c,d)},monadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,f.bind(this,a,c,d)}};var l=((d=l||{}).MISSING_MESSAGE="MISSING_MESSAGE",d.MISSING_FORMAT="MISSING_FORMAT",d.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",d.INSUFFICIENT_PATH="INSUFFICIENT_PATH",d.INVALID_MESSAGE="INVALID_MESSAGE",d.INVALID_KEY="INVALID_KEY",d.FORMATTING_ERROR="FORMATTING_ERROR",d);function m(a,b){return function(a,b){var c;let d,e;return d=(c={cache:{create:()=>({get:a=>b[a],set(a,c){b[a]=c}})},strategy:k.variadic}).cache?c.cache:j,e=c&&c.serializer?c.serializer:h,(c&&c.strategy?c.strategy:function(a,b){var c,d;let e=1===a.length?f:g;return c=b.cache.create(),d=b.serializer,e.bind(this,a,c,d)})(a,{cache:d,serializer:e})}((...b)=>new a(...b),b)}function n(a){return function(...a){return a.filter(Boolean).join(".")}(a.namespace,a.key)}function o(a){console.error(a)}function p(a){return"function"==typeof a.then}var q=c(65573);let r=(0,e.cache)(function(){return{locale:void 0}}),s=(0,e.cache)(async function(){let a=(0,q.b3)();return p(a)?await a:a}),t=(0,e.cache)(async function(){let a;try{a=(await s()).get("X-NEXT-INTL-LOCALE")||void 0}catch(a){if(a instanceof Error&&"DYNAMIC_SERVER_USAGE"===a.digest){let b=Error("Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl.dev/docs/routing/setup#static-rendering",{cause:a});throw b.digest=a.digest,b}throw a}return a});async function u(){return r().locale||await t()}var v=c(34017);let w=(0,e.cache)(function(){return Intl.DateTimeFormat().resolvedOptions().timeZone}),x=(0,e.cache)(async function(a,b){let c=a({locale:b,get requestLocale(){return b?Promise.resolve(b):u()}});if(p(c)&&(c=await c),!c.locale)throw Error("No locale was returned from `getRequestConfig`.\n\nSee https://next-intl.dev/docs/usage/configuration#i18n-request");return c}),y=(0,e.cache)(function(a){return{getDateTimeFormat:m(Intl.DateTimeFormat,a.dateTime),getNumberFormat:m(Intl.NumberFormat,a.number),getPluralRules:m(Intl.PluralRules,a.pluralRules),getRelativeTimeFormat:m(Intl.RelativeTimeFormat,a.relativeTime),getListFormat:m(Intl.ListFormat,a.list),getDisplayNames:m(Intl.DisplayNames,a.displayNames)}}),z=(0,e.cache)(function(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}),A=(0,e.cache)(async function(a){let b=await x(v.A,a);return{...function({formats:a,getMessageFallback:b,messages:c,onError:d,...e}){return{...e,formats:a||void 0,messages:c||void 0,onError:d||o,getMessageFallback:b||n}}(b),_formatters:y(z()),timeZone:b.timeZone||w()}})},28440:(a,b,c)=>{"use strict";c.d(b,{A:()=>g});var d=c(91986),e=c(9157);let f=(0,d.cache)(async function(a){var b=await (0,e.A)(a);if(!b.messages)throw Error("No messages found. Have you configured them correctly? See https://next-intl.dev/docs/configuration#messages");return b.messages});async function g(a){return f(a?.locale)}},29389:(a,b,c)=>{"use strict";function d(a){return a}c.d(b,{A:()=>d})},31417:(a,b,c)=>{"use strict";c.d(b,{v:()=>g});var d=c(67484);let e=a=>{let b,c=new Set,d=(a,d)=>{let e="function"==typeof a?a(b):a;if(!Object.is(e,b)){let a=b;b=(null!=d?d:"object"!=typeof e||null===e)?e:Object.assign({},b,e),c.forEach(c=>c(b,a))}},e=()=>b,f={setState:d,getState:e,getInitialState:()=>g,subscribe:a=>(c.add(a),()=>c.delete(a))},g=b=a(d,e,f);return f},f=a=>{let b=a?e(a):e,c=a=>(function(a,b=a=>a){let c=d.useSyncExternalStore(a.subscribe,d.useCallback(()=>b(a.getState()),[a,b]),d.useCallback(()=>b(a.getInitialState()),[a,b]));return d.useDebugValue(c),c})(b,a);return Object.assign(c,b),c},g=a=>a?f(a):f},50609:a=>{a.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},60258:(a,b,c)=>{"use strict";let d,e,f;c.d(b,{zMY:()=>fn,Ikc:()=>fN,g1P:()=>f_,YjP:()=>er});var g,h,i={};c.r(i),c.d(i,{base64:()=>aE,base64url:()=>aF,bigint:()=>aP,boolean:()=>aS,browserEmail:()=>ax,cidrv4:()=>aC,cidrv6:()=>aD,cuid:()=>af,cuid2:()=>ag,date:()=>aK,datetime:()=>aN,domain:()=>aH,duration:()=>al,e164:()=>aI,email:()=>as,emoji:()=>ay,extendedDuration:()=>am,guid:()=>an,hex:()=>aX,hostname:()=>aG,html5Email:()=>at,idnEmail:()=>aw,integer:()=>aQ,ipv4:()=>az,ipv6:()=>aA,ksuid:()=>aj,lowercase:()=>aV,mac:()=>aB,md5_base64:()=>a_,md5_base64url:()=>a0,md5_hex:()=>a$,nanoid:()=>ak,null:()=>aT,number:()=>aR,rfc5322Email:()=>au,sha1_base64:()=>a2,sha1_base64url:()=>a3,sha1_hex:()=>a1,sha256_base64:()=>a5,sha256_base64url:()=>a6,sha256_hex:()=>a4,sha384_base64:()=>a8,sha384_base64url:()=>a9,sha384_hex:()=>a7,sha512_base64:()=>bb,sha512_base64url:()=>bc,sha512_hex:()=>ba,string:()=>aO,time:()=>aM,ulid:()=>ah,undefined:()=>aU,unicodeEmail:()=>av,uppercase:()=>aW,uuid:()=>ao,uuid4:()=>ap,uuid6:()=>aq,uuid7:()=>ar,xid:()=>ai});var j={};c.r(j),c.d(j,{endsWith:()=>dM,gt:()=>du,gte:()=>dv,includes:()=>dK,length:()=>dG,lowercase:()=>dI,lt:()=>ds,lte:()=>dt,maxLength:()=>dE,maxSize:()=>dB,mime:()=>dO,minLength:()=>dF,minSize:()=>dC,multipleOf:()=>dA,negative:()=>dx,nonnegative:()=>dz,nonpositive:()=>dy,normalize:()=>dQ,overwrite:()=>dP,positive:()=>dw,property:()=>dN,regex:()=>dH,size:()=>dD,slugify:()=>dU,startsWith:()=>dL,toLowerCase:()=>dS,toUpperCase:()=>dT,trim:()=>dR,uppercase:()=>dJ});var k={};c.r(k),c.d(k,{ZodISODate:()=>d4,ZodISODateTime:()=>d2,ZodISODuration:()=>d8,ZodISOTime:()=>d6,date:()=>d5,datetime:()=>d3,duration:()=>d9,time:()=>d7});var l={};function m(a,b,c){function d(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:g,traits:new Set},enumerable:!1}),c._zod.traits.has(a))return;c._zod.traits.add(a),b(c,d);let e=g.prototype,f=Object.keys(e);for(let a=0;a<f.length;a++){let b=f[a];b in c||(c[b]=e[b].bind(c))}}let e=c?.Parent??Object;class f extends e{}function g(a){var b;let e=c?.Parent?new f:this;for(let c of(d(e,a),(b=e._zod).deferred??(b.deferred=[]),e._zod.deferred))c();return e}return Object.defineProperty(f,"name",{value:a}),Object.defineProperty(g,"init",{value:d}),Object.defineProperty(g,Symbol.hasInstance,{value:b=>!!c?.Parent&&b instanceof c.Parent||b?._zod?.traits?.has(a)}),Object.defineProperty(g,"name",{value:a}),g}c.r(l),c.d(l,{ZodAny:()=>fz,ZodArray:()=>fJ,ZodBase64:()=>e1,ZodBase64URL:()=>e3,ZodBigInt:()=>fo,ZodBigIntFormat:()=>fq,ZodBoolean:()=>fm,ZodCIDRv4:()=>eZ,ZodCIDRv6:()=>e_,ZodCUID:()=>eJ,ZodCUID2:()=>eL,ZodCatch:()=>gu,ZodCodec:()=>gA,ZodCustom:()=>gM,ZodCustomStringFormat:()=>e9,ZodDate:()=>fH,ZodDefault:()=>gm,ZodDiscriminatedUnion:()=>fU,ZodE164:()=>e5,ZodEmail:()=>et,ZodEmoji:()=>eF,ZodEnum:()=>f6,ZodExactOptional:()=>gh,ZodFile:()=>gb,ZodFunction:()=>gK,ZodGUID:()=>ev,ZodIPv4:()=>eT,ZodIPv6:()=>eX,ZodIntersection:()=>fW,ZodJWT:()=>e7,ZodKSUID:()=>eR,ZodLazy:()=>gG,ZodLiteral:()=>f9,ZodMAC:()=>eV,ZodMap:()=>f2,ZodNaN:()=>gw,ZodNanoID:()=>eH,ZodNever:()=>fD,ZodNonOptional:()=>gq,ZodNull:()=>fx,ZodNullable:()=>gj,ZodNumber:()=>fe,ZodNumberFormat:()=>fg,ZodObject:()=>fM,ZodOptional:()=>gf,ZodPipe:()=>gy,ZodPrefault:()=>go,ZodPromise:()=>gI,ZodReadonly:()=>gC,ZodRecord:()=>f$,ZodSet:()=>f4,ZodString:()=>eq,ZodStringFormat:()=>es,ZodSuccess:()=>gs,ZodSymbol:()=>ft,ZodTemplateLiteral:()=>gE,ZodTransform:()=>gd,ZodTuple:()=>fY,ZodType:()=>eo,ZodULID:()=>eN,ZodURL:()=>eC,ZodUUID:()=>ex,ZodUndefined:()=>fv,ZodUnion:()=>fQ,ZodUnknown:()=>fB,ZodVoid:()=>fF,ZodXID:()=>eP,ZodXor:()=>fS,_ZodString:()=>ep,_default:()=>gn,_function:()=>gL,any:()=>fA,array:()=>fK,base64:()=>e2,base64url:()=>e4,bigint:()=>fp,boolean:()=>fn,catch:()=>gv,check:()=>gN,cidrv4:()=>e$,cidrv6:()=>e0,codec:()=>gB,cuid:()=>eK,cuid2:()=>eM,custom:()=>gO,date:()=>fI,describe:()=>gR,discriminatedUnion:()=>fV,e164:()=>e6,email:()=>eu,emoji:()=>eG,enum:()=>f7,exactOptional:()=>gi,file:()=>gc,float32:()=>fi,float64:()=>fj,function:()=>gL,guid:()=>ew,hash:()=>fd,hex:()=>fc,hostname:()=>fb,httpUrl:()=>eE,instanceof:()=>gT,int:()=>fh,int32:()=>fk,int64:()=>fr,intersection:()=>fX,ipv4:()=>eU,ipv6:()=>eY,json:()=>gV,jwt:()=>e8,keyof:()=>fL,ksuid:()=>eS,lazy:()=>gH,literal:()=>ga,looseObject:()=>fP,looseRecord:()=>f1,mac:()=>eW,map:()=>f3,meta:()=>gS,nan:()=>gx,nanoid:()=>eI,nativeEnum:()=>f8,never:()=>fE,nonoptional:()=>gr,null:()=>fy,nullable:()=>gk,nullish:()=>gl,number:()=>ff,object:()=>fN,optional:()=>gg,partialRecord:()=>f0,pipe:()=>gz,prefault:()=>gp,preprocess:()=>gW,promise:()=>gJ,readonly:()=>gD,record:()=>f_,refine:()=>gP,set:()=>f5,strictObject:()=>fO,string:()=>er,stringFormat:()=>fa,stringbool:()=>gU,success:()=>gt,superRefine:()=>gQ,symbol:()=>fu,templateLiteral:()=>gF,transform:()=>ge,tuple:()=>fZ,uint32:()=>fl,uint64:()=>fs,ulid:()=>eO,undefined:()=>fw,union:()=>fR,unknown:()=>fC,url:()=>eD,uuid:()=>ey,uuidv4:()=>ez,uuidv6:()=>eA,uuidv7:()=>eB,void:()=>fG,xid:()=>eQ,xor:()=>fT}),Object.freeze({status:"aborted"}),Symbol("zod_brand");class n extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class o extends Error{constructor(a){super(`Encountered unidirectional transform during encode: ${a}`),this.name="ZodEncodeError"}}let p={};function q(a){return a&&Object.assign(p,a),p}function r(a){let b=Object.values(a).filter(a=>"number"==typeof a);return Object.entries(a).filter(([a,c])=>-1===b.indexOf(+a)).map(([a,b])=>b)}function s(a,b="|"){return a.map(a=>M(a)).join(b)}function t(a,b){return"bigint"==typeof b?b.toString():b}function u(a){return{get value(){{let b=a();return Object.defineProperty(this,"value",{value:b}),b}}}}function v(a){return null==a}function w(a){let b=+!!a.startsWith("^"),c=a.endsWith("$")?a.length-1:a.length;return a.slice(b,c)}let x=Symbol("evaluating");function y(a,b,c){let d;Object.defineProperty(a,b,{get(){if(d!==x)return void 0===d&&(d=x,d=c()),d},set(c){Object.defineProperty(a,b,{value:c})},configurable:!0})}function z(a,b,c){Object.defineProperty(a,b,{value:c,writable:!0,enumerable:!0,configurable:!0})}function A(...a){let b={};for(let c of a)Object.assign(b,Object.getOwnPropertyDescriptors(c));return Object.defineProperties({},b)}function B(a){return JSON.stringify(a)}let C="captureStackTrace"in Error?Error.captureStackTrace:(...a)=>{};function D(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}let E=u(()=>{if("u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(a){return!1}});function F(a){if(!1===D(a))return!1;let b=a.constructor;if(void 0===b||"function"!=typeof b)return!0;let c=b.prototype;return!1!==D(c)&&!1!==Object.prototype.hasOwnProperty.call(c,"isPrototypeOf")}function G(a){return F(a)?{...a}:Array.isArray(a)?[...a]:a}let H=new Set(["string","number","symbol"]),I=new Set(["string","number","bigint","boolean","symbol","undefined"]);function J(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K(a,b,c){let d=new a._zod.constr(b??a._zod.def);return(!b||c?.parent)&&(d._zod.parent=a),d}function L(a){if(!a)return{};if("string"==typeof a)return{error:()=>a};if(a?.message!==void 0){if(a?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");a.error=a.message}return(delete a.message,"string"==typeof a.error)?{...a,error:()=>a.error}:a}function M(a){return"bigint"==typeof a?a.toString()+"n":"string"==typeof a?`"${a}"`:`${a}`}let N={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},O={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function P(a,b=0){if(!0===a.aborted)return!0;for(let c=b;c<a.issues.length;c++)if(a.issues[c]?.continue!==!0)return!0;return!1}function Q(a,b){return b.map(b=>(b.path??(b.path=[]),b.path.unshift(a),b))}function R(a){return"string"==typeof a?a:a?.message}function S(a,b,c){let d={...a,path:a.path??[]};return a.message||(d.message=R(a.inst?._zod.def?.error?.(a))??R(b?.error?.(a))??R(c.customError?.(a))??R(c.localeError?.(a))??"Invalid input"),delete d.inst,delete d.continue,b?.reportInput||delete d.input,d}function T(a){return a instanceof Set?"set":a instanceof Map?"map":a instanceof File?"file":"unknown"}function U(a){return Array.isArray(a)?"array":"string"==typeof a?"string":"unknown"}function V(...a){let[b,c,d]=a;return"string"==typeof b?{message:b,code:"custom",input:c,inst:d}:{...b}}let W=(a,b)=>{a.name="$ZodError",Object.defineProperty(a,"_zod",{value:a._zod,enumerable:!1}),Object.defineProperty(a,"issues",{value:b,enumerable:!1}),a.message=JSON.stringify(b,t,2),Object.defineProperty(a,"toString",{value:()=>a.message,enumerable:!1})},X=m("$ZodError",W),Y=m("$ZodError",W,{Parent:Error}),Z=a=>(b,c,d,e)=>{let f=d?Object.assign(d,{async:!1}):{async:!1},g=b._zod.run({value:c,issues:[]},f);if(g instanceof Promise)throw new n;if(g.issues.length){let b=new(e?.Err??a)(g.issues.map(a=>S(a,f,q())));throw C(b,e?.callee),b}return g.value},$=Z(Y),_=a=>async(b,c,d,e)=>{let f=d?Object.assign(d,{async:!0}):{async:!0},g=b._zod.run({value:c,issues:[]},f);if(g instanceof Promise&&(g=await g),g.issues.length){let b=new(e?.Err??a)(g.issues.map(a=>S(a,f,q())));throw C(b,e?.callee),b}return g.value},aa=_(Y),ab=a=>(b,c,d)=>{let e=d?{...d,async:!1}:{async:!1},f=b._zod.run({value:c,issues:[]},e);if(f instanceof Promise)throw new n;return f.issues.length?{success:!1,error:new(a??X)(f.issues.map(a=>S(a,e,q())))}:{success:!0,data:f.value}},ac=ab(Y),ad=a=>async(b,c,d)=>{let e=d?Object.assign(d,{async:!0}):{async:!0},f=b._zod.run({value:c,issues:[]},e);return f instanceof Promise&&(f=await f),f.issues.length?{success:!1,error:new a(f.issues.map(a=>S(a,e,q())))}:{success:!0,data:f.value}},ae=ad(Y),af=/^[cC][^\s-]{8,}$/,ag=/^[0-9a-z]+$/,ah=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ai=/^[0-9a-vA-V]{20}$/,aj=/^[A-Za-z0-9]{27}$/,ak=/^[a-zA-Z0-9_-]{21}$/,al=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,am=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,an=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ao=a=>a?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${a}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ap=ao(4),aq=ao(6),ar=ao(7),as=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,at=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,au=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,av=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,aw=av,ax=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function ay(){return RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}let az=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,aA=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,aB=a=>{let b=J(a??":");return RegExp(`^(?:[0-9A-F]{2}${b}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${b}){5}[0-9a-f]{2}$`)},aC=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,aD=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,aE=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,aF=/^[A-Za-z0-9_-]*$/,aG=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,aH=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,aI=/^\+[1-9]\d{6,14}$/,aJ="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",aK=RegExp(`^${aJ}$`);function aL(a){let b="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof a.precision?-1===a.precision?`${b}`:0===a.precision?`${b}:[0-5]\\d`:`${b}:[0-5]\\d\\.\\d{${a.precision}}`:`${b}(?::[0-5]\\d(?:\\.\\d+)?)?`}function aM(a){return RegExp(`^${aL(a)}$`)}function aN(a){let b=aL({precision:a.precision}),c=["Z"];a.local&&c.push(""),a.offset&&c.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let d=`${b}(?:${c.join("|")})`;return RegExp(`^${aJ}T(?:${d})$`)}let aO=a=>{let b=a?`[\\s\\S]{${a?.minimum??0},${a?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${b}$`)},aP=/^-?\d+n?$/,aQ=/^-?\d+$/,aR=/^-?\d+(?:\.\d+)?$/,aS=/^(?:true|false)$/i,aT=/^null$/i,aU=/^undefined$/i,aV=/^[^A-Z]*$/,aW=/^[^a-z]*$/,aX=/^[0-9a-fA-F]*$/;function aY(a,b){return RegExp(`^[A-Za-z0-9+/]{${a}}${b}$`)}function aZ(a){return RegExp(`^[A-Za-z0-9_-]{${a}}$`)}let a$=/^[0-9a-fA-F]{32}$/,a_=aY(22,"=="),a0=aZ(22),a1=/^[0-9a-fA-F]{40}$/,a2=aY(27,"="),a3=aZ(27),a4=/^[0-9a-fA-F]{64}$/,a5=aY(43,"="),a6=aZ(43),a7=/^[0-9a-fA-F]{96}$/,a8=aY(64,""),a9=aZ(64),ba=/^[0-9a-fA-F]{128}$/,bb=aY(86,"=="),bc=aZ(86),bd=m("$ZodCheck",(a,b)=>{var c;a._zod??(a._zod={}),a._zod.def=b,(c=a._zod).onattach??(c.onattach=[])}),be={number:"number",bigint:"bigint",object:"date"},bf=m("$ZodCheckLessThan",(a,b)=>{bd.init(a,b);let c=be[typeof b.value];a._zod.onattach.push(a=>{let c=a._zod.bag,d=(b.inclusive?c.maximum:c.exclusiveMaximum)??1/0;b.value<d&&(b.inclusive?c.maximum=b.value:c.exclusiveMaximum=b.value)}),a._zod.check=d=>{(b.inclusive?d.value<=b.value:d.value<b.value)||d.issues.push({origin:c,code:"too_big",maximum:"object"==typeof b.value?b.value.getTime():b.value,input:d.value,inclusive:b.inclusive,inst:a,continue:!b.abort})}}),bg=m("$ZodCheckGreaterThan",(a,b)=>{bd.init(a,b);let c=be[typeof b.value];a._zod.onattach.push(a=>{let c=a._zod.bag,d=(b.inclusive?c.minimum:c.exclusiveMinimum)??-1/0;b.value>d&&(b.inclusive?c.minimum=b.value:c.exclusiveMinimum=b.value)}),a._zod.check=d=>{(b.inclusive?d.value>=b.value:d.value>b.value)||d.issues.push({origin:c,code:"too_small",minimum:"object"==typeof b.value?b.value.getTime():b.value,input:d.value,inclusive:b.inclusive,inst:a,continue:!b.abort})}}),bh=m("$ZodCheckMultipleOf",(a,b)=>{bd.init(a,b),a._zod.onattach.push(a=>{var c;(c=a._zod.bag).multipleOf??(c.multipleOf=b.value)}),a._zod.check=c=>{if(typeof c.value!=typeof b.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof c.value?c.value%b.value===BigInt(0):0===function(a,b){let c=(a.toString().split(".")[1]||"").length,d=b.toString(),e=(d.split(".")[1]||"").length;if(0===e&&/\d?e-\d?/.test(d)){let a=d.match(/\d?e-(\d?)/);a?.[1]&&(e=Number.parseInt(a[1]))}let f=c>e?c:e;return Number.parseInt(a.toFixed(f).replace(".",""))%Number.parseInt(b.toFixed(f).replace(".",""))/10**f}(c.value,b.value))||c.issues.push({origin:typeof c.value,code:"not_multiple_of",divisor:b.value,input:c.value,inst:a,continue:!b.abort})}}),bi=m("$ZodCheckNumberFormat",(a,b)=>{bd.init(a,b),b.format=b.format||"float64";let c=b.format?.includes("int"),d=c?"int":"number",[e,f]=N[b.format];a._zod.onattach.push(a=>{let d=a._zod.bag;d.format=b.format,d.minimum=e,d.maximum=f,c&&(d.pattern=aQ)}),a._zod.check=g=>{let h=g.value;if(c){if(!Number.isInteger(h))return void g.issues.push({expected:d,format:b.format,code:"invalid_type",continue:!1,input:h,inst:a});if(!Number.isSafeInteger(h))return void(h>0?g.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:a,origin:d,inclusive:!0,continue:!b.abort}):g.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:a,origin:d,inclusive:!0,continue:!b.abort}))}h<e&&g.issues.push({origin:"number",input:h,code:"too_small",minimum:e,inclusive:!0,inst:a,continue:!b.abort}),h>f&&g.issues.push({origin:"number",input:h,code:"too_big",maximum:f,inclusive:!0,inst:a,continue:!b.abort})}}),bj=m("$ZodCheckBigIntFormat",(a,b)=>{bd.init(a,b);let[c,d]=O[b.format];a._zod.onattach.push(a=>{let e=a._zod.bag;e.format=b.format,e.minimum=c,e.maximum=d}),a._zod.check=e=>{let f=e.value;f<c&&e.issues.push({origin:"bigint",input:f,code:"too_small",minimum:c,inclusive:!0,inst:a,continue:!b.abort}),f>d&&e.issues.push({origin:"bigint",input:f,code:"too_big",maximum:d,inclusive:!0,inst:a,continue:!b.abort})}}),bk=m("$ZodCheckMaxSize",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.size}),a._zod.onattach.push(a=>{let c=a._zod.bag.maximum??1/0;b.maximum<c&&(a._zod.bag.maximum=b.maximum)}),a._zod.check=c=>{let d=c.value;d.size<=b.maximum||c.issues.push({origin:T(d),code:"too_big",maximum:b.maximum,inclusive:!0,input:d,inst:a,continue:!b.abort})}}),bl=m("$ZodCheckMinSize",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.size}),a._zod.onattach.push(a=>{let c=a._zod.bag.minimum??-1/0;b.minimum>c&&(a._zod.bag.minimum=b.minimum)}),a._zod.check=c=>{let d=c.value;d.size>=b.minimum||c.issues.push({origin:T(d),code:"too_small",minimum:b.minimum,inclusive:!0,input:d,inst:a,continue:!b.abort})}}),bm=m("$ZodCheckSizeEquals",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.size}),a._zod.onattach.push(a=>{let c=a._zod.bag;c.minimum=b.size,c.maximum=b.size,c.size=b.size}),a._zod.check=c=>{let d=c.value,e=d.size;if(e===b.size)return;let f=e>b.size;c.issues.push({origin:T(d),...f?{code:"too_big",maximum:b.size}:{code:"too_small",minimum:b.size},inclusive:!0,exact:!0,input:c.value,inst:a,continue:!b.abort})}}),bn=m("$ZodCheckMaxLength",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.length}),a._zod.onattach.push(a=>{let c=a._zod.bag.maximum??1/0;b.maximum<c&&(a._zod.bag.maximum=b.maximum)}),a._zod.check=c=>{let d=c.value;if(d.length<=b.maximum)return;let e=U(d);c.issues.push({origin:e,code:"too_big",maximum:b.maximum,inclusive:!0,input:d,inst:a,continue:!b.abort})}}),bo=m("$ZodCheckMinLength",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.length}),a._zod.onattach.push(a=>{let c=a._zod.bag.minimum??-1/0;b.minimum>c&&(a._zod.bag.minimum=b.minimum)}),a._zod.check=c=>{let d=c.value;if(d.length>=b.minimum)return;let e=U(d);c.issues.push({origin:e,code:"too_small",minimum:b.minimum,inclusive:!0,input:d,inst:a,continue:!b.abort})}}),bp=m("$ZodCheckLengthEquals",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.length}),a._zod.onattach.push(a=>{let c=a._zod.bag;c.minimum=b.length,c.maximum=b.length,c.length=b.length}),a._zod.check=c=>{let d=c.value,e=d.length;if(e===b.length)return;let f=U(d),g=e>b.length;c.issues.push({origin:f,...g?{code:"too_big",maximum:b.length}:{code:"too_small",minimum:b.length},inclusive:!0,exact:!0,input:c.value,inst:a,continue:!b.abort})}}),bq=m("$ZodCheckStringFormat",(a,b)=>{var c,d;bd.init(a,b),a._zod.onattach.push(a=>{let c=a._zod.bag;c.format=b.format,b.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(b.pattern))}),b.pattern?(c=a._zod).check??(c.check=c=>{b.pattern.lastIndex=0,b.pattern.test(c.value)||c.issues.push({origin:"string",code:"invalid_format",format:b.format,input:c.value,...b.pattern?{pattern:b.pattern.toString()}:{},inst:a,continue:!b.abort})}):(d=a._zod).check??(d.check=()=>{})}),br=m("$ZodCheckRegex",(a,b)=>{bq.init(a,b),a._zod.check=c=>{b.pattern.lastIndex=0,b.pattern.test(c.value)||c.issues.push({origin:"string",code:"invalid_format",format:"regex",input:c.value,pattern:b.pattern.toString(),inst:a,continue:!b.abort})}}),bs=m("$ZodCheckLowerCase",(a,b)=>{b.pattern??(b.pattern=aV),bq.init(a,b)}),bt=m("$ZodCheckUpperCase",(a,b)=>{b.pattern??(b.pattern=aW),bq.init(a,b)}),bu=m("$ZodCheckIncludes",(a,b)=>{bd.init(a,b);let c=J(b.includes),d=new RegExp("number"==typeof b.position?`^.{${b.position}}${c}`:c);b.pattern=d,a._zod.onattach.push(a=>{let b=a._zod.bag;b.patterns??(b.patterns=new Set),b.patterns.add(d)}),a._zod.check=c=>{c.value.includes(b.includes,b.position)||c.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:b.includes,input:c.value,inst:a,continue:!b.abort})}}),bv=m("$ZodCheckStartsWith",(a,b)=>{bd.init(a,b);let c=RegExp(`^${J(b.prefix)}.*`);b.pattern??(b.pattern=c),a._zod.onattach.push(a=>{let b=a._zod.bag;b.patterns??(b.patterns=new Set),b.patterns.add(c)}),a._zod.check=c=>{c.value.startsWith(b.prefix)||c.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:b.prefix,input:c.value,inst:a,continue:!b.abort})}}),bw=m("$ZodCheckEndsWith",(a,b)=>{bd.init(a,b);let c=RegExp(`.*${J(b.suffix)}$`);b.pattern??(b.pattern=c),a._zod.onattach.push(a=>{let b=a._zod.bag;b.patterns??(b.patterns=new Set),b.patterns.add(c)}),a._zod.check=c=>{c.value.endsWith(b.suffix)||c.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:b.suffix,input:c.value,inst:a,continue:!b.abort})}});function bx(a,b,c){a.issues.length&&b.issues.push(...Q(c,a.issues))}let by=m("$ZodCheckProperty",(a,b)=>{bd.init(a,b),a._zod.check=a=>{let c=b.schema._zod.run({value:a.value[b.property],issues:[]},{});if(c instanceof Promise)return c.then(c=>bx(c,a,b.property));bx(c,a,b.property)}}),bz=m("$ZodCheckMimeType",(a,b)=>{bd.init(a,b);let c=new Set(b.mime);a._zod.onattach.push(a=>{a._zod.bag.mime=b.mime}),a._zod.check=d=>{c.has(d.value.type)||d.issues.push({code:"invalid_value",values:b.mime,input:d.value.type,inst:a,continue:!b.abort})}}),bA=m("$ZodCheckOverwrite",(a,b)=>{bd.init(a,b),a._zod.check=a=>{a.value=b.tx(a.value)}});class bB{constructor(a=[]){this.content=[],this.indent=0,this&&(this.args=a)}indented(a){this.indent+=1,a(this),this.indent-=1}write(a){if("function"==typeof a){a(this,{execution:"sync"}),a(this,{execution:"async"});return}let b=a.split("\n").filter(a=>a),c=Math.min(...b.map(a=>a.length-a.trimStart().length));for(let a of b.map(a=>a.slice(c)).map(a=>" ".repeat(2*this.indent)+a))this.content.push(a)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(a=>` ${a}`)].join("\n"))}}let bC={major:4,minor:3,patch:6},bD=m("$ZodType",(a,b)=>{var c;a??(a={}),a._zod.def=b,a._zod.bag=a._zod.bag||{},a._zod.version=bC;let d=[...a._zod.def.checks??[]];for(let b of(a._zod.traits.has("$ZodCheck")&&d.unshift(a),d))for(let c of b._zod.onattach)c(a);if(0===d.length)(c=a._zod).deferred??(c.deferred=[]),a._zod.deferred?.push(()=>{a._zod.run=a._zod.parse});else{let b=(a,b,c)=>{let d,e=P(a);for(let f of b){if(f._zod.def.when){if(!f._zod.def.when(a))continue}else if(e)continue;let b=a.issues.length,g=f._zod.check(a);if(g instanceof Promise&&c?.async===!1)throw new n;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await g,a.issues.length!==b&&(e||(e=P(a,b)))});else{if(a.issues.length===b)continue;e||(e=P(a,b))}}return d?d.then(()=>a):a},c=(c,e,f)=>{if(P(c))return c.aborted=!0,c;let g=b(e,d,f);if(g instanceof Promise){if(!1===f.async)throw new n;return g.then(b=>a._zod.parse(b,f))}return a._zod.parse(g,f)};a._zod.run=(e,f)=>{if(f.skipChecks)return a._zod.parse(e,f);if("backward"===f.direction){let b=a._zod.parse({value:e.value,issues:[]},{...f,skipChecks:!0});return b instanceof Promise?b.then(a=>c(a,e,f)):c(b,e,f)}let g=a._zod.parse(e,f);if(g instanceof Promise){if(!1===f.async)throw new n;return g.then(a=>b(a,d,f))}return b(g,d,f)}}y(a,"~standard",()=>({validate:b=>{try{let c=ac(a,b);return c.success?{value:c.data}:{issues:c.error?.issues}}catch(c){return ae(a,b).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),bE=m("$ZodString",(a,b)=>{bD.init(a,b),a._zod.pattern=[...a?._zod.bag?.patterns??[]].pop()??aO(a._zod.bag),a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=String(c.value)}catch(a){}return"string"==typeof c.value||c.issues.push({expected:"string",code:"invalid_type",input:c.value,inst:a}),c}}),bF=m("$ZodStringFormat",(a,b)=>{bq.init(a,b),bE.init(a,b)}),bG=m("$ZodGUID",(a,b)=>{b.pattern??(b.pattern=an),bF.init(a,b)}),bH=m("$ZodUUID",(a,b)=>{if(b.version){let a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[b.version];if(void 0===a)throw Error(`Invalid UUID version: "${b.version}"`);b.pattern??(b.pattern=ao(a))}else b.pattern??(b.pattern=ao());bF.init(a,b)}),bI=m("$ZodEmail",(a,b)=>{b.pattern??(b.pattern=as),bF.init(a,b)}),bJ=m("$ZodURL",(a,b)=>{bF.init(a,b),a._zod.check=c=>{try{let d=c.value.trim(),e=new URL(d);b.hostname&&(b.hostname.lastIndex=0,b.hostname.test(e.hostname)||c.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:b.hostname.source,input:c.value,inst:a,continue:!b.abort})),b.protocol&&(b.protocol.lastIndex=0,b.protocol.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)||c.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:b.protocol.source,input:c.value,inst:a,continue:!b.abort})),b.normalize?c.value=e.href:c.value=d;return}catch(d){c.issues.push({code:"invalid_format",format:"url",input:c.value,inst:a,continue:!b.abort})}}}),bK=m("$ZodEmoji",(a,b)=>{b.pattern??(b.pattern=ay()),bF.init(a,b)}),bL=m("$ZodNanoID",(a,b)=>{b.pattern??(b.pattern=ak),bF.init(a,b)}),bM=m("$ZodCUID",(a,b)=>{b.pattern??(b.pattern=af),bF.init(a,b)}),bN=m("$ZodCUID2",(a,b)=>{b.pattern??(b.pattern=ag),bF.init(a,b)}),bO=m("$ZodULID",(a,b)=>{b.pattern??(b.pattern=ah),bF.init(a,b)}),bP=m("$ZodXID",(a,b)=>{b.pattern??(b.pattern=ai),bF.init(a,b)}),bQ=m("$ZodKSUID",(a,b)=>{b.pattern??(b.pattern=aj),bF.init(a,b)}),bR=m("$ZodISODateTime",(a,b)=>{b.pattern??(b.pattern=aN(b)),bF.init(a,b)}),bS=m("$ZodISODate",(a,b)=>{b.pattern??(b.pattern=aK),bF.init(a,b)}),bT=m("$ZodISOTime",(a,b)=>{b.pattern??(b.pattern=aM(b)),bF.init(a,b)}),bU=m("$ZodISODuration",(a,b)=>{b.pattern??(b.pattern=al),bF.init(a,b)}),bV=m("$ZodIPv4",(a,b)=>{b.pattern??(b.pattern=az),bF.init(a,b),a._zod.bag.format="ipv4"}),bW=m("$ZodIPv6",(a,b)=>{b.pattern??(b.pattern=aA),bF.init(a,b),a._zod.bag.format="ipv6",a._zod.check=c=>{try{new URL(`http://[${c.value}]`)}catch{c.issues.push({code:"invalid_format",format:"ipv6",input:c.value,inst:a,continue:!b.abort})}}}),bX=m("$ZodMAC",(a,b)=>{b.pattern??(b.pattern=aB(b.delimiter)),bF.init(a,b),a._zod.bag.format="mac"}),bY=m("$ZodCIDRv4",(a,b)=>{b.pattern??(b.pattern=aC),bF.init(a,b)}),bZ=m("$ZodCIDRv6",(a,b)=>{b.pattern??(b.pattern=aD),bF.init(a,b),a._zod.check=c=>{let d=c.value.split("/");try{if(2!==d.length)throw Error();let[a,b]=d;if(!b)throw Error();let c=Number(b);if(`${c}`!==b||c<0||c>128)throw Error();new URL(`http://[${a}]`)}catch{c.issues.push({code:"invalid_format",format:"cidrv6",input:c.value,inst:a,continue:!b.abort})}}});function b$(a){if(""===a)return!0;if(a.length%4!=0)return!1;try{return atob(a),!0}catch{return!1}}let b_=m("$ZodBase64",(a,b)=>{b.pattern??(b.pattern=aE),bF.init(a,b),a._zod.bag.contentEncoding="base64",a._zod.check=c=>{b$(c.value)||c.issues.push({code:"invalid_format",format:"base64",input:c.value,inst:a,continue:!b.abort})}}),b0=m("$ZodBase64URL",(a,b)=>{b.pattern??(b.pattern=aF),bF.init(a,b),a._zod.bag.contentEncoding="base64url",a._zod.check=c=>{!function(a){if(!aF.test(a))return!1;let b=a.replace(/[-_]/g,a=>"-"===a?"+":"/");return b$(b.padEnd(4*Math.ceil(b.length/4),"="))}(c.value)&&c.issues.push({code:"invalid_format",format:"base64url",input:c.value,inst:a,continue:!b.abort})}}),b1=m("$ZodE164",(a,b)=>{b.pattern??(b.pattern=aI),bF.init(a,b)}),b2=m("$ZodJWT",(a,b)=>{bF.init(a,b),a._zod.check=c=>{!function(a,b=null){try{let c=a.split(".");if(3!==c.length)return!1;let[d]=c;if(!d)return!1;let e=JSON.parse(atob(d));if("typ"in e&&e?.typ!=="JWT"||!e.alg||b&&(!("alg"in e)||e.alg!==b))return!1;return!0}catch{return!1}}(c.value,b.alg)&&c.issues.push({code:"invalid_format",format:"jwt",input:c.value,inst:a,continue:!b.abort})}}),b3=m("$ZodCustomStringFormat",(a,b)=>{bF.init(a,b),a._zod.check=c=>{b.fn(c.value)||c.issues.push({code:"invalid_format",format:b.format,input:c.value,inst:a,continue:!b.abort})}}),b4=m("$ZodNumber",(a,b)=>{bD.init(a,b),a._zod.pattern=a._zod.bag.pattern??aR,a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=Number(c.value)}catch(a){}let e=c.value;if("number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e))return c;let f="number"==typeof e?Number.isNaN(e)?"NaN":Number.isFinite(e)?void 0:"Infinity":void 0;return c.issues.push({expected:"number",code:"invalid_type",input:e,inst:a,...f?{received:f}:{}}),c}}),b5=m("$ZodNumberFormat",(a,b)=>{bi.init(a,b),b4.init(a,b)}),b6=m("$ZodBoolean",(a,b)=>{bD.init(a,b),a._zod.pattern=aS,a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=!!c.value}catch(a){}let e=c.value;return"boolean"==typeof e||c.issues.push({expected:"boolean",code:"invalid_type",input:e,inst:a}),c}}),b7=m("$ZodBigInt",(a,b)=>{bD.init(a,b),a._zod.pattern=aP,a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=BigInt(c.value)}catch(a){}return"bigint"==typeof c.value||c.issues.push({expected:"bigint",code:"invalid_type",input:c.value,inst:a}),c}}),b8=m("$ZodBigIntFormat",(a,b)=>{bj.init(a,b),b7.init(a,b)}),b9=m("$ZodSymbol",(a,b)=>{bD.init(a,b),a._zod.parse=(b,c)=>{let d=b.value;return"symbol"==typeof d||b.issues.push({expected:"symbol",code:"invalid_type",input:d,inst:a}),b}}),ca=m("$ZodUndefined",(a,b)=>{bD.init(a,b),a._zod.pattern=aU,a._zod.values=new Set([void 0]),a._zod.optin="optional",a._zod.optout="optional",a._zod.parse=(b,c)=>{let d=b.value;return void 0===d||b.issues.push({expected:"undefined",code:"invalid_type",input:d,inst:a}),b}}),cb=m("$ZodNull",(a,b)=>{bD.init(a,b),a._zod.pattern=aT,a._zod.values=new Set([null]),a._zod.parse=(b,c)=>{let d=b.value;return null===d||b.issues.push({expected:"null",code:"invalid_type",input:d,inst:a}),b}}),cc=m("$ZodAny",(a,b)=>{bD.init(a,b),a._zod.parse=a=>a}),cd=m("$ZodUnknown",(a,b)=>{bD.init(a,b),a._zod.parse=a=>a}),ce=m("$ZodNever",(a,b)=>{bD.init(a,b),a._zod.parse=(b,c)=>(b.issues.push({expected:"never",code:"invalid_type",input:b.value,inst:a}),b)}),cf=m("$ZodVoid",(a,b)=>{bD.init(a,b),a._zod.parse=(b,c)=>{let d=b.value;return void 0===d||b.issues.push({expected:"void",code:"invalid_type",input:d,inst:a}),b}}),cg=m("$ZodDate",(a,b)=>{bD.init(a,b),a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=new Date(c.value)}catch(a){}let e=c.value,f=e instanceof Date;return f&&!Number.isNaN(e.getTime())||c.issues.push({expected:"date",code:"invalid_type",input:e,...f?{received:"Invalid Date"}:{},inst:a}),c}});function ch(a,b,c){a.issues.length&&b.issues.push(...Q(c,a.issues)),b.value[c]=a.value}let ci=m("$ZodArray",(a,b)=>{bD.init(a,b),a._zod.parse=(c,d)=>{let e=c.value;if(!Array.isArray(e))return c.issues.push({expected:"array",code:"invalid_type",input:e,inst:a}),c;c.value=Array(e.length);let f=[];for(let a=0;a<e.length;a++){let g=e[a],h=b.element._zod.run({value:g,issues:[]},d);h instanceof Promise?f.push(h.then(b=>ch(b,c,a))):ch(h,c,a)}return f.length?Promise.all(f).then(()=>c):c}});function cj(a,b,c,d,e){if(a.issues.length){if(e&&!(c in d))return;b.issues.push(...Q(c,a.issues))}void 0===a.value?c in d&&(b.value[c]=void 0):b.value[c]=a.value}function ck(a){var b;let c=Object.keys(a.shape);for(let b of c)if(!a.shape?.[b]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${b}": expected a Zod schema`);let d=Object.keys(b=a.shape).filter(a=>"optional"===b[a]._zod.optin&&"optional"===b[a]._zod.optout);return{...a,keys:c,keySet:new Set(c),numKeys:c.length,optionalKeys:new Set(d)}}function cl(a,b,c,d,e,f){let g=[],h=e.keySet,i=e.catchall._zod,j=i.def.type,k="optional"===i.optout;for(let e in b){if(h.has(e))continue;if("never"===j){g.push(e);continue}let f=i.run({value:b[e],issues:[]},d);f instanceof Promise?a.push(f.then(a=>cj(a,c,e,b,k))):cj(f,c,e,b,k)}return(g.length&&c.issues.push({code:"unrecognized_keys",keys:g,input:b,inst:f}),a.length)?Promise.all(a).then(()=>c):c}let cm=m("$ZodObject",(a,b)=>{let c;bD.init(a,b);let d=Object.getOwnPropertyDescriptor(b,"shape");if(!d?.get){let a=b.shape;Object.defineProperty(b,"shape",{get:()=>{let c={...a};return Object.defineProperty(b,"shape",{value:c}),c}})}let e=u(()=>ck(b));y(a._zod,"propValues",()=>{let a=b.shape,c={};for(let b in a){let d=a[b]._zod;if(d.values)for(let a of(c[b]??(c[b]=new Set),d.values))c[b].add(a)}return c});let f=b.catchall;a._zod.parse=(b,d)=>{c??(c=e.value);let g=b.value;if(!D(g))return b.issues.push({expected:"object",code:"invalid_type",input:g,inst:a}),b;b.value={};let h=[],i=c.shape;for(let a of c.keys){let c=i[a],e="optional"===c._zod.optout,f=c._zod.run({value:g[a],issues:[]},d);f instanceof Promise?h.push(f.then(c=>cj(c,b,a,g,e))):cj(f,b,a,g,e)}return f?cl(h,g,b,d,e.value,a):h.length?Promise.all(h).then(()=>b):b}}),cn=m("$ZodObjectJIT",(a,b)=>{let c,d;cm.init(a,b);let e=a._zod.parse,f=u(()=>ck(b)),g=!p.jitless,h=g&&E.value,i=b.catchall;a._zod.parse=(j,k)=>{d??(d=f.value);let l=j.value;return D(l)?g&&h&&k?.async===!1&&!0!==k.jitless?(c||(c=(a=>{let b=new bB(["shape","payload","ctx"]),c=f.value,d=a=>{let b=B(a);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};b.write("const input = payload.value;");let e=Object.create(null),g=0;for(let a of c.keys)e[a]=`key_${g++}`;for(let f of(b.write("const newResult = {};"),c.keys)){let c=e[f],g=B(f),h=a[f],i=h?._zod?.optout==="optional";b.write(`const ${c} = ${d(f)};`),i?b.write(`
|
|
1
|
+
exports.id=3498,exports.ids=[3498],exports.modules={300:(a,b,c)=>{"use strict";c.d(b,{Zr:()=>e});let d=a=>b=>{try{let c=a(b);if(c instanceof Promise)return c;return{then:a=>d(a)(c),catch(a){return this}}}catch(a){return{then(a){return this},catch:b=>d(b)(a)}}},e=(a,b)=>(c,e,f)=>{let g,h={storage:function(a,b){let c;try{c=a()}catch(a){return}return{getItem:a=>{var b;let d=a=>null===a?null:JSON.parse(a,void 0),e=null!=(b=c.getItem(a))?b:null;return e instanceof Promise?e.then(d):d(e)},setItem:(a,b)=>c.setItem(a,JSON.stringify(b,void 0)),removeItem:a=>c.removeItem(a)}}(()=>window.localStorage),partialize:a=>a,version:0,merge:(a,b)=>({...b,...a}),...b},i=!1,j=0,k=new Set,l=new Set,m=h.storage;if(!m)return a((...a)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),c(...a)},e,f);let n=()=>{let a=h.partialize({...e()});return m.setItem(h.name,{state:a,version:h.version})},o=f.setState;f.setState=(a,b)=>(o(a,b),n());let p=a((...a)=>(c(...a),n()),e,f);f.getInitialState=()=>p;let q=()=>{var a,b;if(!m)return;let f=++j;i=!1,k.forEach(a=>{var b;return a(null!=(b=e())?b:p)});let o=(null==(b=h.onRehydrateStorage)?void 0:b.call(h,null!=(a=e())?a:p))||void 0;return d(m.getItem.bind(m))(h.name).then(a=>{if(a)if("number"!=typeof a.version||a.version===h.version)return[!1,a.state];else{if(h.migrate){let b=h.migrate(a.state,a.version);return b instanceof Promise?b.then(a=>[!0,a]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(a=>{var b;if(f!==j)return;let[d,i]=a;if(c(g=h.merge(i,null!=(b=e())?b:p),!0),d)return n()}).then(()=>{f===j&&(null==o||o(g,void 0),g=e(),i=!0,l.forEach(a=>a(g)))}).catch(a=>{f===j&&(null==o||o(void 0,a))})};return f.persist={setOptions:a=>{h={...h,...a},a.storage&&(m=a.storage)},clearStorage:()=>{null==m||m.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>q(),hasHydrated:()=>i,onHydrate:a=>(k.add(a),()=>{k.delete(a)}),onFinishHydration:a=>(l.add(a),()=>{l.delete(a)})},h.skipHydration||q(),g||p}},3575:(a,b,c)=>{"use strict";c.d(b,{I:()=>f,a:()=>g,b:()=>h,c:()=>k,m:()=>i});var d,e=c(14462);class f extends Error{constructor(a,b){let c=a;b&&(c+=": "+b),super(c),this.code=a,b&&(this.originalMessage=b)}}var g=((d=g||{}).MISSING_MESSAGE="MISSING_MESSAGE",d.MISSING_FORMAT="MISSING_FORMAT",d.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",d.INSUFFICIENT_PATH="INSUFFICIENT_PATH",d.INVALID_MESSAGE="INVALID_MESSAGE",d.INVALID_KEY="INVALID_KEY",d.FORMATTING_ERROR="FORMATTING_ERROR",d);function h(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function i(a,b){return(0,e.B)(a,{cache:{create:()=>({get:a=>b[a],set(a,c){b[a]=c}})},strategy:e.W.variadic})}function j(a,b){return i((...b)=>new a(...b),b)}function k(a){return{getDateTimeFormat:j(Intl.DateTimeFormat,a.dateTime),getNumberFormat:j(Intl.NumberFormat,a.number),getPluralRules:j(Intl.PluralRules,a.pluralRules),getRelativeTimeFormat:j(Intl.RelativeTimeFormat,a.relativeTime),getListFormat:j(Intl.ListFormat,a.list),getDisplayNames:j(Intl.DisplayNames,a.displayNames)}}},14462:(a,b,c)=>{"use strict";function d(a,b){let c=b&&b.cache?b.cache:i,d=b&&b.serializer?b.serializer:g;return(b&&b.strategy?b.strategy:function(a,b){var c,d;let g=1===a.length?e:f;return c=b.cache.create(),d=b.serializer,g.bind(this,a,c,d)})(a,{cache:c,serializer:d})}function e(a,b,c,d){let e=null==d||"number"==typeof d||"boolean"==typeof d?d:c(d),f=b.get(e);return void 0===f&&(f=a.call(this,d),b.set(e,f)),f}function f(a,b,c){let d=Array.prototype.slice.call(arguments,3),e=c(d),f=b.get(e);return void 0===f&&(f=a.apply(this,d),b.set(e,f)),f}c.d(b,{B:()=>d,W:()=>j});let g=function(){return JSON.stringify(arguments)};class h{cache;constructor(){this.cache=Object.create(null)}get(a){return this.cache[a]}set(a,b){this.cache[a]=b}}let i={create:function(){return new h}},j={variadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,f.bind(this,a,c,d)},monadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,e.bind(this,a,c,d)}}},23807:(a,b,c)=>{"use strict";c.d(b,{A:()=>r});var d=c(91986),e=c(3575),f=c(92207);function g(a){return"function"==typeof a.then}var h=c(65573);let i=(0,d.cache)(function(){return{locale:void 0}}),j=(0,d.cache)(async function(){let a=(0,h.b3)();return g(a)?await a:a}),k=(0,d.cache)(async function(){let a;try{a=(await j()).get("X-NEXT-INTL-LOCALE")||void 0}catch(a){if(a instanceof Error&&"DYNAMIC_SERVER_USAGE"===a.digest){let b=Error("Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl.dev/docs/routing/setup#static-rendering",{cause:a});throw b.digest=a.digest,b}throw a}return a});async function l(){return i().locale||await k()}var m=c(34017);let n=(0,d.cache)(function(){return Intl.DateTimeFormat().resolvedOptions().timeZone}),o=(0,d.cache)(async function(a,b){let c=a({locale:b,get requestLocale(){return b?Promise.resolve(b):l()}});if(g(c)&&(c=await c),!c.locale)throw Error("No locale was returned from `getRequestConfig`.\n\nSee https://next-intl.dev/docs/usage/configuration#i18n-request");return c}),p=(0,d.cache)(e.c),q=(0,d.cache)(e.b),r=(0,d.cache)(async function(a){let b=await o(m.A,a);return{...(0,f.i)(b),_formatters:p(q()),timeZone:b.timeZone||n()}})},28440:(a,b,c)=>{"use strict";c.d(b,{A:()=>g});var d=c(91986),e=c(23807);let f=(0,d.cache)(async function(a){var b=await (0,e.A)(a);if(!b.messages)throw Error("No messages found. Have you configured them correctly? See https://next-intl.dev/docs/configuration#messages");return b.messages});async function g(a){return f(a?.locale)}},29389:(a,b,c)=>{"use strict";function d(a){return a}c.d(b,{A:()=>d})},31417:(a,b,c)=>{"use strict";c.d(b,{v:()=>g});var d=c(67484);let e=a=>{let b,c=new Set,d=(a,d)=>{let e="function"==typeof a?a(b):a;if(!Object.is(e,b)){let a=b;b=(null!=d?d:"object"!=typeof e||null===e)?e:Object.assign({},b,e),c.forEach(c=>c(b,a))}},e=()=>b,f={setState:d,getState:e,getInitialState:()=>g,subscribe:a=>(c.add(a),()=>c.delete(a))},g=b=a(d,e,f);return f},f=a=>{let b=a?e(a):e,c=a=>(function(a,b=a=>a){let c=d.useSyncExternalStore(a.subscribe,d.useCallback(()=>b(a.getState()),[a,b]),d.useCallback(()=>b(a.getInitialState()),[a,b]));return d.useDebugValue(c),c})(b,a);return Object.assign(c,b),c},g=a=>a?f(a):f},50609:a=>{a.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},60258:(a,b,c)=>{"use strict";let d,e,f;c.d(b,{zMY:()=>fn,Ikc:()=>fN,g1P:()=>f_,YjP:()=>er});var g,h,i={};c.r(i),c.d(i,{base64:()=>aE,base64url:()=>aF,bigint:()=>aP,boolean:()=>aS,browserEmail:()=>ax,cidrv4:()=>aC,cidrv6:()=>aD,cuid:()=>af,cuid2:()=>ag,date:()=>aK,datetime:()=>aN,domain:()=>aH,duration:()=>al,e164:()=>aI,email:()=>as,emoji:()=>ay,extendedDuration:()=>am,guid:()=>an,hex:()=>aX,hostname:()=>aG,html5Email:()=>at,idnEmail:()=>aw,integer:()=>aQ,ipv4:()=>az,ipv6:()=>aA,ksuid:()=>aj,lowercase:()=>aV,mac:()=>aB,md5_base64:()=>a_,md5_base64url:()=>a0,md5_hex:()=>a$,nanoid:()=>ak,null:()=>aT,number:()=>aR,rfc5322Email:()=>au,sha1_base64:()=>a2,sha1_base64url:()=>a3,sha1_hex:()=>a1,sha256_base64:()=>a5,sha256_base64url:()=>a6,sha256_hex:()=>a4,sha384_base64:()=>a8,sha384_base64url:()=>a9,sha384_hex:()=>a7,sha512_base64:()=>bb,sha512_base64url:()=>bc,sha512_hex:()=>ba,string:()=>aO,time:()=>aM,ulid:()=>ah,undefined:()=>aU,unicodeEmail:()=>av,uppercase:()=>aW,uuid:()=>ao,uuid4:()=>ap,uuid6:()=>aq,uuid7:()=>ar,xid:()=>ai});var j={};c.r(j),c.d(j,{endsWith:()=>dM,gt:()=>du,gte:()=>dv,includes:()=>dK,length:()=>dG,lowercase:()=>dI,lt:()=>ds,lte:()=>dt,maxLength:()=>dE,maxSize:()=>dB,mime:()=>dO,minLength:()=>dF,minSize:()=>dC,multipleOf:()=>dA,negative:()=>dx,nonnegative:()=>dz,nonpositive:()=>dy,normalize:()=>dQ,overwrite:()=>dP,positive:()=>dw,property:()=>dN,regex:()=>dH,size:()=>dD,slugify:()=>dU,startsWith:()=>dL,toLowerCase:()=>dS,toUpperCase:()=>dT,trim:()=>dR,uppercase:()=>dJ});var k={};c.r(k),c.d(k,{ZodISODate:()=>d4,ZodISODateTime:()=>d2,ZodISODuration:()=>d8,ZodISOTime:()=>d6,date:()=>d5,datetime:()=>d3,duration:()=>d9,time:()=>d7});var l={};function m(a,b,c){function d(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:g,traits:new Set},enumerable:!1}),c._zod.traits.has(a))return;c._zod.traits.add(a),b(c,d);let e=g.prototype,f=Object.keys(e);for(let a=0;a<f.length;a++){let b=f[a];b in c||(c[b]=e[b].bind(c))}}let e=c?.Parent??Object;class f extends e{}function g(a){var b;let e=c?.Parent?new f:this;for(let c of(d(e,a),(b=e._zod).deferred??(b.deferred=[]),e._zod.deferred))c();return e}return Object.defineProperty(f,"name",{value:a}),Object.defineProperty(g,"init",{value:d}),Object.defineProperty(g,Symbol.hasInstance,{value:b=>!!c?.Parent&&b instanceof c.Parent||b?._zod?.traits?.has(a)}),Object.defineProperty(g,"name",{value:a}),g}c.r(l),c.d(l,{ZodAny:()=>fz,ZodArray:()=>fJ,ZodBase64:()=>e1,ZodBase64URL:()=>e3,ZodBigInt:()=>fo,ZodBigIntFormat:()=>fq,ZodBoolean:()=>fm,ZodCIDRv4:()=>eZ,ZodCIDRv6:()=>e_,ZodCUID:()=>eJ,ZodCUID2:()=>eL,ZodCatch:()=>gu,ZodCodec:()=>gA,ZodCustom:()=>gM,ZodCustomStringFormat:()=>e9,ZodDate:()=>fH,ZodDefault:()=>gm,ZodDiscriminatedUnion:()=>fU,ZodE164:()=>e5,ZodEmail:()=>et,ZodEmoji:()=>eF,ZodEnum:()=>f6,ZodExactOptional:()=>gh,ZodFile:()=>gb,ZodFunction:()=>gK,ZodGUID:()=>ev,ZodIPv4:()=>eT,ZodIPv6:()=>eX,ZodIntersection:()=>fW,ZodJWT:()=>e7,ZodKSUID:()=>eR,ZodLazy:()=>gG,ZodLiteral:()=>f9,ZodMAC:()=>eV,ZodMap:()=>f2,ZodNaN:()=>gw,ZodNanoID:()=>eH,ZodNever:()=>fD,ZodNonOptional:()=>gq,ZodNull:()=>fx,ZodNullable:()=>gj,ZodNumber:()=>fe,ZodNumberFormat:()=>fg,ZodObject:()=>fM,ZodOptional:()=>gf,ZodPipe:()=>gy,ZodPrefault:()=>go,ZodPromise:()=>gI,ZodReadonly:()=>gC,ZodRecord:()=>f$,ZodSet:()=>f4,ZodString:()=>eq,ZodStringFormat:()=>es,ZodSuccess:()=>gs,ZodSymbol:()=>ft,ZodTemplateLiteral:()=>gE,ZodTransform:()=>gd,ZodTuple:()=>fY,ZodType:()=>eo,ZodULID:()=>eN,ZodURL:()=>eC,ZodUUID:()=>ex,ZodUndefined:()=>fv,ZodUnion:()=>fQ,ZodUnknown:()=>fB,ZodVoid:()=>fF,ZodXID:()=>eP,ZodXor:()=>fS,_ZodString:()=>ep,_default:()=>gn,_function:()=>gL,any:()=>fA,array:()=>fK,base64:()=>e2,base64url:()=>e4,bigint:()=>fp,boolean:()=>fn,catch:()=>gv,check:()=>gN,cidrv4:()=>e$,cidrv6:()=>e0,codec:()=>gB,cuid:()=>eK,cuid2:()=>eM,custom:()=>gO,date:()=>fI,describe:()=>gR,discriminatedUnion:()=>fV,e164:()=>e6,email:()=>eu,emoji:()=>eG,enum:()=>f7,exactOptional:()=>gi,file:()=>gc,float32:()=>fi,float64:()=>fj,function:()=>gL,guid:()=>ew,hash:()=>fd,hex:()=>fc,hostname:()=>fb,httpUrl:()=>eE,instanceof:()=>gT,int:()=>fh,int32:()=>fk,int64:()=>fr,intersection:()=>fX,ipv4:()=>eU,ipv6:()=>eY,json:()=>gV,jwt:()=>e8,keyof:()=>fL,ksuid:()=>eS,lazy:()=>gH,literal:()=>ga,looseObject:()=>fP,looseRecord:()=>f1,mac:()=>eW,map:()=>f3,meta:()=>gS,nan:()=>gx,nanoid:()=>eI,nativeEnum:()=>f8,never:()=>fE,nonoptional:()=>gr,null:()=>fy,nullable:()=>gk,nullish:()=>gl,number:()=>ff,object:()=>fN,optional:()=>gg,partialRecord:()=>f0,pipe:()=>gz,prefault:()=>gp,preprocess:()=>gW,promise:()=>gJ,readonly:()=>gD,record:()=>f_,refine:()=>gP,set:()=>f5,strictObject:()=>fO,string:()=>er,stringFormat:()=>fa,stringbool:()=>gU,success:()=>gt,superRefine:()=>gQ,symbol:()=>fu,templateLiteral:()=>gF,transform:()=>ge,tuple:()=>fZ,uint32:()=>fl,uint64:()=>fs,ulid:()=>eO,undefined:()=>fw,union:()=>fR,unknown:()=>fC,url:()=>eD,uuid:()=>ey,uuidv4:()=>ez,uuidv6:()=>eA,uuidv7:()=>eB,void:()=>fG,xid:()=>eQ,xor:()=>fT}),Object.freeze({status:"aborted"}),Symbol("zod_brand");class n extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class o extends Error{constructor(a){super(`Encountered unidirectional transform during encode: ${a}`),this.name="ZodEncodeError"}}let p={};function q(a){return a&&Object.assign(p,a),p}function r(a){let b=Object.values(a).filter(a=>"number"==typeof a);return Object.entries(a).filter(([a,c])=>-1===b.indexOf(+a)).map(([a,b])=>b)}function s(a,b="|"){return a.map(a=>M(a)).join(b)}function t(a,b){return"bigint"==typeof b?b.toString():b}function u(a){return{get value(){{let b=a();return Object.defineProperty(this,"value",{value:b}),b}}}}function v(a){return null==a}function w(a){let b=+!!a.startsWith("^"),c=a.endsWith("$")?a.length-1:a.length;return a.slice(b,c)}let x=Symbol("evaluating");function y(a,b,c){let d;Object.defineProperty(a,b,{get(){if(d!==x)return void 0===d&&(d=x,d=c()),d},set(c){Object.defineProperty(a,b,{value:c})},configurable:!0})}function z(a,b,c){Object.defineProperty(a,b,{value:c,writable:!0,enumerable:!0,configurable:!0})}function A(...a){let b={};for(let c of a)Object.assign(b,Object.getOwnPropertyDescriptors(c));return Object.defineProperties({},b)}function B(a){return JSON.stringify(a)}let C="captureStackTrace"in Error?Error.captureStackTrace:(...a)=>{};function D(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}let E=u(()=>{if("u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(a){return!1}});function F(a){if(!1===D(a))return!1;let b=a.constructor;if(void 0===b||"function"!=typeof b)return!0;let c=b.prototype;return!1!==D(c)&&!1!==Object.prototype.hasOwnProperty.call(c,"isPrototypeOf")}function G(a){return F(a)?{...a}:Array.isArray(a)?[...a]:a}let H=new Set(["string","number","symbol"]),I=new Set(["string","number","bigint","boolean","symbol","undefined"]);function J(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K(a,b,c){let d=new a._zod.constr(b??a._zod.def);return(!b||c?.parent)&&(d._zod.parent=a),d}function L(a){if(!a)return{};if("string"==typeof a)return{error:()=>a};if(a?.message!==void 0){if(a?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");a.error=a.message}return(delete a.message,"string"==typeof a.error)?{...a,error:()=>a.error}:a}function M(a){return"bigint"==typeof a?a.toString()+"n":"string"==typeof a?`"${a}"`:`${a}`}let N={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},O={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function P(a,b=0){if(!0===a.aborted)return!0;for(let c=b;c<a.issues.length;c++)if(a.issues[c]?.continue!==!0)return!0;return!1}function Q(a,b){return b.map(b=>(b.path??(b.path=[]),b.path.unshift(a),b))}function R(a){return"string"==typeof a?a:a?.message}function S(a,b,c){let d={...a,path:a.path??[]};return a.message||(d.message=R(a.inst?._zod.def?.error?.(a))??R(b?.error?.(a))??R(c.customError?.(a))??R(c.localeError?.(a))??"Invalid input"),delete d.inst,delete d.continue,b?.reportInput||delete d.input,d}function T(a){return a instanceof Set?"set":a instanceof Map?"map":a instanceof File?"file":"unknown"}function U(a){return Array.isArray(a)?"array":"string"==typeof a?"string":"unknown"}function V(...a){let[b,c,d]=a;return"string"==typeof b?{message:b,code:"custom",input:c,inst:d}:{...b}}let W=(a,b)=>{a.name="$ZodError",Object.defineProperty(a,"_zod",{value:a._zod,enumerable:!1}),Object.defineProperty(a,"issues",{value:b,enumerable:!1}),a.message=JSON.stringify(b,t,2),Object.defineProperty(a,"toString",{value:()=>a.message,enumerable:!1})},X=m("$ZodError",W),Y=m("$ZodError",W,{Parent:Error}),Z=a=>(b,c,d,e)=>{let f=d?Object.assign(d,{async:!1}):{async:!1},g=b._zod.run({value:c,issues:[]},f);if(g instanceof Promise)throw new n;if(g.issues.length){let b=new(e?.Err??a)(g.issues.map(a=>S(a,f,q())));throw C(b,e?.callee),b}return g.value},$=Z(Y),_=a=>async(b,c,d,e)=>{let f=d?Object.assign(d,{async:!0}):{async:!0},g=b._zod.run({value:c,issues:[]},f);if(g instanceof Promise&&(g=await g),g.issues.length){let b=new(e?.Err??a)(g.issues.map(a=>S(a,f,q())));throw C(b,e?.callee),b}return g.value},aa=_(Y),ab=a=>(b,c,d)=>{let e=d?{...d,async:!1}:{async:!1},f=b._zod.run({value:c,issues:[]},e);if(f instanceof Promise)throw new n;return f.issues.length?{success:!1,error:new(a??X)(f.issues.map(a=>S(a,e,q())))}:{success:!0,data:f.value}},ac=ab(Y),ad=a=>async(b,c,d)=>{let e=d?Object.assign(d,{async:!0}):{async:!0},f=b._zod.run({value:c,issues:[]},e);return f instanceof Promise&&(f=await f),f.issues.length?{success:!1,error:new a(f.issues.map(a=>S(a,e,q())))}:{success:!0,data:f.value}},ae=ad(Y),af=/^[cC][^\s-]{8,}$/,ag=/^[0-9a-z]+$/,ah=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ai=/^[0-9a-vA-V]{20}$/,aj=/^[A-Za-z0-9]{27}$/,ak=/^[a-zA-Z0-9_-]{21}$/,al=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,am=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,an=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ao=a=>a?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${a}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ap=ao(4),aq=ao(6),ar=ao(7),as=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,at=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,au=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,av=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,aw=av,ax=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function ay(){return RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}let az=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,aA=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,aB=a=>{let b=J(a??":");return RegExp(`^(?:[0-9A-F]{2}${b}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${b}){5}[0-9a-f]{2}$`)},aC=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,aD=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,aE=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,aF=/^[A-Za-z0-9_-]*$/,aG=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,aH=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,aI=/^\+[1-9]\d{6,14}$/,aJ="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",aK=RegExp(`^${aJ}$`);function aL(a){let b="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof a.precision?-1===a.precision?`${b}`:0===a.precision?`${b}:[0-5]\\d`:`${b}:[0-5]\\d\\.\\d{${a.precision}}`:`${b}(?::[0-5]\\d(?:\\.\\d+)?)?`}function aM(a){return RegExp(`^${aL(a)}$`)}function aN(a){let b=aL({precision:a.precision}),c=["Z"];a.local&&c.push(""),a.offset&&c.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let d=`${b}(?:${c.join("|")})`;return RegExp(`^${aJ}T(?:${d})$`)}let aO=a=>{let b=a?`[\\s\\S]{${a?.minimum??0},${a?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${b}$`)},aP=/^-?\d+n?$/,aQ=/^-?\d+$/,aR=/^-?\d+(?:\.\d+)?$/,aS=/^(?:true|false)$/i,aT=/^null$/i,aU=/^undefined$/i,aV=/^[^A-Z]*$/,aW=/^[^a-z]*$/,aX=/^[0-9a-fA-F]*$/;function aY(a,b){return RegExp(`^[A-Za-z0-9+/]{${a}}${b}$`)}function aZ(a){return RegExp(`^[A-Za-z0-9_-]{${a}}$`)}let a$=/^[0-9a-fA-F]{32}$/,a_=aY(22,"=="),a0=aZ(22),a1=/^[0-9a-fA-F]{40}$/,a2=aY(27,"="),a3=aZ(27),a4=/^[0-9a-fA-F]{64}$/,a5=aY(43,"="),a6=aZ(43),a7=/^[0-9a-fA-F]{96}$/,a8=aY(64,""),a9=aZ(64),ba=/^[0-9a-fA-F]{128}$/,bb=aY(86,"=="),bc=aZ(86),bd=m("$ZodCheck",(a,b)=>{var c;a._zod??(a._zod={}),a._zod.def=b,(c=a._zod).onattach??(c.onattach=[])}),be={number:"number",bigint:"bigint",object:"date"},bf=m("$ZodCheckLessThan",(a,b)=>{bd.init(a,b);let c=be[typeof b.value];a._zod.onattach.push(a=>{let c=a._zod.bag,d=(b.inclusive?c.maximum:c.exclusiveMaximum)??1/0;b.value<d&&(b.inclusive?c.maximum=b.value:c.exclusiveMaximum=b.value)}),a._zod.check=d=>{(b.inclusive?d.value<=b.value:d.value<b.value)||d.issues.push({origin:c,code:"too_big",maximum:"object"==typeof b.value?b.value.getTime():b.value,input:d.value,inclusive:b.inclusive,inst:a,continue:!b.abort})}}),bg=m("$ZodCheckGreaterThan",(a,b)=>{bd.init(a,b);let c=be[typeof b.value];a._zod.onattach.push(a=>{let c=a._zod.bag,d=(b.inclusive?c.minimum:c.exclusiveMinimum)??-1/0;b.value>d&&(b.inclusive?c.minimum=b.value:c.exclusiveMinimum=b.value)}),a._zod.check=d=>{(b.inclusive?d.value>=b.value:d.value>b.value)||d.issues.push({origin:c,code:"too_small",minimum:"object"==typeof b.value?b.value.getTime():b.value,input:d.value,inclusive:b.inclusive,inst:a,continue:!b.abort})}}),bh=m("$ZodCheckMultipleOf",(a,b)=>{bd.init(a,b),a._zod.onattach.push(a=>{var c;(c=a._zod.bag).multipleOf??(c.multipleOf=b.value)}),a._zod.check=c=>{if(typeof c.value!=typeof b.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof c.value?c.value%b.value===BigInt(0):0===function(a,b){let c=(a.toString().split(".")[1]||"").length,d=b.toString(),e=(d.split(".")[1]||"").length;if(0===e&&/\d?e-\d?/.test(d)){let a=d.match(/\d?e-(\d?)/);a?.[1]&&(e=Number.parseInt(a[1]))}let f=c>e?c:e;return Number.parseInt(a.toFixed(f).replace(".",""))%Number.parseInt(b.toFixed(f).replace(".",""))/10**f}(c.value,b.value))||c.issues.push({origin:typeof c.value,code:"not_multiple_of",divisor:b.value,input:c.value,inst:a,continue:!b.abort})}}),bi=m("$ZodCheckNumberFormat",(a,b)=>{bd.init(a,b),b.format=b.format||"float64";let c=b.format?.includes("int"),d=c?"int":"number",[e,f]=N[b.format];a._zod.onattach.push(a=>{let d=a._zod.bag;d.format=b.format,d.minimum=e,d.maximum=f,c&&(d.pattern=aQ)}),a._zod.check=g=>{let h=g.value;if(c){if(!Number.isInteger(h))return void g.issues.push({expected:d,format:b.format,code:"invalid_type",continue:!1,input:h,inst:a});if(!Number.isSafeInteger(h))return void(h>0?g.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:a,origin:d,inclusive:!0,continue:!b.abort}):g.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:a,origin:d,inclusive:!0,continue:!b.abort}))}h<e&&g.issues.push({origin:"number",input:h,code:"too_small",minimum:e,inclusive:!0,inst:a,continue:!b.abort}),h>f&&g.issues.push({origin:"number",input:h,code:"too_big",maximum:f,inclusive:!0,inst:a,continue:!b.abort})}}),bj=m("$ZodCheckBigIntFormat",(a,b)=>{bd.init(a,b);let[c,d]=O[b.format];a._zod.onattach.push(a=>{let e=a._zod.bag;e.format=b.format,e.minimum=c,e.maximum=d}),a._zod.check=e=>{let f=e.value;f<c&&e.issues.push({origin:"bigint",input:f,code:"too_small",minimum:c,inclusive:!0,inst:a,continue:!b.abort}),f>d&&e.issues.push({origin:"bigint",input:f,code:"too_big",maximum:d,inclusive:!0,inst:a,continue:!b.abort})}}),bk=m("$ZodCheckMaxSize",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.size}),a._zod.onattach.push(a=>{let c=a._zod.bag.maximum??1/0;b.maximum<c&&(a._zod.bag.maximum=b.maximum)}),a._zod.check=c=>{let d=c.value;d.size<=b.maximum||c.issues.push({origin:T(d),code:"too_big",maximum:b.maximum,inclusive:!0,input:d,inst:a,continue:!b.abort})}}),bl=m("$ZodCheckMinSize",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.size}),a._zod.onattach.push(a=>{let c=a._zod.bag.minimum??-1/0;b.minimum>c&&(a._zod.bag.minimum=b.minimum)}),a._zod.check=c=>{let d=c.value;d.size>=b.minimum||c.issues.push({origin:T(d),code:"too_small",minimum:b.minimum,inclusive:!0,input:d,inst:a,continue:!b.abort})}}),bm=m("$ZodCheckSizeEquals",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.size}),a._zod.onattach.push(a=>{let c=a._zod.bag;c.minimum=b.size,c.maximum=b.size,c.size=b.size}),a._zod.check=c=>{let d=c.value,e=d.size;if(e===b.size)return;let f=e>b.size;c.issues.push({origin:T(d),...f?{code:"too_big",maximum:b.size}:{code:"too_small",minimum:b.size},inclusive:!0,exact:!0,input:c.value,inst:a,continue:!b.abort})}}),bn=m("$ZodCheckMaxLength",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.length}),a._zod.onattach.push(a=>{let c=a._zod.bag.maximum??1/0;b.maximum<c&&(a._zod.bag.maximum=b.maximum)}),a._zod.check=c=>{let d=c.value;if(d.length<=b.maximum)return;let e=U(d);c.issues.push({origin:e,code:"too_big",maximum:b.maximum,inclusive:!0,input:d,inst:a,continue:!b.abort})}}),bo=m("$ZodCheckMinLength",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.length}),a._zod.onattach.push(a=>{let c=a._zod.bag.minimum??-1/0;b.minimum>c&&(a._zod.bag.minimum=b.minimum)}),a._zod.check=c=>{let d=c.value;if(d.length>=b.minimum)return;let e=U(d);c.issues.push({origin:e,code:"too_small",minimum:b.minimum,inclusive:!0,input:d,inst:a,continue:!b.abort})}}),bp=m("$ZodCheckLengthEquals",(a,b)=>{var c;bd.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return!v(b)&&void 0!==b.length}),a._zod.onattach.push(a=>{let c=a._zod.bag;c.minimum=b.length,c.maximum=b.length,c.length=b.length}),a._zod.check=c=>{let d=c.value,e=d.length;if(e===b.length)return;let f=U(d),g=e>b.length;c.issues.push({origin:f,...g?{code:"too_big",maximum:b.length}:{code:"too_small",minimum:b.length},inclusive:!0,exact:!0,input:c.value,inst:a,continue:!b.abort})}}),bq=m("$ZodCheckStringFormat",(a,b)=>{var c,d;bd.init(a,b),a._zod.onattach.push(a=>{let c=a._zod.bag;c.format=b.format,b.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(b.pattern))}),b.pattern?(c=a._zod).check??(c.check=c=>{b.pattern.lastIndex=0,b.pattern.test(c.value)||c.issues.push({origin:"string",code:"invalid_format",format:b.format,input:c.value,...b.pattern?{pattern:b.pattern.toString()}:{},inst:a,continue:!b.abort})}):(d=a._zod).check??(d.check=()=>{})}),br=m("$ZodCheckRegex",(a,b)=>{bq.init(a,b),a._zod.check=c=>{b.pattern.lastIndex=0,b.pattern.test(c.value)||c.issues.push({origin:"string",code:"invalid_format",format:"regex",input:c.value,pattern:b.pattern.toString(),inst:a,continue:!b.abort})}}),bs=m("$ZodCheckLowerCase",(a,b)=>{b.pattern??(b.pattern=aV),bq.init(a,b)}),bt=m("$ZodCheckUpperCase",(a,b)=>{b.pattern??(b.pattern=aW),bq.init(a,b)}),bu=m("$ZodCheckIncludes",(a,b)=>{bd.init(a,b);let c=J(b.includes),d=new RegExp("number"==typeof b.position?`^.{${b.position}}${c}`:c);b.pattern=d,a._zod.onattach.push(a=>{let b=a._zod.bag;b.patterns??(b.patterns=new Set),b.patterns.add(d)}),a._zod.check=c=>{c.value.includes(b.includes,b.position)||c.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:b.includes,input:c.value,inst:a,continue:!b.abort})}}),bv=m("$ZodCheckStartsWith",(a,b)=>{bd.init(a,b);let c=RegExp(`^${J(b.prefix)}.*`);b.pattern??(b.pattern=c),a._zod.onattach.push(a=>{let b=a._zod.bag;b.patterns??(b.patterns=new Set),b.patterns.add(c)}),a._zod.check=c=>{c.value.startsWith(b.prefix)||c.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:b.prefix,input:c.value,inst:a,continue:!b.abort})}}),bw=m("$ZodCheckEndsWith",(a,b)=>{bd.init(a,b);let c=RegExp(`.*${J(b.suffix)}$`);b.pattern??(b.pattern=c),a._zod.onattach.push(a=>{let b=a._zod.bag;b.patterns??(b.patterns=new Set),b.patterns.add(c)}),a._zod.check=c=>{c.value.endsWith(b.suffix)||c.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:b.suffix,input:c.value,inst:a,continue:!b.abort})}});function bx(a,b,c){a.issues.length&&b.issues.push(...Q(c,a.issues))}let by=m("$ZodCheckProperty",(a,b)=>{bd.init(a,b),a._zod.check=a=>{let c=b.schema._zod.run({value:a.value[b.property],issues:[]},{});if(c instanceof Promise)return c.then(c=>bx(c,a,b.property));bx(c,a,b.property)}}),bz=m("$ZodCheckMimeType",(a,b)=>{bd.init(a,b);let c=new Set(b.mime);a._zod.onattach.push(a=>{a._zod.bag.mime=b.mime}),a._zod.check=d=>{c.has(d.value.type)||d.issues.push({code:"invalid_value",values:b.mime,input:d.value.type,inst:a,continue:!b.abort})}}),bA=m("$ZodCheckOverwrite",(a,b)=>{bd.init(a,b),a._zod.check=a=>{a.value=b.tx(a.value)}});class bB{constructor(a=[]){this.content=[],this.indent=0,this&&(this.args=a)}indented(a){this.indent+=1,a(this),this.indent-=1}write(a){if("function"==typeof a){a(this,{execution:"sync"}),a(this,{execution:"async"});return}let b=a.split("\n").filter(a=>a),c=Math.min(...b.map(a=>a.length-a.trimStart().length));for(let a of b.map(a=>a.slice(c)).map(a=>" ".repeat(2*this.indent)+a))this.content.push(a)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(a=>` ${a}`)].join("\n"))}}let bC={major:4,minor:3,patch:6},bD=m("$ZodType",(a,b)=>{var c;a??(a={}),a._zod.def=b,a._zod.bag=a._zod.bag||{},a._zod.version=bC;let d=[...a._zod.def.checks??[]];for(let b of(a._zod.traits.has("$ZodCheck")&&d.unshift(a),d))for(let c of b._zod.onattach)c(a);if(0===d.length)(c=a._zod).deferred??(c.deferred=[]),a._zod.deferred?.push(()=>{a._zod.run=a._zod.parse});else{let b=(a,b,c)=>{let d,e=P(a);for(let f of b){if(f._zod.def.when){if(!f._zod.def.when(a))continue}else if(e)continue;let b=a.issues.length,g=f._zod.check(a);if(g instanceof Promise&&c?.async===!1)throw new n;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await g,a.issues.length!==b&&(e||(e=P(a,b)))});else{if(a.issues.length===b)continue;e||(e=P(a,b))}}return d?d.then(()=>a):a},c=(c,e,f)=>{if(P(c))return c.aborted=!0,c;let g=b(e,d,f);if(g instanceof Promise){if(!1===f.async)throw new n;return g.then(b=>a._zod.parse(b,f))}return a._zod.parse(g,f)};a._zod.run=(e,f)=>{if(f.skipChecks)return a._zod.parse(e,f);if("backward"===f.direction){let b=a._zod.parse({value:e.value,issues:[]},{...f,skipChecks:!0});return b instanceof Promise?b.then(a=>c(a,e,f)):c(b,e,f)}let g=a._zod.parse(e,f);if(g instanceof Promise){if(!1===f.async)throw new n;return g.then(a=>b(a,d,f))}return b(g,d,f)}}y(a,"~standard",()=>({validate:b=>{try{let c=ac(a,b);return c.success?{value:c.data}:{issues:c.error?.issues}}catch(c){return ae(a,b).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),bE=m("$ZodString",(a,b)=>{bD.init(a,b),a._zod.pattern=[...a?._zod.bag?.patterns??[]].pop()??aO(a._zod.bag),a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=String(c.value)}catch(a){}return"string"==typeof c.value||c.issues.push({expected:"string",code:"invalid_type",input:c.value,inst:a}),c}}),bF=m("$ZodStringFormat",(a,b)=>{bq.init(a,b),bE.init(a,b)}),bG=m("$ZodGUID",(a,b)=>{b.pattern??(b.pattern=an),bF.init(a,b)}),bH=m("$ZodUUID",(a,b)=>{if(b.version){let a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[b.version];if(void 0===a)throw Error(`Invalid UUID version: "${b.version}"`);b.pattern??(b.pattern=ao(a))}else b.pattern??(b.pattern=ao());bF.init(a,b)}),bI=m("$ZodEmail",(a,b)=>{b.pattern??(b.pattern=as),bF.init(a,b)}),bJ=m("$ZodURL",(a,b)=>{bF.init(a,b),a._zod.check=c=>{try{let d=c.value.trim(),e=new URL(d);b.hostname&&(b.hostname.lastIndex=0,b.hostname.test(e.hostname)||c.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:b.hostname.source,input:c.value,inst:a,continue:!b.abort})),b.protocol&&(b.protocol.lastIndex=0,b.protocol.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)||c.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:b.protocol.source,input:c.value,inst:a,continue:!b.abort})),b.normalize?c.value=e.href:c.value=d;return}catch(d){c.issues.push({code:"invalid_format",format:"url",input:c.value,inst:a,continue:!b.abort})}}}),bK=m("$ZodEmoji",(a,b)=>{b.pattern??(b.pattern=ay()),bF.init(a,b)}),bL=m("$ZodNanoID",(a,b)=>{b.pattern??(b.pattern=ak),bF.init(a,b)}),bM=m("$ZodCUID",(a,b)=>{b.pattern??(b.pattern=af),bF.init(a,b)}),bN=m("$ZodCUID2",(a,b)=>{b.pattern??(b.pattern=ag),bF.init(a,b)}),bO=m("$ZodULID",(a,b)=>{b.pattern??(b.pattern=ah),bF.init(a,b)}),bP=m("$ZodXID",(a,b)=>{b.pattern??(b.pattern=ai),bF.init(a,b)}),bQ=m("$ZodKSUID",(a,b)=>{b.pattern??(b.pattern=aj),bF.init(a,b)}),bR=m("$ZodISODateTime",(a,b)=>{b.pattern??(b.pattern=aN(b)),bF.init(a,b)}),bS=m("$ZodISODate",(a,b)=>{b.pattern??(b.pattern=aK),bF.init(a,b)}),bT=m("$ZodISOTime",(a,b)=>{b.pattern??(b.pattern=aM(b)),bF.init(a,b)}),bU=m("$ZodISODuration",(a,b)=>{b.pattern??(b.pattern=al),bF.init(a,b)}),bV=m("$ZodIPv4",(a,b)=>{b.pattern??(b.pattern=az),bF.init(a,b),a._zod.bag.format="ipv4"}),bW=m("$ZodIPv6",(a,b)=>{b.pattern??(b.pattern=aA),bF.init(a,b),a._zod.bag.format="ipv6",a._zod.check=c=>{try{new URL(`http://[${c.value}]`)}catch{c.issues.push({code:"invalid_format",format:"ipv6",input:c.value,inst:a,continue:!b.abort})}}}),bX=m("$ZodMAC",(a,b)=>{b.pattern??(b.pattern=aB(b.delimiter)),bF.init(a,b),a._zod.bag.format="mac"}),bY=m("$ZodCIDRv4",(a,b)=>{b.pattern??(b.pattern=aC),bF.init(a,b)}),bZ=m("$ZodCIDRv6",(a,b)=>{b.pattern??(b.pattern=aD),bF.init(a,b),a._zod.check=c=>{let d=c.value.split("/");try{if(2!==d.length)throw Error();let[a,b]=d;if(!b)throw Error();let c=Number(b);if(`${c}`!==b||c<0||c>128)throw Error();new URL(`http://[${a}]`)}catch{c.issues.push({code:"invalid_format",format:"cidrv6",input:c.value,inst:a,continue:!b.abort})}}});function b$(a){if(""===a)return!0;if(a.length%4!=0)return!1;try{return atob(a),!0}catch{return!1}}let b_=m("$ZodBase64",(a,b)=>{b.pattern??(b.pattern=aE),bF.init(a,b),a._zod.bag.contentEncoding="base64",a._zod.check=c=>{b$(c.value)||c.issues.push({code:"invalid_format",format:"base64",input:c.value,inst:a,continue:!b.abort})}}),b0=m("$ZodBase64URL",(a,b)=>{b.pattern??(b.pattern=aF),bF.init(a,b),a._zod.bag.contentEncoding="base64url",a._zod.check=c=>{!function(a){if(!aF.test(a))return!1;let b=a.replace(/[-_]/g,a=>"-"===a?"+":"/");return b$(b.padEnd(4*Math.ceil(b.length/4),"="))}(c.value)&&c.issues.push({code:"invalid_format",format:"base64url",input:c.value,inst:a,continue:!b.abort})}}),b1=m("$ZodE164",(a,b)=>{b.pattern??(b.pattern=aI),bF.init(a,b)}),b2=m("$ZodJWT",(a,b)=>{bF.init(a,b),a._zod.check=c=>{!function(a,b=null){try{let c=a.split(".");if(3!==c.length)return!1;let[d]=c;if(!d)return!1;let e=JSON.parse(atob(d));if("typ"in e&&e?.typ!=="JWT"||!e.alg||b&&(!("alg"in e)||e.alg!==b))return!1;return!0}catch{return!1}}(c.value,b.alg)&&c.issues.push({code:"invalid_format",format:"jwt",input:c.value,inst:a,continue:!b.abort})}}),b3=m("$ZodCustomStringFormat",(a,b)=>{bF.init(a,b),a._zod.check=c=>{b.fn(c.value)||c.issues.push({code:"invalid_format",format:b.format,input:c.value,inst:a,continue:!b.abort})}}),b4=m("$ZodNumber",(a,b)=>{bD.init(a,b),a._zod.pattern=a._zod.bag.pattern??aR,a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=Number(c.value)}catch(a){}let e=c.value;if("number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e))return c;let f="number"==typeof e?Number.isNaN(e)?"NaN":Number.isFinite(e)?void 0:"Infinity":void 0;return c.issues.push({expected:"number",code:"invalid_type",input:e,inst:a,...f?{received:f}:{}}),c}}),b5=m("$ZodNumberFormat",(a,b)=>{bi.init(a,b),b4.init(a,b)}),b6=m("$ZodBoolean",(a,b)=>{bD.init(a,b),a._zod.pattern=aS,a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=!!c.value}catch(a){}let e=c.value;return"boolean"==typeof e||c.issues.push({expected:"boolean",code:"invalid_type",input:e,inst:a}),c}}),b7=m("$ZodBigInt",(a,b)=>{bD.init(a,b),a._zod.pattern=aP,a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=BigInt(c.value)}catch(a){}return"bigint"==typeof c.value||c.issues.push({expected:"bigint",code:"invalid_type",input:c.value,inst:a}),c}}),b8=m("$ZodBigIntFormat",(a,b)=>{bj.init(a,b),b7.init(a,b)}),b9=m("$ZodSymbol",(a,b)=>{bD.init(a,b),a._zod.parse=(b,c)=>{let d=b.value;return"symbol"==typeof d||b.issues.push({expected:"symbol",code:"invalid_type",input:d,inst:a}),b}}),ca=m("$ZodUndefined",(a,b)=>{bD.init(a,b),a._zod.pattern=aU,a._zod.values=new Set([void 0]),a._zod.optin="optional",a._zod.optout="optional",a._zod.parse=(b,c)=>{let d=b.value;return void 0===d||b.issues.push({expected:"undefined",code:"invalid_type",input:d,inst:a}),b}}),cb=m("$ZodNull",(a,b)=>{bD.init(a,b),a._zod.pattern=aT,a._zod.values=new Set([null]),a._zod.parse=(b,c)=>{let d=b.value;return null===d||b.issues.push({expected:"null",code:"invalid_type",input:d,inst:a}),b}}),cc=m("$ZodAny",(a,b)=>{bD.init(a,b),a._zod.parse=a=>a}),cd=m("$ZodUnknown",(a,b)=>{bD.init(a,b),a._zod.parse=a=>a}),ce=m("$ZodNever",(a,b)=>{bD.init(a,b),a._zod.parse=(b,c)=>(b.issues.push({expected:"never",code:"invalid_type",input:b.value,inst:a}),b)}),cf=m("$ZodVoid",(a,b)=>{bD.init(a,b),a._zod.parse=(b,c)=>{let d=b.value;return void 0===d||b.issues.push({expected:"void",code:"invalid_type",input:d,inst:a}),b}}),cg=m("$ZodDate",(a,b)=>{bD.init(a,b),a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=new Date(c.value)}catch(a){}let e=c.value,f=e instanceof Date;return f&&!Number.isNaN(e.getTime())||c.issues.push({expected:"date",code:"invalid_type",input:e,...f?{received:"Invalid Date"}:{},inst:a}),c}});function ch(a,b,c){a.issues.length&&b.issues.push(...Q(c,a.issues)),b.value[c]=a.value}let ci=m("$ZodArray",(a,b)=>{bD.init(a,b),a._zod.parse=(c,d)=>{let e=c.value;if(!Array.isArray(e))return c.issues.push({expected:"array",code:"invalid_type",input:e,inst:a}),c;c.value=Array(e.length);let f=[];for(let a=0;a<e.length;a++){let g=e[a],h=b.element._zod.run({value:g,issues:[]},d);h instanceof Promise?f.push(h.then(b=>ch(b,c,a))):ch(h,c,a)}return f.length?Promise.all(f).then(()=>c):c}});function cj(a,b,c,d,e){if(a.issues.length){if(e&&!(c in d))return;b.issues.push(...Q(c,a.issues))}void 0===a.value?c in d&&(b.value[c]=void 0):b.value[c]=a.value}function ck(a){var b;let c=Object.keys(a.shape);for(let b of c)if(!a.shape?.[b]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${b}": expected a Zod schema`);let d=Object.keys(b=a.shape).filter(a=>"optional"===b[a]._zod.optin&&"optional"===b[a]._zod.optout);return{...a,keys:c,keySet:new Set(c),numKeys:c.length,optionalKeys:new Set(d)}}function cl(a,b,c,d,e,f){let g=[],h=e.keySet,i=e.catchall._zod,j=i.def.type,k="optional"===i.optout;for(let e in b){if(h.has(e))continue;if("never"===j){g.push(e);continue}let f=i.run({value:b[e],issues:[]},d);f instanceof Promise?a.push(f.then(a=>cj(a,c,e,b,k))):cj(f,c,e,b,k)}return(g.length&&c.issues.push({code:"unrecognized_keys",keys:g,input:b,inst:f}),a.length)?Promise.all(a).then(()=>c):c}let cm=m("$ZodObject",(a,b)=>{let c;bD.init(a,b);let d=Object.getOwnPropertyDescriptor(b,"shape");if(!d?.get){let a=b.shape;Object.defineProperty(b,"shape",{get:()=>{let c={...a};return Object.defineProperty(b,"shape",{value:c}),c}})}let e=u(()=>ck(b));y(a._zod,"propValues",()=>{let a=b.shape,c={};for(let b in a){let d=a[b]._zod;if(d.values)for(let a of(c[b]??(c[b]=new Set),d.values))c[b].add(a)}return c});let f=b.catchall;a._zod.parse=(b,d)=>{c??(c=e.value);let g=b.value;if(!D(g))return b.issues.push({expected:"object",code:"invalid_type",input:g,inst:a}),b;b.value={};let h=[],i=c.shape;for(let a of c.keys){let c=i[a],e="optional"===c._zod.optout,f=c._zod.run({value:g[a],issues:[]},d);f instanceof Promise?h.push(f.then(c=>cj(c,b,a,g,e))):cj(f,b,a,g,e)}return f?cl(h,g,b,d,e.value,a):h.length?Promise.all(h).then(()=>b):b}}),cn=m("$ZodObjectJIT",(a,b)=>{let c,d;cm.init(a,b);let e=a._zod.parse,f=u(()=>ck(b)),g=!p.jitless,h=g&&E.value,i=b.catchall;a._zod.parse=(j,k)=>{d??(d=f.value);let l=j.value;return D(l)?g&&h&&k?.async===!1&&!0!==k.jitless?(c||(c=(a=>{let b=new bB(["shape","payload","ctx"]),c=f.value,d=a=>{let b=B(a);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};b.write("const input = payload.value;");let e=Object.create(null),g=0;for(let a of c.keys)e[a]=`key_${g++}`;for(let f of(b.write("const newResult = {};"),c.keys)){let c=e[f],g=B(f),h=a[f],i=h?._zod?.optout==="optional";b.write(`const ${c} = ${d(f)};`),i?b.write(`
|
|
2
2
|
if (${c}.issues.length) {
|
|
3
3
|
if (${g} in input) {
|
|
4
4
|
payload.issues = payload.issues.concat(${c}.issues.map(iss => ({
|
|
@@ -34,6 +34,8 @@ exports.id=3498,exports.ids=[3498],exports.modules={300:(a,b,c)=>{"use strict";c
|
|
|
34
34
|
|
|
35
35
|
`)}b.write("payload.value = newResult;"),b.write("return payload;");let h=b.compile();return(b,c)=>h(a,b,c)})(b.shape)),j=c(j,k),i)?cl([],l,j,k,d,a):j:e(j,k):(j.issues.push({expected:"object",code:"invalid_type",input:l,inst:a}),j)}});function co(a,b,c,d){for(let c of a)if(0===c.issues.length)return b.value=c.value,b;let e=a.filter(a=>!P(a));return 1===e.length?(b.value=e[0].value,e[0]):(b.issues.push({code:"invalid_union",input:b.value,inst:c,errors:a.map(a=>a.issues.map(a=>S(a,d,q())))}),b)}let cp=m("$ZodUnion",(a,b)=>{bD.init(a,b),y(a._zod,"optin",()=>b.options.some(a=>"optional"===a._zod.optin)?"optional":void 0),y(a._zod,"optout",()=>b.options.some(a=>"optional"===a._zod.optout)?"optional":void 0),y(a._zod,"values",()=>{if(b.options.every(a=>a._zod.values))return new Set(b.options.flatMap(a=>Array.from(a._zod.values)))}),y(a._zod,"pattern",()=>{if(b.options.every(a=>a._zod.pattern)){let a=b.options.map(a=>a._zod.pattern);return RegExp(`^(${a.map(a=>w(a.source)).join("|")})$`)}});let c=1===b.options.length,d=b.options[0]._zod.run;a._zod.parse=(e,f)=>{if(c)return d(e,f);let g=!1,h=[];for(let a of b.options){let b=a._zod.run({value:e.value,issues:[]},f);if(b instanceof Promise)h.push(b),g=!0;else{if(0===b.issues.length)return b;h.push(b)}}return g?Promise.all(h).then(b=>co(b,e,a,f)):co(h,e,a,f)}});function cq(a,b,c,d){let e=a.filter(a=>0===a.issues.length);return 1===e.length?b.value=e[0].value:0===e.length?b.issues.push({code:"invalid_union",input:b.value,inst:c,errors:a.map(a=>a.issues.map(a=>S(a,d,q())))}):b.issues.push({code:"invalid_union",input:b.value,inst:c,errors:[],inclusive:!1}),b}let cr=m("$ZodXor",(a,b)=>{cp.init(a,b),b.inclusive=!1;let c=1===b.options.length,d=b.options[0]._zod.run;a._zod.parse=(e,f)=>{if(c)return d(e,f);let g=!1,h=[];for(let a of b.options){let b=a._zod.run({value:e.value,issues:[]},f);b instanceof Promise?(h.push(b),g=!0):h.push(b)}return g?Promise.all(h).then(b=>cq(b,e,a,f)):cq(h,e,a,f)}}),cs=m("$ZodDiscriminatedUnion",(a,b)=>{b.inclusive=!1,cp.init(a,b);let c=a._zod.parse;y(a._zod,"propValues",()=>{let a={};for(let c of b.options){let d=c._zod.propValues;if(!d||0===Object.keys(d).length)throw Error(`Invalid discriminated union option at index "${b.options.indexOf(c)}"`);for(let[b,c]of Object.entries(d))for(let d of(a[b]||(a[b]=new Set),c))a[b].add(d)}return a});let d=u(()=>{let a=b.options,c=new Map;for(let d of a){let a=d._zod.propValues?.[b.discriminator];if(!a||0===a.size)throw Error(`Invalid discriminated union option at index "${b.options.indexOf(d)}"`);for(let b of a){if(c.has(b))throw Error(`Duplicate discriminator value "${String(b)}"`);c.set(b,d)}}return c});a._zod.parse=(e,f)=>{let g=e.value;if(!D(g))return e.issues.push({code:"invalid_type",expected:"object",input:g,inst:a}),e;let h=d.value.get(g?.[b.discriminator]);return h?h._zod.run(e,f):b.unionFallback?c(e,f):(e.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:b.discriminator,input:g,path:[b.discriminator],inst:a}),e)}}),ct=m("$ZodIntersection",(a,b)=>{bD.init(a,b),a._zod.parse=(a,c)=>{let d=a.value,e=b.left._zod.run({value:d,issues:[]},c),f=b.right._zod.run({value:d,issues:[]},c);return e instanceof Promise||f instanceof Promise?Promise.all([e,f]).then(([b,c])=>cu(a,b,c)):cu(a,e,f)}});function cu(a,b,c){let d,e=new Map;for(let c of b.issues)if("unrecognized_keys"===c.code)for(let a of(d??(d=c),c.keys))e.has(a)||e.set(a,{}),e.get(a).l=!0;else a.issues.push(c);for(let b of c.issues)if("unrecognized_keys"===b.code)for(let a of b.keys)e.has(a)||e.set(a,{}),e.get(a).r=!0;else a.issues.push(b);let f=[...e].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(f.length&&d&&a.issues.push({...d,keys:f}),P(a))return a;let g=function a(b,c){if(b===c||b instanceof Date&&c instanceof Date&&+b==+c)return{valid:!0,data:b};if(F(b)&&F(c)){let d=Object.keys(c),e=Object.keys(b).filter(a=>-1!==d.indexOf(a)),f={...b,...c};for(let d of e){let e=a(b[d],c[d]);if(!e.valid)return{valid:!1,mergeErrorPath:[d,...e.mergeErrorPath]};f[d]=e.data}return{valid:!0,data:f}}if(Array.isArray(b)&&Array.isArray(c)){if(b.length!==c.length)return{valid:!1,mergeErrorPath:[]};let d=[];for(let e=0;e<b.length;e++){let f=a(b[e],c[e]);if(!f.valid)return{valid:!1,mergeErrorPath:[e,...f.mergeErrorPath]};d.push(f.data)}return{valid:!0,data:d}}return{valid:!1,mergeErrorPath:[]}}(b.value,c.value);if(!g.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(g.mergeErrorPath)}`);return a.value=g.data,a}let cv=m("$ZodTuple",(a,b)=>{bD.init(a,b);let c=b.items;a._zod.parse=(d,e)=>{let f=d.value;if(!Array.isArray(f))return d.issues.push({input:f,inst:a,expected:"tuple",code:"invalid_type"}),d;d.value=[];let g=[],h=[...c].reverse().findIndex(a=>"optional"!==a._zod.optin),i=-1===h?0:c.length-h;if(!b.rest){let b=f.length>c.length,e=f.length<i-1;if(b||e)return d.issues.push({...b?{code:"too_big",maximum:c.length,inclusive:!0}:{code:"too_small",minimum:c.length},input:f,inst:a,origin:"array"}),d}let j=-1;for(let a of c){if(++j>=f.length&&j>=i)continue;let b=a._zod.run({value:f[j],issues:[]},e);b instanceof Promise?g.push(b.then(a=>cw(a,d,j))):cw(b,d,j)}if(b.rest)for(let a of f.slice(c.length)){j++;let c=b.rest._zod.run({value:a,issues:[]},e);c instanceof Promise?g.push(c.then(a=>cw(a,d,j))):cw(c,d,j)}return g.length?Promise.all(g).then(()=>d):d}});function cw(a,b,c){a.issues.length&&b.issues.push(...Q(c,a.issues)),b.value[c]=a.value}let cx=m("$ZodRecord",(a,b)=>{bD.init(a,b),a._zod.parse=(c,d)=>{let e=c.value;if(!F(e))return c.issues.push({expected:"record",code:"invalid_type",input:e,inst:a}),c;let f=[],g=b.keyType._zod.values;if(g){let h;c.value={};let i=new Set;for(let a of g)if("string"==typeof a||"number"==typeof a||"symbol"==typeof a){i.add("number"==typeof a?a.toString():a);let g=b.valueType._zod.run({value:e[a],issues:[]},d);g instanceof Promise?f.push(g.then(b=>{b.issues.length&&c.issues.push(...Q(a,b.issues)),c.value[a]=b.value})):(g.issues.length&&c.issues.push(...Q(a,g.issues)),c.value[a]=g.value)}for(let a in e)i.has(a)||(h=h??[]).push(a);h&&h.length>0&&c.issues.push({code:"unrecognized_keys",input:e,inst:a,keys:h})}else for(let g of(c.value={},Reflect.ownKeys(e))){if("__proto__"===g)continue;let h=b.keyType._zod.run({value:g,issues:[]},d);if(h instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof g&&aR.test(g)&&h.issues.length){let a=b.keyType._zod.run({value:Number(g),issues:[]},d);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===a.issues.length&&(h=a)}if(h.issues.length){"loose"===b.mode?c.value[g]=e[g]:c.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(a=>S(a,d,q())),input:g,path:[g],inst:a});continue}let i=b.valueType._zod.run({value:e[g],issues:[]},d);i instanceof Promise?f.push(i.then(a=>{a.issues.length&&c.issues.push(...Q(g,a.issues)),c.value[h.value]=a.value})):(i.issues.length&&c.issues.push(...Q(g,i.issues)),c.value[h.value]=i.value)}return f.length?Promise.all(f).then(()=>c):c}}),cy=m("$ZodMap",(a,b)=>{bD.init(a,b),a._zod.parse=(c,d)=>{let e=c.value;if(!(e instanceof Map))return c.issues.push({expected:"map",code:"invalid_type",input:e,inst:a}),c;let f=[];for(let[g,h]of(c.value=new Map,e)){let i=b.keyType._zod.run({value:g,issues:[]},d),j=b.valueType._zod.run({value:h,issues:[]},d);i instanceof Promise||j instanceof Promise?f.push(Promise.all([i,j]).then(([b,f])=>{cz(b,f,c,g,e,a,d)})):cz(i,j,c,g,e,a,d)}return f.length?Promise.all(f).then(()=>c):c}});function cz(a,b,c,d,e,f,g){a.issues.length&&(H.has(typeof d)?c.issues.push(...Q(d,a.issues)):c.issues.push({code:"invalid_key",origin:"map",input:e,inst:f,issues:a.issues.map(a=>S(a,g,q()))})),b.issues.length&&(H.has(typeof d)?c.issues.push(...Q(d,b.issues)):c.issues.push({origin:"map",code:"invalid_element",input:e,inst:f,key:d,issues:b.issues.map(a=>S(a,g,q()))})),c.value.set(a.value,b.value)}let cA=m("$ZodSet",(a,b)=>{bD.init(a,b),a._zod.parse=(c,d)=>{let e=c.value;if(!(e instanceof Set))return c.issues.push({input:e,inst:a,expected:"set",code:"invalid_type"}),c;let f=[];for(let a of(c.value=new Set,e)){let e=b.valueType._zod.run({value:a,issues:[]},d);e instanceof Promise?f.push(e.then(a=>cB(a,c))):cB(e,c)}return f.length?Promise.all(f).then(()=>c):c}});function cB(a,b){a.issues.length&&b.issues.push(...a.issues),b.value.add(a.value)}let cC=m("$ZodEnum",(a,b)=>{bD.init(a,b);let c=r(b.entries),d=new Set(c);a._zod.values=d,a._zod.pattern=RegExp(`^(${c.filter(a=>H.has(typeof a)).map(a=>"string"==typeof a?J(a):a.toString()).join("|")})$`),a._zod.parse=(b,e)=>{let f=b.value;return d.has(f)||b.issues.push({code:"invalid_value",values:c,input:f,inst:a}),b}}),cD=m("$ZodLiteral",(a,b)=>{if(bD.init(a,b),0===b.values.length)throw Error("Cannot create literal schema with no valid values");let c=new Set(b.values);a._zod.values=c,a._zod.pattern=RegExp(`^(${b.values.map(a=>"string"==typeof a?J(a):a?J(a.toString()):String(a)).join("|")})$`),a._zod.parse=(d,e)=>{let f=d.value;return c.has(f)||d.issues.push({code:"invalid_value",values:b.values,input:f,inst:a}),d}}),cE=m("$ZodFile",(a,b)=>{bD.init(a,b),a._zod.parse=(b,c)=>{let d=b.value;return d instanceof File||b.issues.push({expected:"file",code:"invalid_type",input:d,inst:a}),b}}),cF=m("$ZodTransform",(a,b)=>{bD.init(a,b),a._zod.parse=(c,d)=>{if("backward"===d.direction)throw new o(a.constructor.name);let e=b.transform(c.value,c);if(d.async)return(e instanceof Promise?e:Promise.resolve(e)).then(a=>(c.value=a,c));if(e instanceof Promise)throw new n;return c.value=e,c}});function cG(a,b){return a.issues.length&&void 0===b?{issues:[],value:void 0}:a}let cH=m("$ZodOptional",(a,b)=>{bD.init(a,b),a._zod.optin="optional",a._zod.optout="optional",y(a._zod,"values",()=>b.innerType._zod.values?new Set([...b.innerType._zod.values,void 0]):void 0),y(a._zod,"pattern",()=>{let a=b.innerType._zod.pattern;return a?RegExp(`^(${w(a.source)})?$`):void 0}),a._zod.parse=(a,c)=>{if("optional"===b.innerType._zod.optin){let d=b.innerType._zod.run(a,c);return d instanceof Promise?d.then(b=>cG(b,a.value)):cG(d,a.value)}return void 0===a.value?a:b.innerType._zod.run(a,c)}}),cI=m("$ZodExactOptional",(a,b)=>{cH.init(a,b),y(a._zod,"values",()=>b.innerType._zod.values),y(a._zod,"pattern",()=>b.innerType._zod.pattern),a._zod.parse=(a,c)=>b.innerType._zod.run(a,c)}),cJ=m("$ZodNullable",(a,b)=>{bD.init(a,b),y(a._zod,"optin",()=>b.innerType._zod.optin),y(a._zod,"optout",()=>b.innerType._zod.optout),y(a._zod,"pattern",()=>{let a=b.innerType._zod.pattern;return a?RegExp(`^(${w(a.source)}|null)$`):void 0}),y(a._zod,"values",()=>b.innerType._zod.values?new Set([...b.innerType._zod.values,null]):void 0),a._zod.parse=(a,c)=>null===a.value?a:b.innerType._zod.run(a,c)}),cK=m("$ZodDefault",(a,b)=>{bD.init(a,b),a._zod.optin="optional",y(a._zod,"values",()=>b.innerType._zod.values),a._zod.parse=(a,c)=>{if("backward"===c.direction)return b.innerType._zod.run(a,c);if(void 0===a.value)return a.value=b.defaultValue,a;let d=b.innerType._zod.run(a,c);return d instanceof Promise?d.then(a=>cL(a,b)):cL(d,b)}});function cL(a,b){return void 0===a.value&&(a.value=b.defaultValue),a}let cM=m("$ZodPrefault",(a,b)=>{bD.init(a,b),a._zod.optin="optional",y(a._zod,"values",()=>b.innerType._zod.values),a._zod.parse=(a,c)=>("backward"===c.direction||void 0===a.value&&(a.value=b.defaultValue),b.innerType._zod.run(a,c))}),cN=m("$ZodNonOptional",(a,b)=>{bD.init(a,b),y(a._zod,"values",()=>{let a=b.innerType._zod.values;return a?new Set([...a].filter(a=>void 0!==a)):void 0}),a._zod.parse=(c,d)=>{let e=b.innerType._zod.run(c,d);return e instanceof Promise?e.then(b=>cO(b,a)):cO(e,a)}});function cO(a,b){return a.issues.length||void 0!==a.value||a.issues.push({code:"invalid_type",expected:"nonoptional",input:a.value,inst:b}),a}let cP=m("$ZodSuccess",(a,b)=>{bD.init(a,b),a._zod.parse=(a,c)=>{if("backward"===c.direction)throw new o("ZodSuccess");let d=b.innerType._zod.run(a,c);return d instanceof Promise?d.then(b=>(a.value=0===b.issues.length,a)):(a.value=0===d.issues.length,a)}}),cQ=m("$ZodCatch",(a,b)=>{bD.init(a,b),y(a._zod,"optin",()=>b.innerType._zod.optin),y(a._zod,"optout",()=>b.innerType._zod.optout),y(a._zod,"values",()=>b.innerType._zod.values),a._zod.parse=(a,c)=>{if("backward"===c.direction)return b.innerType._zod.run(a,c);let d=b.innerType._zod.run(a,c);return d instanceof Promise?d.then(d=>(a.value=d.value,d.issues.length&&(a.value=b.catchValue({...a,error:{issues:d.issues.map(a=>S(a,c,q()))},input:a.value}),a.issues=[]),a)):(a.value=d.value,d.issues.length&&(a.value=b.catchValue({...a,error:{issues:d.issues.map(a=>S(a,c,q()))},input:a.value}),a.issues=[]),a)}}),cR=m("$ZodNaN",(a,b)=>{bD.init(a,b),a._zod.parse=(b,c)=>("number"==typeof b.value&&Number.isNaN(b.value)||b.issues.push({input:b.value,inst:a,expected:"nan",code:"invalid_type"}),b)}),cS=m("$ZodPipe",(a,b)=>{bD.init(a,b),y(a._zod,"values",()=>b.in._zod.values),y(a._zod,"optin",()=>b.in._zod.optin),y(a._zod,"optout",()=>b.out._zod.optout),y(a._zod,"propValues",()=>b.in._zod.propValues),a._zod.parse=(a,c)=>{if("backward"===c.direction){let d=b.out._zod.run(a,c);return d instanceof Promise?d.then(a=>cT(a,b.in,c)):cT(d,b.in,c)}let d=b.in._zod.run(a,c);return d instanceof Promise?d.then(a=>cT(a,b.out,c)):cT(d,b.out,c)}});function cT(a,b,c){return a.issues.length?(a.aborted=!0,a):b._zod.run({value:a.value,issues:a.issues},c)}let cU=m("$ZodCodec",(a,b)=>{bD.init(a,b),y(a._zod,"values",()=>b.in._zod.values),y(a._zod,"optin",()=>b.in._zod.optin),y(a._zod,"optout",()=>b.out._zod.optout),y(a._zod,"propValues",()=>b.in._zod.propValues),a._zod.parse=(a,c)=>{if("forward"===(c.direction||"forward")){let d=b.in._zod.run(a,c);return d instanceof Promise?d.then(a=>cV(a,b,c)):cV(d,b,c)}{let d=b.out._zod.run(a,c);return d instanceof Promise?d.then(a=>cV(a,b,c)):cV(d,b,c)}}});function cV(a,b,c){if(a.issues.length)return a.aborted=!0,a;if("forward"===(c.direction||"forward")){let d=b.transform(a.value,a);return d instanceof Promise?d.then(d=>cW(a,d,b.out,c)):cW(a,d,b.out,c)}{let d=b.reverseTransform(a.value,a);return d instanceof Promise?d.then(d=>cW(a,d,b.in,c)):cW(a,d,b.in,c)}}function cW(a,b,c,d){return a.issues.length?(a.aborted=!0,a):c._zod.run({value:b,issues:a.issues},d)}let cX=m("$ZodReadonly",(a,b)=>{bD.init(a,b),y(a._zod,"propValues",()=>b.innerType._zod.propValues),y(a._zod,"values",()=>b.innerType._zod.values),y(a._zod,"optin",()=>b.innerType?._zod?.optin),y(a._zod,"optout",()=>b.innerType?._zod?.optout),a._zod.parse=(a,c)=>{if("backward"===c.direction)return b.innerType._zod.run(a,c);let d=b.innerType._zod.run(a,c);return d instanceof Promise?d.then(cY):cY(d)}});function cY(a){return a.value=Object.freeze(a.value),a}let cZ=m("$ZodTemplateLiteral",(a,b)=>{bD.init(a,b);let c=[];for(let a of b.parts)if("object"==typeof a&&null!==a){if(!a._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...a._zod.traits].shift()}`);let b=a._zod.pattern instanceof RegExp?a._zod.pattern.source:a._zod.pattern;if(!b)throw Error(`Invalid template literal part: ${a._zod.traits}`);let d=+!!b.startsWith("^"),e=b.endsWith("$")?b.length-1:b.length;c.push(b.slice(d,e))}else if(null===a||I.has(typeof a))c.push(J(`${a}`));else throw Error(`Invalid template literal part: ${a}`);a._zod.pattern=RegExp(`^${c.join("")}$`),a._zod.parse=(c,d)=>("string"!=typeof c.value?c.issues.push({input:c.value,inst:a,expected:"string",code:"invalid_type"}):(a._zod.pattern.lastIndex=0,a._zod.pattern.test(c.value)||c.issues.push({input:c.value,inst:a,code:"invalid_format",format:b.format??"template_literal",pattern:a._zod.pattern.source})),c)}),c$=m("$ZodFunction",(a,b)=>(bD.init(a,b),a._def=b,a._zod.def=b,a.implement=b=>{if("function"!=typeof b)throw Error("implement() must be called with a function");return function(...c){let d=Reflect.apply(b,this,a._def.input?$(a._def.input,c):c);return a._def.output?$(a._def.output,d):d}},a.implementAsync=b=>{if("function"!=typeof b)throw Error("implementAsync() must be called with a function");return async function(...c){let d=a._def.input?await aa(a._def.input,c):c,e=await Reflect.apply(b,this,d);return a._def.output?await aa(a._def.output,e):e}},a._zod.parse=(b,c)=>("function"!=typeof b.value?b.issues.push({code:"invalid_type",expected:"function",input:b.value,inst:a}):a._def.output&&"promise"===a._def.output._zod.def.type?b.value=a.implementAsync(b.value):b.value=a.implement(b.value),b),a.input=(...b)=>{let c=a.constructor;return new c(Array.isArray(b[0])?{type:"function",input:new cv({type:"tuple",items:b[0],rest:b[1]}),output:a._def.output}:{type:"function",input:b[0],output:a._def.output})},a.output=b=>new a.constructor({type:"function",input:a._def.input,output:b}),a)),c_=m("$ZodPromise",(a,b)=>{bD.init(a,b),a._zod.parse=(a,c)=>Promise.resolve(a.value).then(a=>b.innerType._zod.run({value:a,issues:[]},c))}),c0=m("$ZodLazy",(a,b)=>{bD.init(a,b),y(a._zod,"innerType",()=>b.getter()),y(a._zod,"pattern",()=>a._zod.innerType?._zod?.pattern),y(a._zod,"propValues",()=>a._zod.innerType?._zod?.propValues),y(a._zod,"optin",()=>a._zod.innerType?._zod?.optin??void 0),y(a._zod,"optout",()=>a._zod.innerType?._zod?.optout??void 0),a._zod.parse=(b,c)=>a._zod.innerType._zod.run(b,c)}),c1=m("$ZodCustom",(a,b)=>{bd.init(a,b),bD.init(a,b),a._zod.parse=(a,b)=>a,a._zod.check=c=>{let d=c.value,e=b.fn(d);if(e instanceof Promise)return e.then(b=>c2(b,c,d,a));c2(e,c,d,a)}});function c2(a,b,c,d){if(!a){let a={code:"custom",input:c,inst:d,path:[...d._zod.def.path??[]],continue:!d._zod.def.abort};d._zod.def.params&&(a.params=d._zod.def.params),b.issues.push(V(a))}}Symbol("ZodOutput"),Symbol("ZodInput");class c3{constructor(){this._map=new WeakMap,this._idmap=new Map}add(a,...b){let c=b[0];return this._map.set(a,c),c&&"object"==typeof c&&"id"in c&&this._idmap.set(c.id,a),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(a){let b=this._map.get(a);return b&&"object"==typeof b&&"id"in b&&this._idmap.delete(b.id),this._map.delete(a),this}get(a){let b=a._zod.parent;if(b){let c={...this.get(b)??{}};delete c.id;let d={...c,...this._map.get(a)};return Object.keys(d).length?d:void 0}return this._map.get(a)}has(a){return this._map.has(a)}}(g=globalThis).__zod_globalRegistry??(g.__zod_globalRegistry=new c3);let c4=globalThis.__zod_globalRegistry;function c5(a,b){return new a({type:"string",format:"email",check:"string_format",abort:!1,...L(b)})}function c6(a,b){return new a({type:"string",format:"guid",check:"string_format",abort:!1,...L(b)})}function c7(a,b){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,...L(b)})}function c8(a,b){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...L(b)})}function c9(a,b){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...L(b)})}function da(a,b){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...L(b)})}function db(a,b){return new a({type:"string",format:"url",check:"string_format",abort:!1,...L(b)})}function dc(a,b){return new a({type:"string",format:"emoji",check:"string_format",abort:!1,...L(b)})}function dd(a,b){return new a({type:"string",format:"nanoid",check:"string_format",abort:!1,...L(b)})}function de(a,b){return new a({type:"string",format:"cuid",check:"string_format",abort:!1,...L(b)})}function df(a,b){return new a({type:"string",format:"cuid2",check:"string_format",abort:!1,...L(b)})}function dg(a,b){return new a({type:"string",format:"ulid",check:"string_format",abort:!1,...L(b)})}function dh(a,b){return new a({type:"string",format:"xid",check:"string_format",abort:!1,...L(b)})}function di(a,b){return new a({type:"string",format:"ksuid",check:"string_format",abort:!1,...L(b)})}function dj(a,b){return new a({type:"string",format:"ipv4",check:"string_format",abort:!1,...L(b)})}function dk(a,b){return new a({type:"string",format:"ipv6",check:"string_format",abort:!1,...L(b)})}function dl(a,b){return new a({type:"string",format:"cidrv4",check:"string_format",abort:!1,...L(b)})}function dm(a,b){return new a({type:"string",format:"cidrv6",check:"string_format",abort:!1,...L(b)})}function dn(a,b){return new a({type:"string",format:"base64",check:"string_format",abort:!1,...L(b)})}function dp(a,b){return new a({type:"string",format:"base64url",check:"string_format",abort:!1,...L(b)})}function dq(a,b){return new a({type:"string",format:"e164",check:"string_format",abort:!1,...L(b)})}function dr(a,b){return new a({type:"string",format:"jwt",check:"string_format",abort:!1,...L(b)})}function ds(a,b){return new bf({check:"less_than",...L(b),value:a,inclusive:!1})}function dt(a,b){return new bf({check:"less_than",...L(b),value:a,inclusive:!0})}function du(a,b){return new bg({check:"greater_than",...L(b),value:a,inclusive:!1})}function dv(a,b){return new bg({check:"greater_than",...L(b),value:a,inclusive:!0})}function dw(a){return du(0,a)}function dx(a){return ds(0,a)}function dy(a){return dt(0,a)}function dz(a){return dv(0,a)}function dA(a,b){return new bh({check:"multiple_of",...L(b),value:a})}function dB(a,b){return new bk({check:"max_size",...L(b),maximum:a})}function dC(a,b){return new bl({check:"min_size",...L(b),minimum:a})}function dD(a,b){return new bm({check:"size_equals",...L(b),size:a})}function dE(a,b){return new bn({check:"max_length",...L(b),maximum:a})}function dF(a,b){return new bo({check:"min_length",...L(b),minimum:a})}function dG(a,b){return new bp({check:"length_equals",...L(b),length:a})}function dH(a,b){return new br({check:"string_format",format:"regex",...L(b),pattern:a})}function dI(a){return new bs({check:"string_format",format:"lowercase",...L(a)})}function dJ(a){return new bt({check:"string_format",format:"uppercase",...L(a)})}function dK(a,b){return new bu({check:"string_format",format:"includes",...L(b),includes:a})}function dL(a,b){return new bv({check:"string_format",format:"starts_with",...L(b),prefix:a})}function dM(a,b){return new bw({check:"string_format",format:"ends_with",...L(b),suffix:a})}function dN(a,b,c){return new by({check:"property",property:a,schema:b,...L(c)})}function dO(a,b){return new bz({check:"mime_type",mime:a,...L(b)})}function dP(a){return new bA({check:"overwrite",tx:a})}function dQ(a){return dP(b=>b.normalize(a))}function dR(){return dP(a=>a.trim())}function dS(){return dP(a=>a.toLowerCase())}function dT(){return dP(a=>a.toUpperCase())}function dU(){return dP(a=>a.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,""))}function dV(a,b,c,d={}){let e=L(d),f={...L(d),check:"string_format",type:"string",format:b,fn:"function"==typeof c?c:a=>c.test(a),...e};return c instanceof RegExp&&(f.pattern=c),new a(f)}function dW(a){let b=a?.target??"draft-2020-12";return"draft-4"===b&&(b="draft-04"),"draft-7"===b&&(b="draft-07"),{processors:a.processors??{},metadataRegistry:a?.metadata??c4,target:b,unrepresentable:a?.unrepresentable??"throw",override:a?.override??(()=>{}),io:a?.io??"output",counter:0,seen:new Map,cycles:a?.cycles??"ref",reused:a?.reused??"inline",external:a?.external??void 0}}function dX(a,b,c={path:[],schemaPath:[]}){var d;let e=a._zod.def,f=b.seen.get(a);if(f)return f.count++,c.schemaPath.includes(a)&&(f.cycle=c.path),f.schema;let g={schema:{},count:1,cycle:void 0,path:c.path};b.seen.set(a,g);let h=a._zod.toJSONSchema?.();if(h)g.schema=h;else{let d={...c,schemaPath:[...c.schemaPath,a],path:c.path};if(a._zod.processJSONSchema)a._zod.processJSONSchema(b,g.schema,d);else{let c=g.schema,f=b.processors[e.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${e.type}`);f(a,b,c,d)}let f=a._zod.parent;f&&(g.ref||(g.ref=f),dX(f,b,d),b.seen.get(f).isParent=!0)}let i=b.metadataRegistry.get(a);return i&&Object.assign(g.schema,i),"input"===b.io&&function a(b,c){let d=c??{seen:new Set};if(d.seen.has(b))return!1;d.seen.add(b);let e=b._zod.def;if("transform"===e.type)return!0;if("array"===e.type)return a(e.element,d);if("set"===e.type)return a(e.valueType,d);if("lazy"===e.type)return a(e.getter(),d);if("promise"===e.type||"optional"===e.type||"nonoptional"===e.type||"nullable"===e.type||"readonly"===e.type||"default"===e.type||"prefault"===e.type)return a(e.innerType,d);if("intersection"===e.type)return a(e.left,d)||a(e.right,d);if("record"===e.type||"map"===e.type)return a(e.keyType,d)||a(e.valueType,d);if("pipe"===e.type)return a(e.in,d)||a(e.out,d);if("object"===e.type){for(let b in e.shape)if(a(e.shape[b],d))return!0;return!1}if("union"===e.type){for(let b of e.options)if(a(b,d))return!0;return!1}if("tuple"===e.type){for(let b of e.items)if(a(b,d))return!0;if(e.rest&&a(e.rest,d))return!0}return!1}(a)&&(delete g.schema.examples,delete g.schema.default),"input"===b.io&&g.schema._prefault&&((d=g.schema).default??(d.default=g.schema._prefault)),delete g.schema._prefault,b.seen.get(a).schema}function dY(a,b){let c=a.seen.get(b);if(!c)throw Error("Unprocessed schema. This is a bug in Zod.");let d=new Map;for(let b of a.seen.entries()){let c=a.metadataRegistry.get(b[0])?.id;if(c){let a=d.get(c);if(a&&a!==b[0])throw Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);d.set(c,b[0])}}let e=b=>{if(b[1].schema.$ref)return;let d=b[1],{ref:e,defId:f}=(b=>{let d="draft-2020-12"===a.target?"$defs":"definitions";if(a.external){let c=a.external.registry.get(b[0])?.id,e=a.external.uri??(a=>a);if(c)return{ref:e(c)};let f=b[1].defId??b[1].schema.id??`schema${a.counter++}`;return b[1].defId=f,{defId:f,ref:`${e("__shared")}#/${d}/${f}`}}if(b[1]===c)return{ref:"#"};let e=`#/${d}/`,f=b[1].schema.id??`__schema${a.counter++}`;return{defId:f,ref:e+f}})(b);d.def={...d.schema},f&&(d.defId=f);let g=d.schema;for(let a in g)delete g[a];g.$ref=e};if("throw"===a.cycles)for(let b of a.seen.entries()){let a=b[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
36
36
|
|
|
37
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let c of a.seen.entries()){let d=c[1];if(b===c[0]){e(c);continue}if(a.external){let d=a.external.registry.get(c[0])?.id;if(b!==c[0]&&d){e(c);continue}}if(a.metadataRegistry.get(c[0])?.id||d.cycle||d.count>1&&"ref"===a.reused){e(c);continue}}}function dZ(a,b){let c=a.seen.get(b);if(!c)throw Error("Unprocessed schema. This is a bug in Zod.");let d=b=>{let c=a.seen.get(b);if(null===c.ref)return;let e=c.def??c.schema,f={...e},g=c.ref;if(c.ref=null,g){d(g);let c=a.seen.get(g),h=c.schema;if(h.$ref&&("draft-07"===a.target||"draft-04"===a.target||"openapi-3.0"===a.target)?(e.allOf=e.allOf??[],e.allOf.push(h)):Object.assign(e,h),Object.assign(e,f),b._zod.parent===g)for(let a in e)"$ref"!==a&&"allOf"!==a&&(a in f||delete e[a]);if(h.$ref&&c.def)for(let a in e)"$ref"!==a&&"allOf"!==a&&a in c.def&&JSON.stringify(e[a])===JSON.stringify(c.def[a])&&delete e[a]}let h=b._zod.parent;if(h&&h!==g){d(h);let b=a.seen.get(h);if(b?.schema.$ref&&(e.$ref=b.schema.$ref,b.def))for(let a in e)"$ref"!==a&&"allOf"!==a&&a in b.def&&JSON.stringify(e[a])===JSON.stringify(b.def[a])&&delete e[a]}a.override({zodSchema:b,jsonSchema:e,path:c.path??[]})};for(let b of[...a.seen.entries()].reverse())d(b[0]);let e={};if("draft-2020-12"===a.target?e.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===a.target?e.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===a.target?e.$schema="http://json-schema.org/draft-04/schema#":a.target,a.external?.uri){let c=a.external.registry.get(b)?.id;if(!c)throw Error("Schema is missing an `id` property");e.$id=a.external.uri(c)}Object.assign(e,c.def??c.schema);let f=a.external?.defs??{};for(let b of a.seen.entries()){let a=b[1];a.def&&a.defId&&(f[a.defId]=a.def)}a.external||Object.keys(f).length>0&&("draft-2020-12"===a.target?e.$defs=f:e.definitions=f);try{let c=JSON.parse(JSON.stringify(e));return Object.defineProperty(c,"~standard",{value:{...b["~standard"],jsonSchema:{input:d$(b,"input",a.processors),output:d$(b,"output",a.processors)}},enumerable:!1,writable:!1}),c}catch(a){throw Error("Error converting schema to JSON.")}}let d$=(a,b,c={})=>d=>{let{libraryOptions:e,target:f}=d??{},g=dW({...e??{},target:f,io:b,processors:c});return dX(a,g),dY(g,a),dZ(g,a)},d_={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},d0=(a,b,c,d)=>{let e=a._zod.def,f=!1===e.inclusive,g=e.options.map((a,c)=>dX(a,b,{...d,path:[...d.path,f?"oneOf":"anyOf",c]}));f?c.oneOf=g:c.anyOf=g},d1=(a,b,c,d)=>{let e=a._zod.def;dX(e.innerType,b,d),b.seen.get(a).ref=e.innerType},d2=m("ZodISODateTime",(a,b)=>{bR.init(a,b),es.init(a,b)});function d3(a){return new d2({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...L(a)})}let d4=m("ZodISODate",(a,b)=>{bS.init(a,b),es.init(a,b)});function d5(a){return new d4({type:"string",format:"date",check:"string_format",...L(a)})}let d6=m("ZodISOTime",(a,b)=>{bT.init(a,b),es.init(a,b)});function d7(a){return new d6({type:"string",format:"time",check:"string_format",precision:null,...L(a)})}let d8=m("ZodISODuration",(a,b)=>{bU.init(a,b),es.init(a,b)});function d9(a){return new d8({type:"string",format:"duration",check:"string_format",...L(a)})}let ea=(a,b)=>{X.init(a,b),a.name="ZodError",Object.defineProperties(a,{format:{value:b=>(function(a,b=a=>a.message){let c={_errors:[]},d=a=>{for(let e of a.issues)if("invalid_union"===e.code&&e.errors.length)e.errors.map(a=>d({issues:a}));else if("invalid_key"===e.code)d({issues:e.issues});else if("invalid_element"===e.code)d({issues:e.issues});else if(0===e.path.length)c._errors.push(b(e));else{let a=c,d=0;for(;d<e.path.length;){let c=e.path[d];d===e.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(b(e))):a[c]=a[c]||{_errors:[]},a=a[c],d++}}};return d(a),c})(a,b)},flatten:{value:b=>(function(a,b=a=>a.message){let c={},d=[];for(let e of a.issues)e.path.length>0?(c[e.path[0]]=c[e.path[0]]||[],c[e.path[0]].push(b(e))):d.push(b(e));return{formErrors:d,fieldErrors:c}})(a,b)},addIssue:{value:b=>{a.issues.push(b),a.message=JSON.stringify(a.issues,t,2)}},addIssues:{value:b=>{a.issues.push(...b),a.message=JSON.stringify(a.issues,t,2)}},isEmpty:{get:()=>0===a.issues.length}})};m("ZodError",ea);let eb=m("ZodError",ea,{Parent:Error}),ec=Z(eb),ed=_(eb),ee=ab(eb),ef=ad(eb),eg=(a,b,c)=>{let d=c?Object.assign(c,{direction:"backward"}):{direction:"backward"};return Z(eb)(a,b,d)},eh=(a,b,c)=>Z(eb)(a,b,c),ei=async(a,b,c)=>{let d=c?Object.assign(c,{direction:"backward"}):{direction:"backward"};return _(eb)(a,b,d)},ej=async(a,b,c)=>_(eb)(a,b,c),ek=(a,b,c)=>{let d=c?Object.assign(c,{direction:"backward"}):{direction:"backward"};return ab(eb)(a,b,d)},el=(a,b,c)=>ab(eb)(a,b,c),em=async(a,b,c)=>{let d=c?Object.assign(c,{direction:"backward"}):{direction:"backward"};return ad(eb)(a,b,d)},en=async(a,b,c)=>ad(eb)(a,b,c),eo=m("ZodType",(a,b)=>(bD.init(a,b),Object.assign(a["~standard"],{jsonSchema:{input:d$(a,"input"),output:d$(a,"output")}}),a.toJSONSchema=((a,b={})=>c=>{let d=dW({...c,processors:b});return dX(a,d),dY(d,a),dZ(d,a)})(a,{}),a.def=b,a.type=b.type,Object.defineProperty(a,"_def",{value:b}),a.check=(...c)=>a.clone(A(b,{checks:[...b.checks??[],...c.map(a=>"function"==typeof a?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),a.with=a.check,a.clone=(b,c)=>K(a,b,c),a.brand=()=>a,a.register=(b,c)=>(b.add(a,c),a),a.parse=(b,c)=>ec(a,b,c,{callee:a.parse}),a.safeParse=(b,c)=>ee(a,b,c),a.parseAsync=async(b,c)=>ed(a,b,c,{callee:a.parseAsync}),a.safeParseAsync=async(b,c)=>ef(a,b,c),a.spa=a.safeParseAsync,a.encode=(b,c)=>eg(a,b,c),a.decode=(b,c)=>eh(a,b,c),a.encodeAsync=async(b,c)=>ei(a,b,c),a.decodeAsync=async(b,c)=>ej(a,b,c),a.safeEncode=(b,c)=>ek(a,b,c),a.safeDecode=(b,c)=>el(a,b,c),a.safeEncodeAsync=async(b,c)=>em(a,b,c),a.safeDecodeAsync=async(b,c)=>en(a,b,c),a.refine=(b,c)=>a.check(gP(b,c)),a.superRefine=b=>a.check(gQ(b)),a.overwrite=b=>a.check(dP(b)),a.optional=()=>gg(a),a.exactOptional=()=>gi(a),a.nullable=()=>gk(a),a.nullish=()=>gg(gk(a)),a.nonoptional=b=>gr(a,b),a.array=()=>fK(a),a.or=b=>fR([a,b]),a.and=b=>fX(a,b),a.transform=b=>gz(a,ge(b)),a.default=b=>gn(a,b),a.prefault=b=>gp(a,b),a.catch=b=>gv(a,b),a.pipe=b=>gz(a,b),a.readonly=()=>gD(a),a.describe=b=>{let c=a.clone();return c4.add(c,{description:b}),c},Object.defineProperty(a,"description",{get:()=>c4.get(a)?.description,configurable:!0}),a.meta=(...b)=>{if(0===b.length)return c4.get(a);let c=a.clone();return c4.add(c,b[0]),c},a.isOptional=()=>a.safeParse(void 0).success,a.isNullable=()=>a.safeParse(null).success,a.apply=b=>b(a),a)),ep=m("_ZodString",(a,b)=>{bE.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{c.type="string";let{minimum:e,maximum:f,format:g,patterns:h,contentEncoding:i}=a._zod.bag;if("number"==typeof e&&(c.minLength=e),"number"==typeof f&&(c.maxLength=f),g&&(c.format=d_[g]??g,""===c.format&&delete c.format,"time"===g&&delete c.format),i&&(c.contentEncoding=i),h&&h.size>0){let a=[...h];1===a.length?c.pattern=a[0].source:a.length>1&&(c.allOf=[...a.map(a=>({..."draft-07"===b.target||"draft-04"===b.target||"openapi-3.0"===b.target?{type:"string"}:{},pattern:a.source}))])}})(a,b,c,0);let c=a._zod.bag;a.format=c.format??null,a.minLength=c.minimum??null,a.maxLength=c.maximum??null,a.regex=(...b)=>a.check(dH(...b)),a.includes=(...b)=>a.check(dK(...b)),a.startsWith=(...b)=>a.check(dL(...b)),a.endsWith=(...b)=>a.check(dM(...b)),a.min=(...b)=>a.check(dF(...b)),a.max=(...b)=>a.check(dE(...b)),a.length=(...b)=>a.check(dG(...b)),a.nonempty=(...b)=>a.check(dF(1,...b)),a.lowercase=b=>a.check(dI(b)),a.uppercase=b=>a.check(dJ(b)),a.trim=()=>a.check(dR()),a.normalize=(...b)=>a.check(dQ(...b)),a.toLowerCase=()=>a.check(dS()),a.toUpperCase=()=>a.check(dT()),a.slugify=()=>a.check(dU())}),eq=m("ZodString",(a,b)=>{bE.init(a,b),ep.init(a,b),a.email=b=>a.check(c5(et,b)),a.url=b=>a.check(db(eC,b)),a.jwt=b=>a.check(dr(e7,b)),a.emoji=b=>a.check(dc(eF,b)),a.guid=b=>a.check(c6(ev,b)),a.uuid=b=>a.check(c7(ex,b)),a.uuidv4=b=>a.check(c8(ex,b)),a.uuidv6=b=>a.check(c9(ex,b)),a.uuidv7=b=>a.check(da(ex,b)),a.nanoid=b=>a.check(dd(eH,b)),a.guid=b=>a.check(c6(ev,b)),a.cuid=b=>a.check(de(eJ,b)),a.cuid2=b=>a.check(df(eL,b)),a.ulid=b=>a.check(dg(eN,b)),a.base64=b=>a.check(dn(e1,b)),a.base64url=b=>a.check(dp(e3,b)),a.xid=b=>a.check(dh(eP,b)),a.ksuid=b=>a.check(di(eR,b)),a.ipv4=b=>a.check(dj(eT,b)),a.ipv6=b=>a.check(dk(eX,b)),a.cidrv4=b=>a.check(dl(eZ,b)),a.cidrv6=b=>a.check(dm(e_,b)),a.e164=b=>a.check(dq(e5,b)),a.datetime=b=>a.check(d3(b)),a.date=b=>a.check(d5(b)),a.time=b=>a.check(d7(b)),a.duration=b=>a.check(d9(b))});function er(a){return new eq({type:"string",...L(a)})}let es=m("ZodStringFormat",(a,b)=>{bF.init(a,b),ep.init(a,b)}),et=m("ZodEmail",(a,b)=>{bI.init(a,b),es.init(a,b)});function eu(a){return c5(et,a)}let ev=m("ZodGUID",(a,b)=>{bG.init(a,b),es.init(a,b)});function ew(a){return c6(ev,a)}let ex=m("ZodUUID",(a,b)=>{bH.init(a,b),es.init(a,b)});function ey(a){return c7(ex,a)}function ez(a){return c8(ex,a)}function eA(a){return c9(ex,a)}function eB(a){return da(ex,a)}let eC=m("ZodURL",(a,b)=>{bJ.init(a,b),es.init(a,b)});function eD(a){return db(eC,a)}function eE(a){return db(eC,{protocol:/^https?$/,hostname:aH,...L(a)})}let eF=m("ZodEmoji",(a,b)=>{bK.init(a,b),es.init(a,b)});function eG(a){return dc(eF,a)}let eH=m("ZodNanoID",(a,b)=>{bL.init(a,b),es.init(a,b)});function eI(a){return dd(eH,a)}let eJ=m("ZodCUID",(a,b)=>{bM.init(a,b),es.init(a,b)});function eK(a){return de(eJ,a)}let eL=m("ZodCUID2",(a,b)=>{bN.init(a,b),es.init(a,b)});function eM(a){return df(eL,a)}let eN=m("ZodULID",(a,b)=>{bO.init(a,b),es.init(a,b)});function eO(a){return dg(eN,a)}let eP=m("ZodXID",(a,b)=>{bP.init(a,b),es.init(a,b)});function eQ(a){return dh(eP,a)}let eR=m("ZodKSUID",(a,b)=>{bQ.init(a,b),es.init(a,b)});function eS(a){return di(eR,a)}let eT=m("ZodIPv4",(a,b)=>{bV.init(a,b),es.init(a,b)});function eU(a){return dj(eT,a)}let eV=m("ZodMAC",(a,b)=>{bX.init(a,b),es.init(a,b)});function eW(a){return new eV({type:"string",format:"mac",check:"string_format",abort:!1,...L(a)})}let eX=m("ZodIPv6",(a,b)=>{bW.init(a,b),es.init(a,b)});function eY(a){return dk(eX,a)}let eZ=m("ZodCIDRv4",(a,b)=>{bY.init(a,b),es.init(a,b)});function e$(a){return dl(eZ,a)}let e_=m("ZodCIDRv6",(a,b)=>{bZ.init(a,b),es.init(a,b)});function e0(a){return dm(e_,a)}let e1=m("ZodBase64",(a,b)=>{b_.init(a,b),es.init(a,b)});function e2(a){return dn(e1,a)}let e3=m("ZodBase64URL",(a,b)=>{b0.init(a,b),es.init(a,b)});function e4(a){return dp(e3,a)}let e5=m("ZodE164",(a,b)=>{b1.init(a,b),es.init(a,b)});function e6(a){return dq(e5,a)}let e7=m("ZodJWT",(a,b)=>{b2.init(a,b),es.init(a,b)});function e8(a){return dr(e7,a)}let e9=m("ZodCustomStringFormat",(a,b)=>{b3.init(a,b),es.init(a,b)});function fa(a,b,c={}){return dV(e9,a,b,c)}function fb(a){return dV(e9,"hostname",aG,a)}function fc(a){return dV(e9,"hex",aX,a)}function fd(a,b){let c=b?.enc??"hex",d=`${a}_${c}`,e=i[d];if(!e)throw Error(`Unrecognized hash format: ${d}`);return dV(e9,d,e,b)}let fe=m("ZodNumber",(a,b)=>{b4.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let{minimum:e,maximum:f,format:g,multipleOf:h,exclusiveMaximum:i,exclusiveMinimum:j}=a._zod.bag;"string"==typeof g&&g.includes("int")?c.type="integer":c.type="number","number"==typeof j&&("draft-04"===b.target||"openapi-3.0"===b.target?(c.minimum=j,c.exclusiveMinimum=!0):c.exclusiveMinimum=j),"number"==typeof e&&(c.minimum=e,"number"==typeof j&&"draft-04"!==b.target&&(j>=e?delete c.minimum:delete c.exclusiveMinimum)),"number"==typeof i&&("draft-04"===b.target||"openapi-3.0"===b.target?(c.maximum=i,c.exclusiveMaximum=!0):c.exclusiveMaximum=i),"number"==typeof f&&(c.maximum=f,"number"==typeof i&&"draft-04"!==b.target&&(i<=f?delete c.maximum:delete c.exclusiveMaximum)),"number"==typeof h&&(c.multipleOf=h)})(a,b,c,0),a.gt=(b,c)=>a.check(du(b,c)),a.gte=(b,c)=>a.check(dv(b,c)),a.min=(b,c)=>a.check(dv(b,c)),a.lt=(b,c)=>a.check(ds(b,c)),a.lte=(b,c)=>a.check(dt(b,c)),a.max=(b,c)=>a.check(dt(b,c)),a.int=b=>a.check(fh(b)),a.safe=b=>a.check(fh(b)),a.positive=b=>a.check(du(0,b)),a.nonnegative=b=>a.check(dv(0,b)),a.negative=b=>a.check(ds(0,b)),a.nonpositive=b=>a.check(dt(0,b)),a.multipleOf=(b,c)=>a.check(dA(b,c)),a.step=(b,c)=>a.check(dA(b,c)),a.finite=()=>a;let c=a._zod.bag;a.minValue=Math.max(c.minimum??-1/0,c.exclusiveMinimum??-1/0)??null,a.maxValue=Math.min(c.maximum??1/0,c.exclusiveMaximum??1/0)??null,a.isInt=(c.format??"").includes("int")||Number.isSafeInteger(c.multipleOf??.5),a.isFinite=!0,a.format=c.format??null});function ff(a){return new fe({type:"number",checks:[],...L(a)})}let fg=m("ZodNumberFormat",(a,b)=>{b5.init(a,b),fe.init(a,b)});function fh(a){return new fg({type:"number",check:"number_format",abort:!1,format:"safeint",...L(a)})}function fi(a){return new fg({type:"number",check:"number_format",abort:!1,format:"float32",...L(a)})}function fj(a){return new fg({type:"number",check:"number_format",abort:!1,format:"float64",...L(a)})}function fk(a){return new fg({type:"number",check:"number_format",abort:!1,format:"int32",...L(a)})}function fl(a){return new fg({type:"number",check:"number_format",abort:!1,format:"uint32",...L(a)})}let fm=m("ZodBoolean",(a,b)=>{b6.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{b.type="boolean"}});function fn(a){return new fm({type:"boolean",...L(a)})}let fo=m("ZodBigInt",(a,b)=>{b7.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")})(0,a,0,0),a.gte=(b,c)=>a.check(dv(b,c)),a.min=(b,c)=>a.check(dv(b,c)),a.gt=(b,c)=>a.check(du(b,c)),a.gte=(b,c)=>a.check(dv(b,c)),a.min=(b,c)=>a.check(dv(b,c)),a.lt=(b,c)=>a.check(ds(b,c)),a.lte=(b,c)=>a.check(dt(b,c)),a.max=(b,c)=>a.check(dt(b,c)),a.positive=b=>a.check(du(BigInt(0),b)),a.negative=b=>a.check(ds(BigInt(0),b)),a.nonpositive=b=>a.check(dt(BigInt(0),b)),a.nonnegative=b=>a.check(dv(BigInt(0),b)),a.multipleOf=(b,c)=>a.check(dA(b,c));let c=a._zod.bag;a.minValue=c.minimum??null,a.maxValue=c.maximum??null,a.format=c.format??null});function fp(a){return new fo({type:"bigint",...L(a)})}let fq=m("ZodBigIntFormat",(a,b)=>{b8.init(a,b),fo.init(a,b)});function fr(a){return new fq({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...L(a)})}function fs(a){return new fq({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...L(a)})}let ft=m("ZodSymbol",(a,b)=>{b9.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")})(0,a,0,0)});function fu(a){return new ft({type:"symbol",...L(a)})}let fv=m("ZodUndefined",(a,b)=>{ca.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")})(0,a,0,0)});function fw(a){return new fv({type:"undefined",...L(a)})}let fx=m("ZodNull",(a,b)=>{cb.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{"openapi-3.0"===a.target?(b.type="string",b.nullable=!0,b.enum=[null]):b.type="null"}});function fy(a){return new fx({type:"null",...L(a)})}let fz=m("ZodAny",(a,b)=>{cc.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{}});function fA(){return new fz({type:"any"})}let fB=m("ZodUnknown",(a,b)=>{cd.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{}});function fC(){return new fB({type:"unknown"})}let fD=m("ZodNever",(a,b)=>{ce.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{b.not={}}});function fE(a){return new fD({type:"never",...L(a)})}let fF=m("ZodVoid",(a,b)=>{cf.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Void cannot be represented in JSON Schema")})(0,a,0,0)});function fG(a){return new fF({type:"void",...L(a)})}let fH=m("ZodDate",(a,b)=>{cg.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Date cannot be represented in JSON Schema")})(0,a,0,0),a.min=(b,c)=>a.check(dv(b,c)),a.max=(b,c)=>a.check(dt(b,c));let c=a._zod.bag;a.minDate=c.minimum?new Date(c.minimum):null,a.maxDate=c.maximum?new Date(c.maximum):null});function fI(a){return new fH({type:"date",...L(a)})}let fJ=m("ZodArray",(a,b)=>{ci.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def,{minimum:f,maximum:g}=a._zod.bag;"number"==typeof f&&(c.minItems=f),"number"==typeof g&&(c.maxItems=g),c.type="array",c.items=dX(e.element,b,{...d,path:[...d.path,"items"]})})(a,b,c,d),a.element=b.element,a.min=(b,c)=>a.check(dF(b,c)),a.nonempty=b=>a.check(dF(1,b)),a.max=(b,c)=>a.check(dE(b,c)),a.length=(b,c)=>a.check(dG(b,c)),a.unwrap=()=>a.element});function fK(a,b){return new fJ({type:"array",element:a,...L(b)})}function fL(a){return f7(Object.keys(a._zod.def.shape))}let fM=m("ZodObject",(a,b)=>{cn.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;c.type="object",c.properties={};let f=e.shape;for(let a in f)c.properties[a]=dX(f[a],b,{...d,path:[...d.path,"properties",a]});let g=new Set([...new Set(Object.keys(f))].filter(a=>{let c=e.shape[a]._zod;return"input"===b.io?void 0===c.optin:void 0===c.optout}));g.size>0&&(c.required=Array.from(g)),e.catchall?._zod.def.type==="never"?c.additionalProperties=!1:e.catchall?e.catchall&&(c.additionalProperties=dX(e.catchall,b,{...d,path:[...d.path,"additionalProperties"]})):"output"===b.io&&(c.additionalProperties=!1)})(a,b,c,d),y(a,"shape",()=>b.shape),a.keyof=()=>f7(Object.keys(a._zod.def.shape)),a.catchall=b=>a.clone({...a._zod.def,catchall:b}),a.passthrough=()=>a.clone({...a._zod.def,catchall:fC()}),a.loose=()=>a.clone({...a._zod.def,catchall:fC()}),a.strict=()=>a.clone({...a._zod.def,catchall:fE()}),a.strip=()=>a.clone({...a._zod.def,catchall:void 0}),a.extend=b=>(function(a,b){if(!F(b))throw Error("Invalid input to extend: expected a plain object");let c=a._zod.def.checks;if(c&&c.length>0){let c=a._zod.def.shape;for(let a in b)if(void 0!==Object.getOwnPropertyDescriptor(c,a))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let d=A(a._zod.def,{get shape(){let c={...a._zod.def.shape,...b};return z(this,"shape",c),c}});return K(a,d)})(a,b),a.safeExtend=b=>(function(a,b){if(!F(b))throw Error("Invalid input to safeExtend: expected a plain object");let c=A(a._zod.def,{get shape(){let c={...a._zod.def.shape,...b};return z(this,"shape",c),c}});return K(a,c)})(a,b),a.merge=b=>{let c;return c=A(a._zod.def,{get shape(){let c={...a._zod.def.shape,...b._zod.def.shape};return z(this,"shape",c),c},get catchall(){return b._zod.def.catchall},checks:[]}),K(a,c)},a.pick=b=>(function(a,b){let c=a._zod.def,d=c.checks;if(d&&d.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let e=A(a._zod.def,{get shape(){let a={};for(let d in b){if(!(d in c.shape))throw Error(`Unrecognized key: "${d}"`);b[d]&&(a[d]=c.shape[d])}return z(this,"shape",a),a},checks:[]});return K(a,e)})(a,b),a.omit=b=>(function(a,b){let c=a._zod.def,d=c.checks;if(d&&d.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let e=A(a._zod.def,{get shape(){let d={...a._zod.def.shape};for(let a in b){if(!(a in c.shape))throw Error(`Unrecognized key: "${a}"`);b[a]&&delete d[a]}return z(this,"shape",d),d},checks:[]});return K(a,e)})(a,b),a.partial=(...b)=>(function(a,b,c){let d=b._zod.def.checks;if(d&&d.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let e=A(b._zod.def,{get shape(){let d=b._zod.def.shape,e={...d};if(c)for(let b in c){if(!(b in d))throw Error(`Unrecognized key: "${b}"`);c[b]&&(e[b]=a?new a({type:"optional",innerType:d[b]}):d[b])}else for(let b in d)e[b]=a?new a({type:"optional",innerType:d[b]}):d[b];return z(this,"shape",e),e},checks:[]});return K(b,e)})(gf,a,b[0]),a.required=(...b)=>{var c;let d;return c=b[0],d=A(a._zod.def,{get shape(){let b=a._zod.def.shape,d={...b};if(c)for(let a in c){if(!(a in d))throw Error(`Unrecognized key: "${a}"`);c[a]&&(d[a]=new gq({type:"nonoptional",innerType:b[a]}))}else for(let a in b)d[a]=new gq({type:"nonoptional",innerType:b[a]});return z(this,"shape",d),d}}),K(a,d)}});function fN(a,b){return new fM({type:"object",shape:a??{},...L(b)})}function fO(a,b){return new fM({type:"object",shape:a,catchall:fE(),...L(b)})}function fP(a,b){return new fM({type:"object",shape:a,catchall:fC(),...L(b)})}let fQ=m("ZodUnion",(a,b)=>{cp.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>d0(a,b,c,d),a.options=b.options});function fR(a,b){return new fQ({type:"union",options:a,...L(b)})}let fS=m("ZodXor",(a,b)=>{fQ.init(a,b),cr.init(a,b),a._zod.processJSONSchema=(b,c,d)=>d0(a,b,c,d),a.options=b.options});function fT(a,b){return new fS({type:"union",options:a,inclusive:!1,...L(b)})}let fU=m("ZodDiscriminatedUnion",(a,b)=>{fQ.init(a,b),cs.init(a,b)});function fV(a,b,c){return new fU({type:"union",options:b,discriminator:a,...L(c)})}let fW=m("ZodIntersection",(a,b)=>{ct.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e,f,g,h;return f=dX((e=a._zod.def).left,b,{...d,path:[...d.path,"allOf",0]}),g=dX(e.right,b,{...d,path:[...d.path,"allOf",1]}),void(c.allOf=[...(h=a=>"allOf"in a&&1===Object.keys(a).length)(f)?f.allOf:[f],...h(g)?g.allOf:[g]])}});function fX(a,b){return new fW({type:"intersection",left:a,right:b})}let fY=m("ZodTuple",(a,b)=>{cv.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;c.type="array";let f="draft-2020-12"===b.target?"prefixItems":"items",g="draft-2020-12"===b.target||"openapi-3.0"===b.target?"items":"additionalItems",h=e.items.map((a,c)=>dX(a,b,{...d,path:[...d.path,f,c]})),i=e.rest?dX(e.rest,b,{...d,path:[...d.path,g,..."openapi-3.0"===b.target?[e.items.length]:[]]}):null;"draft-2020-12"===b.target?(c.prefixItems=h,i&&(c.items=i)):"openapi-3.0"===b.target?(c.items={anyOf:h},i&&c.items.anyOf.push(i),c.minItems=h.length,i||(c.maxItems=h.length)):(c.items=h,i&&(c.additionalItems=i));let{minimum:j,maximum:k}=a._zod.bag;"number"==typeof j&&(c.minItems=j),"number"==typeof k&&(c.maxItems=k)})(a,b,c,d),a.rest=b=>a.clone({...a._zod.def,rest:b})});function fZ(a,b,c){let d=b instanceof bD,e=d?c:b;return new fY({type:"tuple",items:a,rest:d?b:null,...L(e)})}let f$=m("ZodRecord",(a,b)=>{cx.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;c.type="object";let f=e.keyType,g=f._zod.bag,h=g?.patterns;if("loose"===e.mode&&h&&h.size>0){let a=dX(e.valueType,b,{...d,path:[...d.path,"patternProperties","*"]});for(let b of(c.patternProperties={},h))c.patternProperties[b.source]=a}else("draft-07"===b.target||"draft-2020-12"===b.target)&&(c.propertyNames=dX(e.keyType,b,{...d,path:[...d.path,"propertyNames"]})),c.additionalProperties=dX(e.valueType,b,{...d,path:[...d.path,"additionalProperties"]});let i=f._zod.values;if(i){let a=[...i].filter(a=>"string"==typeof a||"number"==typeof a);a.length>0&&(c.required=a)}})(a,b,c,d),a.keyType=b.keyType,a.valueType=b.valueType});function f_(a,b,c){return new f$({type:"record",keyType:a,valueType:b,...L(c)})}function f0(a,b,c){let d=K(a);return d._zod.values=void 0,new f$({type:"record",keyType:d,valueType:b,...L(c)})}function f1(a,b,c){return new f$({type:"record",keyType:a,valueType:b,mode:"loose",...L(c)})}let f2=m("ZodMap",(a,b)=>{cy.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Map cannot be represented in JSON Schema")})(0,a,0,0),a.keyType=b.keyType,a.valueType=b.valueType,a.min=(...b)=>a.check(dC(...b)),a.nonempty=b=>a.check(dC(1,b)),a.max=(...b)=>a.check(dB(...b)),a.size=(...b)=>a.check(dD(...b))});function f3(a,b,c){return new f2({type:"map",keyType:a,valueType:b,...L(c)})}let f4=m("ZodSet",(a,b)=>{cA.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Set cannot be represented in JSON Schema")})(0,a,0,0),a.min=(...b)=>a.check(dC(...b)),a.nonempty=b=>a.check(dC(1,b)),a.max=(...b)=>a.check(dB(...b)),a.size=(...b)=>a.check(dD(...b))});function f5(a,b){return new f4({type:"set",valueType:a,...L(b)})}let f6=m("ZodEnum",(a,b)=>{cC.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;(e=r(a._zod.def.entries)).every(a=>"number"==typeof a)&&(c.type="number"),e.every(a=>"string"==typeof a)&&(c.type="string"),c.enum=e},a.enum=b.entries,a.options=Object.values(b.entries);let c=new Set(Object.keys(b.entries));a.extract=(a,d)=>{let e={};for(let d of a)if(c.has(d))e[d]=b.entries[d];else throw Error(`Key ${d} not found in enum`);return new f6({...b,checks:[],...L(d),entries:e})},a.exclude=(a,d)=>{let e={...b.entries};for(let b of a)if(c.has(b))delete e[b];else throw Error(`Key ${b} not found in enum`);return new f6({...b,checks:[],...L(d),entries:e})}});function f7(a,b){return new f6({type:"enum",entries:Array.isArray(a)?Object.fromEntries(a.map(a=>[a,a])):a,...L(b)})}function f8(a,b){return new f6({type:"enum",entries:a,...L(b)})}let f9=m("ZodLiteral",(a,b)=>{cD.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def,f=[];for(let a of e.values)if(void 0===a){if("throw"===b.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof a)if("throw"===b.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else f.push(Number(a));else f.push(a);if(0===f.length);else if(1===f.length){let a=f[0];c.type=null===a?"null":typeof a,"draft-04"===b.target||"openapi-3.0"===b.target?c.enum=[a]:c.const=a}else f.every(a=>"number"==typeof a)&&(c.type="number"),f.every(a=>"string"==typeof a)&&(c.type="string"),f.every(a=>"boolean"==typeof a)&&(c.type="boolean"),f.every(a=>null===a)&&(c.type="null"),c.enum=f})(a,b,c,0),a.values=new Set(b.values),Object.defineProperty(a,"value",{get(){if(b.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return b.values[0]}})});function ga(a,b){return new f9({type:"literal",values:Array.isArray(a)?a:[a],...L(b)})}let gb=m("ZodFile",(a,b)=>{cE.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e={type:"string",format:"binary",contentEncoding:"binary"},{minimum:f,maximum:g,mime:h}=a._zod.bag;void 0!==f&&(e.minLength=f),void 0!==g&&(e.maxLength=g),h?1===h.length?(e.contentMediaType=h[0],Object.assign(c,e)):(Object.assign(c,e),c.anyOf=h.map(a=>({contentMediaType:a}))):Object.assign(c,e)})(a,0,c,0),a.min=(b,c)=>a.check(dC(b,c)),a.max=(b,c)=>a.check(dB(b,c)),a.mime=(b,c)=>a.check(dO(Array.isArray(b)?b:[b],c))});function gc(a){return new gb({type:"file",...L(a)})}let gd=m("ZodTransform",(a,b)=>{cF.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,a,0,0),a._zod.parse=(c,d)=>{if("backward"===d.direction)throw new o(a.constructor.name);c.addIssue=d=>{"string"==typeof d?c.issues.push(V(d,c.value,b)):(d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=c.value),d.inst??(d.inst=a),c.issues.push(V(d)))};let e=b.transform(c.value,c);return e instanceof Promise?e.then(a=>(c.value=a,c)):(c.value=e,c)}});function ge(a){return new gd({type:"transform",transform:a})}let gf=m("ZodOptional",(a,b)=>{cH.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>d1(a,b,c,d),a.unwrap=()=>a._zod.def.innerType});function gg(a){return new gf({type:"optional",innerType:a})}let gh=m("ZodExactOptional",(a,b)=>{cI.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>d1(a,b,c,d),a.unwrap=()=>a._zod.def.innerType});function gi(a){return new gh({type:"optional",innerType:a})}let gj=m("ZodNullable",(a,b)=>{cJ.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e,f,g;return f=dX((e=a._zod.def).innerType,b,d),g=b.seen.get(a),void("openapi-3.0"===b.target?(g.ref=e.innerType,c.nullable=!0):c.anyOf=[f,{type:"null"}])},a.unwrap=()=>a._zod.def.innerType});function gk(a){return new gj({type:"nullable",innerType:a})}function gl(a){return gg(gk(a))}let gm=m("ZodDefault",(a,b)=>{cK.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX((e=a._zod.def).innerType,b,d),b.seen.get(a).ref=e.innerType,c.default=JSON.parse(JSON.stringify(e.defaultValue))},a.unwrap=()=>a._zod.def.innerType,a.removeDefault=a.unwrap});function gn(a,b){return new gm({type:"default",innerType:a,get defaultValue(){return"function"==typeof b?b():G(b)}})}let go=m("ZodPrefault",(a,b)=>{cM.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX((e=a._zod.def).innerType,b,d),b.seen.get(a).ref=e.innerType,"input"===b.io&&(c._prefault=JSON.parse(JSON.stringify(e.defaultValue)))},a.unwrap=()=>a._zod.def.innerType});function gp(a,b){return new go({type:"prefault",innerType:a,get defaultValue(){return"function"==typeof b?b():G(b)}})}let gq=m("ZodNonOptional",(a,b)=>{cN.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX((e=a._zod.def).innerType,b,d),b.seen.get(a).ref=e.innerType},a.unwrap=()=>a._zod.def.innerType});function gr(a,b){return new gq({type:"nonoptional",innerType:a,...L(b)})}let gs=m("ZodSuccess",(a,b)=>{cP.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{b.type="boolean"},a.unwrap=()=>a._zod.def.innerType});function gt(a){return new gs({type:"success",innerType:a})}let gu=m("ZodCatch",(a,b)=>{cQ.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e,f=a._zod.def;dX(f.innerType,b,d),b.seen.get(a).ref=f.innerType;try{e=f.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}c.default=e})(a,b,c,d),a.unwrap=()=>a._zod.def.innerType,a.removeCatch=a.unwrap});function gv(a,b){return new gu({type:"catch",innerType:a,catchValue:"function"==typeof b?b:()=>b})}let gw=m("ZodNaN",(a,b)=>{cR.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")})(0,a,0,0)});function gx(a){return new gw({type:"nan",...L(a)})}let gy=m("ZodPipe",(a,b)=>{cS.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e,f;return e=a._zod.def,void(dX(f="input"===b.io?"transform"===e.in._zod.def.type?e.out:e.in:e.out,b,d),b.seen.get(a).ref=f)},a.in=b.in,a.out=b.out});function gz(a,b){return new gy({type:"pipe",in:a,out:b})}let gA=m("ZodCodec",(a,b)=>{gy.init(a,b),cU.init(a,b)});function gB(a,b,c){return new gA({type:"pipe",in:a,out:b,transform:c.decode,reverseTransform:c.encode})}let gC=m("ZodReadonly",(a,b)=>{cX.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX((e=a._zod.def).innerType,b,d),b.seen.get(a).ref=e.innerType,c.readOnly=!0},a.unwrap=()=>a._zod.def.innerType});function gD(a){return new gC({type:"readonly",innerType:a})}let gE=m("ZodTemplateLiteral",(a,b)=>{cZ.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.pattern;if(!e)throw Error("Pattern not found in template literal");c.type="string",c.pattern=e.source})(a,0,c,0)});function gF(a,b){return new gE({type:"template_literal",parts:a,...L(b)})}let gG=m("ZodLazy",(a,b)=>{c0.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX(e=a._zod.innerType,b,d),b.seen.get(a).ref=e},a.unwrap=()=>a._zod.def.getter()});function gH(a){return new gG({type:"lazy",getter:a})}let gI=m("ZodPromise",(a,b)=>{c_.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX((e=a._zod.def).innerType,b,d),b.seen.get(a).ref=e.innerType},a.unwrap=()=>a._zod.def.innerType});function gJ(a){return new gI({type:"promise",innerType:a})}let gK=m("ZodFunction",(a,b)=>{c$.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")})(0,a,0,0)});function gL(a){return new gK({type:"function",input:Array.isArray(a?.input)?fZ(a?.input):a?.input??fK(fC()),output:a?.output??fC()})}let gM=m("ZodCustom",(a,b)=>{c1.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,a,0,0)});function gN(a){let b=new bd({check:"custom"});return b._zod.check=a,b}function gO(a,b){var c;let d;return c=a??(()=>!0),(d=L(b)).abort??(d.abort=!0),new gM({type:"custom",check:"custom",fn:c,...d})}function gP(a,b={}){return new gM({type:"custom",check:"custom",fn:a,...L(b)})}function gQ(a){var b;let c,d;return b=b=>(b.addIssue=a=>{"string"==typeof a?b.issues.push(V(a,b.value,c._zod.def)):(a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=b.value),a.inst??(a.inst=c),a.continue??(a.continue=!c._zod.def.abort),b.issues.push(V(a)))},a(b.value,b)),(d=new bd({check:"custom",...L(void 0)}))._zod.check=b,c=d}let gR=function(a){let b=new bd({check:"describe"});return b._zod.onattach=[b=>{let c=c4.get(b)??{};c4.add(b,{...c,description:a})}],b._zod.check=()=>{},b},gS=function(a){let b=new bd({check:"meta"});return b._zod.onattach=[b=>{let c=c4.get(b)??{};c4.add(b,{...c,...a})}],b._zod.check=()=>{},b};function gT(a,b={}){let c=new gM({type:"custom",check:"custom",fn:b=>b instanceof a,abort:!0,...L(b)});return c._zod.bag.Class=a,c._zod.check=b=>{b.value instanceof a||b.issues.push({code:"invalid_type",expected:a.name,input:b.value,inst:c,path:[...c._zod.def.path??[]]})},c}let gU=(...a)=>(function(a,b){let c=L(b),d=c.truthy??["true","1","yes","on","y","enabled"],e=c.falsy??["false","0","no","off","n","disabled"];"sensitive"!==c.case&&(d=d.map(a=>"string"==typeof a?a.toLowerCase():a),e=e.map(a=>"string"==typeof a?a.toLowerCase():a));let f=new Set(d),g=new Set(e),h=a.Codec??cU,i=a.Boolean??b6,j=new h({type:"pipe",in:new(a.String??bE)({type:"string",error:c.error}),out:new i({type:"boolean",error:c.error}),transform:(a,b)=>{let d=a;return"sensitive"!==c.case&&(d=d.toLowerCase()),!!f.has(d)||!g.has(d)&&(b.issues.push({code:"invalid_value",expected:"stringbool",values:[...f,...g],input:b.value,inst:j,continue:!1}),{})},reverseTransform:(a,b)=>!0===a?d[0]||"true":e[0]||"false",error:c.error});return j})({Codec:gA,Boolean:fm,String:eq},...a);function gV(a){let b=gH(()=>fR([er(a),ff(),fn(),fy(),fK(b),f_(er(),b)]));return b}function gW(a,b){return gz(ge(a),b)}h||(h={}),q({localeError:(d={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},e={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},f={nan:"NaN"},a=>{switch(a.code){case"invalid_type":{let b=f[a.expected]??a.expected,c=function(a){let b=typeof a;switch(b){case"number":return Number.isNaN(a)?"nan":"number";case"object":if(null===a)return"null";if(Array.isArray(a))return"array";if(a&&Object.getPrototypeOf(a)!==Object.prototype&&"constructor"in a&&a.constructor)return a.constructor.name}return b}(a.input),d=f[c]??c;return`Invalid input: expected ${b}, received ${d}`}case"invalid_value":if(1===a.values.length)return`Invalid input: expected ${M(a.values[0])}`;return`Invalid option: expected one of ${s(a.values,"|")}`;case"too_big":{let b=a.inclusive?"<=":"<",c=d[a.origin]??null;if(c)return`Too big: expected ${a.origin??"value"} to have ${b}${a.maximum.toString()} ${c.unit??"elements"}`;return`Too big: expected ${a.origin??"value"} to be ${b}${a.maximum.toString()}`}case"too_small":{let b=a.inclusive?">=":">",c=d[a.origin]??null;if(c)return`Too small: expected ${a.origin} to have ${b}${a.minimum.toString()} ${c.unit}`;return`Too small: expected ${a.origin} to be ${b}${a.minimum.toString()}`}case"invalid_format":if("starts_with"===a.format)return`Invalid string: must start with "${a.prefix}"`;if("ends_with"===a.format)return`Invalid string: must end with "${a.suffix}"`;if("includes"===a.format)return`Invalid string: must include "${a.includes}"`;if("regex"===a.format)return`Invalid string: must match pattern ${a.pattern}`;return`Invalid ${e[a.format]??a.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${a.divisor}`;case"unrecognized_keys":return`Unrecognized key${a.keys.length>1?"s":""}: ${s(a.keys,", ")}`;case"invalid_key":return`Invalid key in ${a.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${a.origin}`}})})},62026:(a,b,c)=>{"use strict";c.d(b,{A:()=>f});var d=c(91986),e=c(9157);let f=(0,d.cache)(async function(){return(await (0,e.A)()).locale})},62626:(a,b,c)=>{"use strict";c.d(b,{default:()=>f});var d=c(89400),e=c(48249);function f({locale:a,...b}){if(!a)throw Error(void 0);return(0,e.jsx)(d.Dk,{locale:a,...b})}},68625:(a,b,c)=>{"use strict";c.d(b,{A:()=>n});var d=c(91986),e=c(9157);let f=(0,d.cache)(async function(a){return(await (0,e.A)(a)).now}),g=(0,d.cache)(async function(){return(await (0,e.A)()).formats});var h=c(86392),i=c(5735);let j=(0,d.cache)(async function(a){return(await (0,e.A)(a)).timeZone});async function k(a){return j(a?.locale)}var l=c(28440),m=c(62026);async function n({formats:a,locale:b,messages:c,now:d,timeZone:e,...j}){return(0,i.jsx)(h.default,{formats:void 0===a?await g():a,locale:b??await (0,m.A)(),messages:void 0===c?await (0,l.A)():c,now:d??await f(),timeZone:e??await k(),...j})}},86392:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/OmniRoute/OmniRoute/node_modules/next-intl/dist/esm/production/shared/NextIntlClientProvider.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/OmniRoute/OmniRoute/node_modules/next-intl/dist/esm/production/shared/NextIntlClientProvider.js","default")},89400:(a,b,c)=>{"use strict";c.d(b,{Dk:()=>av,kc:()=>aB,Ym:()=>aA,c3:()=>az});var d,e,f,g,h,i,j=c(67484);function k(a,b){let c=b&&b.cache?b.cache:p,d=b&&b.serializer?b.serializer:n;return(b&&b.strategy?b.strategy:function(a,b){var c,d;let e=1===a.length?l:m;return c=b.cache.create(),d=b.serializer,e.bind(this,a,c,d)})(a,{cache:c,serializer:d})}function l(a,b,c,d){let e=null==d||"number"==typeof d||"boolean"==typeof d?d:c(d),f=b.get(e);return void 0===f&&(f=a.call(this,d),b.set(e,f)),f}function m(a,b,c){let d=Array.prototype.slice.call(arguments,3),e=c(d),f=b.get(e);return void 0===f&&(f=a.apply(this,d),b.set(e,f)),f}let n=function(){return JSON.stringify(arguments)};class o{cache;constructor(){this.cache=Object.create(null)}get(a){return this.cache[a]}set(a,b){this.cache[a]=b}}let p={create:function(){return new o}},q={variadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,m.bind(this,a,c,d)},monadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,l.bind(this,a,c,d)}};class r extends Error{constructor(a,b){let c=a;b&&(c+=": "+b),super(c),this.code=a,b&&(this.originalMessage=b)}}var s=((d=s||{}).MISSING_MESSAGE="MISSING_MESSAGE",d.MISSING_FORMAT="MISSING_FORMAT",d.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",d.INSUFFICIENT_PATH="INSUFFICIENT_PATH",d.INVALID_MESSAGE="INVALID_MESSAGE",d.INVALID_KEY="INVALID_KEY",d.FORMATTING_ERROR="FORMATTING_ERROR",d);function t(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function u(a,b){return k(a,{cache:{create:()=>({get:a=>b[a],set(a,c){b[a]=c}})},strategy:q.variadic})}function v(a,b){return u((...b)=>new a(...b),b)}function w(a){return{getDateTimeFormat:v(Intl.DateTimeFormat,a.dateTime),getNumberFormat:v(Intl.NumberFormat,a.number),getPluralRules:v(Intl.PluralRules,a.pluralRules),getRelativeTimeFormat:v(Intl.RelativeTimeFormat,a.relativeTime),getListFormat:v(Intl.ListFormat,a.list),getDisplayNames:v(Intl.DisplayNames,a.displayNames)}}let x=((e={})[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag",e),y=((f={})[f.number=0]="number",f[f.dateTime=1]="dateTime",f);function z(a){return a.type===x.literal}function A(a){return a.type===x.number}function B(a){return a.type===x.date}function C(a){return a.type===x.time}function D(a){return a.type===x.select}function E(a){return a.type===x.plural}function F(a){return a.type===x.tag}function G(a){return!!(a&&"object"==typeof a&&a.type===y.number)}function H(a){return!!(a&&"object"==typeof a&&a.type===y.dateTime)}let I=((g={})[g.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",g[g.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",g[g.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",g[g.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",g[g.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",g[g.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",g[g.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",g[g.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",g[g.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",g[g.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",g[g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",g[g.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",g[g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",g[g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",g[g.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",g[g.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",g[g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",g[g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",g[g.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",g[g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",g[g.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",g[g.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",g[g.INVALID_TAG=23]="INVALID_TAG",g[g.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",g[g.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",g[g.UNCLOSED_TAG=27]="UNCLOSED_TAG",g),J=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,K=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,L=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,M=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,N=/^(@+)?(\+|#+)?[rs]?$/g,O=/(\*)(0+)|(#+)(0+)|(0+)/g,P=/^(0+)$/;function Q(a){let b={};return"r"===a[a.length-1]?b.roundingPriority="morePrecision":"s"===a[a.length-1]&&(b.roundingPriority="lessPrecision"),a.replace(N,function(a,c,d){return"string"!=typeof d?(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length):"+"===d?b.minimumSignificantDigits=c.length:"#"===c[0]?b.maximumSignificantDigits=c.length:(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length+("string"==typeof d?d.length:0)),""}),b}function R(a){switch(a){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function S(a){let b=R(a);return b||{}}let T={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},U=RegExp(`^${J.source}*`),V=RegExp(`${J.source}*$`);function W(a,b){return{start:a,end:b}}let X=!!Object.fromEntries,Y=!!String.prototype.trimStart,Z=!!String.prototype.trimEnd,$=X?Object.fromEntries:function(a){let b={};for(let[c,d]of a)b[c]=d;return b},_=Y?function(a){return a.trimStart()}:function(a){return a.replace(U,"")},aa=Z?function(a){return a.trimEnd()}:function(a){return a.replace(V,"")},ab=RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");class ac{message;position;locale;ignoreTag;requiresOtherClause;shouldParseSkeletons;constructor(a,b={}){this.message=a,this.position={offset:0,line:1,column:1},this.ignoreTag=!!b.ignoreTag,this.locale=b.locale,this.requiresOtherClause=!!b.requiresOtherClause,this.shouldParseSkeletons=!!b.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(a,b,c){let d=[];for(;!this.isEOF();){let e=this.char();if(123===e){let b=this.parseArgument(a,c);if(b.err)return b;d.push(b.val)}else if(125===e&&a>0)break;else if(35===e&&("plural"===b||"selectordinal"===b)){let a=this.clonePosition();this.bump(),d.push({type:x.pound,location:W(a,this.clonePosition())})}else if(60!==e||this.ignoreTag||47!==this.peek())if(60===e&&!this.ignoreTag&&ad(this.peek()||0)){let c=this.parseTag(a,b);if(c.err)return c;d.push(c.val)}else{let c=this.parseLiteral(a,b);if(c.err)return c;d.push(c.val)}else if(!c)return this.error(I.UNMATCHED_CLOSING_TAG,W(this.clonePosition(),this.clonePosition()));else break}return{val:d,err:null}}parseTag(a,b){let c=this.clonePosition();this.bump();let d=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:x.literal,value:`<${d}/>`,location:W(c,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(I.INVALID_TAG,W(c,this.clonePosition()));{let e=this.parseMessage(a+1,b,!0);if(e.err)return e;let f=e.val,g=this.clonePosition();if(!this.bumpIf("</"))return this.error(I.UNCLOSED_TAG,W(c,this.clonePosition()));{if(this.isEOF()||!ad(this.char()))return this.error(I.INVALID_TAG,W(g,this.clonePosition()));let a=this.clonePosition();return d!==this.parseTagName()?this.error(I.UNMATCHED_CLOSING_TAG,W(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:x.tag,value:d,children:f,location:W(c,this.clonePosition())},err:null}:this.error(I.INVALID_TAG,W(g,this.clonePosition()))}}}parseTagName(){var a;let b=this.offset();for(this.bump();!this.isEOF()&&(45===(a=this.char())||46===a||a>=48&&a<=57||95===a||a>=97&&a<=122||a>=65&&a<=90||183==a||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039);)this.bump();return this.message.slice(b,this.offset())}parseLiteral(a,b){let c=this.clonePosition(),d="";for(;;){let c=this.tryParseQuote(b);if(c){d+=c;continue}let e=this.tryParseUnquoted(a,b);if(e){d+=e;continue}let f=this.tryParseLeftAngleBracket();if(f){d+=f;continue}break}let e=W(c,this.clonePosition());return{val:{type:x.literal,value:d,location:e},err:null}}tryParseLeftAngleBracket(){var a;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ad(a=this.peek()||0)||47===a)?null:(this.bump(),"<")}tryParseQuote(a){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===a||"selectordinal"===a)break;return null;default:return null}this.bump();let b=[this.char()];for(this.bump();!this.isEOF();){let a=this.char();if(39===a)if(39===this.peek())b.push(39),this.bump();else{this.bump();break}else b.push(a);this.bump()}return String.fromCodePoint(...b)}tryParseUnquoted(a,b){if(this.isEOF())return null;let c=this.char();return 60===c||123===c||35===c&&("plural"===b||"selectordinal"===b)||125===c&&a>0?null:(this.bump(),String.fromCodePoint(c))}parseArgument(a,b){let c=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));if(125===this.char())return this.bump(),this.error(I.EMPTY_ARGUMENT,W(c,this.clonePosition()));let d=this.parseIdentifierIfPossible().value;if(!d)return this.error(I.MALFORMED_ARGUMENT,W(c,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:x.argument,value:d,location:W(c,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));return this.parseArgumentOptions(a,b,d,c);default:return this.error(I.MALFORMED_ARGUMENT,W(c,this.clonePosition()))}}parseIdentifierIfPossible(){var a;let b=this.clonePosition(),c=this.offset(),d=(a=this.message,ab.lastIndex=c,ab.exec(a)[1]??""),e=c+d.length;return this.bumpTo(e),{value:d,location:W(b,this.clonePosition())}}parseArgumentOptions(a,b,c,d){let e=this.clonePosition(),f=this.parseIdentifierIfPossible().value,g=this.clonePosition();switch(f){case"":return this.error(I.EXPECT_ARGUMENT_TYPE,W(e,g));case"number":case"date":case"time":{this.bumpSpace();let a=null;if(this.bumpIf(",")){this.bumpSpace();let b=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;let d=aa(c.val);if(0===d.length)return this.error(I.EXPECT_ARGUMENT_STYLE,W(this.clonePosition(),this.clonePosition()));a={style:d,styleLocation:W(b,this.clonePosition())}}let b=this.tryParseArgumentClose(d);if(b.err)return b;let e=W(d,this.clonePosition());if(a&&a.style.startsWith("::")){let b=_(a.style.slice(2));if("number"===f){let d=this.parseNumberSkeletonFromString(b,a.styleLocation);if(d.err)return d;return{val:{type:x.number,value:c,location:e,style:d.val},err:null}}{let d;if(0===b.length)return this.error(I.EXPECT_DATE_TIME_SKELETON,e);let g=b;this.locale&&(g=function(a,b){let c="";for(let d=0;d<a.length;d++){let e=a.charAt(d);if("j"===e){let f=0;for(;d+1<a.length&&a.charAt(d+1)===e;)f++,d++;let g=1+(1&f),h=f<2?1:3+(f>>1),i=function(a){let b,c=a.hourCycle;if(void 0===c&&a.hourCycles&&a.hourCycles.length&&(c=a.hourCycles[0]),c)switch(c){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}let d=a.language;return"root"!==d&&(b=a.maximize().region),(T[b||""]||T[d||""]||T[`${d}-001`]||T["001"])[0]}(b);for(("H"==i||"k"==i)&&(h=0);h-- >0;)c+="a";for(;g-- >0;)c=i+c}else"J"===e?c+="H":c+=e}return c}(b,this.locale));let h={type:y.dateTime,pattern:g,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?(d={},g.replace(K,a=>{let b=a.length;switch(a[0]){case"G":d.era=4===b?"long":5===b?"narrow":"short";break;case"y":d.year=2===b?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":d.month=["numeric","2-digit","short","long","narrow"][b-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":d.day=["numeric","2-digit"][b-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":d.weekday=4===b?"long":5===b?"narrow":"short";break;case"e":if(b<4)throw RangeError("`e..eee` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"c":if(b<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"a":d.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":d.hourCycle="h12",d.hour=["numeric","2-digit"][b-1];break;case"H":d.hourCycle="h23",d.hour=["numeric","2-digit"][b-1];break;case"K":d.hourCycle="h11",d.hour=["numeric","2-digit"][b-1];break;case"k":d.hourCycle="h24",d.hour=["numeric","2-digit"][b-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":d.minute=["numeric","2-digit"][b-1];break;case"s":d.second=["numeric","2-digit"][b-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":d.timeZoneName=b<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),d):{}};return{val:{type:"date"===f?x.date:x.time,value:c,location:e,style:h},err:null}}}return{val:{type:"number"===f?x.number:"date"===f?x.date:x.time,value:c,location:e,style:a?.style??null},err:null}}case"plural":case"selectordinal":case"select":{let e=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(I.EXPECT_SELECT_ARGUMENT_OPTIONS,W(e,{...e}));this.bumpSpace();let g=this.parseIdentifierIfPossible(),h=0;if("select"!==f&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,W(this.clonePosition(),this.clonePosition()));this.bumpSpace();let a=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,I.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(a.err)return a;this.bumpSpace(),g=this.parseIdentifierIfPossible(),h=a.val}let i=this.tryParsePluralOrSelectOptions(a,f,b,g);if(i.err)return i;let j=this.tryParseArgumentClose(d);if(j.err)return j;let k=W(d,this.clonePosition());if("select"===f)return{val:{type:x.select,value:c,options:$(i.val),location:k},err:null};return{val:{type:x.plural,value:c,options:$(i.val),offset:h,pluralType:"plural"===f?"cardinal":"ordinal",location:k},err:null}}default:return this.error(I.INVALID_ARGUMENT_TYPE,W(e,g))}}tryParseArgumentClose(a){return this.isEOF()||125!==this.char()?this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(a,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let a=0,b=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(I.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,W(a,this.clonePosition()));this.bump();break}case 123:a+=1,this.bump();break;case 125:if(!(a>0))return{val:this.message.slice(b.offset,this.offset()),err:null};a-=1;break;default:this.bump()}return{val:this.message.slice(b.offset,this.offset()),err:null}}parseNumberSkeletonFromString(a,b){let c=[];try{c=function(a){if(0===a.length)throw Error("Number skeleton cannot be empty");let b=a.split(L).filter(a=>a.length>0),c=[];for(let a of b){let b=a.split("/");if(0===b.length)throw Error("Invalid number skeleton");let[d,...e]=b;for(let a of e)if(0===a.length)throw Error("Invalid number skeleton");c.push({stem:d,options:e})}return c}(a)}catch{return this.error(I.INVALID_NUMBER_SKELETON,b)}return{val:{type:y.number,tokens:c,location:b,parsedOptions:this.shouldParseSkeletons?function(a){let b={};for(let c of a){switch(c.stem){case"percent":case"%":b.style="percent";continue;case"%x100":b.style="percent",b.scale=100;continue;case"currency":b.style="currency",b.currency=c.options[0];continue;case"group-off":case",_":b.useGrouping=!1;continue;case"precision-integer":case".":b.maximumFractionDigits=0;continue;case"measure-unit":case"unit":b.style="unit",b.unit=c.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":b.notation="compact",b.compactDisplay="short";continue;case"compact-long":case"KK":b.notation="compact",b.compactDisplay="long";continue;case"scientific":b={...b,notation:"scientific",...c.options.reduce((a,b)=>({...a,...S(b)}),{})};continue;case"engineering":b={...b,notation:"engineering",...c.options.reduce((a,b)=>({...a,...S(b)}),{})};continue;case"notation-simple":b.notation="standard";continue;case"unit-width-narrow":b.currencyDisplay="narrowSymbol",b.unitDisplay="narrow";continue;case"unit-width-short":b.currencyDisplay="code",b.unitDisplay="short";continue;case"unit-width-full-name":b.currencyDisplay="name",b.unitDisplay="long";continue;case"unit-width-iso-code":b.currencyDisplay="symbol";continue;case"scale":b.scale=parseFloat(c.options[0]);continue;case"rounding-mode-floor":b.roundingMode="floor";continue;case"rounding-mode-ceiling":b.roundingMode="ceil";continue;case"rounding-mode-down":b.roundingMode="trunc";continue;case"rounding-mode-up":b.roundingMode="expand";continue;case"rounding-mode-half-even":b.roundingMode="halfEven";continue;case"rounding-mode-half-down":b.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":b.roundingMode="halfExpand";continue;case"integer-width":if(c.options.length>1)throw RangeError("integer-width stems only accept a single optional option");c.options[0].replace(O,function(a,c,d,e,f,g){if(c)b.minimumIntegerDigits=d.length;else if(e&&f)throw Error("We currently do not support maximum integer digits");else if(g)throw Error("We currently do not support exact integer digits");return""});continue}if(P.test(c.stem)){b.minimumIntegerDigits=c.stem.length;continue}if(M.test(c.stem)){if(c.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");c.stem.replace(M,function(a,c,d,e,f,g){return"*"===d?b.minimumFractionDigits=c.length:e&&"#"===e[0]?b.maximumFractionDigits=e.length:f&&g?(b.minimumFractionDigits=f.length,b.maximumFractionDigits=f.length+g.length):(b.minimumFractionDigits=c.length,b.maximumFractionDigits=c.length),""});let a=c.options[0];"w"===a?b={...b,trailingZeroDisplay:"stripIfInteger"}:a&&(b={...b,...Q(a)});continue}if(N.test(c.stem)){b={...b,...Q(c.stem)};continue}let a=R(c.stem);a&&(b={...b,...a});let d=function(a){let b;if("E"===a[0]&&"E"===a[1]?(b={notation:"engineering"},a=a.slice(2)):"E"===a[0]&&(b={notation:"scientific"},a=a.slice(1)),b){let c=a.slice(0,2);if("+!"===c?(b.signDisplay="always",a=a.slice(2)):"+?"===c&&(b.signDisplay="exceptZero",a=a.slice(2)),!P.test(a))throw Error("Malformed concise eng/scientific notation");b.minimumIntegerDigits=a.length}return b}(c.stem);d&&(b={...b,...d})}return b}(c):{}},err:null}}tryParsePluralOrSelectOptions(a,b,c,d){let e=!1,f=[],g=new Set,{value:h,location:i}=d;for(;;){if(0===h.length){let a=this.clonePosition();if("select"!==b&&this.bumpIf("=")){let b=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_SELECTOR,I.INVALID_PLURAL_ARGUMENT_SELECTOR);if(b.err)return b;i=W(a,this.clonePosition()),h=this.message.slice(a.offset,this.offset())}else break}if(g.has(h))return this.error("select"===b?I.DUPLICATE_SELECT_ARGUMENT_SELECTOR:I.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,i);"other"===h&&(e=!0),this.bumpSpace();let d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===b?I.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:I.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,W(this.clonePosition(),this.clonePosition()));let j=this.parseMessage(a+1,b,c);if(j.err)return j;let k=this.tryParseArgumentClose(d);if(k.err)return k;f.push([h,{value:j.val,location:W(d,this.clonePosition())}]),g.add(h),this.bumpSpace(),{value:h,location:i}=this.parseIdentifierIfPossible()}return 0===f.length?this.error("select"===b?I.EXPECT_SELECT_ARGUMENT_SELECTOR:I.EXPECT_PLURAL_ARGUMENT_SELECTOR,W(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!e?this.error(I.MISSING_OTHER_CLAUSE,W(this.clonePosition(),this.clonePosition())):{val:f,err:null}}tryParseDecimalInteger(a,b){let c=1,d=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(c=-1);let e=!1,f=0;for(;!this.isEOF();){let a=this.char();if(a>=48&&a<=57)e=!0,f=10*f+(a-48),this.bump();else break}let g=W(d,this.clonePosition());return e?Number.isSafeInteger(f*=c)?{val:f,err:null}:this.error(b,g):this.error(a,g)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let a=this.position.offset;if(a>=this.message.length)throw Error("out of bound");let b=this.message.codePointAt(a);if(void 0===b)throw Error(`Offset ${a} is at invalid UTF-16 code unit boundary`);return b}error(a,b){return{val:null,err:{kind:a,message:this.message,location:b}}}bump(){if(this.isEOF())return;let a=this.char();10===a?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=a<65536?1:2)}bumpIf(a){if(this.message.startsWith(a,this.offset())){for(let b=0;b<a.length;b++)this.bump();return!0}return!1}bumpUntil(a){let b=this.offset(),c=this.message.indexOf(a,b);return c>=0?(this.bumpTo(c),!0):(this.bumpTo(this.message.length),!1)}bumpTo(a){if(this.offset()>a)throw Error(`targetOffset ${a} must be greater than or equal to the current offset ${this.offset()}`);for(a=Math.min(a,this.message.length);;){let b=this.offset();if(b===a)break;if(b>a)throw Error(`targetOffset ${a} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(var a;!this.isEOF()&&((a=this.char())>=9&&a<=13||32===a||133===a||a>=8206&&a<=8207||8232===a||8233===a);)this.bump()}peek(){if(this.isEOF())return null;let a=this.char(),b=this.offset();return this.message.charCodeAt(b+(a>=65536?2:1))??null}}function ad(a){return a>=97&&a<=122||a>=65&&a<=90}function ae(a,b={}){let c=new ac(a,b={shouldParseSkeletons:!0,requiresOtherClause:!0,...b}).parse();if(c.err){let a=SyntaxError(I[c.err.kind]);throw a.location=c.err.location,a.originalMessage=c.err.message,a}return b?.captureLocation||function a(b){b.forEach(b=>{if(delete b.location,D(b)||E(b))for(let c in b.options)delete b.options[c].location,a(b.options[c].value);else A(b)&&G(b.style)||(B(b)||C(b))&&H(b.style)?delete b.style.location:F(b)&&a(b.children)})}(c.val),c.val}let af=((h={}).MISSING_VALUE="MISSING_VALUE",h.INVALID_VALUE="INVALID_VALUE",h.MISSING_INTL_API="MISSING_INTL_API",h);class ag extends Error{code;originalMessage;constructor(a,b,c){super(a),this.code=b,this.originalMessage=c}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}}class ah extends ag{constructor(a,b,c,d){super(`Invalid values for "${a}": "${b}". Options are "${Object.keys(c).join('", "')}"`,af.INVALID_VALUE,d)}}class ai extends ag{constructor(a,b,c){super(`Value for "${a}" must be of type ${b}`,af.INVALID_VALUE,c)}}class aj extends ag{constructor(a,b){super(`The intl string context variable "${a}" was not provided to the string "${b}"`,af.MISSING_VALUE,b)}}let ak=((i={})[i.literal=0]="literal",i[i.object=1]="object",i);function al(a){return{create:()=>({get:b=>a[b],set(b,c){a[b]=c}})}}class am{ast;locales;resolvedLocale;formatters;formats;message;formatterCache={number:{},dateTime:{},pluralRules:{}};constructor(a,b=am.defaultLocale,c,d){if(this.locales=b,this.resolvedLocale=am.resolveLocale(b),"string"==typeof a){if(this.message=a,!am.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...b}=d||{};this.ast=am.__parse(a,{...b,locale:this.resolvedLocale})}else this.ast=a;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=function(a,b){return b?Object.keys(a).reduce((c,d)=>{var e,f;return c[d]=(e=a[d],(f=b[d])?{...e,...f,...Object.keys(e).reduce((a,b)=>(a[b]={...e[b],...f[b]},a),{})}:e),c},{...a}):a}(am.formats,c),this.formatters=d&&d.formatters||function(a={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:k((...a)=>new Intl.NumberFormat(...a),{cache:al(a.number),strategy:q.variadic}),getDateTimeFormat:k((...a)=>new Intl.DateTimeFormat(...a),{cache:al(a.dateTime),strategy:q.variadic}),getPluralRules:k((...a)=>new Intl.PluralRules(...a),{cache:al(a.pluralRules),strategy:q.variadic})}}(this.formatterCache)}format=a=>{let b=this.formatToParts(a);if(1===b.length)return b[0].value;let c=b.reduce((a,b)=>(a.length&&b.type===ak.literal&&"string"==typeof a[a.length-1]?a[a.length-1]+=b.value:a.push(b.value),a),[]);return c.length<=1?c[0]||"":c};formatToParts=a=>(function a(b,c,d,e,f,g,h){if(1===b.length&&z(b[0]))return[{type:ak.literal,value:b[0].value}];let i=[];for(let j of b){if(z(j)){i.push({type:ak.literal,value:j.value});continue}if(j.type===x.pound){"number"==typeof g&&i.push({type:ak.literal,value:d.getNumberFormat(c).format(g)});continue}let{value:b}=j;if(!(f&&b in f))throw new aj(b,h);let k=f[b];if(j.type===x.argument){k&&"string"!=typeof k&&"number"!=typeof k&&"bigint"!=typeof k||(k="string"==typeof k||"number"==typeof k||"bigint"==typeof k?String(k):""),i.push({type:"string"==typeof k?ak.literal:ak.object,value:k});continue}if(B(j)){let a="string"==typeof j.style?e.date[j.style]:H(j.style)?j.style.parsedOptions:void 0;i.push({type:ak.literal,value:d.getDateTimeFormat(c,a).format(k)});continue}if(C(j)){let a="string"==typeof j.style?e.time[j.style]:H(j.style)?j.style.parsedOptions:e.time.medium;i.push({type:ak.literal,value:d.getDateTimeFormat(c,a).format(k)});continue}if(A(j)){let a="string"==typeof j.style?e.number[j.style]:G(j.style)?j.style.parsedOptions:void 0;if(a&&a.scale){let b=a.scale||1;if("bigint"==typeof k){if(!Number.isInteger(b))throw TypeError(`Cannot apply fractional scale ${b} to bigint value. Scale must be an integer when formatting bigint.`);k*=BigInt(b)}else k*=b}i.push({type:ak.literal,value:d.getNumberFormat(c,a).format(k)});continue}if(F(j)){let{children:b,value:k}=j,l=f[k];if("function"!=typeof l)throw new ai(k,"function",h);let m=l(a(b,c,d,e,f,g).map(a=>a.value));Array.isArray(m)||(m=[m]),i.push(...m.map(a=>({type:"string"==typeof a?ak.literal:ak.object,value:a})))}if(D(j)){let b=k,g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other;if(!g)throw new ah(j.value,k,Object.keys(j.options),h);i.push(...a(g.value,c,d,e,f));continue}if(E(j)){let b=`=${k}`,g=Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0;if(!g){if(!Intl.PluralRules)throw new ag(`Intl.PluralRules is not available in this environment.
|
|
37
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let c of a.seen.entries()){let d=c[1];if(b===c[0]){e(c);continue}if(a.external){let d=a.external.registry.get(c[0])?.id;if(b!==c[0]&&d){e(c);continue}}if(a.metadataRegistry.get(c[0])?.id||d.cycle||d.count>1&&"ref"===a.reused){e(c);continue}}}function dZ(a,b){let c=a.seen.get(b);if(!c)throw Error("Unprocessed schema. This is a bug in Zod.");let d=b=>{let c=a.seen.get(b);if(null===c.ref)return;let e=c.def??c.schema,f={...e},g=c.ref;if(c.ref=null,g){d(g);let c=a.seen.get(g),h=c.schema;if(h.$ref&&("draft-07"===a.target||"draft-04"===a.target||"openapi-3.0"===a.target)?(e.allOf=e.allOf??[],e.allOf.push(h)):Object.assign(e,h),Object.assign(e,f),b._zod.parent===g)for(let a in e)"$ref"!==a&&"allOf"!==a&&(a in f||delete e[a]);if(h.$ref&&c.def)for(let a in e)"$ref"!==a&&"allOf"!==a&&a in c.def&&JSON.stringify(e[a])===JSON.stringify(c.def[a])&&delete e[a]}let h=b._zod.parent;if(h&&h!==g){d(h);let b=a.seen.get(h);if(b?.schema.$ref&&(e.$ref=b.schema.$ref,b.def))for(let a in e)"$ref"!==a&&"allOf"!==a&&a in b.def&&JSON.stringify(e[a])===JSON.stringify(b.def[a])&&delete e[a]}a.override({zodSchema:b,jsonSchema:e,path:c.path??[]})};for(let b of[...a.seen.entries()].reverse())d(b[0]);let e={};if("draft-2020-12"===a.target?e.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===a.target?e.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===a.target?e.$schema="http://json-schema.org/draft-04/schema#":a.target,a.external?.uri){let c=a.external.registry.get(b)?.id;if(!c)throw Error("Schema is missing an `id` property");e.$id=a.external.uri(c)}Object.assign(e,c.def??c.schema);let f=a.external?.defs??{};for(let b of a.seen.entries()){let a=b[1];a.def&&a.defId&&(f[a.defId]=a.def)}a.external||Object.keys(f).length>0&&("draft-2020-12"===a.target?e.$defs=f:e.definitions=f);try{let c=JSON.parse(JSON.stringify(e));return Object.defineProperty(c,"~standard",{value:{...b["~standard"],jsonSchema:{input:d$(b,"input",a.processors),output:d$(b,"output",a.processors)}},enumerable:!1,writable:!1}),c}catch(a){throw Error("Error converting schema to JSON.")}}let d$=(a,b,c={})=>d=>{let{libraryOptions:e,target:f}=d??{},g=dW({...e??{},target:f,io:b,processors:c});return dX(a,g),dY(g,a),dZ(g,a)},d_={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},d0=(a,b,c,d)=>{let e=a._zod.def,f=!1===e.inclusive,g=e.options.map((a,c)=>dX(a,b,{...d,path:[...d.path,f?"oneOf":"anyOf",c]}));f?c.oneOf=g:c.anyOf=g},d1=(a,b,c,d)=>{let e=a._zod.def;dX(e.innerType,b,d),b.seen.get(a).ref=e.innerType},d2=m("ZodISODateTime",(a,b)=>{bR.init(a,b),es.init(a,b)});function d3(a){return new d2({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...L(a)})}let d4=m("ZodISODate",(a,b)=>{bS.init(a,b),es.init(a,b)});function d5(a){return new d4({type:"string",format:"date",check:"string_format",...L(a)})}let d6=m("ZodISOTime",(a,b)=>{bT.init(a,b),es.init(a,b)});function d7(a){return new d6({type:"string",format:"time",check:"string_format",precision:null,...L(a)})}let d8=m("ZodISODuration",(a,b)=>{bU.init(a,b),es.init(a,b)});function d9(a){return new d8({type:"string",format:"duration",check:"string_format",...L(a)})}let ea=(a,b)=>{X.init(a,b),a.name="ZodError",Object.defineProperties(a,{format:{value:b=>(function(a,b=a=>a.message){let c={_errors:[]},d=a=>{for(let e of a.issues)if("invalid_union"===e.code&&e.errors.length)e.errors.map(a=>d({issues:a}));else if("invalid_key"===e.code)d({issues:e.issues});else if("invalid_element"===e.code)d({issues:e.issues});else if(0===e.path.length)c._errors.push(b(e));else{let a=c,d=0;for(;d<e.path.length;){let c=e.path[d];d===e.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(b(e))):a[c]=a[c]||{_errors:[]},a=a[c],d++}}};return d(a),c})(a,b)},flatten:{value:b=>(function(a,b=a=>a.message){let c={},d=[];for(let e of a.issues)e.path.length>0?(c[e.path[0]]=c[e.path[0]]||[],c[e.path[0]].push(b(e))):d.push(b(e));return{formErrors:d,fieldErrors:c}})(a,b)},addIssue:{value:b=>{a.issues.push(b),a.message=JSON.stringify(a.issues,t,2)}},addIssues:{value:b=>{a.issues.push(...b),a.message=JSON.stringify(a.issues,t,2)}},isEmpty:{get:()=>0===a.issues.length}})};m("ZodError",ea);let eb=m("ZodError",ea,{Parent:Error}),ec=Z(eb),ed=_(eb),ee=ab(eb),ef=ad(eb),eg=(a,b,c)=>{let d=c?Object.assign(c,{direction:"backward"}):{direction:"backward"};return Z(eb)(a,b,d)},eh=(a,b,c)=>Z(eb)(a,b,c),ei=async(a,b,c)=>{let d=c?Object.assign(c,{direction:"backward"}):{direction:"backward"};return _(eb)(a,b,d)},ej=async(a,b,c)=>_(eb)(a,b,c),ek=(a,b,c)=>{let d=c?Object.assign(c,{direction:"backward"}):{direction:"backward"};return ab(eb)(a,b,d)},el=(a,b,c)=>ab(eb)(a,b,c),em=async(a,b,c)=>{let d=c?Object.assign(c,{direction:"backward"}):{direction:"backward"};return ad(eb)(a,b,d)},en=async(a,b,c)=>ad(eb)(a,b,c),eo=m("ZodType",(a,b)=>(bD.init(a,b),Object.assign(a["~standard"],{jsonSchema:{input:d$(a,"input"),output:d$(a,"output")}}),a.toJSONSchema=((a,b={})=>c=>{let d=dW({...c,processors:b});return dX(a,d),dY(d,a),dZ(d,a)})(a,{}),a.def=b,a.type=b.type,Object.defineProperty(a,"_def",{value:b}),a.check=(...c)=>a.clone(A(b,{checks:[...b.checks??[],...c.map(a=>"function"==typeof a?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),a.with=a.check,a.clone=(b,c)=>K(a,b,c),a.brand=()=>a,a.register=(b,c)=>(b.add(a,c),a),a.parse=(b,c)=>ec(a,b,c,{callee:a.parse}),a.safeParse=(b,c)=>ee(a,b,c),a.parseAsync=async(b,c)=>ed(a,b,c,{callee:a.parseAsync}),a.safeParseAsync=async(b,c)=>ef(a,b,c),a.spa=a.safeParseAsync,a.encode=(b,c)=>eg(a,b,c),a.decode=(b,c)=>eh(a,b,c),a.encodeAsync=async(b,c)=>ei(a,b,c),a.decodeAsync=async(b,c)=>ej(a,b,c),a.safeEncode=(b,c)=>ek(a,b,c),a.safeDecode=(b,c)=>el(a,b,c),a.safeEncodeAsync=async(b,c)=>em(a,b,c),a.safeDecodeAsync=async(b,c)=>en(a,b,c),a.refine=(b,c)=>a.check(gP(b,c)),a.superRefine=b=>a.check(gQ(b)),a.overwrite=b=>a.check(dP(b)),a.optional=()=>gg(a),a.exactOptional=()=>gi(a),a.nullable=()=>gk(a),a.nullish=()=>gg(gk(a)),a.nonoptional=b=>gr(a,b),a.array=()=>fK(a),a.or=b=>fR([a,b]),a.and=b=>fX(a,b),a.transform=b=>gz(a,ge(b)),a.default=b=>gn(a,b),a.prefault=b=>gp(a,b),a.catch=b=>gv(a,b),a.pipe=b=>gz(a,b),a.readonly=()=>gD(a),a.describe=b=>{let c=a.clone();return c4.add(c,{description:b}),c},Object.defineProperty(a,"description",{get:()=>c4.get(a)?.description,configurable:!0}),a.meta=(...b)=>{if(0===b.length)return c4.get(a);let c=a.clone();return c4.add(c,b[0]),c},a.isOptional=()=>a.safeParse(void 0).success,a.isNullable=()=>a.safeParse(null).success,a.apply=b=>b(a),a)),ep=m("_ZodString",(a,b)=>{bE.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{c.type="string";let{minimum:e,maximum:f,format:g,patterns:h,contentEncoding:i}=a._zod.bag;if("number"==typeof e&&(c.minLength=e),"number"==typeof f&&(c.maxLength=f),g&&(c.format=d_[g]??g,""===c.format&&delete c.format,"time"===g&&delete c.format),i&&(c.contentEncoding=i),h&&h.size>0){let a=[...h];1===a.length?c.pattern=a[0].source:a.length>1&&(c.allOf=[...a.map(a=>({..."draft-07"===b.target||"draft-04"===b.target||"openapi-3.0"===b.target?{type:"string"}:{},pattern:a.source}))])}})(a,b,c,0);let c=a._zod.bag;a.format=c.format??null,a.minLength=c.minimum??null,a.maxLength=c.maximum??null,a.regex=(...b)=>a.check(dH(...b)),a.includes=(...b)=>a.check(dK(...b)),a.startsWith=(...b)=>a.check(dL(...b)),a.endsWith=(...b)=>a.check(dM(...b)),a.min=(...b)=>a.check(dF(...b)),a.max=(...b)=>a.check(dE(...b)),a.length=(...b)=>a.check(dG(...b)),a.nonempty=(...b)=>a.check(dF(1,...b)),a.lowercase=b=>a.check(dI(b)),a.uppercase=b=>a.check(dJ(b)),a.trim=()=>a.check(dR()),a.normalize=(...b)=>a.check(dQ(...b)),a.toLowerCase=()=>a.check(dS()),a.toUpperCase=()=>a.check(dT()),a.slugify=()=>a.check(dU())}),eq=m("ZodString",(a,b)=>{bE.init(a,b),ep.init(a,b),a.email=b=>a.check(c5(et,b)),a.url=b=>a.check(db(eC,b)),a.jwt=b=>a.check(dr(e7,b)),a.emoji=b=>a.check(dc(eF,b)),a.guid=b=>a.check(c6(ev,b)),a.uuid=b=>a.check(c7(ex,b)),a.uuidv4=b=>a.check(c8(ex,b)),a.uuidv6=b=>a.check(c9(ex,b)),a.uuidv7=b=>a.check(da(ex,b)),a.nanoid=b=>a.check(dd(eH,b)),a.guid=b=>a.check(c6(ev,b)),a.cuid=b=>a.check(de(eJ,b)),a.cuid2=b=>a.check(df(eL,b)),a.ulid=b=>a.check(dg(eN,b)),a.base64=b=>a.check(dn(e1,b)),a.base64url=b=>a.check(dp(e3,b)),a.xid=b=>a.check(dh(eP,b)),a.ksuid=b=>a.check(di(eR,b)),a.ipv4=b=>a.check(dj(eT,b)),a.ipv6=b=>a.check(dk(eX,b)),a.cidrv4=b=>a.check(dl(eZ,b)),a.cidrv6=b=>a.check(dm(e_,b)),a.e164=b=>a.check(dq(e5,b)),a.datetime=b=>a.check(d3(b)),a.date=b=>a.check(d5(b)),a.time=b=>a.check(d7(b)),a.duration=b=>a.check(d9(b))});function er(a){return new eq({type:"string",...L(a)})}let es=m("ZodStringFormat",(a,b)=>{bF.init(a,b),ep.init(a,b)}),et=m("ZodEmail",(a,b)=>{bI.init(a,b),es.init(a,b)});function eu(a){return c5(et,a)}let ev=m("ZodGUID",(a,b)=>{bG.init(a,b),es.init(a,b)});function ew(a){return c6(ev,a)}let ex=m("ZodUUID",(a,b)=>{bH.init(a,b),es.init(a,b)});function ey(a){return c7(ex,a)}function ez(a){return c8(ex,a)}function eA(a){return c9(ex,a)}function eB(a){return da(ex,a)}let eC=m("ZodURL",(a,b)=>{bJ.init(a,b),es.init(a,b)});function eD(a){return db(eC,a)}function eE(a){return db(eC,{protocol:/^https?$/,hostname:aH,...L(a)})}let eF=m("ZodEmoji",(a,b)=>{bK.init(a,b),es.init(a,b)});function eG(a){return dc(eF,a)}let eH=m("ZodNanoID",(a,b)=>{bL.init(a,b),es.init(a,b)});function eI(a){return dd(eH,a)}let eJ=m("ZodCUID",(a,b)=>{bM.init(a,b),es.init(a,b)});function eK(a){return de(eJ,a)}let eL=m("ZodCUID2",(a,b)=>{bN.init(a,b),es.init(a,b)});function eM(a){return df(eL,a)}let eN=m("ZodULID",(a,b)=>{bO.init(a,b),es.init(a,b)});function eO(a){return dg(eN,a)}let eP=m("ZodXID",(a,b)=>{bP.init(a,b),es.init(a,b)});function eQ(a){return dh(eP,a)}let eR=m("ZodKSUID",(a,b)=>{bQ.init(a,b),es.init(a,b)});function eS(a){return di(eR,a)}let eT=m("ZodIPv4",(a,b)=>{bV.init(a,b),es.init(a,b)});function eU(a){return dj(eT,a)}let eV=m("ZodMAC",(a,b)=>{bX.init(a,b),es.init(a,b)});function eW(a){return new eV({type:"string",format:"mac",check:"string_format",abort:!1,...L(a)})}let eX=m("ZodIPv6",(a,b)=>{bW.init(a,b),es.init(a,b)});function eY(a){return dk(eX,a)}let eZ=m("ZodCIDRv4",(a,b)=>{bY.init(a,b),es.init(a,b)});function e$(a){return dl(eZ,a)}let e_=m("ZodCIDRv6",(a,b)=>{bZ.init(a,b),es.init(a,b)});function e0(a){return dm(e_,a)}let e1=m("ZodBase64",(a,b)=>{b_.init(a,b),es.init(a,b)});function e2(a){return dn(e1,a)}let e3=m("ZodBase64URL",(a,b)=>{b0.init(a,b),es.init(a,b)});function e4(a){return dp(e3,a)}let e5=m("ZodE164",(a,b)=>{b1.init(a,b),es.init(a,b)});function e6(a){return dq(e5,a)}let e7=m("ZodJWT",(a,b)=>{b2.init(a,b),es.init(a,b)});function e8(a){return dr(e7,a)}let e9=m("ZodCustomStringFormat",(a,b)=>{b3.init(a,b),es.init(a,b)});function fa(a,b,c={}){return dV(e9,a,b,c)}function fb(a){return dV(e9,"hostname",aG,a)}function fc(a){return dV(e9,"hex",aX,a)}function fd(a,b){let c=b?.enc??"hex",d=`${a}_${c}`,e=i[d];if(!e)throw Error(`Unrecognized hash format: ${d}`);return dV(e9,d,e,b)}let fe=m("ZodNumber",(a,b)=>{b4.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let{minimum:e,maximum:f,format:g,multipleOf:h,exclusiveMaximum:i,exclusiveMinimum:j}=a._zod.bag;"string"==typeof g&&g.includes("int")?c.type="integer":c.type="number","number"==typeof j&&("draft-04"===b.target||"openapi-3.0"===b.target?(c.minimum=j,c.exclusiveMinimum=!0):c.exclusiveMinimum=j),"number"==typeof e&&(c.minimum=e,"number"==typeof j&&"draft-04"!==b.target&&(j>=e?delete c.minimum:delete c.exclusiveMinimum)),"number"==typeof i&&("draft-04"===b.target||"openapi-3.0"===b.target?(c.maximum=i,c.exclusiveMaximum=!0):c.exclusiveMaximum=i),"number"==typeof f&&(c.maximum=f,"number"==typeof i&&"draft-04"!==b.target&&(i<=f?delete c.maximum:delete c.exclusiveMaximum)),"number"==typeof h&&(c.multipleOf=h)})(a,b,c,0),a.gt=(b,c)=>a.check(du(b,c)),a.gte=(b,c)=>a.check(dv(b,c)),a.min=(b,c)=>a.check(dv(b,c)),a.lt=(b,c)=>a.check(ds(b,c)),a.lte=(b,c)=>a.check(dt(b,c)),a.max=(b,c)=>a.check(dt(b,c)),a.int=b=>a.check(fh(b)),a.safe=b=>a.check(fh(b)),a.positive=b=>a.check(du(0,b)),a.nonnegative=b=>a.check(dv(0,b)),a.negative=b=>a.check(ds(0,b)),a.nonpositive=b=>a.check(dt(0,b)),a.multipleOf=(b,c)=>a.check(dA(b,c)),a.step=(b,c)=>a.check(dA(b,c)),a.finite=()=>a;let c=a._zod.bag;a.minValue=Math.max(c.minimum??-1/0,c.exclusiveMinimum??-1/0)??null,a.maxValue=Math.min(c.maximum??1/0,c.exclusiveMaximum??1/0)??null,a.isInt=(c.format??"").includes("int")||Number.isSafeInteger(c.multipleOf??.5),a.isFinite=!0,a.format=c.format??null});function ff(a){return new fe({type:"number",checks:[],...L(a)})}let fg=m("ZodNumberFormat",(a,b)=>{b5.init(a,b),fe.init(a,b)});function fh(a){return new fg({type:"number",check:"number_format",abort:!1,format:"safeint",...L(a)})}function fi(a){return new fg({type:"number",check:"number_format",abort:!1,format:"float32",...L(a)})}function fj(a){return new fg({type:"number",check:"number_format",abort:!1,format:"float64",...L(a)})}function fk(a){return new fg({type:"number",check:"number_format",abort:!1,format:"int32",...L(a)})}function fl(a){return new fg({type:"number",check:"number_format",abort:!1,format:"uint32",...L(a)})}let fm=m("ZodBoolean",(a,b)=>{b6.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{b.type="boolean"}});function fn(a){return new fm({type:"boolean",...L(a)})}let fo=m("ZodBigInt",(a,b)=>{b7.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")})(0,a,0,0),a.gte=(b,c)=>a.check(dv(b,c)),a.min=(b,c)=>a.check(dv(b,c)),a.gt=(b,c)=>a.check(du(b,c)),a.gte=(b,c)=>a.check(dv(b,c)),a.min=(b,c)=>a.check(dv(b,c)),a.lt=(b,c)=>a.check(ds(b,c)),a.lte=(b,c)=>a.check(dt(b,c)),a.max=(b,c)=>a.check(dt(b,c)),a.positive=b=>a.check(du(BigInt(0),b)),a.negative=b=>a.check(ds(BigInt(0),b)),a.nonpositive=b=>a.check(dt(BigInt(0),b)),a.nonnegative=b=>a.check(dv(BigInt(0),b)),a.multipleOf=(b,c)=>a.check(dA(b,c));let c=a._zod.bag;a.minValue=c.minimum??null,a.maxValue=c.maximum??null,a.format=c.format??null});function fp(a){return new fo({type:"bigint",...L(a)})}let fq=m("ZodBigIntFormat",(a,b)=>{b8.init(a,b),fo.init(a,b)});function fr(a){return new fq({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...L(a)})}function fs(a){return new fq({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...L(a)})}let ft=m("ZodSymbol",(a,b)=>{b9.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")})(0,a,0,0)});function fu(a){return new ft({type:"symbol",...L(a)})}let fv=m("ZodUndefined",(a,b)=>{ca.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")})(0,a,0,0)});function fw(a){return new fv({type:"undefined",...L(a)})}let fx=m("ZodNull",(a,b)=>{cb.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{"openapi-3.0"===a.target?(b.type="string",b.nullable=!0,b.enum=[null]):b.type="null"}});function fy(a){return new fx({type:"null",...L(a)})}let fz=m("ZodAny",(a,b)=>{cc.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{}});function fA(){return new fz({type:"any"})}let fB=m("ZodUnknown",(a,b)=>{cd.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{}});function fC(){return new fB({type:"unknown"})}let fD=m("ZodNever",(a,b)=>{ce.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{b.not={}}});function fE(a){return new fD({type:"never",...L(a)})}let fF=m("ZodVoid",(a,b)=>{cf.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Void cannot be represented in JSON Schema")})(0,a,0,0)});function fG(a){return new fF({type:"void",...L(a)})}let fH=m("ZodDate",(a,b)=>{cg.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Date cannot be represented in JSON Schema")})(0,a,0,0),a.min=(b,c)=>a.check(dv(b,c)),a.max=(b,c)=>a.check(dt(b,c));let c=a._zod.bag;a.minDate=c.minimum?new Date(c.minimum):null,a.maxDate=c.maximum?new Date(c.maximum):null});function fI(a){return new fH({type:"date",...L(a)})}let fJ=m("ZodArray",(a,b)=>{ci.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def,{minimum:f,maximum:g}=a._zod.bag;"number"==typeof f&&(c.minItems=f),"number"==typeof g&&(c.maxItems=g),c.type="array",c.items=dX(e.element,b,{...d,path:[...d.path,"items"]})})(a,b,c,d),a.element=b.element,a.min=(b,c)=>a.check(dF(b,c)),a.nonempty=b=>a.check(dF(1,b)),a.max=(b,c)=>a.check(dE(b,c)),a.length=(b,c)=>a.check(dG(b,c)),a.unwrap=()=>a.element});function fK(a,b){return new fJ({type:"array",element:a,...L(b)})}function fL(a){return f7(Object.keys(a._zod.def.shape))}let fM=m("ZodObject",(a,b)=>{cn.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;c.type="object",c.properties={};let f=e.shape;for(let a in f)c.properties[a]=dX(f[a],b,{...d,path:[...d.path,"properties",a]});let g=new Set([...new Set(Object.keys(f))].filter(a=>{let c=e.shape[a]._zod;return"input"===b.io?void 0===c.optin:void 0===c.optout}));g.size>0&&(c.required=Array.from(g)),e.catchall?._zod.def.type==="never"?c.additionalProperties=!1:e.catchall?e.catchall&&(c.additionalProperties=dX(e.catchall,b,{...d,path:[...d.path,"additionalProperties"]})):"output"===b.io&&(c.additionalProperties=!1)})(a,b,c,d),y(a,"shape",()=>b.shape),a.keyof=()=>f7(Object.keys(a._zod.def.shape)),a.catchall=b=>a.clone({...a._zod.def,catchall:b}),a.passthrough=()=>a.clone({...a._zod.def,catchall:fC()}),a.loose=()=>a.clone({...a._zod.def,catchall:fC()}),a.strict=()=>a.clone({...a._zod.def,catchall:fE()}),a.strip=()=>a.clone({...a._zod.def,catchall:void 0}),a.extend=b=>(function(a,b){if(!F(b))throw Error("Invalid input to extend: expected a plain object");let c=a._zod.def.checks;if(c&&c.length>0){let c=a._zod.def.shape;for(let a in b)if(void 0!==Object.getOwnPropertyDescriptor(c,a))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let d=A(a._zod.def,{get shape(){let c={...a._zod.def.shape,...b};return z(this,"shape",c),c}});return K(a,d)})(a,b),a.safeExtend=b=>(function(a,b){if(!F(b))throw Error("Invalid input to safeExtend: expected a plain object");let c=A(a._zod.def,{get shape(){let c={...a._zod.def.shape,...b};return z(this,"shape",c),c}});return K(a,c)})(a,b),a.merge=b=>{let c;return c=A(a._zod.def,{get shape(){let c={...a._zod.def.shape,...b._zod.def.shape};return z(this,"shape",c),c},get catchall(){return b._zod.def.catchall},checks:[]}),K(a,c)},a.pick=b=>(function(a,b){let c=a._zod.def,d=c.checks;if(d&&d.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let e=A(a._zod.def,{get shape(){let a={};for(let d in b){if(!(d in c.shape))throw Error(`Unrecognized key: "${d}"`);b[d]&&(a[d]=c.shape[d])}return z(this,"shape",a),a},checks:[]});return K(a,e)})(a,b),a.omit=b=>(function(a,b){let c=a._zod.def,d=c.checks;if(d&&d.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let e=A(a._zod.def,{get shape(){let d={...a._zod.def.shape};for(let a in b){if(!(a in c.shape))throw Error(`Unrecognized key: "${a}"`);b[a]&&delete d[a]}return z(this,"shape",d),d},checks:[]});return K(a,e)})(a,b),a.partial=(...b)=>(function(a,b,c){let d=b._zod.def.checks;if(d&&d.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let e=A(b._zod.def,{get shape(){let d=b._zod.def.shape,e={...d};if(c)for(let b in c){if(!(b in d))throw Error(`Unrecognized key: "${b}"`);c[b]&&(e[b]=a?new a({type:"optional",innerType:d[b]}):d[b])}else for(let b in d)e[b]=a?new a({type:"optional",innerType:d[b]}):d[b];return z(this,"shape",e),e},checks:[]});return K(b,e)})(gf,a,b[0]),a.required=(...b)=>{var c;let d;return c=b[0],d=A(a._zod.def,{get shape(){let b=a._zod.def.shape,d={...b};if(c)for(let a in c){if(!(a in d))throw Error(`Unrecognized key: "${a}"`);c[a]&&(d[a]=new gq({type:"nonoptional",innerType:b[a]}))}else for(let a in b)d[a]=new gq({type:"nonoptional",innerType:b[a]});return z(this,"shape",d),d}}),K(a,d)}});function fN(a,b){return new fM({type:"object",shape:a??{},...L(b)})}function fO(a,b){return new fM({type:"object",shape:a,catchall:fE(),...L(b)})}function fP(a,b){return new fM({type:"object",shape:a,catchall:fC(),...L(b)})}let fQ=m("ZodUnion",(a,b)=>{cp.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>d0(a,b,c,d),a.options=b.options});function fR(a,b){return new fQ({type:"union",options:a,...L(b)})}let fS=m("ZodXor",(a,b)=>{fQ.init(a,b),cr.init(a,b),a._zod.processJSONSchema=(b,c,d)=>d0(a,b,c,d),a.options=b.options});function fT(a,b){return new fS({type:"union",options:a,inclusive:!1,...L(b)})}let fU=m("ZodDiscriminatedUnion",(a,b)=>{fQ.init(a,b),cs.init(a,b)});function fV(a,b,c){return new fU({type:"union",options:b,discriminator:a,...L(c)})}let fW=m("ZodIntersection",(a,b)=>{ct.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e,f,g,h;return f=dX((e=a._zod.def).left,b,{...d,path:[...d.path,"allOf",0]}),g=dX(e.right,b,{...d,path:[...d.path,"allOf",1]}),void(c.allOf=[...(h=a=>"allOf"in a&&1===Object.keys(a).length)(f)?f.allOf:[f],...h(g)?g.allOf:[g]])}});function fX(a,b){return new fW({type:"intersection",left:a,right:b})}let fY=m("ZodTuple",(a,b)=>{cv.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;c.type="array";let f="draft-2020-12"===b.target?"prefixItems":"items",g="draft-2020-12"===b.target||"openapi-3.0"===b.target?"items":"additionalItems",h=e.items.map((a,c)=>dX(a,b,{...d,path:[...d.path,f,c]})),i=e.rest?dX(e.rest,b,{...d,path:[...d.path,g,..."openapi-3.0"===b.target?[e.items.length]:[]]}):null;"draft-2020-12"===b.target?(c.prefixItems=h,i&&(c.items=i)):"openapi-3.0"===b.target?(c.items={anyOf:h},i&&c.items.anyOf.push(i),c.minItems=h.length,i||(c.maxItems=h.length)):(c.items=h,i&&(c.additionalItems=i));let{minimum:j,maximum:k}=a._zod.bag;"number"==typeof j&&(c.minItems=j),"number"==typeof k&&(c.maxItems=k)})(a,b,c,d),a.rest=b=>a.clone({...a._zod.def,rest:b})});function fZ(a,b,c){let d=b instanceof bD,e=d?c:b;return new fY({type:"tuple",items:a,rest:d?b:null,...L(e)})}let f$=m("ZodRecord",(a,b)=>{cx.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;c.type="object";let f=e.keyType,g=f._zod.bag,h=g?.patterns;if("loose"===e.mode&&h&&h.size>0){let a=dX(e.valueType,b,{...d,path:[...d.path,"patternProperties","*"]});for(let b of(c.patternProperties={},h))c.patternProperties[b.source]=a}else("draft-07"===b.target||"draft-2020-12"===b.target)&&(c.propertyNames=dX(e.keyType,b,{...d,path:[...d.path,"propertyNames"]})),c.additionalProperties=dX(e.valueType,b,{...d,path:[...d.path,"additionalProperties"]});let i=f._zod.values;if(i){let a=[...i].filter(a=>"string"==typeof a||"number"==typeof a);a.length>0&&(c.required=a)}})(a,b,c,d),a.keyType=b.keyType,a.valueType=b.valueType});function f_(a,b,c){return new f$({type:"record",keyType:a,valueType:b,...L(c)})}function f0(a,b,c){let d=K(a);return d._zod.values=void 0,new f$({type:"record",keyType:d,valueType:b,...L(c)})}function f1(a,b,c){return new f$({type:"record",keyType:a,valueType:b,mode:"loose",...L(c)})}let f2=m("ZodMap",(a,b)=>{cy.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Map cannot be represented in JSON Schema")})(0,a,0,0),a.keyType=b.keyType,a.valueType=b.valueType,a.min=(...b)=>a.check(dC(...b)),a.nonempty=b=>a.check(dC(1,b)),a.max=(...b)=>a.check(dB(...b)),a.size=(...b)=>a.check(dD(...b))});function f3(a,b,c){return new f2({type:"map",keyType:a,valueType:b,...L(c)})}let f4=m("ZodSet",(a,b)=>{cA.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Set cannot be represented in JSON Schema")})(0,a,0,0),a.min=(...b)=>a.check(dC(...b)),a.nonempty=b=>a.check(dC(1,b)),a.max=(...b)=>a.check(dB(...b)),a.size=(...b)=>a.check(dD(...b))});function f5(a,b){return new f4({type:"set",valueType:a,...L(b)})}let f6=m("ZodEnum",(a,b)=>{cC.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;(e=r(a._zod.def.entries)).every(a=>"number"==typeof a)&&(c.type="number"),e.every(a=>"string"==typeof a)&&(c.type="string"),c.enum=e},a.enum=b.entries,a.options=Object.values(b.entries);let c=new Set(Object.keys(b.entries));a.extract=(a,d)=>{let e={};for(let d of a)if(c.has(d))e[d]=b.entries[d];else throw Error(`Key ${d} not found in enum`);return new f6({...b,checks:[],...L(d),entries:e})},a.exclude=(a,d)=>{let e={...b.entries};for(let b of a)if(c.has(b))delete e[b];else throw Error(`Key ${b} not found in enum`);return new f6({...b,checks:[],...L(d),entries:e})}});function f7(a,b){return new f6({type:"enum",entries:Array.isArray(a)?Object.fromEntries(a.map(a=>[a,a])):a,...L(b)})}function f8(a,b){return new f6({type:"enum",entries:a,...L(b)})}let f9=m("ZodLiteral",(a,b)=>{cD.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def,f=[];for(let a of e.values)if(void 0===a){if("throw"===b.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof a)if("throw"===b.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else f.push(Number(a));else f.push(a);if(0===f.length);else if(1===f.length){let a=f[0];c.type=null===a?"null":typeof a,"draft-04"===b.target||"openapi-3.0"===b.target?c.enum=[a]:c.const=a}else f.every(a=>"number"==typeof a)&&(c.type="number"),f.every(a=>"string"==typeof a)&&(c.type="string"),f.every(a=>"boolean"==typeof a)&&(c.type="boolean"),f.every(a=>null===a)&&(c.type="null"),c.enum=f})(a,b,c,0),a.values=new Set(b.values),Object.defineProperty(a,"value",{get(){if(b.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return b.values[0]}})});function ga(a,b){return new f9({type:"literal",values:Array.isArray(a)?a:[a],...L(b)})}let gb=m("ZodFile",(a,b)=>{cE.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e={type:"string",format:"binary",contentEncoding:"binary"},{minimum:f,maximum:g,mime:h}=a._zod.bag;void 0!==f&&(e.minLength=f),void 0!==g&&(e.maxLength=g),h?1===h.length?(e.contentMediaType=h[0],Object.assign(c,e)):(Object.assign(c,e),c.anyOf=h.map(a=>({contentMediaType:a}))):Object.assign(c,e)})(a,0,c,0),a.min=(b,c)=>a.check(dC(b,c)),a.max=(b,c)=>a.check(dB(b,c)),a.mime=(b,c)=>a.check(dO(Array.isArray(b)?b:[b],c))});function gc(a){return new gb({type:"file",...L(a)})}let gd=m("ZodTransform",(a,b)=>{cF.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,a,0,0),a._zod.parse=(c,d)=>{if("backward"===d.direction)throw new o(a.constructor.name);c.addIssue=d=>{"string"==typeof d?c.issues.push(V(d,c.value,b)):(d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=c.value),d.inst??(d.inst=a),c.issues.push(V(d)))};let e=b.transform(c.value,c);return e instanceof Promise?e.then(a=>(c.value=a,c)):(c.value=e,c)}});function ge(a){return new gd({type:"transform",transform:a})}let gf=m("ZodOptional",(a,b)=>{cH.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>d1(a,b,c,d),a.unwrap=()=>a._zod.def.innerType});function gg(a){return new gf({type:"optional",innerType:a})}let gh=m("ZodExactOptional",(a,b)=>{cI.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>d1(a,b,c,d),a.unwrap=()=>a._zod.def.innerType});function gi(a){return new gh({type:"optional",innerType:a})}let gj=m("ZodNullable",(a,b)=>{cJ.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e,f,g;return f=dX((e=a._zod.def).innerType,b,d),g=b.seen.get(a),void("openapi-3.0"===b.target?(g.ref=e.innerType,c.nullable=!0):c.anyOf=[f,{type:"null"}])},a.unwrap=()=>a._zod.def.innerType});function gk(a){return new gj({type:"nullable",innerType:a})}function gl(a){return gg(gk(a))}let gm=m("ZodDefault",(a,b)=>{cK.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX((e=a._zod.def).innerType,b,d),b.seen.get(a).ref=e.innerType,c.default=JSON.parse(JSON.stringify(e.defaultValue))},a.unwrap=()=>a._zod.def.innerType,a.removeDefault=a.unwrap});function gn(a,b){return new gm({type:"default",innerType:a,get defaultValue(){return"function"==typeof b?b():G(b)}})}let go=m("ZodPrefault",(a,b)=>{cM.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX((e=a._zod.def).innerType,b,d),b.seen.get(a).ref=e.innerType,"input"===b.io&&(c._prefault=JSON.parse(JSON.stringify(e.defaultValue)))},a.unwrap=()=>a._zod.def.innerType});function gp(a,b){return new go({type:"prefault",innerType:a,get defaultValue(){return"function"==typeof b?b():G(b)}})}let gq=m("ZodNonOptional",(a,b)=>{cN.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX((e=a._zod.def).innerType,b,d),b.seen.get(a).ref=e.innerType},a.unwrap=()=>a._zod.def.innerType});function gr(a,b){return new gq({type:"nonoptional",innerType:a,...L(b)})}let gs=m("ZodSuccess",(a,b)=>{cP.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{b.type="boolean"},a.unwrap=()=>a._zod.def.innerType});function gt(a){return new gs({type:"success",innerType:a})}let gu=m("ZodCatch",(a,b)=>{cQ.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e,f=a._zod.def;dX(f.innerType,b,d),b.seen.get(a).ref=f.innerType;try{e=f.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}c.default=e})(a,b,c,d),a.unwrap=()=>a._zod.def.innerType,a.removeCatch=a.unwrap});function gv(a,b){return new gu({type:"catch",innerType:a,catchValue:"function"==typeof b?b:()=>b})}let gw=m("ZodNaN",(a,b)=>{cR.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")})(0,a,0,0)});function gx(a){return new gw({type:"nan",...L(a)})}let gy=m("ZodPipe",(a,b)=>{cS.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e,f;return e=a._zod.def,void(dX(f="input"===b.io?"transform"===e.in._zod.def.type?e.out:e.in:e.out,b,d),b.seen.get(a).ref=f)},a.in=b.in,a.out=b.out});function gz(a,b){return new gy({type:"pipe",in:a,out:b})}let gA=m("ZodCodec",(a,b)=>{gy.init(a,b),cU.init(a,b)});function gB(a,b,c){return new gA({type:"pipe",in:a,out:b,transform:c.decode,reverseTransform:c.encode})}let gC=m("ZodReadonly",(a,b)=>{cX.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX((e=a._zod.def).innerType,b,d),b.seen.get(a).ref=e.innerType,c.readOnly=!0},a.unwrap=()=>a._zod.def.innerType});function gD(a){return new gC({type:"readonly",innerType:a})}let gE=m("ZodTemplateLiteral",(a,b)=>{cZ.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.pattern;if(!e)throw Error("Pattern not found in template literal");c.type="string",c.pattern=e.source})(a,0,c,0)});function gF(a,b){return new gE({type:"template_literal",parts:a,...L(b)})}let gG=m("ZodLazy",(a,b)=>{c0.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX(e=a._zod.innerType,b,d),b.seen.get(a).ref=e},a.unwrap=()=>a._zod.def.getter()});function gH(a){return new gG({type:"lazy",getter:a})}let gI=m("ZodPromise",(a,b)=>{c_.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(b,c,d)=>{let e;dX((e=a._zod.def).innerType,b,d),b.seen.get(a).ref=e.innerType},a.unwrap=()=>a._zod.def.innerType});function gJ(a){return new gI({type:"promise",innerType:a})}let gK=m("ZodFunction",(a,b)=>{c$.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")})(0,a,0,0)});function gL(a){return new gK({type:"function",input:Array.isArray(a?.input)?fZ(a?.input):a?.input??fK(fC()),output:a?.output??fC()})}let gM=m("ZodCustom",(a,b)=>{c1.init(a,b),eo.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,a,0,0)});function gN(a){let b=new bd({check:"custom"});return b._zod.check=a,b}function gO(a,b){var c;let d;return c=a??(()=>!0),(d=L(b)).abort??(d.abort=!0),new gM({type:"custom",check:"custom",fn:c,...d})}function gP(a,b={}){return new gM({type:"custom",check:"custom",fn:a,...L(b)})}function gQ(a){var b;let c,d;return b=b=>(b.addIssue=a=>{"string"==typeof a?b.issues.push(V(a,b.value,c._zod.def)):(a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=b.value),a.inst??(a.inst=c),a.continue??(a.continue=!c._zod.def.abort),b.issues.push(V(a)))},a(b.value,b)),(d=new bd({check:"custom",...L(void 0)}))._zod.check=b,c=d}let gR=function(a){let b=new bd({check:"describe"});return b._zod.onattach=[b=>{let c=c4.get(b)??{};c4.add(b,{...c,description:a})}],b._zod.check=()=>{},b},gS=function(a){let b=new bd({check:"meta"});return b._zod.onattach=[b=>{let c=c4.get(b)??{};c4.add(b,{...c,...a})}],b._zod.check=()=>{},b};function gT(a,b={}){let c=new gM({type:"custom",check:"custom",fn:b=>b instanceof a,abort:!0,...L(b)});return c._zod.bag.Class=a,c._zod.check=b=>{b.value instanceof a||b.issues.push({code:"invalid_type",expected:a.name,input:b.value,inst:c,path:[...c._zod.def.path??[]]})},c}let gU=(...a)=>(function(a,b){let c=L(b),d=c.truthy??["true","1","yes","on","y","enabled"],e=c.falsy??["false","0","no","off","n","disabled"];"sensitive"!==c.case&&(d=d.map(a=>"string"==typeof a?a.toLowerCase():a),e=e.map(a=>"string"==typeof a?a.toLowerCase():a));let f=new Set(d),g=new Set(e),h=a.Codec??cU,i=a.Boolean??b6,j=new h({type:"pipe",in:new(a.String??bE)({type:"string",error:c.error}),out:new i({type:"boolean",error:c.error}),transform:(a,b)=>{let d=a;return"sensitive"!==c.case&&(d=d.toLowerCase()),!!f.has(d)||!g.has(d)&&(b.issues.push({code:"invalid_value",expected:"stringbool",values:[...f,...g],input:b.value,inst:j,continue:!1}),{})},reverseTransform:(a,b)=>!0===a?d[0]||"true":e[0]||"false",error:c.error});return j})({Codec:gA,Boolean:fm,String:eq},...a);function gV(a){let b=gH(()=>fR([er(a),ff(),fn(),fy(),fK(b),f_(er(),b)]));return b}function gW(a,b){return gz(ge(a),b)}h||(h={}),q({localeError:(d={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},e={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},f={nan:"NaN"},a=>{switch(a.code){case"invalid_type":{let b=f[a.expected]??a.expected,c=function(a){let b=typeof a;switch(b){case"number":return Number.isNaN(a)?"nan":"number";case"object":if(null===a)return"null";if(Array.isArray(a))return"array";if(a&&Object.getPrototypeOf(a)!==Object.prototype&&"constructor"in a&&a.constructor)return a.constructor.name}return b}(a.input),d=f[c]??c;return`Invalid input: expected ${b}, received ${d}`}case"invalid_value":if(1===a.values.length)return`Invalid input: expected ${M(a.values[0])}`;return`Invalid option: expected one of ${s(a.values,"|")}`;case"too_big":{let b=a.inclusive?"<=":"<",c=d[a.origin]??null;if(c)return`Too big: expected ${a.origin??"value"} to have ${b}${a.maximum.toString()} ${c.unit??"elements"}`;return`Too big: expected ${a.origin??"value"} to be ${b}${a.maximum.toString()}`}case"too_small":{let b=a.inclusive?">=":">",c=d[a.origin]??null;if(c)return`Too small: expected ${a.origin} to have ${b}${a.minimum.toString()} ${c.unit}`;return`Too small: expected ${a.origin} to be ${b}${a.minimum.toString()}`}case"invalid_format":if("starts_with"===a.format)return`Invalid string: must start with "${a.prefix}"`;if("ends_with"===a.format)return`Invalid string: must end with "${a.suffix}"`;if("includes"===a.format)return`Invalid string: must include "${a.includes}"`;if("regex"===a.format)return`Invalid string: must match pattern ${a.pattern}`;return`Invalid ${e[a.format]??a.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${a.divisor}`;case"unrecognized_keys":return`Unrecognized key${a.keys.length>1?"s":""}: ${s(a.keys,", ")}`;case"invalid_key":return`Invalid key in ${a.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${a.origin}`}})})},62026:(a,b,c)=>{"use strict";c.d(b,{A:()=>f});var d=c(91986),e=c(23807);let f=(0,d.cache)(async function(){return(await (0,e.A)()).locale})},62626:(a,b,c)=>{"use strict";c.d(b,{default:()=>f});var d=c(89400),e=c(48249);function f({locale:a,...b}){if(!a)throw Error(void 0);return(0,e.jsx)(d.Dk,{locale:a,...b})}},68625:(a,b,c)=>{"use strict";c.d(b,{A:()=>n});var d=c(91986),e=c(23807);let f=(0,d.cache)(async function(a){return(await (0,e.A)(a)).now}),g=(0,d.cache)(async function(){return(await (0,e.A)()).formats});var h=c(86392),i=c(5735);let j=(0,d.cache)(async function(a){return(await (0,e.A)(a)).timeZone});async function k(a){return j(a?.locale)}var l=c(28440),m=c(62026);async function n({formats:a,locale:b,messages:c,now:d,timeZone:e,...j}){return(0,i.jsx)(h.default,{formats:void 0===a?await g():a,locale:b??await (0,m.A)(),messages:void 0===c?await (0,l.A)():c,now:d??await f(),timeZone:e??await k(),...j})}},86392:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/OmniRoute/OmniRoute/node_modules/next-intl/dist/esm/production/shared/NextIntlClientProvider.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/OmniRoute/OmniRoute/node_modules/next-intl/dist/esm/production/shared/NextIntlClientProvider.js","default")},89400:(a,b,c)=>{"use strict";c.d(b,{Dk:()=>av,kc:()=>aB,Ym:()=>aA,c3:()=>az});var d,e,f,g,h,i,j=c(67484);function k(a,b){let c=b&&b.cache?b.cache:p,d=b&&b.serializer?b.serializer:n;return(b&&b.strategy?b.strategy:function(a,b){var c,d;let e=1===a.length?l:m;return c=b.cache.create(),d=b.serializer,e.bind(this,a,c,d)})(a,{cache:c,serializer:d})}function l(a,b,c,d){let e=null==d||"number"==typeof d||"boolean"==typeof d?d:c(d),f=b.get(e);return void 0===f&&(f=a.call(this,d),b.set(e,f)),f}function m(a,b,c){let d=Array.prototype.slice.call(arguments,3),e=c(d),f=b.get(e);return void 0===f&&(f=a.apply(this,d),b.set(e,f)),f}let n=function(){return JSON.stringify(arguments)};class o{cache;constructor(){this.cache=Object.create(null)}get(a){return this.cache[a]}set(a,b){this.cache[a]=b}}let p={create:function(){return new o}},q={variadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,m.bind(this,a,c,d)},monadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,l.bind(this,a,c,d)}};class r extends Error{constructor(a,b){let c=a;b&&(c+=": "+b),super(c),this.code=a,b&&(this.originalMessage=b)}}var s=((d=s||{}).MISSING_MESSAGE="MISSING_MESSAGE",d.MISSING_FORMAT="MISSING_FORMAT",d.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",d.INSUFFICIENT_PATH="INSUFFICIENT_PATH",d.INVALID_MESSAGE="INVALID_MESSAGE",d.INVALID_KEY="INVALID_KEY",d.FORMATTING_ERROR="FORMATTING_ERROR",d);function t(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function u(a,b){return k(a,{cache:{create:()=>({get:a=>b[a],set(a,c){b[a]=c}})},strategy:q.variadic})}function v(a,b){return u((...b)=>new a(...b),b)}function w(a){return{getDateTimeFormat:v(Intl.DateTimeFormat,a.dateTime),getNumberFormat:v(Intl.NumberFormat,a.number),getPluralRules:v(Intl.PluralRules,a.pluralRules),getRelativeTimeFormat:v(Intl.RelativeTimeFormat,a.relativeTime),getListFormat:v(Intl.ListFormat,a.list),getDisplayNames:v(Intl.DisplayNames,a.displayNames)}}let x=((e={})[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag",e),y=((f={})[f.number=0]="number",f[f.dateTime=1]="dateTime",f);function z(a){return a.type===x.literal}function A(a){return a.type===x.number}function B(a){return a.type===x.date}function C(a){return a.type===x.time}function D(a){return a.type===x.select}function E(a){return a.type===x.plural}function F(a){return a.type===x.tag}function G(a){return!!(a&&"object"==typeof a&&a.type===y.number)}function H(a){return!!(a&&"object"==typeof a&&a.type===y.dateTime)}let I=((g={})[g.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",g[g.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",g[g.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",g[g.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",g[g.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",g[g.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",g[g.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",g[g.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",g[g.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",g[g.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",g[g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",g[g.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",g[g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",g[g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",g[g.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",g[g.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",g[g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",g[g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",g[g.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",g[g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",g[g.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",g[g.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",g[g.INVALID_TAG=23]="INVALID_TAG",g[g.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",g[g.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",g[g.UNCLOSED_TAG=27]="UNCLOSED_TAG",g),J=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,K=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,L=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,M=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,N=/^(@+)?(\+|#+)?[rs]?$/g,O=/(\*)(0+)|(#+)(0+)|(0+)/g,P=/^(0+)$/;function Q(a){let b={};return"r"===a[a.length-1]?b.roundingPriority="morePrecision":"s"===a[a.length-1]&&(b.roundingPriority="lessPrecision"),a.replace(N,function(a,c,d){return"string"!=typeof d?(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length):"+"===d?b.minimumSignificantDigits=c.length:"#"===c[0]?b.maximumSignificantDigits=c.length:(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length+("string"==typeof d?d.length:0)),""}),b}function R(a){switch(a){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function S(a){let b=R(a);return b||{}}let T={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},U=RegExp(`^${J.source}*`),V=RegExp(`${J.source}*$`);function W(a,b){return{start:a,end:b}}let X=!!Object.fromEntries,Y=!!String.prototype.trimStart,Z=!!String.prototype.trimEnd,$=X?Object.fromEntries:function(a){let b={};for(let[c,d]of a)b[c]=d;return b},_=Y?function(a){return a.trimStart()}:function(a){return a.replace(U,"")},aa=Z?function(a){return a.trimEnd()}:function(a){return a.replace(V,"")},ab=RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");class ac{message;position;locale;ignoreTag;requiresOtherClause;shouldParseSkeletons;constructor(a,b={}){this.message=a,this.position={offset:0,line:1,column:1},this.ignoreTag=!!b.ignoreTag,this.locale=b.locale,this.requiresOtherClause=!!b.requiresOtherClause,this.shouldParseSkeletons=!!b.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(a,b,c){let d=[];for(;!this.isEOF();){let e=this.char();if(123===e){let b=this.parseArgument(a,c);if(b.err)return b;d.push(b.val)}else if(125===e&&a>0)break;else if(35===e&&("plural"===b||"selectordinal"===b)){let a=this.clonePosition();this.bump(),d.push({type:x.pound,location:W(a,this.clonePosition())})}else if(60!==e||this.ignoreTag||47!==this.peek())if(60===e&&!this.ignoreTag&&ad(this.peek()||0)){let c=this.parseTag(a,b);if(c.err)return c;d.push(c.val)}else{let c=this.parseLiteral(a,b);if(c.err)return c;d.push(c.val)}else if(!c)return this.error(I.UNMATCHED_CLOSING_TAG,W(this.clonePosition(),this.clonePosition()));else break}return{val:d,err:null}}parseTag(a,b){let c=this.clonePosition();this.bump();let d=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:x.literal,value:`<${d}/>`,location:W(c,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(I.INVALID_TAG,W(c,this.clonePosition()));{let e=this.parseMessage(a+1,b,!0);if(e.err)return e;let f=e.val,g=this.clonePosition();if(!this.bumpIf("</"))return this.error(I.UNCLOSED_TAG,W(c,this.clonePosition()));{if(this.isEOF()||!ad(this.char()))return this.error(I.INVALID_TAG,W(g,this.clonePosition()));let a=this.clonePosition();return d!==this.parseTagName()?this.error(I.UNMATCHED_CLOSING_TAG,W(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:x.tag,value:d,children:f,location:W(c,this.clonePosition())},err:null}:this.error(I.INVALID_TAG,W(g,this.clonePosition()))}}}parseTagName(){var a;let b=this.offset();for(this.bump();!this.isEOF()&&(45===(a=this.char())||46===a||a>=48&&a<=57||95===a||a>=97&&a<=122||a>=65&&a<=90||183==a||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039);)this.bump();return this.message.slice(b,this.offset())}parseLiteral(a,b){let c=this.clonePosition(),d="";for(;;){let c=this.tryParseQuote(b);if(c){d+=c;continue}let e=this.tryParseUnquoted(a,b);if(e){d+=e;continue}let f=this.tryParseLeftAngleBracket();if(f){d+=f;continue}break}let e=W(c,this.clonePosition());return{val:{type:x.literal,value:d,location:e},err:null}}tryParseLeftAngleBracket(){var a;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ad(a=this.peek()||0)||47===a)?null:(this.bump(),"<")}tryParseQuote(a){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===a||"selectordinal"===a)break;return null;default:return null}this.bump();let b=[this.char()];for(this.bump();!this.isEOF();){let a=this.char();if(39===a)if(39===this.peek())b.push(39),this.bump();else{this.bump();break}else b.push(a);this.bump()}return String.fromCodePoint(...b)}tryParseUnquoted(a,b){if(this.isEOF())return null;let c=this.char();return 60===c||123===c||35===c&&("plural"===b||"selectordinal"===b)||125===c&&a>0?null:(this.bump(),String.fromCodePoint(c))}parseArgument(a,b){let c=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));if(125===this.char())return this.bump(),this.error(I.EMPTY_ARGUMENT,W(c,this.clonePosition()));let d=this.parseIdentifierIfPossible().value;if(!d)return this.error(I.MALFORMED_ARGUMENT,W(c,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:x.argument,value:d,location:W(c,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));return this.parseArgumentOptions(a,b,d,c);default:return this.error(I.MALFORMED_ARGUMENT,W(c,this.clonePosition()))}}parseIdentifierIfPossible(){var a;let b=this.clonePosition(),c=this.offset(),d=(a=this.message,ab.lastIndex=c,ab.exec(a)[1]??""),e=c+d.length;return this.bumpTo(e),{value:d,location:W(b,this.clonePosition())}}parseArgumentOptions(a,b,c,d){let e=this.clonePosition(),f=this.parseIdentifierIfPossible().value,g=this.clonePosition();switch(f){case"":return this.error(I.EXPECT_ARGUMENT_TYPE,W(e,g));case"number":case"date":case"time":{this.bumpSpace();let a=null;if(this.bumpIf(",")){this.bumpSpace();let b=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;let d=aa(c.val);if(0===d.length)return this.error(I.EXPECT_ARGUMENT_STYLE,W(this.clonePosition(),this.clonePosition()));a={style:d,styleLocation:W(b,this.clonePosition())}}let b=this.tryParseArgumentClose(d);if(b.err)return b;let e=W(d,this.clonePosition());if(a&&a.style.startsWith("::")){let b=_(a.style.slice(2));if("number"===f){let d=this.parseNumberSkeletonFromString(b,a.styleLocation);if(d.err)return d;return{val:{type:x.number,value:c,location:e,style:d.val},err:null}}{let d;if(0===b.length)return this.error(I.EXPECT_DATE_TIME_SKELETON,e);let g=b;this.locale&&(g=function(a,b){let c="";for(let d=0;d<a.length;d++){let e=a.charAt(d);if("j"===e){let f=0;for(;d+1<a.length&&a.charAt(d+1)===e;)f++,d++;let g=1+(1&f),h=f<2?1:3+(f>>1),i=function(a){let b,c=a.hourCycle;if(void 0===c&&a.hourCycles&&a.hourCycles.length&&(c=a.hourCycles[0]),c)switch(c){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}let d=a.language;return"root"!==d&&(b=a.maximize().region),(T[b||""]||T[d||""]||T[`${d}-001`]||T["001"])[0]}(b);for(("H"==i||"k"==i)&&(h=0);h-- >0;)c+="a";for(;g-- >0;)c=i+c}else"J"===e?c+="H":c+=e}return c}(b,this.locale));let h={type:y.dateTime,pattern:g,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?(d={},g.replace(K,a=>{let b=a.length;switch(a[0]){case"G":d.era=4===b?"long":5===b?"narrow":"short";break;case"y":d.year=2===b?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":d.month=["numeric","2-digit","short","long","narrow"][b-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":d.day=["numeric","2-digit"][b-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":d.weekday=4===b?"long":5===b?"narrow":"short";break;case"e":if(b<4)throw RangeError("`e..eee` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"c":if(b<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"a":d.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":d.hourCycle="h12",d.hour=["numeric","2-digit"][b-1];break;case"H":d.hourCycle="h23",d.hour=["numeric","2-digit"][b-1];break;case"K":d.hourCycle="h11",d.hour=["numeric","2-digit"][b-1];break;case"k":d.hourCycle="h24",d.hour=["numeric","2-digit"][b-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":d.minute=["numeric","2-digit"][b-1];break;case"s":d.second=["numeric","2-digit"][b-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":d.timeZoneName=b<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),d):{}};return{val:{type:"date"===f?x.date:x.time,value:c,location:e,style:h},err:null}}}return{val:{type:"number"===f?x.number:"date"===f?x.date:x.time,value:c,location:e,style:a?.style??null},err:null}}case"plural":case"selectordinal":case"select":{let e=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(I.EXPECT_SELECT_ARGUMENT_OPTIONS,W(e,{...e}));this.bumpSpace();let g=this.parseIdentifierIfPossible(),h=0;if("select"!==f&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,W(this.clonePosition(),this.clonePosition()));this.bumpSpace();let a=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,I.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(a.err)return a;this.bumpSpace(),g=this.parseIdentifierIfPossible(),h=a.val}let i=this.tryParsePluralOrSelectOptions(a,f,b,g);if(i.err)return i;let j=this.tryParseArgumentClose(d);if(j.err)return j;let k=W(d,this.clonePosition());if("select"===f)return{val:{type:x.select,value:c,options:$(i.val),location:k},err:null};return{val:{type:x.plural,value:c,options:$(i.val),offset:h,pluralType:"plural"===f?"cardinal":"ordinal",location:k},err:null}}default:return this.error(I.INVALID_ARGUMENT_TYPE,W(e,g))}}tryParseArgumentClose(a){return this.isEOF()||125!==this.char()?this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(a,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let a=0,b=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(I.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,W(a,this.clonePosition()));this.bump();break}case 123:a+=1,this.bump();break;case 125:if(!(a>0))return{val:this.message.slice(b.offset,this.offset()),err:null};a-=1;break;default:this.bump()}return{val:this.message.slice(b.offset,this.offset()),err:null}}parseNumberSkeletonFromString(a,b){let c=[];try{c=function(a){if(0===a.length)throw Error("Number skeleton cannot be empty");let b=a.split(L).filter(a=>a.length>0),c=[];for(let a of b){let b=a.split("/");if(0===b.length)throw Error("Invalid number skeleton");let[d,...e]=b;for(let a of e)if(0===a.length)throw Error("Invalid number skeleton");c.push({stem:d,options:e})}return c}(a)}catch{return this.error(I.INVALID_NUMBER_SKELETON,b)}return{val:{type:y.number,tokens:c,location:b,parsedOptions:this.shouldParseSkeletons?function(a){let b={};for(let c of a){switch(c.stem){case"percent":case"%":b.style="percent";continue;case"%x100":b.style="percent",b.scale=100;continue;case"currency":b.style="currency",b.currency=c.options[0];continue;case"group-off":case",_":b.useGrouping=!1;continue;case"precision-integer":case".":b.maximumFractionDigits=0;continue;case"measure-unit":case"unit":b.style="unit",b.unit=c.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":b.notation="compact",b.compactDisplay="short";continue;case"compact-long":case"KK":b.notation="compact",b.compactDisplay="long";continue;case"scientific":b={...b,notation:"scientific",...c.options.reduce((a,b)=>({...a,...S(b)}),{})};continue;case"engineering":b={...b,notation:"engineering",...c.options.reduce((a,b)=>({...a,...S(b)}),{})};continue;case"notation-simple":b.notation="standard";continue;case"unit-width-narrow":b.currencyDisplay="narrowSymbol",b.unitDisplay="narrow";continue;case"unit-width-short":b.currencyDisplay="code",b.unitDisplay="short";continue;case"unit-width-full-name":b.currencyDisplay="name",b.unitDisplay="long";continue;case"unit-width-iso-code":b.currencyDisplay="symbol";continue;case"scale":b.scale=parseFloat(c.options[0]);continue;case"rounding-mode-floor":b.roundingMode="floor";continue;case"rounding-mode-ceiling":b.roundingMode="ceil";continue;case"rounding-mode-down":b.roundingMode="trunc";continue;case"rounding-mode-up":b.roundingMode="expand";continue;case"rounding-mode-half-even":b.roundingMode="halfEven";continue;case"rounding-mode-half-down":b.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":b.roundingMode="halfExpand";continue;case"integer-width":if(c.options.length>1)throw RangeError("integer-width stems only accept a single optional option");c.options[0].replace(O,function(a,c,d,e,f,g){if(c)b.minimumIntegerDigits=d.length;else if(e&&f)throw Error("We currently do not support maximum integer digits");else if(g)throw Error("We currently do not support exact integer digits");return""});continue}if(P.test(c.stem)){b.minimumIntegerDigits=c.stem.length;continue}if(M.test(c.stem)){if(c.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");c.stem.replace(M,function(a,c,d,e,f,g){return"*"===d?b.minimumFractionDigits=c.length:e&&"#"===e[0]?b.maximumFractionDigits=e.length:f&&g?(b.minimumFractionDigits=f.length,b.maximumFractionDigits=f.length+g.length):(b.minimumFractionDigits=c.length,b.maximumFractionDigits=c.length),""});let a=c.options[0];"w"===a?b={...b,trailingZeroDisplay:"stripIfInteger"}:a&&(b={...b,...Q(a)});continue}if(N.test(c.stem)){b={...b,...Q(c.stem)};continue}let a=R(c.stem);a&&(b={...b,...a});let d=function(a){let b;if("E"===a[0]&&"E"===a[1]?(b={notation:"engineering"},a=a.slice(2)):"E"===a[0]&&(b={notation:"scientific"},a=a.slice(1)),b){let c=a.slice(0,2);if("+!"===c?(b.signDisplay="always",a=a.slice(2)):"+?"===c&&(b.signDisplay="exceptZero",a=a.slice(2)),!P.test(a))throw Error("Malformed concise eng/scientific notation");b.minimumIntegerDigits=a.length}return b}(c.stem);d&&(b={...b,...d})}return b}(c):{}},err:null}}tryParsePluralOrSelectOptions(a,b,c,d){let e=!1,f=[],g=new Set,{value:h,location:i}=d;for(;;){if(0===h.length){let a=this.clonePosition();if("select"!==b&&this.bumpIf("=")){let b=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_SELECTOR,I.INVALID_PLURAL_ARGUMENT_SELECTOR);if(b.err)return b;i=W(a,this.clonePosition()),h=this.message.slice(a.offset,this.offset())}else break}if(g.has(h))return this.error("select"===b?I.DUPLICATE_SELECT_ARGUMENT_SELECTOR:I.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,i);"other"===h&&(e=!0),this.bumpSpace();let d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===b?I.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:I.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,W(this.clonePosition(),this.clonePosition()));let j=this.parseMessage(a+1,b,c);if(j.err)return j;let k=this.tryParseArgumentClose(d);if(k.err)return k;f.push([h,{value:j.val,location:W(d,this.clonePosition())}]),g.add(h),this.bumpSpace(),{value:h,location:i}=this.parseIdentifierIfPossible()}return 0===f.length?this.error("select"===b?I.EXPECT_SELECT_ARGUMENT_SELECTOR:I.EXPECT_PLURAL_ARGUMENT_SELECTOR,W(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!e?this.error(I.MISSING_OTHER_CLAUSE,W(this.clonePosition(),this.clonePosition())):{val:f,err:null}}tryParseDecimalInteger(a,b){let c=1,d=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(c=-1);let e=!1,f=0;for(;!this.isEOF();){let a=this.char();if(a>=48&&a<=57)e=!0,f=10*f+(a-48),this.bump();else break}let g=W(d,this.clonePosition());return e?Number.isSafeInteger(f*=c)?{val:f,err:null}:this.error(b,g):this.error(a,g)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let a=this.position.offset;if(a>=this.message.length)throw Error("out of bound");let b=this.message.codePointAt(a);if(void 0===b)throw Error(`Offset ${a} is at invalid UTF-16 code unit boundary`);return b}error(a,b){return{val:null,err:{kind:a,message:this.message,location:b}}}bump(){if(this.isEOF())return;let a=this.char();10===a?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=a<65536?1:2)}bumpIf(a){if(this.message.startsWith(a,this.offset())){for(let b=0;b<a.length;b++)this.bump();return!0}return!1}bumpUntil(a){let b=this.offset(),c=this.message.indexOf(a,b);return c>=0?(this.bumpTo(c),!0):(this.bumpTo(this.message.length),!1)}bumpTo(a){if(this.offset()>a)throw Error(`targetOffset ${a} must be greater than or equal to the current offset ${this.offset()}`);for(a=Math.min(a,this.message.length);;){let b=this.offset();if(b===a)break;if(b>a)throw Error(`targetOffset ${a} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(var a;!this.isEOF()&&((a=this.char())>=9&&a<=13||32===a||133===a||a>=8206&&a<=8207||8232===a||8233===a);)this.bump()}peek(){if(this.isEOF())return null;let a=this.char(),b=this.offset();return this.message.charCodeAt(b+(a>=65536?2:1))??null}}function ad(a){return a>=97&&a<=122||a>=65&&a<=90}function ae(a,b={}){let c=new ac(a,b={shouldParseSkeletons:!0,requiresOtherClause:!0,...b}).parse();if(c.err){let a=SyntaxError(I[c.err.kind]);throw a.location=c.err.location,a.originalMessage=c.err.message,a}return b?.captureLocation||function a(b){b.forEach(b=>{if(delete b.location,D(b)||E(b))for(let c in b.options)delete b.options[c].location,a(b.options[c].value);else A(b)&&G(b.style)||(B(b)||C(b))&&H(b.style)?delete b.style.location:F(b)&&a(b.children)})}(c.val),c.val}let af=((h={}).MISSING_VALUE="MISSING_VALUE",h.INVALID_VALUE="INVALID_VALUE",h.MISSING_INTL_API="MISSING_INTL_API",h);class ag extends Error{code;originalMessage;constructor(a,b,c){super(a),this.code=b,this.originalMessage=c}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}}class ah extends ag{constructor(a,b,c,d){super(`Invalid values for "${a}": "${b}". Options are "${Object.keys(c).join('", "')}"`,af.INVALID_VALUE,d)}}class ai extends ag{constructor(a,b,c){super(`Value for "${a}" must be of type ${b}`,af.INVALID_VALUE,c)}}class aj extends ag{constructor(a,b){super(`The intl string context variable "${a}" was not provided to the string "${b}"`,af.MISSING_VALUE,b)}}let ak=((i={})[i.literal=0]="literal",i[i.object=1]="object",i);function al(a){return{create:()=>({get:b=>a[b],set(b,c){a[b]=c}})}}class am{ast;locales;resolvedLocale;formatters;formats;message;formatterCache={number:{},dateTime:{},pluralRules:{}};constructor(a,b=am.defaultLocale,c,d){if(this.locales=b,this.resolvedLocale=am.resolveLocale(b),"string"==typeof a){if(this.message=a,!am.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...b}=d||{};this.ast=am.__parse(a,{...b,locale:this.resolvedLocale})}else this.ast=a;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=function(a,b){return b?Object.keys(a).reduce((c,d)=>{var e,f;return c[d]=(e=a[d],(f=b[d])?{...e,...f,...Object.keys(e).reduce((a,b)=>(a[b]={...e[b],...f[b]},a),{})}:e),c},{...a}):a}(am.formats,c),this.formatters=d&&d.formatters||function(a={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:k((...a)=>new Intl.NumberFormat(...a),{cache:al(a.number),strategy:q.variadic}),getDateTimeFormat:k((...a)=>new Intl.DateTimeFormat(...a),{cache:al(a.dateTime),strategy:q.variadic}),getPluralRules:k((...a)=>new Intl.PluralRules(...a),{cache:al(a.pluralRules),strategy:q.variadic})}}(this.formatterCache)}format=a=>{let b=this.formatToParts(a);if(1===b.length)return b[0].value;let c=b.reduce((a,b)=>(a.length&&b.type===ak.literal&&"string"==typeof a[a.length-1]?a[a.length-1]+=b.value:a.push(b.value),a),[]);return c.length<=1?c[0]||"":c};formatToParts=a=>(function a(b,c,d,e,f,g,h){if(1===b.length&&z(b[0]))return[{type:ak.literal,value:b[0].value}];let i=[];for(let j of b){if(z(j)){i.push({type:ak.literal,value:j.value});continue}if(j.type===x.pound){"number"==typeof g&&i.push({type:ak.literal,value:d.getNumberFormat(c).format(g)});continue}let{value:b}=j;if(!(f&&b in f))throw new aj(b,h);let k=f[b];if(j.type===x.argument){k&&"string"!=typeof k&&"number"!=typeof k&&"bigint"!=typeof k||(k="string"==typeof k||"number"==typeof k||"bigint"==typeof k?String(k):""),i.push({type:"string"==typeof k?ak.literal:ak.object,value:k});continue}if(B(j)){let a="string"==typeof j.style?e.date[j.style]:H(j.style)?j.style.parsedOptions:void 0;i.push({type:ak.literal,value:d.getDateTimeFormat(c,a).format(k)});continue}if(C(j)){let a="string"==typeof j.style?e.time[j.style]:H(j.style)?j.style.parsedOptions:e.time.medium;i.push({type:ak.literal,value:d.getDateTimeFormat(c,a).format(k)});continue}if(A(j)){let a="string"==typeof j.style?e.number[j.style]:G(j.style)?j.style.parsedOptions:void 0;if(a&&a.scale){let b=a.scale||1;if("bigint"==typeof k){if(!Number.isInteger(b))throw TypeError(`Cannot apply fractional scale ${b} to bigint value. Scale must be an integer when formatting bigint.`);k*=BigInt(b)}else k*=b}i.push({type:ak.literal,value:d.getNumberFormat(c,a).format(k)});continue}if(F(j)){let{children:b,value:k}=j,l=f[k];if("function"!=typeof l)throw new ai(k,"function",h);let m=l(a(b,c,d,e,f,g).map(a=>a.value));Array.isArray(m)||(m=[m]),i.push(...m.map(a=>({type:"string"==typeof a?ak.literal:ak.object,value:a})))}if(D(j)){let b=k,g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other;if(!g)throw new ah(j.value,k,Object.keys(j.options),h);i.push(...a(g.value,c,d,e,f));continue}if(E(j)){let b=`=${k}`,g=Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0;if(!g){if(!Intl.PluralRules)throw new ag(`Intl.PluralRules is not available in this environment.
|
|
38
38
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
39
|
-
`,af.MISSING_INTL_API,h);let a="bigint"==typeof k?Number(k):k,b=d.getPluralRules(c,{type:j.pluralType}).select(a-(j.offset||0));g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other}if(!g)throw new ah(j.value,k,Object.keys(j.options),h);let l="bigint"==typeof k?Number(k):k;i.push(...a(g.value,c,d,e,f,l-(j.offset||0)));continue}}return i.length<2?i:i.reduce((a,b)=>{let c=a[a.length-1];return c&&c.type===ak.literal&&b.type===ak.literal?c.value+=b.value:a.push(b),a},[])})(this.ast,this.locales,this.formatters,this.formats,a,void 0,this.message);resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]});getAst=()=>this.ast;static memoizedDefaultLocale=null;static get defaultLocale(){return am.memoizedDefaultLocale||(am.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),am.memoizedDefaultLocale}static resolveLocale=a=>{if(void 0===Intl.Locale)return;let b=Intl.NumberFormat.supportedLocalesOf(a);return new Intl.Locale(b.length>0?b[0]:"string"==typeof a?a:a[0])};static __parse=ae;static formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}function an(...[a,b,c,d]){let e;if(Array.isArray(b))throw new r(s.INVALID_MESSAGE,void 0);if("object"==typeof b)throw new r(s.INSUFFICIENT_PATH,void 0);if("string"==typeof b){let a=c||/'[{}]/.test(b)?void 0:b;if(a)return a}let{cache:f,formats:g,formatters:h,globalFormats:i,locale:k,timeZone:l}=d;h.getMessageFormat||(h.getMessageFormat=u((...a)=>new am(a[0],a[1],a[2],{formatters:h,...a[3]}),f.message));try{let a,c,d,f;e=h.getMessageFormat(b,k,(a=am.formats.date,c=am.formats.time,d={...i?.dateTime,...g?.dateTime},f={date:{...a,...d},time:{...c,...d},number:{...i?.number,...g?.number}},l&&["date","time"].forEach(a=>{let b=f[a];for(let[a,c]of Object.entries(b))b[a]={timeZone:l,...c}}),f),{formatters:{...h,getDateTimeFormat:(a,b)=>h.getDateTimeFormat(a,{...b,timeZone:b?.timeZone??l})}})}catch(a){throw new r(s.INVALID_MESSAGE,void 0)}let m=e.format(c);return(0,j.isValidElement)(m)||Array.isArray(m)||"string"==typeof m?m:String(m)}function ao(...a){return a.filter(Boolean).join(".")}function ap(a){return ao(a.namespace,a.key)}function aq(a){console.error(a)}function ar(a,b,c,d){let e=ao(d,c);if(!b)throw Error(e);let f=b;return c.split(".").forEach(b=>{let c=f[b];if(null==b||null==c)throw Error(e+` (${a})`);f=c}),f}an.raw=!0;let as={second:1,seconds:1,minute:60,minutes:60,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:2628e3,months:2628e3,quarter:7884e3,quarters:7884e3,year:31536e3,years:31536e3};var at=c(48249);let au=(0,j.createContext)(void 0);function av({children:a,formats:b,getMessageFallback:c,locale:d,messages:e,now:f,onError:g,timeZone:h}){let i=(0,j.useContext)(au),k=(0,j.useMemo)(()=>i?.cache||t(),[d,i?.cache]),l=(0,j.useMemo)(()=>i?.formatters||w(k),[k,i?.formatters]),m=(0,j.useMemo)(()=>({...function({formats:a,getMessageFallback:b,messages:c,onError:d,...e}){return{...e,formats:a||void 0,messages:c||void 0,onError:d||aq,getMessageFallback:b||ap}}({locale:d,formats:void 0===b?i?.formats:b,getMessageFallback:c||i?.getMessageFallback,messages:void 0===e?i?.messages:e,now:f||i?.now,onError:g||i?.onError,timeZone:h||i?.timeZone}),formatters:l,cache:k}),[k,b,l,c,d,e,f,g,i,h]);return(0,at.jsx)(au.Provider,{value:m,children:a})}function aw(){let a=(0,j.useContext)(au);if(!a)throw Error(void 0);return a}let ax=!1,ay="u"<typeof window;function az(a){return function(a,b,c){let{cache:d,formats:e,formatters:f,getMessageFallback:g,locale:h,onError:i,timeZone:k}=aw(),l=a["!"],m="!"===b?void 0:b.slice(2);return k||ax||!ay||(ax=!0,i(new r(s.ENVIRONMENT_FALLBACK,void 0))),(0,j.useMemo)(()=>{var a;let b;return b=function(a,b,c){try{if(!b)throw Error(void 0);let d=c?ar(a,b,c):b;if(!d)throw Error(c);return d}catch(a){return new r(s.MISSING_MESSAGE,a.message)}}((a={cache:d,formatters:f,getMessageFallback:g,messages:l,namespace:m,onError:i,formats:e,locale:h,timeZone:k}).locale,a.messages,a.namespace),function({cache:a,formats:b,formatters:c,getMessageFallback:d=ap,locale:e,messagesOrError:f,namespace:g,onError:h,timeZone:i}){let k=f instanceof r;function l(a,b,c,e){let f=new r(b,c);return h(f),e??d({error:f,key:a,namespace:g})}function m(m,n,o,p){let q;if(k){if(!p)return h(f),d({error:f,key:m,namespace:g});q=p}else try{q=ar(e,f,m,g)}catch(a){if(!p)return l(m,s.MISSING_MESSAGE,a.message,p);q=p}try{let d,f=ao(g,m);return an(f,q,n?(d={},Object.keys(n).forEach(a=>{let b,c=0,e=n[a];b="function"==typeof e?b=>{let d=e(b);return(0,j.isValidElement)(d)?(0,j.cloneElement)(d,{key:a+c++}):d}:e,d[a]=b}),d):n,{cache:a,formatters:c,globalFormats:b,formats:o,locale:e,timeZone:i})}catch(c){let a,b;return c instanceof r?(a=c.code,b=c.originalMessage):(a=s.FORMATTING_ERROR,b=c.message),l(m,a,b,p)}}function n(a,b,c,d){let e=m(a,b,c,d);return"string"!=typeof e?l(a,s.INVALID_MESSAGE,void 0):e}return n.rich=m,n.markup=(a,b,c,d)=>m(a,b,c,d),n.raw=a=>{if(k)return h(f),d({error:f,key:a,namespace:g});try{return ar(e,f,a,g)}catch(b){return l(a,s.MISSING_MESSAGE,b.message)}},n.has=a=>{if(k)return!1;try{return ar(e,f,a,g),!0}catch{return!1}},n}({...a,messagesOrError:b})},[d,f,g,l,m,i,e,h,k])}({"!":aw().messages},a?`!.${a}`:"!",0)}function aA(){return aw().locale}function aB(){let{formats:a,formatters:b,locale:c,now:d,onError:e,timeZone:f}=aw();return(0,j.useMemo)(()=>(function(a){let{_cache:b=t(),_formatters:c=w(b),formats:d,locale:e,onError:f=aq,timeZone:g}=a;function h(a){return a?.timeZone||(g?a={...a,timeZone:g}:f(new r(s.ENVIRONMENT_FALLBACK,void 0))),a}function i(a,b,c,d,e){let g;try{g=function(a,b,c){let d;if("string"==typeof b){if(!(d=a?.[b])){let a=new r(s.MISSING_FORMAT,void 0);throw f(a),a}}else d=b;return c&&(d={...d,...c}),d}(c,a,b)}catch{return e()}try{return d(g)}catch(a){return f(new r(s.FORMATTING_ERROR,a.message)),e()}}function j(a,b,f){return i(b,f,d?.dateTime,b=>(b=h(b),c.getDateTimeFormat(e,b).format(a)),()=>String(a))}function k(){return a.now?a.now:(f(new r(s.ENVIRONMENT_FALLBACK,void 0)),new Date)}return{dateTime:j,number:function(a,b,f){return i(b,f,d?.number,b=>c.getNumberFormat(e,b).format(a),()=>String(a))},relativeTime:function(a,b){try{var d;let f,g,h,i={};b instanceof Date||"number"==typeof b?f=new Date(b):b&&(f=null!=b.now?new Date(b.now):k(),g=b.unit,i.style=b.style,i.numberingSystem=b.numberingSystem),f||(f=k());let j=(new Date(a).getTime()-f.getTime())/1e3;g||(g=(h=Math.abs(j))<60?"second":h<3600?"minute":h<86400?"hour":h<604800?"day":h<2628e3?"week":h<31536e3?"month":"year"),i.numeric="second"===g?"auto":"always";let l=(d=g,Math.round(j/as[d]));return c.getRelativeTimeFormat(e,i).format(l,g)}catch(b){return f(new r(s.FORMATTING_ERROR,b.message)),String(a)}},list:function(a,b,f){let g=[],h=new Map,j=0;for(let b of a){let a;"object"==typeof b?(a=String(j),h.set(a,b)):a=String(b),g.push(a),j++}return i(b,f,d?.list,a=>{let b=c.getListFormat(e,a).formatToParts(g).map(a=>"literal"===a.type?a.value:h.get(a.value)||a.value);return h.size>0?b:b.join("")},()=>String(a))},dateTimeRange:function(a,b,f,g){return i(f,g,d?.dateTime,d=>(d=h(d),c.getDateTimeFormat(e,d).formatRange(a,b)),()=>[j(a),j(b)].join(" – "))}}})({formats:a,locale:c,now:d,onError:e,timeZone:f,_formatters:b}),[a,b,d,c,e,f])}}};
|
|
39
|
+
`,af.MISSING_INTL_API,h);let a="bigint"==typeof k?Number(k):k,b=d.getPluralRules(c,{type:j.pluralType}).select(a-(j.offset||0));g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other}if(!g)throw new ah(j.value,k,Object.keys(j.options),h);let l="bigint"==typeof k?Number(k):k;i.push(...a(g.value,c,d,e,f,l-(j.offset||0)));continue}}return i.length<2?i:i.reduce((a,b)=>{let c=a[a.length-1];return c&&c.type===ak.literal&&b.type===ak.literal?c.value+=b.value:a.push(b),a},[])})(this.ast,this.locales,this.formatters,this.formats,a,void 0,this.message);resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]});getAst=()=>this.ast;static memoizedDefaultLocale=null;static get defaultLocale(){return am.memoizedDefaultLocale||(am.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),am.memoizedDefaultLocale}static resolveLocale=a=>{if(void 0===Intl.Locale)return;let b=Intl.NumberFormat.supportedLocalesOf(a);return new Intl.Locale(b.length>0?b[0]:"string"==typeof a?a:a[0])};static __parse=ae;static formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}function an(...[a,b,c,d]){let e;if(Array.isArray(b))throw new r(s.INVALID_MESSAGE,void 0);if("object"==typeof b)throw new r(s.INSUFFICIENT_PATH,void 0);if("string"==typeof b){let a=c||/'[{}]/.test(b)?void 0:b;if(a)return a}let{cache:f,formats:g,formatters:h,globalFormats:i,locale:k,timeZone:l}=d;h.getMessageFormat||(h.getMessageFormat=u((...a)=>new am(a[0],a[1],a[2],{formatters:h,...a[3]}),f.message));try{let a,c,d,f;e=h.getMessageFormat(b,k,(a=am.formats.date,c=am.formats.time,d={...i?.dateTime,...g?.dateTime},f={date:{...a,...d},time:{...c,...d},number:{...i?.number,...g?.number}},l&&["date","time"].forEach(a=>{let b=f[a];for(let[a,c]of Object.entries(b))b[a]={timeZone:l,...c}}),f),{formatters:{...h,getDateTimeFormat:(a,b)=>h.getDateTimeFormat(a,{...b,timeZone:b?.timeZone??l})}})}catch(a){throw new r(s.INVALID_MESSAGE,void 0)}let m=e.format(c);return(0,j.isValidElement)(m)||Array.isArray(m)||"string"==typeof m?m:String(m)}function ao(...a){return a.filter(Boolean).join(".")}function ap(a){return ao(a.namespace,a.key)}function aq(a){console.error(a)}function ar(a,b,c,d){let e=ao(d,c);if(!b)throw Error(e);let f=b;return c.split(".").forEach(b=>{let c=f[b];if(null==b||null==c)throw Error(e+` (${a})`);f=c}),f}an.raw=!0;let as={second:1,seconds:1,minute:60,minutes:60,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:2628e3,months:2628e3,quarter:7884e3,quarters:7884e3,year:31536e3,years:31536e3};var at=c(48249);let au=(0,j.createContext)(void 0);function av({children:a,formats:b,getMessageFallback:c,locale:d,messages:e,now:f,onError:g,timeZone:h}){let i=(0,j.useContext)(au),k=(0,j.useMemo)(()=>i?.cache||t(),[d,i?.cache]),l=(0,j.useMemo)(()=>i?.formatters||w(k),[k,i?.formatters]),m=(0,j.useMemo)(()=>({...function({formats:a,getMessageFallback:b,messages:c,onError:d,...e}){return{...e,formats:a||void 0,messages:c||void 0,onError:d||aq,getMessageFallback:b||ap}}({locale:d,formats:void 0===b?i?.formats:b,getMessageFallback:c||i?.getMessageFallback,messages:void 0===e?i?.messages:e,now:f||i?.now,onError:g||i?.onError,timeZone:h||i?.timeZone}),formatters:l,cache:k}),[k,b,l,c,d,e,f,g,i,h]);return(0,at.jsx)(au.Provider,{value:m,children:a})}function aw(){let a=(0,j.useContext)(au);if(!a)throw Error(void 0);return a}let ax=!1,ay="u"<typeof window;function az(a){return function(a,b,c){let{cache:d,formats:e,formatters:f,getMessageFallback:g,locale:h,onError:i,timeZone:k}=aw(),l=a["!"],m="!"===b?void 0:b.slice(2);return k||ax||!ay||(ax=!0,i(new r(s.ENVIRONMENT_FALLBACK,void 0))),(0,j.useMemo)(()=>{var a;let b;return b=function(a,b,c){try{if(!b)throw Error(void 0);let d=c?ar(a,b,c):b;if(!d)throw Error(c);return d}catch(a){return new r(s.MISSING_MESSAGE,a.message)}}((a={cache:d,formatters:f,getMessageFallback:g,messages:l,namespace:m,onError:i,formats:e,locale:h,timeZone:k}).locale,a.messages,a.namespace),function({cache:a,formats:b,formatters:c,getMessageFallback:d=ap,locale:e,messagesOrError:f,namespace:g,onError:h,timeZone:i}){let k=f instanceof r;function l(a,b,c,e){let f=new r(b,c);return h(f),e??d({error:f,key:a,namespace:g})}function m(m,n,o,p){let q;if(k){if(!p)return h(f),d({error:f,key:m,namespace:g});q=p}else try{q=ar(e,f,m,g)}catch(a){if(!p)return l(m,s.MISSING_MESSAGE,a.message,p);q=p}try{let d,f=ao(g,m);return an(f,q,n?(d={},Object.keys(n).forEach(a=>{let b,c=0,e=n[a];b="function"==typeof e?b=>{let d=e(b);return(0,j.isValidElement)(d)?(0,j.cloneElement)(d,{key:a+c++}):d}:e,d[a]=b}),d):n,{cache:a,formatters:c,globalFormats:b,formats:o,locale:e,timeZone:i})}catch(c){let a,b;return c instanceof r?(a=c.code,b=c.originalMessage):(a=s.FORMATTING_ERROR,b=c.message),l(m,a,b,p)}}function n(a,b,c,d){let e=m(a,b,c,d);return"string"!=typeof e?l(a,s.INVALID_MESSAGE,void 0):e}return n.rich=m,n.markup=(a,b,c,d)=>m(a,b,c,d),n.raw=a=>{if(k)return h(f),d({error:f,key:a,namespace:g});try{return ar(e,f,a,g)}catch(b){return l(a,s.MISSING_MESSAGE,b.message)}},n.has=a=>{if(k)return!1;try{return ar(e,f,a,g),!0}catch{return!1}},n}({...a,messagesOrError:b})},[d,f,g,l,m,i,e,h,k])}({"!":aw().messages},a?`!.${a}`:"!",0)}function aA(){return aw().locale}function aB(){let{formats:a,formatters:b,locale:c,now:d,onError:e,timeZone:f}=aw();return(0,j.useMemo)(()=>(function(a){let{_cache:b=t(),_formatters:c=w(b),formats:d,locale:e,onError:f=aq,timeZone:g}=a;function h(a){return a?.timeZone||(g?a={...a,timeZone:g}:f(new r(s.ENVIRONMENT_FALLBACK,void 0))),a}function i(a,b,c,d,e){let g;try{g=function(a,b,c){let d;if("string"==typeof b){if(!(d=a?.[b])){let a=new r(s.MISSING_FORMAT,void 0);throw f(a),a}}else d=b;return c&&(d={...d,...c}),d}(c,a,b)}catch{return e()}try{return d(g)}catch(a){return f(new r(s.FORMATTING_ERROR,a.message)),e()}}function j(a,b,f){return i(b,f,d?.dateTime,b=>(b=h(b),c.getDateTimeFormat(e,b).format(a)),()=>String(a))}function k(){return a.now?a.now:(f(new r(s.ENVIRONMENT_FALLBACK,void 0)),new Date)}return{dateTime:j,number:function(a,b,f){return i(b,f,d?.number,b=>c.getNumberFormat(e,b).format(a),()=>String(a))},relativeTime:function(a,b){try{var d;let f,g,h,i={};b instanceof Date||"number"==typeof b?f=new Date(b):b&&(f=null!=b.now?new Date(b.now):k(),g=b.unit,i.style=b.style,i.numberingSystem=b.numberingSystem),f||(f=k());let j=(new Date(a).getTime()-f.getTime())/1e3;g||(g=(h=Math.abs(j))<60?"second":h<3600?"minute":h<86400?"hour":h<604800?"day":h<2628e3?"week":h<31536e3?"month":"year"),i.numeric="second"===g?"auto":"always";let l=(d=g,Math.round(j/as[d]));return c.getRelativeTimeFormat(e,i).format(l,g)}catch(b){return f(new r(s.FORMATTING_ERROR,b.message)),String(a)}},list:function(a,b,f){let g=[],h=new Map,j=0;for(let b of a){let a;"object"==typeof b?(a=String(j),h.set(a,b)):a=String(b),g.push(a),j++}return i(b,f,d?.list,a=>{let b=c.getListFormat(e,a).formatToParts(g).map(a=>"literal"===a.type?a.value:h.get(a.value)||a.value);return h.size>0?b:b.join("")},()=>String(a))},dateTimeRange:function(a,b,f,g){return i(f,g,d?.dateTime,d=>(d=h(d),c.getDateTimeFormat(e,d).formatRange(a,b)),()=>[j(a),j(b)].join(" – "))}}})({formats:a,locale:c,now:d,onError:e,timeZone:f,_formatters:b}),[a,b,d,c,e,f])}},92207:(a,b,c)=>{"use strict";c.d(b,{a:()=>ag,b:()=>ae,d:()=>ad,i:()=>ai,r:()=>ah});var d,e,f,g,h,i=c(91986),j=c(14462);let k=((d={})[d.literal=0]="literal",d[d.argument=1]="argument",d[d.number=2]="number",d[d.date=3]="date",d[d.time=4]="time",d[d.select=5]="select",d[d.plural=6]="plural",d[d.pound=7]="pound",d[d.tag=8]="tag",d),l=((e={})[e.number=0]="number",e[e.dateTime=1]="dateTime",e);function m(a){return a.type===k.literal}function n(a){return a.type===k.number}function o(a){return a.type===k.date}function p(a){return a.type===k.time}function q(a){return a.type===k.select}function r(a){return a.type===k.plural}function s(a){return a.type===k.tag}function t(a){return!!(a&&"object"==typeof a&&a.type===l.number)}function u(a){return!!(a&&"object"==typeof a&&a.type===l.dateTime)}let v=((f={})[f.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",f[f.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",f[f.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",f[f.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",f[f.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",f[f.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",f[f.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",f[f.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",f[f.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",f[f.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",f[f.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",f[f.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",f[f.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",f[f.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",f[f.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",f[f.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",f[f.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",f[f.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",f[f.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",f[f.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",f[f.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",f[f.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",f[f.INVALID_TAG=23]="INVALID_TAG",f[f.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",f[f.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",f[f.UNCLOSED_TAG=27]="UNCLOSED_TAG",f),w=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,x=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,y=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,z=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,A=/^(@+)?(\+|#+)?[rs]?$/g,B=/(\*)(0+)|(#+)(0+)|(0+)/g,C=/^(0+)$/;function D(a){let b={};return"r"===a[a.length-1]?b.roundingPriority="morePrecision":"s"===a[a.length-1]&&(b.roundingPriority="lessPrecision"),a.replace(A,function(a,c,d){return"string"!=typeof d?(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length):"+"===d?b.minimumSignificantDigits=c.length:"#"===c[0]?b.maximumSignificantDigits=c.length:(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length+("string"==typeof d?d.length:0)),""}),b}function E(a){switch(a){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function F(a){let b=E(a);return b||{}}let G={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},H=RegExp(`^${w.source}*`),I=RegExp(`${w.source}*$`);function J(a,b){return{start:a,end:b}}let K=!!Object.fromEntries,L=!!String.prototype.trimStart,M=!!String.prototype.trimEnd,N=K?Object.fromEntries:function(a){let b={};for(let[c,d]of a)b[c]=d;return b},O=L?function(a){return a.trimStart()}:function(a){return a.replace(H,"")},P=M?function(a){return a.trimEnd()}:function(a){return a.replace(I,"")},Q=RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");class R{message;position;locale;ignoreTag;requiresOtherClause;shouldParseSkeletons;constructor(a,b={}){this.message=a,this.position={offset:0,line:1,column:1},this.ignoreTag=!!b.ignoreTag,this.locale=b.locale,this.requiresOtherClause=!!b.requiresOtherClause,this.shouldParseSkeletons=!!b.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(a,b,c){let d=[];for(;!this.isEOF();){let e=this.char();if(123===e){let b=this.parseArgument(a,c);if(b.err)return b;d.push(b.val)}else if(125===e&&a>0)break;else if(35===e&&("plural"===b||"selectordinal"===b)){let a=this.clonePosition();this.bump(),d.push({type:k.pound,location:J(a,this.clonePosition())})}else if(60!==e||this.ignoreTag||47!==this.peek())if(60===e&&!this.ignoreTag&&S(this.peek()||0)){let c=this.parseTag(a,b);if(c.err)return c;d.push(c.val)}else{let c=this.parseLiteral(a,b);if(c.err)return c;d.push(c.val)}else if(!c)return this.error(v.UNMATCHED_CLOSING_TAG,J(this.clonePosition(),this.clonePosition()));else break}return{val:d,err:null}}parseTag(a,b){let c=this.clonePosition();this.bump();let d=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:k.literal,value:`<${d}/>`,location:J(c,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(v.INVALID_TAG,J(c,this.clonePosition()));{let e=this.parseMessage(a+1,b,!0);if(e.err)return e;let f=e.val,g=this.clonePosition();if(!this.bumpIf("</"))return this.error(v.UNCLOSED_TAG,J(c,this.clonePosition()));{if(this.isEOF()||!S(this.char()))return this.error(v.INVALID_TAG,J(g,this.clonePosition()));let a=this.clonePosition();return d!==this.parseTagName()?this.error(v.UNMATCHED_CLOSING_TAG,J(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:k.tag,value:d,children:f,location:J(c,this.clonePosition())},err:null}:this.error(v.INVALID_TAG,J(g,this.clonePosition()))}}}parseTagName(){var a;let b=this.offset();for(this.bump();!this.isEOF()&&(45===(a=this.char())||46===a||a>=48&&a<=57||95===a||a>=97&&a<=122||a>=65&&a<=90||183==a||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039);)this.bump();return this.message.slice(b,this.offset())}parseLiteral(a,b){let c=this.clonePosition(),d="";for(;;){let c=this.tryParseQuote(b);if(c){d+=c;continue}let e=this.tryParseUnquoted(a,b);if(e){d+=e;continue}let f=this.tryParseLeftAngleBracket();if(f){d+=f;continue}break}let e=J(c,this.clonePosition());return{val:{type:k.literal,value:d,location:e},err:null}}tryParseLeftAngleBracket(){var a;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(S(a=this.peek()||0)||47===a)?null:(this.bump(),"<")}tryParseQuote(a){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===a||"selectordinal"===a)break;return null;default:return null}this.bump();let b=[this.char()];for(this.bump();!this.isEOF();){let a=this.char();if(39===a)if(39===this.peek())b.push(39),this.bump();else{this.bump();break}else b.push(a);this.bump()}return String.fromCodePoint(...b)}tryParseUnquoted(a,b){if(this.isEOF())return null;let c=this.char();return 60===c||123===c||35===c&&("plural"===b||"selectordinal"===b)||125===c&&a>0?null:(this.bump(),String.fromCodePoint(c))}parseArgument(a,b){let c=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,J(c,this.clonePosition()));if(125===this.char())return this.bump(),this.error(v.EMPTY_ARGUMENT,J(c,this.clonePosition()));let d=this.parseIdentifierIfPossible().value;if(!d)return this.error(v.MALFORMED_ARGUMENT,J(c,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,J(c,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:k.argument,value:d,location:J(c,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,J(c,this.clonePosition()));return this.parseArgumentOptions(a,b,d,c);default:return this.error(v.MALFORMED_ARGUMENT,J(c,this.clonePosition()))}}parseIdentifierIfPossible(){var a;let b=this.clonePosition(),c=this.offset(),d=(a=this.message,Q.lastIndex=c,Q.exec(a)[1]??""),e=c+d.length;return this.bumpTo(e),{value:d,location:J(b,this.clonePosition())}}parseArgumentOptions(a,b,c,d){let e=this.clonePosition(),f=this.parseIdentifierIfPossible().value,g=this.clonePosition();switch(f){case"":return this.error(v.EXPECT_ARGUMENT_TYPE,J(e,g));case"number":case"date":case"time":{this.bumpSpace();let a=null;if(this.bumpIf(",")){this.bumpSpace();let b=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;let d=P(c.val);if(0===d.length)return this.error(v.EXPECT_ARGUMENT_STYLE,J(this.clonePosition(),this.clonePosition()));a={style:d,styleLocation:J(b,this.clonePosition())}}let b=this.tryParseArgumentClose(d);if(b.err)return b;let e=J(d,this.clonePosition());if(a&&a.style.startsWith("::")){let b=O(a.style.slice(2));if("number"===f){let d=this.parseNumberSkeletonFromString(b,a.styleLocation);if(d.err)return d;return{val:{type:k.number,value:c,location:e,style:d.val},err:null}}{let d;if(0===b.length)return this.error(v.EXPECT_DATE_TIME_SKELETON,e);let g=b;this.locale&&(g=function(a,b){let c="";for(let d=0;d<a.length;d++){let e=a.charAt(d);if("j"===e){let f=0;for(;d+1<a.length&&a.charAt(d+1)===e;)f++,d++;let g=1+(1&f),h=f<2?1:3+(f>>1),i=function(a){let b,c=a.hourCycle;if(void 0===c&&a.hourCycles&&a.hourCycles.length&&(c=a.hourCycles[0]),c)switch(c){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}let d=a.language;return"root"!==d&&(b=a.maximize().region),(G[b||""]||G[d||""]||G[`${d}-001`]||G["001"])[0]}(b);for(("H"==i||"k"==i)&&(h=0);h-- >0;)c+="a";for(;g-- >0;)c=i+c}else"J"===e?c+="H":c+=e}return c}(b,this.locale));let h={type:l.dateTime,pattern:g,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?(d={},g.replace(x,a=>{let b=a.length;switch(a[0]){case"G":d.era=4===b?"long":5===b?"narrow":"short";break;case"y":d.year=2===b?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":d.month=["numeric","2-digit","short","long","narrow"][b-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":d.day=["numeric","2-digit"][b-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":d.weekday=4===b?"long":5===b?"narrow":"short";break;case"e":if(b<4)throw RangeError("`e..eee` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"c":if(b<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"a":d.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":d.hourCycle="h12",d.hour=["numeric","2-digit"][b-1];break;case"H":d.hourCycle="h23",d.hour=["numeric","2-digit"][b-1];break;case"K":d.hourCycle="h11",d.hour=["numeric","2-digit"][b-1];break;case"k":d.hourCycle="h24",d.hour=["numeric","2-digit"][b-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":d.minute=["numeric","2-digit"][b-1];break;case"s":d.second=["numeric","2-digit"][b-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":d.timeZoneName=b<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),d):{}};return{val:{type:"date"===f?k.date:k.time,value:c,location:e,style:h},err:null}}}return{val:{type:"number"===f?k.number:"date"===f?k.date:k.time,value:c,location:e,style:a?.style??null},err:null}}case"plural":case"selectordinal":case"select":{let e=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(v.EXPECT_SELECT_ARGUMENT_OPTIONS,J(e,{...e}));this.bumpSpace();let g=this.parseIdentifierIfPossible(),h=0;if("select"!==f&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,J(this.clonePosition(),this.clonePosition()));this.bumpSpace();let a=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(a.err)return a;this.bumpSpace(),g=this.parseIdentifierIfPossible(),h=a.val}let i=this.tryParsePluralOrSelectOptions(a,f,b,g);if(i.err)return i;let j=this.tryParseArgumentClose(d);if(j.err)return j;let l=J(d,this.clonePosition());if("select"===f)return{val:{type:k.select,value:c,options:N(i.val),location:l},err:null};return{val:{type:k.plural,value:c,options:N(i.val),offset:h,pluralType:"plural"===f?"cardinal":"ordinal",location:l},err:null}}default:return this.error(v.INVALID_ARGUMENT_TYPE,J(e,g))}}tryParseArgumentClose(a){return this.isEOF()||125!==this.char()?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,J(a,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let a=0,b=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(v.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,J(a,this.clonePosition()));this.bump();break}case 123:a+=1,this.bump();break;case 125:if(!(a>0))return{val:this.message.slice(b.offset,this.offset()),err:null};a-=1;break;default:this.bump()}return{val:this.message.slice(b.offset,this.offset()),err:null}}parseNumberSkeletonFromString(a,b){let c=[];try{c=function(a){if(0===a.length)throw Error("Number skeleton cannot be empty");let b=a.split(y).filter(a=>a.length>0),c=[];for(let a of b){let b=a.split("/");if(0===b.length)throw Error("Invalid number skeleton");let[d,...e]=b;for(let a of e)if(0===a.length)throw Error("Invalid number skeleton");c.push({stem:d,options:e})}return c}(a)}catch{return this.error(v.INVALID_NUMBER_SKELETON,b)}return{val:{type:l.number,tokens:c,location:b,parsedOptions:this.shouldParseSkeletons?function(a){let b={};for(let c of a){switch(c.stem){case"percent":case"%":b.style="percent";continue;case"%x100":b.style="percent",b.scale=100;continue;case"currency":b.style="currency",b.currency=c.options[0];continue;case"group-off":case",_":b.useGrouping=!1;continue;case"precision-integer":case".":b.maximumFractionDigits=0;continue;case"measure-unit":case"unit":b.style="unit",b.unit=c.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":b.notation="compact",b.compactDisplay="short";continue;case"compact-long":case"KK":b.notation="compact",b.compactDisplay="long";continue;case"scientific":b={...b,notation:"scientific",...c.options.reduce((a,b)=>({...a,...F(b)}),{})};continue;case"engineering":b={...b,notation:"engineering",...c.options.reduce((a,b)=>({...a,...F(b)}),{})};continue;case"notation-simple":b.notation="standard";continue;case"unit-width-narrow":b.currencyDisplay="narrowSymbol",b.unitDisplay="narrow";continue;case"unit-width-short":b.currencyDisplay="code",b.unitDisplay="short";continue;case"unit-width-full-name":b.currencyDisplay="name",b.unitDisplay="long";continue;case"unit-width-iso-code":b.currencyDisplay="symbol";continue;case"scale":b.scale=parseFloat(c.options[0]);continue;case"rounding-mode-floor":b.roundingMode="floor";continue;case"rounding-mode-ceiling":b.roundingMode="ceil";continue;case"rounding-mode-down":b.roundingMode="trunc";continue;case"rounding-mode-up":b.roundingMode="expand";continue;case"rounding-mode-half-even":b.roundingMode="halfEven";continue;case"rounding-mode-half-down":b.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":b.roundingMode="halfExpand";continue;case"integer-width":if(c.options.length>1)throw RangeError("integer-width stems only accept a single optional option");c.options[0].replace(B,function(a,c,d,e,f,g){if(c)b.minimumIntegerDigits=d.length;else if(e&&f)throw Error("We currently do not support maximum integer digits");else if(g)throw Error("We currently do not support exact integer digits");return""});continue}if(C.test(c.stem)){b.minimumIntegerDigits=c.stem.length;continue}if(z.test(c.stem)){if(c.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");c.stem.replace(z,function(a,c,d,e,f,g){return"*"===d?b.minimumFractionDigits=c.length:e&&"#"===e[0]?b.maximumFractionDigits=e.length:f&&g?(b.minimumFractionDigits=f.length,b.maximumFractionDigits=f.length+g.length):(b.minimumFractionDigits=c.length,b.maximumFractionDigits=c.length),""});let a=c.options[0];"w"===a?b={...b,trailingZeroDisplay:"stripIfInteger"}:a&&(b={...b,...D(a)});continue}if(A.test(c.stem)){b={...b,...D(c.stem)};continue}let a=E(c.stem);a&&(b={...b,...a});let d=function(a){let b;if("E"===a[0]&&"E"===a[1]?(b={notation:"engineering"},a=a.slice(2)):"E"===a[0]&&(b={notation:"scientific"},a=a.slice(1)),b){let c=a.slice(0,2);if("+!"===c?(b.signDisplay="always",a=a.slice(2)):"+?"===c&&(b.signDisplay="exceptZero",a=a.slice(2)),!C.test(a))throw Error("Malformed concise eng/scientific notation");b.minimumIntegerDigits=a.length}return b}(c.stem);d&&(b={...b,...d})}return b}(c):{}},err:null}}tryParsePluralOrSelectOptions(a,b,c,d){let e=!1,f=[],g=new Set,{value:h,location:i}=d;for(;;){if(0===h.length){let a=this.clonePosition();if("select"!==b&&this.bumpIf("=")){let b=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_SELECTOR,v.INVALID_PLURAL_ARGUMENT_SELECTOR);if(b.err)return b;i=J(a,this.clonePosition()),h=this.message.slice(a.offset,this.offset())}else break}if(g.has(h))return this.error("select"===b?v.DUPLICATE_SELECT_ARGUMENT_SELECTOR:v.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,i);"other"===h&&(e=!0),this.bumpSpace();let d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===b?v.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:v.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,J(this.clonePosition(),this.clonePosition()));let j=this.parseMessage(a+1,b,c);if(j.err)return j;let k=this.tryParseArgumentClose(d);if(k.err)return k;f.push([h,{value:j.val,location:J(d,this.clonePosition())}]),g.add(h),this.bumpSpace(),{value:h,location:i}=this.parseIdentifierIfPossible()}return 0===f.length?this.error("select"===b?v.EXPECT_SELECT_ARGUMENT_SELECTOR:v.EXPECT_PLURAL_ARGUMENT_SELECTOR,J(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!e?this.error(v.MISSING_OTHER_CLAUSE,J(this.clonePosition(),this.clonePosition())):{val:f,err:null}}tryParseDecimalInteger(a,b){let c=1,d=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(c=-1);let e=!1,f=0;for(;!this.isEOF();){let a=this.char();if(a>=48&&a<=57)e=!0,f=10*f+(a-48),this.bump();else break}let g=J(d,this.clonePosition());return e?Number.isSafeInteger(f*=c)?{val:f,err:null}:this.error(b,g):this.error(a,g)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let a=this.position.offset;if(a>=this.message.length)throw Error("out of bound");let b=this.message.codePointAt(a);if(void 0===b)throw Error(`Offset ${a} is at invalid UTF-16 code unit boundary`);return b}error(a,b){return{val:null,err:{kind:a,message:this.message,location:b}}}bump(){if(this.isEOF())return;let a=this.char();10===a?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=a<65536?1:2)}bumpIf(a){if(this.message.startsWith(a,this.offset())){for(let b=0;b<a.length;b++)this.bump();return!0}return!1}bumpUntil(a){let b=this.offset(),c=this.message.indexOf(a,b);return c>=0?(this.bumpTo(c),!0):(this.bumpTo(this.message.length),!1)}bumpTo(a){if(this.offset()>a)throw Error(`targetOffset ${a} must be greater than or equal to the current offset ${this.offset()}`);for(a=Math.min(a,this.message.length);;){let b=this.offset();if(b===a)break;if(b>a)throw Error(`targetOffset ${a} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(var a;!this.isEOF()&&((a=this.char())>=9&&a<=13||32===a||133===a||a>=8206&&a<=8207||8232===a||8233===a);)this.bump()}peek(){if(this.isEOF())return null;let a=this.char(),b=this.offset();return this.message.charCodeAt(b+(a>=65536?2:1))??null}}function S(a){return a>=97&&a<=122||a>=65&&a<=90}function T(a,b={}){let c=new R(a,b={shouldParseSkeletons:!0,requiresOtherClause:!0,...b}).parse();if(c.err){let a=SyntaxError(v[c.err.kind]);throw a.location=c.err.location,a.originalMessage=c.err.message,a}return b?.captureLocation||function a(b){b.forEach(b=>{if(delete b.location,q(b)||r(b))for(let c in b.options)delete b.options[c].location,a(b.options[c].value);else n(b)&&t(b.style)||(o(b)||p(b))&&u(b.style)?delete b.style.location:s(b)&&a(b.children)})}(c.val),c.val}let U=((g={}).MISSING_VALUE="MISSING_VALUE",g.INVALID_VALUE="INVALID_VALUE",g.MISSING_INTL_API="MISSING_INTL_API",g);class V extends Error{code;originalMessage;constructor(a,b,c){super(a),this.code=b,this.originalMessage=c}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}}class W extends V{constructor(a,b,c,d){super(`Invalid values for "${a}": "${b}". Options are "${Object.keys(c).join('", "')}"`,U.INVALID_VALUE,d)}}class X extends V{constructor(a,b,c){super(`Value for "${a}" must be of type ${b}`,U.INVALID_VALUE,c)}}class Y extends V{constructor(a,b){super(`The intl string context variable "${a}" was not provided to the string "${b}"`,U.MISSING_VALUE,b)}}let Z=((h={})[h.literal=0]="literal",h[h.object=1]="object",h);function $(a){return{create:()=>({get:b=>a[b],set(b,c){a[b]=c}})}}class _{ast;locales;resolvedLocale;formatters;formats;message;formatterCache={number:{},dateTime:{},pluralRules:{}};constructor(a,b=_.defaultLocale,c,d){if(this.locales=b,this.resolvedLocale=_.resolveLocale(b),"string"==typeof a){if(this.message=a,!_.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...b}=d||{};this.ast=_.__parse(a,{...b,locale:this.resolvedLocale})}else this.ast=a;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=function(a,b){return b?Object.keys(a).reduce((c,d)=>{var e,f;return c[d]=(e=a[d],(f=b[d])?{...e,...f,...Object.keys(e).reduce((a,b)=>(a[b]={...e[b],...f[b]},a),{})}:e),c},{...a}):a}(_.formats,c),this.formatters=d&&d.formatters||function(a={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:(0,j.B)((...a)=>new Intl.NumberFormat(...a),{cache:$(a.number),strategy:j.W.variadic}),getDateTimeFormat:(0,j.B)((...a)=>new Intl.DateTimeFormat(...a),{cache:$(a.dateTime),strategy:j.W.variadic}),getPluralRules:(0,j.B)((...a)=>new Intl.PluralRules(...a),{cache:$(a.pluralRules),strategy:j.W.variadic})}}(this.formatterCache)}format=a=>{let b=this.formatToParts(a);if(1===b.length)return b[0].value;let c=b.reduce((a,b)=>(a.length&&b.type===Z.literal&&"string"==typeof a[a.length-1]?a[a.length-1]+=b.value:a.push(b.value),a),[]);return c.length<=1?c[0]||"":c};formatToParts=a=>(function a(b,c,d,e,f,g,h){if(1===b.length&&m(b[0]))return[{type:Z.literal,value:b[0].value}];let i=[];for(let j of b){if(m(j)){i.push({type:Z.literal,value:j.value});continue}if(j.type===k.pound){"number"==typeof g&&i.push({type:Z.literal,value:d.getNumberFormat(c).format(g)});continue}let{value:b}=j;if(!(f&&b in f))throw new Y(b,h);let l=f[b];if(j.type===k.argument){l&&"string"!=typeof l&&"number"!=typeof l&&"bigint"!=typeof l||(l="string"==typeof l||"number"==typeof l||"bigint"==typeof l?String(l):""),i.push({type:"string"==typeof l?Z.literal:Z.object,value:l});continue}if(o(j)){let a="string"==typeof j.style?e.date[j.style]:u(j.style)?j.style.parsedOptions:void 0;i.push({type:Z.literal,value:d.getDateTimeFormat(c,a).format(l)});continue}if(p(j)){let a="string"==typeof j.style?e.time[j.style]:u(j.style)?j.style.parsedOptions:e.time.medium;i.push({type:Z.literal,value:d.getDateTimeFormat(c,a).format(l)});continue}if(n(j)){let a="string"==typeof j.style?e.number[j.style]:t(j.style)?j.style.parsedOptions:void 0;if(a&&a.scale){let b=a.scale||1;if("bigint"==typeof l){if(!Number.isInteger(b))throw TypeError(`Cannot apply fractional scale ${b} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(b)}else l*=b}i.push({type:Z.literal,value:d.getNumberFormat(c,a).format(l)});continue}if(s(j)){let{children:b,value:k}=j,l=f[k];if("function"!=typeof l)throw new X(k,"function",h);let m=l(a(b,c,d,e,f,g).map(a=>a.value));Array.isArray(m)||(m=[m]),i.push(...m.map(a=>({type:"string"==typeof a?Z.literal:Z.object,value:a})))}if(q(j)){let b=l,g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other;if(!g)throw new W(j.value,l,Object.keys(j.options),h);i.push(...a(g.value,c,d,e,f));continue}if(r(j)){let b=`=${l}`,g=Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0;if(!g){if(!Intl.PluralRules)throw new V(`Intl.PluralRules is not available in this environment.
|
|
40
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
41
|
+
`,U.MISSING_INTL_API,h);let a="bigint"==typeof l?Number(l):l,b=d.getPluralRules(c,{type:j.pluralType}).select(a-(j.offset||0));g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other}if(!g)throw new W(j.value,l,Object.keys(j.options),h);let k="bigint"==typeof l?Number(l):l;i.push(...a(g.value,c,d,e,f,k-(j.offset||0)));continue}}return i.length<2?i:i.reduce((a,b)=>{let c=a[a.length-1];return c&&c.type===Z.literal&&b.type===Z.literal?c.value+=b.value:a.push(b),a},[])})(this.ast,this.locales,this.formatters,this.formats,a,void 0,this.message);resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]});getAst=()=>this.ast;static memoizedDefaultLocale=null;static get defaultLocale(){return _.memoizedDefaultLocale||(_.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),_.memoizedDefaultLocale}static resolveLocale=a=>{if(void 0===Intl.Locale)return;let b=Intl.NumberFormat.supportedLocalesOf(a);return new Intl.Locale(b.length>0?b[0]:"string"==typeof a?a:a[0])};static __parse=T;static formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}var aa=c(3575);function ab(...[a,b,c,d]){let e;if(Array.isArray(b))throw new aa.I(aa.a.INVALID_MESSAGE,void 0);if("object"==typeof b)throw new aa.I(aa.a.INSUFFICIENT_PATH,void 0);if("string"==typeof b){let a=c||/'[{}]/.test(b)?void 0:b;if(a)return a}let{cache:f,formats:g,formatters:h,globalFormats:j,locale:k,timeZone:l}=d;h.getMessageFormat||(h.getMessageFormat=(0,aa.m)((...a)=>new _(a[0],a[1],a[2],{formatters:h,...a[3]}),f.message));try{let a,c,d,f;e=h.getMessageFormat(b,k,(a=_.formats.date,c=_.formats.time,d={...j?.dateTime,...g?.dateTime},f={date:{...a,...d},time:{...c,...d},number:{...j?.number,...g?.number}},l&&["date","time"].forEach(a=>{let b=f[a];for(let[a,c]of Object.entries(b))b[a]={timeZone:l,...c}}),f),{formatters:{...h,getDateTimeFormat:(a,b)=>h.getDateTimeFormat(a,{...b,timeZone:b?.timeZone??l})}})}catch(a){throw new aa.I(aa.a.INVALID_MESSAGE,void 0)}let m=e.format(c);return(0,i.isValidElement)(m)||Array.isArray(m)||"string"==typeof m?m:String(m)}function ac(...a){return a.filter(Boolean).join(".")}function ad(a){return ac(a.namespace,a.key)}function ae(a){console.error(a)}function af(a,b,c,d){let e=ac(d,c);if(!b)throw Error(e);let f=b;return c.split(".").forEach(b=>{let c=f[b];if(null==b||null==c)throw Error(e+` (${a})`);f=c}),f}function ag(a){let b=function(a,b,c){try{if(!b)throw Error(void 0);let d=c?af(a,b,c):b;if(!d)throw Error(c);return d}catch(a){return new aa.I(aa.a.MISSING_MESSAGE,a.message)}}(a.locale,a.messages,a.namespace);return function({cache:a,formats:b,formatters:c,getMessageFallback:d=ad,locale:e,messagesOrError:f,namespace:g,onError:h,timeZone:j}){let k=f instanceof aa.I;function l(a,b,c,e){let f=new aa.I(b,c);return h(f),e??d({error:f,key:a,namespace:g})}function m(m,n,o,p){let q;if(k){if(!p)return h(f),d({error:f,key:m,namespace:g});q=p}else try{q=af(e,f,m,g)}catch(a){if(!p)return l(m,aa.a.MISSING_MESSAGE,a.message,p);q=p}try{let d,f=ac(g,m);return ab(f,q,n?(d={},Object.keys(n).forEach(a=>{let b,c=0,e=n[a];b="function"==typeof e?b=>{let d=e(b);return(0,i.isValidElement)(d)?(0,i.cloneElement)(d,{key:a+c++}):d}:e,d[a]=b}),d):n,{cache:a,formatters:c,globalFormats:b,formats:o,locale:e,timeZone:j})}catch(c){let a,b;return c instanceof aa.I?(a=c.code,b=c.originalMessage):(a=aa.a.FORMATTING_ERROR,b=c.message),l(m,a,b,p)}}function n(a,b,c,d){let e=m(a,b,c,d);return"string"!=typeof e?l(a,aa.a.INVALID_MESSAGE,void 0):e}return n.rich=m,n.markup=(a,b,c,d)=>m(a,b,c,d),n.raw=a=>{if(k)return h(f),d({error:f,key:a,namespace:g});try{return af(e,f,a,g)}catch(b){return l(a,aa.a.MISSING_MESSAGE,b.message)}},n.has=a=>{if(k)return!1;try{return af(e,f,a,g),!0}catch{return!1}},n}({...a,messagesOrError:b})}function ah(a,b){return a===b?void 0:a.slice((b+".").length)}function ai({formats:a,getMessageFallback:b,messages:c,onError:d,...e}){return{...e,formats:a||void 0,messages:c||void 0,onError:d||ae,getMessageFallback:b||ad}}ab.raw=!0}};
|